PageSourceSearch

https://www.servustv.com/_next/static/chunks/2d5a14a0.b5f28f3b9c7e5a69.js

js servustv.com collected 2026-09-24 08:50:53 UTC 2,676,302 bytes, 166 lines download raw bytes

vendor: 11,247 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4551],{7798:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{let getRandomValues,t$1,d$1,audioContext,chimeBufferPromise,chimeBufferUrl;__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{initRbupVideoTvStreaming:()=>initRbupVideoTvStreaming});var n$5,l$c,u$6,t$6,o$j,r$k,f$7,e$4,process=__webpack_require__(50804),Xp=Object.defineProperty,Qp=(e,t,i)=>t in e?Xp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Si=(e,t,i)=>Qp(e,"symbol"!=typeof t?t+"":t,i),c$d={},s$6=[],a$e=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v$4=Array.isArray;function h$4(e,t){for(var i in t)e[i]=t[i];return e}function p$8(e){var t=e.parentNode;t&&t.removeChild(e)}function y$4(e,t,i){var n,r,o,a={};for(o in t)"key"==o?n=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?n$5.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return d$6(e,a,n,r,null)}function d$6(e,t,i,n,r){var o={type:e,props:t,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++u$6};return null==r&&null!=l$c.vnode&&l$c.vnode(o),o}function _$5(){return{current:null}}function k$5(e){return e.children}function b$5(e,t){this.props=e,this.context=t}function g$7(e,t){if(null==t)return e.__?g$7(e.__,e.__.__k.indexOf(e)+1):null;for(var i;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e)return i.__e;return"function"==typeof e.type?g$7(e):null}function m$7(e){var t,i;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e){e.__e=e.__c.base=i.__e;break}return m$7(e)}}function w$6(e){(!e.__d&&(e.__d=!0)&&t$6.push(e)&&!x$6.__r++||o$j!==l$c.debounceRendering)&&((o$j=l$c.debounceRendering)||r$k)(x$6)}function x$6(){var e,t,i,n,r,o,a,s;for(t$6.sort(f$7);e=t$6.shift();)e.__d&&(t=t$6.length,n=void 0,r=void 0,a=(o=(i=e).__v).__e,(s=i.__P)&&(n=[],(r=h$4({},o)).__v=o.__v+1,L$4(s,o,r,i.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,n,a??g$7(o),o.__h),M$3(n,o),o.__e!=a&&m$7(o)),t$6.length>t&&t$6.sort(f$7));x$6.__r=0}function P$3(e,t,i,n,r,o,a,s,l,c){var u,d,h,p,f,m,g,v=n&&n.__k||s$6,y=v.length;for(i.__k=[],u=0;u<t.length;u++)if(null!=(p=i.__k[u]=null==(p=t[u])||"boolean"==typeof p||"function"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?d$6(null,p,null,null,p):v$4(p)?d$6(k$5,{children:p},null,null,null):p.__b>0?d$6(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)){if(p.__=i,p.__b=i.__b+1,null===(h=v[u])||h&&p.key==h.key&&p.type===h.type)v[u]=void 0;else for(d=0;d<y;d++){if((h=v[d])&&p.key==h.key&&p.type===h.type){v[d]=void 0;break}h=null}L$4(e,p,h=h||c$d,r,o,a,s,l,c),f=p.__e,(d=p.ref)&&h.ref!=d&&(g||(g=[]),h.ref&&g.push(h.ref,null,p),g.push(d,p.__c||f,p)),null!=f?(null==m&&(m=f),"function"==typeof p.type&&p.__k===h.__k?p.__d=l=C$4(p,l,e):l=$$3(e,p,h,v,f,l),"function"==typeof i.type&&(i.__d=l)):l&&h.__e==l&&l.parentNode!=e&&(l=g$7(h))}for(i.__e=m,u=y;u--;)null!=v[u]&&("function"==typeof i.type&&null!=v[u].__e&&v[u].__e==i.__d&&(i.__d=A$4(n).nextSibling),q$3(v[u],v[u]));if(g)for(u=0;u<g.length;u++)O$3(g[u],g[++u],g[++u])}function C$4(e,t,i){for(var n,r=e.__k,o=0;r&&o<r.length;o++)(n=r[o])&&(n.__=e,t="function"==typeof n.type?C$4(n,t,i):$$3(i,n,n,r,n.__e,t));return t}function S$3(e,t){return t=t||[],null==e||"boolean"==typeof e||(v$4(e)?e.some(function(e){S$3(e,t)}):t.push(e)),t}function $$3(e,t,i,n,r,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==i||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<n.length;l+=1)if(s==r)break e;e.insertBefore(r,o),a=o}return void 0!==a?a:r.nextSibling}function A$4(e){var t,i,n;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((i=e.__k[t])&&(n=A$4(i)))return n}return null}function H$4(e,t,i,n,r){var o;for(o in i)"children"===o||"key"===o||o in t||T$5(e,o,null,i[o],n);for(o in t)r&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||i[o]===t[o]||T$5(e,o,t[o],i[o],n)}function I$4(e,t,i){"-"===t[0]?e.setProperty(t,i??""):e[t]=null==i?"":"number"!=typeof i||a$e.test(t)?i:i+"px"}function T$5(e,t,i,n,r){var o;e:if("style"===t)if("string"==typeof i)e.style.cssText=i;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)i&&t in i||I$4(e.style,t,"");if(i)for(t in i)n&&i[t]===n[t]||I$4(e.style,t,i[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=i,i?n||e.addEventListener(t,o?z$5:j$4,o):e.removeEventListener(t,o?z$5:j$4,o);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&t in e)try{e[t]=i??"";break e}catch{}"function"==typeof i||(null==i||!1===i&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,i))}}function j$4(e){return this.l[e.type+!1](l$c.event?l$c.event(e):e)}function z$5(e){return this.l[e.type+!0](l$c.event?l$c.event(e):e)}function L$4(e,t,i,n,r,o,a,s,l){var c,u,d,h,p,f,m,g,v,y,b,S,_,E,T,w=t.type;if(void 0!==t.constructor)return null;null!=i.__h&&(l=i.__h,s=t.__e=i.__e,t.__h=null,o=[s]),(c=l$c.__b)&&c(t);try{e:if("function"==typeof w){if(g=t.props,v=(c=w.contextType)&&n[c.__c],y=c?v?v.props.value:c.__:n,i.__c?m=(u=t.__c=i.__c).__=u.__E:("prototype"in w&&w.prototype.render?t.__c=u=new w(g,y):(t.__c=u=new b$5(g,y),u.constructor=w,u.render=B$5),v&&v.sub(u),u.props=g,u.state||(u.state={}),u.context=y,u.__n=n,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=w.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=h$4({},u.__s)),h$4(u.__s,w.getDerivedStateFromProps(g,u.__s))),h=u.props,p=u.state,u.__v=t,d)null==w.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==w.getDerivedStateFromProps&&g!==h&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,y),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,y)||t.__v===i.__v){for(t.__v!==i.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=i.__e,t.__k=i.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<u._sb.length;b++)u.__h.push(u._sb[b]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,y),null!=u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(h,p,f)})}if(u.context=y,u.props=g,u.__P=e,S=l$c.__r,_=0,"prototype"in w&&w.prototype.render){for(u.state=u.__s,u.__d=!1,S&&S(t),c=u.render(u.props,u.state,u.context),E=0;E<u._sb.length;E++)u.__h.push(u._sb[E]);u._sb=[]}else do u.__d=!1,S&&S(t),c=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++_<25);u.state=u.__s,null!=u.getChildContext&&(n=h$4(h$4({},n),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(h,p)),P$3(e,v$4(T=null!=c&&c.type===k$5&&null==c.key?c.props.children:c)?T:[T],t,i,n,r,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=N$4(i.__e,t,i,n,r,o,a,l);(c=l$c.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),l$c.__e(e,t,i)}}function M$3(e,t){l$c.__c&&l$c.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){l$c.__e(e,t.__v)}})}function N$4(e,t,i,n,r,o,a,s){var l,c,u,d=i.props,h=t.props,p=t.type,f=0;if("svg"===p&&(r=!0),null!=o){for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!p&&(p?l.localName===p:3===l.nodeType)){e=l,o[f]=null;break}}if(null==e){if(null===p)return document.createTextNode(h);e=r?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),o=null,s=!1}if(null===p)d===h||s&&e.data===h||(e.data=h);else{if(o=o&&n$5.call(e.childNodes),c=(d=i.props||c$d).dangerouslySetInnerHTML,u=h.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(H$4(e,h,d,r,s),u)t.__k=[];else if(P$3(e,v$4(f=t.props.children)?f:[f],t,i,n,r&&"foreignObject"!==p,o,a,o?o[0]:i.__k&&g$7(i,0),s),null!=o)for(f=o.length;f--;)null!=o[f]&&p$8(o[f]);s||("value"in h&&void 0!==(f=h.value)&&(f!==e.value||"progress"===p&&!f||"option"===p&&f!==d.value)&&T$5(e,"value",f,d.value,!1),"checked"in h&&void 0!==(f=h.checked)&&f!==e.checked&&T$5(e,"checked",f,d.checked,!1))}return e}function O$3(e,t,i){try{"function"==typeof e?e(t):e.current=t}catch(e){l$c.__e(e,i)}}function q$3(e,t,i){var n,r;if(l$c.unmount&&l$c.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||O$3(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){l$c.__e(e,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(r=0;r<n.length;r++)n[r]&&q$3(n[r],t,i||"function"!=typeof e.type);i||null==e.__e||p$8(e.__e),e.__=e.__e=e.__d=void 0}function B$5(e,t,i){return this.constructor(e,i)}function D$4(e,t,i){var n,r,o;l$c.__&&l$c.__(e,t),r=(n="function"==typeof i)?null:i&&i.__k||t.__k,o=[],L$4(t,e=(!n&&i||t).__k=y$4(k$5,null,[e]),r||c$d,c$d,void 0!==t.ownerSVGElement,!n&&i?[i]:r?null:t.firstChild?n$5.call(t.childNodes):null,o,!n&&i?i:r?r.__e:t.firstChild,n),M$3(o,e)}function E$3(e,t){D$4(e,t,E$3)}function F$5(e,t,i){var n,r,o,a,s=h$4({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?r=t[o]:s[o]=void 0===t[o]&&void 0!==a?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?n$5.call(arguments,2):i),d$6(e.type,s,n||e.key,r||e.ref,null)}function G$1(e,t){var i={__c:t="__cC"+e$4++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var i,n;return this.getChildContext||(i=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&i.some(function(e){e.__e=!0,w$6(e)})},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}),e.children}};return i.Provider.__=i.Consumer.contextType=i}function r$j(){return(r$j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}n$5=s$6.slice,l$c={__e:function(e,t,i,n){for(var r,o,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,n||{}),a=r.__d),a)return r.__E=r}catch(t){e=t}throw e}},u$6=0,b$5.prototype.setState=function(e,t){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h$4({},this.state),"function"==typeof e&&(e=e(h$4({},i),this.props)),e&&h$4(i,e),null!=e&&this.__v&&(t&&this._sb.push(t),w$
16(this))},b$5.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),w$6(this))},b$5.prototype.render=k$5,t$6=[],r$k="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$7=function(e,t){return e.__v.__b-t.__v.__b},x$6.__r=0,e$4=0;var i$8=["context","children"];function a$d(e){return this.getChildContext=function(){return e.context},F$5(e.children,function(e,t){if(null==e)return{};var i,n,r={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(i=o[n])>=0||(r[i]=e[i]);return r}(e,i$8))}function s$5(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=y$4(a$d,r$j({},this._props,{context:e.detail.context}),function e(t,i){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var n=[],r={},o=0,a=t.attributes,s=t.childNodes;for(o=a.length;o--;)"slot"!==a[o].name&&(r[a[o].name]=a[o].value,r[c$c(a[o].name)]=a[o].value);for(o=s.length;o--;){var l=e(s[o],null),c=s[o].slot;c?r[c]=y$4(p$7,{name:c},l):n[o]=l}var u=i?y$4(p$7,null,n):n;return y$4(i||t.nodeName.toLowerCase(),r,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?E$3:D$4)(this._vdom,this._root)}function c$c(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}function l$b(e,t,i){if(this._vdom){var n={};n[e]=i=i??void 0,n[c$c(e)]=i,this._vdom=F$5(this._vdom,n),D$4(this._vdom,this._root)}}function u$5(){D$4(this._vdom=null,this._root)}function p$7(e,t){var i=this;return y$4("slot",r$j({},e,{ref:function(e){e?(i.ref=e,i._listener||(i._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",i._listener))):i.ref.removeEventListener("_preact",i._listener)}}))}function register(e,t,i,n){function r(){var t=Reflect.construct(HTMLElement,[],r);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}return(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=s$5,r.prototype.attributeChangedCallback=l$b,r.prototype.disconnectedCallback=u$5,r.observedAttributes=i=i||e.observedAttributes||Object.keys(e.propTypes||{}),i.forEach(function(e){Object.defineProperty(r.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var i=typeof t;null!=t&&"string"!==i&&"boolean"!==i&&"number"!==i||this.setAttribute(e,t)}})}),customElements.define(t,r)}var _$4=0;function o$i(e,t,i,n,r,o){var a,s,l={};for(s in t)"ref"==s?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--_$4,__source:r,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===l[s]&&(l[s]=a[s]);return l$c.vnode&&l$c.vnode(c),c}var commonjsGlobal="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{};function getDefaultExportFromCjs$1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var loglevel={exports:{}};!function(e){!function(t,i){e.exports?e.exports=i():t.log=i()}(commonjsGlobal,function(){var e=function(){},t="undefined",i=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function r(e,t){var i=e[t];if("function"==typeof i.bind)return i.bind(e);try{return Function.prototype.bind.call(i,e)}catch{return function(){return Function.prototype.apply.apply(i,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&i?o:void 0!==console[n]?r(console,n):void 0!==console.log?r(console,"log"):e)}function s(t,i){for(var r=0;r<n.length;r++){var o=n[r];this[o]=r<t?e:this.methodFactory(o,t,i)}this.log=this.debug}function l(e,i,n){return function(){typeof console!==t&&(s.call(this,i,n),this[e].apply(this,arguments))}}function c(e,t,i){return a(e)||l.apply(this,arguments)}function u(e,i,r){var o,a=this;i=i??"WARN";var l="loglevel";function u(e){var i=(n[e]||"silent").toUpperCase();if(!(typeof window===t||!l)){try{window.localStorage[l]=i;return}catch{}try{window.document.cookie=encodeURIComponent(l)+"="+i+";"}catch{}}}function d(){var e;if(!(typeof window===t||!l)){try{e=window.localStorage[l]}catch{}if(typeof e===t)try{var i=window.document.cookie,n=i.indexOf(encodeURIComponent(l)+"=");-1!==n&&(e=/^([^;]+)/.exec(i.slice(n))[1])}catch{}return void 0===a.levels[e]&&(e=void 0),e}}function h(){if(!(typeof window===t||!l)){try{window.localStorage.removeItem(l);return}catch{}try{window.document.cookie=encodeURIComponent(l)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}"string"==typeof e?l+=":"+e:"symbol"==typeof e&&(l=void 0),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=r||c,a.getLevel=function(){return o},a.setLevel=function(i,n){if("string"==typeof i&&void 0!==a.levels[i.toUpperCase()]&&(i=a.levels[i.toUpperCase()]),"number"==typeof i&&i>=0&&i<=a.levels.SILENT){if(o=i,!1!==n&&u(i),s.call(a,i,e),typeof console===t&&i<a.levels.SILENT)return"No console available for logging"}
1else throw"log.setLevel() called with invalid level: "+i},a.setDefaultLevel=function(e){i=e,d()||a.setLevel(e,!1)},a.resetLevel=function(){a.setLevel(i,!1),h()},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var p=d();null==p&&(p=i),a.setLevel(p,!1)}var d=new u,h={};d.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw TypeError("You must supply a name when creating a logger.");var t=h[e];return t||(t=h[e]=new u(e,d.getLevel(),d.methodFactory)),t};var p=typeof window!==t?window.log:void 0;return d.noConflict=function(){return typeof window!==t&&window.log===d&&(window.log=p),d},d.getLoggers=function(){return h},d.default=d,d})}(loglevel);var loglevelExports=loglevel.exports;let log$A=getDefaultExportFromCjs$1(loglevelExports),log$z=loglevelExports.getLogger("EventEmitter"),EventEmitter$1=class{constructor(){Si(this,"listeners",[])}addEventListener(e){if(this.listeners.includes(e))throw Error(`Listener ${e} already registered`);this.listeners.push(e)}removeEventListener(e){let t=this.listeners;t.includes(e)?this.listeners=t.filter(t=>t!==e):log$z.warn(`Listener ${e} was not registered`)}fireEvent(e){this.listeners.forEach(t=>{try{t(e)}catch(i){log$z.error("Error invoking listener",t,"for event",e,"error",i)}})}},DEFAULT_FEEDBACK_URL="https://feedback.redbull.com/hc/en-us/requests/new",RBUP_FALLBACK_POSTER_IMAGE="https://player-images.redbull.com/image/upload/{op}/placeholder.jpg",SSDM_SERVER_URL_PRODUCTION="https://api-player.redbull.com",SSDM_SERVER_URL_STAGING="https://api-player-staging.redbull.com";function calculateSsdmUrl(e,t){if(t&&!isNaN(t))return`https://datamanager-pr${t}.eu-central-1.rbup-staging.redbullaws.com`;switch(e){case"PRODUCTION":return SSDM_SERVER_URL_PRODUCTION;case"STAGING":return SSDM_SERVER_URL_STAGING;default:throw Error("unknown server environment")}}function addLeadingZero(e){return e<0?`${e}`:e<10?`0${e}`:`${e}`}loglevelExports.getLogger("fetchUserLocation");let DATAZOOM_DEVICE_PLATFORM="web",GLOBAL_DATAZOOM_METADATA_FIELDS=new Set(["APP_NAME","APP_VERSION","DEVICE_PLATFORM","PLAYER_VERSION","TVI_CHANNEL_ID"]),DEFAULT_SEEK_SKIP_SECONDS=10,AspectRatios=["16:9","4:5","4:3","2:3","2:1","1:1","9:16"],RBUP_VIDEO_DOM_EVENT_TYPE="rbup-video-core",RBUP_AUDIO_DOM_EVENT_TYPE="rbup-audio-core",publicPlayerEventTypes=["adFinished","adSkipped","beforePlay","loaded","muted","paused","play","playbackFinished","seeking","timeChanged","timeshifting","unmuted","nextUpCancelled","nextUpDisplayed","nextUpTimeout","nextUpTriggered","podcastTitleClick","playerModalClose"],KEYCODE_ARROW_RIGHT="ArrowRight",KEYCODE_ARROW_LEFT="ArrowLeft",KEYCODE_ARROW_DOWN="ArrowDown",KEYCODE_ARROW_UP="ArrowUp",KEYCODE_SPACE=" ",KEYCODE_ESC="Escape",KEYCODE_ENTER="Enter",KEYCODE_TAB="Tab",KEYCODE_B="b",KEYCODE_F="f",KEYCODE_I="i",KEYCODE_K="k",KEYCODE_M="m",KEYCODE_N="n",KEYCODE_P="p",KEYCODE_R="r",KEYCODE_0="0",DEFAULT_NEXT_UP_TIMEOUT_SECS=7,log$y=loglevelExports.getLogger("AspectRatioUtils"),defaultExpectRatio="16:9",aspectRatioRegex=RegExp("^(\\d*):(\\d*)$"),maxWidthForLandscapeAspectRatio="100%",maxWidthForPortraitAspectRatio="400px";function getMaxWidthForAspectRatio(e){switch(e){case"4:5":case"2:3":case"1:1":case"9:16":return maxWidthForPortraitAspectRatio;case"16:9":case"4:3":case"2:1":return maxWidthForLandscapeAspectRatio;default:return log$y.error("unexpected aspect ratio",e),maxWidthForLandscapeAspectRatio}}function validateGivenAspectRatio(e){return e&&aspectRatioRegex.exec(e)&&isAspectRatio(e)?e:defaultExpectRatio}function isAspectRatio(e){return AspectRatios.includes(e)}function transformAspectRatioForCss(e){return e.replace(":","/")}function calcValueOfAspectRatio(e){let[t,i]=e.split(":").map(e=>Number.parseInt(e,10));return t/i}let Breakpoint={small:540,medium:650,large:1e3,xLarge:1200,xxLarge:1350},BREAKPOINTS=[Breakpoint.small,Breakpoint.medium,Breakpoint.large,Breakpoint.xLarge,Breakpoint.xxLarge];function calculateCachingHeaders(e){if(e)return{"cache-control":"max-age=0"}}let imTransformation=e=>`/im:i:${e}/`,imDelimiterTransformation=e=>`/im:i:${e}?`,directTransformation=e=>`/${e}/`,directDelimiterTransformation=e=>`/${e}?`,CLOUDINARY_TRANSFORMATIONS_FULL=[{placeholder:"/im/",transformation:imTransformation},{placeholder:"/{im}/",transformation:imTransformation},{placeholder:"/{im}?",transformation:imDelimiterTransformation},{placeholder:"/{op}/",transformation:directTransformation}],CLOUDINARY_TRANSFORMATIONS_MATURITY_RATING=[{placeholder:"/im/",transformation:imTransformation},{placeholder:"/{im}/",transformation:directTransformation},{placeholder:"/{im}?",transformation:directDelimiterTransformation},{placeholder:"/{op}/",transformation:directTransformation}];function isCloudinaryImage(e,t){return t.some(({placeholder:t})=>e.includes(t))}function applyCloudinaryTransformation(e,t,i){return i.reduce((e,{placeholder:i,transformation:n})=>e.replace(i,n(t)),e)}function generateCloudinaryImageSrcSet(e,t){var i;if(!isCloudinaryImage(e,t.transformations))return{src:e};let n=t.widths.map(i=>{let n=t.paramsBuilder(i);return`${applyCloudinaryTransformation(e,n,t.transformations)} ${i}w`}).join(", "),r=applyCloudinaryTransformation(e,t.paramsBuilder(t.defaultWidth),t.transformations),o=null==(i=t.previewParamsBuilder)?void 0:i.call(t,t.defaultWidth);return{src:r,srcSet:n,preview:o?applyCloudinaryTransformation(e,o,t.transformations):void 0}}let posterSizeWidths=[2560,1920,1280,852,640,424,320],mediaSessionSizeWidths=[512,384,256,192,128,96];function calculateMediaSessionSrcSet(e){if(void 0!==e)return mediaSessionSizeWidths.map(t=>{let i=t;return{src:getPosterUrlForWidthAndAspectRatio(e,t,1),sizes:`${t}x${i}`}})}function calculatePosterSrcSet(e,t="16:9"){let i=calcValueOfAspectRatio(t);return generateCloudinaryImageSrcSet(e,{widths:posterSizeWidths,defaultWidth:1280,transformations:CLOUDINARY_TRANSFORMATIONS_FULL,paramsBuilder:e=>`c_fill,w_${e},ar_${i},q_auto,g_auto,f_auto`,previewParamsBuilder:e=>`c_fill,w_${e/4},ar_${i},q_auto,g_auto,f_auto,e_blur:100`})}function getPosterUrlForWidthAndAspectRatio(e,t,i){return applyCloudinaryTransformation(e,`c_fill,w_${t},ar_${i},q_auto,g_auto,f_auto`,CLOUDINARY_TRANSFORMATIONS_FULL)}function getCookieValue(e){if(typeof document>"u")return;let t=document.cookie.split("; ").find(t=>t.startsWith(`${e}=`));return null==t?void 0:t.split("=")[1]}
1function resolveCountrySpoofHeader(e,t,i){if("PRODUCTION"===e)return;let n=getCookieValue(t),r="string"==typeof n&&n.length<=3&&/^[a-zA-Z]+$/.test(n);if(!(!n||!r))return{[i]:n.toUpperCase()}}function roundPlaybackPercentage(e){return roundNumber(e,5)}function roundNumber(e,t){let i=Math.pow(10,t);return Math.round(e*i)/i}function getTouch(e){return e.changedTouches.length>=1?e.changedTouches[0]:void 0}function getDetectedInteractionCoordinates(e){var t,i;return isTouchEvent(e)?{clientX:(null==(t=getTouch(e))?void 0:t.clientX)??0,clientY:(null==(i=getTouch(e))?void 0:i.clientY)??0}:{clientX:e.clientX,clientY:e.clientY}}function calculateRelativeCoordinates(e,t){let i=t.current;if(!i)return;let n=i.getBoundingClientRect(),r=getDetectedInteractionCoordinates(e);return{x:r.clientX-(n.x+document.body.scrollLeft),y:r.clientY-(n.y+document.body.scrollTop),elementBoundingRect:n}}function extractPlaybackPositionInPercentFromEvent(e,t){let i=calculateRelativeCoordinates(e,t);if(i){let e=i.elementBoundingRect.width,t=i.x>=0,n=i.x<=e;return roundPlaybackPercentage((t?i.x:0)/(n?e:i.x))}}function isTouchEvent(e){return e.type.includes("touch")}function getBrowserLanguage(){return window.navigator.language?window.navigator.language.split("-")[0]:""}function getFormattedTimeString(e){let t=Math.floor(e/3600),i=Math.floor(e/60)-60*t,n=Math.floor(e)%60;return t<1?`${addLeadingZero(i)}:${addLeadingZero(n)}`:`${addLeadingZero(t)}:${addLeadingZero(i)}:${addLeadingZero(n)}`}function getThemeCSSVariables(e){let t={};return null!=e&&e.fontFamily&&(t={...t,"--rbup-font-family":e.fontFamily}),null!=e&&e.componentFontFamily&&(t={...t,"--rbup-component-font-family":e.componentFontFamily}),null!=e&&e.primaryColor&&(t={...t,"--rbup-primary-color":e.primaryColor,"--rbup-play-button-background-color":e.primaryColor,"--rbup-play-button-background-hover-color":e.primaryColorHover??e.primaryColor}),null!=e&&e.lineHeight&&(t={...t,"--rbup-text-line-height":e.lineHeight}),null!=e&&e.containerBackgroundColor&&(t={...t,"--rbup-container16x9-background-color":e.containerBackgroundColor}),t}function handlePlayPauseToggle(e,t){switch(e){case"ENDED":case"BUFFERING":return;case"PLAYING":null==t||t.pause();break;case"PAUSED":case"IDLE":null==t||t.play()}}function getPositionFromEvent$1(e){let{pageX:t,pageY:i}="touches"in e?e.touches[0]:e;return{x:t,y:i}}function hasPositionMoved(e,t){let i=t.x-e.x,n=t.y-e.y;return 0!==i&&0!==n}function isMobileDevice(){return!!/(?:iPhone|iPad|iPod|Android)/.test(window.navigator.userAgent)||window.navigator.maxTouchPoints>=3}let MouseButton={primary:0},PointerTypes={mouse:"mouse",touch:"touch"};function isLeftClick(e){return isMouse(e)&&e.button===MouseButton.primary}function isMouse(e){return e.pointerType===PointerTypes.mouse}function isTouch(e){return e.pointerType===PointerTypes.touch}function eqSet(e,t){if(e.size!==t.size)return!1;for(let i of e)if(!t.has(i))return!1;return!0}function isTrueValue(e){return"boolean"==typeof e?e:"string"==typeof e&&"true"===e}function createControllablePromise(){let e,t;return Object.assign(new Promise((i,n)=>{e=i,t=n}),{resolve:t=>e(t),reject:e=>t(e)})}function isNotNullOrUndefined(e){return null!=e}function resolveErrorMessageFromUnknown(e){return isObject$7(e)&&e.hasOwnProperty("message")?e.message:`Unknown error ${null==e?void 0:e.toString()}`}function isObject$7(e){return!!e&&"object"==typeof e}function deepEqual(e,t){if(e===t)return!0;if(!isObject$6(e)||!isObject$6(t)||Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e)if(!t.hasOwnProperty(i))return!1;else if(!deepEqual(e[i],t[i]))return!1;return!0}function isObject$6(e){return!!e&&"object"==typeof e}let tagId="rbup-video-cosmos-font-injection";function injectCosmosFontIntoHeader(e){if(!alreadyInjected()){let t=document.createElement("style");t.id=tagId,t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}function alreadyInjected(){return null!==document.getElementById(tagId)}function dispatchNextUpPlayerEvent(e,t,i){let{playerId:n}=t;switch(e){case"CANCELLED_BY_USER_INTERACTION":t.dispatchPlayerEvent({type:"nextUpCancelled",playerId:n,issuer:"USER",assetId:i});break;case"TRIGGERED_BY_USER_INTERACTION":t.dispatchPlayerEvent({type:"nextUpClicked",playerId:n,issuer:"USER",assetId:i}
1),t.dispatchPlayerEvent({type:"nextUpTriggered",playerId:n,issuer:"USER",assetId:i});break;case"TRIGGERED_AUTOMATICALLY":t.dispatchPlayerEvent({type:"nextUpTimeout",playerId:n,issuer:"AUTOMATICALLY",assetId:i}),t.dispatchPlayerEvent({type:"nextUpTriggered",playerId:n,issuer:"AUTOMATICALLY",assetId:i});break;case"CANCELLED_BY_REPLAY":t.dispatchPlayerEvent({type:"nextUpCancelled",playerId:n,issuer:"CONTEXTUAL",assetId:i});break;case"DISPLAYED":t.dispatchPlayerEvent({type:"nextUpDisplayed",playerId:n,issuer:"CONTEXTUAL",assetId:i})}}function removeNoLongerExistingAttributes(e,t,i){let n=e.getAttributeNames(),r=Object.keys(t);for(let t of n)"id"===t||r.includes(t)||(i.debug("removing excess attribute from web component",t),e.removeAttribute(t))}function deleteUndefinedValues(e){for(let t in e)void 0===e[t]&&delete e[t]}let stripOffLocaleRegexp=/(?<masterId>rrn:content:.*):(?<locale>[a-z]{2}-[A-Z]{2,3})$/;function stripOffLocaleFromCrepoId(e){var t;if(!e)throw Error(`unexpected content id ${e}`);let i=stripOffLocaleRegexp.exec(e);if(!i){if(isCrepoId(e))return e;throw Error(`content id is not a rrn:content id ${e}`)}return(null==(t=i.groups)?void 0:t.masterId)??e}function isCrepoId(e){return!!e&&e.startsWith("rrn:content:")}function stripOffLocaleFromCrepoIdOrReturnOriginalIfNotRrn(e){if(!e)throw Error(`unexpected content id ${e}`);return isCrepoId(e)?stripOffLocaleFromCrepoId(e):e}function createEaseLiveConfigFromInput(e,t){if(!(!isValuePresent(e.easeLiveAccountId)&&!isValuePresent(e.easeLiveProgramId)&&!isValuePresent(e.easeLiveProjectId)))return{accountId:e.easeLiveAccountId,programId:e.easeLiveProgramId,projectId:e.easeLiveProjectId,language:extractLanguageFromLocale(t)}}function isValuePresent(e){return!(!e||""===e)}function extractLanguageFromLocale(e){var t;let i=null==e?void 0:e.trim();if(i)return null==(t=i.split(/[-_]/)[0])?void 0:t.toLowerCase()}function isIosDevice(){return!!/(?:iPhone|iPad|iPod)/.test(window.navigator.userAgent)||window.navigator.maxTouchPoints>=3}function isIphoneDevice(){return/iPhone/.test(window.navigator.userAgent)}function isLiveLinearResolver(e){var t;return(null==e?void 0:e.getPlaybackMode())==="LIVE"&&(null==(t=e.getLiveVariant)?void 0:t.call(e))==="LINEAR"}function isLiveDvrResolver(e){var t;return(null==e?void 0:e.getPlaybackMode())==="LIVE"&&(null==(t=e.getLiveVariant)?void 0:t.call(e))==="DVR"}function calculateFromSS(e){let t=parseInt(e[0],10);return isNaN(t)?0:t}function calculateFromMMSS(e){let t=parseInt(e[1],10),i=parseInt(e[0],10);return isNaN(t)||isNaN(i)?0:t+60*i}function calculateFromHHMMSS(e){let t=parseInt(e[2],10),i=parseInt(e[1],10),n=parseInt(e[0],10);return isNaN(t)||isNaN(i)||isNaN(n)?0:t+60*i+60*n*60}function convertTimeStringToSec(e){let t=e.split(":");return 1===t.length?calculateFromSS(t):2===t.length?calculateFromMMSS(t):3===t.length?calculateFromHHMMSS(t):0}let MIN_HD_HEIGHT=720,HIGH_FRAMRATE_DISPLAY_THRESHOLD=31;function getVideoQualityLabel(e,t=0){let i=t>=HIGH_FRAMRATE_DISPLAY_THRESHOLD?`${e}p${t}`:`${e}p`;return e>=MIN_HD_HEIGHT?`${i} HD`:i}let log$x=loglevelExports.getLogger("resolveEntitlements");function resolveEntitlements(e){try{if(!e)return;let t=JSON.parse(e);return Object.values(t).flat().map(e=>e.id).filter(e=>void 0!==e).join(",")}catch(e){log$x.error("Failed while parsing the passed in entitlements",e);return}}function hasValidDuration(e){return e>0}function hasValidProductPlacementComponentDefinition(e){return!!e}function isWithinDisplayTimeWindowBeforeVideoEnds(e,t,i){return e>t-i}let AD_LENGTH_VALUE_NOT_AVAILABLE="not available";function isVideoDataAccessor(e){return"VIDEO"===e.getPlayerType()}function formatPos(e){if(!e)return"0";let t=e<0,i=String(Math.floor(Math.abs(e)));return t?`-${i}`:i}let eventMap={adStarted:"playAd",adSkipped:"skipAd",adStopped:"stopAd",playbackFinished:"eof",play:"play",paused:"pause",sourceUnloaded:"stop",posRelative:"posRelative",playInitial:"playInitial",seeking:"seek",timeshifting:"seek",pos:"pos",beforePlay:"init",loaded:"init",podcastTitleClick:"interaction",nextEpisodeTriggered:"interaction"};function EventActionResolver(e){return eventMap[e]}function EventNameResolver(e,t){let i=e.toLowerCase(),n=t.toLowerCase();return`${i}_${n}`}function resolveEventName(e,t){let i=EventActionResolver(t);return i?EventNameResolver(e,i):""}let log$w=loglevelExports.getLogger("TrackingService");function validateVideoPos(e,t,i){return(e<0||e>
1t)&&log$w.error("videoPos",e," exceeds bounds for reporting interval",t,"for event",i),Math.max(0,Math.min(t,Math.round(e)))}function getEofTrackingEvent(e,t,i){return{event:i.trackingEventType,event_action:"eof",event_name:resolveEventName(i.playerType,"playbackFinished"),current_pos:formatPos(i.playbackPosition),media_id:e.assetId,player_mode:i.playerMode,video_audio_language:i.audioLanguage,video_subtitles_language:i.subtitleLanguage,video_stream_type:i.videoStreamType,video_pos:validateVideoPos(i.videoPos,t,"eof")}}let rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&!(getRandomValues="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}let byteToHex=[];for(let ie=0;ie<256;++ie)byteToHex.push((ie+256).toString(16).slice(1));function unsafeStringify(e,t=0){return(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase()}let randomUUID="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(e,t,i){if(native.randomUUID&&!e)return native.randomUUID();let n=(e=e||{}).random||(e.rng||rng)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,unsafeStringify(n)}let CORE_VERSION="28.15.1";function calculateAutoplay(e){let{autoplay:t,autoplayTriggeredByNextUp:i}=e;return void 0!==i?i:t}function calculateEmbedUrl(e){let t=new URL(e);return`${t.protocol}//${t.host}${t.pathname}`}function isVideoPlayerConfig(e){return"VIDEO"===e.configurationType}function isVideoPlayerMetadata(e,t){return isVideoPlayerConfig(e)}function isAudioPlayerMetadata(e,t){return!!t&&!isVideoPlayerConfig(e)}function calculateTrackingHostname(e){return new URL(e).host}function calculateVideoTrackingInitEvent(e,t,i,n,r){let o=e.tracking.configs.googleAnalytics,a=n.getPlaybackMode(),s=(null==t?void 0:t.duration)??n.getMainMediaDurationInSec(),l=calculateTrackingHostname(i),c=calculateAutoplay(e);return{...o.customInitAttributes,video_account_name:o.accountName,video_chapter:null==t?void 0:t.chapter,video_name:null==t?void 0:t.title,video_display_url:i,event:"rbVideoTracking",event_action:"init",event_name:"video_init",video_display_domain:l,video_stream:r.isStream,video_autoplay:c,video_label:null==t?void 0:t.label,video_label_group:null==t?void 0:t.labelGroup,media_asset_id:null==t?void 0:t.vin,media_id:e.assetId,video_player_id:o.playerId,player_mode:r.playerMode,video_season:null==t?void 0:t.season,rb_source:o.source,player_version:CORE_VERSION,video_asset_id:e.assetId,video_length:"LIVE"===a?0:s,video_play_id:v4(),video_stream_type:r.videoStreamType}}function calculateAudioTrackingInitEvent(e,t,i,n,r){let o=e.tracking.configs.googleAnalytics,a=i.getDurationInSec(),s=calculateTrackingHostname(n);return{...o.customInitAttributes,video_account_name:o.accountName,video_name:null==t?void 0:t.title,video_display_url:n,event:"rbAudioTracking",event_action:"init",event_name:"audio_init",video_display_domain:s,video_stream:r.isStream,video_autoplay:!1,media_asset_id:null==t?void 0:t.vin,media_id:e.assetId,video_player_id:o.playerId,player_mode:r.playerMode,rb_source:o.source,megaphone_episode_id:null==t?void 0:t.megaphoneEpisodeId,megaphone_network_id:null==t?void 0:t.megaphoneNetworkId,megaphone_show_id:null==t?void 0:t.megaphoneShowId,player_version:CORE_VERSION,video_asset_id:e.assetId,video_chapter:null==t?void 0:t.chapter,video_label:null==t?void 0:t.label,video_label_group:null==t?void 0:t.labelGroup,video_length:isNaN(a)?(null==t?void 0:t.duration)??0:a,video_play_id:v4(),video_season:null==t?void 0:t.season,video_stream_type:r.videoStreamType}}function getFinalEmbedUrl(){return window.self!==window.top?document.referrer:window.location.href}function getInitTrackingEvent(e,t,i,n){let r=calculateEmbedUrl(e.tracking.configs.googleAnalytics.overrideEmbedUrl??getFinalEmbedUrl());if(isVideoPlayerConfig(e)&&(isVideoPlayerMetadata(e)||!t))return calculateVideoTrackingInitEvent(e,t,r,i,n);if(!isVideoPlayerConfig(e)&&(isAudioPlayerMetadata(e,t)||!t))return calculateAudioTrackingInitEvent(e,t,i,r,n);throw Error("unexpected player config")}function getNextEpisodeTrackingEvent(e,t,i,n){let r="USER"===t?"Click":"Auto";return{event:"rbAudioTracking",event_name:resolveEventName(n.playerType,"nextEpisodeTriggered"),video_interaction:{value:"Next Up",method:r,video_name:e.title,media_id:i,widget_type:"Audio Playlist"}}}function getNextUpToastTrackingEvent(e,t,i){return{event:"rbVideoTracking",event_name:"video_interaction",video_interaction:{value:"Next Up",method:t,video_name:e.title,media_id:i,widget_type:"Next Up Bar"}}}function getPauseTrackingEvent(e,t,i){return{current_pos:formatPos(i.playbackPosition),event:i.trackingEventType,event_action:"pause",event_name:resolveEventName(i.playerType,"paused"),video_audio_language:i.audioLanguage,video_subtitles_language:i.subtitleLanguage,media_id:e.assetId,player_mode:i.playerMode,video_stream_type:i.videoStreamType,video_pos:validateVideoPos(i.videoPos,t,"pause")}}function getAdLength(e){return e>1?e:AD_LENGTH_VALUE_NOT_AVAILABLE}function getPlayAdTrackingEvent(e,t,i,n){return{ad_length:getAdLength(e.duration),ad_plays:1,ad_pos:0,ad_type:n.currentEventAdType,current_pos:formatPos(n.playbackPosition),event:n.trackingEventType,video_audio_language:void 0,video_subtitles_language:void 0,event_action:"playAd",event_name:resolveEventName(n.playerType,"adStarted"),media_id:t,video_stream_type:n.videoStreamType,player_mode:n.playerMode,video_pos:validateVideoPos(n.videoPos,i,"playAd")}}function getPlayInitialTrackingEvent(e,t){return{video_audio_language:t.audioLanguage,current_pos:formatPos(t.playbackPosition),event:t.trackingEventType,event_action:"playInitial",event_name:resolveEventName(t.playerType,"playInitial"),media_id:e.assetId,player_mode:t.playerMode,video_subtitles_language:t.subtitleLanguage,video_plays:1,video_stream_type:t.videoStreamType,video_pos:0}}function getPlayTrackingEvent(e,t,i){return{current_pos:formatPos(i.playbackPosition),media_id:e.assetId,player_mode:i.playerMode,event:i.trackingEventType,event_action:"play",video_audio_language:i.audioLanguage,video_subtitles_language:i.subtitleLanguage,video_stream_type:i.videoStreamType,event_name:resolveEventName(i.playerType,"play"),video_pos:validateVideoPos(i.videoPos,t,"play")}}function getPodcastTitleTrackingEvent(e,t,i,n){return{event:"rbAudioTracking",event_name:resolveEventName(n.playerType,"podcastTitleClick"),video_interaction:{value:t,video_name:e.title,media_id:i,widget_type:"Podcast player::inline"}}}function getPosRelativeTrackingEvent(e,t,i,n){return{event_action:"posRelative",event:n.trackingEventType,event_name:resolveEventName(n.playerType,"posRelative"),current_pos:formatPos(n.playbackPosition),video_audio_language:n.audioLanguage,video_subtitles_language:n.subtitleLanguage,player_mode:n.playerMode,video_posrelative:t,media_id:e.assetId,video_stream_type:n.videoStreamType,video_pos:validateVideoPos(n.videoPos,i,"posRelative")}}function getPosTrackingEvent(e,t,i){return{event_action:"pos",event_name:resolveEventName(i.playerType,"pos"),event:i.trackingEventType,video_audio_language:i.audioLanguage,video_subtitles_language:i.subtitleLanguage,current_pos:formatPos(i.playbackPosition),player_mode:i.playerMode,media_id:e.assetId,video_stream_type:i.videoStreamType,video_pos:validateVideoPos(i.videoPos,t,"pos")}}function getSeekTrackingEvent(e,t,i){return{event_action:"seek",event_name:resolveEventName(i.playerType,"seeking"),event:i.trackingEventType,current_pos:formatPos(i.playbackPosition),player_mode:i.playerMode,media_id:e.assetId,video_audio_language:i.audioLanguage,video_subtitles_language:i.subtitleLanguage,video_stream_type:i.videoStreamType,video_pos:validateVideoPos(i.videoPos,t,"seek")}}function getSkipAdTrackingEvent(e,t,i){return{ad_length:getAdLength(i.currentEventDuration??0),ad_plays:1,ad_pos:i.currentAdPlaybackPosition,ad_type:i.currentEventAdType,current_pos:formatPos(i.playbackPosition),event:i.trackingEventType,video_audio_language:void 0,video_subtitles_language:void 0,event_action:"skipAd",event_name:resolveEventName(i.playerType,"adSkipped"),media_id:e,video_stream_type:i.videoStreamType,player_mode:i.playerMode,video_pos:validateVideoPos(i.videoPos,t,"skipAd")}}function getStopAdTrackingEvent(e,t,i){if(!i)throw Error("unexpectedly dont have player config");let{currentEventAdType:n,currentEventDuration:r=0}=t;return{ad_length:getAdLength(r),ad_plays:1,ad_pos:t.currentAdPlaybackPosition,ad_type:n,current_pos:formatPos(t.playbackPosition),event:t.trackingEventType,video_audio_language:void 0,video_subtitles_language:void 0,event_action:"stopAd",event_name:resolveEventName(t.playerType,"adStopped"),media_id:i.assetId,video_stream_type:t.videoStreamType,player_mode:t.playerMode,video_pos:validateVideoPos(t.videoPos,e,"
1stopAd")}}let stopEventAction="stop";function getStopTrackingEvent(e,t,i,n){if(!i)throw Error("unexpectedly dont have player config");if(!n)throw Error("unexpectedly dont have player data accessor");return{current_pos:formatPos(t.playbackPosition),event:t.trackingEventType,event_action:stopEventAction,event_name:resolveEventName(t.playerType,"sourceUnloaded"),media_id:i.assetId,video_audio_language:t.audioLanguage,video_subtitles_language:t.subtitleLanguage,player_mode:t.playerMode,video_pos:validateVideoPos(t.videoPos,e,"stop"),video_stream_type:t.videoStreamType}}function isInitTrackingEvent(e){return"init"===e.event_action}function isUserInteractionTrackingEvent(e){return"video_interaction"===e.event_name}function serializeValue(e){return"boolean"==typeof e?e.toString():e}function serializeEvent(e){return isInitTrackingEvent(e)?serializeInitEvent(e):isUserInteractionTrackingEvent(e)?serializeUserInteractionTrackingEvent(e):serializeTrackingEvent(e)}let initEventAttributesAtRootLevel=["event","event_action","event_name","player_mode","video_stream_type","player_version"];function serializeInitEvent(e){let t={},i={};for(let[n,r]of Object.entries(e))initEventAttributesAtRootLevel.includes(n)?t[n]=r:i[n]=serializeValue(r),"video_stream_type"===n&&(i[n]=r);return Object.keys(i).length>0&&(t.videos={[e.media_id]:i}),t}function serializeUserInteractionTrackingEvent(e){let t={},i={};for(let[n,r]of(t.event=e.event,t.event_name=e.event_name,Object.entries(e.video_interaction)))i[n]=serializeValue(r);return t.video_interaction=i,t}function serializeTrackingEvent(e){let t={};for(let[i,n]of Object.entries(e))t[i]=serializeValue(n);return t}function DataAccessorResolver(e){if(!e)throw Error("unexpectedly dont have player data accessor");return e}function TrackingAdTypeResolver(e,t){return 0===e?"pre":Math.floor(e)<t?"mid":"post"}class EventAdapter{execute(e){let{log:t}=e,i=this.resolveState(e);return null==t||t.debug(this.constructor.name,i),i}}class AdEventInfoAdapter extends EventAdapter{constructor(e){super(),Si(this,"coordinator"),Si(this,"currentEventId"),Si(this,"currentEventDuration"),Si(this,"currentScheduleTime",0),Si(this,"currentEventAdType","pre"),Si(this,"currentAdPlaybackPosition",0),this.coordinator=e}resolveState(e){let t=e.event;if((null==t?void 0:t.type)==="adBreakStarted"&&(this.currentScheduleTime=t.scheduleTime),(null==t?void 0:t.type)==="adStarted"){let e=DataAccessorResolver(this.coordinator.getPlayerData()).getMainMediaDurationInSec();this.currentEventId=t.adId,this.currentEventDuration=t.duration,this.currentEventAdType=TrackingAdTypeResolver(this.currentScheduleTime,e),this.currentAdPlaybackPosition=0}return(null==t?void 0:t.type)==="adTimeChanged"&&(this.currentAdPlaybackPosition=t.playbackPosition),{currentEventId:this.currentEventId,currentEventDuration:this.currentEventDuration,currentEventAdType:this.currentEventAdType,currentAdPlaybackPosition:this.currentAdPlaybackPosition}}}function VideoAudioLanguageResolver(e){if(isVideoDataAccessor(e))return e.getAudioLanguage()||"und"}let dc=class dc extends EventAdapter{constructor(e){super(),Si(this,"audioLanguage"),Si(this,"coordinator"),this.audioLanguage=dc.UNDEFINED_AUDIO_LANGUAGE,this.coordinator=e}resolveState(){let e=DataAccessorResolver(this.coordinator.getPlayerData());return this.audioLanguage=VideoAudioLanguageResolver(e),{audioLanguage:this.audioLanguage}}};Si(dc,"UNDEFINED_AUDIO_LANGUAGE","und");let AudioLanguageAdapter=dc;class DurationAdapter extends EventAdapter{constructor(e){super(),Si(this,"durationInSec"),Si(this,"coordinator"),this.durationInSec=0,this.coordinator=e}resolveState(){let e=DataAccessorResolver(this.coordinator.getPlayerData()).getMainMediaDurationInSec();return this.durationInSec=isNaN(e)?this.durationInSec:e,{durationInSec:this.durationInSec}}}class HasInitialPlaybackAdapter extends EventAdapter{constructor(){super(...arguments),Si(this,"hadInitialPlayback",!1),Si(this,"sendingPlayInitial",()=>{this.hadInitialPlayback=!0})}resolveState(e){var t,i,n;let r=(null==(t=e.event)?void 0:t.type)==="timeshifting",o=(null==(i=e.event)?void 0:i.type)==="timeChanged",a=hasReachedPlaybackThreshold(r,null==(n=e.metaInfo)?void 0:n.playbackPosition),s=o||r;
1return{shouldSendInitialPlayback:this.calculateState(a,s),hadInitialPlayback:this.hadInitialPlayback,sendingPlayInitial:this.sendingPlayInitial}}calculateState(e,t){return t&&e&&!this.hadInitialPlayback}}function hasReachedPlaybackThreshold(e,t){let i=e?0:HasInitialPlaybackAdapter.PLAYBACK_THRESHOLD;return"number"==typeof t&&Math.abs(t)>=i}Si(HasInitialPlaybackAdapter,"PLAYBACK_THRESHOLD",.1);class HasReachedEofAdapter extends EventAdapter{constructor(){super(...arguments),Si(this,"hasReachedEof",!1)}resolveState(e){var t;return(null==(t=e.event)?void 0:t.type)==="playbackFinished"&&(this.hasReachedEof=!0),{hasReachedEof:this.hasReachedEof}}}function VideoIsStreamResolver(e){let{phasingEnabled:t,playbackMode:i,isPlayerLoaded:n}=e;return!!t||!!n&&"LIVE"===i}class IsStreamAdapter extends EventAdapter{constructor(e){super(),Si(this,"isStream",!1),Si(this,"coordinator"),this.coordinator=e}resolveState(){let e=DataAccessorResolver(this.coordinator.getPlayerData()),t=this.coordinator.getPlayerConfiguration(),i=!!(t&&isVideoPlayerConfig(t))&&t.phasing,n=e.getPlaybackMode(),r=e.isPlayerLoaded();return this.isStream=VideoIsStreamResolver({phasingEnabled:i,playbackMode:n,isPlayerLoaded:r}),{isStream:this.isStream}}}class BasePlaybackPositionAdapter extends EventAdapter{constructor(e){super(),Si(this,"playbackPosition"),Si(this,"coordinator"),this.playbackPosition=0,this.coordinator=e}resolveState(e){let{event:t}=e;if(!isPlayerEvent(t))throw Error("unexpectedly received non-player event");let i=this.playbackPosition,n=DataAccessorResolver(this.coordinator.getPlayerData());return isVideoDataAccessor(n)&&n.isShowingAd()||(this.playbackPosition=this.resolvePlaybackPositionFromEvent(t)),{lastPlaybackPosition:i,playbackPosition:this.playbackPosition}}resolvePlaybackPositionFromEvent(e){return"timeSkipped"===e.type?e.currentPlaybackTimeInSec:isEventWithTargetPosition(e)&&"INITIAL"===e.issuer?e.targetPosition:isEventWithPosition(e)?e.playbackPosition:this.playbackPosition}}function isEventWithPosition(e){return"playbackPosition"in e}function isEventWithTargetPosition(e){return"targetPosition"in e}function isPlayerEvent(e){return void 0!==e&&"playerId"in e}function sendViaBeacon(e,t){if(typeof navigator>"u"||"function"!=typeof navigator.sendBeacon)return!1;try{return navigator.sendBeacon(e,t)}catch{return!1}}function postToClientErrorEndpoint(e,t,i){try{let n=`${calculateSsdmUrl(e)}/client-error`;if(i&&sendViaBeacon(n,t))return;fetch(n,{body:t,method:"POST",...i?{keepalive:!0}:{headers:{"content-type":"application/json"}}}).catch(()=>{})}catch{return}}function reportClientError(e,t,i){try{let n=JSON.stringify({message:e,params:i,href:"u">typeof location?location.href:void 0});postToClientErrorEndpoint(t,n)}catch{return}}function postClientError(e,t){postToClientErrorEndpoint(e,t,!0)}class TimeCorrectionAdapter{constructor(e){Si(this,"timeCorrection"),Si(this,"coordinator"),Si(this,"playbackPositionOfPauseOrPlayEvent"),this.coordinator=e,this.timeCorrection=0,this.playbackPositionOfPauseOrPlayEvent=0}resolveState({event:e,videoStartTimestamp:t,lastPlaybackPosition:i}){let n=DataAccessorResolver(this.coordinator.getPlayerData()),r=isLiveLinearResolver(n),o=isVideoDataAccessor(n)&&n.isShowingAd();switch(e.type){case"seeking":case"timeshifting":this.playbackPositionOfPauseOrPlayEvent=0;break;case"seekingDone":case"timeshiftingDone":this.handleTimeshiftingDoneEvent(e,r,t,i);break;case"timeSkipped":this.handleTimeSkippedEvent(e,o);break;case"playing":this.handlePlayingEvent(e,i);break;case"play":this.handlePlayEvent(e);break;case"paused":this.handlePausedEvent(e)}return this.handleRestart(e,o),{timeCorrection:this.timeCorrection}}handlePlayEvent(e){if(this.playbackPositionOfPauseOrPlayEvent){let t=e.playbackPosition-this.playbackPositionOfPauseOrPlayEvent;t>1&&(this.timeCorrection+=t,this.playbackPositionOfPauseOrPlayEvent=e.playbackPosition)}else this.playbackPositionOfPauseOrPlayEvent=e.playbackPosition}handlePlayingEvent(e,t){if(0!==t&&this.playbackPositionOfPauseOrPlayEvent){let t=e.playbackPosition-this.playbackPositionOfPauseOrPlayEvent;this.timeCorrection+=t}this.playbackPositionOfPauseOrPlayEvent=0}handleTimeSkippedEvent(e,t){if(!t){let t=e.currentPlaybackTimeInSec-e.previousPlaybackTimeInSec;this.timeCorrection+=t}reportTimeskipped(this.coordinator,e.previousPlaybackTimeInSec,e.currentPlaybackTimeInSec)}handleTimeshiftingDoneEvent(e,t,i,n){if(t){let t=e.playbackPosition-i;this.timeCorrection=t-n}}handlePausedEvent(e){e.playbackPosition&&(this.playbackPositionOfPauseOrPlayEvent=e.playbackPosition)}handleRestart(e,t){t||"issuer"in e&&"RESTART"===e.issuer&&(this.timeCorrection=0)}}function reportTimeskipped(e,t,i){var n;let r=null==(n=e.getPlayerConfiguration())?void 0:n.environment;r&&reportClientError("TimeSkippedEvent detected",r,{timeSkipStart:t,timeSkipEnd:i})}
1class LivePlaybackPositionAdapter extends EventAdapter{constructor(e){super(),Si(this,"timeCorrectionAdapter"),Si(this,"basePlaybackPositionAdapter"),Si(this,"videoStartTimestamp"),Si(this,"correctedPlaybackPosition"),Si(this,"playbackPosition"),Si(this,"coordinator"),this.coordinator=e,this.timeCorrectionAdapter=new TimeCorrectionAdapter(e),this.basePlaybackPositionAdapter=new BasePlaybackPositionAdapter(e),this.videoStartTimestamp=0,this.correctedPlaybackPosition=0,this.playbackPosition=0}resolveState(e){let t=this.correctedPlaybackPosition,{event:i}=e,n=DataAccessorResolver(this.coordinator.getPlayerData());if(!isPlayerEvent(i))throw Error("unexpectedly received non-player event");let{playbackPosition:r}=this.basePlaybackPositionAdapter.resolveState(e),{timeCorrection:o}=this.timeCorrectionAdapter.resolveState({event:i,lastPlaybackPosition:this.playbackPosition,videoStartTimestamp:this.videoStartTimestamp}),a=isVideoDataAccessor(n)&&n.isShowingAd(),s=this.handleEvent(i,a);return this.playbackPosition=s??r,this.correctedPlaybackPosition=this.calculateCorrectedPlaybackPosition(this.playbackPosition,o),{lastPlaybackPosition:t,playbackPosition:this.correctedPlaybackPosition}}handleEvent(e,t){switch(e.type){case"timeshifting":case"playing":case"timeChanged":if(!t)return this.getInitialPlaybackPosition(e);break;case"timeshiftingDone":case"seekingDone":return this.handleTimeshiftingDone(e);case"timeSkipped":if(!t)return e.currentPlaybackTimeInSec}}getInitialPlaybackPosition(e){if(0===this.videoStartTimestamp)return this.videoStartTimestamp=e.playbackPosition,e.playbackPosition}handleTimeshiftingDone(e){return e.playbackPosition}calculateCorrectedPlaybackPosition(e,t){return e-(this.videoStartTimestamp+t)}}class UnresolvedPlaybackPositionAdapter extends EventAdapter{constructor(e){super(),Si(this,"coordinator"),Si(this,"basePlaybackPositionAdapter"),Si(this,"livePlaybackPositionAdapter"),Si(this,"lastState",{}),this.coordinator=e,this.basePlaybackPositionAdapter=new BasePlaybackPositionAdapter(e),this.livePlaybackPositionAdapter=new LivePlaybackPositionAdapter(e)}resolveState(e){return null!=e&&e.event&&("LIVE"===this.coordinator.getInitialPlaybackMode()?this.lastState=this.livePlaybackPositionAdapter.resolveState(e):this.lastState=this.basePlaybackPositionAdapter.resolveState(e)),this.lastState}}function PlayerModeResolver(e,t){if(!e)throw Error("unexpectedly dont have player configuration");if(isVideoDataAccessor(t)){if(t.isInFullscreenMode())return"fullscreen";if(t.isInPictureInPictureMode())return"picture-in-picture";if(t.isPlayingVideoViaAirPlay())return"airplay"}return e.tracking.configs.googleAnalytics.defaultPlayerMode}class PlayerModeAdapter extends EventAdapter{constructor(e){super(),Si(this,"playerMode","standard"),Si(this,"coordinator"),this.coordinator=e}resolveState(){let e=DataAccessorResolver(this.coordinator.getPlayerData()),t=this.coordinator.getPlayerConfiguration();return this.playerMode=PlayerModeResolver(t,e),{playerMode:this.playerMode}}}class PlayerTypeAdapter extends EventAdapter{constructor(e){super(),Si(this,"coordinator"),this.coordinator=e}resolveState(){var e;let t=null==(e=this.coordinator.getPlayerData())?void 0:e.getPlayerType();if(!t)throw Error("unexpectedly got no player type");return{playerType:t}}}let HEATMAP_TRACKING_ENDPOINT="https://api-player.redbull.com/heatmap";class SecondsWatchedReporter extends EventAdapter{constructor(e){super(),Si(this,"entries"),Si(this,"lastEntry"),Si(this,"shouldTrackSecondsWatched"),Si(this,"assetId"),Si(this,"reportSecondsWatched",()=>{this.shouldTrackSecondsWatched&&this.entries.length>1&&this.assetId&&sendTrackingData(this.assetId,this.entries),this.entries=[]}),this.coordinator=e,this.entries=[];const t=this.coordinator.getMediaMetaData(),i=this.coordinator.getPlaybackMode();this.assetId=null==t?void 0:t.assetId,this.shouldTrackSecondsWatched=!!(this.assetId&&t&&"activateHeatmapTracking"in t&&t.activateHeatmapTracking&&"VOD"===i)}resolveState(e){let{event:t}=e;if(!this.shouldTrackSecondsWatched)return{};if((null==t?void 0:t.type)==="timeChanged"){let e=Math.floor(t.playbackPosition);e!==this.lastEntry&&(this.entries.push(e),this.lastEntry=e)}return{reportSecondsWatched:this.reportSecondsWatched}}}function sendTrackingData(e,t){"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(HEATMAP_TRACKING_ENDPOINT,JSON.stringify({assetId:e,secondsWatched:t}))}
1class SeekEventAdapter extends EventAdapter{constructor(){super(...arguments),Si(this,"seekTrackingEvent",null),Si(this,"setSeekTrackingEvent",e=>{this.seekTrackingEvent=e}),Si(this,"getSeekTrackingEvent",()=>this.seekTrackingEvent)}resolveState(e){return{setSeekTrackingEvent:this.setSeekTrackingEvent,getSeekTrackingEvent:this.getSeekTrackingEvent}}}function VideoSubtitleLanguageResolver(e){if(!isVideoDataAccessor(e))return;let t=e.getSubtitleTrackLanguage();if(t)return t}class SubtitleLanguageAdapter extends EventAdapter{constructor(e){super(),Si(this,"subtitleLanguage"),Si(this,"coordinator"),this.coordinator=e}resolveState(){let e=DataAccessorResolver(this.coordinator.getPlayerData());return this.subtitleLanguage=VideoSubtitleLanguageResolver(e),{subtitleLanguage:this.subtitleLanguage}}}function TrackingEventTypeResolver(e){switch(e.getPlayerType()){case"VIDEO":return"rbVideoTracking";case"AUDIO":return"rbAudioTracking";default:throw Error(`unknown player type ${e.getPlayerType()}`)}}class TrackingEventTypeAdapter extends EventAdapter{constructor(e){super(),Si(this,"trackingEventType"),Si(this,"coordinator"),this.coordinator=e}resolveState(){if(!this.trackingEventType){let e=DataAccessorResolver(this.coordinator.getPlayerData());this.trackingEventType=TrackingEventTypeResolver(e)}return{trackingEventType:this.trackingEventType}}}class VideoPosAdapter extends EventAdapter{constructor(){super(...arguments),Si(this,"storedPlaybackPosition"),Si(this,"storeVideoPos",e=>{let t=ensureIsNumber(e);this.storedPlaybackPosition=t})}resolveState(e){let{metaInfo:t}=e,i=ensureIsNumber(null==t?void 0:t.playbackPosition),n=this.storedPlaybackPosition??i;return{videoPos:Math.max(0,i-n),storeVideoPos:this.storeVideoPos}}}function ensureIsNumber(e){return"number"==typeof e?Math.floor(e):0}function VideoStreamTypeResolver(e){if(!isVideoDataAccessor(e))return"vod";let t=e.getPlaybackMode();switch(t){case"LIVE":return"LINEAR"===e.getLiveVariant()?"linear":e.getTimeShiftInSec()>=-1?"live":"vod";case"ADS":case"VOD":return"vod";default:throw Error(`unexpected playback mode ${t}`)}}class VideoStreamTypeAdapter extends EventAdapter{constructor(e){super(),Si(this,"videoStreamType"),Si(this,"coordinator"),this.videoStreamType="vod",this.coordinator=e}resolveState(){let e=DataAccessorResolver(this.coordinator.getPlayerData());return this.videoStreamType=VideoStreamTypeResolver(e),{videoStreamType:this.videoStreamType}}}let ADAPTER_LIST=[AudioLanguageAdapter,DurationAdapter,IsStreamAdapter,PlayerModeAdapter,PlayerTypeAdapter,SubtitleLanguageAdapter,TrackingEventTypeAdapter,VideoStreamTypeAdapter,UnresolvedPlaybackPositionAdapter,VideoPosAdapter,HasInitialPlaybackAdapter,SecondsWatchedReporter,AdEventInfoAdapter,HasReachedEofAdapter,SeekEventAdapter],getAdapterList=()=>ADAPTER_LIST,log$v=loglevelExports.getLogger("TrackingServiceStateLayer");class TrackingServiceStateLayer{constructor(e){Si(this,"instantiatedAdapters"),this.instantiatedAdapters=getAdapterList().map(t=>new t(e))}getUpdatedState(e){let t=this.instantiatedAdapters.reduce((t,i)=>({...t,...i.execute({event:e,metaInfo:{...t},log:log$v})}),{});return log$v.info(`Resolved state for ${null==e?void 0:e.type}`,t),t}}let log$u=loglevelExports.getLogger("TrackingService"),windowEventTypes=["beforeunload","unload"];function getIntervalFraction(e,t){return Math.floor(e/t)}let REPORT_INTERVAL=60;class TrackingService{constructor(e,t=window.dataLayer){Si(this,"_stateLayer"),Si(this,"_metaInfo"),Si(this,"eofReached",!1),Si(this,"onPlayerEvent",e=>{if("downloadFinished"===e.type||"CAST"===e.issuer)return;let t=this.coordinator.getPlayerConfiguration(),i=this.coordinator.getPlayerData();if(!t)throw Error("unexpectedly dont have player config");if(!i)throw Error("unexpectedly dont have video player data accessor");let n=isVideoDataAccessor(i)&&i.isShowingAd();(this.metaInfo=this.stateLayer.getUpdatedState(e),log$u.debug("onPlayerEvent: ",e,this.metaInfo),n)?this.handlePlayerEventWhileShowingAd(e,t,i):(this.handlePlayerEventWithoutAd(e,t,i),this.handleCustomEvent(e))}),Si(this,"handleUnloadEvent",()=>
1{windowEventTypes.forEach(e=>window.removeEventListener(e,this.handleUnloadEvent));let e=this.coordinator.getPlayerConfiguration(),t=this.coordinator.getPlayerData();if(t&&isVideoDataAccessor(t)&&t.isShowingAd()){let t=getStopAdTrackingEvent(REPORT_INTERVAL,this.metaInfo,e);this.sendEvent(t)}if(this.metaInfo.hasReachedEof)return;let i=getStopTrackingEvent(REPORT_INTERVAL,this.metaInfo,e,t);this.sendEvent(i)}),this.coordinator=e,this.dataLayer=t,e.addEventListener(this.onPlayerEvent),windowEventTypes.forEach(e=>window.addEventListener(e,this.handleUnloadEvent))}get stateLayer(){return this._stateLayer||(this._stateLayer=new TrackingServiceStateLayer(this.coordinator)),this._stateLayer}get metaInfo(){return this._metaInfo||(this._metaInfo=this.stateLayer.getUpdatedState()),this._metaInfo}set metaInfo(e){this._metaInfo=e}destroy(){this.handleUnloadEvent(),this.coordinator.removeEventListener(this.onPlayerEvent),windowEventTypes.forEach(e=>window.removeEventListener(e,this.handleUnloadEvent))}reset(){this._stateLayer=new TrackingServiceStateLayer(this.coordinator)}restart(){this.reset();let e=this.coordinator.getPlayerConfiguration();if(!e)throw Error("dont have player config");let t=this.coordinator.getMediaMetaData();if(!t)throw Error("dont have player metadata");let i=this.coordinator.getPlayerData();if(!i)throw Error("unexpectedly dont have video player data accessor");this.sendInitEvent(e,t,i)}handlePlayerEventWithoutAd(e,t,i){switch(e.type){case"loaded":this.handleLoadedEvent(e,t,i);break;case"play":this.handlePlayEvent();break;case"paused":this.handlePausedEvent(t);break;case"timeChanged":this.handleTimeChangedEvent();break;case"seeking":case"timeshifting":this.handleSeekingEvent(e);break;case"seekingDone":case"timeshiftingDone":this.handleSeekingDoneEventForStreamTypes(e,i);break;case"playbackFinished":this.handlePlaybackFinishedEvent();break;case"sourceUnloaded":this.handleUnloadEvent();break;case"adSkipped":this.handleAdSkippedEvent(e,t)}}handleSeekingDoneEventForStreamTypes(e,t){if(["RESTART","INITIAL"].includes(e.issuer)||this.eofReached)return;let i=this.metaInfo.getSeekTrackingEvent();i&&(this.sendEvent(i),this.metaInfo.setSeekTrackingEvent(null)),isLiveLinearResolver(t)||this.handleSeekingDoneEvent(e,t)}handlePlayerEventWhileShowingAd(e,t,i){switch(e.type){case"loaded":this.handleLoadedEvent(e,t,i);break;case"adStarted":this.handleAdStartedEvent(e,t);break;case"adSkipped":this.handleAdSkippedEvent(e,t)}}handleCustomEvent(e){switch(e.type){case"nextUpCancelled":this.handleNextUpToastEvent(e,"Close");break;case"nextUpClicked":this.handleNextUpToastEvent(e,"Click");break;case"nextUpTimeout":this.handleNextUpToastEvent(e,"Auto");break;case"podcastTitleClick":this.handlePodcastTitleClickEvent(e);break;case"nextEpisodeTriggered":this.handleNextEpisodeEvent(e)}}handlePodcastTitleClickEvent(e){let t=this.coordinator.getPlayerConfiguration();if(!t)throw Error("dont have player config");let i=this.coordinator.getMediaMetaData();if(!i)throw Error("dont have player metadata");this.sendEvent(getPodcastTitleTrackingEvent(i,e.titleType,t.assetId,this.metaInfo))}handleNextUpToastEvent(e,t){if("CONTEXTUAL"===e.issuer)return;let i=this.coordinator.getPlayerConfiguration();if(!i)throw Error("dont have player config");let n=this.coordinator.getMediaMetaData();if(!n)throw Error("dont have player metadata");this.sendEvent(getNextUpToastTrackingEvent(n,t,i.assetId))}handlePlaybackFinishedEvent(){this.eofReached=!0;let e=this.coordinator.getPlayerConfiguration();if(!e)throw Error("dont have player config");let t=this.metaInfo;this.sendEvent(getEofTrackingEvent(e,REPORT_INTERVAL,t))}handleNextEpisodeEvent(e){let t=this.coordinator.getPlayerConfiguration();if(!t)throw Error("dont have player config");let i=this.coordinator.getMediaMetaData();if(!i)throw Error("dont have player metadata");let{issuer:n}=e,{assetId:r}=t;this.sendEvent(getNextEpisodeTrackingEvent(i,n,r,this.metaInfo)),"USER"===n&&this.handleUnloadEvent()}handleSeekingDoneEvent(e,t){if(["RESTART","INITIAL"].includes(e.issuer)||this.eofReached)return;let i=this.coordinator.getPlayerConfiguration();if(!i)throw Error("dont have player config");let n=this.metaInfo;"PAUSED"===t.getPlayerStatus()?this.sendEvent(getPauseTrackingEvent(i,REPORT_INTERVAL,{...n,videoPos:0})):this.sendEvent(getPlayTrackingEvent(i,REPORT_INTERVAL,{...n,videoPos:0}))}handleSeekingEvent(e){if("RESTART"===e.issuer||this.eofReached)return void this.restart();if("INITIAL"===e.issuer)return;
1this.metaInfo.shouldSendInitialPlayback&&this.sendPlayInitial(this.metaInfo);let t=this.coordinator.getPlayerConfiguration();if(!t)throw Error("dont have player config");let i=getSeekTrackingEvent(t,REPORT_INTERVAL,this.metaInfo);this.metaInfo.setSeekTrackingEvent(i)}handleTimeChangedEvent(){let e=this.coordinator.getCumulatedPlayTimeInSec();log$u.debug("TRACK timeChanged",this.metaInfo.playbackPosition,"cumulated",e),this.metaInfo.shouldSendInitialPlayback&&this.sendPlayInitial(this.metaInfo),"VOD"===this.coordinator.getInitialPlaybackMode()&&(this.handlePosRelativeAspect(),this.metaInfo=this.stateLayer.getUpdatedState()),this.handlePosAspect(this.metaInfo)}sendPlayInitial(e){let t=this.coordinator.getPlayerConfiguration();if(!t)throw Error("dont have player config");this.metaInfo.sendingPlayInitial(),this.eofReached=!1;let i=getPlayInitialTrackingEvent(t,e);this.sendEvent(i)}handlePosAspect(e){let{lastPlaybackPosition:t,playbackPosition:i}=e,n=getIntervalFraction(t,REPORT_INTERVAL),r=getIntervalFraction(i,REPORT_INTERVAL);if(n!==r){log$u.debug(`TRACK: ${REPORT_INTERVAL}s changed, last frac: ${n}, cur frac: ${r}, playback: ${i}s`);let t=this.coordinator.getPlayerConfiguration();if(!t)throw Error("dont have player config");this.sendEvent(getPosTrackingEvent(t,REPORT_INTERVAL,e))}}handlePosRelativeAspect(){let e=this.metaInfo,{lastPlaybackPosition:t,playbackPosition:i,durationInSec:n}=e,r=n/10,o=Math.floor(t/r),a=Math.floor(i/r);if(a%10!=0&&o!==a){log$u.debug("TRACK: 10 percent changed, last frac: ",o,"cur frac",a,"playback",i/e.durationInSec*100,"%");let t=this.coordinator.getPlayerConfiguration();if(!t)throw Error("dont have player config");this.sendEvent(getPosRelativeTrackingEvent(t,`${a}0%`,REPORT_INTERVAL,e))}}handlePlayEvent(){let e=this.coordinator.getPlayerConfiguration();if(this.metaInfo.hadInitialPlayback){if(!e)throw Error("dont have player config");let t=getPlayTrackingEvent(e,REPORT_INTERVAL,this.metaInfo);this.sendEvent(t)}}handlePausedEvent(e){if(this.metaInfo.hadInitialPlayback){let t=getPauseTrackingEvent(e,REPORT_INTERVAL,this.metaInfo);this.sendEvent(t)}}handleLoadedEvent(e,t,i){log$u.debug("TRACK: got duration",this.metaInfo.durationInSec),this.sendInitEvent(t,e.data,i)}sendInitEvent(e,t,i){let n=getInitTrackingEvent(e,t,i,this.metaInfo);this.sendEvent(n)}handleAdStartedEvent(e,t){let i=getPlayAdTrackingEvent(e,t.assetId,REPORT_INTERVAL,this.metaInfo);this.sendEvent(i)}handleAdSkippedEvent(e,t){let i=this.metaInfo.currentEventId;e.adId!==i&&log$u.warn("adId does not match, got skip event for id",e.adId,"but last start event id was",i);let n=getSkipAdTrackingEvent(t.assetId,REPORT_INTERVAL,this.metaInfo);this.sendEvent(n)}sendEvent(e){var t,i,n;if(!this.dataLayer)throw Error("dont have a data layer! Did you forget to initialize Google Tag Manager?");let r=this.coordinator.getPlayerConfiguration();if(!r)throw Error("dont have player config");this.calculateVideoPos(e);let o=r.tracking.configs.googleAnalytics,a=this.coordinator.getMediaMetaData(),s=(null==(t=o.eventCustomizer)?void 0:t.customize(e,a))??e,l=serializeEvent(s);log$u.debug("Tracking: Sending",l),this.dataLayer.push(l),"event_action"in s&&"playInitial"===s.event_action||null==(n=(i=this.metaInfo).reportSecondsWatched)||n.call(i)}calculateVideoPos(e){if(e.hasOwnProperty("video_pos")){let e=this.metaInfo;e.storeVideoPos(e.playbackPosition)}}}function createTrackingService(e,t=window.dataLayer){var i;let n=document.querySelectorAll('script[src*="GTM-5XHDS9"]').length>0;if((null==(i=window.google_tag_manager)?void 0:i.isRedBullPage)||n)return new TrackingService(e,t)}let MAX_DISTINCT_ERRORS=50,MAX_MESSAGE_LENGTH=1e3,MAX_BODY_LENGTH=6e4,FALLBACK_ERROR_COUNT=10;function isErrorLike(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}function isPlainObject$2(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!isErrorLike(e)}function serializeArg(e){if("string"==typeof e)return e;if(isErrorLike(e)){let t=e.name??"Error";return e.stack?`${t}: ${e.message} | ${e.stack}`:`${t}: ${e.message}`}try{return JSON.stringify(e)||String(e)}catch{return String(e)}}
1function serializeArgs(e){return e.map(serializeArg).join(" ").slice(0,MAX_MESSAGE_LENGTH)}function buildErrorPayload(e){return 1===e.length&&isPlainObject$2(e[0])?{...e[0]}:{message:serializeArgs(e)}}function byteLength(e){return"function"==typeof TextEncoder?new TextEncoder().encode(e).length:e.length}function interceptErrorLogs(e){let t=log$A.methodFactory,i=(i,n,r)=>{let o=t(i,n,r);return"error"!==i?o:(...t)=>{o(...t),"string"==typeof r&&e(r,t)}};for(let e of(log$A.methodFactory=i,log$A.setLevel(log$A.getLevel(),!1),Object.values(log$A.getLoggers())))e.methodFactory=i,e.setLevel(e.getLevel(),!1)}function onPageLeave(e){"u">typeof document&&document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&e()}),"u">typeof window&&window.addEventListener("pagehide",e)}class LoglevelErrorReporter{constructor(){Si(this,"environment"),Si(this,"componentVersion"),Si(this,"buffer",new Map),Si(this,"installed",!1)}configure(e){this.environment=e.environment??this.environment,this.componentVersion=e.componentVersion??this.componentVersion;try{this.install()}catch{return}}destroy(){try{let e=this.environment;if(0===this.buffer.size||!e)return;let t=[...this.buffer.values()];this.buffer.clear();let i=this.serializeReport(t);byteLength(i)>MAX_BODY_LENGTH&&(i=this.serializeReport(t.slice(0,FALLBACK_ERROR_COUNT))),postClientError(e,i)}catch{return}}reportCaughtError(e,t,i){try{this.capture(e,[t],i)}catch{return}}serializeReport(e){return JSON.stringify({message:"Player Session Error Report",componentVersion:this.componentVersion,href:"u">typeof location?location.href:void 0,errors:e})}install(){this.installed||(this.installed=!0,interceptErrorLogs((e,t)=>this.capture(e,t)),onPageLeave(()=>this.destroy()))}capture(e,t,i){try{let n=buildErrorPayload(t),r=`${i??""}::${e}::${JSON.stringify(n)}`,o=this.buffer.get(r);o?o.count+=1:this.buffer.size<MAX_DISTINCT_ERRORS&&this.buffer.set(r,{component:i,logger:e,count:1,...n})}catch{return}}__resetForTests(){this.buffer.clear(),this.environment=void 0,this.componentVersion=void 0}}let playerErrorReporter=new LoglevelErrorReporter;function resolveMediaMetaData(e){let t=e.getMediaMetaData();if(!t)throw Error("do not have player metadata");return t}function resolvePlayerConfigurationData(e){let t=e.getPlayerConfiguration();if(!t)throw Error("do not have player configuration");return t}function setMediaSessionActionHandler(e,t){navigator.mediaSession&&"function"==typeof navigator.mediaSession.setActionHandler&&navigator.mediaSession.setActionHandler(e,t)}function setMediaSessionMetadata(e){navigator.mediaSession&&"MediaMetadata"in window&&(navigator.mediaSession.metadata=e&&new MediaMetadata(e))}function setMediaSessionPlaybackState(e){navigator.mediaSession&&(navigator.mediaSession.playbackState=e)}function setMediaSessionPositionState(e,t,i){isNaN(e)||isNaN(t)||isNaN(i)||navigator.mediaSession&&"function"==typeof navigator.mediaSession.setPositionState&&navigator.mediaSession.setPositionState({duration:e,playbackRate:t,position:i})}let log$t=loglevelExports.getLogger("MediaSessionService"),SECONDS_OF_MINUTE=60,SECONDS_OF_HOUR=SECONDS_OF_MINUTE*SECONDS_OF_MINUTE,SECONDS_OF_DAY=24*SECONDS_OF_HOUR;class MediaSessionService{constructor(e){Si(this,"DEFAULT_MEDIA_SESSION_SEEK_SECONDS",10),Si(this,"onPlayerEvent",e=>{switch(e.type){case"play":this.handlePlayEvent();break;case"paused":this.handlePausedEvent();break;case"downloadFinished":case"adTimeChanged":case"timeChanged":this.handleTimeChangedEvent();break;case"seeking":this.handleSeekingEvent(e);break;case"timeshifting":this.handleTimeshiftEvent(e)}}),this.coordinator=e,e.addEventListener(this.onPlayerEvent)}destroy(){log$t.info("destroying media-session-service"),this.coordinator.removeEventListener(this.onPlayerEvent),this.reset()}reset(){log$t.info("resetting media-session-service"),setMediaSessionMetadata(null),this.resetMediaSessionActionHandler()}setupMediaSessionActionHandler(){setMediaSessionActionHandler("play",()=>{log$t.info("Play clicked via Media Session API"),this.coordinator.play()}),setMediaSessionActionHandler("pause",()=>{log$t.info("Pause clicked via Media Session API"),this.coordinator.pause()}),setMediaSessionActionHandler("seekto",e=>{if(this.isVOD()){let t=e.seekTime;if(log$t.info(`Seek to ${t} via Media Session API`),void 0!==t){let e=t+this.coordinator.getSeekableRange().start;this.coordinator.seek(e)}}else if(this.isDVR()){let t=e.seekTime;if(log$t.info(`Shift to ${t} via Media Session API`),void 0!==t){let e=t-Math.abs(this.coordinator.getMaxTimeShiftInSec());this.coordinator.timeShift(e)}}}),setMediaSessionActionHandler("seekbackward",()=>{this.isVOD()?(log$t.info(`Seek ${this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS} backward`),this.coordinator.seekRelative(-this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS)):this.isDVR()&&this.coordinator.getPlayerData()&&(log$t.info(`Shift ${this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS} backward`),this.coordinator.seekOrTimeshiftRelative(-this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS))}),setMediaSessionActionHandler("seekforward",()=>{this.isVOD()?(log$t.info(`Seek ${this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS} forward`),this.coordinator.seekRelative(this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS)):this.isDVR()&&(log$t.info(`Shift ${this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS} forward`),this.coordinator.seekOrTimeshiftRelative(this.DEFAULT_MEDIA_SESSION_SEEK_SECONDS))})}resetMediaSessionActionHandler(){setMediaSessionActionHandler("play",null),setMediaSessionActionHandler("pause",null),setMediaSessionActionHandler("seekto",null),setMediaSessionActionHandler("seekbackward",null),setMediaSessionActionHandler("seekforward",null)}handlePlayEvent(){setMediaSessionMetadata({title:this.getTitle(),artist:this.getArtist(),album:this.getAlbum(),artwork:calculateMediaSessionSrcSet(this.getPosterImageUrl())}),setMediaSessionPlaybackState("playing"),this.setupMediaSessionActionHandler()}handlePausedEvent(){setMediaSessionPlaybackState("paused")}handleTimeChangedEvent(){if(this.isVOD()){let e=this.coordinator.getPlayerData();if(e){let t=e.getDurationInSec(),i=e.getPlaybackSpeed(),n=e.getCurrentTimeInSec(),r=this.getAdjustedPosition(n,t);setMediaSessionPositionState(t,i,r)}return}if(this.isLinear())return void setMediaSessionPositionState(SECONDS_OF_DAY,1,this.getCurrentTimeInSeconds());if(this.isDVR()){let e=this.coordinator.getPlayerData();if(e){let t=e.getCurrentTimeInSec(),i=Math.abs(this.coordinator.getMaxTimeShiftInSec()),n=e.getPlaybackSpeed(),r=i-Math.abs(t),o=this.getAdjustedPosition(r,i);setMediaSessionPositionState(i,n,o)}return}}handleSeekingEvent(e){let t=this.coordinator.getPlayerData();if(t&&this.isVOD()){let i=t.getDurationInSec(),n=t.getPlaybackSpeed(),{targetPosition:r}=e,{start:o}=this.coordinator.getSeekableRange(),a=r-o,s=this.getAdjustedPosition(a,i);setMediaSessionPositionState(i,n,s)}}handleTimeshiftEvent(e){let t=this.coordinator.getPlayerData();if(t){let i=t.getCurrentTimeInSec(),n=Math.abs(this.coordinator.getMaxTimeShiftInSec()),r=t.getPlaybackSpeed(),o=n-Math.abs(i-e.playbackPosition),a=this.getAdjustedPosition(o,n);setMediaSessionPositionState(n,r,a)}}getCurrentTimeInSeconds(){let e=new Date;return e.getSeconds()+e.getMinutes()*SECONDS_OF_MINUTE+e.getHours()*SECONDS_OF_HOUR}getTitle(){return resolveMediaMetaData(this.coordinator).title}getArtist(){return resolvePlayerConfigurationData(this.coordinator).mediaSessionArtist}getAlbum(){return resolveMediaMetaData(this.coordinator).label}getPosterImageUrl(){let e=resolvePlayerConfigurationData(this.coordinator),t=resolveMediaMetaData(this.coordinator);return isVideoPlayerMetadata(e)?t.posterImageUrl:t.coverArt}isVOD(){var e;return(null==(e=this.coordinator.getPlayerData())?void 0:e.getPlaybackMode())==="VOD"}isLinear(){return isLiveLinearResolver(this.coordinator.getPlayerData())}isDVR(){return isLiveDvrResolver(this.coordinator.getPlayerData())}getAdjustedPosition(e,t){return Math.min(Math.max(0,e),t)}}let log$s=loglevelExports.getLogger("HookService");class HookService{constructor(e){this.hooks=e}async callHookMethod(e,t,i,n){if(e){log$s.debug("calling hook",e.name,"hook:",e);try{return await e(t,i,n)}catch(t){log$s.error("error calling hook",e.name,"on",e,"error",t)}}return t}async beforeLoad(e,t,i){var n;let r=e;for(let e of this.hooks)r=await this.callHookMethod(null==(n=e.onBeforeLoad)?void 0:n.bind(e),r,t,i)??r;return r}async afterLoad(e,t,i){var n;let r=e;for(let e of this.hooks)r=await this.callHookMethod(null==(n=e.onAfterLoad)?void 0:n.bind(e),r,t,i)??r;return r}async beforeDestroy(e,t,i){var n;let r=e;for(let e of this.hooks)r=await this.callHookMethod(null==(n=e.destroy)?void 0:n.bind(e),r??{},t??{},i);return r}}var t$5,r$i,u$4,i$7,o$h=0,f$6=[],c$b=[],e$3=l$c.__b,a$c=l$c.__r,v$3=l$c.diffed,l$a=l$c.__c,m$6=l$c.unmount;function d$5(e,t){l$c.__h&&l$c.__h(r$i,e,o$h||t),o$h=0;var i=r$i.__H||(r$i.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:c$b}),i.__[e]}function h$3(e){return o$h=1,s$4(B$4,e)}function s$4(e,t,i){var n=d$5(t$5++,2);if(n.t=e,!n.__c&&(n.__=[i?i(t):B$4(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],i=n.t(t,e);t!==i&&(n.__N=[i,n.__[1]],n.__c.setState({}))}],n.__c=r$i,!r$i.u)){var r=function(e,t,i){if(!n.__c.__H)return!0;var r=n.__c.__H.__.filter(function(e){return e.__c});if(r.every(function(e){return!e.__N}))return!o||o.call(this,e,t,i);var a=!1;return r.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),!(!a&&n.__c.props===e)&&(!o||o.call(this,e,t,i))};r$i.u=!0;var o=r$i.shouldComponentUpdate,a=r$i.componentWillUpdate;r$i.componentWillUpdate=function(e,t,i){if(this.__e){var n=o;o=void 0,r(e,t,i),o=n}a&&a.call(this,e,t,i)},r$i.shouldComponentUpdate=r}return n.__N||n.__}function p$6(e,t){var i=d$5(t$5++,3);!l$c.__s&&z$4(i.__H,t)&&(i.__=e,i.i=t,r$i.__H.__h.push(i))}function y$3(e,t){var i=d$5(t$5++,4);!l$c.__s&&z$4(i.__H,t)&&(i.__=e,i.i=t,r$i.__h.push(i))}function _$3(e){return o$h=5,F$4(function(){return{current:e}},[])}function A$3(e,t,i){o$h=6,y$3(function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},null==i?i:i.concat(e))}function F$4(e,t){var i=d$5(t$5++,7);return z$4(i.__H,t)?(i.__V=e(),i.i=t,i.__h=e,i.__V):i.__}function T$4(e,t){return o$h=8,F$4(function(){return e},t)}function q$2(e){var t=r$i.context[e.__c],i=d$5(t$5++,9);return i.c=e,t?(null==i.__&&(i.__=!0,t.sub(r$i)),t.props.value):e.__}function b$4(){for(var e;e=f$6.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(k$4),e.__H.__h.forEach(w$5),e.__H.__h=[]}catch(t){e.__H.__h=[],l$c.__e(t,e.__v)}}l$c.__b=function(e){r$i=null,e$3&&e$3(e)},l$c.__r=function(e){a$c&&a$c(e),t$5=0;var t=(r$i=e.__c).__H;
1t&&(u$4===r$i?(t.__h=[],r$i.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=c$b,e.__N=e.i=void 0})):(t.__h.forEach(k$4),t.__h.forEach(w$5),t.__h=[],t$5=0)),u$4=r$i},l$c.diffed=function(e){v$3&&v$3(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f$6.push(t)&&i$7===l$c.requestAnimationFrame||((i$7=l$c.requestAnimationFrame)||j$3)(b$4)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==c$b&&(e.__=e.__V),e.i=void 0,e.__V=c$b})),u$4=r$i=null},l$c.__c=function(e,t){t.some(function(e){try{e.__h.forEach(k$4),e.__h=e.__h.filter(function(e){return!e.__||w$5(e)})}catch(i){t.some(function(e){e.__h&&(e.__h=[])}),t=[],l$c.__e(i,e.__v)}}),l$a&&l$a(e,t)},l$c.unmount=function(e){m$6&&m$6(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.forEach(function(e){try{k$4(e)}catch(e){t=e}}),i.__H=void 0,t&&l$c.__e(t,i.__v))};var g$6="function"==typeof requestAnimationFrame;function j$3(e){var t,i=function(){clearTimeout(n),g$6&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(i,100);g$6&&(t=requestAnimationFrame(i))}function k$4(e){var t=r$i,i=e.__c;"function"==typeof i&&(e.__c=void 0,i()),r$i=t}function w$5(e){var t=r$i;e.__c=e.__(),r$i=t}function z$4(e,t){return!e||e.length!==t.length||t.some(function(t,i){return t!==e[i]})}function B$4(e,t){return"function"==typeof t?t(e):t}let useGetTagName=e=>{var t;let i=_$3();if(i.current)return i.current;let n=null==(t=e.current)?void 0:t.getRootNode();if(n&&"host"in n)return i.current=n.host.tagName.toLocaleLowerCase(),i.current},logger$5=loglevelExports.getLogger("UsageReport"),filterOutSubdomainsRegex=/^(?:.*?\.)?([a-zA-Z0-9\-_]{3,}\.(?:\w{2,8}|\w{2,4}\.\w{2,4}))$/;function getLocation(){var e,t;try{let{hostname:i,href:n}=window.location;return{platform:(null==(t=null==(e=filterOutSubdomainsRegex.exec(i))?void 0:e.groups)?void 0:t[1])??i,location:n}}catch(t){let e=resolveErrorMessageFromUnknown(t);return logger$5.warn({message:"failed to resolve host",error:e}),{}}}let useReportUsage=(e,t)=>{let i=_$3(!1),n=useGetTagName(e),{location:r,platform:o}=getLocation();if(i.current)return!1;if(n&&o){i.current=!0;let e=calculateSsdmUrl(t??"PRODUCTION"),a={package:n,version:CORE_VERSION,platform:o,location:r};return fetch(`${e}/report-usage?${new URLSearchParams(a)}`).then(e=>logger$5.info({message:"reported usage",queryParams:a,response:e})).catch(e=>{let t=resolveErrorMessageFromUnknown(e);logger$5.warn({message:"failed in reporting usage",queryParams:a,error:t})}),!0}return!1};function getFacebookHref(e){return`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(e)}`}function getPinterestHref(e,t="",i=""){return`https://pinterest.com/pin/create/button/?url=${encodeURIComponent(e)}&media=${encodeURIComponent(i)}&description=${encodeURIComponent(t)}`}function getRedditHref(e){return`https://www.reddit.com/submit?url=${encodeURIComponent(e)}`}function getTwitterHref(e,t=""){return`https://x.com/intent/tweet?url=${encodeURIComponent(e)}&text=${encodeURIComponent(t)}`}let QUERY_PARAM_MEDIA_TIME="rbup-media-time",QUERY_PARAM_MEDIA_ID="rbup-media-id",QUERY_PARAM_MEDIA_TIME_FALLBACK="time";function getPageUrl(e,t,i){if(i){let n=new URL(e),r=n.searchParams;return r.set(QUERY_PARAM_MEDIA_TIME,String(i)),r.set(QUERY_PARAM_MEDIA_ID,t),n.href}return e}class QueryParamUrlSharingStrategy{calculateShareUrl(e,t){let i=getPageUrl(this.calculateBaseUrl(),t.assetId,t.mediaPositionInSec);switch(e){case"FACEBOOK":return getFacebookHref(i);case"PINTEREST":return getPinterestHref(i,t.title,t.imageUrl);case"REDDIT":return getRedditHref(i);case"TWITTER":return getTwitterHref(i,t.title);case"PAGE":return i;default:throw Error(`unexpected share service ${e}`)}}determineInitialSeek(e){let t=window.location.search;if(!t)return;let i=new URLSearchParams(t),n=i.get(QUERY_PARAM_MEDIA_TIME);if(i.get(QUERY_PARAM_MEDIA_ID)===e&&n){let e=parseInt(n,10);if(!isNaN(e))return e}let r=i.get(QUERY_PARAM_MEDIA_TIME_FALLBACK);if(r){let e=parseInt(r,10);if(!isNaN(e))return e}}isSharingEnabled(){return!!this.calculateBaseUrl()}calculateBaseUrl(){return window.location.href}}let de={"ad-endsin":"Werbung endet in {{sec}} Sekunden","audio-mediaInfo-episodeText":"E{{episodeNumber}}","audio-mediaInfo-seasonText":"S{{seasonNumber}}","audio-podcast-listenOn":"Anh\xf6ren auf","button-close":"Schlie\xdfen","button-closeMenu":"Men\xfc schlie\xdfen","error-default-message":"Dieses Video ist leider nicht verf\xfcgbar.","error-fsk-message":"Dieses Video ist erst ab {{hour}} Uhr verf\xfcgbar.","error-fsk-title":"Freigegeben ab {{age}} Jahren","error-geo-message":"Dieses Video ist in Ihrem Land leider nicht verf\xfcgbar.","error-geo-title":"L\xe4nderbeschr\xe4nkung","error-missed-message":"Dieses Video ist leider nicht mehr verf\xfcgbar.","error-missed-title":"Schade verpasst","error-unauthorized-message":"Leider d\xfcrfen Sie diesen Content nicht sehen.","error-unauthorized-title":"Nicht autorisiert","error-upcoming-message":"Dieses Video kann ab {{localizedDate}} Uhr abgespielt werden.","error-upcoming-title":"Bald verf\xfcgbar","endslate-title":"\xc4hnliche Videos","endslate-replay":"Nochmal abspielen","global-month-short-april":"Apr","global-month-short-august":"Aug","global-month-short-december":"Dez","global-month-short-february":"Feb","global-month-short-january":"J\xe4n","global-month-short-july":"Jul","global-month-short-june":"Jun","global-month-short-march":"M\xe4r","global-month-short-may":"Mai","global-month-short-november":"Nov","global-month-short-october":"Okt","global-month-short-september":"Sep","liveStream-airedOn":"Ausgestrahlt am {{date}}","liveStream-canceled":"Abgesagt","liveStream-days":"Tage","liveStream-backToEvent":"Zur\xfcck zum Event Hub","liveStream-hours":"Stunden","liveStream-minutes":"Minuten","liveStream-seconds":"Sekunden","liveStream-trimming":"Replay in K\xfcrze verf\xfcgbar","liveStream-unconfirmed":"Unbest\xe4tigt","liveStream-seekBackToLive":"Zur\xfcck zu Live","liveStream-live":"Live","menu-audioTracks":"Tonspuren","menu-feedback":"R\xfcckmeldung geben","menu-quality":"Qualit\xe4t","menu-quality-auto":"Automatisch","menu-sharing":"Teilen","menu-sharing-copied":"Kopiert","menu-sharing-copyLink":"Link kopieren","menu-sharing-embed":"Embed kopieren","menu-sharing-facebook":"Facebook","menu-sharing-pinterest":"Pinterest","menu-sharing-playFrom":"Abspielen von","menu-sharing-reddit":"Reddit","menu-sharing-twitter":"Twitter","menu-speeds":"Geschwindigkeit","menu-speeds-normal":"Normal","menu-subtitles":"Untertitel","menu-subtitles-off":"Aus","multiChannel-singleStreamLive":"{{figure}} Stream live","multiChannel-multipleStreamsLive":"{{figure}} Streams live","multiChannel-seeSchedule":"Alle Livestreams","multiChannel-schedule":"Livestreams","multiChannel-label-live":"Jetzt live","multiChannel-label-liveIn":"Live in","multiChannel-label-replay":"Aufzeichnung verf\xfcgbar","multiChannel-label-trim":"Aufzeichnung bald verf\xfcgbar","multiChannel-label-nowWatching":"Das siehst du gerade","nerdMode-assetId":"Asset ID","nerdMode-copyId":"Kopiere ID","nerdMode-crepoId":"CRID","nerdMode-geolocation":"Abgeleitete Geo","nerdMode-idCopied":"ID kopiert","nerdMode-playerVersion":"Player Version","nerdMode-techVersion":"Bitmovin Version","nerdMode-rendition":"Aktuelle Qualit\xe4t","nerdMode-unknownValue":"unbekannt","nextVideoCountdown-replay":"Nochmal ansehen","nextVideoCountdown-title":"Als n\xe4chstes","rbcom-subtitlesAvailable":"Untertitel verf\xfcgbar","tooltip-airplay":"AirPlay","tooltip-audioTracks":"Tonspuren","tooltip-ch
1angeVolume":"Lautst\xe4rke anpassen","tooltip-dvr":"Zur\xfcck zu LIVE","tooltip-forward":"Vorspulen","tooltip-fullscreen":"Vollbild","tooltip-loading":"Laden","tooltip-mute":"Ton aus","tooltip-normalscreen":"Vollbild beenden","tooltip-pause":"Pausieren","tooltip-pip":"Bild in Bild","tooltip-play":"Abspielen","tooltip-replay":"Nochmal ansehen","tooltip-rewind":"Zur\xfcckspulen","tooltip-settings":"Einstellungen","tooltip-subtitles":"Untertitel","tooltip-unmute":"Ton an","ad-from-ads":"Werbung {{adPosition}} von {{totalAds}}","audio-duration-hour":"Std.","audio-duration-minute":"Min.","audio-error-default-description":"Diese Podcast-Episode ist nicht mehr verf\xfcgbar. Vielleicht wurde sie gel\xf6scht oder entfernt. Schau sp\xe4ter nochmal vorbei oder entdecke andere Podcasts.","audio-error-default-title":"Inhalt ist nicht verf\xfcgbar","audio-podcast-currently-playing":"L\xe4uft gerade","audio-podcast-playlist-additional-episodes-on":"{{additionalEpisodes}} weitere Folge auf","audio-podcast-playlist-additional-episodes-on_plural":"{{additionalEpisodes}} weitere Folgen auf","audio-podcast-playlist-all-episodes-on":"Alle Folgen auf","nerdMode-audioLanguageOverride":"Audiosprache \xdcberschreibung","nerdMode-localeStorage":"Locale storage","nerdMode-overrideReference":"\xdcberschreibungs Referenz","nerdMode-playerConfiguration":"Player-Konfiguration","nerdMode-subtitlesLanguageOverride":"Untertitel \xdcberschreibung","nerdMode-translationsLanguageOverride":"\xdcbersetzungen \xdcberschreibung","stv-reduce-ads":"Werbung reduzieren","tooltip-stop":"Stop","menu-multi-stream":"Multi Stream","tooltip-multi-stream":"Multi Stream","tooltip-casting":"Cast","streaming-tab-info":"Infos","streaming-tab-event-breakdown":"Event Breakdown","streaming-tab-interactive-stats":"Interactive Stats","start-over":"Neu starten","streaming-tab-playlist":"Playlist","watch-on-linkout-button":"Ansehen auf"},en$1={"ad-endsin":"Ad ends in {{sec}} seconds","audio-mediaInfo-episodeText":"E{{episodeNumber}}","audio-mediaInfo-seasonText":"S{{seasonNumber}}","audio-podcast-listenOn":"Listen on","button-close":"Close","button-closeMenu":"Close menu","error-default-message":"This video is currently unavailable.","error-fsk-message":"This video is only allowed for playback from {{hour}}:00.","error-fsk-title":"Released to age {{age}}","error-geo-message":"This video is not available in your country.","error-geo-title":"Geo restricted","error-missed-message":"This video is not available anymore.","error-missed-title":"You've missed it","error-unauthorized-message":"You have insufficient rights to watch this content.","error-unauthorized-title":"Unauthorized","error-upcoming-message":"This video is available from {{localizedDate}}.","error-upcoming-title":"Upcoming","endslate-title":"Related videos","endslate-replay":"Replay video","global-month-short-april":"Apr","global-month-short-august":"Aug","global-month-short-december":"Dec","global-month-short-february":"Feb","global-month-short-january":"Jan","global-month-short-july":"Jul","global-month-short-june":"Jun","global-month-short-march":"Mar","global-month-short-may":"May","global-month-short-november":"Nov","global-month-short-october":"Oct","global-month-short-september":"Sep","liveStream-airedOn":"Aired on {{date}}","liveStream-canceled":"Cancelled","liveStream-days":"Days","liveStream-backToEvent":"Back to Event Hub","liveStream-hours":"Hours","liveStream-minutes":"Minutes","liveStream-seconds":"Seconds","liveStream-trimming":"Awaiting replay","liveStream-unconfirmed":"Unconfirmed","liveStream-seekBackToLive":"Back to Live","liveStream-live":"Live","menu-audioTracks":"Audio Language","menu-feedback":"Give feedback","menu-quality":"Quality","menu-quality-auto":"Auto","menu-sharing":"Share","menu-sharing-copied":"Copied","menu-sharing-copyLink":"Copy link","menu-sharing-embed":"Copy embed","menu-sharing-facebook":"Facebook","menu-sharing-pinterest":"Pinterest","menu-sharing-playFrom":"Play from","menu-sharing-reddit":"Reddit","menu-sharing-twitter":"Twitter","menu-speeds":"Speed","menu-speeds-normal":"Normal","menu-subtitles":"Subtitles","menu-subtitles-off":"Off","multiChannel-singleStreamLive":"{{figure}} stream live","multiChannel-multipleStreamsLive":"{{figure}} streams live","multiChannel-seeSchedule":"See schedule","multiChannel-schedule":"Live streams","multiChannel-label-live":"Live now","multiChannel-label-liveIn":"Live in","multiChannel-label-replay":"Replay available","multiChannel-label-trim":"Awaiting replay","multiChannel-label-nowWatching":"You are now watching","nerdMode-assetId":"Asset ID","nerdMode-copyId":"Copy ID","nerdMode-crepoId":"CRID","nerdMode-geolocation":"Derived geolocation","nerdMode-idCopied":"ID copied to clipboard","nerdMode-playerVersion":"Player Version","nerdMode-techVersion":"Bitmovin Version","nerdMode-rendition":"Current Rendition","nerdMode-unknownValue":"unknown","nextVideoCountdown-replay":"Replay","nextVideoCountdown-title":"Up next","rbcom-subtitlesAvailable":"Subtitles Available","tooltip-airplay":"AirPlay","tooltip-audioTracks":"Audio Language","tooltip-ch
1angeVolume":"Change Volume","tooltip-dvr":"Return to LIVE","tooltip-forward":"Seek forward","tooltip-fullscreen":"Enter Fullscreen","tooltip-loading":"Loading","tooltip-mute":"Mute","tooltip-normalscreen":"Leave Fullscreen","tooltip-pause":"Pause","tooltip-pip":"Picture In Picture","tooltip-play":"Play","tooltip-replay":"Replay","tooltip-rewind":"Seek back","tooltip-settings":"Settings","tooltip-subtitles":"Subtitles","tooltip-unmute":"Unmute","ad-from-ads":"Ad {{adPosition}} of {{totalAds}}","audio-duration-hour":"hr","audio-duration-minute":"min","audio-error-default-description":"This podcast episode is no longer available. It may have been deleted or made unavailable by the provider. Please check back later or explore other podcasts.","audio-error-default-title":"Content is not available","audio-podcast-currently-playing":"Currently playing","audio-podcast-playlist-additional-episodes-on":"{{additionalEpisodes}} additional episode on","audio-podcast-playlist-additional-episodes-on_plural":"{{additionalEpisodes}} additional episodes on","audio-podcast-playlist-all-episodes-on":"All episodes on","nerdMode-audioLanguageOverride":"Audio language override","nerdMode-localeStorage":"Locale storage","nerdMode-overrideReference":"Override reference","nerdMode-playerConfiguration":"Player config","nerdMode-subtitlesLanguageOverride":"Subtitles language override","nerdMode-translationsLanguageOverride":"Translations language override","stv-reduce-ads":"Reduce ads","tooltip-stop":"Stop","menu-multi-stream":"Multi Stream","tooltip-multi-stream":"Multi Stream","tooltip-casting":"Cast","streaming-tab-info":"Info","streaming-tab-event-breakdown":"Event Breakdown","streaming-tab-interactive-stats":"Interactive Stats","start-over":"Start over","streaming-tab-playlist":"Playlist","watch-on-linkout-button":"Watch on"},TRANSLATION_BASE_URL="https://translations.redbull.com/player/",logger$4=loglevelExports.getLogger("TranslationService");class TranslationService{constructor(){Si(this,"translationsLoaded",!1),Si(this,"translationsLoadedCallback"),Si(this,"preferredLanguage"),Si(this,"currentTranslationData")}getTranslationForKey(e){return this.getTranslationFile()[e]}async fetchTranslationData(e){try{let t=await fetch(`${TRANSLATION_BASE_URL}${e}`,{redirect:"manual"});if(t.ok)return await t.json()}catch{logger$4.debug(`Could not load translations for ${e} using fallback instead`)}return this.getFallbackTranslation(e)}getTranslationFile(){let e=this.preferredLanguage??getBrowserLanguage();return this.currentTranslationData??this.getFallbackTranslation(e)}
1getFallbackTranslation(e){return null!=e&&e.startsWith("de")?de:en$1}async setAndFetchCurrentLanguage(e){let t=e??getBrowserLanguage(),i=await this.fetchTranslationData(t);return this.preferredLanguage=t,this.currentTranslationData=i,Promise.resolve()}}let translationService=new TranslationService;async function fetchBrowserOrConfiguredTranslationLanguage(e){return translationService.translationsLoaded=!1,await translationService.setAndFetchCurrentLanguage(e).then(()=>{translationService.translationsLoaded=!0,translationService.translationsLoadedCallback&&translationService.translationsLoadedCallback()})}function onTranslationDataLoaded(e){translationService.translationsLoadedCallback=e}function areTranslationsLoaded(){return translationService.translationsLoaded}function translate(e,t={}){let i=translationService.getTranslationForKey(e);return Object.keys(t).reduce((e,i)=>e.replace(`{{${i}}}`,t[i]),i)}let hotKey={"tooltip-fullscreen":KEYCODE_F,"tooltip-normalscreen":KEYCODE_F,"tooltip-pip":KEYCODE_I,"tooltip-play":KEYCODE_K,"tooltip-pause":KEYCODE_K,"tooltip-mute":KEYCODE_M,"tooltip-unmute":KEYCODE_M};function translateWithHotKey(e){let t=translate(e),i=hotKey[e];return i?`${t} [${i}]`:t}let log$r=loglevelExports.getLogger("ScriptLoader");function notifyListener(e,t){try{e(t)}catch(t){log$r.error("caught error during invocation of listener %s",e,t)}}function loadScriptIfNecessary(e,t,i,n=window){let r=n.rbupScriptLoadListenerMap??{},o=r[e];o?o.listeners.push(i):(o={id:e,status:"LOADING",listeners:[i]},r[e]=o,n.rbupScriptLoadListenerMap=r);let a=n.document.getElementById(e);if("LOADED"===o.status)return notifyListener(i,e),a??void 0;if(!a){let i=n.document.createElement("script"),r=()=>{var t;let i=null==(t=n.rbupScriptLoadListenerMap)?void 0:t[e];if(!i)throw Error(`entry for Script id ${e} does not exist`);i.status="LOADED",i.listeners.forEach(t=>notifyListener(t,e))};return i.id=e,i.src=t,i.onload=r,i.onerror=r,n.document.body.appendChild(i),i}return a}function loadScriptIfNecessaryAsync(e,t,i=window){return new Promise(n=>{loadScriptIfNecessary(e,t,e=>{n(e)},i)})}let log$q=loglevelExports.getLogger("CommonThumbnailService");class CommonThumbnailService{constructor(){Si(this,"thumbnailSprites"),Si(this,"currentThumbnailTrack"),Si(this,"thumbnailDetails"),Si(this,"currentResolution")}setThumbnailSprites(e){this.thumbnailSprites=e}async setThumbnail(e,t,i){let{imgContainerElement:n,imgElement:r,textContainerElement:o}=e;if(null===n||null===r||null===o)return!1;let{smallOrBigger:a,mediumOrBigger:s}=t,l=s?"HIGH":"LOW",c=await this.getThumbnailDetail(l,i);return!!c&&(this.styleImageContainerElement(n,c,a),this.styleImageElement(r,c),this.styleTextContainer(o,c),!0)}styleImageContainerElement(e,t,i){e.style.width=`${t.width}px`;let n=!i;e.style.height=`${n?.85*t.height:t.height}px`}styleImageElement(e,t){e.src=t.thumbnailUrl,e.style.left=`-${t.x}px`,e.style.top=`-${t.y}px`}styleTextContainer(e,t){e.style.maxWidth=`${t.width}px`}async getThumbnailDetail(e,t){return e!==this.currentResolution&&(this.thumbnailDetails=void 0,await this.loadThumbnailTrack(e),this.currentResolution=e),this.getRequestedThumbnailDetail(e,t)}async loadThumbnailTrack(e){var t,i;let n="LOW"===e?null==(t=this.thumbnailSprites)?void 0:t.lowRes:null==(i=this.thumbnailSprites)?void 0:i.highRes;this.currentThumbnailTrack=await this.fetchThumbnailTrack(n).catch(()=>{log$q.warn("Error loading thumbnail track ",n)})}getRequestedThumbnailDetail(e,t){var i,n,r;let o="LOW"===e?null==(i=this.thumbnailSprites)?void 0:i.lowRes:null==(n=this.thumbnailSprites)?void 0:n.highRes;return this.thumbnailDetails||(this.thumbnailDetails=this.calculatedThumbnailDetail(o)),null==(r=this.thumbnailDetails)?void 0:r.find(e=>t<=e.displayTo)}calculatedThumbnailDetail(e){if(!e)return;let t=this.currentThumbnailTrack,i=null==t?void 0:t.match(/(\d{2}:\d{2}:\d{2}\.\d+) +--> +(\d{2}:\d{2}:\d{2}\.\d+)[\r\n]+([^\r\n]*)/g);return null==i?void 0:i.map(t=>{let i=this.calculateDisplayTime(t),n=this.calculateFileUrl(e,t),r=this.calculateThumbnailPosition(t);return{...i,...r,thumbnailUrl:n}})}async fetchThumbnailTrack(e){if(!e)return;let t=await fetch(e);if(t.ok)return await t.text();throw Error(`server returned ${t.status}`)}calculateFileUrl(e,t){var i;let n=(null==(i=t.match(/[0-9]+\.[a-z]{3}
1/))?void 0:i[0])??"";return e.replace(/([^/]+$)/,n)}calculateThumbnailPosition(e){var t;let i=null==(t=/#xywh=(\d+),(\d+),(\d+),(\d+)/.exec(e))?void 0:t.slice(1,5);return{x:Number(null==i?void 0:i[0]),y:Number(null==i?void 0:i[1]),width:Number(null==i?void 0:i[2]),height:Number(null==i?void 0:i[3])}}calculateDisplayTime(e){let t=e.match(/(\d{2}:\d{2}:\d{2}\.*?)/g),i=(null==t?void 0:t[0])??"",n=(null==t?void 0:t[1])??"";return{displayFrom:convertTimeStringToSec(i),displayTo:convertTimeStringToSec(n)}}}class CookieEnvNotAvailableError extends Error{}async function checkCookieEnvAvailable(){let e=1;return new Promise(t=>{let i=setInterval(()=>{e>50&&(clearInterval(i),t(!1)),window.OneTrust&&window.OptanonActiveGroups&&(clearInterval(i),t(!0)),e++},100)})}let requiredConsent=["C0002"];function resolveCookies(e){return requiredConsent.every(t=>e.includes(t))}function getCurrentCookieConsent(){let e=window.OptanonActiveGroups;return{functional:!!(null!=e&&e.includes("C0001")),performance:!!(null!=e&&e.includes("C0002")),marketing:!!(null!=e&&e.includes("C0004"))}}function subscribeToCookieChanges(e){if(window.OneTrust)window.OneTrust.OnConsentChanged(t=>e(resolveCookies(t.detail)));else throw new CookieEnvNotAvailableError("OneTrust SDK not available")}function g$5(e,t){for(var i in t)e[i]=t[i];return e}function C$3(e,t){for(var i in e)if("__source"!==i&&!(i in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function w$4(e){this.props=e}function x$5(e,t){function i(e){var i=this.props.ref,n=i==e.ref;return!n&&i&&(i.call?i(null):i.current=null),t?!t(this.props,e)||!n:C$3(this.props,e)}function n(t){return this.shouldComponentUpdate=i,y$4(e,t)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(w$4.prototype=new b$5).isPureReactComponent=!0,w$4.prototype.shouldComponentUpdate=function(e,t){return C$3(this.props,e)||C$3(this.state,t)};var R$3=l$c.__b;l$c.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),R$3&&R$3(e)};var N$3="u">typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function k$3(e){function t(t){var i=g$5({},t);return delete i.ref,e(i,t.ref||null)}return t.$$typeof=N$3,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var T$3=l$c.__e;l$c.__e=function(e,t,i,n){if(e.then){for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=i.__e,t.__k=i.__k),r.__c(e,t)}T$3(e,t,i,n)};var I$3=l$c.unmount;function L$3(e,t,i){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=g$5({},e)).__c&&(e.__c.__P===i&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return L$3(e,t,i)})),e}function U$2(e,t,i){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return U$2(e,t,i)}),e.__c&&e.__c.__P===t&&(e.__e&&i.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=i)),e}function D$3(){this.__u=0,this.t=null,this.__b=null}function F$3(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function V$1(){this.u=null,this.o=null}l$c.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),I$3&&I$3(e)},(D$3.prototype=new b$5).__c=function(e,t){var i=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(i);var r=F$3(n.__v),o=!1,a=function(){o||(o=!0,i.__R=null,r?r(s):s())};i.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var e,t=n.state.__a;n.__v.__k[0]=U$2(t,t.__c.__P,t.__c.__O)}for(n.setState({__a:n.__b=null});e=n.t.pop();)e.forceUpdate()}},l=!0===t.__h;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},D$3.prototype.componentWillUnmount=function(){this.t=[]},D$3.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=L$3(this.__b,i,n.__O=n.__P)}this.__b=null}var r=t.__a&&y$4(k$5,null,e.fallback);return r&&(r.__h=null),[y$4(k$5,null,t.__a?null:e.children),r]};var W$2=function(e,t,i){if(++i[1]===i[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(i=e.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;e.u=i=i[2]}};(V$1.prototype=new b$5).__a=function(e){var t=this,i=F$3(t.__v),n=t.o.get(e);return n[0]++,function(r){var o=function(){t.props.revealOrder?(n.push(r),W$2(t,e,n)):r()};i?i(o):o()}},V$1.prototype.render=function(e){this.u=null,this.o=new Map;var t=S$3(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var i=t.length;i--;)this.o.set(t[i],this.u=[1,0,this.u]);return e.children},V$1.prototype.componentDidUpdate=V$1.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,i){W$2(e,i,t)})};var B$3="u">typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,H$3=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Z$1=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Y$1=/[A-Z0-9]/g,$$2="u">typeof document,q$1=function(e){return("u">typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};b$5.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(b$5.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var K$1=l$c.event;function Q$1(){}function X$1(){return this.cancelBubble}function nn(){return this.defaultPrevented}l$c.event=function(e){return K$1&&(e=K$1(e)),e.persist=Q$1,e.isPropagationStopped=X$1,e.
1isDefaultPrevented=nn,e.nativeEvent=e};var en={enumerable:!1,configurable:!0,get:function(){return this.class}},rn=l$c.vnode;l$c.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,i=e.type,n={};for(var r in t){var o=t[r];if(!("value"===r&&"defaultValue"in t&&null==o||$$2&&"children"===r&&"noscript"===i||"class"===r||"className"===r)){var a=r.toLowerCase();"defaultValue"===r&&"value"in t&&null==t.value?r="value":"download"===r&&!0===o?o="":"ondoubleclick"===a?r="ondblclick":"onchange"!==a||"input"!==i&&"textarea"!==i||q$1(t.type)?"onfocus"===a?r="onfocusin":"onblur"===a?r="onfocusout":Z$1.test(r)?r=a:-1===i.indexOf("-")&&H$3.test(r)?r=r.replace(Y$1,"-$&").toLowerCase():null===o&&(o=void 0):a=r="oninput","oninput"===a&&n[r=a]&&(r="oninputCapture"),n[r]=o}}"select"==i&&n.multiple&&Array.isArray(n.value)&&(n.value=S$3(t.children).forEach(function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)})),"select"==i&&null!=n.defaultValue&&(n.value=S$3(t.children).forEach(function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value})),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",en)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=B$3,rn&&rn(e)};var un=l$c.__r;l$c.__r=function(e){un&&un(e),e.__c};var on=l$c.diffed;l$c.diffed=function(e){on&&on(e);var t=e.props,i=e.__e;null!=i&&"textarea"===e.type&&"value"in t&&t.value!==i.value&&(i.value=null==t.value?"":t.value)};var ResizeObserverBoxOptions,resizeObservers=[],hasActiveObservations=function(){return resizeObservers.some(function(e){return e.activeTargets.length>0})},hasSkippedObservations=function(){return resizeObservers.some(function(e){return e.skippedTargets.length>0})},msg="ResizeObserver loop completed with undelivered notifications.",deliverResizeLoopError=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:msg}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=msg),window.dispatchEvent(e)};!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(ResizeObserverBoxOptions||(ResizeObserverBoxOptions={}));var trigger,freeze=function(e){return Object.freeze(e)},ResizeObserverSize=function(){return function(e,t){this.inlineSize=e,this.blockSize=t,freeze(this)}}(),DOMRectReadOnly=function(){function e(e,t,i,n){return this.x=e,this.y=t,this.width=i,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,freeze(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),isSVG=function(e){return e instanceof SVGElement&&"getBBox"in e},isHidden=function(e){if(isSVG(e)){var t=e.getBBox(),i=t.width,n=t.height;return!i&&!n}var r=e,o=r.offsetWidth,a=r.offsetHeight;return!(o||a||e.getClientRects().length)},isElement$2=function(e){if(e instanceof Element)return!0;var t,i=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView;return!!(i&&e instanceof i.Element)},isReplacedElement=function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},global$1="u">typeof window?window:{},cache=new WeakMap,scrollRegexp=/auto|scroll/,verticalRegexp=/^tb|vertical/,IE=/msie|trident/i.test(global$1.navigator&&global$1.navigator.userAgent),parseDimension=function(e){return parseFloat(e||"0")},size=function(e,t,i){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=!1),new ResizeObserverSize((i?t:e)||0,(i?e:t)||0)},zeroBoxes=freeze({devicePixelContentBoxSize:size(),borderBoxSize:size(),contentBoxSize:size(),contentRect:new DOMRectReadOnly(0,0,0,0)}),calculateBoxSizes=function(e,t){if(void 0===t&&(t=!1),cache.has(e)&&!t)return cache.get(e);if(isHidden(e))return cache.set(e,zeroBoxes),zeroBoxes;var i=getComputedStyle(e),n=isSVG(e)&&e.ownerSVGElement&&e.getBBox(),r=!IE&&"border-box"===i.boxSizing,o=verticalRegexp.test(i.writingMode||""),a=!n&&scrollRegexp.test(i.overflowY||""),s=!n&&scrollRegexp.test(i.overflowX||""),l=n?0:parseDimension(i.paddingTop),c=n?0:parseDimension(i.paddingRight),u=n?0:parseDimension(i.paddingBottom),d=n?0:parseDimension(i.paddingLeft),h=n?0:parseDimension(i.borderTopWidth),p=n?0:parseDimension(i.borderRightWidth),f=n?0:parseDimension(i.borderBottomWidth),m=n?0:parseDimension(i.borderLeftWidth),g=d+c,v=l+u,y=m+p,b=h+f,S=s?e.offsetHeight-b-e.clientHeight:0,_=a?e.offsetWidth-y-e.clientWidth:0,E=r?g+y:0,T=r?v
1+b:0,w=n?n.width:parseDimension(i.width)-E-_,A=n?n.height:parseDimension(i.height)-T-S,P=w+g+_+y,I=A+v+S+b,C=freeze({devicePixelContentBoxSize:size(Math.round(w*devicePixelRatio),Math.round(A*devicePixelRatio),o),borderBoxSize:size(P,I,o),contentBoxSize:size(w,A,o),contentRect:new DOMRectReadOnly(d,l,w,A)});return cache.set(e,C),C},calculateBoxSize=function(e,t,i){var n=calculateBoxSizes(e,i),r=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:return a;case ResizeObserverBoxOptions.BORDER_BOX:return r;default:return o}},ResizeObserverEntry=function(){return function(e){var t=calculateBoxSizes(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=freeze([t.borderBoxSize]),this.contentBoxSize=freeze([t.contentBoxSize]),this.devicePixelContentBoxSize=freeze([t.devicePixelContentBoxSize])}}(),calculateDepthForNode=function(e){if(isHidden(e))return 1/0;for(var t=0,i=e.parentNode;i;)t+=1,i=i.parentNode;return t},broadcastActiveObservations=function(){var e=1/0,t=[];resizeObservers.forEach(function(i){if(0!==i.activeTargets.length){var n=[];i.activeTargets.forEach(function(t){var i=new ResizeObserverEntry(t.target),r=calculateDepthForNode(t.target);n.push(i),t.lastReportedSize=calculateBoxSize(t.target,t.observedBox),r<e&&(e=r)}),t.push(function(){i.callback.call(i.observer,n,i.observer)}),i.activeTargets.splice(0,i.activeTargets.length)}});for(var i=0,n=t;i<n.length;i++)(0,n[i])();return e},gatherActiveObservationsAtDepth=function(e){resizeObservers.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(i){i.isActive()&&(calculateDepthForNode(i.target)>e?t.activeTargets.push(i):t.skippedTargets.push(i))})})},process$1=function(){var e=0;for(gatherActiveObservationsAtDepth(0);hasActiveObservations();)gatherActiveObservationsAtDepth(e=broadcastActiveObservations());return hasSkippedObservations()&&deliverResizeLoopError(),e>0},callbacks=[],notify=function(){return callbacks.splice(0).forEach(function(e){return e()})},queueMicroTask=function(e){if(!trigger){var t=0,i=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return notify()}).observe(i,n),trigger=function(){i.textContent="".concat(t?t--:t++)}}callbacks.push(e),trigger()},queueResizeObserver=function(e){queueMicroTask(function(){requestAnimationFrame(e)})},watching=0,isWatching=function(){return!!watching},CATCH_PERIOD=250,observerConfig={attributes:!0,characterData:!0,childList:!0,subtree:!0},events=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],time=function(e){return void 0===e&&(e=0),Date.now()+e}
1,scheduled=!1,Scheduler=function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=CATCH_PERIOD),!scheduled){scheduled=!0;var i=time(e);queueResizeObserver(function(){var n=!1;try{n=process$1()}finally{if(scheduled=!1,e=i-time(),!isWatching())return;n?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,observerConfig)};document.body?t():global$1.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),events.forEach(function(t){return global$1.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),events.forEach(function(t){return global$1.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}
1(),scheduler=new Scheduler,updateCount=function(e){!watching&&e>0&&scheduler.start(),(watching+=e)||scheduler.stop()},skipNotifyOnElement=function(e){return!isSVG(e)&&!isReplacedElement(e)&&"inline"===getComputedStyle(e).display},ResizeObservation=function(){function e(e,t){this.target=e,this.observedBox=t||ResizeObserverBoxOptions.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=calculateBoxSize(this.target,this.observedBox,!0);return skipNotifyOnElement(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),ResizeObserverDetail=function(){return function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}}(),observerMap=new WeakMap,getObservationIndex=function(e,t){for(var i=0;i<e.length;i+=1)if(e[i].target===t)return i;return -1},ResizeObserverController=function(){function e(){}return e.connect=function(e,t){var i=new ResizeObserverDetail(e,t);observerMap.set(e,i)},e.observe=function(e,t,i){var n=observerMap.get(e),r=0===n.observationTargets.length;0>getObservationIndex(n.observationTargets,t)&&(r&&resizeObservers.push(n),n.observationTargets.push(new ResizeObservation(t,i&&i.box)),updateCount(1),scheduler.schedule())},e.unobserve=function(e,t){var i=observerMap.get(e),n=getObservationIndex(i.observationTargets,t),r=1===i.observationTargets.length;n>=0&&(r&&resizeObservers.splice(resizeObservers.indexOf(i),1),i.observationTargets.splice(n,1),updateCount(-1))},e.disconnect=function(e){var t=this,i=observerMap.get(e);i.observationTargets.slice().forEach(function(i){return t.unobserve(e,i.target)}),i.activeTargets.splice(0,i.activeTargets.length)},e}(),ResizeObserver$1=function(){function e(e){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ResizeObserverController.connect(this,e)}return e.prototype.observe=function(e,t){if(0==arguments.length)throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement$2(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ResizeObserverController.observe(this,e,t)},e.prototype.unobserve=function(e){if(0==arguments.length)throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement$2(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ResizeObserverController.unobserve(this,e)},e.prototype.disconnect=function(){ResizeObserverController.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function newResizeObserver(e){return new(window.ResizeObserver??ResizeObserver$1)(e)}function useContainerQuery(e,t){let[i,n]=h$3([]),r=T$4(e=>{let r=new Set(i),o=new Set(i);e.forEach(e=>{t.forEach(t=>{e.contentRect.width>=t?r.add(t):r.delete(t)})}),eqSet(o,r)||n(Array.from(r))},[t,i]);p$6(()=>{let t=e.current;if(!t)return function(){};let i=newResizeObserver(e=>{window.requestAnimationFrame(()=>r(e))});return i.observe(t),function(){i.unobserve(t)}},[t,i,e,r]);let o=F$4(()=>i.map(e=>`cq-${e}`).join(" "),[i]);if(void 0===o)throw Error("Hooks are broken! Please check RBV-1627 to get more info!");return o}function cssClassesContainsBreakpoint(e,t){return e.includes(`cq-${t}`)}function useResize(e,t){let i=_$3(),n=_$3(),r=_$3(e);r.current=e;let o=e=>{window.requestAnimationFrame(()=>{e.forEach(e=>{let t=i.current;(e.contentRect.width!==(null==t?void 0:t.width)||e.contentRect.height!==t.height)&&(i.current={width:e.contentRect.width,height:e.contentRect.height},r.current(e.contentRect))})})};n.current||(n.current=newResizeObserver(o)),p$6(()=>{let e=null==t?void 0:t.current;if(!e)return()=>{};let i=n.current;return null==i||i.observe(e),()=>{null==i||i.unobserve(e)}},[t])}let defaultState={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function useMeasure(e,t){let[i,n]=h$3({...defaultState,...t});return useResize(e=>{let{x:t,y:i,width:r,height:o,top:a,left:s,bottom:l,right:c}=e;n({x:t,y:i,width:r,height:o,top:a,left:s,bottom:l,right:c})},e),i}function handleResize(e,t){window.requestAnimationFrame(()=>
1{e.forEach(e=>{t(e.contentRect.width)})})}function usePlayerWidth(e){let[t,i]=h$3(0);return p$6(()=>{let t=e.current;if(!t)return function(){};let n=newResizeObserver(e=>handleResize(e,i));return n.observe(t),function(){n.unobserve(t)}},[e]),t}let log$p=loglevelExports.getLogger("useUserInteraction"),UserInteractionContext=G$1({}),UserInteractionContextProvider=({children:e})=>{let t=_$3([]),i=F$4(()=>({addEventListener(e){t.current.includes(e)||t.current.push(e)},removeEventListener(e){let i=t.current.findIndex(t=>t===e);t.current.splice(i,1)},trigger(e){t.current.forEach(t=>{try{t(e)}catch(e){log$p.error("error invoking user interaction listener",e)}})}}),[t]);return o$i(UserInteractionContext.Provider,{value:i,children:e})},useUserInteractionContext=()=>q$2(UserInteractionContext),log$o=loglevelExports.getLogger("useInformPlaywright"),INFO_LOG_LEVEL=2;function useInformPlaywright(e){let t=_$3(null),i=T$4(()=>log$o.getLevel()<=INFO_LOG_LEVEL,[]),n=T$4(()=>{t.current&&(window.clearTimeout(t.current),t.current=null)},[]);p$6(()=>(i()&&(n(),t.current=window.setTimeout(()=>{log$o.info(e)},1e3)),()=>{n()}),[n,i,e])}function useObjectArrayCache(e,t){return F$4(()=>e,[e.map(e=>e[t]).join(",")])}let ARIA_UPDATE_THRESHOLD_SECONDS=5;function useScrubbarAria(e,t,i){let[n,r]=h$3({valueNow:0,valueMin:0,valueMax:Math.floor(e),valueText:"0:00",valueLive:void 0}),o=_$3(0);o.current=Math.floor(getAbsolutePosition(e,t));let a=T$4(e=>{if("seekingDone"===e.type||"paused"===e.type){let t=getFormattedTimeString(o.current);r(i=>({...i,valueNow:o.current,valueText:t,valueLive:"seekingDone"===e.type?t:i.valueLive}))}else"timeChanged"===e.type&&r(e=>shouldUpdateOnTimeChanged(e.valueNow,o.current)?{...e,valueNow:o.current,valueText:getFormattedTimeString(o.current)}:e)},[]);return p$6(()=>(null==i||i.addEventListener(a),()=>{null==i||i.removeEventListener(a)}),[i,a]),n}function shouldUpdateOnTimeChanged(e,t){return e+ARIA_UPDATE_THRESHOLD_SECONDS<=t}function getAbsolutePosition(e,t){if(e>0)return e*t;let i=Math.abs(e);return i-i*t}var isProduction=!0,prefix="Invariant failed";function invariant(e,t){if(!e){if(isProduction)throw Error(prefix);var i=t;throw Error("".concat(prefix,": ").concat(i))}}function createPlayerConfigurationDataWithNextUp(e,t,i,n,r){return r({...e,initialSeekTimeInSec:void 0,title:t.title,posterImageUrl:t.imageUrl??e.posterImageUrl,description:t.description,assetId:t.assetId,collectionId:t.collectionId,autoplay:!0,muted:n?"MUTED":"NOT_MUTED",autoplayTriggeredByNextUp:i},t)}let log$n=loglevelExports.getLogger("useNextUp");function useNextUp(e,t){return{playNextUp:T$4((i,n)=>{log$n.info("play nextUp",i),e(e=>{var r;invariant(e,"expected old config");let o=createPlayerConfigurationDataWithNextUp(e,i,n,t.isMuted()??"MUTED"===e.muted,t.adaptPlayerConfigForNextVideo);return null==(r=t.onBeforeSwitchToNextVideo)||r.call(t,o,i),o})},[e,t])}}function calculateGfkScriptAddress(e){switch(e){case"PRODUCTION":return{url:"https://at-config.sensic.net/playerextension.js",scriptId:"rbupGfk_prod"};case"STAGING":return{url:"https://at-config-preproduction.sensic.net/playerextension.js",scriptId:"rbupGfk_preprod"};default:throw Error(`unknown server environment ${e}`)}}let logger$3=loglevelExports.getLogger("GfkModuleLoader");class GfkModuleLoader{constructor(){Si(this,"_scriptId")}async getConstructor(e){var t,i;if(null!=(t=window.gfkS2sExtension)&&t.PlayerExtension)return window.gfkS2sExtension.PlayerExtension;let n=calculateGfkScriptAddress(e);this._scriptId=await loadScriptIfNecessaryAsync(n.scriptId,n.url);let r=null==(i=window.gfkS2sExtension)?void 0:i.PlayerExtension;return r||logger$3.error("did not find gfk PlayerExtension"),r}}let gfkModuleRegistry=new GfkModuleLoader;function ContentColorResolver(e){return e&&0!==e.length?e[0]:null}function VideoDurationResolver(e,t){return isFinite(e)&&e>0?Math.round(e):Math.round(t??0)}function GfkConfigAdditionalContentResolver(e,t,i){let n=VideoDurationResolver(e.getDurationInSec(),i.duration);return{playerid:i.gfkPlayerId,channel:"ServusTV",deviceid:"WEB",cliptype:i.gfkClipType,episodeid:t,videoid:t,playerduration:n,videoduration:n,episodeduration:n,videotitle:i.title??null,programname:i.label??null,videocategory:ContentColorResolver(i.contentColor)}}function GfkConfigLiveResolver(e){return{playerid:e.gfkPlayerId,channel:"ServusTV",deviceid:"WEB",cliptype:e.gfkClipType}}function GfkConfigLiveWebResolver(e,t){return{playerid:t.gfkPlayerId,channel:"ServusTV",deviceid:"WEB",cliptype:t.gfkClipType,videoid:e,videotitle:t.title??null,episodeid:e,programname:t.label??null}}function GfkConfigSendungResolver(e,t,i){let n=VideoDurationResolver(e.getDurationInSec(),i.duration);return{playerid:i.gfkPlayerId,channel:"ServusTV",deviceid:"WEB",cliptype:i.gfkClipType,videoid:t,episodeid:t,playerduration:n,videoduration:n,episodeduration:n,videotitle:i.title??null,programname:i.label??null,clipreleasetime:i.currentSunrise??null,videopartid:"1_1",videocategory:ContentColorResolver(i.contentColor)}}function GfkConfigTrailerResolver(e,t,i){let n=VideoDurationResolver(e.getDurationInSec(),i.duration);return{playerid:i.gfkPlayerId,channel:"ServusTV",deviceid:"WEB",cliptype:i.gfkClipType,videoid:t,episodeid:t,playerduration:n,videoduration:n,episodeduration:n,videotitle:i.title??null,programname:i.label??null,videocategory:ContentColorResolver(i.contentColor)}}let log$m=loglevelExports.getLogger("resolveGfkCustomParameters");function resolveGfkCustomParameters(e,t){let i=e.gfkClipType,n=t.getPlayerConfiguration().assetId;switch(i){case"Sendung":return GfkConfigSendungResolver(t,n,e);case"Additional_content":return GfkConfigAdditionalContentResolver(t,n,e);case"Trailer":return GfkConfigTrailerResolver(t,n,e);case"live":return GfkConfigLiveResolver(e);case"live_web":return GfkConfigLiveWebResolver(n,e);default:return log$m.error("unexpected clip type for gfk",i),{}}}let log$l=loglevelExports.getLogger("GfkAdService"),DEFAULT_VALUE_ENABLE_GFK="INACTIVE",DEFAULT_CONFIG={enablement:DEFAULT_
1VALUE_ENABLE_GFK};class GfkTrackingService{constructor(e,t,i,n,r){Si(this,"extension"),Si(this,"imaAdManager"),Si(this,"coordinator"),Si(this,"imaAdsSupported",!1),this.mediaId=e,this.regionId=t,this.trackingEnvironment=i,this.innerAdService=n,this._serviceConfig=r}set serviceConfig(e){this._serviceConfig=e}get serviceConfig(){return this._serviceConfig??DEFAULT_CONFIG}createBitmovinAdConfig(){var e;let t=null==(e=this.innerAdService)?void 0:e.createBitmovinAdConfig();return t&&(this.imaAdsSupported=!0,{...t,onAdsManagerAvailable:e=>{var i;null==(i=t.onAdsManagerAvailable)||i.call(t,e),this.imaAdManager=e,this.extension&&e&&this.extension.activateGoogleIMASupport(e)}})}calculateConfigUrl(e,t){switch(e){case"PRODUCTION":return`//${t}-config.sensic.net/s2s-web.js`;case"STAGING":return`//${t}-config-preproduction.sensic.net/s2s-web.js`;default:throw Error(`unknown server environment ${e}`)}}async loadGfkScript(e,t,i){let n="LIVE"===e.getPlaybackMode(),r=this.trackingEnvironment??t.environment,o=this.calculateConfigUrl(r,this.regionId);log$l.debug("loading GFK script",o);try{let a=await gfkModuleRegistry.getConstructor(r);a?(log$l.info("gfk loaded",a),this.initializePlayerInstanceForGfk(o,t,i,n,e,a)):log$l.error("could not load gfk extension (no constructor)")}catch(e){log$l.error("error loading gfk constructor",e)}}initializePlayerInstanceForGfk(e,t,i,n,r,o){var a;let s={type:"WEB",url:e,media:this.mediaId,optin:t.cookieConsent},l=null==(a=r.getPlayerData())?void 0:a.getActualPlayerInstance(),c=this.validateServiceEnablement(this.serviceConfig.enablement,i.gfkTrackingEnabled);if(l){if(c){let e={instance:l,vendor:"bitmovin",type:n?"live":"vod"},t=resolveGfkCustomParameters(i,r);this._createOrConfigureExtensionInstance(o,s,e,t)}}else log$l.warn("no player instance to pass to GFK")}_createOrConfigureExtensionInstance(e,t,i,n){if(this.extension){log$l.debug("gfk: setting new player instance",i.instance),this.extension.setPlayer({instance:i.instance}),this.extension.setParameter({customParams:n});return}let r=new e(i,t,{customParams:n});this.imaAdManager?r.activateGoogleIMASupport(this.imaAdManager):this.innerAdService&&!this.imaAdsSupported&&r.activateNativeAdSupport(),this.extension=r}async scheduleAd(e,t,i){var n;return null==(n=this.innerAdService)?void 0:n.scheduleAd(e,t,i)}async onBeforeLoad(e,t,i){return this.coordinator=i,this.imaAdManager=void 0,log$l.info("onBeforeLoad: gfk configuration",this.serviceConfig),e}async onAfterLoad(e,t,i){return this.isEnhancedMediaMetaData(t)&&this.validateServiceEnablement(this.serviceConfig.enablement,t.gfkTrackingEnabled)&&await this.loadGfkScript(i,e,t),e}async destroy(e,t,i){var n;log$l.debug("gfk: clearing player instance",this.extension),null==(n=this.extension)||n.setPlayer({instance:void 0})}validateServiceEnablement(e,t){return"INACTIVE"!==e&&!!t}isEnhancedMediaMetaData(e){return"gfkClipType"in e&&"gfkPlayerId"in e}}function defaultVideoQuality$1(){return{isAuto:!0,id:"auto",height:0,width:0}}function createDefaultPlayerContextState(){return{playerState:{audioTracks:[],cumulatedPlayTimeInSec:0,durationInSec:0,isFullscreenMode:!1,isInPictureInPictureMode:!1,isHdPlayback:!1,isShowingAd:!1,liveStatus:void 0,maxTimeShiftInSec:0,playbackMode:"VOD",playbackPosInSec:0,playbackSpeed:1,playerStatus:"IDLE",selectedAudioTrack:void 0,selectedSubtitleTrack:void 0,selectedVideoQuality:defaultVideoQuality$1(),subtitleTracks:[],timeShiftInSec:0,videoBufferLengthInSec:0,videoLoaded:!1,videoQualities:[],isVRVideo:!1,isCasting:!1,isCastingAvailable:!1},init:()=>{}}}let defaultPlayerContextState=createDefaultPlayerContextState(),PlayerStateContext=G$1(null);function createPlayerStateFromCoordinator(e){var t,i,n;let r=e.getPlaybackMode(),o="LIVE"===r?e.getLiveVariant():void 0;return{audioTracks:e.getAvailableAudioTracks(),cumulatedPlayTimeInSec:e.getCumulatedPlayTimeInSec(),currentErrorDetails:e.getCurrentErrorDetails(),durationInSec:e.getDurationInSec(),isFullscreenMode:e.isInFullscreenMode(),isInPictureInPictureMode:e.isInPictureInPictureMode(),isHdPlayback:e.isHdPlayback(),isShowingAd:(null==(t=e.getPlayerData())?void 0:t.isShowingAd())??!1,liveStatus:e.getLiveStatus(),liveVariant:o,maxTimeShiftInSec:e.getMaxTimeShiftInSec(),mediaMetaData:e.getMediaMetaData(),playbackMode:r,playbackPosInSec:(null==(i=e.getPlayerData())?void 0:i.getCurrentTimeInSec())??0,playbackSpeed:e.getPlaybackSpeed(),playerConfiguration:e.getPlayerConfiguration(),playerCoordinator:e,playerStatus:e.getPlayerStatus(),posterImage:e.getPosterImage(),selectedAudioTrack:e.getSelectedAudioTrack(),selectedSubtitleTrack:e.getSelectedSubtitleTrack(),selectedVideoQuality:e.getSelectedVideoQuality(),subtitleTracks:e.getSubtitleTracks(),timeShiftInSec:e.getTimeShiftInSec(),videoBufferLengthInSec:e.getBufferLengthInSec(),videoLoaded:e.isVideoLoaded,videoQualities:e.getAvailableVideoQualities(),isVRVideo:(null==(n=e.getPlayerData())?void 0:n.isVRVideo())??!1,isCastingAvailable:e.isCastingAvailable,isCasting:e.isCastingVideoViaCast}}let PlayerStateContextProvider=({children:e})=>{let[t,i]=h$3(defaultPlayerContextState.playerState),[n,r]=h$3(),o=T$4(e=>{r(e)},[]);p$6(()=>
1{if(!n)return()=>{};let e=e=>{i(createPlayerStateFromCoordinator(n))};return n.addEventListener(e),i(createPlayerStateFromCoordinator(n)),()=>{n.removeEventListener(e)}},[n]);let a=F$4(()=>({playerState:t,init:o}),[t,o]);return o$i(PlayerStateContext.Provider,{value:a,children:e})},usePlayerContext=()=>{let e=q$2(PlayerStateContext);if(!e)throw Error("no player state context context found");return e},isFocusedByKeyboard=e=>{let t=e.target;if(!(t instanceof Element))return!1;let i=t.shadowRoot?t.shadowRoot.activeElement:t;return!!(null!=i&&i.matches(":focus-visible"))},ControlsVisibilityContext=G$1({}),ControlsVisibilityContextProvider=({children:e})=>{let t=_$3(-1),{playerState:{playerStatus:i,isInPictureInPictureMode:n,isCasting:r}}=usePlayerContext(),[o,a]=h$3("fade-in"),[s,l]=h$3("allow"),[c,u]=h$3("CLOSED"),[d,h]=h$3("NOT_HOVERED"),[p,f]=h$3("NOT_FOCUSED"),m=_$3();m.current=n;let g=_$3();g.current=i;let v=_$3();v.current=c;let y=_$3();y.current=r;let b=T$4(e=>{a(e),("hide"===e||"fade-out"===e)&&u("CLOSED")},[a]),S=T$4(()=>{window.clearTimeout(t.current),t.current=window.setTimeout(()=>{m.current||y.current||"PAUSED"!==g.current&&"CLOSED"===v.current&&"HOVERED"!==d&&"FOCUSED"!==p&&b("fade-out")},3e3)},[d,p,b]),_=T$4(()=>{S(),b("fade-in")},[b,S]),E=T$4(()=>{window.clearTimeout(t.current),b("fade-in")},[b]),T=T$4(()=>{window.clearTimeout(t.current),b("fade-out")},[b]),w=T$4(()=>{window.clearTimeout(t.current),b("hide")},[b]),A=T$4(()=>{a(e=>{let t="fade-in"===e?"fade-out":"fade-in";return"fade-in"===t&&_(),t})},[_]),P=T$4(e=>{var t;h("NOT_HOVERED"),null==(t=e.target)||t.removeEventListener("pointerleave",P)},[]),I=T$4((e,t=!1)=>{let i="button"===e.target.type;if(isMouse(e)&&i||t){h("HOVERED");let t=i?e.target:e.currentTarget;null==t||t.addEventListener("pointerleave",P)}},[P]),C=T$4(e=>{isFocusedByKeyboard(e)&&(f("FOCUSED"),E())},[E]),M=T$4(e=>{f("NOT_FOCUSED")},[]),R=T$4(e=>{u(t=>e===t?"CLOSED":e)},[]);p$6(()=>{("PLAYING"===i||"PAUSED"===i)&&_()},[i,_]),p$6(()=>{"CLOSED"===c&&_()},[c,_]),p$6(()=>()=>{window.clearTimeout(t.current)},[]);let k=F$4(()=>({controlsVisibility:o,showControlsTemporarily:_,showControlsPermanently:E,fadeControlsAway:T,hideControls:w,toggleControlsVisibility:A,allowControlsRendering:s,setAllowControlsRendering:l,menuState:c,setMenuState:u,onControlsElementEnter:I,onControlsElementFocus:C,onControlsElementBlur:M,toggleMenu:R,isControlsFocused:"FOCUSED"===p}),[o,_,E,T,w,A,s,c,I,C,M,R,p]);return o$i(ControlsVisibilityContext.Provider,{value:k,children:e})},useControlsVisibilityContext=()=>q$2(ControlsVisibilityContext),findContinuousRegions=(e,t,i,n)=>{let r=[],o=null,a=e=>{e.endTime-e.startTime>=n&&r.push({startTime:e.startTime,endTime:e.endTime})};for(let n=0;n<e.length;n++){let r=e[n],s=n*t,l=(n+1)*t;r>=i?null===o?o={startTime:s,endTime:l}:o.endTime=l:null!==o&&(a(o),o=null)}return null!==o&&a(o),r};function useHeatmapMostReplayedScenes(e,t,i={}){let{threshold:n=.95,minSceneDuration:r=2}=i;return F$4(()=>{if(!(null!=t&&t.values.length)||e<=0)return null;let{values:i,coveredDuration:o}=t,a=o/i.length,s=Math.max(...i);return findContinuousRegions(i,a,n<=1?n*s:n,r)},[t,e,n,r])}let StreamingButtonBarContext=G$1(null),StreamingButtonBarProvider=StreamingButtonBarContext.Provider;function useStreamingButtonBar(){return q$2(StreamingButtonBarContext)}let RbupVideoCornerbug=({IconComponent:e})=>{let{playerState:{playerStatus:t}}=usePlayerContext(),i="PLAYING"===t,[n,r]=h$3(i);return p$6(()=>{i&&r(!0)},[i]),o$i("div",{class:"cornerbug",children:n&&o$i("div",{"data-rbup-cornerbug":!0,class:"cornerbug__icon",children:o$i(e,{})})})},RbupVideoDefaultCornerbugIcon=x$5(()=>{let[e,t]=h$3(""),[i]=h$3(`cb${v4().replace(/-/g,"")}`),n=`.default-corner-bug.mono *{transition:.4s linear}.default-corner-bug.mono #o_${i}{fill:hsla(0,0%,100%,0)}.default-corner-bug.mono #b_${i}{fill:#fff}.default-corner-bug.mono #s1_${i} stop:first-child{stop-color:#fff}.default-corner-bug.mono #s1_${i} stop:nth-child(2){stop-color:hsla(0,0%,100%,.64)}.default-corner-bug.mono #s1_${i} stop:nth-child(3){stop-color:hsla(0,0%,100%,0)}.default-corner-bug.mono #s2_${i} stop:first-child{stop-color:#fff}.default-corner-bug.mono #s2_${i} stop:nth-child(2){stop-color:hsla(0,0%,100%,0)}.default-corner-bug.mono #s4_${i} stop{stop-color:#fff}.default-corner-bug.mono #s4_${i} stop:first-child{stop-color:hsla(0,0%,100%,.55)}.default-corner-bug.mono #s31_${i} stop,.default-corner-bug.mono #s32_${i} stop,.default-corner-bug.mono #s33_${i} stop,.default-corner-bug.mono #s34_${i} stop{stop-color:hsla(0,0%,100%,.4)}`,r=o$i("svg",{"data-rbup-default-cornerbug":!0,xmlns:"http://www.w3.org/2000/svg",class:`default-corner-bug ${i} ${e}`,viewBox:"0 0 397.44 222.14",children:[o$i("style",{children:n}),o$i("defs",{children:[o$i("linearGradient",{id:`s1_${i}`,x1:"234",y1:"111",x2:"464",y2:"13",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:".23","stop-color":"#f2940a"}),o$i("stop",{offset:".52","stop-color":"#f2940a"}),o$i("stop",{offset:"1","stop-color":"#f2940a"})]}),o$i("linearGradient",{id:`s2_${i}`,x1:"209",y1:"87",x2:"426",y2:"87",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0","stop-color":"#FAD50A"}),o$i("stop",{offset:".92","stop-color":"#FAD50A"})]}),o$i("linearGradient",{id:`s31_${i}`,x1:"221",y1:"163",x2:"379",y2:"129",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:".35","stop-color":"#52bce8"}),o$i("stop",{offset:".78","stop-color":"#3977AB"}),o$i("stop",{offset:"1","stop-color":"#21336e"})]}),o$i("linearGradient",{id:`s32_${i}`,x1:"355",y1:"129",x2:"379",y2:"124",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0","stop-color":"#3a78ac"}),o$i("stop",{offset:".86","stop-color":"#253e78"}),o$i("stop",{offset:"1","stop-color":"#21336e"})]}),o$i("linearGradient",{id:`s33_${i}`,x1:"227",y1:"203",x2:"315",y2:"203",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:".54","stop-color":"#52bce8"}),o$i("stop",{offset:"1","stop-color":"#49a4d3"})]}),o$i("linearGradient",{id:`s34_${i}`,x1:"285",y1:"206",x2:"367",y2:"194",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:".24","stop-color":"#52bce8"}),o$i("stop",{offset:"1","stop-color":"#3f88b9"})]}),o$i("linearGradient",{id:`s4_${i}`,x1:"219",y1:"160",x2:"399",y2:"160",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0","stop-color":"#1885c8"}),o$i("stop",{offset:".73","stop-color":"#1e4475"}),o$i("stop",{offset:"1","stop-color":"#22183d"})]})]}),o$i("path",{id:`o_${i}`,fill:"#fff",d:"M223.74 174.22c5.18-1.22 9.91-4 15.21-3.57 8.76 1.35 12.91-.36 19.6-4.69 4.91 2.81 10.74 8.67 22.72 8.54 3.85.25 8.32-1.65 7.42-5.72-.24-3.53 6.68-2 7.12-6.5.77-2.69.2-2.58-4-5.11-7-3.83-6.88-11.15-12.15-15.89-.58-.69-2.29-1.93-2.34-2.8-17.57-47.55 3.14-31.32-36.76-76.19-11.35-8.42-27.94-27.78-42.68-26.63-13.38.43-16.77 8-26.63 11.21-12.44 4.41-19.9 5.67-29.91 15-6.48 5.44-15.09-1.28-24.3 8.41-19.51 19.67-21.7 1.18-53.73 26.18-16.56 14.38-39.44 4-21-14.49 9.35-6.67 21.19-14.88 16.82-27.62-1.48-9.54-15.19-12.18-23.83-13.55-
15-1-13.54-7.57-16.36-9.35-8.46 9.49-4.23 31.42 14 33.65a1.49 1.49 0 011.4 1.4 2.83 2.83 0 01-.46 1.87C20.81 78.66 18 82.86 17.54 94.55c-1 16 12.19 28.12 29 27.57a53.25 53.25 0 008-.47c.46 0 .93 0 .93.47 1.32 7.23 1.88 16.07 4.21 18.7.46.93.46 1.87-.47 2.33-5.35 5.26-16.75-.67-19.63 8.88-1.79 3.9-1.36 8.75-5.6 10.75-3-.66-3.8-5.1-7.95-5.14s-11 3.06-14 9.82c-3.2 2.19-6.44.7-7.94 5.6-.68-.05-1.05 2.59-.93 3.74a13.49 13.49 0 01-1.87 6.08c-3.08 3.89.26 8.65 5.14 9.35 3.61.28 5.89 1.7 7 .46.46 0 .46-.46.93-.46 1-.95 1.77-.26 2.8 0 2.08.11 5.1 1.73 7.48 1.4a1.71 1.71 0 011.4.47c7-.06 9.22-2.85 11.68-6.55-.13-1.66 1.2-2.8 1.87-4.2.64-.67 1.1-1 1.87-.94 1.21.35 4 .76 4.68.94 10.7.94 13.5-10 22-11.22 2.1 0 6 .41 14.48 1.4 5.56.44 11-3.6 16.36-6.54 2.4-1.2 4.49-1.87 6.54-4.68 2.52-2 5.55-14.34 8.88-14.48 6.83-.14 13.29-2.38 20.09-2.34 8.35-.37 16.84 1.95 24.3-.93.28.1 1.92-.25 2.34.46 1.06 1.57 4.05 2.27 3.27 4.21 0 .47-.94.93-1.4 1.4-1.54 0-3.78.12-5.14 1.87-.68.62-2.58.8-3.28 0-4.47.4-17.12-1.47-18.69 5.14 1.19 5.12 5.4 17.94 14 16.83.47 0 1.4.46 1.4.93 3.27 6.54 8.88 10.75 14 10.75s17.86-4.57 27.57-9.35H197c5.93-.55 8.3-2.14 11.68-8.88 4.49-4.48.86 9.17 15.1 6.32zm-9-30.13c-1.4 1.4-2.8 1.87-4.67 4.67-3.27-1.4-3.74-5.61-4.2-7.48 2.8-.46 8.87-1.87 12.15-2.33-1.88 1.87-2.82 2.8-3.29 5.14z"}),o$i("path",{id:`b_${i}`,fill:"#db0a40",d:"M287.63 159.51c-6.07-3.27-8.41-10.28-12.15-15.42-9.78-10.12-11.44-27.43-14-41.6-2.58-13.76-14.33-23.94-22.48-34.58-7.23-5.9-26.1-23.78-35-26.64-11.75-4.89-22 4.35-31.78 8.88-7.94 3.27-16.35 4.2-23.36 10.28-11 14.12-17.61 2.82-30.38 14-19 19.92-26.2 2.39-52.33 25.71-7 4.2-13.55 8.41-22 7.94-13.43-.63-18-18.68-7.48-26.64C44 73.24 62 64.81 53.05 51.55c-9.3-8.29-20.24-4.76-31.3-14-5.1 8 1.42 18.85 9.81 21.5C35 61.19 43 57.78 44.64 62.76c-3.54 7.09-13.21 10.93-17.75 17.77C15.58 93.59 26.75 115 42.77 116c5.92 1.92 13.47-2.92 17.29-.93.47 4.67 0 8.88.94 13.09.43 4.6 5.67 9.54 2.8 14a23.58 23.58 0 01-16.8 5.67c-3.19 3.67-3.73 7.84-5.61 12.15-2.33 4.2-7 6.07-10.28 7.94-2.16 3.29-4.31 6.93-8.88 7.48-2.8 3.27-3.27 7.48-4.2 11.69 11.69 3.09 14.19 1.52 20.56-8.42 2.34-2.33 5.61-.46 7.94 0 6.64-.79 11.59-5.23 16.36-9.34 17-4.45 16.84 6.69 36.44-6.08 3.28-1.4 4.68-5.14 6.08-7.95 1.64-3.13 6.17-9.16.47-10.74-14.67 29.7-40.21 5.53-59.82 28-3 .83-.67-3.84 0-4.68 14.07-20.5 46.07-2.45 57-29 1.92-4.08.83-20.34 5.61-20.1.47 0 1.87.47 1.87 1.4-4.54 19.82-1.54 25.97 19.62 22.5 7.24-2.1 28 5.29 27.57-4.67 0-1.87-1.87-2.8 0-4.2.46-.47 1.87 0 2.33.46 1.32 8 8.34 13.87 15 17.3 13.43 9.14 8 21.07-7.48 20.56-5.14-2.8-6.54-7.95-10.28-12.15-4.37-3.83-10.34-2-15.42-.94-2.52 3.81 3.47 8.35 4.67 12.16 2.34 1.4 5.61-.94 7.48 1.86s2.8 5.61 5.61 7.48c8.1 7.77 25-5.88 33.64-6.54 7.55.82 11-6.06 13.55-11.69 4.26-7.78-7.07-15.47-7.94-22.43-2.58-.71-6-2.73-7.95 0 1.43 3.48 9.45 16.21 8.88 20.1-1.05 2.81-3.43 9.33-7 8.88.94-3.27 2.34-7 2.34-10.75-1.7-4-9.21-15.55-9.81-19.63 1.49-3.95 9.16-1.66 12.14-5.61 3.28-5.14 4.21-10.28 5.15-16.82a2.1 2.1 0 011.4-1.41c4.55 2.93-.08 17-2.81 20.1-.26 4.84 9.28 1.6 11.22 0 3.61.75 10.93-2.85 12.61-.47a25.39 25.39 0 00-4.67 9.35c-2.8 3.27-7.47 5.61-7.47 10.28.51 2.94 4.46-1.8 4.67 1.87-4.07 5.17-3.56 6.42-2.34 12.15 4.27 6 12.43 1.06 17.76-.46 9-3.53 19.13 2.06 26.17-7.48a6.2 6.2 0 014.67 2.8 25.73 25.73 0 0020.09 7.95c3.06-2.13-3.63-3.8-4.67-4.68-3.27-1.87-7.48-4.67-8.41-8.41-1.23-5.22-5-10-7.48-14.95 10.91.16 12.06 22.95 28 19.63.78-.54.7-1.12.47-1.87zm-78.5-70.57c-.47.47-.94.47-1.87.47-1.25-4.72-1.69-9.65-4.21-13.56-1.31-1.28-3-2.95-1.87-5.14a2.23 2.23 0 012.81-.47c4.28 3.2 5 7.66 5.14 13.09.93.93.46 3.74 0 5.61m38.31 65.9a27.85 27.85 0 01-6.54.93h-.46c-2.77-2.55 3-7.64 6.07-7.48h1.4c1.71.71 1.27 5.22-.47 6.55m12.15-27.11c-.52.91-1.32 3.29-2.33 3.27s-1.45.15-1.4-.93c-.09-3.14-.6-7-3.28-8.88-6.1-9.49-7.64 2.4-9.81.93-1.3-2.64.75-5.63 1.87-7.94.52-.63.73-1.36 1.4-1.87 1-5.75 6.25-2.47 7.48.93 3.22 4 7 8.51 6.54 13.09-.47-.47-.47.47-.47 1.4m-236.91 43c3.27-1.87 5.14-5.14 6.54-7.95-1-1.57-2.22-3.64-4.67-2.8a60.5 60.5 0 01-7 4.67c-1.17 3.18 1.75 7.18 5.14 6.08m-10.28 0c-5.55 2.27-2.61 9.11-6.07 12.62 0 .46-.94 1.4 0 1.87 2.33.46 4.2 1.4 7 1.87 1.25-4.18 2.46-8.83 3.27-12.62-.94-1.41-2.34-3.27-4.21-3.74m151.4-10.28c1.87 2.33 1.87 5.6 4.21 7.47a10.05 10.05 0 007.94-2.33c1.4-.94-.47-2.34-.93-3.74-1.41-1.87-.47-5.61-3.74-5.61-3.54.82-7.42-.2-10.75.93 0 1.41 2.8 1.41 3.27 3.28"}),o$i("path",{d:"M392.8 128.62c-.23-7.73-3.35-16.12-8.57-21.63l-.24-.28c-2.67 10.55-6.5 19.86-17.5 36.63-4.23 6.42-11.74 6.7-16.39 12.59-1.1-.6-.78-1.42-2.2.1 5.86-6.3-.84-3.06 1.9-6.09 10.22-11.3 19.58-2
11.48 23.54-36.73-1.67 2.09-2.68 2.74-4.36 4.86 1.9-6.49 3.38-12 4.79-18.66l-1.8-.72c-6.27 21.19-16.62 39.73-35.56 52.45-24.6 17.88-3.83 11.9.31 8.2-31 31.65-99.62 52-139.06 19.8 5.76 5.61 12.83 11.88 19.55 16-4.09-.7-7-3.87-10.86-5.08.06.13 9.38 12.26 37.2 15.44 1.79.2 3.5.38 5.15.53 37.93 3 40.24-3.79 66.71-9.39 1.19.51-8.53 5.53-21.9 9.31-21.11 7.72-45.62 2-63.51.14h.08c.41.2 3.19 1.48 17.42 6.57-1 .36-5.65 1-25.05-7.32 47.6 27.45 98.83 6.67 140.89-24.52 0 .14-.06.34-.06.51.37.06.84.12 1.22.15-.23.67-.23.67-3.49 4.56 7.1-5.73 10.74-14.62 18.26-20-3.85 7.73-8.77 13.27-17.93 22.23a24 24 0 002-1.71c-13.85 12.94-32.12 25.78-60.47 32.52a38.9 38.9 0 006.07-1.2c-3.59 1-3.69 1.12-5.21 1.62.94-.12.94-.12 5.83-1.11-2.85 1.4-6.14 2.07-14.1 3.69 47.19-7.48 96.27-44.2 97.34-93.46z",fill:`url(#s4_${i})`}),o$i("path",{d:"M345.37 192.75c-18.7 11.9-39.39 22.28-62.5 24.93 27.8 1 60.79-19.13 78.76-35.62-5.38 3.6-10.76 7.22-16.26 10.69z",fill:`url(#s34_${i})`}),o$i("path",{d:"M315.39 196.71c-26.65 5.6-28.16 12.29-66.29 9.44-3 .91-18.85-.05-21.47-.9.13 0 1.36.53 2.42.95h-.07c4-.5 30.37 5.12 38.79 4 10.93.74 45.23-9.45 46.62-13.49z",fill:`url(#s33_${i})`}),o$i("path",{d:"M374.69 99.86l-.94-.41c-1.42 6.62-2.89 12.16-4.79 18.65 1.68-2.12 2.69-2.77 4.36-4.86-4 15.25-13.32 25.43-23.54 36.73-2.74 3 4-.21-1.9 6.09 1.42-1.52 1.1-.7 2.2-.1 4.64-5.89 12.16-6.17 16.39-12.59 11-16.78 14.83-26.08 17.49-36.63a3.33 3.33 0 01.25.28 30.86 30.86 0 00-9.52-7.16z",fill:`url(#s32_${i})`}),o$i("path",{d:"M249.18 182.88c-17.52-9.88-4.82-3.31 10.53.3a113 113 0 0034.4 3c18.28-7 33.9-17.17 42.58-26.82-4.16 3.8-24.73 9.49-.3-8.2 18.92-12.72 29.29-31.24 35.54-52.42a69.27 69.27 0 00-15.17-3.7c-7.32 17.41-8.41 29.5-24.63 39.12-18.1 11.78-6.77 8.76-6.59 8.67a20.1 20.1 0 004-2.14c-7 11.2-19.18 18.35-33.7 21.58-.46 4.52-7.39 3-7.12 6.5.89 4.07-3.57 6-7.42 5.72-12 .13-17.81-5.73-22.72-8.54-7.66 5.08-11.26 5.73-20.9 4.66-4.79.07-9.16 2.5-13.91 3.6 6.8 6.08 36.08 13.9 25.41 8.67zm92.35-48.5c3.05-6.65 10.13-10.22 12.46-18.25-.34 1.18 2.19 1.67 3.19 1.67 4-.68 4.1-6.16 5.39-7.3-1 12.45-9.45 22.65-18.69 31.09a4.18 4.18 0 00-4-.18c-.39-2.34 4.68-5.6 1.65-7.03z",fill:`url(#s31_${i})`}),o$i("path",{d:"M358 61.05c-11.74-6.68-25-8.24-37.47-13.2 18.76 4 41.07 8.07 54.94 22.11.22.11.74.62 1 .69 1.2.81 2.57 3.68 4.24 2.62-29.1-56.79-117.5-50.47-159.56-27.18 2.29 1.76 4.81 3.83 7.16 5.83 8-6.48 40.45-11 43.31-10.56-10.84 2.17-28.8 8.69-39.71 13.58l1.53 1.29c22.26-7.83 56.14-13.29 80.15-7.53-19.19 2.13-53.4 1.84-76.16 10.9 6.25 4.73 11.82 13.34 17.19 19.66 37.13-18.11 58.55-18.7 77.33-16.33 1.8 1-13.32 1.63-9.65 2.74 4.08.94 11.73-1.32 13.5-1.55 1.15-.37 8.37-.13 10.65.3 8.68 2.11.54 3.21-2.49 2.5a22.44 22.44 0 00-4.48.09c-3.35.63-7.4 1.37-10.74 1.87-.9.15-11.09-.12-9.54 1.2 1.95-.13 10.53 1.42 12.74 1.16 1.33-.3 2.68.15 3.94-.53.62-.43 3.16-.74 3.27.32-2.89 6.44-11.67 1.61-18.28 3-5.89.44-12.14 3.07-13.2 2.15 19.32-11.75-27.61 5.71-26.82 8.68a.29.29 0 00.16 0c.14 2.63 7.51-1.2 9-.92 3.23-.25 7.6-2.26 10.75-3 2.36 0 3.29 1.18 5.64.66 5.16-.09 9.82-2.31 14.8-3.29.44 0 3.55 1.31 3.4 1.67 9.38 8.41 14.33 1.4 24.62 4.17 1.64.22-.3 1.28-.86 1.61-5.43 3.82-11.88 4.41-18.17 4.87a5.69 5.69 0 00-3.08.5c-2.07-.16-4 1-6.07.69-5.89.12-11.71 1-17 3.69-2 .39-4.27.71-5.76 2.2-1.52 1.23-3.81.76-5.15 2.14-2.28 1.37-19.48 5-17.54 8.53h-.1.1a1 1 0 010 .23c28.41-4.06 62.28-24.09 98.11-9.09 14.75 7.51 23 20.57 17.12 45.81.05-.12.69-1.8.68-1.87l-.11.08c1.67-5.89 3.2-10.95 3.16-16.91C398.4 104.84 381.86 74 358 61.05zm-33.62-21.32c5.21 1.17 14.76 2.91 17.88 6.2-8.19-.09-12.25-3.63-12.12-3.54-1.57-.48-6.5-2.24-5.76-2.66z",fill:`url(#s2_${i})`}),o$i("path",{d:"M231.79 54.85L228.37 52c8.15-6.68 40-10.94 43.23-10.61a105.52 105.52 0 00-14.14 3.9c-8.46 2.77-17.78 6.23-25.67 9.56zm165.42 46c-5-37.33-17.74-70.1-63.13-82.14 28.07 6.81 30.18 10.32 33.84 12.75C346.12 11.25 311 4.22 275.5 10.27c20.7-6.71 54.72-5.89 76 7.31C300.74-13.85 239.73-.26 202.22 35.63c7 1.36 13.15 6 18.86 10.42 42.57-23.22 130.42-29.58 159.64 27.22-1.68 1.06-3-1.8-4.24-2.62-.23-.07-.75-.58-1-.69-13.88-14-36.16-18.14-54.94-22.11 12.53 5 25.73 6.52 37.47 13.2 30.63 
117.62 44 53.33 33.4 82.42l.11-.08a108.25 108.25 0 005.69-42.53zM294 46.26c-19.42 0-44 3.66-60.55 10l3.88 3.28c19.77-7.54 53-9.45 69.26-10.07 17.61-.54-6.15-3.15-12.59-3.21zm36.13-3.87c-.32-.17 4.07 3.5 12.12 3.54-3.15-3.3-12.65-5-17.89-6.2-.72.42 4.21 2.18 5.78 2.66z",fill:`url(#s1_${i})`})]});return p$6(()=>{setTimeout(()=>{t("mono")},3e3)},[]),r}),dashToPascalCase=e=>e.toLowerCase().split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(""),isEventProp=e=>0===e.indexOf("on")&&e[2]===e[2].toUpperCase(),normalizeEventPropName=e=>`on${e[2].toLowerCase()}${e.substring(3)}`,camelToKebabCase=e=>e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),possibleStandardNames={acceptCharset:"accept-charset",accessKey:"accesskey",allowFullScreen:"allowfullscreen",autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",cellPadding:"cellpadding",cellSpacing:"cellspacing",charSet:"charset",className:"class",classID:"classid",colSpan:"colspan",contentEditable:"contenteditable",contextMenu:"contextmenu",controlsList:"controlslist",crossOrigin:"crossorigin",dateTime:"datetime",defaultChecked:"defaultchecked",defaultValue:"defaultvalue",disablePictureInPicture:"disablepictureinpicture",disableRemotePlayback:"disableremoteplayback",encType:"enctype",enterKeyHint:"enterkeyhint",fetchPriority:"fetchpriority",htmlFor:"for",formMethod:"formmethod",formAction:"formaction",formEncType:"formenctype",formNoValidate:"formnovalidate",formTarget:"formtarget",frameBorder:"frameborder",hrefLang:"hreflang",httpEquiv:"http-equiv",imageSizes:"imagesizes",imageSrcSet:"imagesrcset",inputMode:"inputmode",itemID:"itemid",itemProp:"itemprop",itemRef:"itemref",itemScope:"itemscope",itemType:"itemtype",keyParams:"keyparams",keyType:"keytype",marginWidth:"marginwidth",marginHeight:"marginheight",maxLength:"maxlength",mediaGroup:"mediagroup",noModule:"nomodule",noValidate:"novalidate",playsInl
1ine:"playsinline",radioGroup:"radiogroup",readOnly:"readonly",referrerPolicy:"referrerpolicy",rowSpan:"rowspan",spellCheck:"spellcheck",srcDoc:"srcdoc",srcLang:"srclang",srcSet:"srcset",tabIndex:"tabindex",useMap:"usemap",accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",attributeName:"attributename",attributeType:"attributetype",autoReverse:"autoreverse",baseFrequency:"basefrequency",baselineShift:"baseline-shift",baseProfile:"baseprofile",calcMode:"calcmode",capHeight:"cap-height",clipPath:"clip-path",clipPathUnits:"clippathunits",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentscripttype",contentStyleType:"contentstyletype",diffuseConstant:"diffuseconstant",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",externalResourcesRequired:"externalresourcesrequired",fillOpacity:"fill-opacity",fillRule:"fill-rule",filterRes:"filterres",filterUnits:"filterunits",floodOpacity:"flood-opacity",floodColor:"flood-color",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",gradientTransform:"gradienttransform",gradientUnits:"gradientunits",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",kernelMatrix:"kernelmatrix",kernelUnitLength:"kernelunitlength",keyPoints:"keypoints",keySplines:"keysplines",keyTimes:"keytimes",lengthAdjust:"lengthadjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingconeangle",markerEnd:"marker-end",markerHeight:"markerheight",markerMid:"marker-mid",markerStart:"marker-start",markerUnits:"markerunits",markerWidth:"markerwidth",maskContentUnits:"maskcontentunits",maskUnits:"maskunits",numOctaves:"numoctaves",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathlength",patternContentUnits:"patterncontentunits",patternTransform:"patterntransform",patternUnits:"patternunits",pointerEvents:"pointer-events",pointsAtX:"pointsatx",pointsAtY:"pointsaty",pointsAtZ:"pointsatz",preserveAlpha:"preservealpha",preserveAspectRatio:"preserveaspectratio",primitiveUnits:"primitiveunits",refX:"refx",refY:"refy",renderingIntent:"rendering-intent",repeatCount:"repeatcount",repeatDur:"repeatdur",requiredExtensions:"requiredextensions",requiredFeatures:"requiredfeatures",shapeRendering:"shape-rendering",slot:"slot",specularConstant:"specularconstant",specularExponent:"specularexponent",spreadMethod:"spreadmethod",startOffset:"startoffset",stdDeviation:"stddeviation",stitchTiles:"stitchtiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeWidth:"stroke-width",strokeOpacity:"stroke-opacity",suppressContentEditableWarning:"suppresscontenteditablewarning",suppressHydrationWarning:"suppresshydrationwarning",surfaceScale:"surfacescale",systemLanguage:"systemlanguage",tableValues:"tablevalues",targetX:"targetx",targetY:"targety",textAnchor:"text-anchor",textDecoration:"text-decoration",textLength:"textlength",textRendering:"text-rendering",transformOrigin:"transform-origin",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xChannelSelector:"xchannelselector",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlnsXlink:"xmlns:xlink",yChannelSelector:"ychannelselector",zoomAndPan:"zoomandpan"};function createPreactComponent({tagName:e,defaultProps:t,defineCustomElement:i}){void 0!==i&&i();let n=i=>y$4(e,{...Object.entries({...t,...i}).reduce((e,[t,i])=>{if("dangerouslySetInnerHTML"===t)return{...e,[t]:i};if(isEventProp(t))return{...e,[`${normalizeEventPropName(t)}`]:i};let n=possibleStandardNames[t];return n?{...e,[n]:i}:{...e,[camelToKebabCase(t)]:i}},{})});return n.displayName=`${dashToPascalCase(e)}`,n}let versionSuffix="14-2-1",tagPrefixes=["cosmos-"],isScopedTag=e=>tagPrefixes.some(t=>e.startsWith(t)),transformScopedTag=e=>!isScopedTag(e)||e.endsWith(`-${versionSuffix}`)?e:`${e}-${versionSuffix}`,t$4="cosmos-scoped-web",e$2=!1,n$4="hydrated",o$g=!0,l$9=!0,s$3=!0;var r$h=(e=>(e.Undefined="undefined",e.Null="null",e.String="string",e.Number="number",e.SpecialNumber="number",e.Boolean="boolean",e.BigInt="bigint",e))(r$h||{}),i$6=(e=>(e.Array="array",e.Date="date",e.Map="map",e.Object="object",e.RegularExpression="regexp",e.Set="set",e.Channel="channel",e.Symbol="symbol",e))(i$6||{}),c$a="type",a$b="value",f$5="serialized:";function getPropertyDescriptor(e,t,i){let n="u">typeof HTMLElement?HTMLElement.prototype:null;for(;e&&e!==n;){let n=Object.getOwnPropertyDescriptor(e,t);if(n&&(!i||n.get))return n;e=Object.getPrototypeOf(e)}}var u$3,reWireGetterSetter=(e,t)=>{var i;Object.entries(null!=(i=t.t.o)?i:{}).map(([i,[n]])=>{if(31&n||32&n){let n=e[i],r=getPropertyDescriptor(Object.getPrototypeOf(e),i,!0)||Object.getOwnPropertyDescriptor(e,i);r&&Object.defineProperty(e,i,{get(){return r.get.call(this)},set(e){r.set.call(this,e)},configurable:!0,enumerable:!0}),t.l.has(i)?e[i]=t.l.get(i):void 0!==n&&(e[i]=n)}})},getHostRef=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},isMemberInElement=(e,t)=>
1t in e,consoleError=(e,t)=>(0,console.error)(e,t),d$4=new Map,p$5="s-id",$$1="sty-id",v$2="c-id",m$5="http://www.w3.org/1999/xlink",y$2="u">typeof window?window:{},b$3=y$2.HTMLElement||class{},g$4={i:0,u:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,i,n)=>e.addEventListener(t,i,n),rel:(e,t,i,n)=>e.removeEventListener(t,i,n),ce:(e,t)=>new CustomEvent(e,t)},w$3=(()=>{var e;let t=!1;try{null==(e=y$2.document)||e.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=!0}}))}catch{}return t})(),S$2=(()=>{try{return!!y$2.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof new CSSStyleSheet().replaceSync)}catch{}return!1})(),j$2=!!S$2&&!!y$2.document&&Object.getOwnPropertyDescriptor(y$2.document.adoptedStyleSheets,"length").writable,O$2=!1,N$2=[],k$2=[],queueTask=(e,t)=>t=>{e.push(t),O$2||(O$2=!0,4&g$4.i?nextTick$1(flush):g$4.raf(flush))},consume=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){consoleError(e)}e.length=0},flush=()=>{consume(N$2),consume(k$2),(O$2=N$2.length>0)&&g$4.raf(flush)},nextTick$1=e=>Promise.resolve(void 0).then(e),x$4=queueTask(k$2);function createShadowRoot(e){let t=this.attachShadow({mode:"open"});void 0===u$3&&(u$3=null),u$3&&(j$2?t.adoptedStyleSheets.push(u$3):t.adoptedStyleSheets=[...t.adoptedStyleSheets,u$3])}var updateFallbackSlotVisibility=e=>{let t=internalCall(e,"childNodes");e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&"SLOT-FB"!==e.tagName&&getHostSlotNodes(t,e.tagName).forEach(e=>{1===e.nodeType&&"SLOT-FB"===e.tagName&&(getSlotChildSiblings(e,getSlotName(e),!1).length?e.hidden=!0:e.hidden=!1)});let i=0;for(i=0;i<t.length;i++){let e=t[i];1===e.nodeType&&internalCall(e,"childNodes").length&&updateFallbackSlotVisibility(e)}};function getHostSlotNodes(e,t,i){let n,r=0,o=[];for(;r<e.length&&(!(n=e[r])["s-sr"]||t&&n["s-hn"]!==t||void 0!==i&&getSlotName(n)!==i||(o.push(n),void 0===i));r++)o=[...o,...getHostSlotNodes(n.childNodes,t,i)];return o}var getSlotChildSiblings=(e,t,i=!0)=>{let n=[];(i&&e["s-sr"]||!e["s-sr"])&&n.push(e);let r=e;for(;r=r.nextSibling;)getSlotName(r)!==t||!i&&r["s-sr"]||n.push(r);return n},isNodeLocatedInSlot=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,addSlotRelocateNode=(e,t,i,n)=>{if(e["s-ol"]&&e["s-ol"].isConnected)return;let r=document.createTextNode("");if(r["s-nr"]=e,!t["s-cr"]||!t["s-cr"].parentNode)return;let o=t["s-cr"].parentNode,a=internalCall(o,"appendChild");if(void 0!==n){r["s-oo"]=n;let e=internalCall(o,"childNodes"),t=[r];e.forEach(e=>{e["s-nr"]&&t.push(e)}),t.sort((e,t)=>!e["s-oo"]||e["s-oo"]<(t["s-oo"]||0)?-1:+(!t["s-oo"]||t["s-oo"]<e["s-oo"])),t.forEach(e=>a.call(o,e))}else a.call(o,r);e["s-ol"]=r,e["s-sh"]=t["s-hn"]},getSlotName=e=>"string"==typeof e["s-sn"]?e["s-sn"]:1===e.nodeType&&e.getAttribute("slot")||void 0;function patchSlotNode(e){if(e.assignedElements||e.assignedNodes||!e["s-sr"])return;let t=t=>(function(e){let i=[],n=this["s-sn"];null!=e&&e.flatten&&console.error(`
2          Flattening is not supported for Stencil non-shadow slots.
3          You can use \`.childNodes\` to nested slot fallback content.
4          If you have a particular use case, please open an issue on the Stencil repo.
5        `);let r=this["s-cr"].parentElement;return(r.__childNodes?r.childNodes:(e=>{let t=[];for(let i=0;i<e.length;i++){let n=e[i]["s-nr"]||void 0;n&&n.isConnected&&t.push(n)}return t})(r.childNodes)).forEach(e=>{n===getSlotName(e)&&i.push(e)}),t?i.filter(e=>1===e.nodeType):i}).bind(e);e.assignedElements=t(!0),e.assignedNodes=t(!1)}function internalCall(e,t){if("__"+t in e){let i=e["__"+t];return"function"!=typeof i?i:i.bind(e)}return"function"!=typeof e[t]?e[t]:e[t].bind(e)}var C$2=new WeakMap,registerStyle=(e,t,i)=>{let n=d$4.get(e);S$2&&i?"string"==typeof(n=n||new CSSStyleSheet)?n=t:n.replaceSync(t):n=t,d$4.set(e,n)},addStyle=(e,t,i)=>{var n,r,o;let a=getScopeId(t),s=d$4.get(a);if(!y$2.document)return a;
5if(e=11===e.nodeType?e:y$2.document,s)if("string"==typeof s){e=e.head||e;let i,o=C$2.get(e);o||C$2.set(e,o=new Set);let l=e.querySelector(`[${$$1}="${a}"]`);if(l)l.textContent=s;else if(!o.has(a)){(i=y$2.document.createElement("style")).textContent=s;let l=null!=(n=g$4.p)?n:function(e){var t,i,n;return null!=(n=null==(i=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:i.getAttribute("content"))?n:void 0}(y$2.document);if(null!=l&&i.setAttribute("nonce",l),!(1&t.i))if("HEAD"===e.nodeName){let t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(i,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(S$2){let t=new(null!=(r=e.defaultView)?r:e.ownerDocument.defaultView).CSSStyleSheet;t.replaceSync(s),j$2?e.adoptedStyleSheets.unshift(t):e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{let t=e.querySelector("style");t?t.textContent=s+t.textContent:e.prepend(i)}else e.append(i);1&t.i&&e.insertBefore(i,null),4&t.i&&(i.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),o&&o.add(a)}}else{let t=C$2.get(e);if(t||C$2.set(e,t=new Set),!t.has(a)){let i,n=null!=(o=e.defaultView)?o:e.ownerDocument.defaultView;if(s.constructor===n.CSSStyleSheet)i=s;else{i=new n.CSSStyleSheet;for(let e=0;e<s.cssRules.length;e++)i.insertRule(s.cssRules[e].cssText,e)}if(j$2?e.adoptedStyleSheets.push(i):e.adoptedStyleSheets=[...e.adoptedStyleSheets,i],t.add(a),"host"in e){let t=e.querySelector(`[${$$1}="${a}"]`);t&&x$4(()=>t.remove())}}}return a},getScopeId=(e,t)=>"sc-"+e.$,isComplexType=e=>"object"==(e=typeof e)||"function"===e,h$2=(e,t,...i)=>{"string"==typeof e&&(e=transformTag(e));let n=null,r=null,o=null,a=!1,s=!1,l=[],c=t=>{for(let i=0;i<t.length;i++)Array.isArray(n=t[i])?c(n):null!=n&&"boolean"!=typeof n&&((a="function"!=typeof e&&!isComplexType(n))&&(n=String(n)),a&&s?l[l.length-1].h+=n:l.push(a?newVNode(null,n):n),s=a)};if(c(i),t){t.key&&(r=t.key),t.name&&(o=t.name);{let e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter(t=>e[t]).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,l,A$2);let u=newVNode(e,null);return u.v=t,l.length>0&&(u.m=l),u.S=r,u.j=o,u},newVNode=(e,t)=>({i:0,O:e,h:t??null,N:null,m:null,v:null,S:null,j:null}),T$2={},A$2={forEach:(e,t)=>
5e.map(convertToPublic).forEach(t),map:(e,t)=>e.map(convertToPublic).map(t).map(convertToPrivate)},convertToPublic=e=>({vattrs:e.v,vchildren:e.m,vkey:e.S,vname:e.j,vtag:e.O,vtext:e.h}),convertToPrivate=e=>{if("function"==typeof e.vtag){let t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),h$2(e.vtag,t,...e.vchildren||[])}let t=newVNode(e.vtag,e.vtext);return t.v=e.vattrs,t.m=e.vchildren,t.S=e.vkey,t.j=e.vname,t},clientHydrate=(e,t,i,n,r,o,a,s=[])=>{let l,c,u,d;if(1===o.nodeType){if((l=o.getAttribute(v$2))&&((c=l.split("."))[0]===a||"0"===c[0])){u=createSimpleVNode({i:0,k:c[0],C:c[1],T:c[2],A:c[3],O:o.tagName.toLowerCase(),N:o,v:{class:o.className||""}}),t.push(u),o.removeAttribute(v$2),e.m||(e.m=[]);let r=u.N.getAttribute("s-sn");"string"==typeof r&&("slot-fb"===u.O&&addSlot(r,c[2],u,o,e,t,i,n,s),u.N["s-sn"]=r,u.N.removeAttribute("s-sn")),void 0!==u.A&&(e.m[u.A]=u),e=u,n&&"0"===u.T&&(n[u.A]=u.N)}if(o.shadowRoot)for(d=o.shadowRoot.childNodes.length-1;d>=0;d--)clientHydrate(e,t,i,n,r,o.shadowRoot.childNodes[d],a,s);let h=o.__childNodes||o.childNodes;for(d=h.length-1;d>=0;d--)clientHydrate(e,t,i,n,r,h[d],a,s)}else if(8===o.nodeType)((c=o.nodeValue.split("."))[1]===a||"0"===c[1])&&(l=c[0],u=createSimpleVNode({k:c[1],C:c[2],T:c[3],A:c[4]||"0",N:o,v:null,m:null,S:null,j:null,O:null,h:null}),"t"===l?(u.N=findCorrespondingNode(o,3),u.N&&3===u.N.nodeType&&(u.h=u.N.textContent,t.push(u),o.remove(),a===u.k&&(e.m||(e.m=[]),e.m[u.A]=u),n&&"0"===u.T&&(n[u.A]=u.N))):"c"===l?(u.N=findCorrespondingNode(o,8),u.N&&8===u.N.nodeType&&(t.push(u),o.remove())):u.k===a&&("s"===l?addSlot(o["s-sn"]=c[5]||"",c[2],u,o,e,t,i,n,s):"r"===l&&(n?o.remove():(r["s-cr"]=o,o["s-cn"]=!0))));else if(e&&"style"===e.O){let t=newVNode(null,o.textContent);t.N=o,t.A="0",e.m=[t]}return e},initializeDocumentHydrate=(e,t)=>{if(1===e.nodeType){let i=e[p$5]||e.getAttribute(p$5);i&&t.set(i,e);let n=0;if(e.shadowRoot)for(;n<e.shadowRoot.childNodes.length;n++)initializeDocumentHydrate(e.shadowRoot.childNodes[n],t);let r=e.__childNodes||e.childNodes;for(n=0;n<r.length;n++)initializeDocumentHydrate(r[n],t)}else if(8===e.nodeType){let i=e.nodeValue.split(".");"o"===i[0]&&(t.set(i[1]+"."+i[2],e),e.nodeValue="",e["s-en"]=i[3])}},createSimpleVNode=e=>({i:0,k:null,C:null,T:null,A:"0",N:null,v:null,m:null,S:null,j:null,O:null,h:null,...e});function addSlot(e,t,i,n,r,o,a,s,l){n["s-sr"]=!0,i.j=e||null,i.O="slot";let c=null!=r&&r.N?r.N["s-id"]||r.N.getAttribute("s-id"):"";if(s&&y$2.document){let o=i.N=y$2.document.createElement(i.O);i.j&&i.N.setAttribute("name",e),r.N.shadowRoot&&c&&c!==i.k?internalCall(r.N,"insertBefore")(o,internalCall(r.N,"children")[0]):internalCall(internalCall(n,"parentNode"),"insertBefore")(o,n),addSlottedNodes(l,t,e,n,i.k),n.remove(),"0"===i.T&&(s[i.A]=i.N)}else{let o=i.N,a=c&&c!==i.k&&r.N.shadowRoot;addSlottedNodes(l,t,e,n,a?c:i.k),patchSlotNode(n),a&&r.N.insertBefore(o,r.N.children[0])}o.push(i),a.push(i),r.m||(r.m=[]),r.m[i.A]=i}var addSlottedNodes=(e,t,i,n,r)=>{var o,a;let s=n.nextSibling;if(e[t]=e[t]||[],s&&!(null!=(o=s.nodeValue)&&o.startsWith("s.")))do!s||(s.getAttribute&&s.getAttribute("slot")||s["s-sn"])!==i&&(""!==i||s["s-sn"]||s.getAttribute&&s.getAttribute("slot")||8!==s.nodeType&&3!==s.nodeType)||(s["s-sn"]=i,e[t].push({slot:n,node:s,hostId:r})),s=null==s?void 0:s.nextSibling;while(s&&!(null!=(a=s.nodeValue)&&a.startsWith("s.")))},findCorrespondingNode=(e,t)=>{let i=e;do i=i.nextSibling;while(i&&(i.nodeType!==t||!i.nodeValue));return i},normalizeWatchers=e=>{if(!e)return;let t=Object.keys(e);if(0===t.length)return;let i=!1;for(let n of t){if(i)break;for(let t of e[n])if("string"==typeof t){i=!0;break}}if(!i)return e;let n={};for(let i of t)n[i]=e[i].map(e=>"string"==typeof e?{[e]:0}:e);return n},M$2=class Ro{static fromLocalValue(e){let t=e[c$a],i=a$b in e?e[a$b]:void 0;switch(t){case"string":case"boolean":return i;case"bigint":return BigInt(i);case"undefined":return;case"null":return null;case"number":return"NaN"===i?NaN:"-0"===i?-0:"Infinity"===i?1/0:"-Infinity"===i?-1/0:i;case"array":return i.map(e=>Ro.fromLocalValue(e));case"date":return new Date(i);case"map":let n=new Map;for(let[e,t]of i){let i="object"==typeof e&&null!==e?Ro.fromLocalValue(e):e,r=Ro.fromLocalValue(t);n.set(i,r)}return n;case"object":let r={};for(let[e,t]of i)r[e]=Ro.fromLocalValue(t);return r;case"regexp":let{pattern:o,flags:a}=i;return new RegExp(o,a);case"set":let s=new Set;for(let e of i)s.add(Ro.fromLocalValue(e));return s;case"symbol":return Symbol(i);default:throw Error(`Unsupported type: ${t}`)}}static fromLocalValueArray(e){return e.map(e=>Ro.fromLocalValue(e))}static isLocalValueObject(e){if("object"!=typeof e||null===e||!e.hasOwnProperty(c$a))return!1;let t=e[c$a];return!!Object.values({...r$h,...i$6}).includes(t)&&("null"===t||"undefined"===t||e.hasOwnProperty(a$b))}};function deserializeProperty(e){return"string"==typeof e&&e.startsWith(f$5)?M$2.fromLocalValue(JSON.parse(function(e){let t=atob(e),i=new Uint8Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);return new TextDecoder().decode(i)}(e.slice(11)))):e}var E$2,L$2,parsePropertyValue=(e,t,i)=>"string"==typeof e&&e.startsWith(f$5)?e=deserializeProperty(e):null==e||isComplexType(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?"string"==typeof e?parseFloat(e):"number"==typeof e?e:NaN:1&t?String(e):e,createEvent=(e,t,i)=>{let n=e;return{emit:e=>emitEvent(n,t,{bubbles:!!(4&i),composed:!!(2&i),cancelable:!!(1&i),detail:e})}},emitEvent=(e,t,i)=>{let n=g$4.ce(t,i);return e.dispatchEvent(n),n}
5,setAccessor=(e,t,i,n,r,o,a)=>{if(i===n)return;let s=isMemberInElement(e,t),l=t.toLowerCase();if("class"===t){let t=e.classList,r=parseClassList(i),o=parseClassList(n);if((e["s-si"]||e["s-sc"])&&a){let i=e["s-sc"]||e["s-si"];o.push(i),r.forEach(e=>{e.startsWith(i)&&o.push(e)}),o=[...new Set(o)].filter(e=>e),t.add(...o)}else t.remove(...r.filter(e=>e&&!o.includes(e))),t.add(...o.filter(e=>e&&!r.includes(e)))}else if("style"===t){for(let t in i)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(let t in n)i&&n[t]===i[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"!==t){if("ref"===t)n&&queueRefAttachment(n,e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){if("a"===t[0]&&t.startsWith("attr:")){let i,r=t.slice(5);{let t=getHostRef(e);if(t&&t.t&&t.t.o){let e=t.t.o[r];e&&e[1]&&(i=e[1])}}return i||(i=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==n||!1===n?!1===n&&""!==e.getAttribute(i)||e.removeAttribute(i):e.setAttribute(i,!0===n?"":n))}if("p"===t[0]&&t.startsWith("prop:")){let i=t.slice(5);try{e[i]=n}catch{}return}{let a=isComplexType(n);if((s||a&&null!==n)&&!r)try{if(e.tagName.includes("-"))e[t]!==n&&(e[t]=n);else{let r=n??"";"list"===t?s=!1:null!=i&&e[t]===r||("function"==typeof e.__lookupSetter__(t)?e[t]=r:e.setAttribute(t,r))}}catch{}let c=!1;l!==(l=l.replace(/^xlink\:?/,""))&&(t=l,c=!0),null==n||!1===n?!1===n&&""!==e.getAttribute(t)||(c?e.removeAttributeNS(m$5,t):e.removeAttribute(t)):(!s||4&o||r)&&!a&&1===e.nodeType&&(n=!0===n?"":n,c?e.setAttributeNS(m$5,t,n):e.setAttribute(t,n))}}else if(t="-"===t[2]?t.slice(3):isMemberInElement(y$2,l)?l.slice(2):l[2]+t.slice(3),i||n){let r=t.endsWith(R$2);t=t.replace(I$2,""),i&&g$4.rel(e,t,i,r),n&&g$4.ael(e,t,n,r)}}},D$2=/\s/,parseClassList=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(D$2):[]),R$2="Capture",I$2=RegExp(R$2+"$"),updateElement=(e,t,i,n)=>{let r=11===t.N.nodeType&&t.N.host?t.N.host:t.N,o=e&&e.v||{},a=t.v||{};for(let e of sortedAttrNames(Object.keys(o)))e in a||setAccessor(r,e,o[e],void 0,i,t.i,n);for(let e of sortedAttrNames(Object.keys(a)))setAccessor(r,e,o[e],a[e],i,t.i,n)};function sortedAttrNames(e){return e.includes("ref")?[...e.filter(e=>"ref"!==e),"ref"]:e}var _$2=!1,P$2=!1,H$2=!1,U$1=!1,W$1=[],F$2=[],createElm=(e,t,i)=>{var n;let r=t.m[i],o,a,s,l=0;if(_$2||(H$2=!0,"slot"===r.O&&(r.i|=r.m?2:1)),null!=r.h)o=r.N=y$2.document.createTextNode(r.h);else if(1&r.i)o=r.N=slotReferenceDebugNode(r),updateElement(null,r,U$1);else{if(U$1||(U$1="svg"===r.O),!y$2.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=r.N=y$2.document.createElementNS(U$1?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!_$2&&o$g&&2&r.i?"slot-fb":r.O),U$1&&"foreignObject"===r.O&&(U$1=!1),updateElement(null,r,U$1),r.m){let t="template"===r.O?o.content:o;for(l=0;l<r.m.length;++l)(a=createElm(e,r,l))&&t.appendChild(a)}"svg"===r.O?U$1=!1:"foreignObject"===o.tagName&&(U$1=!0)}return o["s-hn"]=L$2,3&r.i&&(o["s-sr"]=!0,o["s-cr"]=E$2,o["s-sn"]=r.j||"",o["s-rf"]=null==(n=r.v)?void 0:n.ref,patchSlotNode(o),(s=e&&e.m&&e.m[i])&&s.O===r.O&&e.N&&relocateToHostRoot(e.N)),o},relocateToHostRoot=e=>{g$4.i|=1;let t=e.closest(L$2.toLowerCase());if(null!=t){let i=Array.from(t.__childNodes||t.childNodes).find(e=>e["s-cr"]),n=Array.from(e.__childNodes||e.childNodes);for(let e of i?n.reverse():n)null!=e["s-sh"]&&(insertBefore(t,e,i??null),e["s-sh"]=void 0,H$2=!0)}g$4.i&=-2},putBackInOriginalLocation=(e,t)=>{g$4.i|=1;let i=Array.from(e.__childNodes||e.childNodes);if(e["s-sr"]){let t=e;for(;t=t.nextSibling;)t&&t["s-sn"]===e["s-sn"]&&t["s-sh"]===L$2&&i.push(t)}for(let e=i.length-1;e>=0;e--){let n=i[e];n["s-hn"]!==L$2&&n["s-ol"]&&(insertBefore(referenceNode(n).parentNode,n,referenceNode(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,H$2=!0),t&&putBackInOriginalLocation(n,t)}g$4.i&=-2},addVnodes=(e,t,i,n,r,o)=>{let a,s=e["s-cr"]&&e["s-cr"].parentNode||e;for(s.shadowRoot&&s.tagName===L$2&&(s=s.shadowRoot),"template"===i.O&&(s=s.content);r<=o;++r)n[r]&&(a=createElm(null,i,r))&&(n[r].N=a,insertBefore(s,a,referenceNode(t)))},removeVnodes=(e,t,i)=>{for(let n=t;n<=i;++n){let t=e[n];if(t){let e=t.N;nullifyVNodeRefs(t),e&&(P$2=!0,e["s-ol"]?e["s-ol"].remove():putBackInOriginalLocation(e,!0),e.remove())}}},isSameVnode=(e,t,i=!1)=>
5e.O===t.O&&("slot"===e.O?e.j===t.j:i?(i&&!e.S&&t.S&&(e.S=t.S),!0):e.S===t.S),referenceNode=e=>e&&e["s-ol"]||e,patch=(e,t,i=!1)=>{let n,r=t.N=e.N,o=e.m,a=t.m,s=t.O,l=t.h;null==l?(U$1="svg"===s||"foreignObject"!==s&&U$1,"slot"!==s||_$2||e.j!==t.j&&(t.N["s-sn"]=t.j||"",relocateToHostRoot(t.N.parentElement)),updateElement(e,t,U$1,i),null!==o&&null!==a?((e,t,i,n,r=!1)=>{let o,a,s=0,l=0,c=0,u=0,d=t.length-1,h=t[0],p=t[d],f=n.length-1,m=n[0],g=n[f],v="template"===i.O?e.content:e;for(;s<=d&&l<=f;)if(null==h)h=t[++s];else if(null==p)p=t[--d];else if(null==m)m=n[++l];else if(null==g)g=n[--f];else if(isSameVnode(h,m,r))patch(h,m,r),h=t[++s],m=n[++l];else if(isSameVnode(p,g,r))patch(p,g,r),p=t[--d],g=n[--f];else if(isSameVnode(h,g,r))"slot"!==h.O&&"slot"!==g.O||putBackInOriginalLocation(h.N.parentNode,!1),patch(h,g,r),insertBefore(v,h.N,p.N.nextSibling),h=t[++s],g=n[--f];else if(isSameVnode(p,m,r))"slot"!==h.O&&"slot"!==g.O||putBackInOriginalLocation(p.N.parentNode,!1),patch(p,m,r),insertBefore(v,p.N,h.N),p=t[--d],m=n[++l];else{for(c=-1,u=s;u<=d;++u)if(t[u]&&null!==t[u].S&&t[u].S===m.S){c=u;break}c>=0?(a=t[c]).O!==m.O?o=createElm(t&&t[l],i,c):(patch(a,m,r),t[c]=void 0,o=a.N):o=createElm(t&&t[l],i,l),m=n[++l],o&&insertBefore(referenceNode(h.N).parentNode,o,referenceNode(h.N))}s>d?addVnodes(e,null==n[f+1]?null:n[f+1].N,i,n,l,f):l>f&&removeVnodes(t,s,d)})(r,o,t,a,i):null!==a?(null!==e.h&&(r.textContent=""),addVnodes(r,null,t,a,0,a.length-1)):!i&&s$3&&null!==o?removeVnodes(o,0,o.length-1):i&&s$3&&null!==o&&null===a&&(t.m=o),U$1&&"svg"===s&&(U$1=!1)):(n=r["s-cr"])?n.parentNode.textContent=l:e.h!==l&&(r.data=l)},B$2=[],markSlotContentForRelocation=e=>{let t,i,n;for(let r of e.__childNodes||e.childNodes){if(r["s-sr"]&&(t=r["s-cr"])&&t.parentNode){i=t.parentNode.__childNodes||t.parentNode.childNodes;let e=r["s-sn"];for(n=i.length-1;n>=0;n--)if(!((t=i[n])["s-cn"]||t["s-nr"]||t["s-hn"]===r["s-hn"]||t["s-sh"]&&t["s-sh"]===r["s-hn"]))if(isNodeLocatedInSlot(t,e)){let i=B$2.find(e=>e.M===t);P$2=!0,t["s-sn"]=t["s-sn"]||e,i?(i.M["s-sh"]=r["s-hn"],i.L=r):(t["s-sh"]=r["s-hn"],B$2.push({L:r,M:t})),t["s-sr"]&&B$2.map(e=>{isNodeLocatedInSlot(e.M,t["s-sn"])&&(i=B$2.find(e=>e.M===t))&&!e.L&&(e.L=i.L)})}else B$2.some(e=>e.M===t)||B$2.push({M:t})}1===r.nodeType&&markSlotContentForRelocation(r)}},nullifyVNodeRefs=e=>{e.v&&e.v.ref&&W$1.push(()=>e.v.ref(null)),e.m&&e.m.map(nullifyVNodeRefs)},queueRefAttachment=(e,t)=>{F$2.push(()=>e(t))},insertBefore=(e,t,i,n)=>{if("string"==typeof t["s-sn"]){e.insertBefore(t,i);let{slotNode:r}=function(e,t){var i;if(!(t=t||(null==(i=e["s-ol"])?void 0:i.parentElement)))return{slotNode:null,slotName:""};let n=e["s-sn"]=getSlotName(e)||"";return{slotNode:getHostSlotNodes(internalCall(t,"childNodes"),t.tagName,n)[0],slotName:n}}(t);return r&&!n&&r.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),t}return e.__insertBefore?e.__insertBefore(t,i):null==e?void 0:e.insertBefore(t,i)},renderVdom=(e,t,i=!1)=>{var n,r,o,a,s,l;let c=e.$hostElement$,u=e.t,d=e.D||newVNode(null,null),h=(l=t)&&l.O===T$2?t:h$2(null,null,t);if(L$2=c.tagName,u.R&&(h.v=h.v||{},u.R.forEach(([e,t])=>{h.v[t]=c[e]})),i&&h.v)for(let e of Object.keys(h.v))c.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(h.v[e]=c[e]);if(h.O=null,h.i|=4,e.D=h,h.N=d.N=c.shadowRoot||c,_$2=!(!(1&u.i)||128&u.i),E$2=c["s-cr"],P$2=!1,patch(d,h,i),g$4.i|=1,H$2){for(let e of(markSlotContentForRelocation(h.N),B$2)){let t=e.M;if(!t["s-ol"]&&y$2.document){let e=originalLocationDebugNode(t);e["s-nr"]=t,insertBefore(t.parentNode,t["s-ol"]=e,t,i)}}for(let e of B$2){let t=e.M,s=e.L;if(1===t.nodeType&&i&&(t["s-ih"]=null!=(n=t.hidden)&&n),s){let e=s.parentNode,n=s.nextSibling;if(n&&1===n.nodeType){let i=null==(r=t["s-ol"])?void 0:r.previousSibling;for(;i;){let r=null!=(o=i["s-nr"])?o:null;if(r&&r["s-sn"]===t["s-sn"]&&e===(r.__parentNode||r.parentNode)){for(r=r.nextSibling;r===t||null!=r&&r["s-sr"];)r=null==r?void 0:r.nextSibling;if(!r||!r["s-nr"]){n=r;break}}i=i.previousSibling}}let l=t.__parentNode||t.parentNode,c=t.__nextSibling||t.nextSibling;if((!n&&e!==l||c!==n)&&t!==n){if(insertBefore(e,t,n,i),8===t.nodeType&&t.nodeValue.startsWith("s-nt-")){let e=y$2.document.createTextNode(t.nodeValue.replace(/^s-nt-/,""));e["s-hn"]=t["s-hn"],e["s-sn"]=t["s-sn"],e["s-sh"]=t["s-sh"],e["s-sr"]=t["s-sr"],e["s-ol"]=t["s-ol"],e["s-ol"]["s-nr"]=e,insertBefore(t.parentNode,e,t,i),t.parentNode.removeChild(t)}
51===t.nodeType&&"SLOT-FB"!==t.tagName&&(t.hidden=null!=(a=t["s-ih"])&&a)}t&&"function"==typeof s["s-rf"]&&s["s-rf"](s)}else 1===t.nodeType&&(t.hidden=!0)}}if(P$2&&updateFallbackSlotVisibility(h.N),g$4.i&=-2,B$2.length=0,!_$2&&!(1&u.i)&&c["s-cr"]){for(let e of h.N.__childNodes||h.N.childNodes)if(e["s-hn"]!==L$2&&!e["s-sh"]){if(i&&null==e["s-ih"]&&(e["s-ih"]=null!=(s=e.hidden)&&s),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){let t=y$2.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],insertBefore(e.parentNode,t,e,i),e.parentNode.removeChild(e)}}}E$2=void 0,W$1.forEach(e=>e()),W$1.length=0,F$2.forEach(e=>e()),F$2.length=0},slotReferenceDebugNode=e=>{var t;return null==(t=y$2.document)?void 0:t.createComment(`<slot${e.j?' name="'+e.j+'"':""}> (host=${L$2.toLowerCase()})`)},originalLocationDebugNode=e=>{var t;return null==(t=y$2.document)?void 0:t.createComment("org-location for "+(e.localName?`<${e.localName}> (host=${e["s-hn"]})`:`[${e.textContent}]`))},attachToAncestor=(e,t)=>{if(t&&!e.I&&t["s-p"]){let i=t["s-p"].push(new Promise(n=>e.I=()=>{t["s-p"].splice(i-1,1),n()}))}},scheduleUpdate=(e,t)=>{if(e.i|=16,4&e.i)return void(e.i|=512);attachToAncestor(e,e._);let i=()=>dispatchHooks(e,t);if(!t)return x$4(i);queueMicrotask(()=>{i()})},dispatchHooks=(e,t)=>{let i,n=e.$hostElement$;e.t.$;let r=n;if(!r)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return t?(emitLifecycleEvent(n,"componentWillLoad"),i=safeCall(r,"componentWillLoad",void 0,n)):(emitLifecycleEvent(n,"componentWillUpdate"),i=safeCall(r,"componentWillUpdate",void 0,n)),emitLifecycleEvent(n,"componentWillRender"),i=enqueue(i,()=>safeCall(r,"componentWillRender",void 0,n)),enqueue(i,()=>updateComponent(e,r,t))},enqueue=(e,t)=>isPromisey(e)?e.then(t).catch(e=>{console.error(e),t()}):t(),isPromisey=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,updateComponent=async(e,t,i)=>{var n;let r=e.$hostElement$;e.t.$;let o=r["s-rc"];i&&(e=>{let t=e.t,i=e.$hostElement$,n=t.i;t.$;let r=addStyle(i.shadowRoot?i.shadowRoot:i.getRootNode(),t);10&n&&(i["s-sc"]=r,i.classList.add(r+"-h"))})(e),e.t.$,callRender(e,t,r,i),o&&(o.map(e=>e()),r["s-rc"]=void 0);{let t=null!=(n=r["s-p"])?n:[],i=()=>postUpdateComponent(e);0===t.length?i():(Promise.all(t).then(i).catch(i),e.i|=4,t.length=0)}},callRender=(e,t,i,n)=>{try{t=t.render(),e.i&=-17,e.i|=2,renderVdom(e,t,n)}catch(t){consoleError(t,e.$hostElement$)}return null},postUpdateComponent=e=>{e.t.$;let t=e.$hostElement$,i=()=>{},n=t,r=e._;safeCall(n,"componentDidRender",void 0,t),emitLifecycleEvent(t,"componentDidRender"),64&e.i?(safeCall(n,"componentDidUpdate",void 0,t),emitLifecycleEvent(t,"componentDidUpdate"),i()):(e.i|=64,addHydratedFlag(t),safeCall(n,"componentDidLoad",void 0,t),emitLifecycleEvent(t,"componentDidLoad"),e.P(t),r||appDidLoad()),e.I&&(e.I(),e.I=void 0),512&e.i&&nextTick$1(()=>scheduleUpdate(e,!1)),e.i&=-517},forceUpdate=e=>{var t;{let i=getHostRef(e),n=null==(t=null==i?void 0:i.$hostElement$)?void 0:t.isConnected;return n&&(18&i.i)==2&&scheduleUpdate(i,!1),n}},appDidLoad=e=>{var t;nextTick$1(()=>emitEvent(y$2,"appload",{detail:{namespace:t$4}})),null!=(t=g$4.H)&&t.size&&g$4.H.clear()},safeCall=(e,t,i,n)=>{if(e&&e[t])try{return e[t](i)}catch(e){consoleError(e,n)}},emitLifecycleEvent=(e,t)=>{emitEvent(e,"stencil_"+t,{bubbles:!0,composed:!0,detail:{namespace:t$4}})},addHydratedFlag=e=>{var t;return e.classList.add(null!=(t=n$4)?t:"hydrated")},setValue=(e,t,i,n)=>{let r=getHostRef(e);if(!r)return;let o=e,a=r.l.get(t),s=r.i,l=o;i=parsePropertyValue(i,n.o[t][0]);let c=Number.isNaN(a)&&Number.isNaN(i);if(i!==a&&!c){if(r.l.set(t,i),n.U){let e=n.U[t];e&&e.map(e=>{try{let[[n,o]]=Object.entries(e);(128&s||1&o)&&(l?l[n](i,a,t):r.W.push(()=>{r.F[n](i,a,t)}))}catch(e){consoleError(e,o)}})}if(2&s){if(l.componentShouldUpdate&&!1===l.componentShouldUpdate(i,a,t)&&!(16&s))return;16&s||scheduleUpdate(r,!1)}}},proxyComponent=(e,t,i)=>{var n,r;let o=e.prototype;{e.watchers&&!t.U&&(t.U=normalizeWatchers(e.watchers)),e.deserializers&&!t.B&&(t.B=e.deserializers),e.serializers&&!t.V&&(t.V=e.serializers);let i=Object.entries(null!=(n=t.o)?n:{});i.map(([e,[i]])=>{if(31&i||32&i){let{get:n,set:r}=getPropertyDescriptor(o,e)||{};n&&(t.o[e][0]|=2048),r&&(t.o[e][0]|=4096),Object.defineProperty(o,e,{get(){var t;return n?n.apply(this):(t=e,getHostRef(this).l.get(t))},configurable:!0,enumerable:!0}),Object.defineProperty(o,e,{set(n){let o=getHostRef(this);if(o){if(r)return(32&i?this[e]:o.$hostElement$[e])===void 0&&o.l.get(e)&&(n=o.l.get(e)),r.apply(this,[parsePropertyValue(n,i)]),n=32&i?this[e]:o.$hostElement$[e],void setValue(this,e,n,t);setValue(this,e,n,t)}}})}});{let n=new Map;o.attributeChangedCallback=function(e,r,a){g$4.jmp(()=>{var s;let l=n.get(e),c=getHostRef(this);if(this.hasOwnProperty(l),o.hasOwnProperty(l)&&"number"==typeof this[l]&&this[l]==a)return;if(null==l){let i=null==c?void 0:c.i;if(c&&i&&!(8&i)&&a!==r){let n=this,o=null==(s=t.U)?void 0:s[e];null==o||o.forEach(t=>{let[[o,s]]=Object.entries(t);null!=n[o]&&(128&i||1&s)&&n[o].call(n,a,r,e)})}return}let u=i.find(([e])=>e===l),d=u&&4&u[1][0],h=d&&null===a&&void 0===this[l];d&&(a=null!==a&&"false"!==a);let p=Object.getOwnPropertyDescriptor(o,l);h||a==this[l]||p.get&&!p.set||(this[l]=a)})},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.U)?r:{}),...i.filter(([e,t])=>31&t[0]).map(([e,i])=>{var r;let o=i[1]||e;return n.set(o,e),512&i[0]&&(null==(r=t.R)||r.push([e,o])),o})]))}}return e},connectedCallback=e=>{if(!(1&g$4.i)){let t=getHostRef(e);if(!t)return;let i=t.t;if(i.$,1&t.i)addHostEventListeners(e,t,i.q),null!=t&&t.F||null!=t&&t.Y&&t.Y.then(()=>{});else{let n;if(t.i|=1,n=e.getAttribute(p$5)){if(1&i.i){let t=addStyle(e.shadowRoot,i);e.classList.remove(t+"-h",t+"-s")}((e,t,i,n)=>{var r,o,a,s;let l,c=e.shadowRoot,u=[],d=[],h=c?[]:null,p=newVNode(t,null);p.N=e,!y$2.document||g$4.H&&g$4.H.size||initializeDocumentHydrate(y$2.document.body,g$4.H=new Map),e[p$5]=i,e.removeAttribute(p$5),n.D=clientHydrate(p,u,[],h,e,e,i,d);let f=0,m=u.length;for(;f<m;f++){let i=(l=u[f]).k+"."+l.C,n=g$4.H.get(i),o=l.N;if(c){if(null!=(r=l.O)&&r.toString().includes("-")&&"slot-fb"!==l.O&&!l.N.shadowRoot){let e=getHostRef(l.N);if(e){let t=getScopeId(e.t),i=y$2.document.querySelector(`style[sty-id="${t}"]`);i&&h.unshift(i.cloneNode(!0))}}}else o["s-hn"]=transformTag(t).toUpperCase(),"slot"===l.O&&(o["s-cr"]=e["s-cr"]);"slot"===l.O&&(l.j=l.N["s-sn"]||l.N.name||null,l.m?(l.i|=2,l.N.childNodes.length||l.m.forEach(e
5=>{l.N.appendChild(e.N)})):l.i|=1),n&&n.isConnected&&(n.parentElement.shadowRoot&&""===n["s-en"]&&n.parentNode.insertBefore(o,n.nextSibling),n.parentNode.removeChild(n),c||(o["s-oo"]=parseInt(l.C))),n&&!n["s-id"]&&g$4.H.delete(i)}let g=[],v=d.length,y,b,S,_,E=0,T=0;for(;E<v;E++)if((y=d[E])&&y.length)for(S=y.length,b=0;b<S;b++){if(g[(_=y[b]).hostId]||(g[_.hostId]=g$4.H.get(_.hostId)),!g[_.hostId])continue;let e=g[_.hostId];e.shadowRoot&&_.node.parentElement!==e&&e.insertBefore(_.node,null==(a=null==(o=y[b-1])?void 0:o.node)?void 0:a.nextSibling),e.shadowRoot&&c||(_.slot["s-cr"]||(_.slot["s-cr"]=e["s-cr"],!_.slot["s-cr"]&&e.shadowRoot?_.slot["s-cr"]=e:_.slot["s-cr"]=(e.__childNodes||e.childNodes)[0]),addSlotRelocateNode(_.node,_.slot,0,_.node["s-oo"]||T),null!=(s=_.node.parentElement)&&s.shadowRoot&&_.node.getAttribute&&_.node.getAttribute("slot")&&_.node.removeAttribute("slot")),T=(_.node["s-oo"]||T)+1}if(c&&!c.childNodes.length){let t=0,i=h.length;if(i){for(;t<i;t++){let e=h[t];e&&c.appendChild(e)}Array.from(e.childNodes).forEach(e=>{"string"!=typeof e["s-en"]&&"string"!=typeof e["s-sn"]&&(1===e.nodeType&&e.slot&&e.hidden?e.removeAttribute("hidden"):8!==e.nodeType||e.nodeValue||e.parentNode.removeChild(e))})}}n.$hostElement$=e})(e,i.$,n,t)}n||12&i.i&&setContentReference(e);{let i=e;for(;i=i.parentNode||i.host;)if(1===i.nodeType&&i.hasAttribute("s-id")&&i["s-p"]||i["s-p"]){attachToAncestor(t,t._=i);break}}i.o&&Object.entries(i.o).map(([t,[i]])=>{if(31&i&&Object.prototype.hasOwnProperty.call(e,t)){let i=e[t];delete e[t],e[t]=i}}),(async(e,t,i)=>{let n;try{if(!(32&t.i)){t.i|=32;{n=e.constructor;let i=e.localName;customElements.whenDefined(i).then(()=>t.i|=128)}if(n&&n.style){let e;"string"==typeof n.style&&(e=n.style);let t=getScopeId(i);if(!d$4.has(t)||e$2){let n=(i.$,()=>{});registerStyle(t,e,!!(1&i.i)),n()}}}let r=t._,o=()=>scheduleUpdate(t,!0);r&&r["s-rc"]?r["s-rc"].push(o):o()}catch(i){consoleError(i,e),t.I&&(t.I(),t.I=void 0),t.P&&t.P(e)}})(e,t,i)}}},setContentReference=e=>{if(!y$2.document)return;let t=e["s-cr"]=y$2.document.createComment(`content-ref (host=${e.localName})`);t["s-cn"]=!0,insertBefore(e,t,e.firstChild)},proxyCustomElement=(e,t)=>{let i={i:t[0],$:t[1]};try{i.o=t[2],i.q=t[3],i.U=normalizeWatchers(e.U),i.B=e.B,i.V=e.V,i.R=[],(()=>{if(!y$2.document)return;let e=y$2.document.querySelectorAll(`[${$$1}]`),t=0;for(;t<e.length;t++)registerStyle(e[t].getAttribute($$1),e[t].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),!0)})();let n=e.prototype.connectedCallback,r=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){((e,t)=>{let i={i:0,$hostElement$:e,t:t,l:new Map,J:new Map};i.Y=new Promise(e=>i.P=e),e["s-p"]=[],e["s-rc"]=[];let n=i;e.__stencil__getHostRef=()=>n,512&t.i&&l$9&&reWireGetterSetter(e,i)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){let e=getHostRef(this);if(!e)return;addHostEventListeners(this,e,i.q),this.__hasHostListenerAttached=!0}connectedCallback(this),n&&n.call(this)},disconnectedCallback(){(async e=>{if(!(1&g$4.i)){let t=getHostRef(e);null!=t&&t.Z&&(t.Z.map(e=>e()),t.Z=void 0)}C$2.has(e)&&C$2.delete(e),e.shadowRoot&&C$2.has(e.shadowRoot)&&C$2.delete(e.shadowRoot)})(this),r&&r.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${i.$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else createShadowRoot.call(this,i)}}),Object.defineProperty(e,"is",{value:i.$,configurable:!0}),proxyComponent(e,i)}catch(t){return consoleError(t),e}},addHostEventListeners=(e,t,i,n)=>{i&&y$2.document&&i.map(([i,n,r])=>{let o=e,a=hostListenerProxy(t,r),s=hostListenerOpts(i);g$4.ael(o,n,a,s),(t.Z=t.Z||[]).push(()=>g$4.rel(o,n,a,s))})},hostListenerProxy=(e,t)=>i=>{try{e.$hostElement$[t](i)}catch(t){consoleError(t,e.$hostElement$)}},hostListenerOpts=e=>w$3?{passive:!!(1&e),capture:!!(2&e)}:!!(2&e),z$3=void 0;function transformTag(e){return z$3?z$3(e):e}function setTagTransformer(e){z$3&&console.warn(`
6      A tagTransformer has already been set. 
7      Overwriting it may lead to error and unexpected results if your components have already been defined.
8    `),z$3=e}!function(){["cosmos-button"].every(function(e){return transformTag(e)===transformScopedTag(e)})||setTagTransformer(transformScopedTag)}();let t$3={elementDelimiter:"__",modifierDelimiter:"--",namespace:"",namespaceDelimiter:"-",strict:!0},includesChars=(e,t)=>t.some(t=>e.includes(t)),invalidMessage=(e,t,i)=>`The ${e} ("${t}") must not use the characters contained within the delimiters ("${i.join('", "')}").`;!function({elementDelimiter:e,modifierDelimiter:t,namespace:i,namespaceDelimiter:n,strict:r}){"string"==typeof e&&(t$3.elementDelimiter=e),"string"==typeof t&&(t$3.modifierDelimiter=t),("string"==typeof i||Array.isArray(i))&&(t$3.namespace=i),"string"==typeof n&&(t$3.namespaceDelimiter=n),t$3.strict=r}({strict:!1});let transformModifierToArray=e=>"object"!=typeof e?e:Object.keys(e).reduce((t,i)=>{let n=e[i];return n?!0===n?[...t,i]:"object"==typeof n?[...t,...Object.keys(n).map(e=>`${i}-${n[e]}@${e}`)]:[...t,`${i}-${n}`]:t},[]),bem=e=>(t,i)=>{let n="string"==typeof t?t:transformModifierToArray(t);return(function(e,t={}
8){let{elementDelimiter:i,modifierDelimiter:n,namespace:r,namespaceDelimiter:o,strict:a}={...t$3,...t},s=`${[].concat(r).filter(Boolean).reduce((e,t)=>`${e}${t}${o}`,"")}${e}`,l=a?[o,i,n]:[],c=a?l.join("").split("").filter((e,t,i)=>i.indexOf(e)===t):[];return function(e,t){if(null==e)return s;let r="string"==typeof e?e:null;if(a&&null!=r&&includesChars(r,c))throw Error(invalidMessage("element",r,l));let o=null==r?s:`${s}${i}${r}`,u="string"==typeof e?t:e;if(null==u)return o;let d=(e,t)=>{if(null!=t&&""!==t){if(a&&includesChars(t,c))throw Error(invalidMessage("modifier",t,l));return`${e} ${o}${n}${t}`}return e};return Array.isArray(u)?u.reduce(d,o):Object.keys(u).filter(e=>!!u[e]).reduce(d,o)}})(e)(n,transformModifierToArray(i))},e$1=typeof window>"u"?{}:window,n$3=!!(null!=(wp=e$1.cosmosConfig)&&wp.disableWarnings)||!!(null!=(Cp=e$1.gravityConfig)&&Cp.disableWarnings),r$g={get disableWarnings(){return n$3},set disableWarnings(ie){n$3=ie}};e$1.cosmosConfig=r$g,e$1.gravityConfig=r$g;let nextTick=()=>new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>{e()}))}),i$5=class{constructor(){this.classNames={enter:"enter",leave:"leave"},this.timeouts={enter:void 0,leave:void 0}}async enter(e,t){if(!e)return Promise.reject();let i=this.getClassNames();return this.clearTimeouts(),this.clearClassNames(e),this.addClassName(e,i.enter),await this.addClassNameOnNextTick(e,i.enterActive),new Promise(i=>{this.timeouts.enter=setTimeout(()=>{this.clearClassNames(e),i()},t)})}async leave(e,t){if(!e)return Promise.reject();let i=this.getClassNames();return this.clearTimeouts(),this.clearClassNames(e),this.addClassName(e,i.leave),await this.addClassNameOnNextTick(e,i.leaveActive),new Promise(i=>{this.timeouts.leave=setTimeout(()=>{this.clearClassNames(e),i()},t)})}getClassNames(){return{enter:this.classNames.enter,enterActive:`${this.classNames.enter}-active`,leave:this.classNames.leave,leaveActive:`${this.classNames.leave}-active`}}addClassName(e,t){e.classList.add(t)}clearTimeouts(){Object.values(this.timeouts).forEach(e=>{e&&clearTimeout(e)})}clearClassNames(e){Object.values(this.getClassNames()).forEach(t=>{this.removeClassName(e,t)})}removeClassName(e,t){e.classList.remove(t)}async addClassNameOnNextTick(e,t){await nextTick(),this.addClassName(e,t)}};var o$f="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wp,Cp,G,P$1,s$2="[object Symbol]",u$2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,a$a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
87f]/g,f$4="\\ud800-\\udfff",c$9="\\u2700-\\u27bf",l$8="a-z\\xdf-\\xf6\\xf8-\\xff",d$3="A-Z\\xc0-\\xd6\\xd8-\\xde",h$1="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p$4="['’]",x$3="["+h$1+"]",m$4="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",g$3="\\d+",b$2="["+c$9+"]",y$1="["+l$8+"]",v$1="[^"+f$4+h$1+g$3+c$9+l$8+d$3+"]",$="(?:\\ud83c[\\udde6-\\uddff]){2}",E$1="[\\ud800-\\udbff][\\udc00-\\udfff]",A$1="["+d$3+"]",w$2="(?:"+y$1+"|"+v$1+")",O$1="(?:"+A$1+"|"+v$1+")",S$1="(?:['’](?:d|ll|m|re|s|t|ve))?",D$1="(?:['’](?:D|LL|M|RE|S|T|VE))?",j$1="(?:"+m$4+"|\\ud83c[\\udffb-\\udfff])?",T$1="[\\ufe0e\\ufe0f]?",C$1=T$1+j$1+("(?:\\u200d(?:"+["[^"+f$4+"]",$,E$1].join("|")+")"+T$1)+j$1+")*",U="(?:"+[b$2,$,E$1].join("|")+")"+C$1,I$1=RegExp(p$4,"g"),z$2=RegExp(m$4,"g"),N$1=RegExp([A$1+"?"+y$1+"+"+S$1+"(?="+[x$3,A$1,"$"].join("|")+")",O$1+"+"+D$1+"(?="+[x$3,A$1+w$2,"$"].join("|")+")",A$1+"?"+w$2+"+"+S$1,A$1+"+"+D$1,g$3,U].join("|"),"g"),Z=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,R$1="object"==typeof o$f&&o$f&&o$f.Object===Object&&o$f,L$1="object"==typeof self&&self&&self.Object===Object&&self,F$1=R$1||L$1||Function("return this")(),M$1=(G={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(e){return null==G?void 0:G[e]}),k$1=Object.prototype.toString,H$1=F$1.Symbol,W=H$1?H$1.prototype:void 0,Y=W?W.toString:void 0;function baseToString$1$1(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&k$1.call(e)==s$2}(e))return Y?Y.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function toString$1$1(e){return null==e?"":baseToString$1$1(e)}var J=getDefaultExportFromCjs((P$1=function(e,t,i){return e+(i?"-":"")+t.toLowerCase()},function(e){return function(e,t,i){for(var n=-1,r=e?e.length:0;++n<r;)i=t(i,e[n],n,e);return i}(function(e){return!function(e){return Z.test(e)}(e=toString$1$1(e))?function(e){return e.match(u$2)||[]}(e):function(e){return e.match(N$1)||[]}(e)}((function(e){return(e=toString$1$1(e))&&e.replace(a$a,M$1).replace(z$2,"")})(e).replace(I$1,"")),P$1,"")}));let formatMemberName=(e,t)=>{switch(t){case"property":return J(e);case"method":return`${e}()`;default:return e}},isNamedSlotUsed=(e,t)=>!!t&&!!e.querySelector(`[slot="${t}"]`),Logger_warn=e=>{r$g.disableWarnings||e$1.console.warn("%c\uD83E\uDE90 Gravity / Cosmos","color: #000F1E; background: #FF900099; font-weight: bold; font-size: 10px; padding: 2px 6px; border-radius: 5px;",e)};var q="[object Symbol]",B$1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,K=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
87f]/g,V="\\ud800-\\udfff",_$1="\\u0300-\\u036f\\ufe20-\\ufe23",Q="\\u20d0-\\u20f0",X="\\u2700-\\u27bf",tt="a-z\\xdf-\\xf6\\xf8-\\xff",et="A-Z\\xc0-\\xd6\\xd8-\\xde",nt="\\ufe0e\\ufe0f",rt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",it="['’]",ot="["+V+"]",st="["+rt+"]",ut="["+_$1+Q+"]",at="\\d+",ft="["+X+"]",ct="["+tt+"]",lt="[^"+V+rt+at+X+tt+et+"]",dt="\\ud83c[\\udffb-\\udfff]",ht="[^"+V+"]",pt="(?:\\ud83c[\\udde6-\\uddff]){2}",xt="[\\ud800-\\udbff][\\udc00-\\udfff]",mt="["+et+"]",gt="\\u200d",bt="(?:"+ct+"|"+lt+")",yt="(?:"+mt+"|"+lt+")",vt="(?:['’](?:d|ll|m|re|s|t|ve))?",$t="(?:['’](?:D|LL|M|RE|S|T|VE))?",Et="(?:"+ut+"|"+dt+")?",At="["+nt+"]?",wt=At+Et+("(?:"+gt+"(?:"+[ht,pt,xt].join("|")+")"+At)+Et+")*",Ot="(?:"+[ft,pt,xt].join("|")+")"+wt,St="(?:"+[ht+ut+"?",ut,pt,xt,ot].join("|")+")",Dt=RegExp(it,"g"),jt=RegExp(ut,"g"),Tt=RegExp(dt+"(?="+dt+")|"+St+wt,"g"),Ct=RegExp([mt+"?"+ct+"+"+vt+"(?="+[st,mt,"$"].join("|")+")",yt+"+"+$t+"(?="+[st,mt+bt,"$"].join("|")+")",mt+"?"+bt+"+"+vt,mt+"+"+$t,at,Ot].join("|"),"g"),Ut=RegExp("["+gt+V+_$1+Q+nt+"]"),It=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zt="object"==typeof o$f&&o$f&&o$f.Object===Object&&o$f,Nt="object"==typeof self&&self&&self.Object===Object&&self,Zt=zt||Nt||Function("return this")(),Rt=function(e){return function(t){return null==e?void 0:e[t]}}({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"});function hasUnicode$2(e){return Ut.test(e)}function stringToArray$2(e){return hasUnicode$2(e)?function(e){return e.match(Tt)||[]}(e):function(e){return e.split("")}(e)}var Lt=Object.prototype.toString,Ft=Zt.Symbol,Gt=Ft?Ft.prototype:void 0,Mt=Gt?Gt.toString:void 0;function baseToString$3(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Lt.call(e)==q}(e))return Mt?Mt.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function castSlice$2(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:function(e,t,i){var n=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(i=i>r?r:i)<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(r);++n<r;)o[n]=e[n+t];return o}(e,t,i)}function toString$3(e){return null==e?"":baseToString$3(e)}var kt,Pt=function(e){return function(t){return function(e,t,i){for(var n=-1,r=e?e.length:0;++n<r;)i=t(i,e[n],n,e);return i}(function(e){return!function(e){return It.test(e)}(e=toString$3(e))?function(e){return e.match(B$1)||[]}(e):function(e){return e.match(Ct)||[]}(e)}((function(e){return(e=toString$3(e))&&e.replace(K,Rt).replace(jt,"")})(t).replace(Dt,"")),e,"")}}(function(e,t,i){return t=t.toLowerCase(),e+(i?Ht(toString$3(t).toLowerCase()):t)}),Ht=(kt="toUpperCase",function(e){var t=hasUnicode$2(e=toString$3(e))?stringToArray$2(e):void 0,i=t?t[0]:e.charAt(0),n=t?castSlice$2(t,1).join(""):e.slice(1);return i[kt]()+n}),Wt=getDefaultExportFromCjs(Pt);
8class Yt{constructor(e,t){this.componentName=e,this.deprecationMap=t}getDeprecationConfig(e,t){var i;return(null==(i=this.deprecationMap[e])?void 0:i.type)===t?this.deprecationMap[e]:void 0}createDeprecationMessage({type:e,name:t,message:i}){let n="";n="component"===e?`Deprecated ${e}: "${t}"`:"generic"===e?`Deprecation in ${this.componentName}: "${t}"`:`Deprecated ${e} in ${this.componentName}: "${t}"`;let r=function(e){let t=Wt(e);return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}(this.componentName.split("-")[0]);return`${n}
9${i}
10See the documentation for more information: https://win.gs/${r}WebDeprecations`}logWarning(e){Logger_warn(this.createDeprecationMessage({...e,componentName:this.componentName}))}warnComponent(){let e="component",t=this.getDeprecationConfig(this.componentName,e);t&&this.logWarning({...t,name:this.componentName,type:e})}warnMethod(e,t){let i="method",n=this.getDeprecationConfig(e,i);n&&(!n.warnCondition||n.warnCondition(t))&&this.logWarning({...n,name:formatMemberName(e,i)})}warnProperty(e,t){let i="property",n=this.getDeprecationConfig(e,i);if(!n||n.warnCondition&&!n.warnCondition(t))return;let r=formatMemberName(e,i);if(n.deprecatedValues){if(!n.deprecatedValues.includes(t))return;i="property value",r=String(t)}this.logWarning({...n,name:r,type:i})}warnProperties(e){for(let t in this.deprecationMap){let i=e[t];void 0!==i&&"property"===this.deprecationMap[t].type&&this.warnProperty(t,i)}}warnEvent(e){let t="event",i=this.getDeprecationConfig(e,t);i&&this.logWarning({...i,name:formatMemberName(e,t)})}warnPart(e){let t="part",i=this.getDeprecationConfig(e,t);i&&this.logWarning({...i,name:formatMemberName(e,t)})}warnParts(e){var t;let i=null==(t=null==e$1?void 0:e$1.document)?void 0:t.styleSheets;if(i)for(let t of((e,t)=>{let i=[];if(!(null!=t&&t.length))return i;for(let n of t)if("cssRules"in n)for(let t of Object.values(n.cssRules))"selectorText"in t&&t.selectorText.includes("::part")&&t.selectorText.split(",").forEach(t=>{if(!(t=t.trim()).includes("::part"))return;let[n,r]=t.split("::part");e.matches(n)&&i.push(r.replace(/[{()}]/g,""))});return[...new Set(i)].sort()})(e,Array.from(i).filter(e=>!e.href||e.href.startsWith(location.origin))))t in this.deprecationMap&&this.warnPart(t)}warnSlot(e){let t="slot",i=this.getDeprecationConfig(e,t);i&&this.logWarning({...i,name:formatMemberName(e,t)})}warnSlots(e){for(let t in this.deprecationMap)"slot"===this.deprecationMap[t].type&&isNamedSlotUsed(e,t)&&this.warnSlot(t)}warnGeneric(e){clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{let t="generic",i=this.getDeprecationConfig(e,t);i&&this.logWarning({...i,name:formatMemberName(e,t)})},300)}}let isNodeEnvironment=()=>"u">typeof process&&null!=process.versions&&null!=process.versions.node;class Jt{constructor(){isNodeEnvironment()||(this.eventTarget=document.createDocumentFragment())}on(e,t){var i;null==(i=this.eventTarget)||i.addEventListener(e,t)}off(e,t){var i;null==(i=this.eventTarget)||i.removeEventListener(e,t)}emit(e,t){var i;let n=new CustomEvent(e,t);null==(i=this.eventTarget)||i.dispatchEvent(n)}}let interceptEvent=e=>{e.preventDefault(),e.stopPropagation()},forceFocus=async function(e,t=5){e.addEventListener("focus",interceptEvent),e.addEventListener("blur",interceptEvent);for(let i=0;i<t;i++)await nextTick(),e.blur(),e.focus();e.blur(),e.removeEventListener("focus",interceptEvent),e.removeEventListener("blur",interceptEvent),e.focus()},hasReducedMotion=()=>e$1.matchMedia("(prefers-reduced-motion: reduce)").matches,isTouchDevice=()=>"ontouchstart"in e$1.window||e$1.navigator.maxTouchPoints>0,requestFormSubmit=e=>{if(e){if("function"==typeof HTMLFormElement.prototype.requestSubmit)return e.requestSubmit();if(!isNodeEnvironment()){let t=e$1.document.createElement("button");t.type="submit",t.style.display="none",e.appendChild(t),t.click(),t.remove()}}},qt=/([a-zA-Z0-9-]+)@([a-zA-Z0-9-]+)/,isResponsiveProperty=e=>"string"==typeof e&&qt.test(e),parseResponsiveProperty=e=>(e.match(RegExp(qt,"g"))||[]).reduce((e,t)=>{let i=t.match(qt);if(i){let[,t,n]=i;e[n]=t}return e},{}),serializeResponsiveProperty=e=>Object.entries(e).filter(([,e])=>null!=e).map(([e,t])=>`${t}@${e}`).join(" "),mapResponsiveProperty=(e,t)=>Object.entries(e).reduce((e,[i,n])=>(n&&t[n]&&(e[i]=t[n]),e),{});function hasNamedSlot(e,t){if(!e||"function"!=typeof e.querySelector)return!1;try{let i=e.querySelector(`:scope > [slot="${t}"]`);return void 0===i?!!e.querySelector(`[slot="${t}"]`):null!==i}catch{return!!e.querySelector(`[slot="${t}"]`)}}function getDefaultSlotTextContent(e){return e&&"function"==typeof e.assignedNodes?e.assignedNodes({flatten:!0}).reduce((e,t)=>
10e+(t.textContent||""),"").trim():""}function getNamedSlotTextContent(e,t){var i,n,r,o,a;if(!e||"function"!=typeof e.querySelector)return"";try{let o=e.querySelector(`:scope > [slot="${t}"]`);return void 0===o?(null==(n=null==(i=e.querySelector(`[slot="${t}"]`))?void 0:i.textContent)?void 0:n.trim())||"":(null==(r=null==o?void 0:o.textContent)?void 0:r.trim())||""}catch{return(null==(a=null==(o=e.querySelector(`[slot="${t}"]`))?void 0:o.textContent)?void 0:a.trim())||""}}class Bt{constructor(){this.observers=new Map,this.isNodeEnv=isNodeEnvironment(),this.observer=this.isNodeEnv?null:this.createObserver()}static getInstance(){return Bt.instance||(Bt.instance=new Bt),Bt.instance}observe(e,t){var i;this.isNodeEnv||this.observers.has(e)||(this.observers.set(e,t),null==(i=this.observer)||i.observe(e,Bt.OBSERVER_OPTIONS),t.call(e))}unobserve(e){var t;!this.isNodeEnv&&this.observers.has(e)&&(this.observers.delete(e),0===this.observers.size&&(null==(t=this.observer)||t.disconnect()))}createObserver(){return new MutationObserver(this.handleMutations.bind(this))}handleMutations(e){e.forEach(e=>{this.observers.forEach((t,i)=>{i.contains(e.target)&&t.call(i)})})}}Bt.instance=null,Bt.OBSERVER_OPTIONS={childList:!0,subtree:!0,characterData:!0};let Kt=Bt.getInstance();var e="top",t$2="bottom",n$2="right",o$e="left",r$f="auto",i$4=[e,t$2,n$2,o$e],a$9="start",u$1="end",c$8="viewport",f$3="popper",s$1=i$4.reduce(function(e,t){return e.concat([t+"-"+a$9,t+"-"+u$1])},[]),l$7=[].concat(i$4,[r$f]).reduce(function(e,t){return e.concat([t,t+"-"+a$9,t+"-"+u$1])},[]),d$2=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement$1(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"u">typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}var p$3={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},r=t.elements[e];isHTMLElement(r)&&getNodeName(r)&&(Object.assign(r.style,i),Object.keys(n).forEach(function(e){var t=n[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],r=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce(function(e,t){return e[t]="",e},{});isHTMLElement(n)&&getNodeName(n)&&(Object.assign(n.style,o),Object.keys(r).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};function getBasePlacement$1(e){return e.split("-")[0]}var m$3=Math.max,v=Math.min,g$2=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=e.getBoundingClientRect(),r=1,o=1;t&&isHTMLElement(e)&&(r=e.offsetWidth>0&&g$2(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&g$2(n.height)/e.offsetHeight||1);var a=(isElement$1(e)?getWindow(e):window).visualViewport,s=!isLayoutViewport()&&i,l=(n.left+(s&&a?a.offsetLeft:0))/r,c=(n.top+(s&&a?a.offsetTop:0))/o,u=n.width/r,d=n.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function getLayoutRect(e){var t=getBoundingClientRect(e),i=e.offsetWidth,n=e.offsetHeight;return 1>=Math.abs(t.width-i)&&(i=t.width),1>=Math.abs(t.height-n)&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function contains(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;
vendor: 4,155 bytes, line 10
10if(i&&isShadowRoot(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement$1(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement(e)&&"fixed"!==getComputedStyle$1(e).position?e.offsetParent:null}function getOffsetParent(e){for(var t=getWindow(e),i=getTrueOffsetParent(e);i&&isTableElement(i)&&"static"===getComputedStyle$1(i).position;)i=getTrueOffsetParent(i);return i&&("html"===getNodeName(i)||"body"===getNodeName(i)&&"static"===getComputedStyle$1(i).position)?t:i||function(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(e)&&"fixed"===getComputedStyle$1(e).position)return null;var i=getParentNode(e);for(isShadowRoot(i)&&(i=i.host);isHTMLElement(i)&&0>["html","body"].indexOf(getNodeName(i));){var n=getComputedStyle$1(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,i){return m$3(e,v(t,i))}function mergePaddingObject(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function expandToHashMap(e,t){return t.reduce(function(t,i){return t[i]=e,t},{})}var h={name:"arrow",enabled:!0,phase:"main",fn:function(t){var i,n=t.state,r=t.name,o=t.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,l=getBasePlacement$1(n.placement),c=getMainAxisFromPlacement(l),u=[o$e,n$2].indexOf(l)>=0?"height":"width";if(a&&s){var d=function(t,i){return mergePaddingObject("number"!=typeof(t="function"==typeof t?t(Object.assign({},i.rects,{placement:i.placement})):t)?t:expandToHashMap(t,i$4))}(o.padding,n),h=getLayoutRect(a),p="y"===c?e:o$e,f="y"===c?t$2:n$2,m=n.rects.reference[u]+n.rects.reference[c]-s[c]-n.rects.popper[u],g=s[c]-n.rects.reference[c],v=getOffsetParent(a),y=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,b=m/2-g/2,S=d[p],_=y-h[u]-d[f],E=y/2-h[u]/2+b,T=within(S,E,_),w=c;n.modifiersData[r]=((i={})[w]=T,i.centerOffset=T-E,i)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&contains(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e){return e.split("-")[1]}var y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mapToStyles(t){var i,n=t.popper,r=t.popperRect,o=t.placement,a=t.variation,s=t.offsets,l=t.position,c=t.gpuAcceleration,u=t.adaptive,d=t.roundOffsets,h=t.isFixed,p=s.x,f=void 0===p?0:p,m=s.y,g=void 0===m?0:m,v="function"==typeof d?d({x:f,y:g}):{x:f,y:g};f=v.x,g=v.y;var b=s.hasOwnProperty("x"),S=s.hasOwnProperty("y"),_=o$e,E=e,T=window;if(u){var w=getOffsetParent(n),A="clientHeight",P="clientWidth";w===getWindow(n)&&"static"!==getComputedStyle$1(w=getDocumentElement(n)).position&&"absolute"===l&&(A="scrollHeight",P="scrollWidth"),(o===e||(o===o$e||o===n$2)&&a===u$1)&&(E=t$2,g-=(h&&w===T&&T.visualViewport?T.visualViewport.height:w[A])-r.height,g*=c?1:-1),(o===o$e||(o===e||o===t$2)&&a===u$1)&&(_=n$2,f-=(h&&w===T&&T.visualViewport?T.visualViewport.width:w[P])-r.width,f*=c?1:-1)}var I,C=Object.assign({position:l},u&&y),M=!0===d?function(t,i){var n=t.x,r=t.y,o=i.devicePixelRatio||1;return{x:g$2(n*o)/o||0,y:g$2(r*o)/o||0}}({x:f,y:g},getWindow(n)):{x:f,y:g};return f=M.x,g=M.y,c?Object.assign({},C,((I={})[E]=S?"0":"",I[_]=b?"0":"",I.transform=1>=(T.devicePixelRatio||1)?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",I)):Object.assign({},C,((i={})[E]=S?g+"px":"",i[_]=b?f+"px":"",i.transform="",i))}var b$1={passive:!0}
vendor: 4,397 bytes, line 10
10,w$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,function(e){return w$1[e]})}var O={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,function(e){return O[e]})}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function isScrollParent(e){var t=getComputedStyle$1(e),i=t.overflow,n=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){void 0===t&&(t=[]);var i,n=getScrollParent(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),o=getWindow(n),a=r?[o].concat(o.visualViewport||[],isScrollParent(n)?n:[]):n,s=t.concat(a);return r?s:s.concat(listScrollParents(getParentNode(a)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getClientRectFromMixedType(e,t,i){return t===c$8?rectToClientRect(function(e,t){var i=getWindow(e),n=getDocumentElement(e),r=i.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(r){o=r.width,a=r.height;var c=isLayoutViewport();(c||!c&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:o,height:a,x:s+getWindowScrollBarX(e),y:l}}(e,i)):isElement$1(t)?function(e,t){var i=getBoundingClientRect(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}(t,i):rectToClientRect(function(e){var t,i=getDocumentElement(e),n=getWindowScroll(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=m$3(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=m$3(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-n.scrollLeft+getWindowScrollBarX(e),l=-n.scrollTop;return"rtl"===getComputedStyle$1(r||i).direction&&(s+=m$3(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(getDocumentElement(e)))}function getClippingRect(e,t,i,n){var r=[].concat("clippingParents"===t?function(e){var t=listScrollParents(getParentNode(e)),i=["absolute","fixed"].indexOf(getComputedStyle$1(e).position)>=0&&isHTMLElement(e)?getOffsetParent(e):e;return isElement$1(i)?t.filter(function(e){return isElement$1(e)&&contains(e,i)&&"body"!==getNodeName(e)}):[]}(e):[].concat(t),[i]),o=r[0],a=r.reduce(function(t,i){var r=getClientRectFromMixedType(e,i,n);return t.top=m$3(r.top,t.top),t.right=v(r.right,t.right),t.bottom=v(r.bottom,t.bottom),t.left=m$3(r.left,t.left),t},getClientRectFromMixedType(e,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function computeOffsets(t){var i,n=t.reference,r=t.element,o=t.placement,a=o?getBasePlacement$1(o):null,s=o?getVariation(o):null,l=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(a){case e:i={x:l,y:n.y-r.height};break;case t$2:i={x:l,y:n.y+n.height};break;case n$2:i={x:n.x+n.width,y:c};break;case o$e:i={x:n.x-r.width,y:c};break;default:i={x:n.x,y:n.y}}var u=a?getMainAxisFromPlacement(a):null;if(null!=u){var d="y"===u?"height":"width";switch(s){case a$9:i[u]=i[u]-(n[d]/2-r[d]/2);break;case u$1:i[u]=i[u]+(n[d]/2-r[d]/2)}}return i}function detectOverflow(t,i){void 0===i&&(i={});var n=i,r=n.placement,o=void 0===r?t.placement:r,a=n.strategy,s=void 0===a?t.strategy:a,l=n.boundary,c=void 0===l?"clippingParents":l,u=n.rootBoundary,d=void 0===u?c$8:u,h=n.elementContext,p=void 0===h?f$3:h,f=n.altBoundary,m=void 0!==f&&f,g=n.padding,v=void 0===g?0:g,y=mergePaddingObject("number"!=typeof v?v:expandToHashMap(v,i$4)),b=p===f$3?"reference":f$3,S=t.rects.popper,_=t.elements[m?b:p],E=getClippingRect(isElement$1(_)?_:_.contextElement||getDocumentElement(t.elements.popper),c,d,s),T=getBoundingClientRect(t.elements.reference),w=computeOffsets({reference:T,element:S,placement:o}),A=rectToClientRect(Object.assign({},S,w)),P=p===f$3?A:T,I={top:E.top-P.top+y.top,bottom:P.bottom-E.bottom+y.bottom,left:E.left-P.left+y.left,right:P.right-E.right+y.right},C=t.modifiersData.offset;if(p===f$3&&C){var M=C[o];
vendor: 4,270 bytes, line 10
10Object.keys(I).forEach(function(t){var i=[n$2,t$2].indexOf(t)>=0?1:-1,n=[e,t$2].indexOf(t)>=0?"y":"x";I[t]+=M[n]*i})}return I}function computeAutoPlacement(e,t){void 0===t&&(t={});var i=t,n=i.placement,r=i.boundary,o=i.rootBoundary,a=i.padding,s=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?l$7:l,u=getVariation(n),d=u?s?s$1:s$1.filter(function(e){return getVariation(e)===u}):i$4,h=d.filter(function(e){return c.indexOf(e)>=0});0===h.length&&(h=d);var p=h.reduce(function(t,i){return t[i]=detectOverflow(e,{placement:i,boundary:r,rootBoundary:o,padding:a})[getBasePlacement$1(i)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}var T={name:"flip",enabled:!0,phase:"main",fn:function(t){var i=t.state,n=t.options,r=t.name;if(!i.modifiersData[r]._skip){for(var o=n.mainAxis,a=void 0===o||o,s=n.altAxis,l=void 0===s||s,c=n.fallbackPlacements,u=n.padding,d=n.boundary,h=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,m=void 0===f||f,g=n.allowedAutoPlacements,v=i.options.placement,y=getBasePlacement$1(v),b=c||(y!==v&&m?function(t){if(getBasePlacement$1(t)===r$f)return[];var i=getOppositePlacement(t);return[getOppositeVariationPlacement(t),i,getOppositeVariationPlacement(i)]}(v):[getOppositePlacement(v)]),S=[v].concat(b).reduce(function(t,n){return t.concat(getBasePlacement$1(n)===r$f?computeAutoPlacement(i,{placement:n,boundary:d,rootBoundary:h,padding:u,flipVariations:m,allowedAutoPlacements:g}):n)},[]),_=i.rects.reference,E=i.rects.popper,T=new Map,w=!0,A=S[0],P=0;P<S.length;P++){var I=S[P],C=getBasePlacement$1(I),M=getVariation(I)===a$9,R=[e,t$2].indexOf(C)>=0,k=R?"width":"height",x=detectOverflow(i,{placement:I,boundary:d,rootBoundary:h,altBoundary:p,padding:u}),O=R?M?n$2:o$e:M?t$2:e;_[k]>E[k]&&(O=getOppositePlacement(O));var D=getOppositePlacement(O),L=[];if(a&&L.push(x[C]<=0),l&&L.push(x[O]<=0,x[D]<=0),L.every(function(t){return t})){A=I,w=!1;break}T.set(I,L)}if(w)for(var N=function(t){var i=S.find(function(i){var n=T.get(i);if(n)return n.slice(0,t).every(function(t){return t})});if(i)return A=i,"break"},U=m?3:1;U>0&&"break"!==N(U);U--);i.placement!==A&&(i.modifiersData[r]._skip=!0,i.placement=A,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function isAnySideFullyClipped(t){return[e,n$2,t$2,o$e].some(function(i){return t[i]>=0})}var P={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var i=t.state,n=t.options,r=t.name,o=n.offset,a=void 0===o?[0,0]:o,s=l$7.reduce(function(t,n){return t[n]=function(t,i,n){var r=getBasePlacement$1(t),o=[o$e,e].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},i,{placement:t})):n,s=a[0],l=a[1];return s=s||0,l=(l||0)*o,[o$e,n$2].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}(n,i.rects,a),t},{}),l=s[i.placement],c=l.x,u=l.y;null!=i.modifiersData.popperOffsets&&(i.modifiersData.popperOffsets.x+=c,i.modifiersData.popperOffsets.y+=u),i.modifiersData[r]=s}},x$2={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var i=t.state,n=t.options,r=t.name,o=n.mainAxis,a=void 0===o||o,s=n.altAxis,l=void 0!==s&&s,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,h=n.padding,p=n.tether,f=void 0===p||p,m=n.tetherOffset,g=void 0===m?0:m,y=detectOverflow(i,{boundary:c,rootBoundary:u,padding:h,altBoundary:d}),b=getBasePlacement$1(i.placement),S=getVariation(i.placement),_=!S,E=getMainAxisFromPlacement(b),T="x"===E?"y":"x",w=i.modifiersData.popperOffsets,A=i.rects.reference,P=i.rects.popper,I="function"==typeof g?g(Object.assign({},i.rects,{placement:i.placement})):g,C="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),M=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,R={x:0,y:0};if(w){if(a){var k,x="y"===E?e:o$e,O="y"===E?t$2:n$2,D="y"===E?"height":"width",L=w[E],N=L+y[x],U=L-y[O],F=f?-P[D]/2:0,B=S===a$9?A[D]:P[D],V=S===a$9?-P[D]:-A[D],j=i.elements.arrow,z=f&&j?getLayoutRect(j):{width:0,height:0},H=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=H[x],q=H[O],W=within(0,A[D],z[D]),Y=_?A[D]/2-F-W-G-C.mainAxis:B-W-G-C.mainAxis,K=_?-A[D]/2+F+W
vendor: 4,421 bytes, line 10
10+q+C.mainAxis:V+W+q+C.mainAxis,X=i.elements.arrow&&getOffsetParent(i.elements.arrow),Q=X?"y"===E?X.clientTop||0:X.clientLeft||0:0,Z=null!=(k=null==M?void 0:M[E])?k:0,J=L+K-Z,$=within(f?v(N,L+Y-Z-Q):N,L,f?m$3(U,J):U);w[E]=$,R[E]=$-L}if(l){var ee,et="x"===E?e:o$e,ei="x"===E?t$2:n$2,en=w[T],er="y"===T?"height":"width",eo=en+y[et],ea=en-y[ei],es=-1!==[e,o$e].indexOf(b),el=null!=(ee=null==M?void 0:M[T])?ee:0,ec=es?eo:en-A[er]-P[er]-el+C.altAxis,eu=es?en+A[er]+P[er]-el-C.altAxis:ea,ed=f&&es?function(t,i,n){var r=within(t,i,n);return r>n?n:r}(ec,en,eu):within(f?ec:eo,en,f?eu:ea);w[T]=ed,R[T]=ed-en}i.modifiersData[r]=R}},requiresIfExists:["offset"]};function getCompositeRect(e,t,i){void 0===i&&(i=!1);var n,r,o=isHTMLElement(t),a=isHTMLElement(t)&&function(e){var t=e.getBoundingClientRect(),i=g$2(t.width)/e.offsetWidth||1,n=g$2(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(t),s=getDocumentElement(t),l=getBoundingClientRect(e,a,i),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!i)&&(("body"!==getNodeName(t)||isScrollParent(s))&&(c=(n=t)!==getWindow(n)&&isHTMLElement(n)?{scrollLeft:(r=n).scrollLeft,scrollTop:r.scrollTop}:getWindowScroll(n)),isHTMLElement(t)?((u=getBoundingClientRect(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=getWindowScrollBarX(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function order(e){var t=new Map,i=new Set,n=[];function r(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!i.has(e)){var n=t.get(e);n&&r(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){i.has(e.name)||r(e)}),n}var S={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function popperGenerator(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,n=void 0===i?[]:i,r=t.defaultOptions,o=void 0===r?S:r;return function(e,t,i){void 0===i&&(i=o);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},S,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(i){var r="function"==typeof i?i(s.options):i;d(),s.options=Object.assign({},o,s.options,r),s.scrollParents={reference:isElement$1(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var a,c=function(e){var t=order(e);return d$2.reduce(function(e,i){return e.concat(t.filter(function(e){return e.phase===i}))},[])}(Object.keys(a=[].concat(n,s.options.modifiers).reduce(function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e},{})).map(function(e){return a[e]}));return s.orderedModifiers=c.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,i=e.options,n=void 0===i?{}:i,r=e.effect;if("function"==typeof r){var o=r({state:s,name:t,instance:u,options:n}),a=function(){};l.push(o||a)}}),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,i=e.popper;if(areValidElements(t,i)){s.rects={reference:getCompositeRect(t,getOffsetParent(i),"fixed"===s.options.strategy),popper:getLayoutRect(i)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var r=s.orderedModifiers[n],o=r.fn,a=r.options,l=void 0===a?{}:a,d=r.name;"function"==typeof o&&(s=o({state:s,options:l,name:d,instance:u})||s)}else s.reset=!1,n=-1}}},update:(r=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(r())})})),a}),destroy:function(){d(),c=!0}};if(!areValidElements(e,t))return u;function d(){l.forEach(function(e){return e()}),l=[]}return u.setOptions(i).then(function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)}),u}}var C=popperGenerator({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,n=e.options,r=n.scroll,o=void 0===r||r,a=n.resize,s=void 0===a||a,l=getWindow(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);
10return o&&c.forEach(function(e){e.addEventListener("scroll",i.update,b$1)}),s&&l.addEventListener("resize",i.update,b$1),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",i.update,b$1)}),s&&l.removeEventListener("resize",i.update,b$1)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,a=void 0===o||o,s=i.roundOffsets,l=void 0===s||s,c={placement:getBasePlacement$1(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},p$3,P,T,x$2,h,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,a=detectOverflow(t,{elementContext:"reference"}),s=detectOverflow(t,{altBoundary:!0}),l=getSideOffsets(a,n),c=getSideOffsets(s,r,o),u=isAnySideFullyClipped(l),d=isAnySideFullyClipped(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),M={passive:!0,capture:!0},TIPPY_DEFAULT_APPEND_TO=function(){return document.body};function getValueAtIndexOrReturn(e,t,i){return Array.isArray(e)?e[t]??(Array.isArray(i)?i[t]:i):e}function isType(e,t){var i=({}).toString.call(e);return 0===i.indexOf("[object")&&i.indexOf(t+"]")>-1}function invokeWithArgsOrReturn(e,t){return"function"==typeof e?e.apply(void 0,t):e}function debounce(e,t){var i;return 0===t?e:function(n){clearTimeout(i),i=setTimeout(function(){e(n)},t)}}function normalizeToArray(e){return[].concat(e)}function pushIfUnique(e,t){-1===e.indexOf(t)&&e.push(t)}function arrayFrom(e){return[].slice.call(e)}function removeUndefinedProps(e){return Object.keys(e).reduce(function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t},{})}function isElement(e){return["Element","Fragment"].some(function(t){return isType(e,t)})}function isMouseEvent(e){return isType(e,"MouseEvent")}function getArrayOfElements(e){return isElement(e)?[e]:!function(e){return isType(e,"NodeList")}(e)?Array.isArray(e)?e:arrayFrom(document.querySelectorAll(e)):arrayFrom(e)}function setTransitionDuration(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function setVisibilityState(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function getOwnerDocument(e){var t,i=normalizeToArray(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}function updateTransitionEndListener(e,t,i){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,i)})}function actualContains(e,t){for(var i,n=t;n;){if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var E={isTouch:!1},D=0;function onDocumentTouchStart(){E.isTouch||(E.isTouch=!0,window.performance&&document.addEventListener("mousemove",onDocumentMouseMove))}function onDocumentMouseMove(){var e=performance.now();e-D<20&&(E.isTouch=!1,document.removeEventListener("mousemove",onDocumentMouseMove)),D=e}function onWindowBlur(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var i=t._tippy;t.blur&&!i.state.isVisible&&t.blur()}}var A="u">typeof window&&"u">typeof document&&!!window.msCrypto,R=Object.assign({appendTo:TIPPY_DEFAULT_APPEND_TO,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),k=Object.keys(R);function getExtendedPassedProps(e){var t=(e.plugins||[]).reduce(function(t,i){var n,r=i.name,o=i.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:null!=(n=R[r])?n:o),t},{});return Object.assign({},e,t)}function evaluateProps(e,t){var i=Object.assign({},t,{content:invokeWithArgsOrReturn(t.content,[e])},t.ignoreAttributes?{}
10:function(e,t){return(t?Object.keys(getExtendedPassedProps(Object.assign({},R,{plugins:t}))):k).reduce(function(t,i){var n=(e.getAttribute("data-tippy-"+i)||"").trim();if(!n)return t;if("content"===i)t[i]=n;else try{t[i]=JSON.parse(n)}catch{t[i]=n}return t},{})}(e,t.plugins));return i.aria=Object.assign({},R.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}function getChildren(e){var t=e.firstElementChild,i=arrayFrom(t.children);return{box:t,content:i.find(function(e){return e.classList.contains("tippy-content")}),arrow:i.find(function(e){return e.classList.contains("tippy-arrow")||e.classList.contains("tippy-svg-arrow")}),backdrop:i.find(function(e){return e.classList.contains("tippy-backdrop")})}}var j=1,L=[],B=[];function createTippy(e,t){var i,n,r,o,a,s,l,c,u=evaluateProps(e,Object.assign({},R,getExtendedPassedProps(removeUndefinedProps(t)))),d=!1,h=!1,p=!1,f=!1,m=[],g=debounce(et,u.interactiveDebounce),v=j++,y=(c=u.plugins).filter(function(e,t){return c.indexOf(e)===t}),b={id:v,reference:e,popper:document.createElement("div"),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(r)},setProps:function(t){if(!b.state.isDestroyed){V("onBeforeUpdate",[b,t]),$();var i=b.props,n=evaluateProps(e,Object.assign({},i,removeUndefinedProps(t),{ignoreAttributes:!0}));b.props=n,J(),i.interactiveDebounce!==n.interactiveDebounce&&(G(),g=debounce(et,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?normalizeToArray(i.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):n.triggerTarget&&e.removeAttribute("aria-expanded"),H(),F(),T&&T(i,n),b.popperInstance&&(eo(),es().forEac
10h(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})),V("onAfterUpdate",[b,t])}},setContent:function(e){b.setProps({content:e})},show:function(){var e=b.state.isVisible,t=b.state.isDestroyed,i=!b.state.isEnabled,n=E.isTouch&&!b.props.touch,r=getValueAtIndexOrReturn(b.props.duration,0,R.duration);if(!(e||t||i||n)&&!O().hasAttribute("disabled")&&(V("onShow",[b],!1),!1!==b.props.onShow(b))){if(b.state.isVisible=!0,x()&&(_.style.visibility="visible"),F(),K(),b.state.isMounted||(_.style.transition="none"),x()){var o=N();setTransitionDuration([o.box,o.content],0)}s=function(){var e;if(b.state.isVisible&&!f){if(f=!0,_.style.transition=b.props.moveTransition,x()&&b.props.animation){var t=N(),i=t.box,n=t.content;setTransitionDuration([i,n],r),setVisibilityState([i,n],"visible")}z(),H(),pushIfUnique(B,b),null==(e=b.popperInstance)||e.forceUpdate(),V("onMount",[b]),b.props.animation&&x()&&function(e,t){Q(e,t)}(r,function(){b.state.isShown=!0,V("onShown",[b])})}},function(){var e,t=b.props.appendTo,i=O();(e=b.props.interactive&&t===TIPPY_DEFAULT_APPEND_TO||"parent"===t?i.parentNode:invokeWithArgsOrReturn(t,[i])).contains(_)||e.appendChild(_),b.state.isMounted=!0,eo()}()}},hide:function(){var e=!b.state.isVisible,t=b.state.isDestroyed,i=!b.state.isEnabled,n=getValueAtIndexOrReturn(b.props.duration,1,R.duration);if(!(e||t||i)&&(V("onHide",[b],!1),!1!==b.props.onHide(b))){if(b.state.isVisible=!1,b.state.isShown=!1,f=!1,d=!1,x()&&(_.style.visibility="hidden"),G(),X(),F(!0),x()){var r=N(),o=r.box,a=r.content;b.props.animation&&(setTransitionDuration([o,a],n),setVisibilityState([o,a],"hidden"))}z(),H(),b.props.animation?x()&&function(e,t){Q(e,function(){!b.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()})}(n,b.unmount):b.unmount()}},hideWithInteractivity:function(e){D().addEventListener("mousemove",g),pushIfUnique(L,g),g(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){b.state.isVisible&&b.hide(),b.state.isMounted&&(ea(),es().forEac
10h(function(e){e._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_),B=B.filter(function(e){return e!==b}),b.state.isMounted=!1,V("onHidden",[b]))},destroy:function(){b.state.isDestroyed||(b.clearDelayTimeouts(),b.unmount(),$(),delete e._tippy,b.state.isDestroyed=!0,V("onDestroy",[b]))}};if(!u.render)return b;var S=u.render(b),_=S.popper,T=S.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+b.id,b.popper=_,e._tippy=b,_._tippy=b;var w=y.map(function(e){return e.fn(b)}),P=e.hasAttribute("aria-expanded");return J(),H(),F(),V("onCreate",[b]),u.showOnCreate&&el(),_.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&D().addEventListener("mousemove",g)}),b;function I(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function k(){return"hold"===I()[0]}function x(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function O(){return l||e}function D(){var e=O().parentNode;return e?getOwnerDocument(e):document}function N(){return getChildren(_)}function U(e){return b.state.isMounted&&!b.state.isVisible||E.isTouch||o&&"focus"===o.type?0:getValueAtIndexOrReturn(b.props.delay,+!e,R.delay)}function F(e){void 0===e&&(e=!1),_.style.pointerEvents=b.props.interactive&&!e?"":"none",_.style.zIndex=""+b.props.zIndex}function V(e,t,i){var n;void 0===i&&(i=!0),w.forEach(function(i){i[e]&&i[e].apply(i,t)}),i&&(n=b.props)[e].apply(n,t)}function z(){var t=b.props.aria;if(t.content){var i="aria-"+t.content,n=_.id;normalizeToArray(b.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(i);if(b.state.isVisible)e.setAttribute(i,t?t+" "+n:n);else{var r=t&&t.replace(n,"").trim();r?e.setAttribute(i,r):e.removeAttribute(i)}})}}function H(){!P&&b.props.aria.expanded&&normalizeToArray(b.props.triggerTarget||e).forEach(function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===O()?"true":"false"):e.removeAttribute("aria-expanded")})}function G(){D().removeEventListener("mousemove",g),L=L.filter(function(e){return e!==g})}function q(t){if(!E.isTouch||!p&&"mousedown"!==t.type){var i=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!actualContains(_,i)){if(normalizeToArray(b.props.triggerTarget||e).some(function(e){return actualContains(e,i)})){if(E.isTouch||b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),h=!0,setTimeout(function(){h=!1}),b.state.isMounted||X())}}}function W(){p=!0}function Y(){p=!1}function K(){var e=D();e.addEventListener("mousedown",q,!0),e.addEventListener("touchend",q,M),e.addEventListener("touchstart",Y,M),e.addEventListener("touchmove",W,M)}function X(){var e=D();e.removeEventListener("mousedown",q,!0),e.removeEventListener("touchend",q,M),e.removeEventListener("touchstart",Y,M),e.removeEventListener("touchmove",W,M)}function Q(e,t){var i=N().box;function n(e){e.target===i&&(updateTransitionEndListener(i,"remove",n),t())}if(0===e)return t();updateTransitionEndListener(i,"remove",a),updateTransitionEndListener(i,"add",n),a=n}function Z(t,i,n){void 0===n&&(n=!1),normalizeToArray(b.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,i,n),m.push({node:e,eventType:t,handler:i,options:n})})}function J(){k()&&(Z("touchstart",ee,{passive:!0}),Z("touchend",ei,{passive:!0})),b.props.trigger.split(/\s+/).filter(Boolean).forEach(function(e){if("manual"!==e)switch(Z(e,ee),e){case"mouseenter":Z("mouseleave",ei);break;case"focus":Z(A?"focusout":"blur",en);break;case"focusin":Z("focusout",en)}})}function $(){m.forEach(function(e){var t=e.node,i=e.eventType,n=e.handler,r=e.options;t.removeEventListener(i,n,r)}),m=[]}function ee(e){var t,i=!1;if(b.state.isEnabled&&!er(e)&&!h){var n=(null==(t=o)?void 0:t.type)==="focus";o=e,l=e.currentTarget,H(),!b.state.isVisible&&isMouseEvent(e)&&L.forEach(function(t){return t(e)}),"click"===e.type&&(0>b.props.trigger.indexOf("mouseenter")||d)&&!1!==b.props.hideOnClick&&b.state.isVisible?i=!0:el(e),"click"===e.type&&(d=!i),i&&!n&&ec(e)}}function et(e){var t=e.target,i=O().contains(t)||_.contains(t);("mousemove"!==e.type||!i)&&function(e,t){var i=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,r=e.popperState,o=e.props.interactiveBorder,a=r.placement.split("-")[0],s=r.modifiersData.offset;if(!s)return!0;var l="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,d="left"===a?s.right.x:0,h=t.top-n+l>o,p=n-t.bottom-c>o,f=t.left-i+u>o,m=i-t.right-d>o;return h||p||f||m})}(es().concat(_).map(function(e){var t,i=null==(t=e._tippy.popperInstance)?void 0:t.state;return i?{popperRect:e.getBoundingClientRect(),popperState:i,props:u}:null}
vendor: 4,917 bytes, line 10
10).filter(Boolean),e)&&(G(),ec(e))}function ei(e){er(e)||b.props.trigger.indexOf("click")>=0&&d||(b.props.interactive?b.hideWithInteractivity(e):ec(e))}function en(e){0>b.props.trigger.indexOf("focusin")&&e.target!==O()||b.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||ec(e)}function er(e){return!!E.isTouch&&k()!==e.type.indexOf("touch")>=0}function eo(){ea();var t=b.props,i=t.popperOptions,n=t.placement,r=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,l=x()?getChildren(_).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||O()}:e,u=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(x()){var i=N().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?i.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?i.setAttribute("data-"+e,""):i.removeAttribute("data-"+e)}),t.attributes.popper={}}}}];x()&&l&&u.push({name:"arrow",options:{element:l,padding:3}}),u.push.apply(u,(null==i?void 0:i.modifiers)||[]),b.popperInstance=C(c,_,Object.assign({},i,{placement:n,onFirstUpdate:s,modifiers:u}))}function ea(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function es(){return arrayFrom(_.querySelectorAll("[data-tippy-root]"))}function el(e){b.clearDelayTimeouts(),e&&V("onTrigger",[b,e]),K();var t=U(!0),n=I(),r=n[0],o=n[1];E.isTouch&&"hold"===r&&o&&(t=o),t?i=setTimeout(function(){b.show()},t):b.show()}function ec(e){if(b.clearDelayTimeouts(),V("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=U(!1);t?n=setTimeout(function(){b.state.isVisible&&b.hide()},t):r=requestAnimationFrame(function(){b.hide()})}}else X()}}function tippy(e,t){void 0===t&&(t={});var i=R.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",onDocumentTouchStart,M),window.addEventListener("blur",onWindowBlur);var n=Object.assign({},t,{plugins:i}),r=getArrayOfElements(e).reduce(function(e,t){var i=t&&createTippy(t,n);return i&&e.push(i),e},[]);return isElement(e)?r[0]:r}tippy.defaultProps=R,tippy.setDefaultProps=function(e){Object.keys(e).forEach(function(t){R[t]=e[t]})},tippy.currentInput=E,Object.assign({},p$3,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}});var H={clientX:0,clientY:0},I=[];function storeMouseCoords(e){H={clientX:e.clientX,clientY:e.clientY}}var F={name:"followCursor",defaultValue:!1,fn:function(e){var t=e.reference,i=getOwnerDocument(e.props.triggerTarget||t),n=!1,r=!1,o=!0,a=e.props;function s(){return"initial"===e.props.followCursor&&e.state.isVisible}function l(){i.addEventListener("mousemove",d)}function c(){i.removeEventListener("mousemove",d)}function u(){n=!0,e.setProps({getReferenceClientRect:null}),n=!1}function d(i){var n=!i.target||t.contains(i.target),r=e.props.followCursor,o=i.clientX,a=i.clientY,s=t.getBoundingClientRect(),l=o-s.left,c=a-s.top;!n&&e.props.interactive||e.setProps({getReferenceClientRect:function(){var e=t.getBoundingClientRect(),i=o,n=a;"initial"===r&&(i=e.left+l,n=e.top+c);var s="horizontal"===r?e.top:n,u="vertical"===r?e.right:i,d="horizontal"===r?e.bottom:n,h="vertical"===r?e.left:i;return{width:u-h,height:d-s,top:s,right:u,bottom:d,left:h}}})}function h(){e.props.followCursor&&(I.push({instance:e,doc:i}),function(e){e.addEventListener("mousemove",storeMouseCoords)}(i))}function p(){0===(I=I.filter(function(t){return t.instance!==e})).filter(function(e){return e.doc===i}).length&&function(e){e.removeEventListener("mousemove",storeMouseCoords)}(i)}return{onCreate:h,onDestroy:p,onBeforeUpdate:function(){a=e.props},onAfterUpdate:function(t,i){var o=i.followCursor;n||void 0!==o&&a.followCursor!==o&&(p(),o?(h(),!e.state.isMounted||r||s()||l()):(c(),u()))},onMount:function(){e.props.followCursor&&!r&&(o&&(d(H),o=!1),s()||l())},onTrigger:function(e,t){isMouseEvent(t)&&(H={clientX:t.clientX,clientY:t.clientY}),r="focus"===t.type},onHidden:function(){e.props.followCursor&&(u(),c(),o=!0)}}}},N={name:"sticky",defaultValue:!1,fn:function(e){var t=e.reference,i=e.popper;function n(t){return!0===e.props.sticky||e.props.sticky===t}var r=null,o=null;function a(){var s=n("reference")?(e.popperInstance?e.popperInstance.state.elements.reference:t).getBoundingClientRect():null,l=n("popper")?i.getBoundingClientRect():null;(s&&areRectsDifferent(r,s)||l&&areRectsDifferent(o,l))&&e.popperInstance&&e.popperInstance.update(
10),r=s,o=l,e.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){e.props.sticky&&a()}}}};function areRectsDifferent(e,t){return!e||!t||e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left}tippy.setDefaultProps({animation:!1});let n$1=new WeakMap;function closestElement(e,t){let i=t.closest(e);if(i)return i;let n=t.getRootNode();return n!==e$1.document&&n instanceof ShadowRoot?closestElement(e,n.host):null}function consumeMode(e,t){var i;let n=closestElement(transformTag("cosmos-mode"),e.element);n&&(t(null!=(i=n.getAttribute("mode"))?i:"light"),n$1.has(n)?n$1.get(n).push(t):(null==t$1||t$1.observe(n,{attributes:!0}),n$1.set(n,[t])))}function resolveAppearance({instance:e,modeToAppearanceMap:t,callback:i}){e.appearance?i(e.appearance):consumeMode(e,n=>{e.appearance||i(t[n])})}"u">typeof MutationObserver&&(t$1=new MutationObserver(e=>{e.forEach(function(e){var t;"attributes"===e.type&&(null==(t=n$1.get(e.target))||t.forEach(t=>{var i;return t(null!=(i=e.target.getAttribute("mode"))?i:"light")}))})}));let stringBooleanToBoolean=e=>"boolean"==typeof e?e:!("string"!=typeof e||!["","true","false"].includes(e))&&"false"!==e;function getNumericClampValue(e){return/^-?\d+$/.test(e)?Number(e):("string"==typeof e||"boolean"==typeof e)&&stringBooleanToBoolean(e)?1:void 0}function isSingleLineClamp(e){return"number"==typeof e&&1===e}function isMultiLineClamp(e){return"number"==typeof e&&e>1}let isSafari=()=>{if(void 0!==d$1)return d$1;let e=navigator.userAgent;return d$1=e.includes("Safari")&&!e.includes("Chrome")&&!e.includes("Chromium")},f$2=bem("cosmos-text"),z$1=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.kind="normal",this.size="medium",this.spacing="none",this.tag="p",this.weight="regular",this.computedAppearance="dark",this.safariPadding=!1}handleAppearanceChange(e){this.computedAppearance=e}setNumericClampValue(){this.numericClampValue=getNumericClampValue(this.clamp)}getSize(){return this.size&&isResponsiveProperty(this.size)?parseResponsiveProperty(this.size):this.size}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)}),this.setNumericClampValue()}componentDidLoad(){isSafari()&&(this.safariPadding=!0)}render(){var e;return h$2(T$2,{key:"d56a5b72ba4513ca2ac993e4d64560a046d4be98"},h$2(null!=(e=this.tag)?e:"p",{key:"20b131c284cfa5896664cb4399bdf49d1db8de96",class:f$2({spacing:this.spacing,kind:this.kind,weight:this.weight,appearance:this.computedAppearance,size:this.getSize(),"single-line-clamp":isSingleLineClamp(this.numericClampValue),"multi-line-clamp":isMultiLineClamp(this.numericClampValue),"safari-padding":this.safariPadding}),part:"base",style:isMultiLineClamp(this.numericClampValue)?{"--cosmos-text-clamp-length":`${this.numericClampValue}`}:{}},h$2("slot",{key:"7b6ea7bb928c4ec517dfeb4f0bfbeb2a3d3fc5e2"})))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],clamp:[{setNumericClampValue:0}]}}static get style(){return"@charset \"UTF-8\";:host{display:block}:host([clamp]){min-width:0;overflow:clip}:host([clamp]:focus-within){overflow:visible}:host{--cosmos-text-font-family-default:var(--cosmos-font-family-text, Bull Text, Helvetica, sans-serif)}@supports (font-variation-settings: normal){:host{--cosmos-text-font-family-default:var(--cosmos-font-family-text-variable, Bull VF, Helvetica, sans-serif)}}:host(:lang(ja)){--cosmos-text-font-family-default:var(--cosmos-font-family-japanese-text, Noto Sans JP, Helvetica, sans-serif)}:host(:lang(ar)){--cosmos-text-font-family-default:var(--cosmos-font-family-arabic-text, Noto Kufi Arabic, Helvetica, sans-serif)}:host(:lang(ko)){--cosmos-text-font-family-default:var(--cosmos-font-family-korean-text, Noto Sans KR, Helvetica, sans-serif)}:host(:lang(hi)){--cosmos-text-font-family-default:var(--cosmos-font-family-hindi-text, Noto Sans, Helvetica, sans-serif)}:host(:lang(he)){--cosmos-text-font-family-default:var(--cosmos-font-family-hebrew-text, Noto Sans Hebrew, Helvetica, sans-serif)}:host(:lang(ka)){--cosmos-text-font-family-default:var(--cosmos-font-family-georgian-text, Noto Sans Georgian, Helvetica, sans-serif)}:host(:lang(th)){--cosmos-text-font-family-default:var(--cosmos-font-family-thai-text, Noto Sans Thai, Helvetica, sans-serif)}:host(:lang(zh)){--cosmos-text-font-family-default:var(     --cosmos-font-family-chinese-simplified-text,     Microsoft YaHei, ヒラã‚
10®ãƒŽè§’ã‚´ Pro W3, Hiragino Kaku Gothic Pro, Hiragino Kaku Gothic ProN W3, Osaka, メイリオ, Meiryo, ï¼­ï¼³ Pゴシック, MS PGothic, Arial Unicode MS, Tahoma, Helvetica, sans-serif   )}:host(:lang(zh-Hant)){--cosmos-text-font-family-default:var(     --cosmos-font-family-chinese-traditional-text,     Microsoft JhengHei, Geneva CY, ヒラギノ角ゴ Pro W3, Hiragino Kaku Gothic Pro, Hiragino Kaku Gothic ProN W3, Osaka, メイリオ, Meiryo, ï¼­ï¼³ Pゴシック, MS PGothic, Arial Unicode MS, Tahoma, Helvetica, sans-serif   )}@supports (font-variation-settings: normal){::slotted(strong),::slotted(b){font-variation-settings:\"opsz\" 12, \"wght\" 700}}.cosmos-text{--cosmos-font-weight-default-text-variable-regular:'opsz' 12, 'wght' 400;--cosmos-font-weight-default-text-variable-medium:'opsz' 12, 'wght' 500;--cosmos-font-weight-default-text-variable-bold:'opsz' 12, 'wght' 700;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--cosmos-text-color, #000F1E);font-family:var(--cosmos-text-font-family, var(--cosmos-text-font-family-default, var(--cosmos-font-family-text)));font-style:var(--cosmos-text-font-style, inherit);font-variant-numeric:tabular-nums;font-variation-settings:var(--cosmos-font-weight-default-text-variable-regular);font-variation-settings:var(--cosmos-text-font-variation-settings, var(--cosmos-font-weight-default-text-variable-regular));font-weight:var(--cosmos-text-font-weight, 400);letter-spacing:var(--cosmos-text-letter-spacing, inherit);line-height:var(--cosmos-text-line-height, 1.5);margin:0;text-transform:var(--cosmos-text-text-transform, var(--cosmos-text-transform, inherit))}.cosmos-text--single-line-clamp{margin-inline:-4px;overflow:hidden;padding-inline:4px;text-overflow:ellipsis;white-space:nowrap}
10.cosmos-text--multi-line-clamp{-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:var(--cosmos-text-clamp-length);margin-inline:-4px;overflow:hidden;padding-inline:4px;}.cosmos-text--size-xx-small{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-xx-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-xx-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--size-x-small{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-x-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-x-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--size-small{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-small{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--size-medium{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--size-large{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--size-x-large{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-text--size-x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-text--size-x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-xx-small\\@small{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-xx-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-xx-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-x-small\\@small{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-x-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-x-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-small\\@small{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-small\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-medium\\@small{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-medium\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-medium\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-large\\@small{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-large\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-large\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-text--size-x-large\\@small{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-text--size-x-large\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-text--size-x-large\\@small{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-xx-small\\@medium{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-xx-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-xx-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-x-small\\@medium{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-x-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-x-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-small\\@medium{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-small\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-medium\\@medium{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-medium\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-medium\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-large\\@medium{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-large\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-large\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-text--size-x-large\\@medium{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-text--size-x-large\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-text--size-x-large\\@medium{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-xx-small\\@large{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-xx-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-xx-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-x-small\\@large{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-x-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-x-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-small\\@large{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-small\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-medium\\@large{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-medium\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-medium\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-large\\@large{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-large\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-large\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-text--size-x-large\\@large{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-text--size-x-large\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-text--size-x-large\\@large{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-xx-small\\@x-large{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-xx-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-xx-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-x-small\\@x-large{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-
10size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-x-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-x-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-small\\@x-large{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-small\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-medium\\@x-large{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-medium\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-medium\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-large\\@x-large{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-large\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-large\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-text--size-x-large\\@x-large{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-text--size-x-large\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-text--size-x-large\\@x-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-xx-small\\@xx-large{line-height:var(--cosmos-text-line-height, 1.25);margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-xx-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-xx-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(12rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-x-small\\@xx-large{line-height:var(--cosmos-text-line-height, 1.357143);margin-bottom:0.428571em;padding-top:0.714286em;font-size:var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-x-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-x-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(14rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-small\\@xx-large{line-height:var(--cosmos-text-line-height, 1.411765);margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-small\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-medium\\@xx-large{line-height:var(--cosmos-text-line-height, 1.5);margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-medium\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-medium\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-large\\@xx-large{line-height:var(--cosmos-text-line-height, 1.333333);margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-large\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-large\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-text--size-x-large\\@xx-large{line-height:var(--cosmos-text-line-height, 1.137931);margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-text--size-x-large\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-text--size-x-large\\@xx-large{font-size:calc(1 * var(--cosmos-text-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}.cosmos-text--spacing-none{margin-bottom:0;padding-top:0}.cosmos-text--spacing-long-form-bottom{padding-top:0}.cosmos-text--spacing-long-form-top{margin-bottom:0}.cosmos-text--weight-medium{font-variation-settings:var(--cosmos-text-font-variation-settings, var(--cosmos-font-weight-default-text-variable-medium));
10font-weight:var(--cosmos-text-font-weight, 500)}.cosmos-text--weight-bold{font-variation-settings:var(--cosmos-text-font-variation-settings, var(--cosmos-font-weight-default-text-variable-bold));font-weight:var(--cosmos-text-font-weight, 700)}.cosmos-text--kind-normal.cosmos-text--appearance-light{color:var(--cosmos-text-color, #FFFFFF)}.cosmos-text--kind-subtle{color:var(--cosmos-text-color, rgba(0, 15, 30, 0.6))}.cosmos-text--kind-subtle.cosmos-text--appearance-light{color:var(--cosmos-text-color, rgba(255, 255, 255, 0.6))}@supports (-webkit-hyphens: none){.cosmos-text--safari-padding{-webkit-padding-end:2px;padding-inline-end:2px}}"}},[257,"cosmos-text",{appearance:[513],clamp:[520],kind:[513],size:[513],spacing:[513],tag:[513],weight:[513],computedAppearance:[32],safariPadding:[32]},void 0,{appearance:[{handleAppearanceChange:0}],clamp:[{setNumericClampValue:0}]}]);function defineCustomElement$R(){typeof customElements>"u"||["cosmos-text"].forEach(e=>{"cosmos-text"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),z$1))})}let c$7="success",g$1="error",n="loading",d=proxyCustomElement(class extends b$3{handleAppearanceChange(e){this.computedAppearance=e}handleImageChange(e,t){e!==t&&(this.imageState=n)}handleObserveResizeChange(e){this.containerResizeObserver&&(this.containerResizeObserver.unobserve(this.container),e&&this.containerResizeObserver.observe(this.container))}handleContainerResize(e){e.forEach(e=>{if(e.target===this.container){let{height:t,width:i}=e.contentRect;this.imageResize.emit({height:t,width:i})}})}preloadImage(){if("u">typeof Image){let e=new Image;e.src=this.image,e.complete?this.imageState=c$7:this.imageState=n}}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.imageResize=createEvent(this,"imageresize",5),this.fit="cover",this.imageAlt="",this.radius="none",this.computedAppearance="light",this.generateClassNames=bem("cosmos-image"),this.handleImageLoad=()=>{this.imageState=c$7},this.handleImageError=()=>{this.imageState=g$1},this.handlePreviewError=()=>{this.previewState=g$1},isNodeEnvironment()||(this.containerResizeObserver=new ResizeObserver(e=>this.handleContainerResize(e)))}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"dark",light:"light"},callback:this.handleAppearanceChange.bind(this)}),!this.srcset&&this.image?this.preloadImage():this.image&&(this.imageState=n)}componentDidLoad(){this.observeResize&&this.handleObserveResizeChange(this.observeResize)}render(){let e=!!this.image&&this.imageState!==g$1,t=!!this.imagePreview&&this.previewState!==g$1,i=!e&&!t;return h$2("div",{key:"0595cc1e1f4aca4ed40be9f9b822f19688fb5343",class:this.generateClassNames({appearance:this.computedAppearance,fallback:i,fit:this.fit,"has-image":!!this.image,"has-preview":!!this.imagePreview,"image-state":this.imageState,radius:this.radius}),part:"base",ref:e=>this.container=e},!i&&h$2("div",{key:"cacf0eb186f9c1d2e54cd50d68c1f309a6b39a92",class:this.generateClassNames("container")},t&&h$2("div",{key:"14d0d4c3eb77d3ab37489d166367e0d7e5b4d463",class:this.generateClassNames("preview-container")},h$2("img",{key:"391efd7920aa3c58b90509436b30b3a8e3d769a3",alt:"",class:this.generateClassNames("preview-image"),onError:this.handlePreviewError,src:this.imagePreview}),h$2("img",{key:"ee483267fe3330bcd5ba0f12f170c0ba8ba0cc19",alt:"",class:this.generateClassNames("preview-dummy"),src:this.imagePreview})),e&&h$2("img",{key:"e6d4b500718cdc0bcc3623d55bc1194b47e9dd51",alt:this.imageAlt,class:this.generateClassNames("image"),loading:this.loading,onError:this.handleImageError,onLoad:this.handleImageLoad,part:"image",sizes:this.sizes,src:this.image,srcSet:this.srcset})))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],image:[{handleImageChange:0}],observeResize:[{handleObserveResizeChange:0}]}}static get style(){return':host{display:block;height:100%}.cosmos-image{display:-ms-flexbox;display:flex;height:100%;isolation:isolate;min-height:inherit;overflow:hidden}.cosmos-image--radius-none{border-radius:var(--cosmos-image-border-radius, 0)}.cosmos-image--radius-small{border-radius:var(--cosmos-image-border-radius, 2px)}.cosmos-image--radius-medium{border-radius:var(--cosmos-image-border-radius, 6px)}.cosmos-image--radius-large{border-radius:var(--cosmos-image-border-radius, 8px)}.cosmos-image--radius-full{border-radius:var(--cosmos-image-border-radius, 9999px)}.cosmos-image--fallback.cosmos-image--appearance-light{background-color:rgba(0, 15, 30, 0.05)}.cosmos-image--fallback.cosmos-image--appearance-dark{background-color:rgba(255, 255, 255, 0.1)}.cosmos-image--image-state-loading,.cosmos-image--fit-contain{background-color:transparent}.cosmos-image__container{display:grid;grid-template-areas:"image";height:100%;width:100%}.cosmos-image--has-preview:not(.cosmos-image--has-image) .cosmos-image__container{display:-ms-flexbox;display:flex}.cosmos-image--fit-contain .cosmos-image__container{place-content:center}.cosmos-image__preview-container,.cosmos-image__image{grid-area:image;max-height:100%;min-height:0}.cosmos-image--fit-contain.cosmos-image--radius-none .cosmos-image__preview-container,.cosmos-image--fit-contain.cosmos-image--radius-none .cosmos-image__image{border-radius:var(--cosmos-image-border-radius, 0)}.cosmos-image--fit-contain.cosmos-image--radius-small .cosmos-image__preview-container,.cosmos-image--fit-contain.cosmos-image--radius-small .cosmos-image__image{border-radius:var(--cosmos-image-border-radius, 2px)}.cosmos-image--fit-contain.cosmos-image--radius-medium .cosmos-image__preview-container,.cosmos-image--fit-contain.cosmos-image--radius-medium .cosmos-image__image{border-radius:var(--cosmos-image-border-radius, 6px)}.cosmos-image--fit-contain.cosmos-image--radius-large .cosmos-image__preview-container,.cosmos-image--fit-contain.cosmos-image--radius-large .cosmos-image__image{border-radius:var(--cosmos-image-border-radius, 8px)}.cosmos-image--fit-contain.cosmos-image--radius-full .cosmos-image__preview-container,.cosmos-image--fit-contain.cosmos-image--radius-full .cosmos-image__image{border-radius:var(--cosmos-image-border-radius, 9999px)}.cosmos-image__preview-image,.cosmos-image__image{-o-object-fit:cover;object-fit:cover}.cosmos-image__preview-container{display:-ms-flexbox;display:flex;overflow:hidden;position:relative}.cosmos-image--fit-cover .cosmos-image__preview-container{width:100%}.cosmos-image__preview-image{-webkit-filter:blur(5px);filter:blur(5px);height:calc(100% + 5px * 2);inset:0;position:absolute;-webkit-transform:translate(-5px, -5px);transform:translate(-5px, -5px);width:calc(100% + 5px * 2)}.cosmos-image__preview-dummy{max-width:100%;width:100%}.cosmos-image__image{max-width:100%;-webkit-transition:opacity 0.2s cubic-bezier(0, 0.32, 0.32, 1);transition:opacity 0.2s cubic-bezier(0, 0.32, 0.32, 1);width:100%;z-index:1}.cosmos-image--image-state-loading .cosmos-image__image{opacity:0}
10.cosmos-image--image-state-success .cosmos-image__image{opacity:1}.cosmos-image--fit-cover .cosmos-image__image{height:100%}'}},[1,"cosmos-image",{appearance:[513],fit:[513],image:[513],imageAlt:[513,"image-alt"],imagePreview:[513,"image-preview"],loading:[513],observeResize:[516,"observe-resize"],radius:[513],sizes:[513],srcset:[513],computedAppearance:[32],imageState:[32],previewState:[32]},void 0,{appearance:[{handleAppearanceChange:0}],image:[{handleImageChange:0}],observeResize:[{handleObserveResizeChange:0}]}]);function defineCustomElement$Q(){typeof customElements>"u"||["cosmos-image"].forEach(e=>{"cosmos-image"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),d))})}let t=bem("cosmos-badge"),b=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.kind="primary",this.shape="pill",this.size="medium",this.computedAppearance="dark"}handleAppearanceChange(e){this.computedAppearance=e}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)})}render(){let e=this.href?"a":"div";return h$2(T$2,{key:"9d0e6f83e3ecf479a00ac1d6309b846d8d5dada8",role:"a"===e?void 0:"presentation"},h$2(e,{key:"59cb1e247bb1bce8f1aaa464e4718438b37b52bc",href:this.href,hreflang:"a"===e?this.hreflang:void 0,rel:this.rel,target:this.target,part:"base",class:t({appearance:this.computedAppearance,size:this.size,shape:this.shape,kind:this.kind})},h$2("div",{key:"0a5adf67f2759868fe7b2f7d130de00a4f589b4c",part:"prefix",class:t("prefix"),"aria-hidden":"true"},h$2("slot",{key:"26ea40b959375c7e97fe7372b8d09560b2af172a",name:"prefix"})),h$2("cosmos-text",{key:"69981716627a49414d61e765fe0373276a08afff",appearance:this.computedAppearance,class:t("label"),size:"x-small",exportparts:"base: label",tag:"span",weight:"large"===this.size?"medium":"regular"},h$2("span",{key:"a103327fe50f9096ec29318953738b542953858d"},h$2("slot",{key:"c64b0a35a252bb081b0983af934e9c2f537cbe39"})))))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}]}}static get style(){return'@charset "UTF-8";:host{display:inline-block;max-width:100%;min-width:0}.cosmos-badge{--focus-radius:9999px;-ms-flex-align:center;align-items:center;border-color:transparent;border-radius:var(--cosmos-badge-border-radius, var(--focus-radius));border-style:solid;border-width:var(--cosmos-badge-border-width, 1px);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--cosmos-badge-color, inherit);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;max-width:100%;min-width:0;width:auto}.cosmos-badge[href]{position:relative;text-decoration:none}.cosmos-badge[href]:focus,.cosmos-badge[href]:focus:not(:focus-visible){outline:none}.cosmos-badge[href]:focus:not(:focus-visible)::before{content:none}.cosmos-badge[href]:focus::before{border-radius:calc(var(--focus-radius) * 1.5);bottom:calc((4px + var(--cosmos-badge-border-width, 1px)) * -1);-webkit-box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;left:calc((4px + var(--cosmos-badge-border-width, 1px)) * -1);position:absolute;right:calc((4px + var(--cosmos-badge-border-width, 1px)) * -1);top:calc((4px + var(--cosmos-badge-border-width, 1px)) * -1);content:""}.cosmos-badge--appearance-dark{color:var(--cosmos-badge-color, #000F1E)}.cosmos-badge--appearance-dark.cosmos-badge--kind-primary[href]:hover{background:var(--cosmos-badge-background-hover, var(--cosmos-badge-background-color-hover, rgba(0, 15, 30, 0.2)));color:var(--cosmos-badge-color-hover, #000F1E)}.cosmos-badge--appearance-dark.cosmos-badge--kind-secondary[href]:hover{background:var(--cosmos-badge-background-hover, var(--cosmos-badge-background-color-hover, rgba(0, 15, 30, 0.05)));border-color:var(--cosmos-badge-border-color-hover, rgba(0, 15, 30, 0.2));color:var(--cosmos-badge-color-hover, #000F1E)}.cosmos-badge--appearance-light{color:var(--cosmos-badge-color, #FFFFFF)}.cosmos-badge--appearance-light.cosmos-badge--kind-primary{background:var(--cosmos-badge-background, var(--cosmos-badge-background-color, rgba(255, 255, 255, 0.1)))}.cosmos-badge--appearance-light.cosmos-badge--kind-primary[href]:hover{background:var(--cosmos-badge-background-hover, var(--cosmos-badge-background-color-hover, rgba(255, 255, 255, 0.2)));color:var(--cosmos-badge-color-hover, #FFFFFF)}.cosmos-badge--appearance-light.cosmos-badge--kind-secondary{border-color:var(--cosmos-badge-border-color, rgba(255, 255, 255, 0.2))}.cosmos-badge--appearance-light.cosmos-badge--kind-secondary[href]:hover{background:var(--cosmos-badge-background-hover, var(--cosmos-badge-background-color-hover, rgba(255, 255, 255, 0.1)));border-color:var(--cosmos-badge-border-color-hover, rgba(255, 255, 255, 0.2));color:var(--cosmos-badge-color-hover, #FFFFFF)}.cosmos-badge--kind-primary{background:var(--cosmos-badge-background, var(--cosmos-badge-background-color, rgba(0, 15, 30, 0.1)))}.cosmos-badge--kind-secondary{background:var(--cosmos-badge-background, var(--cosmos-badge-background-color, transparent));border-color:var(--cosmos-badge-border-color, rgba(0, 15, 30, 0.2))}.cosmos-badge--kind-cover-up{background:var(--cosmos-badge-background, var(--cosmos-badge-background-color, rgba(0, 15, 30, 0.6)));-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);border-color:var(--cosmos-badge-border-color, rgba(255, 255, 255, 0.2))}.cosmos-badge--kind-cover-up .cosmos-badge__prefix,.cosmos-badge--kind-cover-up .cosmos-badge__label{--cosmos-text-color:var(--cosmos-badge-color, #FFFFFF)}.cosmos-badge--kind-cover-up[href]:hover{background:var(--cosmos-badge-background-hover, var(--cosmos-badge-background-color-hover, rgba(0, 15, 30, 0.6)));border-color:var(--cosmos-badge-border-color-hover, rgba(255, 255, 255, 0.6))}.cosmos-badge--size-small{height:24px;-webkit-padding-end:8px;padding-inline-end:8px;-webkit-padding-start:var(--cosmos-badge-padding-start, 8px);padding-inline-start:var(--cosmos-badge-padding-start, 8px)}.cosmos-badge--size-medium{height:28px;-webkit-padding-end:12px;padding-inline-end:12px;-webkit-padding-start:var(--cosmos-badge-padding-start, 12px);padding-inline-start:var(--cosmos-badge-padding-start, 12px)}.cosmos-badge--size-large{height:36px;-webkit-padding-end:16px;padding-inline-end:16px;-webkit-padding-start:var(--cosmos-badge-padding-start, 16px);padding-inline-start:var(--cosmos-badge-padding-start, 16px)}.cosmos-badge--shape-pill{--focus-radius:var(--cosmos-badge-border-radius, 9999px)}.cosmos-badge--shape-rectangle{--focus-radius:var(--cosmos-badge-border-radius, 4px)}.cosmos-badge__label{margin-inline:-4px;overflow:hidden;padding-inline:4px;text-overflow:ellipsis;white-space:nowrap;-ms-flex-item-align:baseline;align-self:baseline;display:block;margin-inline:0;max-width:100%;min-width:0;padding-inline:0;--cosmos-text-color:var(--cosmos-badge-color);--cosmos-text-font-family:var(--cosmos-badge-font-family);--cosmos-text-font-size:var(--cosmos-badge-font-size);--cosmos-text-font-style:var(--cosmos-badge-font-style);
10--cosmos-text-font-weight:var(--cosmos-badge-font-weight);--cosmos-text-letter-spacing:var(--cosmos-badge-letter-spacing);--cosmos-text-text-transform:var(--cosmos-badge-text-transform)}.cosmos-badge--size-small .cosmos-badge__label{--cosmos-text-line-height:var(--cosmos-badge-line-height, 24px);-webkit-margin-before:calc(var(--cosmos-badge-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-badge-border-width, 1px) * -1)}.cosmos-badge--size-medium .cosmos-badge__label{--cosmos-text-line-height:var(--cosmos-badge-line-height, 28px);-webkit-margin-before:calc(var(--cosmos-badge-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-badge-border-width, 1px) * -1)}.cosmos-badge--size-large .cosmos-badge__label{--cosmos-text-line-height:var(--cosmos-badge-line-height, 36px);-webkit-margin-before:calc(var(--cosmos-badge-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-badge-border-width, 1px) * -1)}.cosmos-badge__prefix{-ms-flex-align:center;align-items:center;color:var(--cosmos-text-color);display:-ms-flexbox;display:flex}.cosmos-badge__prefix ::slotted([slot=prefix]){--cosmos-icon-size:16px;--cosmos-flag-width:16px;--cosmos-avatar-size:16px;-webkit-margin-end:4px;margin-inline-end:4px}'}},[257,"cosmos-badge",{appearance:[513],href:[513],hreflang:[513],kind:[513],rel:[513],shape:[513],size:[513],target:[513],computedAppearance:[32]},void 0,{appearance:[{handleAppearanceChange:0}]}]);function defineCustomElement$P(){typeof customElements>"u"||["cosmos-badge","cosmos-text"].forEach(e=>{switch(e){case"cosmos-badge":customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),b);break;case"cosmos-text":customElements.get(transformTag(transformTag(e)))||defineCustomElement$R()}})}let r$e=defineCustomElement$P,c$6=bem("cosmos-spinner"),r$d=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.computedAppearance="dark"}handleAppearanceChange(e){this.computedAppearance=e}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)})}render(){let e=Math.floor(1e3*Math.random());return h$2("svg",{key:"d096873eaa445367592a26cd1bf1f53f3cc3b611",class:c$6({appearance:this.computedAppearance}),viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"da9d4e45c5f17a2a7bf977d8bee4a300bd07fb1f",d:"M16.6292 7.75012C17.1997 8.73827 17.5 9.85919 17.5 11.0002C17.5 12.1412 17.1997 13.2621 16.6292 14.2503",stroke:`url(#segment-1-${e})`,"stroke-width":"3","vector-effect":"non-scaling-stroke"}),h$2("path",{key:"336f41e5c62382d7f6138c523e2b2a5f6a4a222e",d:"M16.6291 14.2502C16.0586 15.2384 15.2381 16.0589 14.25 16.6294C13.2619 17.1999 12.141 17.5003 11 17.5003",stroke:`url(#segment-2-${e})`,"stroke-width":"3","vector-effect":"non-scaling-stroke"}),h$2("path",{key:"42956e6f117ab9adf01282537d94f94bd8af2a77",d:"M11 17.5003C9.859 17.5003 8.73812 17.1999 7.75 16.6294C6.76188 16.0589 5.94134 15.2384 5.37085 14.2502",stroke:`url(#segment-3-${e})`,"stroke-width":"3","vector-effect":"non-scaling-stroke"}),h$2("path",{key:"4dbd30556f1c6e71c2e577a65b0e228f3ae2f4e4",d:"M5.37086 14.2503C4.80035 13.2621 4.5 12.1412 4.5 11.0002C4.5 9.85919 4.80035 8.73827 5.37086 7.75012",stroke:`url(#segment-4-${e})`,"stroke-width":"3","vector-effect":"non-scaling-stroke"}),h$2("path",{key:"c0c5360371663a219c15f1630c48c8e375bf70b1",d:"M5.37085 7.75008C5.94134 6.76196 6.76188 5.94141 7.75 5.3709C8.73812 4.80039 9.859 4.50003 11 4.5",stroke:`url(#segment-5-${e})`,"stroke-width":"3","vector-effect":"non-scaling-stroke"}),h$2("defs",{key:"ca1a83ab2d6a60f323090f99800159bf6e79eb73"},h$2("linearGradient",{key:"2f6d06653570dd0df235f21b15e668e953c572a1",id:`segment-1-${e}`,x1:"15.5",y1:"8.5",x2:"15.5",y2:"13.5",gradientUnits:"userSpaceOnUse"},h$2("stop",{key:"9058bb16860e526b8c0c91c184e24362d2952547","stop-opacity":"0"}),h$2("stop",{key:"fd25331f4fcee003a4ed4ee28d3c8c17883f49c2",offset:"1","stop-opacity":"0.25"})),h$2("linearGradient",{key:"bd9eb3497245392fcdf567662cbcd11660f100b7",id:`segment-2-${e}`,x1:"15.5",y1:"13.5",x2:"13.2074",y2:"17.3236",gradientUnits:"userSpaceOnUse"},h$2("stop",{key:"0a2a1b06fdc1bfc3e8938960dc50aa8e44102eee","stop-opacity":"0.25"}),h$2("stop",{key:"437b858d1fa7ada14506db60d7a489e0468aaedf",offset:"1","stop-opacity":"0.5"})),h$2("linearGradient",{key:"71543c9982192e8b39cfbccfdcaaca5f32106a18",id:`segment-3-${e}`,x1:"11",y1:"16",x2:"9.0824",y2:"12.3929",gradientUnits:"userSpaceOnUse"},h$2("stop",{key:"8c76e8800cdb1d348973b167fbf1d7da8214f896","stop-opacity":"0.5"}),h$2("stop",{key:"73b1b63e80af76cd4f00ff6c5233701e071b3d6a",offset:"1","stop-opacity":"0.75"})),h$2("linearGradient",{key:"1b68d7dfcf6f41738cdaea56ef1e95dd064eecc3",id:`segment-4-${e}`,x1:"6.5",y1:"13.5",x2:"6.5",y2:"8.5",gradientUnits:"userSpaceOnUse"}
10,h$2("stop",{key:"b164cb6cb527cbed399872ad8a2e75cad44414b5","stop-opacity":"0.75"}),h$2("stop",{key:"35ac79948f7addb52686e5d1eb7f5c0120365a48",offset:"1"})),h$2("linearGradient",{key:"371e8744236ff6b449b04e7c5b49e07450e9a4bd",id:`segment-5-${e}`,x1:"7",y1:"8",x2:"9.13409",y2:"4.76796",gradientUnits:"userSpaceOnUse"},h$2("stop",{key:"1273e3b52c23c529b7f2e735b7d6f4de9955161a"}),h$2("stop",{key:"38a81f57df644fed3dab78055a92c8a9c504f4be",offset:"1"}))))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}]}}static get style(){return":host{display:block;height:1em;width:1em}.cosmos-spinner{color:var(--cosmos-spinner-color, #000F1E);display:block;height:100%;width:100%}@media screen and (prefers-reduced-motion: no-preference){.cosmos-spinner{-webkit-animation:spin 0.7s linear infinite;animation:spin 0.7s linear infinite}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}}.cosmos-spinner *{stop-color:currentColor}.cosmos-spinner--appearance-light{color:var(--cosmos-spinner-color, #FFFFFF)}"}},[1,"cosmos-spinner",{appearance:[513],computedAppearance:[32]},void 0,{appearance:[{handleAppearanceChange:0}]}]);function defineCustomElement$O(){typeof customElements>"u"||["cosmos-spinner"].forEach(e=>{"cosmos-spinner"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),r$d))})}let l$6=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.busy=!1,this.decorative=!1,this.disabled=!1,this.hovered=!1,this.href=void 0,this.iconPlacement="before",this.kind="primary",this.size="medium",this.type="button",this.width="content",this.computedAppearance="dark",this.hasIconSlot=!1,this.handleIconSlotChange=()=>{this.hasIconSlot=hasNamedSlot(this.element,"icon")}}handleAppearanceChange(e){this.computedAppearance=e}async buttonBlur(){var e;null==(e=this.buttonElement)||e.blur()}async buttonFocus(){var e;null==(e=this.buttonElement)||e.focus()}handleClick(e){let t=this.element.closest("form");return this.disabled||this.busy?(e.stopImmediatePropagation(),e.preventDefault(),void e.stopPropagation()):this.isButton()&&"button"!==this.type&&t?"reset"===this.type?t.reset():"submit"===this.type?requestFormSubmit(t):void 0:void 0}getTextWeight(){return"medium"}getTextSize(){return"small"===this.size?"x-small":"small"}getType(){return this.isButton()?this.type:void 0}getWidth(){return this.width&&isResponsiveProperty(this.width)?parseResponsiveProperty(this.width):this.width}getHostRole(){return this.ariaExpanded||this.ariaHaspopup?"presentation":null}isButton(){return!this.href&&!this.decorative}isLink(){return!!this.href&&!this.decorative}determineTag(){return this.isButton()?"button":this.isLink()?"a":"div"}getButtonAriaLabel(){var e;return void 0!==this.buttonAriaLabel?this.buttonAriaLabel:this.buttonTitle?this.buttonTitle:(null==(e=this.element.textContent)?void 0:e.trim())||""}componentWillLoad(){this.hasIconSlot=hasNamedSlot(this.element,"icon"),resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)})}render(){let e=this.determineTag(),t=bem("cosmos-button");return h$2(T$2,{key:"0c3f9957c1bd8bf2fbfe0acdd1413e070cf673da",role:this.getHostRole()},h$2(e,{key:"57eb8593244d3af6a958da0893137c629da0a0cb",class:t({kind:this.kind,busy:this.busy,disabled:this.disabled||this.busy,appearance:this.computedAppearance,shape:this.shape||"pill",size:this.size,icon:this.iconPlacement,hovered:this.hovered,width:this.getWidth(),"has-icon":this.hasIconSlot}),disabled:this.disabled||this.busy,href:this.href,hreflang:this.isLink()?this.hreflang:void 0,target:this.target,rel:this.rel,ref:e=>this.buttonElement=e,type:this.getType(),part:"base","aria-expanded":this.ariaExpanded,"aria-haspopup":this.ariaHaspopup,"aria-label":this.getButtonAriaLabel(),title:this.buttonTitle},h$2("div",{key:"cf2cb6d14fd47379553b701fb9e49612c2e2630c",class:t("icon-container")},this.busy?h$2("cosmos-spinner",{class:t("spinner")}):h$2("slot",{name:"icon",onSlotchange:this.handleIconSlotChange})),h$2("cosmos-text",{key:"f826c9abe8713de5d106c2458e0ec6e01acf11db",class:t("label"),size:this.getTextSize(),tag:"span",weight:this.getTextWeight(),exportparts:"base: label"},h$2("span",{key:"334ec7cdefb4fa1738389c80b65fa2aea436ef36"},h$2("slot",{key:"c44d3be2f47a8a667a168456f2319d5cfe660261"})))))}
10get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}]}}static get style(){return'@charset "UTF-8";:host{display:inline-block;line-height:0;max-width:100%}:host([width=content]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}:host([width=full]){width:100%}@media screen and (min-width: 0){:host([width~="content@small"]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 0){:host([width~="full@small"]){width:100%}}@media screen and (min-width: 650px){:host([width~="content@medium"]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 650px){:host([width~="full@medium"]){width:100%}}@media screen and (min-width: 1000px){:host([width~="content@large"]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1000px){:host([width~="full@large"]){width:100%}}@media screen and (min-width: 1200px){:host([width~="content@x-large"]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1200px){:host([width~="full@x-large"]){width:100%}}@media screen and (min-width: 1350px){:host([width~="content@xx-large"]){width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1350px){:host([width~="full@xx-large"]){width:100%}}.cosmos-button:focus,.cosmos-button:focus:not(:focus-visible){outline:none}.cosmos-button:focus:not(:focus-visible)::before{content:none}.cosmos-button:focus::before{border-radius:calc(var(--focus-radius, 6px) * 1.5);bottom:calc((4px + var(--focus-offset, 0px)) * -1);-webkit-box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;left:calc((4px + var(--focus-offset, 0px)) * -1);position:absolute;right:calc((4px + var(--focus-offset, 0px)) * -1);top:calc((4px + var(--focus-offset, 0px)) * -1);content:""}.cosmos-button{--cosmos-icon-color:currentColor;--focus-offset:var(--cosmos-button-border-width, 1px);--icon-container-border-radius:var(--cosmos-button-border-radius, 2px);-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:var(--cosmos-button-border-color, transparent);border-radius:var(--cosmos-button-border-radius, 6px);border-style:solid;border-width:var(--cosmos-button-border-width, 1px);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-ms-flexbox;display:flex;height:var(--cosmos-button-height);-ms-flex-pack:center;justify-content:center;max-width:100%;outline:none;padding-block:0;position:relative;text-decoration:none;white-space:nowrap}.cosmos-button.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover);border-color:var(--cosmos-button-border-color-hover, transparent)}.cosmos-button--busy:not(.cosmos-button--has-icon) .cosmos-button__spinner{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cosmos-button--busy:not(.cosmos-button--has-icon) .cosmos-button__label{visibility:hidden}.cosmos-button--busy.cosmos-button--has-icon ::slotted([slot=icon]){display:none}.cosmos-button__label{-ms-flex-item-align:baseline;align-self:baseline;margin-inline:-4px;overflow:hidden;padding-inline:4px;text-overflow:ellipsis;white-space:nowrap;--cosmos-text-color:currentColor;--cosmos-text-font-family:var(--cosmos-button-font-family);--cosmos-text-font-size:var(--cosmos-button-font-size);--cosmos-text-font-style:var(--cosmos-button-font-style);--cosmos-text-font-weight:var(--cosmos-button-font-weight);--cosmos-text-letter-spacing:var(--cosmos-button-letter-spacing);--cosmos-text-line-height:var(--cosmos-button-line-height);--cosmos-text-text-transform:var(--cosmos-button-text-transform)}
10:not(.cosmos-button--kind-link).cosmos-button--size-small .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(36rem / var(--cosmos-base-font-size, 16)));-webkit-margin-before:calc(var(--cosmos-button-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-button-border-width, 1px) * -1)}.cosmos-button--kind-link.cosmos-button--shape-circle.cosmos-button--size-small .cosmos-button__label,.cosmos-button--kind-link.cosmos-button--shape-square.cosmos-button--size-small .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(36rem / var(--cosmos-base-font-size, 16)))}:not(.cosmos-button--kind-link).cosmos-button--size-medium .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(40rem / var(--cosmos-base-font-size, 16)));-webkit-margin-before:calc(var(--cosmos-button-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-button-border-width, 1px) * -1)}.cosmos-button--kind-link.cosmos-button--shape-circle.cosmos-button--size-medium .cosmos-button__label,.cosmos-button--kind-link.cosmos-button--shape-square.cosmos-button--size-medium .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(40rem / var(--cosmos-base-font-size, 16)))}:not(.cosmos-button--kind-link).cosmos-button--size-large .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(48rem / var(--cosmos-base-font-size, 16)));-webkit-margin-before:calc(var(--cosmos-button-border-width, 1px) * -1);margin-block-start:calc(var(--cosmos-button-border-width, 1px) * -1)}.cosmos-button--kind-link.cosmos-button--shape-circle.cosmos-button--size-large .cosmos-button__label,.cosmos-button--kind-link.cosmos-button--shape-square.cosmos-button--size-large .cosmos-button__label{--cosmos-text-line-height:var(--cosmos-button-line-height, calc(48rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--kind-link .cosmos-button__label{}@supports (hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){.cosmos-button--kind-link .cosmos-button__label{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}}.cosmos-button__icon-container:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only){-ms-flex-align:center;align-items:center;background:var(--cosmos-button-icon-background);border-radius:var(--icon-container-border-radius);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--icon-container-padding)}.cosmos-button__spinner{--cosmos-spinner-color:currentColor;height:calc(18rem / var(--cosmos-base-font-size, 16));width:calc(18rem / var(--cosmos-base-font-size, 16))}.cosmos-button ::slotted([slot=icon]),.cosmos-button__spinner{-ms-flex-negative:0;flex-shrink:0}.cosmos-button--icon-after{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.cosmos-button--width-content{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}.cosmos-button--width-full{width:100%}@media screen and (min-width: 0){.cosmos-button--width-content\\@small{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 0){.cosmos-button--width-full\\@small{width:100%}}@media screen and (min-width: 650px){.cosmos-button--width-content\\@medium{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 650px){.cosmos-button--width-full\\@medium{width:100%}}@media screen and (min-width: 1000px){.cosmos-button--width-content\\@large{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1000px){.cosmos-button--width-full\\@large{width:100%}}@media screen and (min-width: 1200px){.cosmos-button--width-content\\@x-large{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1200px){.cosmos-button--width-full\\@x-large{width:100%}}@media screen and (min-width: 1350px){.cosmos-button--width-content\\@xx-large{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}}@media screen and (min-width: 1350px){.cosmos-button--width-full\\@xx-large{width:100%}}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-small.cosmos-button--icon-before{-webkit-padding-start:var(--cosmos-button-padding-start, calc(12rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(12rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-small.cosmos-button--icon-after{-webkit-padding-end:var(--cosmos-button-padding-end, calc(12rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(12rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-small.cosmos-button--shape-pill,.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-small.cosmos-button--shape-rectangle{--icon-container-padding:calc(4rem / var(--cosmos-base-font-size, 16))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-medium.cosmos-button--icon-before{-webkit-padding-start:var(--cosmos-button-padding-start, calc(14rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(14rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-medium.cosmos-button--icon-after{-webkit-padding-end:var(--cosmos-button-padding-end, calc(14rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(14rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-medium.cosmos-button--shape-pill,.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-medium.cosmos-button--shape-rectangle{--icon-container-padding:calc(6rem / var(--cosmos-base-font-size, 16))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-large.cosmos-button--icon-before{-webkit-padding-start:var(--cosmos-button-padding-start, calc(24rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(24rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-large.cosmos-button--icon-after{-webkit-padding-end:var(--cosmos-button-padding-end, calc(24rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(24rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-large.cosmos-button--shape-pill,.cosmos-button--has-icon:not(.cosmos-button--shape-circle,.cosmos-button--shape-square,.cosmos-button--kind-link,.cosmos-button--label-only).cosmos-button--size-large.cosmos-button--shape-rectangle{--icon-container-padding:calc(8rem / var(--cosmos-base-font-size, 16))}.cosmos-button--size-small{--cosmos-button-height:calc(36rem / var(--cosmos-base-font-size, 16));--cosmos-icon-size:var(--cosmos-button-icon-size, calc(16rem / var(--cosmos-base-font-size, 16)));gap:var(--cosmos-button-gap, 0px);-webkit-padding-end:var(--cosmos-button-padding-end, calc(16rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(16rem / var(--cosmos-base-font-size, 16)));-webkit-padding-start:var(--cosmos-button-padding-start, calc(16rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(16rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--size-small.cosmos-button--kind-link.cosmos-button--has-icon{gap:var(--cosmos-button-gap, calc(4rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--size-medium{--cosmos-button-height:calc(40rem / var(--cosmos-base-font-size, 16));--cosmos-icon-size:var(--cosmos-button-icon-size, calc(18rem / var(--cosmos-base-font-size, 16)));gap:var(--cosmos-button-gap, 0px);-webkit-padding-end:var(--cosmos-button-padding-end, calc(20rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(20rem / var(--cosmos-base-font-size, 16)));-webkit-padding-start:var(--cosmos-button-padding-start, calc(20rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(20rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--size-medium.cosmos-button--kind-link.cosmos-button--has-icon{gap:var(--cosmos-button-gap, calc(6rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--size-large{--cosmos-button-height:calc(48rem / var(--cosmos-base-font-size, 16));--cosmos-icon-size:var(--cosmos-button-icon-size, calc(18rem / var(--cosmos-base-font-size, 16)));gap:var(--cosmos-button-gap, 0px);-webkit-padding-end:var(--cosmos-button-padding-end, calc(32rem / var(--cosmos-base-font-size, 16)));padding-inline-end:var(--cosmos-button-padding-end, calc(32rem / var(--cosmos-base-font-size, 16)));-webkit-padding-start:var(--cosmos-button-padding-start, calc(32rem / var(--cosmos-base-font-size, 16)));padding-inline-start:var(--cosmos-button-padding-start, calc(32rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--size-large.cosmos-button--kind-link.cosmos-button--has-icon{gap:var(--cosmos-button-gap, calc(6rem / var(--cosmos-base-font-size, 16)))}.cosmos-button--shape-pill:not(.cosmos-button--kind-link){--focus-radius:var(--cosmos-button-border-radius, 9999px);border-radius:var(--cosmos-button-border-radius, 9999px);--icon-container-border-radius:var(--cosmos-button-border-radius, 9999px)}.cosmos-button--shape-square,.cosmos-button--shape-circle{gap:0;padding:0;width:var(--cosmos-button-height)}.cosmos-button--shape-square .cosmos-button__label,.cosmos-button--shape-circle .cosmos-button__label{-ms-flex-item-align:center;align-self:center}.cosmos-button--shape-square.cosmos-button--busy .cosmos-button__label,.cosmos-button--shape-square.cosmos-button--has-icon .cosmos-button__label,.cosmos-button--shape-circle.cosmos-button--busy .cosmos-button__label,.cosmos-button--shape-circle.cosmos-button--has-icon .cosmos-button__label{display:none}.cosmos-button--shape-circle{--focus-radius:var(--cosmos-button-border-radius, 9999px);border-radius:var(--cosmos-button-border-radius, 9999px);--icon-container-border-radius:var(--cosmos-button-border-radius, 9999px)}.cosmos-button--kind-primary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-primary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, #C3093B)}
10.cosmos-button--kind-secondary.cosmos-button--appearance-dark{background:var(--cosmos-button-background, rgba(0, 15, 30, 0.1))}.cosmos-button--kind-secondary.cosmos-button--appearance-dark.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-secondary.cosmos-button--appearance-dark:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(0, 15, 30, 0.2))}.cosmos-button--kind-secondary.cosmos-button--appearance-light{background:var(--cosmos-button-background, rgba(255, 255, 255, 0.1))}.cosmos-button--kind-secondary.cosmos-button--appearance-light.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-secondary.cosmos-button--appearance-light:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(255, 255, 255, 0.2))}.cosmos-button--kind-tertiary.cosmos-button--appearance-dark.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-tertiary.cosmos-button--appearance-dark:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(0, 15, 30, 0.1));border-color:var(--cosmos-button-border-color-hover, rgba(0, 15, 30, 0.2))}.cosmos-button--kind-tertiary.cosmos-button--appearance-light.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-tertiary.cosmos-button--appearance-light:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(255, 255, 255, 0.1));border-color:var(--cosmos-button-border-color-hover, rgba(255, 255, 255, 0.2))}.cosmos-button--kind-bare.cosmos-button--appearance-dark.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-bare.cosmos-button--appearance-dark:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(0, 15, 30, 0.1))}.cosmos-button--kind-bare.cosmos-button--appearance-light.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-bare.cosmos-button--appearance-light:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(255, 255, 255, 0.1))}.cosmos-button--kind-link{border-radius:var(--cosmos-button-border-radius, 0);border-width:0}.cosmos-button--kind-link:not(.cosmos-button--shape-circle,.cosmos-button--shape-square){height:auto;padding:0}.cosmos-button--kind-link.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-link:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){border-width:0 0 var(--cosmos-button-border-width, 2px);margin-bottom:calc(var(--cosmos-button-border-width, 2px) * -1)}.cosmos-button--kind-link.cosmos-button--appearance-dark.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-link.cosmos-button--appearance-dark:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){border-color:var(--cosmos-button-border-color-hover, var(--cosmos-button-border-color, rgba(0, 15, 30, 0.2)))}.cosmos-button--kind-link.cosmos-button--appearance-light.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button--kind-link.cosmos-button--appearance-light:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){border-color:var(--cosmos-button-border-color-hover, var(--cosmos-button-border-color, rgba(255, 255, 255, 0.2)))}.cosmos-button--kind-secondary,.cosmos-button--kind-cover-up{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.cosmos-button--kind-tertiary,.cosmos-button--kind-bare,.cosmos-button--kind-link{background:var(--cosmos-button-background, transparent)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-primary,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up{color:var(--cosmos-button-color, #FFFFFF)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-primary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-primary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){color:var(--cosmos-button-color-hover, #FFFFFF)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary.c
10osmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare.cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link.cosmos-button--appearance-dark{color:var(--cosmos-button-color, #000F1E)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary.cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare.cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link.cosmos-button--appearance-light{color:var(--cosmos-button-color, #FFFFFF)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-dark{color:var(--cosmos-button-color-hover, #000F1E)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-secondary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light,.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-link:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled).cosmos-button--appearance-light{color:var(--cosmos-button-color-hover, #FFFFFF)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-primary{background:var(--cosmos-button-background, #DB0A40)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--appearance-dark{border-color:var(--cosmos-button-border-color, rgba(0, 15, 30, 0.2))}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--appearance-light{border-color:var(--cosmos-button-border-color, rgba(255, 255, 255, 0.2))}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary:focus.cosmos-button--appearance-dark{border-color:var(--cosmos-button-border-color, rgba(0, 15, 30, 0.1))}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary:focus.cosmos-button--appearance-light{border-color:var(--cosmos-button-border-color, rgba(255, 255, 255, 0.1))}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-tertiary:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-bare:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up{background:var(--cosmos-button-background, rgba(0, 15, 30, 0.6));border-color:var(--cosmos-button-border-color, rgba(255, 255, 255, 0.2))}.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up.cosmos-button--hovered:not(.cosmos-button--busy):not(.cosmos-button--disabled),.cosmos-button:not(.cosmos-button--disabled).cosmos-button--kind-cover-up:hover:not(.cosmos-button--busy):not(.cosmos-button--disabled){background:var(--cosmos-button-background-hover, rgba(0, 15, 30, 0.8));border-color:var(--cosmos-button-border-color-hover, rgba(255, 255, 255, 0.45))}.cosmos-button--disabled{cursor:not-allowed}.cosmos-button--disabled.cosmos-button--kind-primary{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.cosmos-button--disabled.cosmos-button--kind-primary.cosmos-button--appearance-dark{background:var(--cosmos-button-background, rgba(0, 15, 30, 0.1))}.cosmos-button--disabled.cosmos-button--kind-primary.cosmos-button--appearance-light{background:var(--cosmos-button-background, rgba(255, 255, 255, 0.1))}.cosmos-button--disabled.cosmos-button--kind-tertiary.cosmos-button--appearance-dark{border-color:var(--cosmos-button-border-color, rgba(0, 15, 30, 0.1))}.cosmos-button--disabled.cosmos-button--kind-tertiary.cosmos-button--appearance-light{border-color:var(--cosmos-button-border-color, rgba(255, 255, 255, 0.1))}.cosmos-button--disabled.cosmos-button--kind-cover-up{color:var(--cosmos-button-color, rgba(255, 255, 255, 0.45))}.cosmos-button--disabled.cosmos-button--kind-cover-up.cosmos-button--appearance-light{background:var(--cosmos-button-background, rgba(0, 15, 30, 0.45));border-color:var(--cosmos-button-border-color, rgba(255, 255, 255, 0.2))}.cosmos-button--disabled.cosmos-button--kind-cover-up.cosmos-button--appearance-dark{background:var(--cosmos-button-background, rgba(0, 15, 30, 0.45))}
10.cosmos-button--disabled.cosmos-button--appearance-dark:not(.cosmos-button--kind-cover-up){color:var(--cosmos-button-color, rgba(0, 15, 30, 0.45))}.cosmos-button--disabled.cosmos-button--appearance-light:not(.cosmos-button--kind-cover-up){color:var(--cosmos-button-color, rgba(255, 255, 255, 0.45))}'}},[257,"cosmos-button",{appearance:[513],ariaExpanded:[513,"aria-expanded"],ariaHaspopup:[513,"aria-haspopup"],busy:[516],buttonAriaLabel:[513,"button-aria-label"],buttonTitle:[513,"button-title"],decorative:[516],disabled:[516],hovered:[516],href:[513],hreflang:[513],iconPlacement:[513,"icon-placement"],kind:[513],rel:[513],shape:[513],size:[513],target:[513],type:[513],width:[513],computedAppearance:[32],hasIconSlot:[32],buttonBlur:[64],buttonFocus:[64]},[[2,"click","handleClick"]],{appearance:[{handleAppearanceChange:0}]}]);function defineCustomElement$N(){typeof customElements>"u"||["cosmos-button","cosmos-spinner","cosmos-text"].forEach(e=>{switch(e){case"cosmos-button":customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),l$6);break;case"cosmos-spinner":customElements.get(transformTag(transformTag(e)))||defineCustomElement$O();break;case"cosmos-text":customElements.get(transformTag(transformTag(e)))||defineCustomElement$R()}})}let i$3=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"1a97331a27834a74f65df5086e073b45d1ffd328",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"81f7105176798b5d5dbfb6b318a312cbbea87882",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"57feef43df4d625428ea35d3250dec611a4277c9","fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.773 14.712 12.061 11l3.712-3.712a.5.5 0 0 0 0-.707l-.354-.354a.5.5 0 0 0-.707 0L11 9.939 7.288 6.227a.5.5 0 0 0-.707 0l-.354.354a.5.5 0 0 0 0 .707L9.939 11l-3.712 3.712a.5.5 0 0 0 0 .707l.354.354a.5.5 0 0 0 .707 0L11 12.061l3.712 3.712a.5.5 0 0 0 .707 0l.354-.354a.5.5 0 0 0 0-.707",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-close-small",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$M(){typeof customElements>"u"||["cosmos-icon-close-small"].forEach(e=>{"cosmos-icon-close-small"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),i$3))})}let p$2=defineCustomElement$N,l$5=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"0d1e54e88446fc8b6e94414b6dbcdc5fcfb3a811",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"84965bfb59d072502d559a57589dbfa523594820",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"96fd86db7f566538c7dd028fefb75347dba8b0d0","fill-rule":"evenodd","clip-rule":"evenodd",d:"m6.56 11.09 5.83 5.82a.5.5 0 0 0 .71 0l.35-.35a.51.51 0 0 0 0-.71l-5.12-5.12 5.12-5.11a.51.51 0 0 0 0-.71l-.35-.35a.5.5 0 0 0-.71 0l-5.83 5.82a.51.51 0 0 0 0 .71",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-chevron-left",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$L(){typeof customElements>"u"||["cosmos-icon-chevron-left"].forEach(e=>{"cosmos-icon-chevron-left"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),l$5))})}let r$c=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"50377a3adbe09c89cd3362741094743a562318f3",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"2a66df66f7e5d83c8a9a493341e8fb2d60e2163a",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"8e816d5abc0d8895300d2989d278f71cabedc4a8","fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.45 10.38 9.62 4.56a.48.48 0 0 0-.7 0l-.36.35a.51.51 0 0 0 0 .71l5.12 5.12-5.12 5.
1011a.51.51 0 0 0 0 .71l.36.35a.48.48 0 0 0 .7 0l5.83-5.82a.51.51 0 0 0 0-.71",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-chevron-right",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$K(){typeof customElements>"u"||["cosmos-icon-chevron-right"].forEach(e=>{"cosmos-icon-chevron-right"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),r$c))})}let getAriaDescribedBy=e=>["help-text",e&&"validation-message"].filter(Boolean).join(" "),getAriaInvalid=e=>e?"true":"false",getAriaDisabled=e=>e?"true":void 0,getAriaRequired=e=>e?"true":void 0,getAriaExpanded=e=>e?"true":"false",o$d=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"995bdbf074b8b2951d7e468b9d60c90295eaa234",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"3aec324cab17b9891e93147e431adba94104eab4",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"5d8702b5bd350c4fa56a2155421faf46ddee7e36","fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.57 17.25 11.43 3.11a.49.49 0 0 0-.86 0L2.44 17.25a.5.5 0 0 0 .43.75h16.27a.5.5 0 0 0 .43-.75M10.25 9.5a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5zM11 16a1 1 0 1 1 0-2 1 1 0 0 1 0 2",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-warning",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$J(){typeof customElements>"u"||["cosmos-icon-warning"].forEach(e=>{"cosmos-icon-warning"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$d))})}let f$1=bem("cosmos-checkbox"),_=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.inputchangeEvent=createEvent(this,"inputchange",6),this.inputinvalidEvent=createEvent(this,"inputinvalid",7),this.checked=!1,this.hitArea="content",this.invalid=!1,this.required=!1,this.computedAppearance="dark",this.inputInvalid=!1,this.isHovered=!1,this.labelText="",this.wasSubmitted=!1,this.toggleCheckbox=()=>{this.input.click()},this.getValidationMessage=()=>this.validationMessage?this.validationMessage:this.inputInvalid&&!this.group&&this.input?this.input.validationMessage:void 0,this.reannounceValidationMessage=async()=>{this.validationMessageRef&&(this.validationMessageRef.ariaLabel="",await nextTick(),this.validationMessageRef.ariaLabel=this.getValidationMessage())},this.handleInputChange=e=>{let t=e.target;this.inputchangeEvent.emit({checked:t.checked}),!this.isValidityControlled()&&this.wasSubmitted&&(this.inputInvalid=!this.reportValidity())},this.isValidityControlled=()=>this.group?this.group.invalid||!1:this.invalid||!1,this.handleInvalid=e=>{e.preventDefault(),this.inputInvalid=!0,this.inputinvalidEvent.emit()},this.handleFormData=e=>{if(this.input&&this.name&&this.isInputChecked()&&!this.disabled)return e.formData.append(this.input.name,this.input.value)},this.handleFormSubmit=e=>{this.wasSubmitted=!0,this.input&&!this.reportValidity()&&(e.preventDefault(),this.reannounceValidationMessage())},this.hoveredOn=()=>{this.isHovered=!0},this.hoveredOff=()=>{this.isHovered=!1},this.handleSlotChange=()=>{this.labelText=getDefaultSlotTextContent(this.defaultSlotRef)}}handleChecked(){this.setInputIndeterminateAttribute()}handleAppearanceChange(e){this.computedAppearance=e}handleInvalidChange(e){this.inputInvalid=e}async inputBlur(){this.input.blur()}async inputFocus(){this.input.focus()}async inputCheckValidity(){return this.checkValidity()}async inputReportValidity(){let e=this.reportValidity();return this.inputInvalid=!e,e}async inputSetCustomValidity(e){this.input.setCustomValidity(e)}isChecked(){return stringBooleanToBoolean(this.checked)}isInputChecked(){var e;return(null==(e=this.input)?void 0:e.checked)===!0&&!this.isInputIndeterminate()}isIndeterminate(){return"indeterminate"===this.checked}isInputIndeterminate(){var e;return(null==(e=this.input)?void 0:e.indeterminate)===!0}setInputIndeterminateAttribute(){this.input&&(this.input.indeterminate=this.isIndeterminate())}hasRequiredLabel(){return!!this.required&&!!this.requiredLabel}hasRequiredOrOptionalLabel(){return this.hasRequiredLabel()||!!this.optionalLabel}hasHelpText(){return!!this.helpText||hasNamedSlot(this.element,"help-text")}getTitle(){return this.clamp?this.labelText:void 0}getAriaDescribedby(){let e=[];return this.inputInvalid&&this.getValidationMessage()&&e.push("validation-message"),this.hasHelpText()&&e.push("help-text"),e.length?e.join(" "):void 0}getAriaChecked(){return!!this.isIndeterminate()&&"mixed"}getHelpText(){return this.helpText?this.helpText:hasNamedSlot(this.element,"help-text")?getNamedSlotTextContent(this.element,"help-text"):void 0}getAllCheckboxes(){return this.group?[...this.group.querySelectorAll(`${transformTag("cosmos-checkbox")}
10[name="${this.name}"]`)].filter(e=>!e.disabled):[this.element]}checkValidity(){let e=this.getAllCheckboxes(),t=null==e?void 0:e.some(e=>e.shadowRoot.querySelector('input[type="checkbox"]').checked);return!(null!=e&&e.some(e=>e.required))||t}reportValidity(){let e=this.checkValidity();return e||(this.input.required=!0,this.input.reportValidity()),e}connectedCallback(){this.form=this.element.closest("form"),this.group=this.element.closest(transformTag("cosmos-checkbox-group")),this.form&&(this.form.addEventListener("formdata",this.handleFormData,!0),this.form.addEventListener("submit",this.handleFormSubmit,!0))}componentWillLoad(){this.inputInvalid=this.invalid,resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)})}componentDidLoad(){this.setInputIndeterminateAttribute(),Kt.observe(this.element,this.handleSlotChange)}disconnectedCallback(){this.form&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit)),Kt.unobserve(this.element)}render(){let e=this.getValidationMessage(),t=this.getHelpText(),i=!!this.labelText;return h$2("div",{key:"5e27d364f6a79a5b2674291c60c4640e40b1d898",class:f$1({appearance:this.computedAppearance,clamp:this.clamp,disabled:this.disabled,hovered:this.isHovered,indeterminate:this.isIndeterminate(),invalid:this.inputInvalid,"has-help-text":this.hasHelpText()}),part:"base"},h$2("div",{key:"a901c7d51a514324aeabaddbe6f38f2d22263889",class:f$1("input-and-prefix")},h$2("cosmos-text",{key:"96da121dbcd424d54d7ba4928f9b2b5216997ac0","aria-hidden":"true",class:f$1("aligner"),size:"small",tag:"span"}),h$2("div",{key:"d2d0393b3415986b898c23ff92366cb63011b0b7",class:f$1("input-container")},h$2("input",{key:"3bc1b6522ec1454ced0a54d0d616dc43ea737133","aria-checked":this.getAriaChecked(),"aria-describedby":getAriaDescribedBy(this.inputInvalid),"aria-invalid":getAriaInvalid(this.inputInvalid),"aria-label":this.labelText,"aria-required":getAriaRequired(this.required),autofocus:this.autofocus,checked:this.isChecked(),class:f$1("input"),disabled:this.disabled,id:"checkbox",name:this.name,onChange:this.handleInputChange,onInvalid:this.handleInvalid,ref:e=>this.input=e,required:this.required,type:"checkbox",value:this.value}),h$2("span",{key:"df95d86cdea571776b29d8d0ac403e97e445a1b3",class:f$1("control"),part:"checkbox"}),h$2("svg",{key:"74ab84f3abc1d1e2f27325834fd17e98283a1bb2","aria-hidden":"true",class:f$1("tick",{selected:!0}),viewBox:"0 0 14 10",xmlns:"http://www.w3.org/2000/svg"},h$2("path",{key:"5b0ecdb126a0c7050a16d65098823862571f56fb",d:"M0.985237 6.1331C0.692033 5.85873 0.67668 5.39865 0.950941 5.10535L1.1595 4.8823C1.42921 4.59387 1.8798 4.57335 2.1746 4.83608L5.21473 7.54546L11.824 0.477201C12.1114 0.169801 12.599 0.169801 12.8864 0.4772L13.0808 0.685097C13.3422 0.964657 13.3422 1.39898 13.0808 1.67854L5.71164 9.55949C5.43724 9.85296 4.97686 9.86832 4.6835 9.5938L0.985237 6.1331Z"})),h$2("span",{key:"197fc01241a63446fab416a32c4d8dd252e5d43d",class:f$1("hyphen")})),h$2("div",{key:"4ad7a09eaa6b107f1edd118cc896111ba58ce2ec",id:"prefix","aria-hidden":"true",class:f$1("prefix",{"end-margin":i}),part:"prefix",onClick:this.toggleCheckbox,onMouseEnter:this.hoveredOn,onMouseLeave:this.hoveredOff},h$2("slot",{key:"001a510fa9ce690d4b4a30f726a8296edee24417",name:"prefix"}))),h$2("div",{key:"35941b517699616a17c5d8759cf60857cf7e3c11",class:f$1("content",{row:"row"===this.hitArea})},h$2("label",{key:"9a295075190a706783f07e8a0e32081a5b9bd00f",class:f$1("label"),htmlFor:"checkbox",onMouseEnter:this.hoveredOn,onMouseLeave:this.hoveredOff},h$2("cosmos-text",{key:"0e77974c649307e2d6ca8d9a1c615836e31359c2",appearance:this.computedAppearance,clamp:this.clamp,class:f$1("label-text"),exportparts:"base: label",tag:"span",title:this.getTitle(),size:"small"},h$2("span",{key:"e8f0e30a0f692225ffad9a781a16e0affce5b6d6"},h$2("slot",{key:"ba4f1ed094feebbf12703ee0b745426e79ac9b37",ref:e=>this.defaultSlotRef=e}))),this.hasRequiredOrOptionalLabel()&&h$2("cosmos-text",{key:"9c9410ecd744db056e06cce56b073515f792c66e",appearance:this.computedAppearance,"aria-hidden":"true",class:f$1("required-optional-label"),exportparts:"base: required-label",kind:"subtle",size:"xx-small",tag:"span"},this.hasRequiredLabel()||this.required?this.requiredLabel:this.optionalLabel)),h$2("cosmos-text",{key:"6364f8db518a692f6d6fb16106c1e042960261c4",appearance:this.computedAppearance,clamp:this.clamp,class:f$1("help-text"),exportparts:"base: help-text",kind:"subtle",size:"x-small"},h$2("span",{key:"dabe1b70dcbe479f79233b7eda34c40ba5e50163","aria-label":t,id:"help-text"},h$2("slot",{key:"817e26ebfa01d35042504c092cbca232c7ffa5cf",name:"help-text"},this.helpText))),h$2("div",{key:"82f3e4472a7536728826fe86e4a16f7a09646ba1","aria-atomic":"false","aria-live":"polite",class:f$1("validation-message-container")},this.inputInvalid&&!!e&&h$2("div",{key:"c2b689d8285cd96a558ee2441f8e9fed6851b3b4",class:f$1("validation-message")},h$2("cosmos-icon-warning",{key:"78f49ecccf81414b03a808931f999e43404b4085","aria-hidden":"true",class:f$1("validation-message-icon")}
10),h$2("cosmos-text",{key:"9f8b44fd7422b70313e01973c5f06cdc402042e0",appearance:this.computedAppearance,class:f$1("validation-message-text"),exportparts:"base: validation-message",size:"x-small",tag:"span"},h$2("span",{key:"2301182fb75c538a7b2b9df672a43b7fbc2622f5","aria-label":e,id:"validation-message",ref:e=>this.validationMessageRef=e},e))))))}get element(){return this}static get watchers(){return{checked:[{handleChecked:0}],appearance:[{handleAppearanceChange:0}],invalid:[{handleInvalidChange:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;min-width:0;width:100%}.cosmos-checkbox{-ms-flex-align:baseline;align-items:baseline;display:-ms-flexbox;display:flex}.cosmos-checkbox__input-and-prefix{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0}.cosmos-checkbox__aligner{--cosmos-text-font-family:var(--cosmos-checkbox-font-family);--cosmos-text-font-size:var(--cosmos-checkbox-font-size);--cosmos-text-font-style:var(--cosmos-checkbox-font-style);--cosmos-text-font-weight:var(--cosmos-checkbox-font-weight);--cosmos-text-letter-spacing:var(--cosmos-checkbox-letter-spacing);--cosmos-text-line-height:var(--cosmos-checkbox-line-height);--cosmos-text-text-transform:var(--cosmos-checkbox-text-transform);width:0}.cosmos-checkbox__aligner::before{content:"\xa0"}.cosmos-checkbox__input-container{-ms-flex-negative:0;flex-shrink:0;height:var(--cosmos-checkbox-size, 16px);-webkit-margin-end:var(--cosmos-checkbox-gap, calc(0.5 * var(--cosmos-checkbox-size, 16px)));margin-inline-end:var(--cosmos-checkbox-gap, calc(0.5 * var(--cosmos-checkbox-size, 16px)));position:relative;width:var(--cosmos-checkbox-size, 16px)}.cosmos-checkbox__prefix{display:grid}.cosmos-checkbox__prefix>[slot=prefix]{-webkit-margin-end:var(--cosmos-checkbox-gap, calc(0.375 * var(--cosmos-checkbox-size, 16px)));margin-inline-end:var(--cosmos-checkbox-gap, calc(0.375 * var(--cosmos-checkbox-size, 16px)))}.cosmos-checkbox__prefix ::slotted([slot=prefix]){--cosmos-icon-size:18px;--cosmos-flag-width:18px;--cosmos-avatar-size:18px;-webkit-margin-end:var(--cosmos-checkbox-gap, calc(0.375 * var(--cosmos-checkbox-size, 16px)));margin-inline-end:var(--cosmos-checkbox-gap, calc(0.375 * var(--cosmos-checkbox-size, 16px)));position:relative}.cosmos-checkbox__prefix ::slotted([slot=prefix])::before{content:"";display:block;height:100%;left:0;min-height:calc(var(--cosmos-checkbox-size, 16px) + calc(0.25 * var(--cosmos-checkbox-size, 16px)) * 2);position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cosmos-checkbox__input:focus,.cosmos-checkbox__input:focus:not(:focus-visible){outline:none}.cosmos-checkbox__input:focus:not(:focus-visible)::before{content:none}.cosmos-checkbox__input:focus::before{border-radius:calc(var(--cosmos-checkbox-border-radius, 4px) * 1.5);bottom:calc((4px + 0px) * -1);-webkit-box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;left:calc((4px + 0px) * -1);position:absolute;right:calc((4px + 0px) * -1);top:calc((4px + 0px) * -1);content:""}.cosmos-checkbox__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;-webkit-box-shadow:none;box-shadow:none;display:block;height:var(--cosmos-checkbox-size, 16px);margin:0;outline:none;width:var(--cosmos-checkbox-size, 16px)}.cosmos-checkbox__input::after{-webkit-box-sizing:content-box;box-sizing:content-box;content:"";display:block;height:calc(var(--cosmos-checkbox-size, 16px) + calc(0.25 * var(--cosmos-checkbox-size, 16px)) * 2);-webkit-margin-start:calc(calc(0.25 * var(--cosmos-checkbox-size, 16px)) * -1);margin-inline-start:calc(calc(0.25 * var(--cosmos-checkbox-size, 16px)) * -1);position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:calc(var(--cosmos-checkbox-size, 16px) + calc(0.25 * var(--cosmos-checkbox-size, 16px)) * 2);z-index:1}.cosmos-checkbox__input:checked~.cosmos-checkbox__tick{opacity:1}.cosmos-checkbox__input:not(:indeterminate)~.cosmos-checkbox__hyphen{display:none}.cosmos-checkbox__control{border-radius:var(--cosmos-checkbox-border-radius, 4px);border-style:solid;border-width:var(--cosmos-checkbox-border-width, 1px);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;height:100%;left:0;position:absolute;top:0;width:100%}.cosmos-checkbox__tick{fill:currentColor;height:calc(var(--cosmos-checkbox-size, 16px) / 2);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cosmos-checkbox__hyphen{border-radius:0.5px;display:block;height:calc(var(--cosmos-checkbox-size, 16px) / 10);left:50%;pointer-events:none;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:calc(var(--cosmos-checkbox-size, 16px) / 2)}.cosmos-checkbox__content{position:relative}.cosmos-checkbox__content--row{width:100%}.cosmos-checkbox__content--row label{display:inline-block;width:100%}.cosmos-checkbox__label{position:relative}.cosmos-checkbox__label::before{bottom:calc(calc(0.25 * var(--cosmos-checkbox-size, 16px)) * -1);content:"";left:0;position:absolute;right:0;top:calc(calc(0.25 * var(--cosmos-checkbox-size, 16px)) * -1)}.cosmos-checkbox__label-text{--cosmos-text-color:var(--cosmos-checkbox-color);--cosmos-text-font-family:var(--cosmos-checkbox-font-family);--cosmos-text-font-size:var(--cosmos-checkbox-font-size);--cosmos-text-font-style:var(--cosmos-checkbox-font-style);
10--cosmos-text-font-weight:var(--cosmos-checkbox-font-weight);--cosmos-text-letter-spacing:var(--cosmos-checkbox-letter-spacing);--cosmos-text-line-height:var(--cosmos-checkbox-line-height);--cosmos-text-text-transform:var(--cosmos-checkbox-text-transform);display:inline;position:relative}.cosmos-checkbox--hovered .cosmos-checkbox__label-text{--cosmos-text-color:var(--cosmos-checkbox-color-hover)}.cosmos-checkbox__required-optional-label{--cosmos-text-color:var(--cosmos-checkbox-required-optional-label-color);--cosmos-text-font-family:var(--cosmos-checkbox-required-optional-label-font-family);--cosmos-text-font-size:var(--cosmos-checkbox-required-optional-label-font-size);--cosmos-text-font-style:var(--cosmos-checkbox-required-optional-label-font-style);--cosmos-text-font-weight:var(--cosmos-checkbox-required-optional-label-font-weight);--cosmos-text-letter-spacing:var(--cosmos-checkbox-required-optional-label-letter-spacing);--cosmos-text-line-height:var(--cosmos-checkbox-required-optional-label-line-height);--cosmos-text-text-transform:var(--cosmos-checkbox-required-optional-label-text-transform);display:inline;-webkit-margin-start:4px;margin-inline-start:4px;white-space:nowrap}.cosmos-checkbox__help-text{--cosmos-text-color:var(--cosmos-checkbox-help-text-color);--cosmos-text-font-family:var(--cosmos-checkbox-help-text-font-family);--cosmos-text-font-size:var(--cosmos-checkbox-help-text-font-size);--cosmos-text-font-style:var(--cosmos-checkbox-help-text-font-style);--cosmos-text-font-weight:var(--cosmos-checkbox-help-text-font-weight);--cosmos-text-letter-spacing:var(--cosmos-checkbox-help-text-letter-spacing);--cosmos-text-line-height:var(--cosmos-checkbox-help-text-line-height);--cosmos-text-text-transform:var(--cosmos-checkbox-help-text-text-transform);display:block;padding-top:4px}.cosmos-checkbox:not(.cosmos-checkbox--has-help-text) .cosmos-checkbox__help-text{display:none}.cosmos-checkbox--appearance-dark{color:var(--cosmos-checkbox-color, #000F1E)}.cosmos-checkbox--appearance-dark .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-dark .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, #000F1E)}.cosmos-checkbox--appearance-dark .cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, transparent);border-color:var(--cosmos-checkbox-border-color, rgba(0, 15, 30, 0.6))}.cosmos-checkbox--appearance-dark .cosmos-checkbox__tick{color:var(--cosmos-checkbox-icon-color, #FFFFFF)}.cosmos-checkbox--appearance-dark .cosmos-checkbox__hyphen{background-color:var(--cosmos-checkbox-icon-color, #FFFFFF)}.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover,.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered{color:var(--cosmos-checkbox-color-hover, #000F1E)}.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input~.cosmos-checkbox__control,.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input~.cosmos-checkbox__control{background:var(--cosmos-checkbox-background-color-hover, rgba(0, 15, 30, 0.1))}.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control,.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-dark:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color-hover, rgba(0, 15, 30, 0.8));border-color:var(--cosmos-checkbox-border-color-hover, rgba(0, 15, 30, 0.1))}.cosmos-checkbox--appearance-light{color:var(--cosmos-checkbox-color, #FFFFFF)}.cosmos-checkbox--appearance-light .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-light .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, #FFFFFF)}.cosmos-checkbox--appearance-light .cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, transparent);border-color:var(--cosmos-checkbox-border-color, rgba(255, 255, 255, 0.6))}.cosmos-checkbox--appearance-light .cosmos-checkbox__tick{color:var(--cosmos-checkbox-icon-color, #000F1E)}
10.cosmos-checkbox--appearance-light .cosmos-checkbox__hyphen{background-color:var(--cosmos-checkbox-icon-color, #000F1E)}.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover,.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered{color:var(--cosmos-checkbox-color-hover, #FFFFFF)}.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input~.cosmos-checkbox__control,.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input~.cosmos-checkbox__control{background:var(--cosmos-checkbox-background-color-hover, rgba(255, 255, 255, 0.1))}.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled) .cosmos-checkbox__input-container:hover .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control,.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--appearance-light:not(.cosmos-checkbox--disabled).cosmos-checkbox--hovered .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color-hover, rgba(255, 255, 255, 0.8));border-color:var(--cosmos-checkbox-border-color-hover, rgba(255, 255, 255, 0.1))}.cosmos-checkbox--disabled{pointer-events:none}.cosmos-checkbox--disabled .cosmos-checkbox__prefix{opacity:0.4}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-dark .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--disabled.cosmos-checkbox--appearance-dark .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, rgba(0, 15, 30, 0.45));border-color:var(--cosmos-checkbox-border-color, transparent)}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-dark .cosmos-checkbox__control{border-color:var(--cosmos-checkbox-border-color, rgba(0, 15, 30, 0.45))}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-dark .cosmos-checkbox__label-text{--cosmos-text-color:var(--cosmos-checkbox-color, rgba(0, 15, 30, 0.45))}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-light .cosmos-checkbox__input:checked~.cosmos-checkbox__control,.cosmos-checkbox--disabled.cosmos-checkbox--appearance-light .cosmos-checkbox__input:indeterminate~.cosmos-checkbox__control{background-color:var(--cosmos-checkbox-background-color, rgba(255, 255, 255, 0.45));border-color:var(--cosmos-checkbox-border-color, transparent)}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-light .cosmos-checkbox__control{border-color:var(--cosmos-checkbox-border-color, rgba(255, 255, 255, 0.45))}.cosmos-checkbox--disabled.cosmos-checkbox--appearance-light .cosmos-checkbox__label-text{--cosmos-text-color:var(--cosmos-checkbox-color, rgba(255, 255, 255, 0.45))}.cosmos-checkbox--invalid .cosmos-checkbox__control{border-color:var(--cosmos-checkbox-invalid-color, #E06600);border-width:var(--cosmos-checkbox-border-width, 2px)}.cosmos-checkbox--invalid .cosmos-checkbox__required-label{--cosmos-text-color:var(--cosmos-checkbox-invalid-color, #E06600)}.cosmos-checkbox__validation-message{display:-ms-flexbox;display:flex;gap:4px;margin-top:4px}.cosmos-checkbox__validation-message-text{--cosmos-text-color:var(--cosmos-checkbox-color);--cosmos-text-font-family:var(--cosmos-checkbox-validation-message-font-family);--cosmos-text-font-size:var(--cosmos-checkbox-validation-message-font-size);--cosmos-text-font-style:var(--cosmos-checkbox-validation-message-font-style);--cosmos-text-font-weight:var(--cosmos-checkbox-validation-message-font-weight);--cosmos-text-letter-spacing:var(--cosmos-checkbox-validation-message-letter-spacing);--cosmos-text-line-height:var(--cosmos-checkbox-validation-message-line-height);--cosmos-text-text-transform:var(--cosmos-checkbox-validation-message-text-transform)}.cosmos-checkbox__validation-message-icon{--cosmos-icon-color:var(--cosmos-checkbox-invalid-color, #E06600);--cosmos-icon-size:calc(16rem / var(--cosmos-base-font-size, 16));-ms-flex-negative:0;flex-shrink:0;padding:1.5px 0}.cosmos-checkbox--clamp .cosmos-checkbox__content{min-width:0}.cosmos-checkbox--clamp .cosmos-checkbox__label{-ms-flex-align:baseline;align-items:baseline;display:-ms-flexbox;display:flex;min-width:0}.cosmos-checkbox--clamp .cosmos-checkbox__label-text{display:-ms-flexbox;display:flex;min-width:0}'}},[257,"cosmos-checkbox",{appearance:[513],autofocus:[516],checked:[520],clamp:[516],disabled:[516],helpText:[513,"help-text"],hitArea:[513,"hit-area"],invalid:[516],name:[513],optionalLabel:[513,"optional-label"],required:[516],requiredLabel:[513,"required-label"],validationMessage:[513,"validation-message"],value:[513],computedAppearance:[32],inputInvalid:[32],isHovered:[32],labelText:[32],inputBlur:[64],inputFocus:[64],inputCheckValidity:[64],inputReportValidity:[64],inputSetCustomValidity:[64]},void 0,{checked:[{handleChecked:0}],appearance:[{handleAppearanceChange:0}],invalid:[{handleInvalidChange:0}]}]);function defineCustomElement$I(){typeof customElements>"u"||["cosmos-checkbox","cosmos-icon-warning","cosmos-text"].forEach(e
10=>{switch(e){case"cosmos-checkbox":customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),_);break;case"cosmos-icon-warning":customElements.get(transformTag(transformTag(e)))||defineCustomElement$J();break;case"cosmos-text":customElements.get(transformTag(transformTag(e)))||defineCustomElement$R()}})}let r$b=defineCustomElement$I,FormField=({helpText:e,appearance:t="dark",disabled:i,hideLabel:n,label:r,invalid:o,labelForValue:a,requiredLabel:s,optionalLabel:l,validationMessage:c,class:u,element:d,required:h,validationMessageRef:p},f)=>{let m=bem("cosmos-form-field"),g=h?s:l,v=function(){return e||(hasNamedSlot(d,"help-text")?getNamedSlotTextContent(d,"help-text"):"")}();return h$2("div",{class:[u,m({invalid:o,disabled:i,appearance:t})].join(" "),part:"base"},h$2("div",{class:m("info-container",{"has-label":!!r,"has-help-text":!!v,"has-required-optional-label":!!g,"hide-label":n&&!!r})},h$2("label",{htmlFor:a??void 0,class:m("label"),onClick:()=>{let e=d.shadowRoot.querySelector(`#${a}`);null!=e&&e.hasAttribute("role")&&e.focus()}},h$2("cosmos-text",{appearance:t,class:m("label-text"),exportparts:"base: label",size:"x-small",tag:"span",weight:"medium"},h$2("span",{id:"label"},r)),g&&h$2("cosmos-text",{appearance:t,"aria-hidden":"true",class:m("required-optional-label"),exportparts:"base: required-label",kind:"subtle",size:"xx-small",tag:"span"},g)),h$2("cosmos-text",{appearance:t,class:m("help-text"),kind:"subtle",size:"x-small",exportparts:"base: help-text"},h$2("span",{"aria-label":v,id:"help-text"},h$2("slot",{name:"help-text"},e)))),h$2("div",null,f),h$2("div",{"aria-atomic":"false","aria-live":"polite",class:m("validation-message-container")},o&&c&&h$2("div",{class:m("validation-message")},h$2("cosmos-icon-warning",{"aria-hidden":"true",class:m("validation-message-icon")}),h$2("cosmos-text",{appearance:t,class:m("validation-message-text"),exportparts:"base: validation-message",size:"x-small",tag:"span"},h$2("span",{"aria-label":c,id:"validation-message",ref:p},c)))))},c$5=proxyCustomElement(class extends b$3{handleVideoChange(){this.canPlayThroughVideo=!1}handleAppearanceChange(e){this.computedAppearance=e}handleActiveChange(e){e?this.startVideo():this.stopVideo()}handlePlayVideoChange(e){e?this.startVideo():this.stopVideo()}async startVideo(){this.canHandleVideo()&&(this.isVideoPlaying=!0,await this.showVideo(),this.videoElement.play())}async stopVideo(){this.canHandleVideo()&&(await this.hideVideo(),this.isVideoPlaying=!1,this.videoElement.pause(),this.videoElement.currentTime=0)}async showVideo(){this.canPlayThroughVideo&&(this.isVideoVisible=!0,await this.cssTransition.enter(this.videoElement,200))}async hideVideo(){this.isVideoVisible=!1,await this.cssTransition.leave(this.videoElement,200)}canHandleVideo(){return!!this.video&&!hasReducedMotion()}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.imageResizeEvent=createEvent(this,"imageresize",5),this.radius="none",this.canPlayThroughVideo=!1,this.computedAppearance="light",this.isVideoPlaying=!1,this.isVideoVisible=!1,this.generateClassNames=bem("cosmos-media-preview"),this.handleImageResize=({detail:{height:e,width:t}})=>{this.imageResizeEvent.emit({height:e,width:t})},this.handleCanPlayThrough=()=>{this.canPlayThroughVideo||(this.canPlayThroughVideo=!0,this.isVideoPlaying&&this.showVideo())},this.handleVideoCompletion=async()=>{await this.hideVideo()},this.cssTransition=new i$5}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"dark",light:"light"},callback:this.handleAppearanceChange.bind(this)}),(this.playVideo||this.active)&&this.startVideo()}render(){return h$2("div",{key:"4b08e3912c98a417ab27f0eba89ec2a5f5abc9e1",class:this.generateClassNames({active:this.active,appearance:this.computedAppearance,radius:this.radius}),part:"base"},h$2("div",{key:"38438e7ffbe3a1607d53df7ec7eb86b3eeb4bf93",class:this.generateClassNames("container")},h$2("cosmos-image",{key:"a74ea66697be66266e6c45a70bab54d7689a792b",class:this.generateClassNames("image"),image:this.image,imagePreview:this.imagePreview,imageAlt:this.imageAlt,appearance:this.appearance,observeResize:this.observeResize,onImageresize:this.handleImageResize,loading:this.loading,sizes:this.sizes,srcset:this.srcset}),this.video&&h$2("video",{key:"acd3f70c341d571647d075d825089030959da970",class:this.generateClassNames("video",{visible:this.isVideoVisible&&this.isVideoPlaying}),ref:e=>this.videoElement=e,src:this.video,muted:!0,preload:"none",playsInl
10ine:!0,onCanPlayThrough:this.handleCanPlayThrough,"aria-hidden":"true",onEnded:this.handleVideoCompletion})))}get element(){return this}static get watchers(){return{video:[{handleVideoChange:0}],appearance:[{handleAppearanceChange:0}],active:[{handleActiveChange:0}],playVideo:[{handlePlayVideoChange:0}]}}static get style(){return":host{display:-ms-flexbox;display:flex;overflow:hidden}.cosmos-media-preview{-ms-flex-positive:1;flex-grow:1;overflow:hidden;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.cosmos-media-preview--radius-none{border-radius:var(--cosmos-media-preview-border-radius, 0)}.cosmos-media-preview--radius-small{border-radius:var(--cosmos-media-preview-border-radius, 2px)}.cosmos-media-preview--radius-medium{border-radius:var(--cosmos-media-preview-border-radius, 6px)}.cosmos-media-preview--radius-large{border-radius:var(--cosmos-media-preview-border-radius, 8px)}.cosmos-media-preview--radius-full{border-radius:var(--cosmos-media-preview-border-radius, 9999px)}.cosmos-media-preview__container{-ms-flex-positive:1;flex-grow:1;height:100%;overflow:hidden;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:-webkit-transform 0.6s cubic-bezier(0.35, 0, 0, 1);transition:-webkit-transform 0.6s cubic-bezier(0.35, 0, 0, 1);transition:transform 0.6s cubic-bezier(0.35, 0, 0, 1);transition:transform 0.6s cubic-bezier(0.35, 0, 0, 1), -webkit-transform 0.6s cubic-bezier(0.35, 0, 0, 1);width:100%}.cosmos-media-preview--active .cosmos-media-preview__container{-webkit-transform:scale(1.04) translate3d(0, 0, 0);transform:scale(1.04) translate3d(0, 0, 0)}.cosmos-media-preview__image{height:100%}.cosmos-media-preview__video{display:block;height:100%;left:0;-o-object-fit:cover;object-fit:cover;opacity:0;position:absolute;top:0;width:100%;z-index:4}.cosmos-media-preview__video--visible{opacity:1}.cosmos-media-preview__video.enter{opacity:0;-webkit-transition:0.2s ease-in;transition:0.2s ease-in}.cosmos-media-preview__video.enter-active{opacity:1}.cosmos-media-preview__video.leave{opacity:1;-webkit-transition:0.2s ease-in;transition:0.2s ease-in}.cosmos-media-preview__video.leave-active{opacity:0}"}},[1,"cosmos-media-preview",{active:[516],appearance:[513],image:[513],imageAlt:[513,"image-alt"],imagePreview:[513,"image-preview"],loading:[513],observeResize:[516,"observe-resize"],playVideo:[516,"play-video"],radius:[513],sizes:[513],srcset:[513],video:[513],canPlayThroughVideo:[32],computedAppearance:[32],isVideoPlaying:[32],isVideoVisible:[32]},void 0,{video:[{handleVideoChange:0}],appearance:[{handleAppearanceChange:0}],active:[{handleActiveChange:0}],playVideo:[{handlePlayVideoChange:0}]}]);function defineCustomElement$H(){typeof customElements>"u"||["cosmos-media-preview","cosmos-image"].forEach(e=>{switch(e){case"cosmos-media-preview":customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),c$5);break;case"cosmos-image":customElements.get(transformTag(transformTag(e)))||defineCustomElement$Q()}})}let m$2=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.mode="light"}render(){return h$2("slot",{key:"4f2803236e94b248c74c8253a6eb7072739b9eea"})}get element(){return this}},[260,"cosmos-mode",{mode:[513]}]);function defineCustomElement$G(){typeof customElements>"u"||["cosmos-mode"].forEach(e=>{"cosmos-mode"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),m$2))})}let z=bem("cosmos-title"),f=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.kind="normal",this.size="medium",this.spacing="none",this.tag="p",this.weight="bold",this.computedAppearance="dark"}handleAppearanceChange(e){this.computedAppearance=e}setNumericClampValue(){this.numericClampValue=getNumericClampValue(this.clamp)}getSize(){return this.size&&isResponsiveProperty(this.size)?parseResponsiveProperty(this.size):this.size}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)}),this.setNumericClampValue()}render(){var e;let t=null!=(e=this.tag)?e:"p";return h$2(T$2,{key:"6f1430e7ae79c6dd93513e2efe542b044cf62afe",style:isMultiLineClamp(this.numericClampValue)?{"--cosmos-title-clamp-length":`${this.numericClampValue}`}:{}},h$2(t,{key:"727ba070888c9033985d179b8cf4a4a7b8a23c6f",class:z({appearance:this.computedAppearance,size:this.getSize(),spacing:this.spacing,weight:this.weight,"single-line-clamp":isSingleLineClamp(this.numericClampValue),"multi-line-clamp":isMultiLineClamp(this.numericClampValue),kind:this.kind}),part:"base"},h$2("slot",{key:"dbef6ba678e18e8c14b26156effdf577403809da"})))}
10get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],clamp:[{setNumericClampValue:0}]}}static get style(){return"@charset \"UTF-8\";:host{display:block}:host([clamp]){min-width:0;overflow:clip}:host([clamp]:focus-within){overflow:visible}:host{--cosmos-title-font-family-default:var(--cosmos-font-family-title, Bull, Helvetica, sans-serif)}@supports (font-variation-settings: normal){:host{--cosmos-title-font-family-default:var(       --cosmos-font-family-title-variable,       Bull VF, Helvetica, sans-serif     )}}:host(:lang(ja)){--cosmos-title-font-family-default:var(--cosmos-font-family-japanese-title, Noto Sans JP, Helvetica, sans-serif)}:host(:lang(ar)){--cosmos-title-font-family-default:var(--cosmos-font-family-arabic-title, Noto Kufi Arabic, Helvetica, sans-serif)}:host(:lang(ko)){--cosmos-title-font-family-default:var(--cosmos-font-family-korean-title, Noto Sans KR, Helvetica, sans-serif)}:host(:lang(he)){--cosmos-title-font-family-default:var(--cosmos-font-family-hebrew-title, Noto Sans Hebrew, Helvetica, sans-serif)}:host(:lang(ka)){--cosmos-title-font-family-default:var(--cosmos-font-family-georgian-title, Noto Sans Georgian, Helvetica, sans-serif)}:host(:lang(hi)){--cosmos-title-font-family-default:var(--cosmos-font-family-hindi-title, Noto Sans, Helvetica, sans-serif)}:host(:lang(th)){--cosmos-title-font-family-default:var(--cosmos-font-family-thai-title, Noto Sans Thai, Helvetica, sans-serif)}:host(:lang(zh)){--cosmos-title-font-family-default:var(     --cosmos-font-family-chinese-simplified-title,     Microsoft YaHei, ヒラギノ角ゴ Pro W3, Hiragino Kaku Gothic Pro, Hiragino Kaku Gothic ProN W3, Osaka, メイリオ, Meiryo, MS Pゴシック, MS PGothic, Arial Unicode MS, Tahoma, Helvetica, sans-serif   )}:host(:lang(zh-Hant)){--cosmos-title-font-family-default:var(     --cosmos-font-family-chinese-traditional-title,     Microsoft JhengHei, Geneva CY, ヒラギノ角ゴ Pro W3, Hiragino Kaku Gothic Pro, Hiragino Kaku Gothic ProN W3, Osaka, メイリオ, Meiryo, MS Pゴシック, MS PGothic, Arial Unicode MS, Tahoma, Helvetica, sans-serif   )}.cosmos-title{--cosmos-font-weight-default-title-variable-bold:'opsz' 86, 'wght' 700;--cosmos-font-weight-default-title-variable-heavy:'opsz' 86, 'wght' 800;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--cosmos-title-color, #000F1E);font-family:var(--cosmos-title-font-family, var(--cosmos-title-font-family-default, var(--cosmos-font-family-title)));font-style:var(--cosmos-title-font-style, inherit);font-variation-settings:var(--cosmos-title-font-variation-settings, var(--cosmos-font-weight-default-title-variable-bold));font-weight:var(--cosmos-title-font-weight, 700);letter-spacing:var(--cosmos-title-letter-spacing, inherit);line-height:var(--cosmos-title-line-height, inherit);margin:0;text-transform:var(--cosmos-title-text-transform, var(--cosmos-title-transform, inherit))}.cosmos-title--single-line-clamp{margin-inline:-4px;overflow:hidden;padding-inline:4px;text-overflow:ellipsis;white-space:nowrap}
10.cosmos-title--multi-line-clamp{-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:var(--cosmos-title-clamp-length);margin-inline:-4px;overflow:hidden;padding-inline:4px;}.cosmos-title--size-xx-small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-xx-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-xx-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-x-small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-x-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-x-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--size-xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}@media (min-width: 380px){.cosmos-title--size-xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media (min-width: 1200px){.cosmos-title--size-xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-xx-small\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-xx-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-xx-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-x-small\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-x-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-x-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-small\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-small\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-medium\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-medium\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-medium\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-large\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-x-large\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-x-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-x-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 0){.cosmos-title--size-xx-large\\@small{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 0) and (min-width: 380px){.cosmos-title--size-xx-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media screen and (min-width: 0) and (min-width: 1200px){.cosmos-title--size-xx-large\\@small{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-xx-small\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-xx-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-xx-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-x-small\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-x-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-x-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-small\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-small\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-medium\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-medium\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-medium\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-large\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-x-large\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-x-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-x-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 650px){.cosmos-title--size-xx-large\\@medium{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 650px) and (min-width: 380px){.cosmos-title--size-xx-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media screen and (min-width: 650px) and (min-width: 1200px){.cosmos-title--size-xx-large\\@medium{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1
10000px){.cosmos-title--size-xx-small\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-xx-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-xx-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-x-small\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-x-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-x-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-small\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-small\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-medium\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-medium\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-medium\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-large\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-x-large\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-x-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-x-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1000px){.cosmos-title--size-xx-large\\@large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1000px) and (min-width: 380px){.cosmos-title--size-xx-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1000px) and (min-width: 1200px){.cosmos-title--size-xx-large\\@large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-xx-small\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-xx-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-xx-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-x-small\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-x-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-x-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-small\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-small\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-medium\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-medium\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-medium\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-large\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-x-large\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-x-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-x-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1200px){.cosmos-title--size-xx-large\\@x-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1200px) and (min-width: 380px){.cosmos-title--size-xx-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1200px) and (min-width: 1200px){.cosmos-title--size-xx-large\\@x-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-xx-small\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.411765));margin-bottom:0.470588em;padding-top:0.705882em;font-size:var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-xx-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16) + 0 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-xx-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(17rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-x-small\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.5));margin-bottom:0.4em;padding-top:0.6em;font-size:var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-x-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(18rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-x-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(20rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-small\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.333333));margin-bottom:0.5em;padding-top:1.083333em;font-size:var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(22rem / var(--cosmos-base-font-size, 16) + 2 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-small\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(24rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-medium\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.137931));margin-bottom:0.413793em;padding-top:1.103448em;font-size:var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-medium\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(26rem / var(--cosmos-base-font-size, 16) + 3 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-medium\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(29rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-large\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.097561));margin-bottom:0.439024em;padding-top:0.829268em;font-size:var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(31rem / var(--cosmos-base-font-size, 16) + 10 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(41rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-x-large\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1.066667));margin-bottom:0.333333em;padding-top:0.666667em;font-size:var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-x-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(37rem / var(--cosmos-base-font-size, 16) + 23 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-x-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-titl
10e-font-size, calc(60rem / var(--cosmos-base-font-size, 16))))}}@media screen and (min-width: 1350px){.cosmos-title--size-xx-large\\@xx-large{line-height:calc(var(--cosmos-title-line-height-multiplier, 1) * var(--cosmos-title-line-height, 1));margin-bottom:0.255814em;padding-top:0.55814em;font-size:var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16)))}}@media screen and (min-width: 1350px) and (min-width: 380px){.cosmos-title--size-xx-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(45rem / var(--cosmos-base-font-size, 16) + 41 * (100vw - 380px) / 820)))}}@media screen and (min-width: 1350px) and (min-width: 1200px){.cosmos-title--size-xx-large\\@xx-large{font-size:calc(var(--cosmos-title-font-size-multiplier, 1) * var(--cosmos-title-font-size, calc(86rem / var(--cosmos-base-font-size, 16))))}}.cosmos-title--spacing-none{margin-bottom:0;padding-top:0}.cosmos-title--spacing-long-form-bottom{padding-top:0}.cosmos-title--spacing-long-form-top{margin-bottom:0}.cosmos-title--appearance-light{color:var(--cosmos-title-color, #FFFFFF)}.cosmos-title--weight-heavy{font-variation-settings:var(--cosmos-title-font-variation-settings, var(--cosmos-font-weight-default-title-variable-heavy));font-weight:var(--cosmos-title-font-weight, 800)}.cosmos-title--kind-subtle{color:var(--cosmos-title-color, rgba(0, 15, 30, 0.6))}.cosmos-title--kind-subtle.cosmos-title--appearance-light{color:var(--cosmos-title-color, rgba(255, 255, 255, 0.6))}"}},[257,"cosmos-title",{appearance:[513],clamp:[520],kind:[513],size:[513],spacing:[513],tag:[513],weight:[513],computedAppearance:[32]},void 0,{appearance:[{handleAppearanceChange:0}],clamp:[{setNumericClampValue:0}]}]);function defineCustomElement$F(){typeof customElements>"u"||["cosmos-title"].forEach(e=>{"cosmos-title"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),f))})}let o$c=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"53a13c91bebce45634c59eba45822f135d5d2cc0",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"c384ec8f77b63cb99d67b58d6b82042801a155e4",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"950c0b97c29f91d0739680486607d968c180d5c9","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.5 4h17a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5h-2.37a.48.48 0 0 1-.41-.22l-.35-.52a.5.5 0 0 1-.09-.26.5.5 0 0 1 .5-.5h1.72v-9h-15v9h1.64a.5.5 0 0 1 .5.5.5.5 0 0 1-.09.27l-.42.54a.51.51 0 0 1-.39.19H2.5a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5m13.488 14.733a.5.5 0 0 1-.438.267h-9.1a.5.5 0 0 1-.45-.78l4.59-6.62a.5.5 0 0 1 .82 0l4.55 6.62a.5.5 0 0 1 .028.513",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-airplay",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$E=function(){typeof customElements>"u"||["cosmos-icon-airplay"].forEach(e=>{"cosmos-icon-airplay"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$c))})},o$b=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"76392ef3f06dacf669acb71384502ce0af8aaf99",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"9b96058e9e55bce6eafc6c0a511ac46d67dc3ffc",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"89c126e38be505dbe8c38cdb6d2d6b5fd32e0d19","fill-rule":"evenodd","clip-rule":"evenodd",d:"M11 18.65a7.65 7.65 0 1 0 0-15.3 7.65 7.65 0 0 0 0 15.3M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18",fill:"
10currentColor"}),h$2("path",{key:"f19da338f84af791c1af64856a995e02e8785079",d:"M5.5 9.5A.5.5 0 0 1 6 9h.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5zm2.5-3a.5.5 0 0 1 .5-.5H9a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5zm2.5 2A.5.5 0 0 1 11 8h.5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5H11a.5.5 0 0 1-.5-.5zm2.5-1a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5zm2.5 2A.5.5 0 0 1 16 9h.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5H16a.5.5 0 0 1-.5-.5z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-audio-settings",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$D=function(){typeof customElements>"u"||["cosmos-icon-audio-settings"].forEach(e=>{"cosmos-icon-audio-settings"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$b))})},o$a=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"ecbbad8f9f484927c4cf8261bcafedcb65a8d945",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"1e2db812cc8ceb3a6b5838674b275eb5e0d1acfb",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"04b004fbb32d33a13d3e59c6bd48ed6700f9d9f3","fill-rule":"evenodd","clip-rule":"evenodd",d:"M9 6.472h4.628a5.11 5.11 0 0 1 5.162 4.824 4.85 4.85 0 0 1-1.362 3.562 5 5 0 0 1-2.841 1.493.51.51 0 0 1-.587-.5v-.532a.51.51 0 0 1 .425-.493c.73-.137 1.4-.49 1.926-1.015a3.32 3.32 0 0 0 .939-2.473 3.6 3.6 0 0 0-3.662-3.362H9v2.3a.5.5 0 0 1-.854.352L5.114 7.576a.5.5 0 0 1 0-.706l3.033-3.024A.5.5 0 0 1 9 4.2zm.19 6.846c.312-.3.738-.453 1.169-.418a1.5 1.5 0 0 1 1.62 1.567V15.7a1.5 1.5 0 0 1-1.62 1.571A1.507 1.507 0 0 1 8.732 15.7v-1.229c-.02-.432.147-.852.459-1.153m1.594 2.361c0 .349-.143.531-.425.531s-.431-.187-.431-.531v-1.187c0-.344.143-.532.431-.532s.425.182.425.532zM8.309 16.95v-.621a.23.23 0 0 0-.24-.239h-.46v-2.87a.23.23 0 0 0-.24-.24h-.61a1 1 0 0 0-.23.03l-1.05.33a.234.234 0 0 0-.16.29l.14.53a.235.235 0 0 0 .32.17l.64-.2v1.96h-.66a.23.23 0 0 0-.24.24v.62a.23.23 0 0 0 .24.24h2.31a.23.23 0 0 0 .24-.24",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-back-10",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$C=function(){typeof customElements>"u"||["cosmos-icon-back-10"].forEach(e=>{"cosmos-icon-back-10"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$a))})},a$8=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"af9042ba69c6b38f556ae8ddc122a73e9b39eee0",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"f8c2f39a724b898a53ecf4267706183ef9589c88",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"c6e93007a04b80670e94201a722797242ff463f2","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 4.5a.5.5 0 0 1 .5-.5h14a.5.5 0 0 1 .5.5v14a.5.5 0 0 1-.5.5h-14a.5.5 0 0 1-.5-.5zm1.5 13h12v-12h-12zm15-12h1a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5h-1zM8.412 14.405a.594.594 0 0 1-.912-.502V9.097c0-.469.516-.753.912-.502l3.796 2.403a.594.594 0 0 1 0 1.004z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-browse",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$B=function(){typeof customElements>
10"u"||["cosmos-icon-browse"].forEach(e=>{"cosmos-icon-browse"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),a$8))})},m$1=defineCustomElement$L,r$a=defineCustomElement$K,i$2=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"ef69e2bac755434025cb6c9d7f916a0f8fdb16e9",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"65bc711258f8f521c65db2c7483c10fa34b9e217",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"9370cfbc41a5777c78e30664552b8d1ad620ce2b","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.5 4h17a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-5.8a.5.5 0 0 1-.5-.5V17a.5.5 0 0 1 .5-.5h4.8v-11h-16A.5.5 0 0 1 2 5v-.5a.5.5 0 0 1 .5-.5m.12 11.4a2.83 2.83 0 0 1 2 2 .49.49 0 0 1-.49.6h-1.6a.51.51 0 0 1-.51-.5v-1.61a.5.5 0 0 1 .6-.49m5.31 2.04c-.27-2.865-2.536-5.095-5.4-5.37a.5.5 0 0 0-.53.5v.5a.51.51 0 0 0 .48.5c2.11.224 3.776 1.85 4 3.96a.52.52 0 0 0 .5.47h.5a.49.49 0 0 0 .45-.56m-5.44-7.13a.52.52 0 0 1-.49-.5v-.5a.51.51 0 0 1 .54-.5 9.2 9.2 0 0 1 8.67 8.67.51.51 0 0 1-.51.52h-.5a.49.49 0 0 1-.49-.48 7.7 7.7 0 0 0-7.22-7.21",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-chromecast",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$A=function(){typeof customElements>"u"||["cosmos-icon-chromecast"].forEach(e=>{"cosmos-icon-chromecast"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),i$2))})},o$9=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"a56bc0c36ebb553d05c2ad39ba00841356f0f9d3",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"950ba7b59eb8e24dbd11b1f869ddcf957ef8dec2",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"8909d0f98739daf42311de174a456f3d3d0a13cb","fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.5 4h-17a.5.5 0 0 0-.5.5V5a.5.5 0 0 0 .5.5h16v11h-4.8a.5.5 0 0 0-.5.5v.5a.5.5 0 0 0 .5.5h5.8a.5.5 0 0 0 .5-.5v-13a.5.5 0 0 0-.5-.5M4.62 17.4a2.83 2.83 0 0 0-2-2 .5.5 0 0 0-.6.49v1.61a.51.51 0 0 0 .51.5h1.6a.49.49 0 0 0 .49-.6m-2.09-5.33c2.864.275 5.13 2.505 5.4 5.37a.49.49 0 0 1-.45.56h-.5a.52.52 0 0 1-.5-.47c-.224-2.11-1.89-3.736-4-3.96a.51.51 0 0 1-.48-.5v-.5a.5.5 0 0 1 .53-.5M2 9.81a.52.52 0 0 0 .49.5 7.7 7.7 0 0 1 7.22 7.21.49.49 0 0 0 .49.48h.5a.51.51 0 0 0 .51-.52 9.2 9.2 0 0 0-8.67-8.67.51.51 0 0 0-.54.5zm11.1 5.69C12 11 9 8 4.4 6.5h13.1v9z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-chromecast-filled",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$z=function(){typeof customElements>"u"||["cosmos-icon-chromecast-filled"].forEach(e=>{"cosmos-icon-chromecast-filled"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$9))})},a$7=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"b7d4877be9ebb03658ecda75c8d2c5cb19e824ff",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"99d43845e3f1e8fbe82762a0e8a5a28b311e8664",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"315e4a25f775f0d21a249a66d001f057586a48b8","fill-rule":"evenodd","clip-rule":"evenodd",d:"M11 2a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9m0 1.5a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15m-.63 7.93 3 3a.48.48 0 0 0 .67 0l.36-.35a.51.51 0 0 0 0-.71l-2.68-2.68V6.5a.5.5 0 0 0-.5-.5h-.5a.5.5 0 0 0-.5.5v4.57a.5.5 0 0 0 .15.36",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-clock",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$y=function(){typeof customElements>
10"u"||["cosmos-icon-clock"].forEach(e=>{"cosmos-icon-clock"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),a$7))})},l$4=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"38d664b1b475a3765c5981537c2c6bca2be39ff8",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"8679df34d87fe026f0901e703b189b19b8b55008",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"15946b119482ac685c0bed16e9a37054cc919af4","fill-rule":"evenodd","clip-rule":"evenodd",d:"m18.18 4.18-.35-.36a.51.51 0 0 0-.71 0L11 9.94 4.89 3.82a.51.51 0 0 0-.71 0l-.35.36a.48.48 0 0 0 0 .7L10 11l-6.17 6.12a.48.48 0 0 0 0 .7l.35.36a.51.51 0 0 0 .71 0L11 12.06l6.11 6.12a.51.51 0 0 0 .71 0l.35-.36a.48.48 0 0 0 0-.7L12.07 11l6.11-6.12a.48.48 0 0 0 0-.7",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-close",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$x(){typeof customElements>"u"||["cosmos-icon-close"].forEach(e=>{"cosmos-icon-close"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),l$4))})}let r$9=defineCustomElement$x,p$1=defineCustomElement$M,l$3=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"7d905fafb056183e949896899511797dd588518d",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"1ca9e08b0625ff8cd93fd1bc12ca5a89580a4608",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"488e7203801b810099e8433190b2d3b033971d1f","fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.32 5a.5.5 0 0 0-.48.36l-3.08 11a.5.5 0 0 0 .47.67h.46a.52.52 0 0 0 .49-.36l3.07-11a.5.5 0 0 0-.47-.67zm6.41 5.65-3.39-3.39a.4.4 0 0 0-.28-.12.37.37 0 0 0-.27.11l-.44.44a.36.36 0 0 0-.11.26.44.44 0 0 0 .11.28L17.12 11l-2.77 2.77a.44.44 0 0 0-.11.28c0 .098.04.192.11.26l.44.44a.37.37 0 0 0 .27.11.4.4 0 0 0 .28-.12l3.39-3.39a.5.5 0 0 0 0-.7m-12.2 4.09-3.39-3.39a.48.48 0 0 1 0-.7l3.39-3.34a.4.4 0 0 1 .28-.12.37.37 0 0 1 .27.11l.44.44a.4.4 0 0 1 .11.26.4.4 0 0 1-.12.23L4.75 11l2.76 2.77a.4.4 0 0 1 .12.28.4.4 0 0 1-.11.26l-.44.44a.37.37 0 0 1-.27.11.4.4 0 0 1-.28-.12",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-code-block",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$w=function(){typeof customElements>"u"||["cosmos-icon-code-block"].forEach(e=>{"cosmos-icon-code-block"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),l$3))})},r$8=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"afbb63474f97ebc6d64c4b4fa696f588a6b04b72",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"b8d32f9de4c49b84f6bf00dc667fc416cbd33101",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"c66da8ddc4209cc71f0e1b963eabfe6303f38cfa","fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.99 2a9 9 0 1 0 .02 18 9 9 0 0 0-.02-18m-.74 4.5a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5zM11 16a1 1 0 1 1 0-2 1 1 0 0 1 0 2",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-error-filled",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$v=function(){typeof customElements>"u"||["cosmos-icon-error-filled"].forEach(e=>{"cosmos-icon-error-filled"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),r$8))})},o$8=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"21817fcb5ebedc821682bb7aa32546dbd33facfb",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"5f8f117311f908aee130421902b666e2330f4bbe",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"db361e04ccebcefc5a93f31c0799c4e04610eef1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.5 3h-4V2a.5.5 0 0 0-.5-.5h-.5a.5.5 0 0 0-.5.5v1H9V2a.5.5 0 0 0-.5-.5H8a.5.5 0 0 0-.5.5v1h-4a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5V18a.5.5 0 0 0-.5-.5h-2v-13h3v1A.5.5 0 0 0 8 6h.5a.5.5 0 0 0 .5-.5v-1h4v1a.5.5 0 0 0 .5.5h.5a.5.5 0 0 0 .5-.5v-1h3v5a.5.5 0 0 0 .5.5h.5a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5m-9.435 8.044a7 7 0 0 1 2.5-1.603.5.5 0 0 0 .302-.665l-.667-1.56c-.148-.341-.377-.341-.511 0l-.834 2.238-2.42.218c-.376 0-.443.26-.147.491l1.102.922a.5.5 0 0 0 .675-.041M9 15.998a5 5 0 1 1 10 .004 5 5 0 0 1-10-.003m5.489 3.502A.51.51 0 0 0 15 19v-3a.5.5 0 0 0-.5-.5h-2a.51.51 0 0 0-.511.5v.5a.51.51 0 0 0 .511.5h.989v2a.5.5 0 0 0 .5.5zm-.25-5a1 1 0 1 1 0-2 1 1 0 0 1 0 2",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-event-details",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$u=function(){typeof customElements>"u"||["cosmos-icon-event-details"].forEach(e=>{"cosmos-icon-event-details"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$8))})},a$6=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"67d425e1abb31fc33c8ff6a763831d381a6be490",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"b99c0f48a4ae1bcba5a2dec3bf424e85bbf37566",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"aac4efd17d45844d37e6da69fa2b4115e2502fa5","fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 11a9 9 0 1 0-10.406 8.89v-6.288H7.309V11h2.285V9.017c0-2.255 1.343-3.501 3.4-3.501.984 0 2.014.175 2.014.175v2.215h-1.135c-1.118 0-1.467.694-1.467 1.406V11h2.496l-.399 2.602h-2.097v6.289A9 9 0 0 0 20 11",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-facebook",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$t=function(){typeof customElements>"u"||["cosmos-icon-facebook"].forEach(e=>{"cosmos-icon-facebook"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),a$6))})},i$1=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"7a523b7c1a3be70a3797c0ac40fda5a637f16503",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"446371c5447bd322459138892059722c545a9905",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"674caed8e2ecd759d3ff9854eb0177a78997cb4b","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 6.472H9.372a5.11 5.11 0 0 0-5.162 4.817 4.85 4.85 0 0 0 1.362 3.565 5 5 0 0 0 2.841 1.493.51.51 0 0 0 .587-.5v-.532a.51.51 0 0 0-.425-.493c-.73-.137-1.4-.49-1.926-1.015a3.32 3.32 0 0 1-.939-2.473 3.6 3.6 0 0 1 3.662-3.358H14v2.3a.5.5 0 0 0 .854.352l3.032-3.052a.5.5 0 0 0 0-.706l-3.033-3.024A.5.5 0 0 0 14 4.2zm.149 10.478v-.621a.23.23 0 0 0-.239-.239h-.46v-2.87a.23.23 0 0 0-.24-.24h-.61a1 1 0 0 0-.23.03l-1.05.33a.234.234 0 0 0-.16.29l.14.53a.235.235 0 0 0 .32.17l.64-.2v1.96h-.66a.23.23 0 0 0-.24.24v.62a.23.23 0 0 0 .24.24h2.309a.23.23 0 0 0 .24-.24m.451-1.25v-1.233a1.506 1.506 0 0 1 1.63-1.567 1.505 1.505 0 0 1 1.621 1.571V15.7a1.5 1.5 0 0 1-1.621 1.57 1.506 1.506 0 0 1-1.63-1.57m2.051-1.208v1.184l.004-.001c0 .349-.141.531-.429.531s-.431-.187-.431-.531v-1.183c0-.344.149-.532.431-.532s.425.182.425.532",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-forward-10",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$s=function(){typeof customElements>"u"||["cosmos-icon-forward-10"].forEach(e=>{"cosmos-icon-forward-10"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),i$1))})},o$7=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"ab4afbe20471078874c524d9cbd7781d242e52da",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"03bf2e495ed8004b791188054a44cb5237564758",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"c9e93d5ce2b40e4426b169a30202ff5d5ac5fdab","fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.5 5.5v3A.5.5 0 0 1 3 9h-.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 .5.5V5a.5.5 0 0 1-.5.5zm15 0h-5A.5.5 0 0 1 13 5v-.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H19a.5.5 0 0 1-.5-.5zm0 8v3h-5a.5.5 0 0 0-.5.5v.5a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5H19a.5.5 0 0 0-.5.5m-15 3h5a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5h-6a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5H3a.5.5 0 0 1 .5.5z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-fullscreen",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$r=function(){typeof customElements>"u"||["cosmos-icon-fullscreen"].forEach(e=>{"cosmos-icon-fullscreen"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$7))})},o$6=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"47f14141fb8822f02497593e23e6f1debf71af24",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"24691450e4e915529746f7cde52562d1ea873e9a",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"2f9c61b922f4c38e20ed295a534299fd56f672fc","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.5 4.5v3h-5A.5.5 0 0 0 2 8v.5a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5H8a.5.5 0 0 0-.5.5m0 10h-5A.5.5 0 0 1 2 14v-.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H8a.5.5 0 0 1-.5-.5zm7 0v3a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5zm0-7h5a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5h-6a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-fullscreen-exit",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$q=function(){typeof customElements>"u"||["cosmos-icon-fullscreen-exit"].forEach(e=>{"cosmos-icon-fullscreen-exit"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$6))})},l$2=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"9458973a45d4b77c78f497325c9e12197c4599d4",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"daa8004a46edac8cd8ad6644b0fea5e91032cf65",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"09a19a1b5d04b28c733ea6b36dbdf8b5c6d30031","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.496 3.434A4 4 0 0 1 17.29 4.78a4 4 0 0 1 .28 5.74l-2.62 2.63a3.43 3.43 0 0 1-2.44 1 4.42 4.42 0 0 1-2.77-1.06.5.5 0 0 1 0-.73l.37-.36a.48.48 0 0 1 .66 0 2.32 2.32 0 0 0 3.13.06l2.63-2.62a2.53 2.53 0 0 0-.3-3.59 2.53 2.53 0 0 0-3.59-.3l-.66.67a.52.52 0 0 1-.72 0l-.35-.36a.5.5 0 0 1 0-.71l.67-.66a4 4 0 0 1 2.916-1.056M7.72 17.11a2.13 2.13 0 0 0 1.65-.61l.65-.64a.49.49 0 0 1 .7 0l.36.35a.5.5 0 0 1 0 .71l-.64.64a3.68 3.68 0 0 1-2.62 1.05h-.16a4.45 4.45 0 0 1-2.94-1.34 4 4 0 0 1-.3-5.72l2.65-2.58a3.79 3.79 0 0 1 5.2.06.5.5 0 0 1 0 .73l-.36.36a.5.5 0 0 1-.67 0A2.34 2.34 0 0 0 8.11 10l-2.63 2.61a2.54 2.54 0 0 0 .3 3.6 3 3 0 0 0 1.94.9",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-link",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$p=function(){typeof customElements>"u"||["cosmos-icon-link"].forEach(e=>{"cosmos-icon-link"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),l$2))})},a$5=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"c07ee3465d45038bb050e93ca6609f6ad423f610",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"d44509eea8b6d558762cc55aa69a7ad0afaf7712",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"c0f285f2c31489d91faa5e7263dacc267c9f6563","fill-rule":"evenodd","clip-rule":"evenodd",d:"M11 2a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9m0 1.5a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15M7.5 11a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-live",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$o=function(){typeof customElements>"u"||["cosmos-icon-live"].forEach(e=>{"cosmos-icon-live"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),a$5))})},o$5=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"56244a070b97f15f8e782b2ec679c0567c867ef6",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"1dd1666d1fe956bfb7e3fac4f279bd48593a74d0",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"160b6f10828a9463849f6e30d54ad7f1636cbc76","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.085 4.272a.5.5 0 0 0-.355.148l-.01-.04a9.14 9.14 0 0 0 .09 13.1.5.5 0 0 0 .71 0l.34-.35a.5.5 0 0 0 0-.71 7.66 7.66 0 0 1-.08-10.94.49.49 0 0 0 0-.7l-.34-.36a.5.5 0 0 0-.355-.148m11.84 0a.5.5 0 0 1 .355.148v-.04a9.14 9.14 0 0 1-.09 13.1.5.5 0 0 1-.71 0l-.34-.35a.5.5 0 0 1 0-.71 7.66 7.66 0 0 0 .08-10.94.49.49 0 0 1 0-.7l.35-.36a.5.5 0 0 1 .355-.148M14.42 7.69l-.34.37a.49.49 0 0 0 0 .67 3.14 3.14 0 0 1 .93 2.2 3.45 3.45 0 0 1-1 2.28.51.51 0 0 0 0 .68l.35.36a.5.5 0 0 0 .69 0 4.59 4.59 0 0 0 .09-6.61.5.5 0 0 0-.72.05M9.5 11a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0m1.25 3a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h.5a.5.5 0 0 0 .5-.5v-5a.5.5 0 0 0-.5-.5zM7.58 7.69l.35.37a.49.49 0 0 1 0 .67 3.17 3.17 0 0 0-.93 2.2 3.45 3.45 0 0 0 1 2.28.51.51 0 0 1 0 .68l-.35.36a.5.5 0 0 1-.69 0 4.6 4.6 0 0 1-.1-6.61.5.5 0 0 1 .72.05",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-live-broadcast",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$n=function(){typeof customElements>"u"||["cosmos-icon-live-broadcast"].forEach(e=>{"cosmos-icon-live-broadcast"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$5))})},a$4=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"f7f4223399af315764e63278a4beb29c7142907c",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"3cf422e0ea72b7c2751b063d3fa63ee7a189ee31",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"9d6268292bb6a6cde286193367a685786b89c861","fill-rule":"evenodd","clip-rule":"evenodd",d:"m13 9.94 6.65 6.65a.51.51 0 0 1 0 .71l-.35.35a.51.51 0 0 1-.71 0L4.32 3.38a.5.5 0 0 1 0-.7l.36-.36a.5.5 0 0 1 .7 0l5 5 1.79-1.61a.5.5 0 0 1 .83.37zM6.82 8.7l6 6a.46.46 0 0 1 .16.38v.78a.5.5 0 0 1-.83.37l-2.56-2.26H6.48a.5.5 0 0 1-.5-.5V9.05a.5.5 0 0 1 .5-.5.5.5 0 0 1 .34.15",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-mute",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$m=function(){typeof customElements>
10"u"||["cosmos-icon-mute"].forEach(e=>{"cosmos-icon-mute"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),a$4))})},a$3=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"f296b93ab24e95f25a91f54bdc682ab8f39988e2",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"32c75b1a5cb9096ba3967f9213583ceb881c4435",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"76cbc732f84d5b1cec54f28c99f7b421f0fe01ac","fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.253 5.193A7.47 7.47 0 0 1 11 3.5a7.51 7.51 0 0 1 7.5 7.5 7.47 7.47 0 0 1-1.693 4.747zm-1.06 1.06a7.5 7.5 0 0 0 10.554 10.554zM2 11a9 9 0 0 1 9-9 9.01 9.01 0 0 1 9 9 9 9 0 1 1-18 0",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-no-data",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$l=function(){typeof customElements>"u"||["cosmos-icon-no-data"].forEach(e=>{"cosmos-icon-no-data"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),a$3))})},o$4=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"2fc6484b014048f0ab68257e0e67486c01afeda9",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"6eecd84eded5a6e8f982a048b90a46680cbeb7b2",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"2cbc28c509b7136206ec1caeddaa81e4a5715ae1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1zm8 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1z",fill:"
10currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-pause",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$k=function(){typeof customElements>"u"||["cosmos-icon-pause"].forEach(e=>{"cosmos-icon-pause"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$4))})},r$7=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"609d0edbac4a2ab33366ae224f2cb15df0e19ec9",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"58e0e0411cb7b94bf6ac4b688b5922a361664c9b",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"4288b646dac131a415a4563ae20de52d6e6a9242","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 4.5a.5.5 0 0 1 .5-.5h17a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-17a.5.5 0 0 1-.5-.5zm1.5 1h15v11h-15zM17 11h-6v4h6z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-picture-in-picture",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$j=function(){typeof customElements>"u"||["cosmos-icon-picture-in-picture"].forEach(e=>{"cosmos-icon-picture-in-picture"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),r$7))})},c$4=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"bcbeb93aa283ef33d9bf27782e0661ef0cb328f0",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"a12da2cd4c7af6c5a651d0ba891e27ec6febd38c",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"76f29a653f992593e37e9fc6a014b71201e39d34","fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.002 2A9 9 0 0 0 7.72 19.38a8.7 8.7 0 0 1 0-2.588c.168-.698 1.057-4.5 1.057-4.5A3.3 3.3 0 0 1 8.54 11c0-1.249.73-2.182 1.63-2.182a1.124 1.124 0 0 1 1.124 1.26 18.7 18.7 0 0 1-.742 3.003 1.305 1.305 0 0 0 1.327 1.62c1.597 0 2.834-1.688 2.834-4.117a3.544 3.544 0 0 0-3.71-3.667 3.89 3.89 0 0 0-4.071 3.903 3.47 3.47 0 0 0 .697 2.047c.06.072.082.169.056.259-.067.292-.214.9-.247 1.024-.034.123-.124.202-.293.123a4.05 4.05 0 0 1-1.833-3.487c-.056-2.846 2.002-5.41 5.892-5.41a5.273 5.273 0 0 1 5.544 5.196c0 3.094-1.957 5.625-4.666 5.625a2.42 2.42 0 0 1-2.07-1.035s-.45 1.72-.55 2.148a10.3 10.3 0 0 1-1.125 2.351 9.1 9.1 0 0 0 2.665.338c4.968 0 8.996-4.03 8.996-9S15.97 2 11.002 2",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-pinterest",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$i=function(){typeof customElements>"u"||["cosmos-icon-pinterest"].forEach(e=>{"cosmos-icon-pinterest"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),c$4))})},a$2=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"8af218b960eee7047a8169e6fd7e5caf78373389",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"e143abee70ab07e16a8ac9fff0cfc24c01f5cdd8",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"58175ac180745aec10abde063ed2df20957eb490","fill-rule":"evenodd","clip-rule":"evenodd",d:"m7.22 17.44 10.38-5.905a.61.61 0 0 0 .283-.531.61.61 0 0 0-.282-.531L7.22 4.568a.43.43 0 0 0-.495.023.62.62 0 0 0-.225.52v11.81a.62.62 0 0 0 .239.492.43.43 0 0 0 .48.027",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-play",{ariaLabel:[513,"aria-label"]}]);function defineCustomElement$h(){typeof customElements>
10"u"||["cosmos-icon-play"].forEach(e=>{"cosmos-icon-play"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),a$2))})}let r$6=defineCustomElement$h,c$3=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"12db70af12c200fc792529517c4127f992dcf46b",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"a6cf3b470e19020d76153ca81d9aa4d95d7a65d4",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"139396dcc032054cc22294ec89c65fbf56e8b704","fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.991 5c3.554 0 6.471 1.846 8.806 5.285a1.36 1.36 0 0 1 0 1.43l-.013.02C17.54 15.133 14.564 17 10.991 17c-3.57 0-6.523-1.861-8.775-5.27a1.34 1.34 0 0 1 .007-1.471C4.53 6.845 7.438 5 10.991 5m0 1.565c-2.943 0-5.37 1.514-7.383 4.436 1.965 2.91 4.426 4.434 7.383 4.434 2.962 0 5.442-1.53 7.403-4.433-2.028-2.925-4.462-4.437-7.403-4.437m0 1.565A2.866 2.866 0 0 1 13.854 11a2.866 2.866 0 0 1-2.863 2.87A2.866 2.866 0 0 1 8.128 11a2.866 2.866 0 0 1 2.863-2.87m0 1.566c-.719 0-1.301.584-1.301 1.304a1.302 1.302 0 1 0 2.603 0c0-.72-.583-1.304-1.302-1.304",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-preview",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$g=function(){typeof customElements>"u"||["cosmos-icon-preview"].forEach(e=>{"cosmos-icon-preview"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),c$3))})},c$2=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"d2ab309bdefb250ec8ac8c98207e46089bad9539",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"fea220c3f7aee6f43d5614d9dc80781a81f2bb54",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"681402145fbedd4829e0aa872a13810085237bbf","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.54 2.002 19.36 2c.223 0 .304.023.385.067a.45.45 0 0 1 .19.189c.043.081.066.162.066.385v16.718c0 .223-.023.304-.067.385a.45.45 0 0 1-.189.19c-.081.043-.162.066-.385.066H2.641c-.223 0-.304-.023-.385-.067a.45.45 0 0 1-.19-.189.6.6 0 0 1-.064-.285L2 2.641c0-.223.023-.304.067-.385a.45.45 0 0 1 .189-.19.6.6 0 0 1 .285-.064M18.5 3.5h-15v15h15zm-8.356 11.501V12.16h1.092q.636 0 1.146-.18t.87-.51.552-.81.192-1.08q0-1.2-.732-1.89T11.236 7H8.44v8.001zm.972-4.233h-.972v-2.34h.972q.54 0 .84.306t.3.858q0 .54-.3.858t-.84.318",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-product-placement",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$f=function(){typeof customElements>"u"||["cosmos-icon-product-placement"].forEach(e=>{"cosmos-icon-product-placement"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),c$2))})},c$1=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"328465a5bfb8b2a0f6af77f19443ca9b8217daa2",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"9dcccfe5a2019a5cdc3a487c99f14126facdcace",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"29604a5c743d1372cc33b21b782743b28ccc71b9","fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.051 7.859a.5.5 0 0 0 .069-.593l-1.
10174-2.032A.5.5 0 0 0 16.4 5l-2.477.586a6.2 6.2 0 0 0-1.368-.786l-.732-2.439A.5.5 0 0 0 11.344 2H9a.5.5 0 0 0-.479.356L7.786 4.8a6.2 6.2 0 0 0-1.362.789L3.945 5a.5.5 0 0 0-.549.237L2.223 7.266a.5.5 0 0 0 .069.593l1.745 1.854a6.5 6.5 0 0 0 0 1.575l-1.745 1.853a.5.5 0 0 0-.069.593L3.4 15.766a.5.5 0 0 0 .544.234l1.671-.395A.5.5 0 0 0 6 15.122v-3.357a4.13 4.13 0 0 1 .332-3.674 4.382 4.382 0 0 1 8.182 1.465c.032.25.242.44.494.444h1.076a.5.5 0 0 0 .389-.186z",fill:"currentColor"}),h$2("path",{key:"f20433bee2078dc4616ca56488f1174a47ca9d0a","fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.5 12h-11a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.5-.5",fill:"#db0a40"}),h$2("path",{key:"f29fe297cfac61dddb647454c50f9b858171f691","fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.557 17.955a.264.264 0 0 1-.277.288h-.733a.264.264 0 0 1-.277-.288v-1.431h-1.232v1.431a.264.264 0 0 1-.277.288h-.732a.264.264 0 0 1-.278-.288V14.05a.265.265 0 0 1 .277-.288h.733a.265.265 0 0 1 .277.288v1.31h1.232v-1.31a.265.265 0 0 1 .277-.288h.733a.265.265 0 0 1 .277.288zm1.154.288h1.566a2.3 2.3 0 0 0 2.473-2.263 2.254 2.254 0 0 0-2.474-2.22H14.71a.265.265 0 0 0-.277.29v3.905a.264.264 0 0 0 .277.288m1.022-3.317h.544a1.01 1.01 0 0 1 1.12 1.054 1.038 1.038 0 0 1-1.12 1.098h-.544z",fill:"#fff"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-quality",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$e=function(){typeof customElements>"u"||["cosmos-icon-quality"].forEach(e=>{"cosmos-icon-quality"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),c$1))})},o$3=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"9759512276b2d2a8585d5fa6f03403598860ccc5",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"039588fa78c52ec27b2ed66bf5400110b86289b3",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"4dc3c8f1bbe41997c9a893ea5704371cb44067a9",d:"M20.62 11.442a2.033 2.033 0 0 0-2.036-2.035 2.05 2.05 0 0 0-1.418.567c-1.401-1-3.32-1.652-5.456-1.735l.935-4.371 3.036.65A1.453 1.453 0 1 0 17.132 3a1.45 1.45 0 0 0-1.3.818L12.445 3.1c-.1-.017-.2 0-.267.05a.33.33 0 0 0-.15.234l-1.035 4.872c-2.169.066-4.121.717-5.54 1.735a2.05 2.05 0 0 0-1.417-.567A2.033 2.033 0 0 0 3.2 13.31c-.033.2-.05.4-.05.617 0 3.137 3.654 5.69 8.159 5.69s8.159-2.536 8.159-5.69c0-.2-.017-.417-.05-.617a2.06 2.06 0 0 0 1.201-1.869M6.638 12.894a1.453 1.453 0 0 1 2.903 0c0 .8-.65 1.451-1.451 1.451-.801.017-1.452-.65-1.452-1.451m8.126 3.854c-1.001 1.001-2.903 1.068-3.454 1.068-.567 0-2.47-.083-3.454-1.068a.373.373 0 0 1 0-.534c.15-.15.384-.15.534 0 .634.634 1.969.851 2.92.851s2.303-.217 2.92-.85a.37.37 0 0 1 .534 0 .406.406 0 0 1 0 .533m-.267-2.386a1.453 1.453 0 0 1 0-2.903c.8 0 1.451.65 1.451 1.452 0 .784-.65 1.451-1.451 1.451",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-reddit",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$d=function(){typeof customElements>"u"||["cosmos-icon-reddit"].forEach(e=>{"cosmos-icon-reddit"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$3))})},o$2=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"8902e52df6656edb99dfbe6198db495965e86aa2",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"b5b55de6ab9c586fc484aacf5ff7b5c7882634ac",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"be8dbd30d1faa80fa30a2d778719d615ae89ae8d",d:"M10.993 18.6a6.504 6.504 0 0 1-6.487-6 .53.53 0 0 0-.52-.5h-.5a.477.477 0 0 0-.485.5 8.005 8.005 0 0 0 7.992 7.5c4.422 0 8.007-3.582 8.007-8s-3.585-8-8.007-8H8.674l-.003-2.196a.4.4 0 0 0-.68-.29l-3.004 3a.4.4 0 0 0 0 .56l3.003 3a.4.4 0 0 0 .69-.29L8.678 5.6h2.316a6.503 6.503 0 0 1 6.506 6.5c0 3.59-2.913 6.5-6.506 6.5",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-replay",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$c=function(){typeof customElements>
10"u"||["cosmos-icon-replay"].forEach(e=>{"cosmos-icon-replay"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$2))})},i=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"3c8dbc3b6d75328837f8c603adee6cf743ecc2d3",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"5f44a2150a55fa8aa4ffe4e2a53dd6706038041f",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"a8f4f4f5b344ddaefa743dedbfbe807b5746f78c","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.51 5a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5zm.99 1.5h9v9h-9zm12.49 0a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h.5a.5.5 0 0 0 .5-.5V7a.5.5 0 0 0-.5-.5zM18.48 8a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5zM6 13.32V8.68a.2.2 0 0 1 .31-.17l4.14 2.32a.21.21 0 0 1 0 .34L6.3 13.49a.2.2 0 0 1-.3-.17",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-season",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$b=function(){typeof customElements>"u"||["cosmos-icon-season"].forEach(e=>{"cosmos-icon-season"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),i))})},o$1=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"bec3aa54e91bb433f479f3fde2f1467611da6fb9",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"436d5165a4b73d1dbb8bec63d74b087d837d578f",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"8a814018bb23d656bf924d591c37ddb528e3bf5a","fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.782 10.942a7 7 0 0 0-.044-.733l1.64-1.765a.44.44 0 0 0 .063-.53L17.329 6.01a.43.43 0 0 0-.486-.212l-2.312.547a6 6 0 0 0-1.297-.697l-.688-2.294A.43.43 0 0 0 12.123 3H9.89a.44.44 0 0 0-.423.318l-.689 2.33q-.695.267-1.306.696L5.17 5.797a.44.44 0 0 0-.485.212L3.572 7.933a.45.45 0 0 0 .062.529l1.641 1.765a6 6 0 0 0 0 1.465l-1.641 1.764a.45.45 0 0 0-.062.53l1.112 1.923a.44.44 0 0 0 .485.212l2.303-.582c.403.288.842.523 1.306.697l.689 2.294a.44.44 0 0 0 .423.318h2.233a.43.43 0 0 0 .423-.318l.688-2.294a5.7 5.7 0 0 0 1.297-.697l2.33.547a.43.43 0 0 0 .485-.212l1.112-1.924a.44.44 0 0 0-.062-.529l-1.64-1.765a7 7 0 0 0 .026-.714m-5.78 4.147a4.147 4.147 0 1 1 0-8.295 4.147 4.147 0 0 1 0 8.295",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-settings",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$a=function(){typeof customElements>"u"||["cosmos-icon-settings"].forEach(e=>{"cosmos-icon-settings"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o$1))})},r$5=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"0b59bc76b43d5873f751c8597fdf95cfbe327596",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"c473d246b79109152ac739909314a68702d9f276",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"1ac447375c7531f80f6a2f009a8b660e7e9863eb","fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.5 6h-9a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h9a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-stop",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$9=function(){typeof customElements>
10"u"||["cosmos-icon-stop"].forEach(e=>{"cosmos-icon-stop"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),r$5))})},o=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"54776ff34d3a84c67ce3f6f03cfb7b4f9c708d8c",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"770ed6d1af3e594b02886198ec8ce44fdb26efc7",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"c1b0ad361f6d535cb4253d4d4d24e34fc7bf2ef7","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.5 3H20v11.5a.5.5 0 0 1-.5.5H13l-5.51 4.59a.3.3 0 0 1-.49-.23V15H2.5a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5m16 10.5v-9h-15v9H8a.5.5 0 0 1 .5.5v2.8l3.82-3.18a.47.47 0 0 1 .32-.12z",fill:"currentColor"}),h$2("path",{key:"599a5e3a6e81642609dbbf7a7ec67ea8829f7ea3",d:"M6 7.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 .5.5V8a.5.5 0 0 1-.5.5h-6A.5.5 0 0 1 6 8zm5 3a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5zm3-3a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5V8a.5.5 0 0 1-.5.5h-1A.5.5 0 0 1 14 8zm-8 3a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5h-3A.5.5 0 0 1 6 11z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-subtitles",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$8=function(){typeof customElements>"u"||["cosmos-icon-subtitles"].forEach(e=>{"cosmos-icon-subtitles"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),o))})},a$1=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"035be94a827c083868f9d1308aa138a3d2563081",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"85b7473208dbdc8cdca4f77a48520272cdbb3341",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"4a7a224d33187519374cd48def663eb9c1f678da","fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.51 4.42a.52.52 0 0 1 .72 0v-.04a9.14 9.14 0 0 1-.09 13.1.5.5 0 0 1-.71 0l-.34-.35a.5.5 0 0 1 0-.71 7.66 7.66 0 0 0 .08-10.94.49.49 0 0 1 0-.7zm-5.34 1.29L7.62 8H4.5a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h3.11l2.56 2.26a.5.5 0 0 0 .83-.37V6.08a.5.5 0 0 0-.83-.37m3.2 1.98-.37.37a.49.49 0 0 0 0 .67 3.14 3.14 0 0 1 .93 2.2 3.42 3.42 0 0 1-1 2.28.51.51 0 0 0 0 .68l.35.36a.5.5 0 0 0 .69 0 4.59 4.59 0 0 0 .09-6.61.5.5 0 0 0-.69.05",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-volume",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$7=function(){typeof customElements>"u"||["cosmos-icon-volume"].forEach(e=>{"cosmos-icon-volume"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),a$1))})},l$1=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"b39e52d9511975f7ded349ed3bfde2fc3a3c1230",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"ce9d20620804eff1cac83cd2182a8477c54306e0",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"103f42d1d86484899fb8e9a8dc777488e2cd88d4","fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.17 5.71 7.62 8H4.5a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h3.11l2.56 2.26a.5.5 0 0 0 .83-.37V6.08a.5.5 0 0 0-.83-.37",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-volume-low",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$6=function(){typeof customElements>
10"u"||["cosmos-icon-volume-low"].forEach(e=>{"cosmos-icon-volume-low"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),l$1))})},c=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"35cfe05900bee03b1c129cd4f6a12e84a46d2fca",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"49380a8cff7e9f333919568e4878dbf341931bfb",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"0fc5043239fcc6440ca8888966210c5959e3b195","fill-rule":"evenodd","clip-rule":"evenodd",d:"m7.62 8 2.55-2.29a.5.5 0 0 1 .83.37v9.81a.5.5 0 0 1-.83.37L7.61 14H4.5a.5.5 0 0 1-.5-.5v-5a.5.5 0 0 1 .5-.5zm5.38.06.37-.37a.5.5 0 0 1 .69-.05 4.59 4.59 0 0 1-.09 6.61.5.5 0 0 1-.69 0l-.35-.36a.51.51 0 0 1 0-.68 3.42 3.42 0 0 0 1-2.28 3.14 3.14 0 0 0-.93-2.2.49.49 0 0 1 0-.67",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-volume-mid",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$5=function(){typeof customElements>"u"||["cosmos-icon-volume-mid"].forEach(e=>{"cosmos-icon-volume-mid"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),c))})},a=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}getRole(){return this.ariaLabel?"img":void 0}getAriaHidden(){return!this.ariaLabel&&"true"}render(){return h$2(T$2,{key:"06cab218c17e22b6daf6ebae41324f3bfaac4972",role:this.getRole(),"aria-hidden":this.getAriaHidden(),"aria-label":this.ariaLabel},h$2("svg",{key:"78db19bfe776ff0d5fc8f2b62173a3a106723238",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",part:"base"},h$2("path",{key:"deec95ed4d652aecafb8ee49594d34ef62c4e3ab",d:"M12.317 9.775 18.144 3h-1.38l-5.06 5.883L7.66 3H3l6.112 8.896L3 19h1.381l5.344-6.212L13.993 19h4.661zm-1.892 2.199-.62-.886L4.88 4.04H7l3.977 5.688.62.886 5.168 7.393h-2.121z",fill:"currentColor"})))}static get style(){return":host{color:var(--cosmos-icon-color, inherit);display:inline-block;height:var(--cosmos-icon-size, 1em);vertical-align:-0.1551724138em;width:var(--cosmos-icon-size, 1em)}svg,::slotted(svg){display:block;height:100%;width:100%}"}},[1,"cosmos-icon-x",{ariaLabel:[513,"aria-label"]}]),defineCustomElement$4=function(){typeof customElements>"u"||["cosmos-icon-x"].forEach(e=>{"cosmos-icon-x"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),a))})},r$4=defineCustomElement$Q,s=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.kind="underlined",this.generateClassNames=bem("cosmos-link"),this.handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.currentTarget.click())}}get hasText(){var e,t;return!!(null!=(t=null==(e=this.element)?void 0:e.textContent)&&t.trim())}render(){let e=!!this.href;return h$2(e?"a":"span",{key:"a6d27421e413947805155da73c443ca41ac707af","aria-label":this.linkAriaLabel,class:this.generateClassNames({kind:this.kind,"has-text":this.hasText}),href:e?this.href:void 0,hreflang:e?this.hreflang:void 0,onKeyDown:e?void 0:this.handleKeyDown,part:"base",rel:e?this.rel:void 0,role:e?void 0:"button",tabIndex:e?void 0:0,target:e?this.target:void 0},h$2("slot",{key:"0eb4437b7cbbc8896a8e4deb2e86c63c9d2a962e"}))}get element(){return this}static get style(){return'@-webkit-keyframes cosmos-link-dim-border{0%{-webkit-text-decoration-color:transparent;text-decoration-color:transparent}100%{-webkit-text-decoration-color:currentColor;text-decoration-color:currentColor}}@keyframes cosmos-link-dim-border{0%{-webkit-text-decoration-color:transparent;text-decoration-color:transparent}100%{-webkit-text-decoration-color:currentColor;text-decoration-color:currentColor}}.cosmos-link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;outline:none;padding:0;color:inherit;font:inherit;
10font-variant-numeric:inherit;letter-spacing:inherit;position:relative;text-align:inherit;text-decoration:none}.cosmos-link:not(:focus):hover{-webkit-animation:none;animation:none;border-color:currentColor;-o-border-image:none;border-image:none}.cosmos-link:not(.cosmos-link--has-text):focus,.cosmos-link:not(.cosmos-link--has-text):focus:not(:focus-visible){outline:none}.cosmos-link:not(.cosmos-link--has-text):focus:not(:focus-visible)::before{content:none}.cosmos-link:not(.cosmos-link--has-text):focus::before{border-radius:calc(6px * 1.5);bottom:calc((4px + 0px) * -1);-webkit-box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;left:calc((4px + 0px) * -1);position:absolute;right:calc((4px + 0px) * -1);top:calc((4px + 0px) * -1);content:""}.cosmos-link:not(.cosmos-link--has-text){display:inline-block}.cosmos-link--has-text:focus-visible{border-radius:0.2em;-webkit-box-shadow:0 0 0 2px #fff, inset 0 0 0 2px #1B6AEE;box-shadow:0 0 0 2px #fff, inset 0 0 0 2px #1B6AEE;margin:-2px;padding:0 2px;text-decoration:none}.cosmos-link--kind-underlined{text-decoration:underline;text-decoration-thickness:0.105em;text-transform:inherit;text-underline-offset:0.125em}.cosmos-link--kind-underlined:not(:focus){-webkit-animation:1s cosmos-link-dim-border steps(2, start) infinite paused;animation:1s cosmos-link-dim-border steps(2, start) infinite paused}'}},[257,"cosmos-link",{href:[513],hreflang:[513],kind:[513],linkAriaLabel:[513,"link-aria-label"],rel:[513],target:[513]}]),defineCustomElement$3=function(){typeof customElements>"u"||["cosmos-link"].forEach(e=>{"cosmos-link"===e&&(customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),s))})},r$3=defineCustomElement$H,r$2=defineCustomElement$G,l=bem("cosmos-radio"),m=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.inputchangeEvent=createEvent(this,"inputchange",6),this.inputinvalidEvent=createEvent(this,"inputinvalid",7),this.checked=!1,this.disabled=!1,this.focusable=!0,this.hitArea="content",this.invalid=!1,this.required=!1,this.computedAppearance="dark",this.inputInvalid=!1,this.isHovered=!1,this.labelText="",this.tabIndex=0,this.radios=[],this.hoveredOn=()=>{this.isHovered=!0},this.hoveredOff=()=>{this.isHovered=!1},this.handleFormData=e=>{if(this.name&&this.input&&this.input.checked&&!this.disabled)return e.formData.append(this.input.name,this.input.value)},this.handleFormSubmit=e=>{this.reportValidity()||e.preventDefault()},this.handleInvalid=e=>{this.group&&e.preventDefault(),this.inputInvalid=!0,this.inputinvalidEvent.emit()},this.handleChange=()=>{var e;this.checked=null==(e=this.input)?void 0:e.checked},this.handleSlotChange=()=>{this.labelText=getDefaultSlotTextContent(this.defaultSlotRef)}}handleAppearanceChange(e){this.computedAppearance=e}handleFocusableChange(e){this.setTabindexFromFocusable(e)}handleInvalidChange(e){this.inputInvalid=e}handleCheckedChange(e,t){e&&e!==t&&this.inputchangeEvent.emit()}async inputCheckValidity(){return this.checkValidity()}async inputReportValidity(){return this.reportValidity()}async inputSetCustomValidity(e){var t;null==(t=this.input)||t.setCustomValidity(e)}async inputFocus(){var e;null==(e=this.input)||e.focus()}async inputBlur(){var e;null==(e=this.input)||e.blur()}deriveTextAppearance(){return"light"===this.computedAppearance?"light":"dark"}getTitle(){var e;return this.clamp?null==(e=this.element.textContent)?void 0:e.trim():void 0}checkValidity(){var e,t;let i=null==(e=this.radios)?void 0:e.some(e=>e.shadowRoot.querySelector('input[type="radio"]').checked);return!(null!=(t=this.radios)&&t.some(e=>e.required))||i}reportValidity(){let e=this.checkValidity();return!e&&this.input&&(this.input.required=!0,this.input.reportValidity()),e}getAllRadios(){return this.group?[...this.group.querySelectorAll(`${transformTag("cosmos-radio")}[name="${this.name}"]`)].filter(e=>!e.disabled):[this.element]}getRadioIndex(){return this.radios.findIndex(e=>e===this.element)}setTabindexFromFocusable(e=this.focusable){this.tabIndex=e?0:-1}connectedCallback(){this.form=this.element.closest("form"),this.group=this.element.closest(transformTag("cosmos-radio-group")),this.form&&(this.form.addEventListener("formdata",this.handleFormData,!0),this.form.addEventListener("submit",this.handleFormSubmit,!0))}componentWillLoad(){resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)}),this.radios=this.getAllRadios(),this.radioIndex=this.getRadioIndex(),this.setTabindexFromFocusable()}
10componentDidLoad(){Kt.observe(this.element,this.handleSlotChange)}disconnectedCallback(){this.form&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit)),Kt.unobserve(this.element)}render(){return h$2("div",{key:"94c232980e357568adfc5ed116c227e6f426241f",class:l({appearance:this.computedAppearance,disabled:this.disabled,hovered:this.isHovered,invalid:this.invalid||this.inputInvalid}),part:"base"},h$2("div",{key:"3bdbf3cbb10f47f957f70dd3b52675fd7df787e0",class:l("input-and-prefix")},h$2("cosmos-text",{key:"745fbf4e3b79bf5cae19fd55bf1c90fde0011820","aria-hidden":"true",class:l("aligner"),size:"small",tag:"span"}),h$2("div",{key:"049cbd4a20118b7dfe0204f87509448553172ba3",class:l("input-container")},h$2("input",{key:"a6e83fbdc3aa950e50cf03305c85c53f14667386","aria-label":this.labelText,"aria-posinset":this.radioIndex+1,"aria-setsize":this.radios.length,autofocus:this.autofocus,checked:this.checked,class:l("input"),disabled:this.disabled,id:"radio",name:this.name,onInvalid:this.handleInvalid,ref:e=>this.input=e,required:this.required,tabIndex:this.tabIndex,type:"radio",value:this.value,onChange:this.handleChange,part:"radio"}),h$2("span",{key:"612aee643148b131ff0b0cf2784ad7d496ce5815",class:l("dot")})),h$2("label",{key:"0bae70a45049856766006297b1447db2d5a6d61d","aria-hidden":"true",htmlFor:"radio",class:l("prefix"),onMouseEnter:this.hoveredOn,onMouseLeave:this.hoveredOff,part:"prefix"},h$2("slot",{key:"b8f5c925be10fde983faf09c18d15c94f656952f",name:"prefix"}))),h$2("div",{key:"3270cd408b30ae25d57fc77bea68c6b24b8ef2f6",class:l("content",{row:"row"===this.hitArea})},h$2("label",{key:"e98d149a14d9e9c1fe65655cbcfdda00fc233b04",class:l("label"),htmlFor:"radio"},h$2("cosmos-text",{key:"a309cd2303c8b4ad69bc96b85b7ef0be1c74cc33",appearance:this.deriveTextAppearance(),class:l("label-text"),clamp:this.clamp,onMouseEnter:this.hoveredOn,onMouseLeave:this.hoveredOff,size:"small",tag:"span",title:this.getTitle(),exportparts:"base: label"},h$2("span",{key:"d92e08f10e6da2d7d187570af2c577c76b2a1344"},h$2("slot",{key:"e6bf9b2848cba04948f3e51b3d6fee9e0aff1c99",ref:e=>this.defaultSlotRef=e}))))))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],focusable:[{handleFocusableChange:0}],invalid:[{handleInvalidChange:0}],checked:[{handleCheckedChange:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;min-width:0;width:100%}.cosmos-radio{-ms-flex-align:baseline;align-items:baseline;display:-ms-flexbox;display:flex}.cosmos-radio__input-and-prefix{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0}.cosmos-radio__aligner{--cosmos-text-font-family:var(--cosmos-radio-font-family);--cosmos-text-font-size:var(--cosmos-radio-font-size);--cosmos-text-font-style:var(--cosmos-radio-font-style);--cosmos-text-font-weight:var(--cosmos-radio-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-line-height);--cosmos-text-text-transform:var(--cosmos-radio-text-transform);width:0}.cosmos-radio__aligner::before{content:"\xa0"}.cosmos-radio__input-container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;height:var(--cosmos-radio-size, 16px);-ms-flex-pack:center;justify-content:center;-webkit-margin-end:var(--cosmos-radio-gap, calc(0.5 * var(--cosmos-radio-size, 16px)));margin-inline-end:var(--cosmos-radio-gap, calc(0.5 * var(--cosmos-radio-size, 16px)));position:relative;width:var(--cosmos-radio-size, 16px)}.cosmos-radio__prefix{display:grid}.cosmos-radio__prefix>[slot=prefix]{-webkit-margin-end:var(--cosmos-radio-gap, calc(0.375 * var(--cosmos-radio-size, 16px)));margin-inline-end:var(--cosmos-radio-gap, calc(0.375 * var(--cosmos-radio-size, 16px)))}.cosmos-radio__prefix ::slotted([slot=prefix]){--cosmos-icon-size:18px;--cosmos-flag-width:18px;--cosmos-avatar-size:18px;-webkit-margin-end:var(--cosmos-radio-gap, calc(0.375 * var(--cosmos-radio-size, 16px)));margin-inline-end:var(--cosmos-radio-gap, calc(0.375 * var(--cosmos-radio-size, 16px)));position:relative}.cosmos-radio__prefix ::slotted([slot=prefix])::before{content:"";display:block;height:100%;left:0;min-height:calc(var(--cosmos-radio-size, 16px) + calc(0.25 * var(--cosmos-radio-size, 16px)) * 2);position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cosmos-radio__input:focus,.cosmos-radio__input:focus:not(:focus-visible){outline:none}.cosmos-radio__input:focus:not(:focus-visible)::before{content:none}.cosmos-radio__input:focus::before{border-radius:calc(9999px * 1.5);bottom:calc((4px + 0px) * -1);-webkit-box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;box-shadow:inset 0 0 0 2px #1B6AEE, 0 0 0 2px #FFFFFF;left:calc((4px + 0px) * -1);position:absolute;right:calc((4px + 0px) * -1);top:calc((4px + 0px) * -1);content:""}.cosmos-radio__input{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border-radius:9999px;border-style:solid;border-width:var(--cosmos-radio-border-width, 1px);-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;height:var(--cosmos-radio-size, 16px);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:0;width:var(--cosmos-radio-size, 16px)}.cosmos-radio__input::after{-webkit-box-sizing:content-box;box-sizing:content-box;content:"";display:block;height:calc(var(--cosmos-radio-size, 16px) + calc(0.25 * var(--cosmos-radio-size, 16px)) * 2);position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:calc(var(--cosmos-radio-size, 16px) + calc(0.25 * var(--cosmos-radio-size, 16px)) * 2);z-index:1}.cosmos-radio__input~.cosmos-radio__dot{border-radius:9999px;display:block;height:6px;left:0;margin:auto;opacity:0;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:6px}.cosmos-radio__input:checked~.cosmos-radio__dot{opacity:1}.cosmos-radio__content{min-width:0;position:relative}.cosmos-radio__content--row{width:100%}.cosmos-radio__content--row label{width:100%}.cosmos-radio__label{display:block;min-width:0;position:relative}.cosmos-radio__label::before{bottom:calc(calc(0.25 * var(--cosmos-radio-size, 16px)) * -1);content:"";left:0;position:absolute;right:0;top:calc(calc(0.25 * var(--cosmos-radio-size, 16px)) * -1)}.cosmos-radio__label-text{--cosmos-text-color:var(--cosmos-radio-color);--cosmos-text-font-family:var(--cosmos-radio-font-family);--cosmos-text-font-size:var(--cosmos-radio-font-size);--cosmos-text-font-style:var(--cosmos-radio-font-style);
10--cosmos-text-font-weight:var(--cosmos-radio-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-line-height);--cosmos-text-text-transform:var(--cosmos-radio-text-transform);display:-ms-flexbox;display:flex;position:relative}.cosmos-radio--hovered .cosmos-radio__label-text{--cosmos-text-color:var(--cosmos-radio-color-hover)}.cosmos-radio--appearance-dark{color:var(--cosmos-radio-color, #000F1E)}.cosmos-radio--appearance-dark .cosmos-radio__input{background:var(--cosmos-radio-background-color, transparent);border-color:var(--cosmos-radio-border-color, rgba(0, 15, 30, 0.6))}.cosmos-radio--appearance-dark .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color, #000F1E)}.cosmos-radio--appearance-dark .cosmos-radio__input:checked~.cosmos-radio__dot{background-color:var(--cosmos-radio-dot-color, #FFFFFF)}.cosmos-radio--appearance-dark .cosmos-radio__input-container:hover,.cosmos-radio--appearance-dark.cosmos-radio--hovered{color:var(--cosmos-radio-color-hover, #000F1E)}.cosmos-radio--appearance-dark .cosmos-radio__input-container:hover .cosmos-radio__input,.cosmos-radio--appearance-dark.cosmos-radio--hovered .cosmos-radio__input{background:var(--cosmos-radio-background-color-hover, rgba(0, 15, 30, 0.1))}.cosmos-radio--appearance-dark .cosmos-radio__input-container:hover .cosmos-radio__input:checked,.cosmos-radio--appearance-dark.cosmos-radio--hovered .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color-hover, rgba(0, 15, 30, 0.8))}.cosmos-radio--appearance-dark:not(.cosmos-radio--invalid) .cosmos-radio__input:checked{border-color:transparent}.cosmos-radio--appearance-dark:not(.cosmos-radio--invalid) .cosmos-radio__input-container:hover .cosmos-radio__input,.cosmos-radio--appearance-dark:not(.cosmos-radio--invalid).cosmos-radio--hovered .cosmos-radio__input{border-color:var(--cosmos-radio-border-color-hover, rgba(0, 15, 30, 0.6))}.cosmos-radio--appearance-dark:not(.cosmos-radio--invalid) .cosmos-radio__input-container:hover .cosmos-radio__input:checked,.cosmos-radio--appearance-dark:not(.cosmos-radio--invalid).cosmos-radio--hovered .cosmos-radio__input:checked{border-color:var(--cosmos-radio-background-color-hover, rgba(0, 15, 30, 0.1))}.cosmos-radio--appearance-light{color:var(--cosmos-radio-color, #FFFFFF)}.cosmos-radio--appearance-light .cosmos-radio__input{background:var(--cosmos-radio-background-color, transparent);border-color:var(--cosmos-radio-border-color, rgba(255, 255, 255, 0.6))}.cosmos-radio--appearance-light .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color, #FFFFFF)}.cosmos-radio--appearance-light .cosmos-radio__input:checked~.cosmos-radio__dot{background-color:var(--cosmos-radio-dot-color, #000F1E)}.cosmos-radio--appearance-light .cosmos-radio__input-container:hover,.cosmos-radio--appearance-light.cosmos-radio--hovered{color:var(--cosmos-radio-color-hover, #FFFFFF)}.cosmos-radio--appearance-light .cosmos-radio__input-container:hover .cosmos-radio__input,.cosmos-radio--appearance-light.cosmos-radio--hovered .cosmos-radio__input{background:var(--cosmos-radio-background-color-hover, rgba(255, 255, 255, 0.1))}.cosmos-radio--appearance-light .cosmos-radio__input-container:hover .cosmos-radio__input:checked,.cosmos-radio--appearance-light.cosmos-radio--hovered .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color-hover, rgba(255, 255, 255, 0.8))}.cosmos-radio--appearance-light:not(.cosmos-radio--invalid) .cosmos-radio__input:checked{border-color:transparent}.cosmos-radio--appearance-light:not(.cosmos-radio--invalid) .cosmos-radio__input-container:hover .cosmos-radio__input,.cosmos-radio--appearance-light:not(.cosmos-radio--invalid).cosmos-radio--hovered .cosmos-radio__input{border-color:var(--cosmos-radio-border-color-hover, rgba(255, 255, 255, 0.6))}.cosmos-radio--appearance-light:not(.cosmos-radio--invalid) .cosmos-radio__input-container:hover .cosmos-radio__input:checked,.cosmos-radio--appearance-light:not(.cosmos-radio--invalid).cosmos-radio--hovered .cosmos-radio__input:checked{border-color:var(--cosmos-radio-background-color-hover, rgba(255, 255, 255, 0.1))}.cosmos-radio--disabled{pointer-events:none}.cosmos-radio--disabled .cosmos-radio__prefix{opacity:0.4}.cosmos-radio--disabled.cosmos-radio--appearance-dark .cosmos-radio__input{border-color:var(--cosmos-radio-border-color, rgba(0, 15, 30, 0.45))}.cosmos-radio--disabled.cosmos-radio--appearance-dark .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color, rgba(0, 15, 30, 0.45))}.cosmos-radio--disabled.cosmos-radio--appearance-dark .cosmos-radio__label-text{--cosmos-text-color:var(--cosmos-radio-color, rgba(0, 15, 30, 0.45))}.cosmos-radio--disabled.cosmos-radio--appearance-light .cosmos-radio__input{border-color:var(--cosmos-radio-border-color, rgba(255, 255, 255, 0.45))}.cosmos-radio--disabled.cosmos-radio--appearance-light .cosmos-radio__input:checked{background:var(--cosmos-radio-background-color, rgba(255, 255, 255, 0.45))}.cosmos-radio--disabled.cosmos-radio--appearance-light .cosmos-radio__label-text{--cosmos-text-color:var(--cosmos-radio-color, rgba(255, 255, 255, 0.45))}.cosmos-radio--invalid .cosmos-radio__input{border-color:var(--cosmos-radio-invalid-color, #E06600);border-width:var(--cosmos-radio-border-width, 2px)}'}},[257,"cosmos-radio",{appearance:[513],autofocus:[516],checked:[516],clamp:[516],disabled:[516],focusable:[516],hitArea:[513,"hit-area"],invalid:[516],name:[513],required:[516],value:[513],computedAppearance:[32],inputInvalid:[32],isHovered:[32],labelText:[32],tabIndex:[32],inputCheckValidity:[64],inputReportValidity:[64],inputSetCustomValidity:[64],inputFocus:[64],inputBlur:[64]},void 0,{appearance:[{handleAppearanceChange:0}],focusable:[{handleFocusableChange:0}],invalid:[{handleInvalidChange:0}],checked:[{handleCheckedChange:0}]}]),defineCustomElement$2=function(){typeof customElements>
10"u"||["cosmos-radio","cosmos-text"].forEach(e=>{switch(e){case"cosmos-radio":customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),m);break;case"cosmos-text":customElements.get(transformTag(transformTag(e)))||defineCustomElement$R()}})},u=bem("cosmos-radio-group"),x$1=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.hideLabel=!1,this.invalid=!1,this.computedAppearance="dark",this.groupInvalid=!1,this.enabledRadios=[],this.isNavigatedWithKeyboard=!1,this.radios=[],this.getValidationMessage=()=>this.validationMessage?this.validationMessage:!this.invalid&&this.groupInvalid&&this.enabledRadios.length?this.enabledRadios[0].shadowRoot.querySelector('input[type="radio"]').validationMessage:void 0,this.reannounceValidationMessage=async()=>{this.validationMessageRef&&(this.validationMessageRef.ariaLabel="",await nextTick(),this.validationMessageRef.ariaLabel=this.getValidationMessage())},this.handleSlotChange=()=>{this.initializeRadios(),forceUpdate(this)}}handleAppearanceChange(e){this.computedAppearance=e,this.updateRadiosAppearance()}handleInvalidChange(e){this.groupInvalid=e,this.updateRadiosInvalidState()}handleDisabledChange(e){void 0!==this.disabled&&this.radios.forEach(t=>{t.disabled=e})}async handleInputchange(e){let t=this.enabledRadios.findIndex(t=>t===e.target);await this.updateRadios(t),this.isInvalidStateControlled()}handleInputInvalid(){this.groupInvalid=!0,this.updateRadiosInvalidState(),this.reannounceValidationMessage()}async handleKeyDown(e){if(this.isNavigatedWithKeyboard="Tab"!==e.key,["ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)){[this.radios,this.enabledRadios]=this.getRadios(),e.preventDefault();let t=this.enabledRadios.findIndex(e=>e.checked);-1==t&&(t=0),["ArrowUp","ArrowLeft"].includes(e.key)?--t<0&&(t=this.enabledRadios.length-1):++t>=this.enabledRadios.length&&(t=0),await this.updateRadios(t)}}isInvalidStateControlled(){this.invalid||(this.groupInvalid=!1,this.updateRadiosInvalidState())}getRadios(){let e=[...this.element.querySelectorAll(transformTag("cosmos-radio"))],t=e.filter(e=>!e.disabled);return[e,t]}updateRadiosAppearance(){this.radios.forEach(e=>{e.appearance=this.computedAppearance})}async updateRadios(e){if(this.enabledRadios.length)if(this.enabledRadios.forEach((t,i)=>{e!==i&&(t.checked=!1),t.invalid=this.groupInvalid,t.focusable=!1}),void 0!==e&&-1!==e&&this.enabledRadios[e]){let t=this.enabledRadios[e];t.checked=!0,t.focusable=!0,this.isNavigatedWithKeyboard&&await t.inputFocus()}else this.enabledRadios[0].focusable=!0}updateRadiosInvalidState(){this.radios.forEach(e=>{e.invalid=this.groupInvalid})}updateRadiosDisabledState(){void 0!==this.disabled&&this.radios.forEach(e=>{e.disabled=this.disabled})}initializeRadios(){[this.radios,this.enabledRadios]=this.getRadios(),this.updateRadiosDisabledState(),this.updateRadiosInvalidState(),this.updateRadiosAppearance();let e=this.enabledRadios.findIndex(e=>e.checked);this.updateRadios(e)}componentWillLoad(){this.groupInvalid=this.invalid,resolveAppearance({instance:this,modeToAppearanceMap:{dark:"light",light:"dark"},callback:this.handleAppearanceChange.bind(this)}),Kt.observe(this.element,this.handleSlotChange)}disconnectedCallback(){Kt.unobserve(this.element)}render(){return h$2(FormField,{key:"511d64cfd542a08212de2178979ec9e792957c5b",element:this.element,appearance:this.computedAppearance,class:u(),helpText:this.helpText,hideLabel:this.hideLabel,invalid:this.groupInvalid,label:this.label,optionalLabel:this.optionalLabel,requiredLabel:this.requiredLabel,validationMessage:this.getValidationMessage(),validationMessageRef:e=>this.validationMessageRef=e,disabled:this.disabled,required:!!this.requiredLabel},h$2("div",{key:"97cc918034fe0df221843a36551309dbd3143f64","aria-disabled":getAriaDisabled(this.disabled),"aria-invalid":getAriaInvalid(this.groupInvalid),"aria-labelledby":"label "+getAriaDescribedBy(this.groupInvalid),"aria-required":getAriaRequired(!!this.requiredLabel),class:u("list"),role:"radiogroup"},h$2("slot",{key:"3868c80debf709a9f093a67d17c981dc2a2829fb"})))}
vendor: 5,702 bytes, line 10
10get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],invalid:[{handleInvalidChange:0}],disabled:[{handleDisabledChange:0}]}}static get style(){return'@charset "UTF-8";.cosmos-form-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.cosmos-form-field__info-container{display:inline-block;margin-bottom:8px}.cosmos-form-field__info-container:not(.cosmos-form-field__info-container--has-label,.cosmos-form-field__info-container--has-help-text,.cosmos-form-field__info-container--has-required-optional-label){display:none}.cosmos-form-field__info-container--hide-label{clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;margin-bottom:0}.cosmos-form-field__label-text,.cosmos-form-field__help-text,.cosmos-form-field__required-optional-label,.cosmos-form-field__validation-message{display:inline}.cosmos-form-field__label-text{--cosmos-text-color:var(--cosmos-radio-group-label-color);--cosmos-text-font-family:var(--cosmos-radio-group-label-font-family);--cosmos-text-font-size:var(--cosmos-radio-group-label-font-size);--cosmos-text-font-style:var(--cosmos-radio-group-label-font-style);--cosmos-text-font-weight:var(--cosmos-radio-group-label-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-group-label-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-group-label-line-height);--cosmos-text-text-transform:var(--cosmos-radio-group-label-text-transform)}.cosmos-form-field__help-text{--cosmos-text-color:var(--cosmos-radio-group-help-text-color);--cosmos-text-font-family:var(--cosmos-radio-group-help-text-font-family);--cosmos-text-font-size:var(--cosmos-radio-group-help-text-font-size);--cosmos-text-font-style:var(--cosmos-radio-group-help-text-font-style);--cosmos-text-font-weight:var(--cosmos-radio-group-help-text-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-group-help-text-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-group-help-text-line-height);--cosmos-text-text-transform:var(--cosmos-radio-group-help-text-text-transform)}.cosmos-form-field__required-optional-label{--cosmos-text-color:var(--cosmos-radio-group-required-optional-label-color);--cosmos-text-font-family:var(--cosmos-radio-group-required-optional-label-font-family);--cosmos-text-font-size:var(--cosmos-radio-group-required-optional-label-font-size);--cosmos-text-font-style:var(--cosmos-radio-group-required-optional-label-font-style);--cosmos-text-font-weight:var(--cosmos-radio-group-required-optional-label-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-group-required-optional-label-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-group-required-optional-label-line-height);--cosmos-text-text-transform:var(--cosmos-radio-group-required-optional-label-text-transform);display:inline-block;-webkit-margin-start:4px;margin-inline-start:4px;white-space:nowrap}.cosmos-form-field__validation-message{display:-ms-flexbox;display:flex;gap:4px;margin-top:8px}.cosmos-form-field__validation-message-text{--cosmos-text-font-family:var(--cosmos-radio-group-validation-message-font-family);--cosmos-text-font-size:var(--cosmos-radio-group-validation-message-font-size);--cosmos-text-font-style:var(--cosmos-radio-group-validation-message-font-style);--cosmos-text-font-weight:var(--cosmos-radio-group-validation-message-font-weight);--cosmos-text-letter-spacing:var(--cosmos-radio-group-validation-message-letter-spacing);--cosmos-text-line-height:var(--cosmos-radio-group-validation-message-line-height);--cosmos-text-text-transform:var(--cosmos-radio-group-validation-message-text-transform)}.cosmos-form-field__validation-message-icon{--cosmos-icon-color:var(--cosmos-radio-group-invalid-color, #E06600);--cosmos-icon-size:calc(16rem / var(--cosmos-base-font-size, 16));-ms-flex-negative:0;flex-shrink:0;padding:1.5px 0}.cosmos-form-field--invalid .cosmos-form-field__label-text,.cosmos-form-field--invalid .cosmos-form-field__validation-message{--cosmos-text-color:var(--cosmos-radio-group-label-color)}.cosmos-form-field--disabled.cosmos-form-field--appearance-dark .cosmos-form-field__label-text{--cosmos-text-color:var(--cosmos-radio-group-label-color, rgba(0, 15, 30, 0.45))}.cosmos-form-field--disabled.cosmos-form-field--appearance-dark .cosmos-form-field__help-text{--cosmos-text-color:var(--cosmos-radio-group-help-text-color, rgba(0, 15, 30, 0.45))}.cosmos-form-field--disabled.cosmos-form-field--appearance-dark .cosmos-form-field__required-optional-label{--cosmos-text-color:var(--cosmos-radio-group-required-optional-label-color, rgba(0, 15, 30, 0.45))}.cosmos-form-field--disabled.cosmos-form-field--appearance-light .cosmos-form-field__label-text{--cosmos-text-color:var(--cosmos-radio-group-label-color, rgba(255, 255, 255, 0.45))}.cosmos-form-field--disabled.cosmos-form-field--appearance-light .cosmos-form-field__help-text{--cosmos-text-color:var(--cosmos-radio-group-help-text-color, rgba(255, 255, 255, 0.45))}.cosmos-form-field--disabled.cosmos-form-field--appearance-light .cosmos-form-field__required-optional-label{--cosmos-text-color:var(--cosmos-radio-group-required-optional-label-color, rgba(0, 15, 30, 0.45))}.cosmos-radio-group__list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}'}},[257,"cosmos-radio-group",{appearance:[513],disabled:[516],helpText:[513,"help-text"],hideLabel:[516,"hide-label"],invalid:[516],label:[513],optionalLabel:[513,"optional-label"],requiredLabel:[513,"required-label"],validationMessage:[513,"validation-message"],computedAppearance:[32],groupInvalid:[32]}
10,[[0,"inputchange","handleInputchange"],[0,"inputinvalid","handleInputInvalid"],[0,"keydown","handleKeyDown"]],{appearance:[{handleAppearanceChange:0}],invalid:[{handleInvalidChange:0}],disabled:[{handleDisabledChange:0}]}]),defineCustomElement$1=function(){typeof customElements>"u"||["cosmos-radio-group","cosmos-icon-warning","cosmos-text"].forEach(e=>{switch(e){case"cosmos-radio-group":customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),x$1);break;case"cosmos-icon-warning":customElements.get(transformTag(transformTag(e)))||defineCustomElement$J();break;case"cosmos-text":customElements.get(transformTag(transformTag(e)))||defineCustomElement$R()}})},p=defineCustomElement$O,r$1=defineCustomElement$R,r=defineCustomElement$F;class g{constructor(){this.emitter=new Jt,this.placementMap={left:"before",right:"after",bottom:"below",top:"above"},this.cssTransition=new i$5}create({target:e,content:t,appendTo:i,interactive:n,placement:r,showOnCreate:o,follow:a,sticky:s,offset:l=8,enterDuration:c=300,leaveDuration:u=300,trigger:d}){this.target=e,this.leaveDuration=u,this.enterDuration=c,this.element=t,this.element.style.display="block",t.remove(),this.tooltipInstance=tippy(this.target,{appendTo:i,hideOnClick:!1,interactive:n,offset:[0,l],placement:this.cosmosToPopperPlacement(r),showOnCreate:o||!1,touch:!1,delay:[null,this.leaveDuration],trigger:d||void 0,sticky:s,plugins:[F,N],onMount:({popperInstance:e,popper:t})=>{var i;let n=a?"follow":null==e?void 0:e.state.placement;null==(i=t.firstElementChild)||i.setAttribute("data-cosmos-tooltip-placement",this.popperToCosmosPlacement(n)),this.cssTransition.enter(t.firstElementChild,this.enterDuration)},onShow:()=>{this.onShowHandler()},onUntrigger:async()=>{await this.onHideHandler()},render:()=>({popper:this.element})}),a&&requestAnimationFrame(()=>{var e;this.tooltipInstance&&"function"==typeof this.tooltipInstance.setProps&&(null==(e=this.tooltipInstance)||e.setProps({followCursor:this.getTippyFollowDirection(r)}))})}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}show(){var e,t,i;null!=(e=this.tooltipInstance)&&e.unmount&&(null==(t=this.tooltipInstance)||t.unmount()),null==(i=this.tooltipInstance)||i.show()}async hide(){await this.onHideHandler(),this.tooltipInstance.hide()}async update(){var e;this.isVisible()&&(await nextTick(),await (null==(e=this.tooltipInstance.popperInstance)?void 0:e.update()))}isVisible(){return this.tooltipInstance.state.isVisible}setProps(e){var t;null==(t=this.tooltipInstance)||t.setProps(e)}destroy(){this.tooltipInstance.destroy()}popperToCosmosPlacement(e){return this.placementMap[e]}cosmosToPopperPlacement(e){return Object.keys(this.placementMap).find(t=>this.placementMap[t]===e)||"top"}getTippyFollowDirection(e){return"above"===e||"below"===e?"horizontal":"vertical"}onShowHandler(){this.emitter.emit("show"),this.target.setAttribute("aria-expanded","true")}onHideHandler(){return this.emitter.emit("hide"),this.triggerCssLeaveTransition()}triggerCssLeaveTransition(){return this.cssTransition.leave(this.element.firstElementChild,this.leaveDuration)}}let w=bem("cosmos-tooltip"),x=proxyCustomElement(class extends b$3{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.hideEvent=createEvent(this,"hide",7),this.showEvent=createEvent(this,"show",7),this.content="",this.controlled=!1,this.follow=!1,this.offset=8,this.placement="above",this.spacing="tight",this.unreachable=!1,this.visible=!1,this.computedAppearance="light",this.hasContent=!1,this.tippyElement=void 0,this.tippyMount=void 0,this.tooltipInstance=void 0,this.onDefaultSlotChange=()=>{this.tooltipInstance&&!this.getTooltipTarget?(this.tooltipInstance.destroy(),this.tooltipInstance=void 0):(this.instantiateTooltip(),this.createTooltip())},this.showHandler=()=>{this.showEvent.emit()},this.hideHandler=()=>{this.hideEvent.emit()}}handleAppearanceChange(e){this.computedAppearance=e}handleShowChange(){var e,t,i,n;null==(e=this.tooltipInstance)||e.setProps({touch:!0}),this.visible?null==(t=this.tooltipInstance)||t.show():null==(i=this.tooltipInstance)||i.hide(),null==(n=this.tooltipInstance)||n.setProps({touch:!1})}async handleContentChange(){await this.update()}
10async update(){var e;this.tooltipInstance&&await (null==(e=this.tooltipInstance)?void 0:e.update())}createObserver(){let e=this.element.querySelector('[slot="content"]');if(!e||typeof MutationObserver>"u")return;let t=new MutationObserver(e=>{e.forEach(e=>{"childList"===e.type&&this.update()})});t.observe(e,{childList:!0,subtree:!0}),this.observer=t}instantiateTooltip(){!isNodeEnvironment()&&this.getTooltipTarget()&&(this.tooltipInstance=new g)}createTooltip(){var e;this.tooltipInstance&&(this.tooltipOptions={target:this.getTooltipTarget(),appendTo:this.tippyMount,showOnCreate:this.visible,placement:this.placement||"above",content:this.tippyElement,follow:this.normalizedFollowValue,sticky:"target"===this.follow,interactive:!this.unreachable,offset:this.offset,enterDuration:150,leaveDuration:150,trigger:this.controlled?"manual":void 0},null==(e=this.tooltipInstance)||e.create(this.tooltipOptions),this.addTooltipListeners())}addTooltipListeners(){var e,t;this.tooltipInstance&&(null==(e=this.tooltipInstance)||e.on("show",this.showHandler),null==(t=this.tooltipInstance)||t.on("hide",this.hideHandler))}removeTooltipListeners(){var e,t;this.tooltipInstance&&(null==(e=this.tooltipInstance)||e.off("show",this.showHandler),null==(t=this.tooltipInstance)||t.off("hide",this.hideHandler))}getTooltipTarget(){return Array.from(this.element.children).find(e=>"style"!==e.tagName.toLowerCase()&&"content"!==e.getAttribute("slot"))}getContent(){return this.content&&h$2("cosmos-text",{size:"x-small",weight:"medium",exportparts:"base: text"},this.content)}determineIfTooltipHasContent(){let e=hasNamedSlot(this.element,"content");this.hasContent=null!=this.content&&""!==this.content||e}normalizeFollowValue(){return["true","","cursor"].includes((this.follow+"").toLowerCase().trim())}componentWillLoad(){this.instantiateTooltip(),resolveAppearance({instance:this,modeToAppearanceMap:{dark:"dark",light:"light"},callback:this.handleAppearanceChange.bind(this)})}componentDidLoad(){this.createTooltip(),this.createObserver()}componentWillRender(){this.normalizedFollowValue=this.normalizeFollowValue(),this.determineIfTooltipHasContent()}disconnectedCallback(){var e,t;this.removeTooltipListeners(),null==(e=this.tooltipInstance)||e.destroy(),null==(t=this.observer)||t.disconnect()}render(){return h$2(T$2,{key:"2185dec6e19156b26ccdef1ae0f2785ffd426670"},h$2("div",{key:"c1204a4037bd018e9845398de6b15aa1cc8eeec7",class:"tippy-mount",ref:e=>this.tippyMount=e}),h$2("div",{key:"e49dc03f4bad2e793e9d65a41c519b647fb0159f",class:"tippy-element",ref:e=>this.tippyElement=e},h$2("div",{key:"c64c04627c04c1fdfc1b9e9ce3d7ebc894abc80e",class:w({spacing:this.spacing,appearance:this.computedAppearance,unreachable:this.unreachable,empty:!this.hasContent}),part:"base"},h$2("cosmos-mode",{key:"5c631fda33db318ba0e1e4bacf801a35f59168ba",mode:this.computedAppearance},h$2("span",{key:"0cf09d8dab42fdbe55927b1c0426e671b19f0e49"},h$2("slot",{key:"8275fc6495b6d819728dbdcf24f0f5aa79b9d81a",name:"content",onSlotchange:()=>this.determineIfTooltipHasContent()},this.getContent()))))),h$2("slot",{key:"1c8d2a7cab4e15aac7fab2700480d099d1c95d83",onSlotchange:this.onDefaultSlotChange}))}get element(){return this}static get watchers(){return{appearance:[{handleAppearanceChange:0}],visible:[{handleShowChange:0}],content:[{handleContentChange:0}]}}static get style(){return'@charset "UTF-8";@supports (font-variation-settings: normal){::slotted(strong),::slotted(b){font-variation-settings:"opsz" 12, "wght" 700}}:host{display:contents}.tippy-mount{display:inline-block;height:0;width:0}.tippy-element{display:none;z-index:var(--cosmos-tooltip-z-index, 9999) !important}.cosmos-tooltip{--cosmos-text-color:var(--cosmos-tooltip-color);--cosmos-text-font-family:var(--cosmos-tooltip-font-family);--cosmos-text-font-size:var(--cosmos-tooltip-font-size);--cosmos-text-font-style:var(--cosmos-tooltip-font-style);--cosmos-text-font-weight:var(--cosmos-tooltip-font-weight);--cosmos-text-letter-spacing:var(--cosmos-tooltip-letter-spacing);--cosmos-text-line-height:var(--cosmos-tooltip-line-height);--cosmos-text-text-transform:var(--cosmos-tooltip-text-transform);background-color:var(--cosmos-tooltip-background, #FFFFFF);border-color:var(--cosmos-tooltip-border-color, transparent);border-radius:var(--cosmos-tooltip-border-radius, 6px);border-style:solid;border-width:var(--cosmos-tooltip-border-width, 0);
10-webkit-box-shadow:var(--cosmos-tooltip-box-shadow, 0px 16px 24px 0px rgba(0, 15, 30, 0.0588235294), 0px 4px 8px 0px rgba(0, 15, 30, 0.0196078431));box-shadow:var(--cosmos-tooltip-box-shadow, 0px 16px 24px 0px rgba(0, 15, 30, 0.0588235294), 0px 4px 8px 0px rgba(0, 15, 30, 0.0196078431));max-width:calc(288rem / var(--cosmos-base-font-size, 16));padding:var(--cosmos-tooltip-padding, 4px 8px)}.cosmos-tooltip--spacing-loose{padding:var(--cosmos-tooltip-padding, 8px 12px)}.cosmos-tooltip--appearance-dark{background-color:var(--cosmos-tooltip-background, #00162B)}.cosmos-tooltip.enter{opacity:0}.cosmos-tooltip[data-cosmos-tooltip-placement=above].enter{-webkit-transform:translate(0, 8px);transform:translate(0, 8px)}.cosmos-tooltip[data-cosmos-tooltip-placement=below].enter{-webkit-transform:translate(0, -8px);transform:translate(0, -8px)}.cosmos-tooltip[data-cosmos-tooltip-placement=before].enter{-webkit-transform:translate(8px, 0);transform:translate(8px, 0)}.cosmos-tooltip[data-cosmos-tooltip-placement=after].enter{-webkit-transform:translate(-8px, 0);transform:translate(-8px, 0)}.cosmos-tooltip[data-cosmos-tooltip-placement].enter-active{opacity:1;-webkit-transform:translate(0, 0);transform:translate(0, 0);-webkit-transition:0.15s cubic-bezier(0.33, 1, 0.68, 1);transition:0.15s cubic-bezier(0.33, 1, 0.68, 1)}.cosmos-tooltip.leave{opacity:1}.cosmos-tooltip.leave-active{opacity:0;-webkit-transition:0.15s cubic-bezier(0, 0.32, 0.32, 1);transition:0.15s cubic-bezier(0, 0.32, 0.32, 1)}.cosmos-tooltip--empty{display:none}'}},[257,"cosmos-tooltip",{appearance:[513],content:[513],controlled:[516],follow:[520],offset:[514],placement:[513],spacing:[513],unreachable:[516],visible:[516],computedAppearance:[32],hasContent:[32],update:[64]},void 0,{appearance:[{handleAppearanceChange:0}],visible:[{handleShowChange:0}],content:[{handleContentChange:0}]}]),defineCustomElement=function(){typeof customElements>"u"||["cosmos-tooltip","cosmos-mode","cosmos-text"].forEach(e=>{switch(e){case"cosmos-tooltip":customElements.get(transformTag(transformTag(e)))||customElements.define(transformTag(transformTag(e)),x);break;case"cosmos-mode":customElements.get(transformTag(transformTag(e)))||defineCustomElement$G();break;case"cosmos-text":customElements.get(transformTag(transformTag(e)))||defineCustomElement$R()}})},CosmosBadge=createPreactComponent({tagName:"cosmos-badge-14-2-1",defaultProps:{kind:"primary",shape:"pill",size:"medium"},defineCustomElement:r$e}),CosmosButton=createPreactComponent({tagName:"cosmos-button-14-2-1",defaultProps:{busy:!1,decorative:!1,disabled:!1,hovered:!1,href:void 0,iconPlacement:"before",kind:"primary",size:"medium",type:"button",width:"content"},defineCustomElement:p$2}),CosmosCheckbox=createPreactComponent({tagName:"cosmos-checkbox-14-2-1",defaultProps:{checked:!1,hitArea:"content",invalid:!1,required:!1},defineCustomElement:r$b}),CosmosIconAirplay=createPreactComponent({tagName:"cosmos-icon-airplay-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$E}),CosmosIconAudioSettings=createPreactComponent({tagName:"cosmos-icon-audio-settings-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$D}),CosmosIconBack10=createPreactComponent({tagName:"cosmos-icon-back-10-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$C}),CosmosIconBrowse=createPreactComponent({tagName:"cosmos-icon-browse-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$B}),CosmosIconChevronLeft=createPreactComponent({tagName:"cosmos-icon-chevron-left-14-2-1",defaultProps:{},defineCustomElement:m$1}),CosmosIconChevronRight=createPreactComponent({tagName:"cosmos-icon-chevron-right-14-2-1",defaultProps:{},defineCustomElement:r$a}),CosmosIconChromecast=createPreactComponent({tagName:"cosmos-icon-chromecast-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$A}),CosmosIconChromecastFilled=createPreactComponent({tagName:"cosmos-icon-chromecast-filled-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$z}),CosmosIconClock=createPreactComponent({tagName:"cosmos-icon-clock-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$y}),CosmosIconClose=createPreactComponent({tagName:"cosmos-icon-close-14-2-1",defaultProps:{},defineCustomElement:r$9}),CosmosIconCloseSmall=createPreactComponent({tagName:"cosmos-icon-close-small-14-2-1",defaultProps:{},defineCustomElement:p$1}),CosmosIconCodeBlock=createPreactComponent({tagName:"cosmos-icon-code-block-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$w}),CosmosIconErrorFilled=createPreactComponent({tagName:"cosmos-icon-error-filled-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$v}),CosmosIconEventDetails=createPreactComponent({tagName:"cosmos-icon-event-details-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$u}),CosmosIconFacebook=createPreactComponent({tagName:"cosmos-icon-facebook-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$t}),CosmosIconForward10=createPreactComponent({tagName:"cosmos-icon-forward-10-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$s}),CosmosIconFullscreen=createPreactComponent({tagName:"cosmos-icon-fullscreen-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$r}),CosmosIconFullscreenExit=createPreactComponent({tagName:"cosmos-icon-fullscreen-exit-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$q}),CosmosIconLink=createPreactComponent({tagName:"cosmos-icon-link-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$p}
10),CosmosIconLive=createPreactComponent({tagName:"cosmos-icon-live-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$o}),CosmosIconLiveBroadcast=createPreactComponent({tagName:"cosmos-icon-live-broadcast-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$n}),CosmosIconMute=createPreactComponent({tagName:"cosmos-icon-mute-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$m}),CosmosIconNoData=createPreactComponent({tagName:"cosmos-icon-no-data-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$l}),CosmosIconPause=createPreactComponent({tagName:"cosmos-icon-pause-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$k}),CosmosIconPictureInPicture=createPreactComponent({tagName:"cosmos-icon-picture-in-picture-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$j}),CosmosIconPinterest=createPreactComponent({tagName:"cosmos-icon-pinterest-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$i}),CosmosIconPlay=createPreactComponent({tagName:"cosmos-icon-play-14-2-1",defaultProps:{},defineCustomElement:r$6}),CosmosIconPreview=createPreactComponent({tagName:"cosmos-icon-preview-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$g}),CosmosIconProductPlacement=createPreactComponent({tagName:"cosmos-icon-product-placement-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$f}),CosmosIconQuality=createPreactComponent({tagName:"cosmos-icon-quality-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$e}),CosmosIconReddit=createPreactComponent({tagName:"cosmos-icon-reddit-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$d}),CosmosIconReplay=createPreactComponent({tagName:"cosmos-icon-replay-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$c}),CosmosIconSeason=createPreactComponent({tagName:"cosmos-icon-season-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$b}),CosmosIconSettings=createPreactComponent({tagName:"cosmos-icon-settings-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$a}),CosmosIconStop=createPreactComponent({tagName:"cosmos-icon-stop-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$9}),CosmosIconSubtitles=createPreactComponent({tagName:"cosmos-icon-subtitles-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$8}),CosmosIconVolume=createPreactComponent({tagName:"cosmos-icon-volume-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$7}),CosmosIconVolumeLow=createPreactComponent({tagName:"cosmos-icon-volume-low-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$6}),CosmosIconVolumeMid=createPreactComponent({tagName:"cosmos-icon-volume-mid-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$5}),CosmosIconX=createPreactComponent({tagName:"cosmos-icon-x-14-2-1",defaultProps:{},defineCustomElement:defineCustomElement$4}),CosmosImage=createPreactComponent({tagName:"cosmos-image-14-2-1",defaultProps:{fit:"cover",imageAlt:"",radius:"none"},defineCustomElement:r$4}),CosmosLink=createPreactComponent({tagName:"cosmos-link-14-2-1",defaultProps:{kind:"underlined"},defineCustomElement:defineCustomElement$3}),CosmosMediaPreview=createPreactComponent({tagName:"cosmos-media-preview-14-2-1",defaultProps:{radius:"none"},defineCustomElement:r$3}),CosmosMode=createPreactComponent({tagName:"cosmos-mode-14-2-1",defaultProps:{mode:"light"},defineCustomElement:r$2}),CosmosRadio=createPreactComponent({tagName:"cosmos-radio-14-2-1",defaultProps:{checked:!1,disabled:!1,focusable:!0,hitArea:"content",invalid:!1,required:!1},defineCustomElement:defineCustomElement$2}),CosmosRadioGroup=createPreactComponent({tagName:"cosmos-radio-group-14-2-1",defaultProps:{hideLabel:!1,invalid:!1},defineCustomElement:defineCustomElement$1}),CosmosSpinner=createPreactComponent({tagName:"cosmos-spinner-14-2-1",defaultProps:{},defineCustomElement:p}),CosmosText=createPreactComponent({tagName:"cosmos-text-14-2-1",defaultProps:{kind:"normal",size:"medium",spacing:"none",tag:"p",weight:"regular"},defineCustomElement:r$1}),CosmosTitle=createPreactComponent({tagName:"cosmos-title-14-2-1",defaultProps:{kind:"normal",size:"medium",spacing:"none",tag:"p",weight:"bold"},defineCustomElement:r}),CosmosTooltip=createPreactComponent({tagName:"cosmos-tooltip-14-2-1",defaultProps:{content:"",controlled:!1,follow:!1,offset:8,placement:"above",spacing:"tight",unreachable:!1,visible:!1},defineCustomElement});function convertToLocalizedDateString(e){return new Date(e).toLocaleDateString(window.navigator.language,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"})}function serverErrorResolver(e){var t,i,n;let r=e.playabilityErrors,o=e.playabilityErrorDetails;if(r.includes("DATE_RANGE_UNKNOWN"))return{description:translate("error-default-message")};if(r.includes("NO_LONGER_AVAILABLE"))return{title:translate("error-missed-title"),description:translate("error-missed-message")};if(r.includes("GEO_BLOCKED"))return{title:translate("error-geo-title"),description:translate("error-geo-message")};if(r.includes("NOT_YET_AVAILABLE")){let e=null!=(t=null==o?void 0:o.NOT_YET_AVAILABLE)&&t.availableFrom?convertToLocalizedDateString(o.NOT_YET_AVAILABLE.availableFrom):"N/A";return{title:translate("error-upcoming-title"),description:translate("error-upcoming-message",{localizedDate:e})}}return r.includes("FSK_BLOCKED")?{title:translate("error-fsk-title",{age:(null==(i=null==o?void 0:o.FSK_BLOCKED)?void 0:i.minAge.toString())??""}),description:translate("error-fsk-message",{hour:(null==(n=null==o?void 0:o.FSK_BLOCKED)?void 0:n.minEveningHour.toString())??""})}:{description:translate("error-default-message")}}function errorDescriptionResolver(e){return e?"NOT_AUTHORIZED"===e.playerErrorCode?{description:translate("error-unauthorized-message"),title:translate("error-unauthorized-title")}:e.playerErrorCode?{description:translate("error-default-message")}:e.serverErrorDetails?serverErrorResolver(e.serverErrorDetails):{description:translate("error-default-message")}:{description:translate("error-default-message")}}let ErrorDisplay=()=>{let{playerState:{currentErrorDetails:e}}=usePlayerContext(),[t,i]=h$3(areTranslationsLoaded());onTranslationDataLoaded(()=>i(!0));let n=!!e,r=errorDescriptionResolver(e);return o$i(k$5,{children:n&&o$i("div",{class:"error-display",children:o$i("div",{class:"error-display__description",children:[o$i("div",{class:"error-display__icon-container",children:o$i(CosmosIconErrorFilled,{"data-rbup-icon-error-filled":!0,class:"error-display__icon"})}),o$i("div",{class:"error-display__text-container",children:[r.title&&o$i(CosmosText,{"rbup-error-display-title":!0,class:"error-display__text",weight:"bold",appearance:"light",size:"medium",children:r.title}),r.description&&o$i(CosmosText,{"rbup-error-display-description":!0,class:"error-display__text",weight:"regular",appearance:"light",size:"x-small","aria-label":"Video player error message",children:r.description})]})]})})})},resolveGlobalKeyboardNavigation=(e,t)=>{let i=null==e?void 0:e.getMediaMetaData(),n=null==i?void 0:i.globalKeyboardNavigation;return void 0===n?t:n?"ACTIVE":"INACTIVE"},useGlobalKeyboardNavigation=(e,t,i)=>{let n=F$4(()=>resolveGlobalKeyboardNavigation(i,e),[i,e]);p$6(()=>
10{if("ACTIVE"===n){let e=e=>{e.target===window.document.body&&t(e)};return window.document.addEventListener("keydown",e),()=>window.document.removeEventListener("keydown",e)}},[n,t])};function preventEventHandling(e){var t;let i=isLiveLinearResolver(e),n=null==(t=e.getPlayerData())?void 0:t.isShowingAd();return i||n}function handleSeekForward(e){preventEventHandling(e)||e.canSeekOrTimeshiftForward()&&e.seekOrTimeshiftRelative(DEFAULT_SEEK_SKIP_SECONDS)}function handleSeekBackward(e){preventEventHandling(e)||e.canSeekOrTimeshiftBackward()&&e.seekOrTimeshiftRelative(-DEFAULT_SEEK_SKIP_SECONDS)}function handleVolumeDown(e){let t=e.getVolume();t>0&&e.setVolume(Math.max(0,t-5))}function handleVolumeUp(e){let t=e.getVolume();t<100&&e.setVolume(Math.min(100,t+5))}function handleToggleFullscreen(e){e.toggleFullscreen()}function handleTogglePictureInPicture(e){e.togglePictureInPicture()}function handleMuted(e){let t=e.isMuted();e.setMuted(!t)}function handleSeekToBeginning(e){e.restartPlaybackFromBeginning()}function handleTogglePlayback(e){preventEventHandling(e)||handlePlayPauseToggle(e.getPlayerStatus(),e)}async function handleSwitchToPreviewStream(e){await handleSwitchStream(e,-1)}async function handleSwitchToNextStream(e){await handleSwitchStream(e,1)}async function handleSwitchStream(e,t){var i;let n=(null==(i=e.getPlayerData())?void 0:i.getCurrentTimeInSec())??0,r=e.getPlayerConfiguration(),{assetId:o,multiStreamAssets:a}=r;if(!a)return;let s=a.findIndex(e=>e.assetId===o);if(-1===s)return;let l=a.length,c=a[(s+l+t)%l];await e.load({...r,assetId:c.assetId,initialSeekTimeInSec:n}),await e.play()}let ALL_HANDLED_KEYCODES=[KEYCODE_0,KEYCODE_ARROW_DOWN,KEYCODE_ARROW_LEFT,KEYCODE_ARROW_RIGHT,KEYCODE_ARROW_UP,KEYCODE_F,KEYCODE_I,KEYCODE_K,KEYCODE_M,KEYCODE_N,KEYCODE_P,KEYCODE_SPACE],keyboardEventHandler={[KEYCODE_0]:handleSeekToBeginning,[KEYCODE_ARROW_DOWN]:handleVolumeDown,[KEYCODE_ARROW_LEFT]:handleSeekBackward,[KEYCODE_ARROW_RIGHT]:handleSeekForward,[KEYCODE_ARROW_UP]:handleVolumeUp,[KEYCODE_F]:handleToggleFullscreen,[KEYCODE_I]:handleTogglePictureInPicture,[KEYCODE_K]:handleTogglePlayback,[KEYCODE_M]:handleMuted,[KEYCODE_N]:handleSwitchToNextStream,[KEYCODE_P]:handleSwitchToPreviewStream,[KEYCODE_SPACE]:handleTogglePlayback};function isKeycode(e){return ALL_HANDLED_KEYCODES.includes(e)}async function handleKeyboardEvent(e,t){if(!t)return;let{key:i}=e;if(isKeycode(i)){let n=keyboardEventHandler[i];e.preventDefault(),n(t)}}function resolveTagAttributeValue(e){return e?"":null}function useScrubBarEventHandling(e,t,i,n,r,o){var a,s;let[l,c]=h$3((null==(a=null==t?void 0:t.getPlayerData())?void 0:a.getCurrentTimeInSec())??0),[u,d]=h$3((null==t?void 0:t.getDurationInSec())??0),[h,p]=h$3(n((null==(s=null==t?void 0:t.getPlayerData())?void 0:s.getCurrentTimeInSec())??0)),[f,m]=h$3((null==t?void 0:t.getBufferLengthInSec())??0),[g,v]=h$3(0),[y,b]=h$3(!1),[S,_]=h$3(!1),[E,T]=h$3(!1),w=E&&!o,A=_$3({x:0,y:0}),P=_$3();p$6(()=>{P.current=r},[r]);let I=T$4(t=>extractPlaybackPositionInPercentFromEvent(t,e)??0,[e]),C=T$4(e=>{let t=A.current,i=getPositionFromEvent$1(e),n=hasPositionMoved(t,i);return A.current=i,n},[]),M=T$4(e=>{v(I(e))},[I]),R=T$4(e=>{var t;let n=I(e);isNaN(u)||(m(0),p(n),v(n),p(n),i(n),e.stopPropagation(),e.preventDefault()),null==(t=P.current)||t.call(P,!1),b(!1);let r=e.currentTarget;r instanceof HTMLElement&&"pointerId"in e&&r.releasePointerCapture(e.pointerId),document.removeEventListener("pointermove",M),document.removeEventListener("pointerup",R),T(!1)},[u,I,M,P,i,T]),k=T$4(()=>{y||T(!1),_(!1)},[y,T]),x=T$4(()=>{_(!0)},[]),O=T$4(e=>{var t;document.addEventListener("pointermove",M),document.addEventListener("pointerup",R);let i=e.currentTarget;i instanceof HTMLElement&&"pointerId"in e&&i.setPointerCapture(e.pointerId),b(!0),T(!0),M(e),null==(t=P.current)||t.call(P,!0)},[M,R,P,T]),D=T$4(e=>{y&&e.preventDefault(),v(I(e)),C(e)&&T(!0)},[y,I,C,T]);return p$6(()=>{let e=e=>{var i,r;if(t){switch(e.type){case"seeking":{let{start:i}=t.getSeekableRange(),{targetPosition:r}=e,o=Math.abs(i-r);c(o),m(t.getBufferLengthInSec()),p(n(o));break}case"timeChanged":{let{start:i}=t.getSeekableRange(),r=e.playbackPosition-i;c(r),m(t.getBufferLengthInSec()),p(n(r));break}case"downloadFinished":{let e=(null==(i=t.getPlayerData())?void 0:i.getCurrentTimeInSec())??0;c(e),m(t.getBufferLengthInSec()),p(n(e));break}case"loaded":case"play":{let e=(null==(r=t.getPlayerData())?void 0:r.getCurrentTimeInSec())??0;d(t.getDurationInSec()),m(t.getBufferLengthInSec()),c(e),p(n(e))}}d(t.getDurationInSec())}};return null==t||t.addEventListener(e),()=>{null==t||t.removeEventListener(e)}},[n,t]),{onDocumentPointerUp:R,onPointerLeave:k,onPointerOver:x,onPointerDown:O,onPointerMove:D,bufferDurationPercent:F$4(()=>0===u?0:roundPlaybackPercentage(f/u),[f,u]),playbackPositionInPercent:h,isDragging:y,draggedPlaybackPositionInPercent:g,durationInSec:u,playbackPositionInSec:l,hovered:S,showHandle:w}}let POSTROLL_AD_MARKER=-1,PREROLL_AD_MARKER=0,OPEN_HEIGHT=0,CLOSED_HEIGHT=2,MARKER_WIDTH="4px";function calculateAdMarkers(e,t){let i=[],n=(null==e?void 0:e.length)??0;
10if(!(!e||0===n||0===t))return e.forEach(e=>{let n,r;e===PREROLL_AD_MARKER?(n="0%",r=MARKER_WIDTH):e===POSTROLL_AD_MARKER?(n=`calc(100% - ${MARKER_WIDTH})`,r="100%"):(n=`${100*e/t}%`,r=`calc(${n} + ${MARKER_WIDTH})`),drawMarkers(i,n,r)}),`polygon(
11	${i.join(`,
12	`)}
13);`}function drawMarkers(e,t,i){let n=`${t} ${OPEN_HEIGHT}px`,r=`${i} ${OPEN_HEIGHT}px`,o=`${i} ${CLOSED_HEIGHT}px`,a=`${t} ${CLOSED_HEIGHT}px`;e.push(n,r,o,a,n)}let AdMarkers=x$5(({adCuePoints:e,durationInSec:t})=>{let i=calculateAdMarkers(e,t);return i?o$i("div",{class:"ad-markers",children:o$i("div",{class:"ad-markers__background-container",style:`clip-path: ${i}`})}):null}),ProgressBar=({calculatedPositionPercent:e})=>o$i("div",{"data-rbup-scrub-bar-progress":!0,class:"progress-bar",style:{width:`${100*e}%`}}),SeekBarHandle=({playbackPositionInPercent:e})=>o$i("div",{"data-rbup-seek-bar-handle":!0,class:"seek-bar-handle",style:{left:`${100*e}%`},children:o$i("div",{class:"seek-bar-handle__knob"})});function formatPlaybackPosition(e,t){if(e>0)return getFormattedTimeString(e*t);let i=Math.abs(e),n=i-i*t;return`${n>0?"-":""}${getFormattedTimeString(n)}`}let SeekBarTooltip=({durationInSec:e,positionInPercent:t,showTooltip:i,sizeBreakpoints:n,hasHeatmapData:r})=>{let{playerState:{playerCoordinator:o,isVRVideo:a,mediaMetaData:s}}=usePlayerContext(),l=_$3(null),c=_$3(null),u=_$3(null),[d,h]=h$3(!a),p=useHeatmapMostReplayedScenes(e,null==s?void 0:s.heatmapData,{threshold:.99,minSceneDuration:2}),[f,m]=h$3(formatPlaybackPosition(e,t));return p$6(()=>{let i=Math.floor(e*t),n=p?p.find(e=>i>=e.startTime&&i<=e.endTime):null,r=formatPlaybackPosition(e,t);m(n?`${r} - Most replayed scene`:r)},[e,p,t,f]),p$6(()=>{(async()=>{let i=Math.floor(e*t);h(await (null==o?void 0:o.setThumbnail({imgContainerElement:l.current,imgElement:c.current,textContainerElement:u.current},{smallOrBigger:n.smallOrBigger,mediumOrBigger:n.mediumOrBigger},i))??!1)})()},[e,a,o,t,n.smallOrBigger,n.mediumOrBigger]),o$i("div",{"data-rbup-seek-bar-tooltip":!0,class:["seek-bar-tooltip",i&&"seek-bar-tooltip--visible",d&&"seek-bar-tooltip--with-thumbnail",r&&"seek-bar__tooltip-container--with-heatmap"].filter(
13Boolean).join(" "),children:[d&&o$i("div",{class:"seek-bar-tooltip__image-container",ref:l,children:o$i("img",{class:"seek-bar-tooltip__image","data-rbup-seek-bar-thumbnail":!0,ref:c,alt:"preview thumbnail"})}),o$i("div",{class:"seek-bar-tooltip__text",ref:u,children:o$i(CosmosText,{"data-rbup-text":!0,class:"seek-bar-tooltip__position","data-rbup-seek-bar-tooltip":!0,kind:"subtle",size:"xx-small",weight:"medium",children:f})})]})},SeekBar=({durationInSec:e,playbackPositionInPercent:t,showHandle:i,sizeBreakpoints:n,tooltipPositionInPercent:r,hasHeatmapData:o})=>isMobileDevice()?o$i("div",{"data-rbup-seek-bar":!0,class:"seek-bar",children:o$i("div",{class:`seek-bar__handle-container ${i?"seek-bar__handle-container_visible":""}`,children:o$i(CosmosTooltip,{class:"seek-bar__cosmos-tooltip",controlled:!0,follow:"target",unreachable:!0,visible:i,children:[o$i("div",{slot:"content",children:o$i(SeekBarTooltip,{"data-rbup-seek-bar-tool-tip":!0,durationInSec:e,positionInPercent:r,showTooltip:i,sizeBreakpoints:n,hasHeatmapData:o})}),o$i(SeekBarHandle,{"data-rbup-seek-bar-handle":!0,playbackPositionInPercent:t})]})})}):o$i(CosmosTooltip,{class:"seek-bar__cosmos-tooltip",controlled:!0,follow:"cursor",unreachable:!0,visible:i,children:[o$i("div",{slot:"content",children:o$i(SeekBarTooltip,{"data-rbup-seek-bar-tool-tip":!0,durationInSec:e,positionInPercent:r,showTooltip:i,sizeBreakpoints:n,hasHeatmapData:o})}),o$i("div",{"data-rbup-seek-bar":!0,class:"seek-bar",children:o$i("div",{class:`seek-bar__handle-container ${i?"seek-bar__handle-container_visible":""}`,children:o$i(SeekBarHandle,{"data-rbup-seek-bar-handle":!0,playbackPositionInPercent:t})})})]}),DvrScrubBar=({onDragStatusChanged:e,sizeBreakpoints:t,hideScrubBarTooltip:i})=>{let{playerState:{playerCoordinator:n,playerConfiguration:r,maxTimeShiftInSec:o,durationInSec:a}}=usePlayerContext(),s=null==n?void 0:n.getAdCuePoints(),l=null==r?void 0:r.adMarkerEnabled,c=_$3(null),u=T$4(e=>{if(!n)throw Error("Player coordinator is missing while user interaction");let t=o-o*e;n.timeShift(t)},[o,n]),d=T$4(e=>n&&0!==o?1-roundPlaybackPercentage(n.getTimeShiftInSec()/o):1,[o,n]),{onDocumentPointerUp:h,onPointerLeave:p,onPointerOver:f,onPointerDown:m,onPointerMove:g,playbackPositionInPercent:v,draggedPlaybackPositionInPercent:y,hovered:b,isDragging:S,showHandle:_}=useScrubBarEventHandling(c,n,u,d,e,i),E=S?y:v;return o$i("div",{"data-hovered":resolveTagAttributeValue(b),"data-rbup-dvr-scrub-bar":!0,class:"scrub-bar",ref:c,onPointerDown:m,onPointerLeave:p,onPointerMove:g,onPointerOver:f,onPointerUp:h,onTouchMove:g,children:[o$i("div",{class:"scrub-bar__rail"}),o$i(ProgressBar,{calculatedPositionPercent:v}),"ACTIVE"===l?o$i(AdMarkers,{adCuePoints:s,durationInSec:a}):null,o$i(SeekBar,{durationInSec:o,playbackPositionInPercent:E,showHandle:_,sizeBreakpoints:t,tooltipPositionInPercent:y})]})},BufferBar=({calculatedPositionPercent:e,bufferedPercent:t})=>{let i=Math.min(e+t,1);return o$i("div",{class:"buffer-bar","data-rbup-scrub-bar-buffer":!0,style:{width:`${100*i}%`}})},smoothing=.2,line=(e,t)=>{let i=t[0]-e[0],n=t[1]-e[1];return{length:Math.sqrt(Math.pow(i,2)+Math.pow(n,2)),angle:Math.atan2(n,i)}},controlPoint=(e,t,i,n)=>{let r=line(t??e,i??e),o=r.angle+(n?Math.PI:0),a=r.length*smoothing;return[e[0]+Math.cos(o)*a,e[1]+Math.sin(o)*a]},bezierCommand=(e,t,i)=>{let n=controlPoint(i[t-1],i[t-2],e),r=controlPoint(e,i[t-1],i[t+1],!0);return`C ${n[0]} ${n[1]}, ${r[0]} ${r[1]}, ${e[0]} ${e[1]}`},svgPath=(e,t)=>`${e.reduce((e,i,n,r)=>0===n?`M 0 ${t} L${i[0]} ${i[1]}`:`${e} ${bezierCommand(i,n,r)}`,"")} L${e.length-1} ${t}`,MILLISECONDS_PER_DAY=864e5,UPCOMING_THRESHOLD_IN_DAYS=7;function formatEventDateBadges(e,t){let i=e.find(e=>"end_time"===e.type);return e.filter(e=>{let t="year"===e.type&&e.value===getCurrentYear().toString();return"end_time"!==e.type&&!t}).map(e=>"start_time"===e.type?formatSingleEventDateBadge(e,i,t):e)}function formatSingleEventDateBadge(e,t,i){let n=i.replace("_","-");return{type:"start_time",value:formatEventDate({startDate:new Date(e.value),endDate:t?new Date(t.value):void 0,showTime:!0===e.showTime,locale:n}),display:e.display}}function formatEventDate(e){let{startDate:t,endDate:i,showTime:n,locale:r}=e,o=new Date,a=void 0!==i&&!isSameLocalDay(t,i,r);return t.getTime()<o.getTime()&&(!i||i.getTime()<o.getTime())?formatPastDate(t,i,a,r):formatUpcomingDate(t,i,n,a,r)}function formatPastDate(e,t,i,n){return i&&t?formatDateRange(e,t,n):formatShortDate(e,n)}function formatUpcomingDate(e,t,i,n,r){return n&&t?isWithinDays(e,UPCOMING_THRESHOLD_IN_DAYS)&&i?formatWeekdayWithTime(e,r):formatDateRange(e,t,r):isToday(e)?i?formatTime(e,r):formatTodayLabel(r):isWithinDays(e,UPCOMING_THRESHOLD_IN_DAYS)?i?formatWeekdayWithTime(e,r):formatFullWeekday(e,r):formatShortDate(e,r)}function formatDateRange(e,t,i){let n=isCurrentYear(e)&&isCurrentYear(t),r=formatShortDateWithoutYear(e,i),o=n?formatShortDateWithoutYear(t,i):new Intl.DateTimeFormat(i,{month:"short",day:"numeric",year:"numeric"}).format(t);return`${r} – ${o}`}function formatShortDate(e,t){return isCurrentYear(e)?formatShortDateWithoutYear(e,t):new Intl.DateTimeFormat(t,{month:"short",day:"numeric",year:"numeric"}).format(e)}function formatShortDateWithoutYear(e,t){return new Intl.DateTimeFormat(t,{month:"short",day:"numeric"}).format(e)}function formatTime(e,t){return new Intl.DateTimeFormat(t,{hour:"numeric",minute:"numeric"}).format(e)}function formatWeekdayWithTime(e,t){return new Intl.DateTimeFormat(t,{weekday:"short",hour:"numeric",minute:"numeric"}).format(e)}function formatFullWeekday(e,t){return new Intl.DateTimeFormat(t,{weekday:"long"}).format(e)}function formatTodayLabel(e){return capitalizeFirstLetter(new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(0,"day"))}function capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}function isToday(e){let t=new Date;return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function isWithinDays(e,t){let i=new Date,n=new Date(i.getTime()+t*M
13ILLISECONDS_PER_DAY);return e.getTime()>=i.getTime()&&e.getTime()<n.getTime()}function isCurrentYear(e){return e.getFullYear()===getCurrentYear()}function getCurrentYear(){return new Date().getFullYear()}function isSameLocalDay(e,t,i){let n=new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit"});return n.format(e)===n.format(t)}function handleThemedPlayerKeyDown(e,t,i){i&&(e.target===t.current&&e.key===KEYCODE_ENTER?(e.preventDefault(),handlePlayPauseToggle(i.getPlayerStatus(),i)):handleKeyboardEvent(e,i))}function addNonBreakingSpaceInBrandName(e){return e.replace(/\b(red) (bull)\b/gi,"$1\xa0$2")}function fillValuesToCorrectLength(e,t,i){if(e<t){let n=Array(Math.round((t-e)/e*i.length));return n.fill(0),i.concat(n)}return i}let HEATMAP_MAX_HEIGHT=20,Heatmap=x$5(({heatmapData:e,videoDuration:t})=>{let{values:i,coveredDuration:n}=e,r=fillValuesToCorrectLength(n,t,i),o=r.map((e,t)=>[t,(1-e)*HEATMAP_MAX_HEIGHT]);return o$i("svg",{class:isMobileDevice()?"heatmap mobile":"heatmap",viewBox:`0 0 ${r.length-1} ${HEATMAP_MAX_HEIGHT}`,width:"100%",height:HEATMAP_MAX_HEIGHT,preserveAspectRatio:"none",children:[o$i("path",{d:svgPath(o,HEATMAP_MAX_HEIGHT),fill:"url(#heatmap-gradient)",stroke:"none"}),o$i("defs",{children:o$i("linearGradient",{id:"heatmap-gradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[o$i("stop",{offset:"0%","stop-color":"var(--color-top)","stop-opacity":"1"}),o$i("stop",{offset:"100%","stop-color":"var(--color-bottom)","stop-opacity":"1"})]})})]})}),VodScrubBar=({onDragStatusChanged:e,sizeBreakpoints:t,hideScrubBarTooltip:i})=>{let n=_$3(null),{playerState:{playerCoordinator:r,mediaMetaData:o,playerConfiguration:a}}=usePlayerContext(),s=null==r?void 0:r.getAdCuePoints(),l=null==a?void 0:a.adMarkerEnabled,c=T$4(e=>{if(!r)throw Error("Player coordinator is missing while user interaction");let t=r.getSeekableRange(),i=r.getDurationInSec()*e+t.start;r.seek(i)},[r]),u=T$4(e=>{if(!r)return 0;let{start:t,end:i}=r.getSeekableRange(),n=i-t;return n>0?e/n:0},[r]),{onDocumentPointerUp:d,onPointerLeave:h,onPointerOver:p,onPointerDown:f,onPointerMove:m,bufferDurationPercent:g,playbackPositionInPercent:v,isDragging:y,draggedPlaybackPositionInPercent:b,durationInSec:S,hovered:_,showHandle:E}=useScrubBarEventHandling(n,r,c,u,e,i),T=y?b:v,w=null==o?void 0:o.heatmapData,{valueMin:A,valueNow:P,valueMax:I,valueText:C,valueLive:M}=useScrubbarAria(S,T,r);return o$i("div",{"data-hovered":resolveTagAttributeValue(_),class:"scrub-bar","data-rbup-scrub-bar":!0,ref:n,"aria-valuemin":A,"aria-valuenow":P,"aria-valuemax":I,"aria-valuetext":C,role:"slider",onPointerDown:f,onPointerLeave:h,onPointerMove:m,onPointerOver:p,onPointerUp:d,onTouchMove:m,tabIndex:0,children:[M&&o$i("div",{class:"aria-message-container","aria-live":"polite",children:M}),o$i("div",{class:"scrub-bar__background-container",children:[o$i("div",{class:"scrub-bar__rail"}),o$i(BufferBar,{calculatedPositionPercent:v,bufferedPercent:g}),o$i(ProgressBar,{calculatedPositionPercent:v}),"ACTIVE"===l?o$i(AdMarkers,{adCuePoints:s,durationInSec:S}):null]}),w&&o$i(Heatmap,{heatmapData:w,videoDuration:S}),o$i(SeekBar,{durationInSec:S,playbackPositionInPercent:T,showHandle:E,sizeBreakpoints:t,tooltipPositionInPercent:b,hasHeatmapData:!!w})]})},ScrubBar=({onDragStatusChanged:e,sizeBreakpoints:t,hideScrubBarTooltip:i,onControlsElementEnter:n})=>{let{playerState:{playbackMode:r,liveVariant:o}}=usePlayerContext();return o$i("div",{onPointerEnterCapture:e=>null==n?void 0:n(e,!0),children:["VOD"===r&&o$i(VodScrubBar,{sizeBreakpoints:t,onDragStatusChanged:e,hideScrubBarTooltip:i}),"LIVE"===r&&"DVR"===o&&o$i(DvrScrubBar,{sizeBreakpoints:t,onDragStatusChanged:e,hideScrubBarTooltip:i})]})};function useClickOutside(e,t){let i=i=>{e.current&&!e.current.contains(i.target)&&t(i)};p$6(()=>(document.addEventListener("pointerup",i),()=>{document.removeEventListener("pointerup",i)}))}let log$k=loglevelExports.getLogger("RadioButton"),RadioButtonInternal=({name:e,checked:t,label:i,onClick:n,onKeyDown:r,value:o,appearance:a,className:s},l)=>{let c=_$5(),u=T$4(e=>{e.stopPropagation(),null==n||n()},[n]),d=T$4(e=>{null==r||r(e)},[r]),h=F$4(()=>({focus(){t&&c.current.base.inputFocus().catch(e=>log$k.error("Could not set focus on CosmosRadio",e))}}),[t,c]);return A$3(l,()=>h,[h]),o$i(CosmosRadio,{ref:c,"data-rbup-radio-button":!0,"data-exposed-checked":resolveTagAttributeValue(t),"data-exposed-value":o,class:s,name:e,checked:t,value:o,appearance:a,onInputchange:u,onKeyDown:d,"hit-area":"row",children:i})},RadioButton=k$3(RadioButtonInternal),AudioSettings=({isPlayerSizeMedium:e,focusOnSelectedRadioButton:t,onCloseMenu:i})=>{let{playerState:{audioTracks:n,playerCoordinator:r,selectedAudioTrack:o}}=usePlayerContext();useInformPlaywright("Audio menu rendered");let a=F$4(()=>[...n],[n]),s=e=>null==r?void 0:r.setAudioTrack(e),l=T$4(e=>{i&&(e.key===KEYCODE_ENTER||e.key===KEYCODE_SPACE)&&(e.preventDefault(),i(e))},[i]),c=a.map(e=>{let t=e.id===(null==o?void 0:o.id),i=_$5(),n=o$i(RadioButton,{ref:i,className:"audio-settings__list-item",name:"audio-track",label:e.label,checked:t,value:e.id,onClick:()=>s(e.id),onKeyDown:l},e.id);return{radioButtonRef:i,radioButton:n}}),u=_$3(!1);return p$6(()=>
13{t&&!1===u.current&&c.forEach(e=>{let t=e.radioButtonRef.current;t&&(t.focus(),u.current=!0)})},[t,c]),o$i("div",{class:"audio-settings",children:o$i(CosmosRadioGroup,{class:"audio-settings__list",appearance:e?"dark":"light",children:c.map(e=>e.radioButton)})})};function preventEventPropagation$3(e){e.stopPropagation()}let AudioMenu=({onCloseMenu:e})=>{let t=_$3(null);return useClickOutside(t,e),o$i("section",{ref:t,"data-rbup-audio-menu":!0,role:"dialog","aria-labelledby":"rbupAudioMenuTitle",class:"audio-menu",onPointerUp:preventEventPropagation$3,onKeyDown:t=>{t.stopPropagation(),t.key===KEYCODE_ESC&&e(t),t.key===KEYCODE_TAB&&(t.preventDefault(),e(t))},children:[o$i(CosmosText,{id:"rbupAudioMenuTitle",class:"audio-menu__title",size:"x-small",weight:"bold",children:translate("menu-audioTracks")}),o$i(AudioSettings,{isPlayerSizeMedium:!0,focusOnSelectedRadioButton:!0,onCloseMenu:e})]})},MultiStreamSettings=({isPlayerSizeMedium:e,focusOnSelectedRadioButton:t})=>{let{playerState:{playerCoordinator:i,playerConfiguration:n,playbackPosInSec:r}}=usePlayerContext();useInformPlaywright("Multi stream menu rendered");let o=F$4(()=>{if(!(null!=n&&n.multiStreamAssets))return[];let{assetId:e,multiStreamAssets:t}=n;return t.map(t=>({id:t.assetId,label:t.title,selected:e===t.assetId,assetId:t.assetId}))},[n]),a=F$4(()=>[...o.map(e=>{let t=e.selected,o=_$5(),a=o$i(RadioButton,{ref:o,className:"multi-stream-settings__list-item",name:"multi-streams",label:e.label,checked:t,value:e.id,onClick:async()=>{n&&(await (null==i?void 0:i.load({...n,assetId:e.assetId,initialSeekTimeInSec:r})),await (null==i?void 0:i.play()))}},e.id);return{radioButtonRef:o,radioButton:a}})],[o,r,n,i]),s=_$3(!1);return p$6(()=>{t&&!1===s.current&&a.forEach(e=>{let t=e.radioButtonRef.current;t&&(t.focus(),s.current=!0)})},[t,a]),o$i("div",{class:"multi-stream-settings",children:o$i(CosmosRadioGroup,{class:"multi-stream-settings__list",appearance:e?"dark":"light",children:a.map(e=>e.radioButton)})})};function preventEventPropagation$2(e){e.stopPropagation()}let MultiStreamMenu=({onCloseMenu:e})=>{let t=_$3(null);return useClickOutside(t,e),o$i("section",{ref:t,"data-rbup-multi-stream-menu":!0,role:"dialog","aria-labelledby":"rbupMultiStreamMenuTitle",class:"multi-stream-menu",onPointerUp:preventEventPropagation$2,onKeyDown:t=>{t.stopPropagation(),t.key===KEYCODE_ESC&&e(t),t.key===KEYCODE_TAB&&(t.preventDefault(),e(t))},children:[o$i(CosmosText,{id:"rbupMultiStreamMenuTitle",class:"multi-stream-menu__title",size:"x-small",weight:"bold",children:translate("menu-multi-stream")}),o$i(MultiStreamSettings,{isPlayerSizeMedium:!0,focusOnSelectedRadioButton:!0})]})},BackButtonInternal=({onClick:e,text:t},i)=>o$i("button",{ref:i,"data-rbup-back-button":!0,class:"back-button",onClick:e,children:[o$i(CosmosIconChevronLeft,{class:"back-button__icon"}),o$i(CosmosText,{size:"x-small",weight:"bold",children:t})]}),BackButton=k$3(BackButtonInternal),StorageKey$1={QUALITY:"rbup-video-quality"};function setStorageItem$1(e,t,i){let n="string"==typeof t?t:JSON.stringify(t);i.setItem(e,n)}function setQualityHeight(e,t){setStorageItem$1(StorageKey$1.QUALITY,e,t)}let getLabel=e=>e.label??getVideoQualityLabel(e.height,e.frameRate),QualitySettings=({isPlayerSizeMedium:e,onCloseMenu:t})=>{let{playerState:{playerCoordinator:i,selectedVideoQuality:n,videoQualities:r}}=usePlayerContext(),[o,a]=h$3(n),s=useObjectArrayCache(r,"id"),l=F$4(()=>{let e=[...s];return[{id:"auto",label:translate("menu-quality-auto")},...e.reverse()]},[s]);useInformPlaywright("Quality menu rendered"),p$6(()=>{o&&o.id!==n.id&&(null==i||i.setVideoQuality(o.id),setQualityHeight(o.height,window.sessionStorage))},[i,o,n]);let c=T$4(e=>{t&&(e.key===KEYCODE_ENTER||e.key===KEYCODE_SPACE)&&(e.preventDefault(),t(e))},[t]);return o$i("div",{class:"quality-settings","data-rbup-quality-menu":!0,children:o$i(CosmosRadioGroup,{class:"quality-settings__list",appearance:e?"dark":"light",children:l.map(e=>{let t=e.id===(null==o?void 0:o.id);return o$i(RadioButton,{className:"quality-settings__list-item",name:"quality",label:getLabel(e),checked:t,value:e.id,onClick:()=>a(e),onKeyDown:c},e.id)})})})},MenuButtonInternal=({href:e,id:t,onClick:i,settingText:n,text:r},o)=>{let a=t.toLowerCase();return e?o$i("button",{"data-rbup-menu-button":a,"data-rbup":`data-rbup-${a}-menu-button`,ref:o,class:"settings-menu-button",children:o$i(CosmosText,{class:"settings-menu-button__label",size:"x-small",children:o$i(CosmosLink,{tabIndex:-1,href:e,kind:"bare",target:"_blank",children:r})})}):o$i("button",{"data-rbup-menu-button":a,"data-rbup":`data-rbup-${a}-menu-button`,ref:o,class:"settings-menu-button",onClick:i,children:[o$i(CosmosText,{class:"settings-menu-button__label",size:"x-small",children:r}),o$i("div",{class:"settings-menu-button__selected-setting",children:[n&&o$i(CosmosText,{size:"xx-small",kind:"subtle",children:n}),o$i(CosmosIconChevronRight,{class:"settings-menu-button__icon"})]})]})},MenuButton=k$3(MenuButtonInternal);function calculatePlaybackSpeedText(e){return 1===e?translate("menu-speeds-normal"):String(e)}
13let SettingsMainMenu=({onNavClick:e,mainMenuRef:t})=>{let{playerState:{audioTracks:i,playbackSpeed:n,playerCoordinator:r,selectedVideoQuality:o,subtitleTracks:a,videoQualities:s,liveVariant:l}}=usePlayerContext(),c=null==r?void 0:r.getPlayerConfiguration().feedbackUrl,u=(null==r?void 0:r.getPlayerConfiguration().sharingEnabled)??!0,d=calculatePlaybackSpeedText(n),h=getVideoQualityLabel(o.height,o.frameRate),p=o.isAuto?`Auto ${h}`:h,f=s.length>1,m=a.length>0,g="LINEAR"!==l,v=i.length>1,y=null==r?void 0:r.getPlayerConfiguration().multiStreamAssets,b=!!y&&y.length>1;return o$i("div",{ref:t,children:[f&&o$i(MenuButton,{id:"quality",onClick:()=>e("QUALITY"),settingText:p,text:translate("menu-quality")}),g&&o$i(MenuButton,{id:"speed",onClick:()=>e("SPEED"),settingText:d,text:translate("menu-speeds")}),m&&o$i(MenuButton,{id:"subtitles",onClick:()=>e("SUBTITLES"),text:translate("menu-subtitles")}),v&&o$i(MenuButton,{id:"audio",onClick:()=>e("AUDIO"),text:translate("menu-audioTracks")}),b&&o$i(MenuButton,{id:"multi-stream",onClick:()=>e("MULTI-STREAM"),text:"Multi Stream"}),u&&o$i(MenuButton,{id:"share",onClick:()=>e("SHARE"),text:translate("menu-sharing")}),c&&o$i(MenuButton,{id:"feedback",href:c,text:translate("menu-feedback")})]})};function useOnMountSize(e,t){let i=_$3(0);useResize(T$4(t=>{let n=t.height;i.current=n,null==e||e(n)},[e]),t),p$6(()=>{let t=i.current;t>0&&(null==e||e(t))},[e])}let SettingsWrapper=({children:e,cssClass:t,enterPosition:i,leavePosition:n,show:r,widthInPx:o,onMounted:a})=>{let[s,l]=h$3(!1),c=()=>{s&&!r&&l(!1)};return p$6(()=>{!s&&r&&l(!0)},[s,r]),o$i("div",{class:t,style:{transform:`translateX(-${r?i:n}px)`,width:o},onTransitionEnd:c,children:s?o$i(SettingsView,{onMounted:a,children:e}):null})},SettingsView=({children:e,onMounted:t})=>{let i=_$3(null);return useOnMountSize(t,i),o$i("div",{class:"settings-menu__settings-wrapper",ref:i,children:o$i("div",{children:e})})},log$j=loglevelExports.getLogger("ShareSettingsInternal"),ARROW_KEYS=[KEYCODE_ARROW_LEFT,KEYCODE_ARROW_RIGHT];function initialShareUrlWithTime(e){return(null==e?void 0:e.urlSharingStrategy.calculateShareUrl("PAGE",{assetId:e.getPlayerConfiguration().assetId}))??""}let ShareSettingsInternal=({isPlayerSizeMedium:e})=>{let{playerState:{mediaMetaData:t,playbackPosInSec:i,playerCoordinator:n,playerConfiguration:r,playbackMode:o}}=usePlayerContext(),a=!!window.navigator.clipboard,s=_$3(0),[l,c]=h$3(!1),[u,d]=h$3(!1),[h,p]=h$3(!1),[f,m]=h$3(0),[g,v]=h$3(initialShareUrlWithTime(n)),[y,b]=h$3(""),[S,_]=h$3(""),[E,T]=h$3(""),[w,A]=h$3(""),[P,I]=h$3(""),C=!!(null!=n&&n.urlSharingStrategy.isSharingEnabled()),M=null==r?void 0:r.iframeEmbedCode;useInformPlaywright("Share menu rendered");let R=async()=>{l||await copy(g)&&c(!0)},k=async()=>{M&&(l||await copy(M)&&d(!0))},x=e=>{p(e.detail.checked)},O=e=>{m(convertTimeStringToSec(e.currentTarget.value)),b(e.currentTarget.value)},D=e=>{ARROW_KEYS.includes(e.key)&&e.stopPropagation()};return p$6(()=>{m(Math.floor(i)),b(getFormattedTimeString(i))},[]),p$6(()=>{if(!n)return;let e={assetId:n.getPlayerConfiguration().assetId,title:null==t?void 0:t.title,imageUrl:null==t?void 0:t.posterImageUrl,mediaPositionInSec:h?f:void 0};v(n.urlSharingStrategy.calculateShareUrl("PAGE",e)),_(n.urlSharingStrategy.calculateShareUrl("FACEBOOK",e)),T(n.urlSharingStrategy.calculateShareUrl("PINTEREST",e)),A(n.urlSharingStrategy.calculateShareUrl("REDDIT",e)),I(n.urlSharingStrategy.calculateShareUrl("TWITTER",e))},[t,f,h,n]),p$6(()=>(l&&(s.current=window.setTimeout(()=>c(!1),3e3)),u&&(s.current=window.setTimeout(()=>d(!1),3e3)),()=>{window.clearTimeout(s.current)}),[u,l]),o$i("div",{class:"share-settings",children:["VOD"===o&&o$i("div",{class:"share-settings__share-time",children:[o$i(CosmosCheckbox,{"data-rbup-share-time-checkbox":!0,name:"sharetime",checked:h,onInputchange:x,clamp:!0,value:"true",appearance:e?"dark":"light",children:translate("menu-sharing-playFrom")}),o$i("input",{"data-rbup-share-time-input":!0,class:"share-settings__time-input",disabled:!h,value:y,onChange:O,onKeyDown:D})]}),o$i("ul",{class:"share-settings__list",children:[a&&M&&o$i("li",{class:"share-settings__list-item",children:[o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{class:"share-settings__link",kind:"bare",onClick:k,children:[o$i(CosmosIconCodeBlock,{}),translate("menu-sharing-embed")]})}),u&&o$i("div",{class:"share-settings__copied-text",children:o$i(CosmosText,{size:"x-small",children:translate("menu-sharing-copied")})})]}),C&&o$i(k$5,{children:[o$i("li",{class:"share-settings__list-item",children:o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{"data-rbup-fb-link":!0,class:"share-settings__link",href:S,kind:"bare",target:"_blank",rel:"noopener nofollow",children:[o$i(CosmosIconFacebook,{}),translate("menu-sharing-facebook")]})})}),o$i("li",{class:"share-settings__list-item",children:o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{"data-rbup-twitter-link":!0,class:"share-settings__link",href:P,kind:"bare",target:"_blank",rel:"noopener nofollow",children:[o$i(CosmosIconX,{}),translate("menu-sharing-twitter")]})})}),o$i("li",{class:"share-settings__list-item",children:o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{"data-rbup-pinterest-link":!0,class:"share-settings__link",href:E,kind:"bare",target:"_blank",rel:"noopener nofollow",children:[o$i(CosmosIconPinterest,{}),translate("menu-sharing-pinterest")]})})}),o$i("li",{class:"share-settings__list-item",children:o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{"data-rbup-reddit-link":!0,class:"share-settings__link",href:w,kind:"bare",target:"_blank",rel:"noopener nofollow",children:[o$i(CosmosIconReddit,{}),translate("menu-sharing-reddit")]})})}),a&&o$i("li",{class:"share-settings__list-item",children:[o$i(CosmosText,{size:"x-small",children:o$i(CosmosLink,{class:"share-settings__link",kind:"bare",onClick:R,children:[o$i(CosmosIconLink,{}),translate("menu-sharing-copyLink")]})}),l&&o$i("div",{class:"share-settings__copied-text",children:o$i(CosmosText,{size:"x-small",children:translate("menu-sharing-copied")})})]})]})]})]})},ShareSettings=k$3(ShareSettingsInternal);async function copy(e){try{return await window.navigator.clipboard.writeText(e),!0}catch(e){return log$j.error("Failed to copy to clipboard",e),!1}}let SPEED_1_X_OPTION={speed:1,useLabel:!0},AVAILABLE_SPEED_OPTIONS=[{speed:.25},{speed:.5},{speed:.75},SPEED_1_X_OPTION,{speed:1.25},{speed:1.5},{speed:1.75},{speed:2}],SpeedSettings=({isPlayerSizeMedium:e,onCloseMenu:t})=>{let{playerState:{playerCoordinator:i,playbackSpeed:n}}=usePlayerContext(),[r,o]=h$3(AVAILABLE_SPEED_OPTIONS.find(e=>e.speed===n)),a=null==r?void 0:r.speed,s=e=>{e.speed!==a&&(null==i||i.setPlaybackSpeed(e.speed))};useInformPlaywright("Speed menu rendered"),p$6(()=>
13{if(a!==n){let e=AVAILABLE_SPEED_OPTIONS.find(e=>e.speed===n);e&&o(e)}},[n,a]);let l=T$4(e=>{t&&(e.key===KEYCODE_ENTER||e.key===KEYCODE_SPACE)&&(e.preventDefault(),t(e))},[t]);return o$i("div",{class:"speed-settings",children:o$i(CosmosRadioGroup,{class:"speed-settings__list",appearance:e?"dark":"light",children:AVAILABLE_SPEED_OPTIONS.map(e=>o$i(RadioButton,{className:"speed-settings__list-item",name:"speed",checked:e.speed===a,label:e.useLabel?translate("menu-speeds-normal"):String(e.speed),value:e.speed.toString(),onClick:()=>{s(e)},onKeyDown:l},`speed-option-${e.speed}`))})})},SubtitlesSettings=({isPlayerSizeMedium:e,focusOnSelectedRadioButton:t,onCloseMenu:i})=>{let{playerState:{subtitleTracks:n,selectedSubtitleTrack:r,playerCoordinator:o}}=usePlayerContext();useInformPlaywright("Subtitles menu rendered");let a=F$4(()=>[...n],[n]),s=T$4(e=>{i&&(e.key===KEYCODE_ENTER||e.key===KEYCODE_SPACE)&&(e.preventDefault(),i(e))},[i]),l=F$4(()=>{let e=_$5();return[{radioButtonRef:e,radioButton:o$i(RadioButton,{className:"subtitles-settings__list-item",name:"subtitles",ref:e,label:translate("menu-subtitles-off"),checked:!r,value:"off",onClick:()=>null==o?void 0:o.disableSubtitle(),onKeyDown:s})},...a.map(e=>{let t=e.id===(null==r?void 0:r.id),i=_$5(),n=o$i(RadioButton,{ref:i,className:"subtitles-settings__list-item",name:"subtitles",label:e.label,checked:t,value:e.id,onClick:()=>null==o?void 0:o.enableSubtitle(e.id),onKeyDown:s},e.id);return{radioButtonRef:i,radioButton:n}})]},[s,a,o,r]),c=_$3(!1);return p$6(()=>{t&&!1===c.current&&l.forEach(e=>{let t=e.radioButtonRef.current;t&&(t.focus(),c.current=!0)})},[t,l]),o$i("div",{class:"subtitles-settings",children:o$i(CosmosRadioGroup,{class:"subtitles-settings__list",appearance:e?"dark":"light",children:l.map(e=>e.radioButton)})})},FULL_HEIGHT="100%";function preventEventPropagation$1(e){e.stopPropagation()}let updateHeightsCache=(e,t,i)=>{e.current={...e.current,[t]:i}},defaultSettingsAreaDimensions={width:320},SETTINGS_MENU_BASE_CLASS="settings-menu",SettingsMenu=({activateResizing:e,onCloseMenu:t})=>{let i=!e,[n,r]=h$3("MAIN_MENU"),[o,a]=h$3({}),s=_$3(null),l=_$3({}),[c,u]=h$3(SETTINGS_MENU_BASE_CLASS),d=_$3(null),h=_$3(null),p=_$3(null),f=_$3(null),m=_$3(null),g=_$3(null),v=_$3(null);useInformPlaywright("Settings menu rendered");let{playerState:{playerCoordinator:y}}=usePlayerContext(),b=null==y?void 0:y.getPlayerConfiguration().sharingEnabled;useClickOutside(s,t);let S=T$4(t=>{t&&(updateHeightsCache(l,n,t),e&&a({height:t}))},[e,n]),_=()=>{E("MAIN_MENU")},E=T$4(e=>{r(e)},[]),T=T$4(e=>{S(`${e}px`)},[S]),w=T$4(()=>{if(d.current){let e=d.current.children.item(0);e&&e.focus({preventScroll:!0})}},[]),A=T$4(e=>{var t;null==(t=e.current)||t.focus({preventScroll:!0})},[]),P=T$4(e=>{if("height"===e.propertyName)switch(n){case"MAIN_MENU":w();break;case"QUALITY":A(h);break;case"SPEED":A(p);break;case"SHARE":A(f);break;case"SUBTITLES":A(m);break;case"AUDIO":A(g);break;case"MULTI-STREAM":A(v)}},[n,w,A]),I=e=>{let i=e.key;(i===KEYCODE_ARROW_DOWN||i===KEYCODE_ARROW_UP||i===KEYCODE_0||i===KEYCODE_SPACE||i===KEYCODE_ENTER)&&e.stopPropagation(),i===KEYCODE_ESC&&("MAIN_MENU"!==n?_():t(e))};p$6(()=>{let t=e?l.current[n]:FULL_HEIGHT;t&&t!==o.height&&a({height:t}),"MAIN_MENU"!==n&&u(`${SETTINGS_MENU_BASE_CLASS} settings-menu-animation`)},[e,n,o.height]);let C=_$3(!1);!1===C.current&&d.current&&(w(),C.current=!0);let M=_$3(null),{width:R}=useMeasure(M,defaultSettingsAreaDimensions);return o$i("section",{"data-rbup-settings-menu":!0,ref:s,role:"dialog","aria-labelledby":"rbupMenuTitle",class:c,style:o,onPointerUp:preventEventPropagation$1,onKeyDown:I,onTransitionEnd:P,children:[o$i("p",{class:"g-screen-reader-only settings-menu__invisible-title",id:"rbupMenuTitle",children:translate("tooltip-settings")}),o$i("div",{class:"settings-menu__settings-area",ref:M,children:[o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page",enterPosition:0,leavePosition:R,show:"MAIN_MENU"===n,widthInPx:R,onMounted:T,children:o$i(SettingsMainMenu,{onNavClick:E,mainMenuRef:d})}),o$i("div",{class:"settings-menu__settings-container",children:[o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:R,leavePosition:0,show:"QUALITY"===n,widthInPx:R,onMounted:T,children:[o$i(BackButton,{onClick:_,text:translate("menu-quality"),ref:h}),o$i(QualitySettings,{isPlayerSizeMedium:e,onCloseMenu:t})]}),o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:R,leavePosition:0,show:"SUBTITLES"===n,widthInPx:R,onMounted:T,children:[o$i(BackButton,{onClick:_,text:translate("menu-subtitles"),ref:m}),o$i(SubtitlesSettings,{isPlayerSizeMedium:e,focusOnSelectedRadioButton:!1,onCloseMenu:t})]}),o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:R,leavePosition:0,show:"SPEED"===n,widthInPx:R,onMounted:T,children:[o$i(BackButton,{onClick:_,text:translate("menu-speeds"),ref:p}),o$i(SpeedSettings,{isPlayerSizeMedium:e,onCloseMenu:t})]}),o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:R,leavePosition:0,show:"AUDIO"===n,widthInPx:R,onMounted:T,children:[o$i(BackButton,{onClick:_,text:translate("menu-audioTracks"),ref:g}),o$i(AudioSettings,{isPlayerSizeMedium:e,focusOnSelectedRadioButton:!1,onCloseMenu:t})]}),o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:R,leavePosition:0,show:"MULTI-STREAM"===n,widthInPx:R,onMounted:T,children:[o$i(BackButton,{onClick:_,text:translate("menu-multi-stream"),ref:v}),o$i(MultiStreamSettings,{isPlayerSizeMedium:e,focusOnSelectedRadioButton:!1})]}),b&&o$i(SettingsWrapper,{cssClass:"settings-menu__settings-page--positioned",enterPosition:R,leavePosition:0,show:"SHARE"===n,widthInPx:R,onMounted:T,children:[o$i(BackButton,{onClick:_,text:translate("menu-sharing"),ref:f}),o$i(ShareSettings,{isPlayerSizeMedium:e})]})]})]}),i&&o$i("div",{class:"settings-menu__close-button",children:o$i(CosmosButton,{buttonAriaLabel:translate("button-closeMenu"),kind:"secondary",shape:"circle",onClick:t,children:o$i(CosmosIconClose,{slot:"icon"})})})]})};function preventEventPropagation(e){e.stopPropagation()}let SubtitlesMenu=({onCloseMenu:e})=>{let t=_$3(null);return useClickOutside(t,e),o$i("section",{ref:t,"data-rbup-subtitles-menu":!0,role:"dialog","aria-labelledby":"rbupSubtitlesMenuTitle",class:"subtitles-menu",onPointerUp:preventEventPropagation,onKeyDown:t=>{t.stopPropagation(),t.key===KEYCODE_ESC&&e(t),t.key===KEYCODE_TAB&&(t.preventDefault(),e(t))},children:[o$i(CosmosText,{id:"rbupSubtitlesMenuTitle",class:"subtitles-menu__title",size:"x-small",weight:"bold",children:translate("menu-subtitles")}),o$i(SubtitlesSettings,{isPlayerSizeMedium:!0,focusOnSelectedRadioButton:!0,onCloseMenu:e})]})},CenterControls=({isPlayerSizeMedium:e,CenteredToastComponent:t})=>
13t&&e?o$i("div",{class:"center-controls",children:o$i(t,{})}):null,ActiveCastIndicator=()=>o$i("div",{class:"active-cast-indicator",children:o$i(CosmosIconChromecast,{"data-rbup-icon-cast":!0,class:"g-icon",slot:"icon"})}),Aa=class Aa{constructor(e,t,i,n){Si(this,"velocityReduction",1),Si(this,"pointerHasMoved",!1),Si(this,"viewingProjection",{x:0,y:0,clientX:0,clientY:0}),Si(this,"onPointerDown",e=>{this.viewingProjection=this.resolveInitialViewingProjectionCoordinates(e),this.velocityReduction=this.isMobileDevice?Aa.VR_VELOCITY_REDUCTION_MOBILE:Aa.VR_VELOCITY_REDUCTION_DESKTOP,this.addPointerEventListeners()}),Si(this,"onPointerMove",e=>{var t;e.preventDefault();let{x:i,y:n}=this.calculateViewingDirection(e);null==(t=this.playerData)||t.setViewingDirection(i,n),this.pointerHasMoved=this.detectPointerMove(i,n)}),Si(this,"onPointerUp",()=>{this.removePointerEventListeners(),this.pointerHasMoved&&this.showControlsTimeout.current>-1&&window.clearTimeout(this.showControlsTimeout.current),this.setPointerType("grab"),this.pointerHasMoved=!1}),this.showControlsTimeout=e,this.isMobileDevice=t,this.setPointerType=i,this.playerData=n}addPointerEventListeners(){document.addEventListener("pointermove",this.onPointerMove,{passive:!1}),document.addEventListener("touchmove",this.onPointerMove,{passive:!1}),document.addEventListener("pointerup",this.onPointerUp),document.addEventListener("touchend",this.onPointerUp)}removePointerEventListeners(){document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("touchmove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerUp),document.removeEventListener("touchend",this.onPointerUp)}detectPointerMove(e,t){var i;let n=null==(i=this.playerData)?void 0:i.getViewingDirection();if(!n)return!1;let r=.01,o=n.x-e,a=n.y-t;return Math.abs(o)>r||Math.abs(a)>r}resolveInitialViewingProjectionCoordinates(e){var t;let{x:i,y:n}=(null==(t=this.playerData)?void 0:t.getViewingDirection())??{x:0,y:0},{clientX:r,clientY:o}=this.resolveInputEventPointerCoordinates(e);return{x:i,y:n,clientX:r,clientY:o}}calculateViewingDirection(e){let{clientX:t,clientY:i}=this.resolveInputEventPointerCoordinates(e),n=(t-this.viewingProjection.clientX)/this.velocityReduction,r=(i-this.viewingProjection.clientY)/this.velocityReduction;return{x:n+this.viewingProjection.x,y:r+this.viewingProjection.y}}resolveInputEventPointerCoordinates(e){if("u">typeof TouchEvent&&e instanceof TouchEvent)return 0===e.touches.length?{clientX:0,clientY:0}:{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY};if(e instanceof MouseEvent)return{clientX:e.clientX,clientY:e.clientY};throw Error("Unsupported event type")}destroy(){this.removePointerEventListeners()}};Si(Aa,"VR_VELOCITY_REDUCTION_DESKTOP",10),Si(Aa,"VR_VELOCITY_REDUCTION_MOBILE",5);let VRVideoPointerControl=Aa,DEFAULT_DOUBLE_TAP_INTERVAL=300,ClickAndTapOverlay=({onPointerMove:e})=>{let t=_$3(new Date("1987-04-17T00:00:00")),i=_$3(0),n=_$3(-1),r=_$3(-1),o=_$3(-1),a=_$3(void 0),[s,l]=h$3(!1),[c,u]=h$3(!1),[d,h]=h$3("default"),{playerState:{playerCoordinator:p,playerStatus:f,isVRVideo:m,isCasting:g}}=usePlayerContext(),v=isLiveLinearResolver(p),{hideControls:y,showControlsTemporarily:b,toggleControlsVisibility:S,menuState:_,setMenuState:E}=useControlsVisibilityContext(),T=F$4(()=>{if(m){let e=isMobileDevice();return h("grab"),new VRVideoPointerControl(r,e,h,null==p?void 0:p.getPlayerData())}},[m,p]),w=`fast-forward-backward-container__fast-backward-container${c?" fast-forward-backward-container__fast-backward-container--show-animation":""}`,A=`fast-forward-backward-container__fast-forward-container${s?" fast-forward-backward-container__fast-forward-container--show-animation":""}`;(c||s)&&y();let P=()=>{isMobileDevice()||null==p||p.toggleFullscreen()},I=e=>{isLeftClick(e)&&b(),isTouch(e)&&(window.clearTimeout(r.current),r.current=window.setTimeout(()=>{S()},DEFAULT_DOUBLE_TAP_INTERVAL))},C=e=>{R(e,"left")},M=e=>{R(e,"right")},R=(e,t)=>{"CLOSED"!==_?E("CLOSED"):!isLeftClick(e)||m||v?isLeftClick(e)&&v?null==p||p.stop():isTouch(e)&&x(t):handlePlayPauseToggle(f,p)},k=e=>e.getTime()-t.current.getTime()<=DEFAULT_DOUBLE_TAP_INTERVAL,x=e=>{let n=new Date;k(n)&&!v&&a.current===e&&(i.current+=1,window.clearTimeout(r.current),"left"===e?(u(!0),O(-DEFAULT_SEEK_SKIP_SECONDS)):(l(!0),O(DEFAULT_SEEK_SKIP_SECONDS))),t.current=n,a.current=e},O=e=>{window.clearTimeout(n.current),n.current=window.setTimeout(()=>{null==p||p.seekOrTimeshiftRelative(i.current*e),i.current=0,window.clearTimeout(o.current),o.current=window.setTimeout(()=>{u(!1),l(!1),b()},200)},DEFAULT_DOUBLE_TAP_INTERVAL)},D=e=>{m&&(h("grabbing"),null==T||T.onPointerDown(e))};return p$6(()=>()=>{window.clearTimeout(n.current),window.clearTimeout(r.current),window.clearTimeout(o.current),null==T||T.destroy()},[T]),o$i("div",{class:`click-and-tap-overlay-container ${d}`,"data-play-pause-capture":!0,onDblClick:P,onPointerMove:e,onPointerUpCapture:I,onPointerDown:D,role:"button",children:[o$i("div",{"data-play-pause-left-capture":!0,onPointerUp:C,children:o$i("div",{class:"fast-forward-backward-container",children:o$i("div",{class:w,children:[o$i("div",{className:"fast-backward-animation__arrow"}),o$i("div",{className:"fast-backward-animation__arrow animation__arrow--outer"})]})})}),o$i("div",{"data-play-pause-right-capture":!0,onPointerUp:M,children:o$i("div",{class:"fast-forward-backward-container",children:o$i("div",{class:A,children:[o$i("div",{className:"fast-forward-animation__arrow"}),o$i("div",{className:"fast-forward-animation__arrow animation__arrow--outer"})]})})}),g&&o$i(ActiveCastIndicator,{})]})};function useTooltipVisibility(){let{playerState:{isFullscreenMode:e}}=usePlayerContext(),[t,i]=h$3(!1),[n,r]=h$3(""),o=T$4((e,t)=>
13{isMouse(t)&&(r(e),i(!0))},[]),a=T$4(()=>{i(!1)},[]);return p$6(()=>{i(!1)},[e]),{tooltipVisibility:t,tooltipText:n,onTooltipUpdate:o,hideTooltip:a}}let ControlsButtonInternal=({Icon:e,dataAttribute:t,disabled:i=!1,label:n,onPointerUp:r,onTooltipUpdate:o,size:a,tooltipText:s,shape:l="circle",appearance:c,kind:u="bare",buttonLabel:d,style:h=""},p)=>{let f=_$5(),m=F$4(()=>({focus(){f.current.base.buttonFocus().catch(e=>console.error("Could not set focus on CosmosButton",e))},blur(){f.current.base.buttonBlur().catch(e=>console.error("Could not remove focus on CosmosButton",e))}}),[f]);A$3(p,()=>m,[m]);let g=T$4(e=>{i||e.key!==KEYCODE_ENTER&&e.key!==KEYCODE_SPACE||(e.stopPropagation(),r(e))},[i,r]);return o$i(CosmosButton,{style:h,[t]:!0,ref:f,"data-rbup-button":!0,"data-rbup":t,disabled:i,appearance:c,buttonAriaLabel:n,kind:u,shape:l,size:a??"medium",onPointerup:e=>{!i&&(isLeftClick(e)||isTouch(e))&&r(e)},onPointerEnter:e=>{s&&o&&o(s,e)},onKeyDown:g,children:[e,d]})},ControlsButton=k$3(ControlsButtonInternal),MaturityRating=({rating:e,ratingFormat:t,size:i,textSize:n="medium"})=>{let r="url"===t,o=r?generateCloudinaryImageSrcSet(e,{widths:[48,96],defaultWidth:i,transformations:CLOUDINARY_TRANSFORMATIONS_MATURITY_RATING,paramsBuilder:e=>`c_fill,w_${e},q_auto,g_auto,f_auto`}):void 0;return o$i("div",{className:`maturity-rating-overlay__rating${r?" maturity-rating-overlay__rating--image":""}`,children:o?o$i("img",{src:o.src,srcSet:o.srcSet,sizes:`${i}px`,alt:"Maturity rating"}):o$i(CosmosText,{appearance:"light",size:n,children:e})})},DEFAULT_CHIME_VOLUME=1,resolveAudioContextConstructor=()=>{let{AudioContext:e,webkitAudioContext:t}=window;return e??t},getAudioContext=()=>{if(audioContext)return audioContext;let e=resolveAudioContextConstructor();return e?audioContext=new e:void console.warn("Web Audio API is not available, skipping maturity rating chime")},loadChimeBuffer=(e,t)=>{t!==chimeBufferUrl&&(chimeBufferPromise=void 0,chimeBufferUrl=t);let i=chimeBufferPromise??(chimeBufferPromise=fetch(t).then(e=>{if(!e.ok)throw Error(`Maturity rating chime server returned ${e.status}`);return e.arrayBuffer()}).then(t=>e.decodeAudioData(t)).catch(e=>{console.error("Error while loading maturity rating chime",e),chimeBufferPromise===i&&(chimeBufferPromise=void 0)}));return i},playMaturityRatingChime=async e=>{let t=getAudioContext();if(!t)return;let i=await loadChimeBuffer(t,e);if(i)try{"suspended"===t.state&&await t.resume();let e=t.createBufferSource();e.buffer=i;let n=t.createGain();n.gain.value=DEFAULT_CHIME_VOLUME,e.connect(n),n.connect(t.destination),e.addEventListener("ended",()=>{e.disconnect(),n.disconnect()}),e.start()}catch(e){console.error("Error while playing maturity rating chime",e)}},useMaturityRatingChime=(e,t)=>{p$6(()=>{e&&t&&playMaturityRatingChime(t)},[e,t])},styles$8=".maturity-rating-overlay{pointer-events:none;position:absolute;top:0;left:0;height:fit-content;display:flex;padding-top:var(--rbup-maturity-padding-top, 12px);padding-left:var(--rbup-maturity-padding-left, 12px);max-width:80%}.maturity-rating-overlay__content{margin:auto;display:flex;gap:12px;align-items:center;position:relative}.maturity-rating-overlay__rating{padding:4px 8px;border-radius:8px;border:2px solid rgba(255,255,255,.2);background:#ffffff0d;-webkit-backdrop-filter:blur(19.75px);backdrop-filter:blur(19.75px);animation:rating-sequence 9s ease-in}.maturity-rating-overlay__rating--image{padding:0;border:none;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.maturity-rating-overlay__label{overflow:hidden;width:fit-content}.maturity-rating-overlay__label-text{animation:label-move-sequence 9s ease-out}.cq-540 .maturity-rating-overlay{padding-top:var(--rbup-maturity-padding-top, 16px);padding-left:var(--rbup-maturity-padding-left, 16px)}.cq-650 .maturity-rating-overlay{padding-top:var(--rbup-maturity-padding-top, 24px);padding-left:var(--rbup-maturity-padding-left, 24px)}@keyframes rating-sequence{0%,to{opacity:0}14.67%,60%{opacity:1}70%{opacity:0}}@keyframes label-move-sequence{0%,7.34%,67.06%,to{transform:translate(-100%)}14.67%,52.39%,59.73%{transform:translate(0)}}",MaturityRatingOverlay=({rating:e,advisory:t,ratingFormat:i="text",playerWidth:n,onAnimationEnd:r,chimeUrl:o,playChime:a=!1})=>{let{labelSize:s,ratingSize:l,ratingImageSize:c}=resolveComponentSize(n);return useMaturityRatingChime(a,o),o$i(k$5,{children:[o$i("style",{children:styles$8}),o$i("div",{id:"maturity-rating",className:"maturity-rating-overlay",onAnimationEnd:r,children:o$i("div",{className:"maturity-rating-overlay__content",children:[o$i(MaturityRating,{rating:e,ratingFormat:i,size:c,textSize:l}),t&&o$i("div",{className:"maturity-rating-overlay__label",children:o$i("div",{className:"maturity-rating-overlay__label-text",children:o$i(CosmosText,{appearance:"light",size:s,children:t})})})]})})]})};
13function resolveComponentSize(e){return e<Breakpoint.small?{labelSize:"xx-small",ratingSize:"x-small",ratingImageSize:42}:e<Breakpoint.medium?{labelSize:"x-small",ratingSize:"small",ratingImageSize:42}:{labelSize:"small",ratingSize:"medium",ratingImageSize:54}}let styles$7=".next-up-toast{align-items:center;background:#fff9;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);bottom:16px;left:16px;right:16px;cursor:pointer;display:flex;height:56px;justify-content:space-between;position:absolute;padding:4px 12px 4px 4px;border-radius:4px;overflow:hidden;isolation:isolate;z-index:1}.next-up-toast__progress-bar{position:absolute;left:0;bottom:0;top:0;right:0;background-color:#fff;z-index:-1}.next-up-toast__progress-bar.next-up-toast__countdown{animation-name:count-down-next-up;animation-timing-function:linear;animation-duration:var(--animation-duration)}.next-up-toast__info{align-items:center;display:grid;grid-template-columns:1fr auto}.next-up-toast__image{background-image:var(--next-up-toast-image);background-size:cover;background-position:center;height:48px;width:79px;border-radius:4px}.next-up-toast__text{padding:0 16px;overflow:hidden}.cq-540 .next-up-toast{bottom:32px;left:auto;right:32px;transition:bottom .3s;width:457px}@keyframes count-down-next-up{0%{right:100%}to{right:0}}",NextUpToast=({nextUp:e,onNextUpAction:t,posInSec:i,durationInSec:n,playerStatus:r})=>{let[o]=h$3(r),[a]=h$3(i),s=_$3("displayed"),l=Math.min(Math.max(0,n-a),e.countdownDurationSecs),c=e=>{e.stopPropagation(),e instanceof PointerEvent&&!(isLeftClick(e)||isTouch(e))||("displayed"===s.current&&h(),s.current="cancelled",null==t||t("CANCELLED_BY_USER_INTERACTION"))},u=e=>{if(e.stopPropagation(),e instanceof PointerEvent&&!(isLeftClick(e)||isTouch(e)))return;"displayed"===s.current&&h(),s.current="triggered";let i=e instanceof PointerEvent?"TRIGGERED_BY_USER_INTERACTION":"TRIGGERED_AUTOMATICALLY";null==t||t(i)},d=useUserInteractionContext(),h=T$4(()=>{s.current="stopped",d.removeEventListener(h)},[d]);return p$6(()=>{"displayed"===s.current&&(null==t||t("DISPLAYED"),d.addEventListener(h))},[t,s,d,h,o]),o!==r&&"ENDED"!==r&&"cancelled"!==s.current&&c(new Event("cancel")),o$i(k$5,{children:[o$i("style",{children:styles$7}),("displayed"===s.current||"stopped"===s.current)&&o$i("div",{class:"next-up-toast","data-rbup-next-up":!0,onPointerUp:u,onPointerMove:d.trigger,onAnimationEnd:u,children:[o$i("div",{style:{"--animation-duration":`${l}s`},class:"stopped"===s.current?"next-up-toast__progress-bar":"next-up-toast__progress-bar next-up-toast__countdown"}),o$i("div",{class:"next-up-toast__info",children:[e.imageUrl&&o$i("div",{class:"next-up-toast__image","data-rbup-next-up-image":!0,style:{"--next-up-toast-image":`url(${e.imageUrl}`}}),o$i("div",{class:"next-up-toast__text",children:[o$i(CosmosText,{appearance:"dark","data-rbup-next-up-label":!0,kind:"subtle",size:"xx-small",children:translate("nextVideoCountdown-title")}),o$i(CosmosText,{class:"next-up-toast__title","data-rbup-next-up-title":!0,appearance:"dark",size:"x-small",weight:"medium",clamp:1,children:e.title})]})]}),o$i("div",{class:"next-up-toast__close","data-rbup-next-up-close":!0,children:o$i(ControlsButton,{dataAttribute:"data-rbup-next-up-cancel",appearance:"dark",kind:"secondary",shape:"circle",size:"small",onPointerUp:c,Icon:o$i(CosmosIconCloseSmall,{slot:"icon"})})})]})]})},TvStreamingNextUpToastWrapper=({allowRenderNextUp:e,nextUp:t,onNextVideoCallback:i,duration:n,posInSec:r,isShowingAd:o,playerStatus:a,nextUpToastRef:s})=>{let l;if(!t)return null;let c="IDLE"===a;return o||(l=calculateFinalNextUp(t,c,n,r)),l&&e?o$i(NextUpToast,{ref:s,nextUp:l,posInSec:r,durationInSec:n,onNextUpAction:i,playerStatus:a}):null};function calculateFinalNextUp(e,t,i,n){if(!t&&shouldShowPlaylistEntry(i,n))return{title:e.title,imageUrl:e.imageUrl,countdownDurationSecs:DEFAULT_NEXT_UP_TIMEOUT_SECS}}function shouldShowPlaylistEntry(e,t){return 0!==e&&DEFAULT_NEXT_UP_TIMEOUT_SECS>=e-t}let LIVE_EDGE_MAX_TIME_SHIFT=-4,LiveButton=({onTooltipUpdate:e})=>{let{playerState:{playerCoordinator:t}}=usePlayerContext(),i=isVideoCurrentlyLive(t),n=T$4(()=>{i||null==t||t.timeShift(0)},[i,t]),r=F$4(()=>i?"":translate("tooltip-dvr"),[i]),o=i?o$i(CosmosIconLive,{"data-rbup-icon-live":!0,class:"g-icon live-button__icon",slot:"icon"}):o$i(CosmosIconReplay,{"data-rbup-icon-replay":!0,class:"g-icon live-button__icon",slot:"icon"}),a=translate(i?"liveStream-live":"liveStream-seekBackToLive");return o$i("div",{class:i?"live-button-live":"live-button",children:o$i(ControlsButton,{dataAttribute:i?"data-rbup-live":"data-rbup-dvr",label:a,Icon:o,onPointerUp:n,tooltipText:r,onTooltipUpdate:e,size:"small",shape:"pill",appearance:"light",buttonLabel:a,disabled:i})})};function isVideoCurrentlyLive(e){return((null==e?void 0:e.getTimeShiftInSec())??0)>LIVE_EDGE_MAX_TIME_SHIFT||(null==e?void 0:e.getLiveVariant())==="LINEAR"}function getLabelText(e,t){return t?0===e?translate("multiChannel-seeSchedule"):1===e?translate("multiChannel-singleStreamLive",{figure:"
131"}):translate("multiChannel-multipleStreamsLive",{figure:`${e}`}):""}let MultiChannelButton=({isPlayerSizeMedium:e,onTooltipUpdate:t,onPointerUp:i})=>{var n;let{playerState:{liveStatus:r}}=usePlayerContext(),o=translate("multiChannel-seeSchedule"),a=T$4(()=>{null==i||i()},[i]),s=getLabelText((null==(n=null==r?void 0:r.otherLiveVideos)?void 0:n.filter(e=>"live"===e.phase).length)??0,e);return o$i("div",{class:"multi-channel-button",children:o$i(ControlsButton,{dataAttribute:"data-rbup-multi-channel",label:s,Icon:o$i(CosmosIconBrowse,{"data-rbup-icon-browse":!0,class:"g-icon",slot:"icon"}),onPointerUp:a,tooltipText:o,onTooltipUpdate:t,size:"small",shape:e?"pill":"circle",appearance:"light",buttonLabel:s})})},ControlsTimeDisplay=({enableDuration:e=!0})=>{let{playerState:{durationInSec:t,playbackPosInSec:i}}=usePlayerContext(),n=F$4(()=>getFormattedTimeString(t),[t]);return o$i("div",{"data-rbup-time-display":!0,class:"controls-time-display",children:[o$i(CosmosText,{"data-rbup-playback-position":!0,appearance:"light",size:"xx-small@small x-small@medium",children:F$4(()=>getFormattedTimeString(i),[i])}),e&&o$i("div",{class:"controls-time-display__duration",children:[o$i(CosmosText,{"data-rbup-time-separator":!0,class:"controls-time-display__separator",appearance:"light",kind:"subtle",size:"xx-small@small x-small@medium",children:"/"}),o$i(CosmosText,{"data-rbup-playback-duration":!0,appearance:"light",kind:"subtle",size:"xx-small@small x-small@medium",children:n})]})]})},ThemedVideoPlayerTooltip=({children:e,...t})=>{let i=[t.class,"themed-video-player-tooltip"].filter(Boolean).join(" ");return o$i(CosmosTooltip,{...t,appearance:"dark",class:i,follow:"cursor",placement:"above",spacing:"tight",unreachable:!0,children:e})};function oneStepLinearCalc(e,t,i){return e/t*i}let VolumeIndicatorElement=e=>{let t=getCssClass(e);return o$i("div",{"data-rbup-volume-indicator":resolveTagAttributeValue(!e.active&&!e.highlight),"data-rbup-volume-indicator-active":resolveTagAttributeValue(e.active),"data-rbup-volume-indicator-highlighted":resolveTagAttributeValue(e.highlight),class:t})};function getCssClass({active:e,highlight:t}){let i="volume-indicator-element";return t?`${i} volume-indicator-element--highlighted`:e?`${i} volume-indicator-element--active`:i}let IndicatorElements=({volume:e})=>{let t=Math.round(e/10)-1,i=[];for(let e=0;e<10;e++)i[e]=o$i("div",{class:"controls-volume-slider__indicator-element",children:o$i(VolumeIndicatorElement,{active:e<t,highlight:e===t},e)},e);return o$i(k$5,{children:i})},SLIDER_WIDTH=38;function getCalculatedVolume(e){return e<0?0:Math.max(0,Math.min(100,Math.round(oneStepLinearCalc(e,SLIDER_WIDTH,100))))}let ControlsVolumeSlider=({currentVolume:e,isDragging:t,isHovering:i,onDraggingChanged:n,onVolumeChanged:r,onTooltipUpdate:o})=>{let a=_$3(null),s=i||t,l=T$4(e=>{var t;let{clientX:i}=e,n=(null==(t=a.current)?void 0:t.getBoundingClientRect().left)??i,o=i-n;
13s&&r(getCalculatedVolume(o))},[r,s]);return o$i("div",{class:"controls-volume-slider",ref:a,children:o$i("div",{class:`controls-volume-slider__slider ${s?"controls-volume-slider__slider--visible":""}`,onPointerDown:T$4(({offsetX:e})=>{let t=()=>{document.removeEventListener("pointerup",t),document.removeEventListener("pointermove",l),n(!1)};return n(!0),r(getCalculatedVolume(e)),document.addEventListener("pointerup",t),document.addEventListener("pointermove",l),()=>{document.removeEventListener("pointerup",t),document.removeEventListener("pointermove",l)}},[l,n,r]),onPointerOver:()=>{o(translate("tooltip-changeVolume"))},children:s&&o$i(IndicatorElements,{volume:e})})})};function convertVolumeLevel(e){if(e<0)throw Error("setting the volume to a value smaller than 0");return 0===e?"OFF":e<=30?"LOW":e<=60?"MEDIUM":"HIGH"}function getIconComponent(e){switch(e){case"OFF":return o$i(CosmosIconMute,{"data-rbup-icon-mute":!0,class:"g-icon",slot:"icon"});case"LOW":return o$i(CosmosIconVolumeLow,{"data-rbup-icon-volume-low":!0,class:"g-icon",slot:"icon"});case"MEDIUM":return o$i(CosmosIconVolumeMid,{"data-rbup-icon-volume-mid":!0,class:"g-icon",slot:"icon"});default:return o$i(CosmosIconVolume,{"data-rbup-icon-volume":!0,class:"g-icon",slot:"icon"})}}let VolumeButton=({volume:e,onClick:t,onTooltipUpdate:i})=>{let n=F$4(()=>convertVolumeLevel(e),[e]),r=translateWithHotKey("OFF"===n?"tooltip-unmute":"tooltip-mute");return o$i(ControlsButton,{size:"small",dataAttribute:"data-rbup-volume",Icon:getIconComponent(n),label:r,onPointerUp:t,onTooltipUpdate:i,tooltipText:r})},VolumeControls=({onControlsElementEnter:e})=>{let{playerState:{playerCoordinator:t,isShowingAd:i}}=usePlayerContext(),n=(null==t?void 0:t.getVolume())??100,[r,o]=h$3(!1),[a,s]=h$3(!1),l=T$4(()=>{let e=!(null==t?void 0:t.isMuted());null==t||t.setMuted(e)},[t]),c=T$4(e=>{null==t||t.setVolume(e)},[t]),u=T$4(()=>{o(!1)},[]),d=T$4(t=>{o(!0),null==e||e(t,!0)},[e]),h=T$4(e=>{s(e)},[]),p=F$4(()=>isMobileDevice(),[]),[f,m]=h$3(""),g=T$4(e=>{m(e)},[]);return o$i(ThemedVideoPlayerTooltip,{content:f,offset:i?7:30,children:o$i("div",{onPointerOver:d,onPointerLeave:u,class:"volume-controls",children:[o$i(VolumeButton,{onClick:l,volume:n,onTooltipUpdate:g}),!p&&o$i(ControlsVolumeSlider,{currentVolume:n,isHovering:r,isDragging:a,onDraggingChanged:h,onVolumeChanged:c,onTooltipUpdate:g})]})})},PlayPauseButton=({cssClass:e,onTooltipUpdate:t})=>{let{playerState:{playerStatus:i,playerCoordinator:n}}=usePlayerContext(),r="PLAYING"===i,o=r?"data-rbup-pause":"data-rbup-play",a=r?o$i(CosmosIconPause,{"data-rbup-icon-pause":!0,class:`g-icon ${e}`,slot:"icon"}):o$i(CosmosIconPlay,{"data-rbup-icon-play":!0,class:`g-icon ${e}`,slot:"icon"}),s=translateWithHotKey(r?"tooltip-pause":"tooltip-play");return o$i(ControlsButton,{dataAttribute:o,Icon:a,label:s,onPointerUp:T$4(()=>{handlePlayPauseToggle(i,n)},[i,n]),size:"small",tooltipText:s,onTooltipUpdate:t,appearance:"dark"})},BufferingPlaybackControls=({onTooltipUpdate:e})=>{let{playerState:{playerCoordinator:t,playerStatus:i}}=usePlayerContext(),n="BUFFERING"===i,r=translate(n?"tooltip-loading":"tooltip-stop"),o=T$4(async()=>{await (null==t?void 0:t.stop())},[t]);return n?o$i(CosmosSpinner,{"data-rbup-buffer":!0,class:"play-seek-controls__spinner",appearance:"light",label:translate("tooltip-loading"),onPointerEnter:t=>{e(r,t)}}):isLiveLinearResolver(t)&&"PLAYING"===i?o$i(ControlsButton,{dataAttribute:"data-rbup-stop",Icon:o$i(CosmosIconStop,{class:"g-icon play-seek-controls__icon",slot:"icon"}),label:r,tooltipText:r,onPointerUp:o,onTooltipUpdate:e,appearance:"dark"}):o$i(PlayPauseButton,{"data-rbup-play-pause":!0,cssClass:"play-seek-controls__icon",onTooltipUpdate:e})},MAIN_CLASS_NAME$1="play-seek-controls",PlaySeekControls=({enableSeek:e=!0,position:t="center",isMobileDevice:i=!1})=>{let{playerState:{playerCoordinator:n,playbackMode:r,liveVariant:o,isVRVideo:a}}=usePlayerContext(),s=(null==n?void 0:n.canSeekOrTimeshiftBackward())??!1,l=(null==n?void 0:n.canSeekOrTimeshiftForward())??!1,c="center"===t,u=c?void 0:`${MAIN_CLASS_NAME$1}__bottom`,d=[MAIN_CLASS_NAME$1,u,resolveVRContentClassName(a,i)].join(" "),{tooltipText:h,onTooltipUpdate:p}
13=useTooltipVisibility(),f=T$4(()=>{null==n||n.seekOrTimeshiftRelative(DEFAULT_SEEK_SKIP_SECONDS)},[n]),m=T$4(()=>{null==n||n.seekOrTimeshiftRelative(-DEFAULT_SEEK_SKIP_SECONDS)},[n]),g=F$4(()=>e&&("VOD"===r||"DVR"===o),[e,o,r]);return o$i("div",{"data-rbup-play-controls":resolveTagAttributeValue(c),"data-rbup-bottom-play-controls":resolveTagAttributeValue(!c),class:d,children:o$i(ThemedVideoPlayerTooltip,{content:h,offset:30,children:o$i("div",{class:"play-seek-controls__play-seek-pause-container","data-rbup-seek-pause-container":!0,children:[g&&o$i(ControlsButton,{appearance:"dark",dataAttribute:"data-rbup-seek-back",disabled:!s,Icon:o$i(CosmosIconBack10,{"data-rbup-icon-back-10":!0,class:"g-icon play-seek-controls__icon",slot:"icon"}),label:translate("tooltip-rewind"),onPointerUp:m,tooltipText:translate("tooltip-rewind"),onTooltipUpdate:p}),o$i(BufferingPlaybackControls,{onTooltipUpdate:p}),g&&o$i(ControlsButton,{appearance:"dark",dataAttribute:"data-rbup-seek-forward",disabled:!l,Icon:o$i(CosmosIconForward10,{"data-rbup-icon-forward-10":!0,class:"g-icon play-seek-controls__icon",slot:"icon"}),label:translate("tooltip-forward"),onPointerUp:f,tooltipText:translate("tooltip-forward"),onTooltipUpdate:p})]})})})};function resolveVRContentClassName(e,t){return e&&!t?`${MAIN_CLASS_NAME$1}__vr-content`:void 0}let LeftSideControls=({enableDuration:e,enableSeek:t,isPlayerSizeMedium:i,onShowMultiChannelSwitcher:n,onControlsElementEnter:r})=>{let{playerState:{playerCoordinator:o}}=usePlayerContext(),a=(null==o?void 0:o.getPlaybackMode())??"VOD",s="VOD"===a,l="LIVE"===a,{tooltipVisibility:c,tooltipText:u,onTooltipUpdate:d,hideTooltip:h}=useTooltipVisibility();return o$i("div",{class:"left-side-controls",children:[o$i(PlaySeekControls,{enableSeek:t,position:"bottom",isMobileDevice:F$4(()=>isMobileDevice(),[])}),o$i(VolumeControls,{onControlsElementEnter:r}),s&&o$i(ControlsTimeDisplay,{enableDuration:e}),o$i(ThemedVideoPlayerTooltip,{content:u,offset:30,controlled:!0,visible:c,children:o$i("div",{class:"left-side-controls__selective-elements","data-rbup-left-side-controls-selective-elements":!0,onPointerLeave:h,children:[l&&o$i(LiveButton,{onTooltipUpdate:d}),n&&o$i(MultiChannelButton,{isPlayerSizeMedium:i,onTooltipUpdate:d,onPointerUp:n})]})})]})},FullscreenButton=({onTooltipUpdate:e})=>{let{playerState:{isFullscreenMode:t,playerCoordinator:i}}=usePlayerContext(),n=_$5(),r=translateWithHotKey(t?"tooltip-normalscreen":"tooltip-fullscreen"),o=T$4(()=>{null==i||i.toggleFullscreen();let e=n.current;null==e||e.blur()},[i,n]),a=t?o$i(CosmosIconFullscreenExit,{"data-rbup-icon-fullscreen-exit":!0,class:"g-icon",slot:"icon"}):o$i(CosmosIconFullscreen,{"data-rbup-icon-fullscreen":!0,class:"g-icon",slot:"icon"});return o$i(k$5,{children:(null==i?void 0:i.isFullscreenAvailable())&&o$i(ControlsButton,{ref:n,dataAttribute:"data-rbup-fullscreen",label:r,Icon:a,onPointerUp:o,tooltipText:r,onTooltipUpdate:e,size:"small"})})},OnlyFullscreenControls=()=>{let{playerState:{playerCoordinator:e}}=usePlayerContext(),{tooltipVisibility:t,tooltipText:i,onTooltipUpdate:n,hideTooltip:r}=useTooltipVisibility();return o$i("div",{class:"right-side-controls",onPointerLeave:r,children:o$i(ThemedVideoPlayerTooltip,{content:i,offset:30,controlled:!0,visible:t,children:o$i("div",{class:"right-side-controls__tooltip-wrapper",children:(null==e?void 0:e.isFullscreenAvailable())&&o$i(FullscreenButton,{onTooltipUpdate:n})})})})},CONTROL_CONFIGS={DEFAULT:{showPictureInPicture:!0,showAirPlay:!0,showFullscreen:!0,showCasting:!0,showSettings:!0},CASTING:{showPictureInPicture:!1,showAirPlay:!1,showFullscreen:!1,showCasting:!0,showSettings:!1},VR_VIDEO:{showPictureInPicture:!1,showAirPlay:!1,showFullscreen:!0,showCasting:!1,showSettings:!0}};function useShowControlsButtons(e,t){return e?CONTROL_CONFIGS.VR_VIDEO:t?CONTROL_CONFIGS.CASTING:CONTROL_CONFIGS.DEFAULT}let InternalRightSideControls=({onMenuClicked:e,AdditionalButtonComponent:t},i)=>{let{playerState:{audioTracks:n,isHdPlayback:r,playerCoordinator:o,subtitleTracks:a,isVRVideo:s,isCasting:l,isCastingAvailable:c}}=usePlayerContext(),u=_$5(),d=_$5(),h=_$5(),p=_$5(),f=T$4(e=>{let t=e.current;null==t||t.focus()},[]),m=F$4(()=>({focusSubtitleMenuButton(){f(u)},focusAudioMenuButton(){f(d)},focusSettingsMenuButton(){f(p)},focusMultiStreamMenuButton(){f(h)}}),[d,h,f,p,u]);A$3(i,()=>m,[m]);let{showPictureInPicture:g,showAirPlay:v,showFullscreen:y,showCasting:b,showSettings:S}=useShowControlsButtons(s,l),_=T$4(t=>{t.stopPropagation(),e("AUDIO")},[e]),E=T$4(t=>{t.stopPropagation(),e("MULTI_STREAM")},[e]),T=T$4(t=>{t.stopPropagation(),e("SETTINGS")},[e]),w=T$4(t=>{t.stopPropagation(),e("SUBTITLES")},[e]),A=T$4(()=>{null==o||o.togglePictureInPicture()}
13,[o]),P=T$4(()=>{null==o||o.playVideoViaAirPlay()},[o]),I=T$4(()=>{l?null==o||o.stopCastingVideo():null==o||o.playVideoViaCasting()},[l,o]),{tooltipVisibility:C,tooltipText:M,onTooltipUpdate:R,hideTooltip:k}=useTooltipVisibility(),x=a.length>0,O=o$i(CosmosIconSubtitles,{"data-rbup-icon-captions":!0,class:"g-icon",slot:"icon"}),D=n.length>1,L=null==o?void 0:o.getPlayerConfiguration().multiStreamAssets,N=!!L&&L.length>1,U=r?o$i(CosmosIconQuality,{"data-rbup-icon-quality":!0,class:"g-icon",slot:"icon"}):o$i(CosmosIconSettings,{"data-rbup-icon-settings":!0,class:"g-icon",slot:"icon"});return o$i("div",{class:`right-side-controls${l?" right-side-controls--casting":""}`,onPointerLeave:k,children:[o$i(ThemedVideoPlayerTooltip,{content:M,offset:30,controlled:!0,visible:C,children:o$i("div",{class:"right-side-controls__tooltip-wrapper",children:[N&&o$i("div",{class:"right-side-controls__multi-steam-button",children:o$i(ControlsButton,{ref:h,dataAttribute:"data-rbup-multi-stream",Icon:o$i(CosmosIconSeason,{"data-rbup-icon-multi-stream":!0,class:"g-icon",slot:"icon"}),label:translate("menu-multi-stream"),onPointerUp:E,tooltipText:translate("tooltip-multi-stream"),onTooltipUpdate:R,size:"small"})}),D&&o$i("div",{class:"right-side-controls__audio-button",children:o$i(ControlsButton,{ref:d,dataAttribute:"data-rbup-audio",Icon:o$i(CosmosIconAudioSettings,{"data-rbup-icon-multi-language":!0,class:"g-icon",slot:"icon"}),label:translate("tooltip-audioTracks"),onPointerUp:_,tooltipText:translate("tooltip-audioTracks"),onTooltipUpdate:R,size:"small"})}),x&&o$i("div",{class:"right-side-controls__subtitles-button",children:o$i(ControlsButton,{ref:u,dataAttribute:"data-rbup-subtitles",Icon:O,label:translate("tooltip-subtitles"),onPointerUp:w,tooltipText:translate("tooltip-subtitles"),onTooltipUpdate:R,size:"small"})}),S&&o$i(ControlsButton,{ref:p,dataAttribute:"data-rbup-settings",label:translate("tooltip-settings"),Icon:U,onPointerUp:T,tooltipText:translate("tooltip-settings"),onTooltipUpdate:R,size:"small"}),g&&(null==o?void 0:o.isPictureInPictureAvailable())&&o$i(ControlsButton,{dataAttribute:"data-rbup-pip",Icon:o$i(CosmosIconPictureInPicture,{"data-rbup-icon-picture-in-picture":!0,class:"g-icon",slot:"icon"}),label:translate("tooltip-pip"),onPointerUp:A,tooltipText:translateWithHotKey("tooltip-pip"),onTooltipUpdate:R,size:"small"}),v&&(null==o?void 0:o.isAirPlayAvailable)&&o$i(ControlsButton,{dataAttribute:"data-rbup-airplay",Icon:o$i(CosmosIconAirplay,{"data-rbup-icon-airplay":!0,class:"g-icon",slot:"icon"}),label:translate("tooltip-airplay"),onPointerUp:P,tooltipText:translate("tooltip-airplay"),onTooltipUpdate:R,size:"small"}),b&&c&&o$i(ControlsButton,{dataAttribute:"data-rbup-casting",Icon:l?o$i(CosmosIconChromecastFilled,{"data-rbup-icon-cast":!0,class:"g-icon",slot:"icon"}):o$i(CosmosIconChromecast,{"data-rbup-icon-cast":!0,class:"g-icon",slot:"icon"}),label:translate("tooltip-casting"),onPointerUp:I,tooltipText:translate("tooltip-casting"),onTooltipUpdate:R,size:"small"}),y&&(null==o?void 0:o.isFullscreenAvailable())&&o$i(FullscreenButton,{onTooltipUpdate:R})]})}),t&&o$i(t,{onTooltipUpdate:R})]})},RightSideControls=k$3(InternalRightSideControls),VideoDetails=({sizeBreakpoints:e})=>{let{playerState:{mediaMetaData:t,playerConfiguration:i}}=usePlayerContext(),n=F$4(()=>null!=i&&i.title?i.title:null==t?void 0:t.title,[null==t?void 0:t.title,i]),r=F$4(()=>null!=i&&i.title?i.description:null==t?void 0:t.description,[null==t?void 0:t.description,i]);if((null==i?void 0:i.videoDetails)==="hidden")return null;let o=e.largeOrBigger;return n?o$i("div",{"data-rbup-video-details":!0,class:"video-details",children:[o$i(CosmosTitle,{appearance:"light",clamp:1,class:"video-details__title",size:o?"medium":"x-small",weight:"bold",dir:"auto",children:n}),!isMobileDevice()&&r&&o$i(CosmosText,{appearance:"light",clamp:1,class:"video-details__description",kind:"subtle",size:"small",dir:"auto",children:r})]}):null};function calculateControlsClassName(e,t){return`controls-container ${"fade-in"===e?"controls-container--fade-in":"fade-out"===e?"controls-container--fade-out"
13:"controls-container--hide"} ${t?"controls-container--fullscreen":""}`}function shouldShowInnerControls(e,t){return"SETTINGS"!==t||e}let MenuContainer=({menuState:e,isPlayerSizeMedium:t,onCloseSettingsMenu:i,onCloseSubtitleMenu:n,onCloseAudioMenu:r,onCloseMultiStreamMenu:o})=>o$i(k$5,{children:["SETTINGS"===e&&o$i(SettingsMenu,{activateResizing:t,onCloseMenu:i}),"SUBTITLES"===e&&o$i(SubtitlesMenu,{onCloseMenu:n}),"AUDIO"===e&&o$i(AudioMenu,{onCloseMenu:r}),"MULTI_STREAM"===e&&o$i(MultiStreamMenu,{onCloseMenu:o})]}),Controls=({enableDuration:e,enableSeek:t,enableVideoDetails:i=!0,globalKeyboardNavigation:n="ACTIVE",sizeBreakpoints:r,onlyFullscreenControls:o,onShowMultiChannelSwitcher:a,allowCaptureAreaInteraction:s=!0,CenteredToastComponent:l,AdditionalButtonComponent:c})=>{let u=useStreamingButtonBar(),{playerState:{playerStatus:d,isShowingAd:h,playerCoordinator:p,isFullscreenMode:f}}=usePlayerContext(),{controlsVisibility:m,showControlsTemporarily:g,showControlsPermanently:v,menuState:y,setMenuState:b,onControlsElementEnter:S,toggleMenu:_,onControlsElementFocus:E,onControlsElementBlur:T}=useControlsVisibilityContext(),w=r.mediumOrBigger,A=shouldShowInnerControls(w,y),P="CLOSED"!==y,I=calculateControlsClassName(m,f),C=_$3(null),M=_$3(null),R=F$4(()=>isMobileDevice(),[]),k=()=>{R||g()};useGlobalKeyboardNavigation(n,async e=>{await handleKeyboardEvent(e,p)},p);let x=T$4(e=>{isMouse(e)&&g()},[g]),O=()=>{g()},D=()=>{g()},L=T$4(e=>{e?v():g()},[v,g]),N=T$4(e=>{!R||w?_(e):C.current=window.setTimeout(()=>{_(e),C.current=null},100)},[w,R,_]);p$6(()=>()=>{C.current&&window.clearTimeout(C.current)},[]);let U=T$4(()=>{var e;b("CLOSED"),null==(e=M.current)||e.focusSettingsMenuButton()},[b]),F=T$4(()=>{var e;b("CLOSED"),null==(e=M.current)||e.focusSubtitleMenuButton()},[b]),B=T$4(()=>{var e;b("CLOSED"),null==(e=M.current)||e.focusAudioMenuButton()},[b]),V=T$4(()=>{var e;b("CLOSED"),null==(e=M.current)||e.focusMultiStreamMenuButton()},[b]);return p$6(()=>{w||b(e=>"SUBTITLES"===e||"AUDIO"===e||"MULTI_STREAM"===e?"CLOSED":e)},[w,b]),p$6(()=>{"ENDED"===d&&b("CLOSED")},[d,b]),o$i("div",{"data-rbup-controls":!0,class:I,onFocus:k,onFocusCapture:E,onBlur:T,onPointerEnterCapture:S,role:"region","aria-label":"Video Player Controls",children:[!h&&s&&o$i(ClickAndTapOverlay,{onPointerMove:x}),A&&o$i(k$5,{children:[o$i("div",{className:"controls__gradient"}),i&&o$i("div",{"data-rbup-controls-details":!0,class:"controls__video-details",children:o$i(VideoDetails,{sizeBreakpoints:r})}),o$i("div",{"data-rbup-controls-play-seek":!0,class:"controls__play",onPointerUpCapture:O,children:o$i(PlaySeekControls,{enableSeek:t,isMobileDevice:R})}),o$i("div",{"data-rbup-controls-scrub-bar":!0,class:"controls__scrub-bar",children:o$i(ScrubBar,{onDragStatusChanged:L,sizeBreakpoints:r,hideScrubBarTooltip:P,onControlsElementEnter:S})}),o$i("div",{"data-rbup-controls-buttons":!0,class:"controls__buttons-container",onPointerMove:x,onPointerUpCapture:D,children:[o$i("div",{class:"controls__buttons",children:[o$i(LeftSideControls,{enableDuration:e,enableSeek:t,isPlayerSizeMedium:w,onShowMultiChannelSwitcher:a,onControlsElementEnter:S}),o&&o$i(OnlyFullscreenControls,{}),!o&&o$i(k$5,{children:[o$i(CenterControls,{isPlayerSizeMedium:w,CenteredToastComponent:l}),o$i(RightSideControls,{ref:M,onMenuClicked:N,AdditionalButtonComponent:c})]})]}),u]})]}),o$i(MenuContainer,{menuState:y,isPlayerSizeMedium:w,onCloseAudioMenu:B,onCloseSettingsMenu:U,onCloseSubtitleMenu:F,onCloseMultiStreamMenu:V})]})},RbupVideoCoreOverlay=({enableDuration:e,enableSeek:t=!0,enableVideoDetails:i,globalKeyboardNavigation:n,playerCoordinator:r,sizeBreakpoints:o,onlyFullscreenControls:a,onShowMultiChannelSwitcher:s,allowControlsCaptureAreaInteraction:l=!0,CenteredToastComponent:c,AdditionalButtonComponent:u})=>{let d=r.getPlayerStatus(),h="allow"===useControlsVisibilityContext().allowControlsRendering&&!["IDLE","ERROR"].includes(d),p=l?"overlay":"overlay disabled",f=q$2(UserInteractionContext);return o$i("div",{"data-rbup-overlay":!0,class:p,onPointerMove:T$4(e=>{f.trigger(e)},[f]),dir:"ltr",children:h&&o$i(Controls,{enableDuration:e,enableSeek:t,enableVideoDetails:i,globalKeyboardNavigation:n,sizeBreakpoints:o,onlyFullscreenControl
13s:a,onShowMultiChannelSwitcher:s,allowCaptureAreaInteraction:l,CenteredToastComponent:c,AdditionalButtonComponent:u})})};function getLanguageMatchForIsoCode(e,t){var i;if(!t)return;let n=e.split("-")[0];return null==(i=Object.entries(t).find(([e,t])=>t===n))?void 0:i[0]}function getLanguageMatchForAudioLanguage(e,t){var i;return t?null==(i=Object.entries(t).find(([t,i])=>i===e||t===e))?void 0:i[0]:void 0}function getIsoMatchForAudioLanguage(e,t){var i;return t?null==(i=Object.entries(t).find(([t,i])=>i===e||t===e))?void 0:i[1]:void 0}function getMatchedAudioOrSubtitleTrackLanguage(e,t){var i;return null==(i=t.find(t=>t.lang===e))?void 0:i.lang}function getMatchedAudioTrackId(e,t){var i;return null==(i=t.find(t=>t.lang===e))?void 0:i.id}function getMatchedSubtitleTrackId(e,t){var i;return null==(i=t.find(t=>t.lang===e))?void 0:i.id}function tryResolveRequestedAudioLanguageForAudioTrack(e,t,i){let n=getMatchedAudioOrSubtitleTrackLanguage(e,i);return n||getLanguageMatchForIsoCode(e,t)||getLanguageMatchForAudioLanguage(e,t)}function tryResolveRequestedSubtitleLanguageForSubtitleTrack(e,t,i){let n=getMatchedAudioOrSubtitleTrackLanguage(e,i);return n||getLanguageMatchForIsoCode(e,t)||getLanguageMatchForAudioLanguage(e,t)}var collector_bitmovin={exports:{}};!function(e){!function(){var t={},i=window.URL,n=window.URLSearchParams,r=window.EventTarget,o=window.CustomEvent;(function(e,a,s){var l,c,u=e.Object,d=e.Array,h=e.Date,p=e.Number,f=e.String,m=e.RegExp,g=e.Math,v=e.XMLHttpRequest,y=e.Uint8Array,b=e.ArrayBuffer,S=e.JSON,_=e.Promise,E=e.document||{},T=E.currentScript||{},w=e.location||{},A=e.navigator||{},P=A.userAgent||"",I=A.connection||A.mozConnection||A.webkitConnection,C=e.crypto,M=e.console||{},R=e.performance,k=e.setInterval,x=e.setTimeout,O=e.decodeURIComponent,D=e.encodeURIComponent;try{l=e.localStorage,c=e.sessionStorage}catch{}function L(e){return e?function(t,i){t="[DZ] "+t,void 0===i?e.call(M,t):e.call(M,t,i)}:null}var N=L(M.log)||function(){},U=L(M.error)||N,F=L(M.warn)||N,B=L(M.info)||N,V=L(M.debug)||N,j={options:{cmcdEnable:!1,cmcdMode:null,cmcdKeys:null}},z="datazoom_",N="__"+z+"rootobj",H="custom_",G="v_";if(j[N]=1,t)t.datazoom=j;else{if(tf(e.datazoom)){if(e.datazoom[N])return F("Collector already loaded");F("Overwriting window.datazoom")}e.datazoom=j}function q(e,t,i){var n,r=t.shift();return null==r?n=e:e?r instanceof m?u.keys(e).some(function(i){if(r.test(i))return null!=(n=q(e[i],t.slice()))}):n=q(e[r],t):n=null,n??i}function W(e){return"function"==typeof e}function Y(e,t){if(W(e))try{return new(e=t?e.bind.apply(e,[null].concat(t)):e),1}catch{}}Y(i,["http://x.io"])&&Y(n)||(n=function(e){var t=[];function i(e,i){!1!==i&&t.push([e,i])}function n(e){t=t.filter(function(t){return t[0]!==e})}e&&e.slice(1).split("&").forEach(function(e){e=e.split("=");try{t.push([O(e[0]),null==e[1]||O(e[1])])}catch(e){eB(e,"URLSearchParams()")}}),e=this,e.append=i,e.delete=n,e.set=function(e,t){n(e),i(e,t)},e.get=function(e){var i=null;return t.some(function(t){if(t[0]===e)return i=t[1],!0}),i},e.toString=function(){return t.map(function(e){var t=D(e[0]);return!0===e[1]?t:t+"="+D(e[1])}).join("&")}},i=function(e){var t=this,e=e.split("?"),i=e[0],e=e[1]?"?"+e[1]:"";t.search=e,t.searchParams=new n(e),t.toString=function(){return i+t.search}}),Y(r)&&Y(o,["x"])||(r=function(){var e=this,t={};e.addEventListener=function(e,i){var n=t[e];n||(t[e]=n=[]),n.push(i)},e.removeEventListener=function(e,i){var n=t[e];n&&(t[e]=n.filter(function(e){return e!=i}))},e.dispatchEvent=function(i){var n=t[i.type];n&&n.forEach(function(t){x(function(){t.call(e,i)},0)})}},o=function(e,t){this.type=e,t&&(this.detail=t.detail)}),a=u.assign({},{cn:"Bitmovin Player",sv:"2.28.0",cf:"",mf:null,ev:[],fd:[],md:[],od:null,mb:"",sw:!1,sm:"",sp:[],ss:"",sd:"",sc:"",ab:"",st:null,hi:1e4,ti:200,cm:null,am:null,cq:null,aq:null,rd:[1,2,4,8,8,8,8],bd:50,kd:50,mh:5e3,ml:0,mc:256,mp:2.5,ep:2,ed:2500,ec:p.MAX_VALUE,cc:"",cl:"",ci:"",cd:[],og:!0,os:!0,tt:!1,om:!1,ps:null,sn:["IDLE","CT_REQUESTED","CT_BUFFERING","CT_PLAYING","CT_PAUSED","CT_SEEKING","CT_COMPLETED","CT_STOPPED","CT_ERROR","AD_BUFFERING","AD_PLAYING","AD_PAUSED","AD_SEEKING","AD_COMPLETED","AD_SKIPPED","AD_ERROR","AD_BREAK_STARTED","AD_BREAK_ENDED"],le:function(e){var t=e.event,i=e.video;eU("[Event] "+t.type+(i?" ("+i.media_type+")":"")+" @"+t.timestamp,to(e))}},a||{});var K,X,Q,Z={datapoints:{events:"ev",flux_data:"fd",metadata:"md",cmcd:"cd"},endpoints:{event_ingest:"mb",sampling:"sm",ad_blocker_bait:"ab"},sampling:{enable:"sw",definition_namespace:"ss",definition_key_name:"sd",criteria_sampling_key_name:"sc",criteria_matching_fields:"sp"},ondemand:"od",customer_code:"cc",connector_list:"cl",app_session_timeout_mins:"st",heartbeat_interval_ms:"hi",content_milestone_percent:"cm",ad_milestone_percent:"am",content_qv_sec:"cq",ad_qv_sec:"aq",observability:{lag_enabled:"og",loss_enabled:"os"},om_enabled:"om",configuration_id:""},J=!t&&T.src||"/",$=w.href||"https://localhost",ee="configuration_id",et="urn:x-cast:io.datazoom.collector",ei="transfer",en=0,er=1,eo=2,ea=3,es=4,el=5,ec={off:0,error:1,warning:2,info:3,debug:4,verbose:5},eu=2;function ed(e){var t;e&&(en<=(t=(t=ec[e])??+e)&&t<=el?eu=t:F("Invalid log level: "+e))}function eh(){K={}
13,X=[],[[a.ps],[J.split("?")[1]],[$.split("?")[1],z]].forEach(function(e){var t=e[1];e[0]&&e[0].split("&").forEach(function(e){try{var i=e.split("="),n=O(i[0]);if(t){if(!n.startsWith(t))return;n=n.slice(t.length)}K[n]=null==i[1]||O(i[1]),n.startsWith("x-")&&X.push([n,K[n]])}catch(e){F("Invalid query string: "+e.message)}})}),Q="true"==K.demo,ed(K.log)}eh();var ep="io.datazoom.",ef=ep,em="__ss_ev_count",eg="__ss_last_act",ev="__ss_custom_md",ey="__ss_msg_queue",eb="__ss_sm_resp",eS="__ss_appss_to",e_="__ss_on_demand",eE="collector_observability",eT="process_duration_ms",ew="send_duration_ms",eA="call_duration_ms",eP="queue_duration_ms",eI="attempt_count",eC="attempt",eM="status_code",eR="sample",ek="config",ex="log";function eO(e,t,i,n){eu<e||t(i,n)}function eD(e,t){eO(er,U,e,t)}function eL(e,t){eO(eo,F,e,t)}function eN(e,t){eO(ea,B,e,t)}function eU(e,t){eO(es,V,e,t)}function eF(e,t){eO(el,V,e,t)}function eB(e,t){return eD(t="[Exception] "+(t?"("+t+") ":"")+e,e),t}function eV(e,t,i,n,r){var o,a=0,s=1,l=0;return t=t||"",i=i||1,n=n||p.MAX_VALUE,{log:function(c,u){(o=eH())>
13=l+r&&(a=0,s=1,l=o),++a>=s&&(e("["+a+"] "+t+c,u),s+=g.min(s*i,n))}}}function ej(t,i){e5(e,"postMessage",[{type:t,data:i},"*"])}var ez,eH,eG,eq,eW,eY,eK=[],eX=0;function eQ(e,t,i,n,r,o,a,s){var i={time:i,metric_name:n,dimension:{},batch:function(){return o}},l=(e&&(i.type=e),null!=r&&(i.metric_value=r),i.dimension);return t&&(l.target=t),s&&s.forEach(function(e){l[e[0]]=e[1]}),a&&(l.b4_ss=!0),i}function eZ(e,t,i,n){var r=t,o=1,s=eX++;return{retry:function(e){r=e,o++},log:function(l,c){var u;a.og&&(null!=i&&eK.push(eQ(null,e,u=t-i,eT,l-u,s,n,[[eI,o],[eM,c]]),eQ(null,e,u,eP,i,s,n)),eK.push(eQ(null,e,t,ew,l-t,s,!1,[[eI,o],[eM,c]]),eQ(null,e,r,eA,l-r,s,!1,[[eC,o],[eM,c]])))}}}function eJ(e,t){var i,n;a.os&&(n=e.t,n=g.trunc(n/6e4),(n=(ez=ez||{})[n]||(ez[n]=[0,0,0]))[2]++,i=(n=n[3]||(n[3]={}))[t],e=o9(e.m,nM),i?i.push(e):n[t]=[e])}function e$(e){var t,i=ez[e],n=eX++;i[2]&&(i[3]&&(t=[["status_codes",i[3]]]),eK.push(eQ("loss",null,6e4*e,"evnt_fail",i[2],n,!1,t)))}function e0(e){return e&&(tp(e)?e.slice():u.assign({},e))}function e1(e,t){return tf(t)?e?u.assign({},e,t):t:e}function e2(e,t){var i;return t?((i={})[e]=t,i):null}function e3(e,t){var i;return t?e?(i=e0(e),u.keys(t).forEach(function(n){var r=e[n];i[n]=r?u.assign({},r,t[n]):t[n]}),i):t:e}function e5(e,t,i,n){return W(t=q(e,[t],n))?t.apply(e,i):null}function e4(e,t,i){return function(){try{return t.apply(e,arguments)}catch(e){eB(e,i)}}}function e6(e,t){u.keys(e).forEach(function(i){t.forEach(function(t){t[i]=e4(t,e[i],i)})}),t[0]}function e8(e){var t={};return e.forEach(function(e){t[e.nm]=e}),t}function e7(e){var t={};return e.forEach(function(e){t[e.nm]=!0}),t}function e9(e,t,i){e.forEach(function(e){e[t]=i})}function te(e,t){var e=new i(e,$),r=new n(e.search);return t(r),e.search="?"+r.toString(),e.toString()}function tt(e){var t,i=X.length;return i?te(e,function(e){for(t=0;t<i;t++)e.append(X[t][0],X[t][1])}):e}function ti(e,t,n){var r;return null!=(r=e?new i(e,$).searchParams.get(t):r)?r:n}eG=0,eq=a.ec,eW=eV(eL,"Abnormal clock increment: ",.2,1e3,3e5),R&&R.now,eY=eG+h.now(),eH=function(e){var t=h.now(),i=eY,n=(eY=eG+t)-i;return(n<0||eq<n)&&(eG=(eY=i+a.ti)-t,eW.log(n)),eY};var tn=function(){for(var e=[],t=0;t<256;t++)e.push((t+256).toString(16).substr(1).toLowerCase());return function(){var t=new y(16);if(C&&C.getRandomValues)C.getRandomValues(t);else{eL("getRandomValues() not supported");for(var i=0;i<16;i++)t[i]=g.floor(256*g.random())}return t[6]=15&t[6]|64,t[8]=63&t[8]|128,e[t[0]]+e[t[1]]+e[t[2]]+e[t[3]]+"-"+e[t[4]]+e[t[5]]+"-"+e[t[6]]+e[t[7]]+"-"+e[t[8]]+e[t[9]]+"-"+e[t[10]]+e[t[11]]+e[t[12]]+e[t[13]]+e[t[14]]+e[t[15]]}}();function tr(e,t,i,n,r,o){var a=new v;if(a.open(e,t,!0),i)for(var s=u.keys(i),l=0;l<s.length;l++)a.setRequestHeader(s[l],i[s[l]]);return r&&(a.onreadystatechange=function(){r(a)}),a.send(n),{abort:function(){delete a.onreadystatechange,a.abort()}}}function to(e){if(e)try{return S.stringify(e)}catch(e){eB(e,"toJSON")}return null}function ta(e){if(e)try{return S.parse(e)}catch(e){eB(e,"fromJSON")}return null}function ts(e,t){return(e===c?ef:ep)+t}function tl(e,t,i){if(e)if(null==i)tu(e,t);else try{e.setItem(ts(e,t),to({v:i}))}catch(e){eB(e,"storageSet")}}function tc(e,t){return(e=e?ta(e.getItem(ts(e,t))):null)?e.v:null}function tu(e,t){e&&e.removeItem(ts(e,t))}function td(e){return"string"==typeof e}function th(e){return p.isFinite(e)}function tp(e){return d.isArray(e)}function tf(e){return null!=e&&"object"==typeof e&&!tp(e)}function tm(e){return td(e)?e:""+e}function tg(e){return th(e*=1)?e:null}function tv(e,t,i){return null==e&&null==t?tg:function(n){return null!=(n=tg(n))&&(null!=e&&n<e?n=i?null:e:null!=t&&t<n&&(n=i?null:t)),n}}function ty(e){return g.round(e)}function tb(e,t){for(var i=0;i<t.length;i++)!function(e){for(var t=e,i=1;i<arguments.length;i++)t.dv||(t.dv=[]),t.dv.push(arguments[i])}(t[i],e)}function tS(e,t){if(t)for(var i=0;i<t.length&&null!=e;i++)e=t[i](e);return e}e.self!==e.top&&eU("Page loaded in a frame, set sessionStorage prefix to: "+(ef+=(K.frame_id||tn())+".")),ta("{}");var t_,tE=4,tT=8,tw=16,tA=32,tP=65535,tI=4,N=17,T=20,R=52,tC=8,tM={ap:2,nm:"ad_break_start"},tR={ap:2,nm:"ad_break_end"},tk={ap:2,nm:"ad_click"},tx={ap:2,nm:"ad_impression"},tO={ap:2,nm:"ad_skip"},tD={ap:4,nm:"app_session_end"},tL={ap:3,nm:"audio_track_changed"},tN={ap:3,nm:"buffer_start"},tU={ap:3,nm:"buffer_end"},tF={ap:3,nm:"cast_start"},tB={ap:3,nm:"cast_end"},tV={ap:3,nm:"cast_transfer"},tj={ap:65535,nm:"context_ready"},tz={ap:4,nm:"datazoom_loaded"},tH={ap:3,nm:"error"},tG={ap:3,nm:"exit_fullscreen"},tq={ap:3,nm:"fullscreen"},tW={ap:3,nm:"heartbeat"},tY={ap:3,nm:"media_loaded"},tK={ap:1,nm:"media_object_request"},tX={ap:3,nm:"media_request"},tQ={ap:3,nm:"milestone"},tZ={ap:3,nm:"mute"},tJ={ap:3,nm:"pause"},t$={ap:3,nm:"play_btn"},t0={ap:3,nm:"playback_start"},t1={ap:3,nm:"playback_complete"},t2={ap:1,nm:"player_ready"},t3={ap:3,nm:"playing"},t5={ap:3,nm:"qualified_view"},t4={ap:1,nm:"quality_change_request"},t6={ap:3,nm:"rendition_change"},t8={ap:3,nm:"resize"},t7={ap:3,nm:"resume"},t9={ap:3,nm:"seek_start"},it={ap:3,nm:"seek_end"},ii={ap:3,nm:"stall_start"},ir={ap:3,nm:"stall_end"},io={ap:3,nm:"stop"},ia={ap:3,nm:"subtitle_change"},is={ap:3,nm:"unmute"},il={ap:3,nm:"volume_change"},ic=(tX.rtc=0,t0.rtc=1,tJ.rtc=2,tN.rtc=3,ii.rtc=4,t9.rtc=5,t6.rtc=6,tQ.rtc=7,tX.rta=8,t0.rta=9,tN.rta=10,ii.rta=11,tQ.rta=12,tH.rta=tO.rta=t1.rta=13,tM.rta=14,tR.rta=15,tW.rt=16,tN.rt=17,ii.rt=18,["event","metrics"]),iu={ap:N,nm:"bandwidth_kbps"},id={ap:N,nm:"buffer_duration_ms"},ih={ap:N,nm:"buffer_duration_ads_ms"},ip={ap:N,nm:"buffer_duration_content_ms"},im={ap:N,nm:"buffer_fill_percent"}
13,ig={ap:N,nm:"buffer_length_ms"},iv={ap:N,nm:"content_session_start_ts_ms"},iy={ap:3,nm:"current_audio_track"},ib={ap:N,nm:"current_subtitles"},iS={ap:T,nm:"engagement_duration_ms"},i_={ap:T,nm:"engagement_duration_ads_ms"},iE={ap:T,nm:"engagement_duration_content_ms"},iT={ap:tC,nm:"event_count"},iw={ap:N,nm:"num_ad_break_plays"},iA={ap:T,nm:"num_ad_plays"},iP={ap:T,nm:"num_content_plays"},iI={ap:T,nm:"num_errors"},iC={ap:T,nm:"num_errors_ads"},iM={ap:T,nm:"num_errors_content"},iR={ap:T,nm:"num_requests_content"},ik={ap:N,nm:"pause_duration_ms"},ix={ap:N,nm:"pause_duration_ads_ms"},iO={ap:N,nm:"pause_duration_content_ms"},iD={ap:N,nm:"playback_duration_ms"},iL={ap:N,nm:"playback_duration_ads_ms"},iN={ap:2,nm:"playback_duration_ad_session_ms"},iU={ap:N,nm:"playback_duration_content_ms"},iF={ap:N,nm:"playback_duration_promo_ms"},iB={ap:3,nm:"playback_rate"},iV={ap:N,nm:"player_state"},ij={ap:N,nm:"player_viewable"},iz={ap:N,nm:"player_viewable_percent"},iH={ap:3,nm:"playhead_position_sec"},iG={ap:N,nm:"playhead_pdt_sec"},iq={ap:3,nm:"rendition_audio_bitrate_kbps"},iW={ap:3,nm:"rendition_height"},iY={ap:3,nm:"rendition_name"},iK={ap:3,nm:"rendition_video_bitrate_kbps"},iX={ap:3,nm:"rendition_width"},iQ={ap:N,nm:"stall_count"},iZ={ap:N,nm:"stall_count_ads"},iJ={ap:N,nm:"stall_count_content"},i$={ap:N,nm:"stall_duration_ms"},i0={ap:N,nm:"stall_duration_ads_ms"},i1={ap:N,nm:"stall_duration_content_ms"},i2={ap:N,nm:"time_since_last_ad_break_start_ms"},i3={ap:N,nm:"time_since_last_ad_completed_ms"},i5={ap:N,nm:"time_since_last_buffer_start_ms"},i4={ap:N,nm:"time_since_last_buffer_start_ad_ms"},i6={ap:N,nm:"time_since_last_buffer_start_content_ms"},i8={ap:N,nm:"time_since_last_heartbeat_ms"},i7={ap:N,nm:"time_since_last_milestone_ad_ms"},i9={ap:N,nm:"time_since_last_milestone_content_ms"},ne={ap:N,nm:"time_since_last_pause_ms"},nt={ap:N,nm:"time_since_last_rendition_change_ms"},ni={ap:N,nm:"time_since_last_request_ad_ms"},nn={ap:N,nm:"time_since_last_seek_start_ms"},nr={ap:N,nm:"time_since_last_stall_start_ms"},no={ap:N,nm:"time_since_last_stall_start_ad_ms"},na={ap:N,nm:"time_since_last_stall_start_content_ms"},ns={ap:N,nm:"time_since_last_started_ad_ms"},nl={ap:N,nm:"time_since_request_content_ms"},nc={ap:N,nm:"time_since_started_content_ms"},nu={ap:N,nm:"volume_level_percent"},nd=(e9([id,ih,ip,ik,ix,iO,iD,iL,iU,iF,iQ,iZ,iJ,i$,i0,i1,iA,iI,iC,iM,iP,iR],"df",0),nl.ts=0,nc.ts=1,ne.ts=2,i6.ts=3,na.ts=4,nn.ts=5,nt.ts=6,i9.ts=7,ni.ts=8,ns.ts=9,i4.ts=10,no.ts=11,i7.ts=12,i2.ts=14,i3.ts=13,i8.ts=16,i5.ts=17,nr.ts=18,[]),nh=["event"],np=["event","attributes"],nf=["cmcd"],nm=["user_details"],ng=["player"],nv=["device"],ny=["video"],nb=["geo_location"],nS=["network"],n_=["page"],nE=["ad"],nT=["ops_metadata"],nw=["custom"],nA=["vendor"],nP={p:nd,ap:R,nm:"configuration_id"},nI={p:nd,ap:R,nm:"connector_list"},nC={p:nd,ap:R,nm:"customer_code"},nM={p:nd,ap:tC,nm:"event_id"},nR={p:nh,ap:tC,nm:"timestamp"},nk={p:nh,ap:tC,nm:"type"},nd={p:nf,ap:tC,nm:"bl"},nh={p:nf,ap:tC,nm:"br"},nx={p:nf,ap:tC,nm:"bs"},nO={p:nf,ap:tC,nm:"cid"},nD={p:nf,ap:tC,nm:"d"},nL={p:nf,ap:tC,nm:"dl"},nN={p:nf,ap:tC,nm:"mtp"},nU={p:nf,ap:tC,nm:"nor"},nF={p:nf,ap:tC,nm:"nrr"},nB={p:nf,ap:tC,nm:"ot"},nV={p:nf,ap:tC,nm:"pr"},nj={p:nf,ap:tC,nm:"rid"},nz={p:nf,ap:tC,nm:"rtp"},nH={p:nf,ap:tC,nm:"sf"},nG={p:nf,ap:tC,nm:"sid"},nq={p:nf,ap:tC,nm:"st"},nW={p:nf,ap:tC,nm:"su"},nY={p:nf,ap:tC,nm:"tb"},nf={p:nf,ap:tC,nm:"v"},nK={p:np,ap:tC,nm:"abs_shift"},nX={p:np,ap:tC,nm:"error_code"},nQ={p:np,ap:tC,nm:"error_msg"},nZ={p:np,ap:tC,nm:"inner_error"},nJ={p:np,ap:tC,nm:"heartbeat_count"},n$={p:np,ap:tC,nm:"milestone_percent"},n0={p:np,ap:tC,nm:"qualified_view_sec"},n1={p:np,ap:tC,nm:"seek_start_point_ms"},n2={p:np,ap:tC,nm:"seek_end_point_ms"},n3={p:np,ap:tC,nm:"startup_duration_content_ms"},n5={p:np,ap:tC,nm:"startup_duration_total_ms"},n4={p:nm,ap:T,nm:"app_session_id"},n6={p:nm,ap:T,nm:"app_session_start_ts_ms"},np={p:nm,ap:T,nm:"app_session_end_ts_ms"},n8={p:nm,ap:N,nm:"cast_app_session_id"},n7={p:nm,ap:N,nm:"cast_content_session_id"},n9={p:nm,ap:R,nm:"client_ip"},re={p:nm,ap:N,nm:"content_session_id"},nm={p:nm,ap:T,nm:"user_agent"},rt={p:ng,ap:N,nm:"autostart"},ri={p:ng,ap:N,nm:"casting"},rn={p:ng,ap:N,nm:"controls"},rr={p:ng,ap:N,nm:"default_muted"},ro={p:ng,ap:N,nm:"default_playback_rate"},ra={p:ng,ap:N,nm:"fullscreen"},rs={p:ng,ap:N,nm:"loop"},rl={p:ng,ap:N,nm:"muted"},rc={p:ng,ap:N,nm:"player_name"},ru={p:ng,ap:N,nm:"player_version"},rd={p:ng,ap:N,nm:"preload"},rh={p:ng,ap:N,nm:"ready_state"},rp={p:ng,ap:N,nm:"streaming_protocol"},rf={p:ng,ap:N,nm:"streaming_type"},rm={p:ng,ap:N,nm:"subtitles"},ng={p:nv,ap:T,nm:"advertising_id"},rg={p:nv,ap:T,nm:"browser_name"},rv={p:nv,ap:T,nm:"browser_height"},ry={p:nv,ap:T,nm:"browser_version"},rb={p:nv,ap:T,nm:"browser_width"},rS={p:nv,ap:T,nm:"cookies_enabled"},r_={p:nv,ap:R,nm:"device_id"},rE={p:nv,ap:T,nm:"device_mfg"},rT={p:nv,ap:T,nm:"device_name"},rw={p:nv,ap:T,nm:"device_type"},rA={p:nv,ap:T,nm:"orientation"},rP={p:nv,ap:T,nm:"os_name"},nv={p:nv,ap:T,nm:"os_version"},rI={p:ny,ap:N,nm:"asset_id"},rC={p:ny,ap:N,nm:"description"},rM={p:ny,ap:N,nm:"duration_sec"},rR={p:ny,ap:N,nm:"frame_rate"},rk={p:ny,ap:N,nm:"media_tags"},rx={p:ny,ap:3,nm:"media_type"},rO={p:ny,ap:N,nm:"player_height"},rD={p:ny,ap:N,nm:"player_width"},rL={p:ny,ap:N,nm:"source"},rN={p:ny,ap:N,nm:"title"},rU={p:nb,ap:R,nm:"city"},rF={p:nb,ap:R,nm:"country"},rB={p:nb,ap:R,nm:"country_code"},rV={p:nb,ap:R,nm:"latitude"},rj={p:nb,ap:R,nm:"longitude"},rz={p:nb,ap:R,nm:"postal_code"},rH={p:nb,ap:R,nm:"region"},rG={p:nb,ap:R,nm:"region_code"},rq={p:nb,ap:R,nm:"continent"},rW={p:nb,ap:R,nm:"continent_code"},ny={p:nb,ap:R,nm:"district"},rY={p:nb,ap:R,nm:"timezone_name"},rK={p:nb,ap:R,nm:"timezone_offset"},rX={p:nS,ap:R,nm:"asn"},nb={p:nS,ap:R,nm:"asn_org"},rQ={p:nS,ap:T,nm:"connection_type"},rZ={p:nS,ap:R,nm:"isp"},rJ={p:nS,ap:R,nm:"mobile_connection"},r$={p:nT,ap:tC,nm:"context_id"},r0={p:nT,ap:tC,nm:"context_name"},nS={p:nT,ap:T,nm:"dz_dictionary_version"},r1={p:nT,ap:tC,nm:"msg_send_client_ts_ms"},r2={p:nT,ap:tC,nm:"player_context_id"},r3={p:nT,ap:R,nm:"server_ts_offset_ms"},r5={p:n_,ap:T,nm:"collector_name"},r4={p:n_,ap:T,nm:"dz_sdk_version"},r6={p:n_,ap:T,nm:"page_title"},r8={p:n_,ap:T,nm:"page_url"},r7={p:n_,ap:T,nm:"referrer_url"},r9={p:n_,ap:T,nm:"site_domain"},oe={p:nE,ap:R,nm:"ad_blocker"},ot={p:nE,ap:N,nm:"ad_break_id"},oi={p:nE,ap:2,nm:"ad_click_url"},on={p:nE,ap:2,nm:"ad_creative_id"},or={p:nE,ap:2,nm:"ad_duration_sec"},oo={p:nE,ap:2,nm:"ad_id"},n_={p:nE,ap:2,nm:"ad_partner"},oa={p:nE,ap:N,nm:"ad_position"},os={p:nE,ap:2,nm:"ad_session_id"},ol={p:nE,ap:2,nm:"ad_system"},oc={p:nE,ap:2,nm:"ad_time_offset_sec"},R={p:nE,ap:T,nm:"ad_tracking_opt_out"},ou={p:nE,ap:2,nm:"advertiser_name"},od={p:nE,ap:2,nm:"deal_id"},oh={p:nE,ap:2,nm:"skip_time_offset_sec"},op={p:nE,ap:2,nm:"wrapper_creative_ids"},of={p:nE,ap:2,nm:"wrapper_id"},om={p:nE,ap:2,nm:"wrapper_systems"},T={p:["cdn"],ap:N,nm:"cdn"},og=(od.df="",e9([op,of,om],"df",[]),tb(function(e){return!!e},[oe,R,rt,nx,ri,rn,rS,rr,ra,rs,rJ,rl,nW,rm,ij]),tb(function(e){tp(e)||(e=[e]);for(var t=0;t<e.length;t++)e[t]=tm(e[t])||"";return e},[op,of,om]),tb(tm,[nK,ot,oi,on,oo,n_,oa,os,ol,ou,ng,n4,rX,nb,rI,rg,ry,n8,n7,T,nO,rU,n9,nP,nI,re,rq,rW,rF,rB,nC,od,rC,r_,rE,rT,rw,ny,r4,nX,nQ,nM,nZ,rZ,rx,nU,nF,rA,rP,nv,nB,r6,r8,r2,rc,ru,rz,rd,r7,rH,rG,nj,nH,nG,r9,rL,nq,rp,rf,rY,rN,nk,nm,iy,ib,iV,iY]),tb(tv(0,100),[im,iz,nu]),tb(tv(0,1e9,!0),[iu]),tb(tv(),[or,oc,np,n6,nd,nh,rv,rb,nD,ro,nL,rM,rR,nJ,rV,rj,n$,nN,rO,rD,nV,n0,rh,nz,n2,n1,r3,oh,n3,n5,nY,nR,rK,nf,ih,ip,id,ig,iv,i_,iE,iS,iT,iw,iA,iP,iI,iC,iM,iR,ix,iO,ik,iL,iN,iU,iD,iF,iB,iH,iq,iW,iK,iX,iQ,iZ,iJ,i0,i1,i$,i2,i3,i4,i6,i5,i8,i7,i9,ne,nt,ni,nn,no,na,nr,ns,nl,nc]),tb(0==(nE=5)?ty:(t_=g.pow(10,nE),function(e){return g.round(e*t_)/t_}),[or,oc,np,n6,nd,nh,rv,rb,nD,ro,nL,rM,rR,nJ,rV,rj,n$,nN,rO,rD,nV,n0,rh,nz,n2,n1,r3,oh,n3,n5,nY,nR,rK,nf,iu,ih,ip,id,im,ig,iv,i_,iE,iS,iT,iw,iA,iP,iI,iC,iM,iR,ix,iO,ik,iL,iN,iU,iD,iF,iB,iz,iH,iq,iW,iK,iX,iQ,iZ,iJ,i0,i1,i$,i2,i3,i4,i6,i5,i8,i7,i9,ne,nt,ni,nn,no,na,nr,ns,nl,nc,nu]),[tM,tR,tk,tx,tO,tD,tL,tN,tU,tF,tB,tV,tj,tz,tH,tG,tq,tW,tY,tK,tX,tQ,tZ,tJ,t$,t0,t1,t2,t3,t5,t4,t6,t8,t7,t9,it,ii,ir,io,ia,is,il]),ov=e8(og);function oy(e,t){return G+e+"_"+t}function ob(e,t){var i,n=e7(og),r={},o={};e?0<e.length?(e=td(i=a.tt&&K.beta_ev)?e.concat(i.split(".").map(function(e){return{name:e,media_types:["na"]}})):e).forEach(function(e){var t,i=e&&e.name;i&&n[i]?(e=e.media_types)&&0<e.length&&(r[i]=!0,"na"!=e[0])&&(t={},e.forEach(function(e){t[e]=!0}),o[i]=t):eL("Unknown event: "+i)}):t&&eL("This collector is not active. Configure it to a data pipe to start sending events."):r=o=null,og.forEach(function(e){e.on=!(r&&!r[e.nm]),e.mm=o&&o[e.nm]})}ob(),e9([iA,iI,iC,iM,iP,iR],"st",c);var oS=[iu,id,ih,ip,im,ig,iv,iy,ib,iS,i_,iE,iT,iw,iA,iP,iI,iC,iM,iR,ik,ix,iO,iD,iL,iN,iU,iF,iB,iV,ij,iz,iH,iG,
13iq,iW,iY,iK,iX,iQ,iZ,iJ,i$,i0,i1,i2,i3,i5,i4,i6,i8,i7,i9,ne,nt,ni,nn,nr,no,na,ns,nl,nc,nu],o_=[],oE=(oS.forEach(function(e){null!=e.ts&&o_.push(e)}),[]),oT=[];function ow(e){var t,i=e7(oS),n={};e?(e=td(t=a.tt&&K.beta_fd)?e.concat(t.split(".")):e).forEach(function(e){i[e]?n[e]=!0:eL("Unknown flux data: "+e)}):n=null,oE=[],oT=[],oS.forEach(function(e){e.on=!(n&&!n[e.nm]),e.on&&(e.ap==tC?oT:oE).push(e)})}ow(),e9([n4,n6],"st",c);var oA,oP,oI,oC,oM=[rc,ru,ng,rN,rI,rf,ri],oR={},ok=(oM.forEach(function(e){oR[e.nm.toUpperCase()]=z+e.nm}),[nP,nI,nC,nM,nR,nk,nd,nh,nx,nO,nD,nL,nN,nU,nF,nB,nV,nj,nz,nH,nG,nq,nW,nY,nf,nK,nX,nQ,nZ,nJ,n$,n0,n1,n2,n3,n5,n4,n6,np,n8,n7,n9,re,nm,rt,ri,rn,rr,ro,ra,rs,rl,rc,ru,rd,rh,rp,rf,rm,ng,rg,rv,ry,rb,rS,r_,rE,rT,rw,rA,rP,nv,rI,rC,rM,rR,rk,rx,rO,rD,rL,rN,rU,rF,rB,rV,rj,rz,rH,rG,rq,rW,ny,rY,rK,rX,nb,rQ,rZ,rJ,r$,r0,nS,r1,r2,r3,r5,r4,r6,r8,r7,r9,oe,ot,oi,on,or,oo,n_,oa,os,ol,oc,R,ou,od,oh,op,of,om,T]),ox=e8(ok),oO=ok.concat(oS),oD=[nM],oL=[],oN=[];function oU(e){var t,i=e7(ok),n={};oA=oP=oI=oC=!1,e?((e=td(t=a.tt&&K.beta_md)?e.concat(t.split(".")):e).forEach(function(e){i[e]?n[e]=!0:"custom_metadata_all"==e?oA=!0:"custom_events_all"==e?oP=!0:"vendor_metadata_all"==e?oI=!0:"vendor_events_all"==e?oC=!0:eL("Unknown metadata: "+e)}),oD.forEach(function(e){n[e.nm]=!0})):(n=null,oA=oP=oI=oC=!0),oL=[],oN=[],ok.forEach(function(e){e.on=!(n&&!n[e.nm]),e.on&&(e.ap==tC?oN:oL).push(e)})}oU();var oF="ad",oB=/^live$/i,oV="DASH",oj={"application/x-mpegURL":"HLS","application/dash+xml":oV,"application/vnd.ms-sstr+xm":"Smooth","video/x-flv":"Flash","video/mp4":"MP4","video/MP2T":"MPEG2-TS","video/3gpp":"3GPP","video/quicktime":"Quicktime","video/x-msvideo":"AVI","video/x-ms-wmv":"Windows Media"},N=[[/Opera\/([\d.]+)/,"Opera"],[/OPR\/([\d.]+)/,"Opera"],[/Edge\/([\d.]+)/,"Microsoft Edge"],[/Edg\/([\d.]+)/,"Microsoft Edge"],[/MSIE ([\d.]+)/,"Microsoft Internet Explorer"],[/Trident\/.*rv:([\d.]+)/,"Microsoft Internet Explorer"],[/Seamonkey\/([\d.]+)/,"Seamonkey"],[/Firefox\/([\d.]+)/,"Firefox"],[/Chromium\/([\d.]+)/,"Chromium"],[/Chrome\/([\d.]+)/,"Chrome"],[/Safari\/([\d.]+)/,"Safari"]],nE=[[/Windows 10\.0|Windows NT 10\.0/,"Windows 10"],[/Windows 8\.1|Windows NT 6\.3/,"Windows 8.1"],[/Windows 8|Windows NT 6\.2/,"Windows 8"],[/Windows 7|Windows NT 6\.1/,"Windows 7"],[/Windows NT 6\.0/,"Windows Vista"],[/Windows NT 5\.2/,"Windows Server 2003"],[/Windows NT 5\.1|Windows XP/,"Windows XP"],[/Windows NT 5\.0|Windows 2000/,"Windows 2000"],[/Win 9x 4\.90|Windows ME/,"Windows ME"],[/Windows 98|Win98/,"Windows 98"],[/Windows 95|Win95|Windows_95/,"Windows 95"],[/Windows NT 4\.0|WinNT4\.0|WinNT|Windows NT/,"Windows NT 4.0"],[/Windows CE/,"Windows CE"],[/Win16/,"Windows 3.11"],[/Tizen/,"Tizen"],[/Android/,"Android"],[/OpenBSD/,"Open BSD"],[/SunOS/,"Sun OS"],[/Linux|X11/,"Linux"],[/iPhone|iPad|iPod/,"iOS"],[/Mac OS X/,"Mac OS X"],[/MacPPC|MacIntel|Mac_PowerPC|Macintosh/,"Mac OS"],[/QNX/,"QNX"],[/UNIX/,"UNIX"],[/BeOS/,"BeOS"],[/OS\/2/,"OS/2"],[/nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver/,"Search Bot"]],tD=[[/SMART-TV|SmartTV|HbbTV|Tizen/i,"tv"],[/mobile/i,"mobile"],[/CrKey/i,"ott device"],[/iPad|Android|Touch/i,"tablet"],[/.*/,"pc"]],oz=["CMCD-Request","CMCD-Object","CMCD-Status","CMCD-Session"];function oH(e,t,i){t&&i.push(e)}function oG(e,t,i){i.push(e+"="+t)}function oq(e,t,i){i.push(e+(K.cmcd_ntq?"="+t:'="'+t+'"'))}function oW(e,t,i){i.push(e+'="'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"')}function oY(e){return"false"!==e}function oK(e){return+e}function oX(e){return e.replace(/"/g,"")}function oQ(e){return e.replace(/^"/,"").replace(/"$/,"").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}var oZ,oJ,o$={bl:[0,[oG,oK],nd],br:[1,[oG,oK],nh],bs:[2,[oH,oY],nx],cid:[3,[oW,oQ],nO],d:[1,[oG,oK],nD],dl:[0,[oG,oK],nL],mtp:[0,[oG,oK],nN],nor:[0,[oW,oQ],nU],nrr:[0,[oW,oQ],nF],ot:[1,[oq,oX],nB],pr:[3,[oG,oK],nV],rtp:[2,[oG,oK],nz],sf:[3,[oq,oX],nH],sid:[3,[oW,oQ],nG],st:[3,[oq,oX],nq],su:[0,[oH,oY],nW],tb:[1,[oG,oK],nY],v:[3,[oG,oK],nf]},o0={bs:!1,su:!1,v:1,pr:1},o1="org.svalabs-";function o2(e){for(var t,i,n=[[],[],[],[]],r=u.keys(e),o=0;o<r.length;o++)(i=o$[t=r[o]])&&i[3]&&i[1][0](t,e[t],n[i[0]]);return n}function o3(e){var t,i=u.keys(o$);for(oZ=!1,oJ="header"===(j.options.cmcdMode||K.cmcd_mode),t=0;t<i.length;t++)o$[i[t]][3]=!1;if(e&&tp(e)&&0<e.length)if(oZ=!0,"na"==e[0])for(t=0;t<i.length;t++)o$[i[t]][3]=!0;else e.forEach(function(e){var t=o$[e];t?t[3]=!0:eL("Unknown CMCD key: "+e)})}function o5(e,t,i){for(var n,r,o=u.keys(e),a=0;a<o.length;a++)delete e[o[a]];for(a=0;a<t.length;a++)(n=t[a]).ap&i&&null!=(r=null==(r=(r=n.st||n.se)&&tc(r,n.nm))?n.df:r)&&(e[n.nm]=r)}function o4(e,t,i,n){for(var r,o,a,s,l=0;l<n.length;l++)a=(o=(r=n[l])[0]).nm,o.ap&i?(s=t[a])&&s(r)||(e[a]=r[1],(s=o.st||o.on&&o.se)&&tl(s,a,r[1])):eL("Setting inapplicable data",o)}function o6(e,t){return e[t.nm]}function o8(e,t,i,n,r){var o,a=[];return i&&a.push([i,o=t(i)+n]),r&&a.push([r,t(r)+n]),e(a),o}function o7(e,t,i){if(t)for(var n,r,o=0;o<t.length;o++)if(r=e[n=t[o]])e=r;else{if(i)return null;e=e[n]={}}return e}function o9(e,t){return(e=o7(e,t.p||ic,!0))&&e[t.nm]}function ae(e,t,i,n){for(var r,o,a,s=0;s<t.length;s++)(r=t[s]).ap&i&&null!=(a=tS(e[o=r.nm],r.dv))&&(o7(n,r.p)[o]=a)}o$[o1+"rid"]=[0,[oW,oQ],nj],o$[o1+"tid"]=[0,[oW,oQ]],o$[o1+"cmi"]=[0,[oG,oK]],o$[o1+"pmi"]=[0,[oG,oK]],o3();var at,ai,an,ar,ao,aa,as,al,ac,au,ad,ah,ap,af,am,ag,av,ay,ab={},aS={},a_=tc(c,ey)||[],aE=[],aT=1,aw=2,aA=4,aP=4,aI=7,aC=0,aM=[];function aR(e){return null!=e?6e4*e:12e5}function ak(e,t){if(!aI&&0<a_.length){for(var i,n=eH(),r=0,o=0;o<a_.length;o++)a_[o].p&&(i=!0,ae(ab,oL,tA,a_[o].m)),r=g.max(r,n-a_[o].t);ah&&aV(a_,0,eZ(ex,n,r,i),e),t=!0}
13t&&(a_=[],tu(c,ey)),as=null}function ax(e){(aI&=~e)||null!=as||ak()}function aO(e,t,i,n,r,o,a,s,l){if(4==e.readyState){var c=eH(),u=e.status;if(t+=" status: "+u+", ",(0==u||429==u||500<=u&&u<=599)&&null!=(o=o[r++]))return x(function(){a.retry(eH()),i(n,r,a)},1e3*o),void eL(t+"retry #"+r+" after "+o+"s");a.log(c,u),!(u<200||299<u||s&&!s(e,c))||l&&l(t,u)||eL(t+"failed")}}function aD(e,t,i){ac=tr("POST",tt(a.sm),{"Content-Type":"application/json","cache-control":"no-cache"},e,function(n){4==n.readyState&&(ac=null,aO(n,"Sampling API",aD,e,t,a.rd,i,function(e){if(au=(e=ta(e.responseText))&&e[a.ss+"_sampling"])return ah=au.in_sample,ad=!1,ax(aw),tl(c,eb,au),!0},function(e){return ah=ad=!0,ax(aw),eL(e+"forced in"),!0}))})}function aL(){var e;!al||aI&aT||(a.sw&&a.sm?(a.sp,(e=ox[a.sd])&&(al.sampling_definition_params={namespace:a.ss,key_name:e.nm,key_value:az(e)}),(e=ox[a.sc])&&(al.sampling_criteria_params={sampling:{key_name:e.nm,key_value:az(e)}}),al.sampling_override=K.sampling_override||"NONE",al.sampling_request_id=tn(),aD(to(al),0,eZ(eR,eH()))):(ah=!0,ax(aw)),al=null)}function aN(e,t,i){var n,r;a.ci?(a.tt&&(a.mf=K.mock_config||a.mf),eU("Get config from "+(n=a.mf||te(tt("https://"+a.cf+"platform.datazoom.io/beacon/v2/config"),function(e){e.append(ee,a.ci)}))),r=eH(),tr("GET",n,null,null,function(n){aO(n,"Config API",aN,e,t,a.rd,i,function(t,i){var n=ta(t.responseText);if(n)return e(n,t.getResponseHeader("dz-extra"),r,i),!0},function(t,i){i<400||429==i||499<i||(a.om=!1),e()})})):(eL("Missing configuration ID"),a.om=!1,e())}function aU(){aN(function(e,t,i,n){a.st=null,e&&function e(t,i){tf(t)?u.keys(t).forEach(function(n){var r=t[n],o=i[n];tf(o)?e(r,o):null==o?eN("Unknown config key: "+n):null==r?eN("Undefined config key: "+n):o&&(a[o]=r)}):eL("Invalid config object",t)}(e,Z),tl(c,eS,a.st),a.st=aR(a.st),tl(c,e_,a.od),ob(a.ev,e),ow(a.fd),oU(a.md),o3(a.cd),a.og||(eK=[]),a.os||(ez=null),e5(a.cm,"sort"),e5(a.am,"sort"),e5(a.cq,"sort"),e5(a.aq,"sort"),aj([[nC,a.cc],[nI,a.cl]]),aE.forEach(function(e){var t,i,n,r,o,a=!1,s=o9(e.m,nk),l=ov[s];l?a=l.on:s.startsWith(H)?a=oP:s.startsWith(G)&&(a=oC),a&&(t=e.m,i={},oL.concat(oN).forEach(function(e){null!=(n=o9(t,e))&&(o7(i,e.p)[e.nm]=n)}),r=o7(t,ic),o=o7(i,ic),oE.concat(oT).forEach(function(e){null!=(n=o9(r,e))&&(o[e.nm]=n)}),oA&&(n=o7(t,nw,!0))&&u.assign(o7(i,nw),n),oI&&(n=o7(t,nA,!0))&&u.assign(o7(i,nA),n),aF(i,o),e.m=i,a_.push(e))}),tl(c,ey,a_),aE=[];var r,e=r_.nm,e=(r_.on?(r=tc(l,e))||(r=tn(),tl(l,e,r)):tu(l,e),aj([[r_,r]]),t);try{var o,s,d,h,p,f=e&&ta(atob(e));f?(o=f.latitude,s=f.longitude,d=f.timezone_offset,p=(h=f.time_sync)&&+h,aj([[n9,f.client_ip],[rJ,f.mobile_connection],[rX,f.asn],[rG,f.region_code],[rH,f.region],[rB,f.country_code],[rF,f.country],[rz,f.postal_code],[rU,f.city],[rV,o?+o:null],[rj,s?+s:null],[rq,f.continent],[rW,f.continent_code],[rY,f.timezone_name],[rK,null!=d?d/3600:null]]),p&&aj([[r3,g.round(p-(i+n)/2)]])):eL("Missing or invalid dz-extra header")}catch(e){eB(e,"processDzExtra")}a.ab&&oe.on&&null==az(oe)?tr("GET",tt(a.ab),null,null,function(e){4==e.readyState&&(aj([[oe,!e.status]]),ax(aA))}):ax(aA),ax(aT),aL(),x(function(){ax(aP),aL()},a.mh),u.keys(a2).forEach(function(e){(e=a2[e].configCallback)&&e(a)})},0,eZ(ek,eH()))}function aF(e,t){var i=""+(ao+1e7);o7(e,nM.p)[nM.nm]=an+"_"+i.substr(-7,2)+"."+i.substr(-5),tl(c,em,++ao),iT.on&&(t[iT.nm]=ao)}function aB(e,t,i,n,r,o,s){var l,d,h,p,f,s=s?tE:tw,m=o7(e,ic);for(ae(ab,oL,s,e),ae(ab,oE,s,m),(n=n||[]).push([nk,t],[nR,i]),l=0;l<n.length;l++)d=(h=n[l])[0],h[2]||d.ap&tT?d.on&&null!=(h=tS(h[1],d.dv))&&(o7(e,d.p)[d.nm]=h):eL("Invalid event data",d);oA&&(s=e1(at,r),t=e,f=(r=to(s))?r.length:0,(p=a.ml)&&p<f?eL("Custom metadata size: "+f+" > "+p):2<f&&(s=ta(r))&&u.assign(o7(t,nw),s)),oI&&(p=e3(ai,o),f=e,p)&&u.assign(o7(f,nA),p),Q&&ej("evInfo",e),!(eu<es)&&a.le&&a.le(e)||(r={p:aI,m:e,t:i},aI&aT?aE.push(r):(aF(e,m),a_.push(r),tl(c,ey,a_),null==as&&(as=x(ak,a.bd))))}function aV(e,t,i,n){var r,o=e.map(function(e){return e.m}),s=(o.forEach(function(e,t){var i,n=o7(e,nT);r1.on&&(o7(e,r1.p)[r1.nm]=eH()),au&&(n[a.ss+"_sampling"]=au),null!=ad&&(n[a.ss+"_forced_sampling_in"]=ad),t||(r=n[eE],ez&&(u.keys(ez).forEach(e$),ez=null),eK.length&&(r=r?r.concat(eK):eK,eK=[],r.length>a.mc&&(r.sort(function(e,t){return e.batch()>t.batch()?1:-1}),i=r[r.length-a.mc-1].batch(),r=r.filter(function(e){return e.batch()>i})),n[eE]=r))}),tt(a.mb)),o=to(o);n&&A.sendBeacon&&A.sendBeacon(s,o)||tr("POST",s,{"Content-Type":"application/json"},o,function(n){aO(n,"Message post",aV,e,t,a.rd,i,null,function(t,i){e.forEach(function(e){eJ(e,i)}),r&&(eK=r.concat(eK))})})}function aj(e){o4(ab,aS,tE,e)}function az(e){return ab[e.nm]}function aH(t){var i,n;
13if(s0&&(s0=!1,aq(tz,t)),!an||!ar||(i=t,n=a.st,i<aa&&eL("Activity time reversal: "+aa+" -> "+i),0<=n&&(i<aa||aa+n<=i))){if(ak((aE=[],!1),!0),n=t,i=aM[aC],an=tn(),ar=aa=n,aj([[n4,an],[n6,ar],[iA,ao=0],[iI,0],[iC,0],[iM,0],[iP,0],[iR,0]]),tl(c,em,ao),tl(c,eg,aa),tu(c,eb),ac&&ac.abort(),ac=au=null,ah=ad=null,aI|=aw,al={},aL(),W(i))try{i()}catch(e){eB(e,"onAppSessionStart")}}else tl(c,eg,aa=t);aj([[iS,t-ar],[rb,e.outerWidth],[rv,e.outerHeight],[r6,E.title],[r8,w.href],[r7,E.referrer],[r9,w.hostname],[rS,A.cookieEnabled]])}function aG(e,t,i){o8(aj,az,e,t,i)}function aq(e,t,i,n,r){e.ap&tE?(aH(t),e.on&&aB({},e.nm,t,i,n,r,!0)):eL("Event inapplicable: "+e.nm+", ss",e)}function aW(e,t){var i,n;e&&oM.forEach(function(r){null!=(n=e[i=z+r.nm])&&(t([[r,n]]),delete e[i])})}if(o5(ab,oO,tE),an=az(n4),ar=az(n6),ao=tc(c,em)||0,aa=tc(c,eg)||0,au=tc(c,eb),at=tc(c,ev),ai=tc(c,"__ss_vendor_md"),a.st=aR(tc(c,eS)),a.od=tc(c,e_),au?(ah=au.in_sample,ad=!1,ax(aw)):al={},N.some(function(e){if(ay=e[0].exec(P))return ap=e[1],af=ay[1],!0})||(ay=/(\w+)\/([\d.]+)(?!.*\w+\/[\d.]+)/.exec(P))&&(ap=ay[1],af=ay[2]),(ay=/Version\/([\d.]+)/.exec(P))&&(af=ay[1]),nE.some(function(e){if(e[0].test(P))return am=e[1],!0})){switch(ay=null,am){case"Mac OS X":ay=/Mac OS X (10[\d._]+)/.exec(P);break;case"Android":ay=/Android ([\d._]+)/.exec(P);break;case"iOS":ay=/OS (\d+_\d+(_\d+)?)/.exec(P);break;case"Tizen":ay=/Tizen[ \/]([\d._]+)/.exec(P);break;default:(ay=/Windows (.*)/.exec(am))&&(am="Windows")}ay&&(ag=ay[1].replace(/_/g,"."))}else am=ag="-";tD.some(function(e){if(e[0].test(P))return av=e[1],!0}),aj([[nm,P],[rg,ap],[ry,af],[rP,am],[nv,ag],[rw,av],[r5,a.cn],[r4,a.sv],[nS,3]]);var aY="adapterID",aK="adapterOptions",aX="baseContext",aQ="contextType",aZ="contextName",aJ="metadata",a$=0,a0=2,a1=["base","player","app"],a2={},a3=[];function a5(e){if(!e.destroyed){e.setTimer(null);try{var t=e.destroyCallback;t&&t()}catch(e){eB(e,"onDestroy")}delete a2[e.id],e.removeListeners(),e.destroyed=!0}}function a4(e,t,i,n,r,o,a){(r=r||[]).push([r$,e.id],[r0,e.name]),aB(t,i,n,r,e1(e.customMetadata,o),e3(e.vendorMetadata,a))}function a6(e,t){return!(null!=t&&!tf(t)||(e.customMetadata=ta(to(t)),0))}function a8(e){var t=e0(ab);return t._c_=e1(at,e.customMetadata),t._v_=e3(ai,e.vendorMetadata),t}function a7(){var e,t=[],i={},n={id:tn(),type:a$,destroyed:!1,destroyCallback:null,configCallback:null,customMetadata:null,vendorMetadata:null,shallBlock:function(e,t,i){if(n.destroyed)return eL(e+" after destroyed"+(t?": "+t:""),i),!0},onDestroy:function(e){n.destroyCallback=e},onConfig:function(e){n.configCallback=e},setTimer:function(t){var i;e&&(0<=(i=a3.indexOf(e))&&a3.splice(i,1),e=null),t&&(a3.push(t),e=t)},fireEvent:function(e,t,i,r,o){n.shallBlock("fireEvent",e.nm,e)||(aH(t),e.on&&a4(n,{},e.nm,t,i,r,o))},fireVendorEvent:function(e,t,i){n.fireEvent({ap:tP,nm:oy(e,t),on:oC},eH(),null,null,e2(e,i))},addListener:function(e,i,n,r,o){if(e&&i){var a,s,l=e[r=r||"addEventListener"];if(W(l)){s=e4(e,n,a="listener: "+(a=i));var c=eu<el?s:function(){eF(a,arguments),s.apply(null,arguments)};try{"-"===i?l.call(e,c):l.call(e,i,c),t.push([e,i,n,c,o||"removeEventListener"])}catch(e){eB(e,"addListener: "+i)}}else eL("Invalid add-listener method: "+r,e)}},removeListeners:function(e,i,n){t=t.filter(function(t){var r=t[0],o=t[1];if(e&&e!=r||i&&i!=o||n&&n!=t[2])return!0;var a=r&&r[t[4]];if(W(a))try{"-"===o?a.call(r,t[3]):a.call(r,o,t[3])}catch{}else eL("Invalid remove-listener method: "+t[4],r)})},stash:function(e,t,n){i[e]=[t,n]},unstash:function(e){e.forEach(function(e){var t=i[e];if(t){delete i[e];try{t[0].apply(null,t[1])}catch(t){eB(t,"unstash: "+e)}}})}},r={getError:function(){return null},contextID:function(){return n.id},contextName:function(){return n.name},contextType:function(){return a1[n.type]},isDestroyed:function(){return n.destroyed},destroy:function(){a5(n)},setMetadata:function(e){return a6(n,e)},getMetadata:function(){return ta(to(n.customMetadata))},generateEvent:function(e,t){n.fireEvent({ap:tP,nm:H+e,on:oP},eH(),null,t)},dumpDzData:function(e){var t=ta(to(a8(n)));return null==e?t:t[e]}};return n.basePublicMethods=r,n.publicContext=e0(r),a2[n.id]=n}function a9(e,t){var i,n;return null==e?n=a7():(n=(i=tf(e)&&W(e.contextID)&&e.contextID())&&td(i)&&a2[i])&&n.type===a$&&n.publicContext===e||(eL("Invalid contextOptions."+aX,e),n=a7()),null!=t&&(n.name=t),n}function se(e){return a.sn&&a.sn[e]||""+e}var st,si,sn,sr,so=[],sa="idle",ss=(so[2]=so[9]="buffering",so[3]=so[10]="playing",so[4]=so[11]="paused",so[5]=so[12]="seeking",so[6]="ended",so[0]=so[7]=so[8]=sa,function(t,i,n){var r,o,s,l,c,d,h,f,m={},v={},y={},b={},S={},T={},w=[],A=[],P=[],C=[],M=[],R=[],k=[],x=[],O=tn(),D=a9(n[aX],n[aZ]),L=sZ(n[aY],1),N=n[aK];function U(){if(s){for(var e,t=u.keys(s),i=eH(),n=0;n<t.length;n++)eZ((e=s[t[n]]).ev,i,e.dl);s=null}}function F(e,t,i){(s=s||{})[i||e.nm]={ev:e,dl:t}}function B(e){o4(m,v,1,e)}function V(e){o4(y,b,2,e)}function z(e,t){return o6(t?y:m,e)}function H(e){return y[e.nm]}function G(){var e=z(rc),t=z(ru);o5(m,oO,1),B([[rx,"content"],[rc,e],[ru,t]])}function q(){o5(y,oO,2),V([[rx,"ad"]])}function Y(e,t){v[e.nm]=t}function K(e,t){b[e.nm]=t}function X(e,t){T[e.nm]=t}function Z(e,t,i,n){for(var r=[],o=0;o<t.length;o++)r[t[o]]=!0;k[e]={tr:r,en:i,ex:n}}N=tf(N)?e0(N):{},L&&(d=L[2],h=L[3],u.assign(N,L[4]||{}
13),l=N[sK],c=N[sX],(N[sY]||[]).forEach(function(e){S[e[0].nm]=e[1]})),t&&u.keys(a2).some(function(e){if(1==(e=a2[e]).type&&e.player===t)return e.publicContext.destroy(),!0});var J,$,ee,et,en,er,eo,ea,es,el,ec,eu,ed,eh,ep,ef,em,eg,ev,ey,eb,eS,e_,eE,eT,ew,eA,eP,eI,eC,eM,eR,ek=0,ex=sa,eO=1,eF=eH(),ez=eV(eL,"Abnormal duration increment: ",1,1e3,3e5);function eG(){return 2==eO}function eq(){return!!eh&&eh.type===oF}function eW(e){es=e+a.hi,eU("Heartbeats started")}function eY(){es&&eU("Heartbeats stopped"),es=0}function eK(e,t,i){return o8(B,z,e,t,i)}function eX(e){var t=e-eF;t<0||t>a.ed?ez.log(t):0<t&&(4==ek?eK(iO,t,ik):11==ek?eK(ix,t,ik):2==ek?($&&eK(i1,t,i$),eK(ip,t,id)):9==ek&&($&&eK(i0,t,i$),eK(ih,t,id))),eF=e}function eQ(e,t){null!=e&&(x[e]=t)}function eZ(e,t,i,n,r,o){if(!D.shallBlock("fireEvent",e.nm,e))if(o=o||(eq()?2:eO),(e.ap&o)!=0){if(aH(t),(i=i||[]).push([r2,D.id]),eR||(eR=!0,(l=P.some(function(n){try{return n(t,i,e,o)}catch(e){eB(e,"extEventHandler")}}))||(l=(c=T&&T[e.nm])&&c(t,i,e,o)),eR=!1),!l){eX(t);for(var a,s,l,c,u=[[iV,ex]],d=0;d<o_.length;d++)s=x[(a=o_[d]).ts],u.push([a,s?t-s:0]);B(u),null==z(iu)&&I&&(c=I.downlink)&&B([[iu,1e3*c]]),eQ(e.rt,t),eQ(2==o?e.rta:e.rtc,t),e.on&&(!e.mm||e.mm[z(rx,2==o)])&&(c=o7(l={},ic),2==o?(ae(y,oL,2,l),ae(y,oE,2,c),ae(m,oL,tw,l),ae(m,oE,tw,c)):(ae(m,oL,1,l),ae(m,oE,1,c),ae(y,oL,tw,l),ae(y,oE,tw,c)),a4(D,l,e.nm,t,i,n,r))}}else eL("Event inapplicable: "+e.nm+", "+o,e)}function eJ(e){var t=e[1];t&&t!=z(e[0])&&F(tV)}function e$(e,t){var i=3==t?eb:eS;if(e!=i){var n,r,o,s,u,d,h,p,f=eH();if(es||eW(f),el=!0,3==t){if(u=l||a.mp,eb=e,o=f-e_,e_=f,n=z(rM),eu){var m,g=eh;if(null==ef&&0<n&&(ef=((m=eu.locate(n)).type?m.start:n)-m._e),n=ef,ep&&i>=ep.start&&i<=ep.end||(ep=eu.locate(i)),(eh=eh&&e>=eh.start&&e<=eh.end?eh:eu.locate(e))&&(d=eh.type,h=eh.start,p=eh._d),eh!=g&&(m=eM<=e&&e<eM+u,d===oF?eC!==h&&p&&((null==eC?e5:(m&&eZ(t1,f),e7))(f),eC=h,eM=eh.end,e6(),V(p.concat([[or,eM-eC]])),e8(f,eh._a),eZ(tx,f,null,null,null,2),eS=0,eE=f):null!=eC&&(m&&eZ(t1,f,null,null,null,2),e7(),e4(f))),d===oF)return void(p&&(e$(g=e-h,10),y[iH.nm]=g))}ea||(r=em=!em&&a.cm?a.cm.slice():em)}else u=c||a.mp,eS=e,o=f-eE,eE=f,n=H(or),r=eg=!eg&&a.am?a.am.slice():eg;if(null!=i&&null!=e&&0<=i&&i<e&&e<=i+u){if(0<n&&r)for(var v,b,S=0,_=3==t&&ep&&eh?(b=((ep.type?ep.start:i)-ep._e)/n,((d?h:e)-eh._e)/n):(b=i/n,e/n);
13S<r.length&&!(_<(v=r[S]/100));)b<v?(r.splice(S,1),F(tQ,[[n$,100*v]],tQ.nm+v)):S++;if(3==t){if(eA=e,o<0||o>a.ed)ez.log(o);else if(0<o){if(d)eK("promo"===d?iF:null,o,iD);else if(n=eK(iU,o,iD)/1e3,a.cq)for(ev=ev||a.cq.slice();null!=(s=ev[0])&&s<=n;)ev.shift(),F(t5,[[n0,s]],t5.nm+s)}}else if(eP=e,o<0||o>a.ed)ez.log(o);else if(0<o&&(eK(iL,o,iD),n=o8(V,H,iN,o)/1e3,a.aq))for(ey=ey||a.aq.slice();null!=(s=ey[0])&&s<=n;)ey.shift(),F(t5,[[n0,s]],t5.nm+s)}}}function e1(e,t){null==eT&&null!=e&&null!=eA&&e!=eA&&(eT=eA,eZ(t9,t||eH()))}function e2(e,t){null==ew&&null!=e&&null!=eP&&e!=eP&&(ew=eP,eZ(t9,t||eH()))}function e3(e){J&&eZ(io,e),J=ee=!1,eO=1,eT=eA=null,eY()}function e5(e){var t,i,n="pre";z(iU)>1e3*a.ep&&(t=z(iH),i=z(rM),n=null!=t&&null!=i&&t+a.ep>i?"post":"mid"),et=er=eo=!1,q(),B([[ot,tn()],[oa,n],[iw,0]]),eZ(tM,e)}function e4(e){eI+=e-x[14],eZ(tR,e,null,null,null,2),B([[ot,null],[oa,null],[iw,null]])}function e6(){eo||(eo=!0,V([[os,o||tn()],[iN,0]]),o=null)}function e8(e,t){var i=aM[3];if(et=!0,eg=ey=null,aG(iA,1),eK(iw,1),W(i))try{i(r,t)}catch(e){eB(e,"onAdStart")}eZ(t0,e)}function e7(){if(et){var e=aM[4];if(W(e))try{e(r)}catch(e){eB(e,"onAdEnd")}}et=er=eo=!1,ew=eP=eC=eM=null,q()}function e9(e,t,i,n){var r,o,a,s;e!=ek&&(a=k[ek],r=se(ek)+" => "+se(e),o=so[e]||ex,D.shallBlock("setState",r)||(a.tr[e]?(eU("state: "+r+" ("+o+")"),(a=a.ex)&&a(t,e,i,n),eX(t),s=ek,ex=o,(a=k[ek=e].en)&&a(t,s,i,n),el=!0):eL("Invalid transition: "+r)))}function tt(e){return e!=ek&&!!k[ek].tr[e]}function ti(){return 0==ek||7==ek||8==ek}function tr(e,t,i){return function(n){var r,o,a,s,l;r=e,o=t,a=i,l=n[0],n=n[1]=tS(n[1],l.dv),l=z(l,a),null!=a&&a!=eG()||null==l||null==n||(o?!n!=!l&&F(n?r:o):n!=l&&F(r,s=r==t6?l<n?[[nK,"up"]]:n<l?[[nK,"down"]]:null:s))}}function ts(e){e[1]=tS(e[1],e[0].dv)}Z(0,[1,8]),Z(1,[2,7,8,16],function(e){var t=aM[1];if(e3(e),en=!1,J=!0,ea=oB.test(z(rf)),eI=0,B([[re,O],[iv,e]]),O=tn(),aG(iR,1),f&&f(),W(t))try{t(r)}catch(e){eB(e,"onContentSessionStart")}eu=ed,ed=eh=ep=ef=null,eC=eM=null,ec=0,eZ(tX,e)}),Z(2,[3,4,5,7,8,16],function(e,t){($=3==t)&&(eK(iJ,1,iQ),eZ(ii,e)),eZ(tN,e)},function(e){eZ(tU,e),$&&eZ(ir,e),$=!1,ee||eZ(tY,e)}),Z(3,[2,4,5,6,7,8,16],function(e){var t;ee||(t=e-x[0],ee=!0,em=ev=null,aG(iP,1),eZ(t0,e,[[n3,t-eI],[n5,t]])),eb=eA=z(iH),e_=e,null!=eT&&(eZ(it,e,[[n1,1e3*eT],[n2,null!=eb?1e3*eb:null]]),eT=null),eZ(t3,e),en&&(en=!1,eZ(t7,e)),es||eW(e)},function(){eb=null}),Z(4,[2,3,5,6,7,8,16],function(e){en||(en=!0,eZ(tJ,e))}),Z(5,[2,3,4,6,7,8,16],function(e){e1(z(iH),e)}),Z(6,[2,3,4,5,7,8,16],function(e){eZ(t1,e)}),Z(7,[],function(e){e3(e)}),Z(8,[],function(e,t,i){eZ(tH,e,i),e3(e)}),Z(9,[10,11,12,14,15,7],function(e,t){e6(),($=10==t)&&(eK(iZ,1,iQ),eZ(ii,e)),eZ(tN,e)},function(e){eZ(tU,e),$&&eZ(ir,e),$=!1}),Z(10,[9,11,12,13,14,15,7],function(e,t,i,n){e6(),et||e8(e,n),eS=eP=H(iH),eE=e,null!=ew&&(eZ(it,e,[[n1,1e3*ew],[n2,null!=eS?1e3*eS:null]]),ew=null),eZ(t3,e),er&&(er=!1,eZ(t7,e)),es||eW(e)},function(){eS=null}),Z(11,[9,10,12,14,15,7],function(e){er||(er=!0,eZ(tJ,e))}),Z(12,[9,10,11,13,14,15,7],function(e){e2(H(iH),e)}),Z(13,[9,10,17,7],function(e){eZ(t1,e),e7()}),Z(14,[9,10,17,7],function(e){eZ(tO,e),e7()}),Z(15,[9,10,17,7],function(e,t,i){eZ(tH,e,i),e7()}),Z(16,[9,10,15,17,7],function(e){eO=2,e5(e)}),Z(17,[2,3,4,5,6,7],function(e){e4(e),eO=1});var tl,tc=iK,tu=iK;function td(e){var t=[],i=0,n=0;return t.locate=function(e){return t.find(function(t){return e>=t.start&&e<=t.end})},e.forEach(function(e){var r=e.start,o=e.end;th(r)&&th(o)&&(r=r<i?i:r)<o?(i<r&&t.push({start:i,end:r,_e:n}),t.push(u.assign({},e,{start:r,_e:n})),e.type&&(n+=o-r),i=o):eL("Skipped time span",e)}),t.push({start:i,end:p.MAX_VALUE,_e:n}),t}function tm(e,t){(e=e&&e({type:ei,ack:t,appSID:az(n4),ctSID:z(re)}))&&e.catch(function(e){eN("Cast transfer message rejected",e)})}function tg(e){var t,i=D.publicContext,r=null;D.player=e,u.assign(i,D.basePublicMethods,{getError:function(){return r},getPlayer:function(){return e},adapterID:function(){return L?L[0]:null},contentSessionID:function(){return z(re)},nextContentSessionID:function(){return O},playerState:function(){return ex},destroy:function(){if(!D.destroyed){tt(7)&&e9(7,eH());for(var e=0;e<A.length;e++)try{A[e]()}catch(e){eB(e,"extOnDestroy")}a5(D)}},startContentSession:function(){return!!ti()&&(D.reset(),D.setState(1),D.setState(2),!0)}
13,setMetadata:function(e){return!!a6(D,e)&&(aW(D.customMetadata,D.setData),!0)},annotateContentSession:function(e){return null==e?(ed=null,!0):!!tp(e)&&(ed=td(e.slice().sort(function(e,t){return e.start>t.start?1:-1})),!0)},dumpDzData:function(e){var t=u.assign(a8(D),m,y),i=rx.nm;return t[i]=(eG()||eq()?y:m)[i],t=ta(to(t)),null==e?t:t[e]}}),sc.forEach(function(e){try{e(i,D,w,A,P,C,M,R)}catch(e){eB(e,"extInit")}});try{r=L?d?d(e,D,N):null:"Missing adapter"}catch(e){r=eB(e,L[0]+" initContext")}return r?(eD(r),i.destroy()):(null!=(t=n[aJ])&&i.setMetadata(t),eZ(tj,t=eH()),eZ(t2,t),D.setTimer(function(){for(var e=0;e<w.length;e++)try{w[e]()}catch(e){eB(e,"extOnTimer")}if(tl)try{tl()}catch(e){eB(e,"onTimer")}var t=eH();eX(t),es&&es<=t&&(el?(eZ(tW,t,[[nJ,++ec]]),es=t+a.hi,el=!1):eY())})),i}return 1&(S[tc.nm]||0)&&(tc=iW),2&(S[tu.nm]||0)&&(tu=iW),Y(rM,ts),K(or,ts),Y(rp,function(e){var t=e[1];e[1]=t&&oj[t]||t}),Y(rf,function(e){ea=oB.test(e[1])}),Y(iH,function(e){for(var t=0;t<C.length;t++)try{C[t](e)}catch(e){eB(e,"extPlayheadHandler")}5==ek||2==ek?e1(e[1]):3==ek&&e$(e[1],3)}),K(iH,function(e){12==ek?e2(e[1]):10==ek&&e$(e[1],10)}),Y(tc,tr(t6,null,!1)),K(tu,tr(t6,null,!0)),Y(rl,tr(tZ,is)),Y(ra,tr(tq,tG)),Y(ri,tr(tF,tB)),Y(rD,tr(t8)),Y(rO,tr(t8)),Y(nu,tr(il)),Y(iy,tr(tL,null,!1)),K(iy,tr(tL,null,!0)),Y(ib,tr(ia)),Y(rm,tr(ia)),Y(n8,eJ),Y(n7,eJ),Y(iz,function(t){var i,n,r,o,a=t[1];a=a&&W(a.getBoundingClientRect)?"visible"==E.visibilityState?(i=(o=a.getBoundingClientRect()).left,n=o.right,r=o.top,o=o.bottom,g.min(100,g.max(0,g.round(100*(g.min(n,e.innerWidth)-g.max(i,0))*(g.min(o,e.innerHeight)-g.max(r,0))/((n-i)*(o-r)))))):0:tS(a,iz.dv),null!=(t[1]=a)&&B([[ij,50<=a]])}),Y(ig,function(e){var t=e[1];if(t&&W(t.end)){var i,n,r=z(iH);if(null!=r){for(i=0;i<t.length;i++)if(n=t.end(i),r>=t.start(i)&&r<=n)return void(e[1]=1e3*(n-r))}e[1]=0}}),X(tY,function(e,t,i,n){2==n&&(o=tn(),t.push([os,o,!0]))}),X(tx,function(e,t){o&&t.push([os,o,!0])}),X(tH,function(e,t,i,n){aG(1==n?iM:iC,1,iI)}),G(),q(),u.assign(D,{type:1,fireEvent:eZ,fire:function(e,t,i){eZ(e,eH(),t,null,null,i)},setState:function(e,t,i){e9(e,eH(),t,i)},canSetState:tt,reset:function(){tt(7)&&e9(7,eH()),G(),q(),x=[],ek=0,ex=sa},setData:function(e){B(e),U()},setAdData:function(e){V(e),U()},getData:z,getAdData:H,getState:function(){return ek},isIdle:ti,isAdIdle:function(){return 13==ek||14==ek||15==ek},isInAds:eG,isInSsaiAds:eq,onTimer:function(e){tl=e},onCtSessionStart:function(e){f=e},matchCtSource:function(e){return z(rL)==e},reqCtSID:function(){return ti()?O:z(re)},reqTracer:function(e,t){e=te(e,function(e){e.delete("CMCD")});var i,n=D.reqCtSID(),r=tn(),o=((t=u.assign({},t||{},{sid:n}
13))[o1+"rid"]=r,1==t.v&&delete t.v,1==t.pr&&delete t.pr,null==t.cid&&null!=(i=z(rI))&&(t.cid=i),{url:e,sid:n,rid:r,cmcd:t,start:eH()});return{reqID:r,urlBase:e,url:function(){var i=o2(t);return te(e,function(e){e.append("CMCD",i[0].concat(i[1],i[2],i[3]).sort().join())})},headers:function(){for(var e={},i=o2(t),n=0;n<4;n++)i[n].length&&(e[oz[n]]=i[n].sort().join());return e},enabledData:function(){for(var e,i,n=u.keys(t),r={},o=0;o<n.length;o++)(i=o$[e=n[o]])&&i[3]&&(r[e]=t[e]);return r},status:function(e){o.status=e},start:function(){o.start=eH()},resp:function(e){o.resp=null!=e?o.start+e:eH(),Q&&ej("reqInfo",o)},end:function(e){var i=eH(),n=(o.end=null!=e?o.start+e:i,u.assign({},o0,t)),r=[];u.keys(n).forEach(function(e){var t=o$[e];t&&t[2]&&r.push([t[2],n[e]])}),eZ(tK,i,r,null,null,1),Q&&ej("reqInfo",o)}}},updateTimedMetadata:function(e,t,i,n,r){for(var o=0;o<M.length;o++)try{M[o](e,t,i,n,r)}catch(e){eB(e,"extTimedMetadataHandler")}},addCtTimeSpans:function(e){var t=eu?eu.filter(function(e){return e.type}):[];e.forEach(function(e){for(var i,n,r,o,a=e.start,s=e.end,l=0;l<t.length&&(r=(n=t[l]).start,o=n.end,!(s<=r));l++)a<o&&(r<a?(t.splice(l+1,0,u.assign({},n,{start:a})),n.end=a):(i||(t.splice(l++,0,e),i=!0),s<o?n.start=s:t.splice(l--,1)));i||t.splice(l,0,e)}),eu=td(t),eh=ep=ef=null},initCastTransfer:function(e){ti()||tm(e,!1)},handleCastMessage:function(e,t){!e||e.type!==ei||ti()||(D.setData([[n8,e.appSID],[n7,e.ctSID]]),e.ack)||tm(t,!0)},sa:{}}),L&&B([[rc,L[1]]]),aI&aT&&o3((tc=j.options).cmcdEnable?tc.cmcdKeys||["sid","org.svalabs-rid"]:null),i?h?new _(function(e,t){try{h(i,D,N).then(function(t){r=tg(t),e(r)},function(e){eD(e),t(e)})}catch(e){t(eB(e,L[0]+" createTargetObject"))}}):_.reject("Not implemented"):r=tg(t)}),sl=function(e,t){var i=new(e||r),n=(t=t||o,{});function a(){return{currentTime:i.currentTime}}function s(){return{getAdId:function(){return n.adId},getAdSystem:function(){return n.adSystem},getAdvertiserName:function(){return n.advertiserName},getCreativeId:function(){return n.creativeId},getDealId:function(){return n.dealId},getDuration:function(){return n.duration},getSkipTimeOffset:function(){return n.skipTimeOffset},getVastMediaBitrate:function(){return n.vastMediaBitrate},getVastMediaWidth:function(){return n.vastMediaWidth},getVastMediaHeight:function(){return n.vastMediaHeight},getWrapperAdIds:function(){return n.wrapperAdIds},getWrapperAdSystems:function(){return n.wrapperAdSystems},getWrapperCreativeIds:function(){return n.wrapperCreativeIds},getAdPodInfo:function(){return{getPodIndex:function(){return n.adPodIndex},getTimeOffset:function(){return n.adTimeOffset}}},h:{clickThroughUrl:n.clickThroughUrl}}}return i.dispatch=function(e,r,o){var l,c;o=o||{},r&&((l=r.media)&&u.assign(i,l),l=r.ima)&&((r=l.adsManager)&&u.assign(i,r),(r=l.ad)&&u.assign(n,r),o.getAd=s,o.getAdData=a,c=l.error)&&(o.getError=function(){return{getErrorCode:function(){return c.code},getMessage:function(){return c.message},getInnerError:function(){return c.innerError}}}),e&&(r=new t(e),u.assign(r,o),i.dispatchEvent(r))},i.getBoundingClientRect=function(){return i.boundingClientRect||{left:0,right:0,top:0,bottom:0}},i.getVolume=function(){return i.volume},i},sc=[],su="REQUEST_COMPLETE",sd="SLOT_STARTED",sh="SLOT_ENDED",sp="AD_INITIATED",sf="AD_BUFFERING_START",sm="AD_BUFFERING_END",sg="AD_PAUSE",sv="AD_RESUME",sy="AD_IMPRESSION",sb="AD_IMPRESSION_END",sS="AD_COMPLETE",s_="AD_SKIPPED",sE="AD_CLICK",sT=(sc.push(function(t,i,n,r){var o,a,s=i.setState,l=i.setAdData,c=i.fire,u={},d={on:{}};function h(){o&&(i.removeListeners(o),u={},o=a=null)}d.$update=d.update=function(e,t){var n;i.isInAds()&&(t&&l([[oc,e5(t,"getTimePosition")]]),a&&(l([[iH,e5(a,"getPlayheadTime")],[or,e5(a,"getDuration")],[oo,e5(a,"getAdId")],[on,a._creativeId],[od,e5(a,"getDealId")],[oh,e5(a,"getSkipOffset")]]),t=e5(a,"getActiveCreativeRendition"))&&(n=e5(t,"getHeight"),l([[iX,e5(t,"getWidth")],[iW,n],[iY,n?n+"p":null]])),e)&&(t=e5(e,"getAdVolume"),i.setData([[nu,100*t],[rl,0==t]]))},d.on[su]=function(e,t){t.success?c(tX,null,2):c(tH,null,2)},d.on[sd]=function(e,t){a=null,s(16),d.update(e,t.slot)},d.on[sh]=function(){s(17),a=null},d.on[sp]=function(){l([[iB,1]]),c(tY,null,2)},d.on[sf]=function(){s(9)},d.on[sm]=d.on[sv]=function(){s(10,null,a)},d.on[sy]=function(){s(10,null,a),c(tx,null,2)},d.on[sg]=function(){s(11)},d.on[sS]=function(){s(13),a=null},d.on[s_]=function(){s(14),a=null},d.on[sb]=function(){a=null},d.on[sE]=function(){c(tk)},d.on.ERROR=function(e,t){s(15,[[nX,t.errorCode],[nQ,t.errorInfo]]),a=null},d.on.AD=function(e,t){a=t.adInstance,d.update(e);var i=u[t.subType];i&&i(e,t)},d.$on=e0(d.on),i.sa.fwContext=d,n.push(function(){o&&d.update(o)}),r.push(h),e6({attachFwContext:function(t){var n;!i.shallBlock("attachFwContext",null,t)&&t!=o&&(h(),o=t)&&(n=q(e.tv,["freewheel","SDK"]),[su,sd,sh,"AD"].forEach(function(e){var t=n&&n["EVENT_"+e];t&&i.addListener(o,t,function(t){var i=d.on[e];i&&i(o,t)})}),[sp,sf,sm,sg,sv,sy,sb,sS,s_,sE,"ERROR"].forEach(function(e){var t=n&&n["EVENT_"+e];t&&(u[t]=function(t,i){var n=d.on[e];n&&n(t,i)})}))},detachFwContext:h},[t,i])}),"play"),sw="waiting",sA="playing",sP="pause",sI="seeking",sC="seeked",sM="ended",sR="durationchange",sk="ratechange",sx="timeupdate",sO=(sc.push(function(e,t,i,n){var r,o,a,s,l=t.setState,c=t.setData,u=t.addListener,d=t.removeListeners;function h(){o&&d(o),r&&d(r),r=o=null}function p(){if(r){for(var e,i,n,s=0;s<r.length;s++)"metadata"===(n=r[s]).kind?i=i||n:"showing"===n.mode&&(e=e||n);a||c([[rm,!!e],[ib,e?e.label||e.language:null]]),o!=i&&(o&&d(o),o=i)&&u(o,"cuechange",function(){var e=o.activeCues;if(e)for(var i,n,r=0;r<e.length;r++)(n=(i=e[r]).value)&&t.updateTimedMetadata("ID3",i.startTime,i.endTime,n.key,n.data)})}}n.push(h);var f={on:{}};function m(){s&&d(s),s=null}f.$update=f.update=function(e,i){i&&(c([[rM,e.duration],[rr,e.muted],[ro,e.playbackRate]]),p()),t.isInAds()||c([[iH,e.currentTime],[iB,e.playbackRate],[rD,e.offsetWidth],[rO,e.offsetHeight],[iz,e],[ig,e.buffered],[rs,e.loop],[rl,e.muted],[nu,100*e.volume],[rh,e.readyState]])},f.on[sT]=function(e){t.isIdle()&&(t.reset(),f.update(e,!0),l(1),l(2))},f.on[sw]=function(e){f.update(e),l(2)},f.on[sA]=function(e){f.update(e),t.isAdIdle()&&l(17),l(3)},f.on[sP]=function(e){f.update(e),l(4)},f.on[sI]=function(e){f.update(e),l(5)},f.on[sC]=function(e){f.update(e),l(e.paused?4:3)},f.on[sM]=function(e){f.update(e),t.isAdIdle()&&l(17),l(6)},f.on.error=function(e){var t,i=e.error;i&&(t=[[nX,i.code],[nQ,i.message]]),f.update(e),l(8,t)},f.on[sR]=function(e){c([[rM,e.duration]])},f.on[sk]=function(e){c([[iB,e.playbackRate]])},f.on[sx]=function(e){f.update(e)},f.$on=e0(f.on),t.sa.mediaElement=f,i.push(function(){s&&f.update(s)}),n.push(m),e6({attachMediaElement:function(e){m(),(s=e)&&[[sT,(e=[[sM,sP,sI,sT,sw,sC,sA]])[0]],[sw,e[0]],[sA,e[0]],[sP,e[0]],[sI,e[0]],[sC,e[0]],[sM,e[0]],["error"],[sR],[sk],[sx]].forEac
13h(function(e){var i=e[0];u(s,i,function(n){var r,o=f.on[i];o&&((r=e[1])?(t.stash(i,o,[s,n]),x(function(){t.unstash(r)},0)):o(s,n))})})},detachMediaElement:m,attachTextTracks:function(e,t){h(),a=t,(r=e)&&["change","addtrack","removetrack"].forEach(function(e){u(r,e,p)})},detachTextTracks:h},[t])}),"CLICK"),sD="STARTED",sL="AD_PROGRESS",sN="AD_BUFFERING",sU="IMPRESSION",sF="PAUSED",sB="RESUMED",sV="COMPLETE",sj="LOADED",sz="ALL_ADS_COMPLETED",sH="SKIPPED",sG="VOLUME_CHANGED",sq="AD_ERROR",sW={CLICK:"click",STARTED:"start",AD_PROGRESS:"adProgress",AD_BUFFERING:"adBuffering",IMPRESSION:"impression",PAUSED:"pause",RESUMED:"resume",COMPLETE:"complete",LOADED:"loaded",ALL_ADS_COMPLETED:"allAdsCompleted",SKIPPED:"skip",VOLUME_CHANGED:"volumeChange",AD_ERROR:"adError"},sY=(sc.push(function(t,i,n,r){var o,a=i.setState,s=i.setAdData,l=i.fire,c=i.addListener,u=i.removeListeners;function d(e){var t,e=e.getError();return e&&(t=[[nX,e.getErrorCode()],[nQ,e.getMessage()]],e=e.getInnerError())&&t.push([nZ,""+e]),t}var h,p,f={on:{}};function m(){o&&u(o),o=null}function g(e){var t=e.getAdPodInfo(),i=e.getVastMediaHeight(),i=[[oo,e.getAdId(),!0],[ol,e.getAdSystem(),!0],[ou,e.getAdvertiserName(),!0],[on,e.getCreativeId(),!0],[od,e.getDealId(),!0],[or,e.getDuration(),!0],[oh,e.getSkipTimeOffset(),!0],[iK,e.getVastMediaBitrate(),!0],[iX,e.getVastMediaWidth(),!0],[iW,i,!0],[iY,i?i+"p":null,!0],[of,e.getWrapperAdIds(),!0],[om,e.getWrapperAdSystems(),!0],[op,e.getWrapperCreativeIds(),!0],[oi,q(e,[/[a-z]/,"clickThroughUrl"]),!0]];return t&&i.push([oc,t.getTimeOffset(),!0]),i}f.$update=f.update=function(e,t){i.isInAds()&&(t&&s(g(t)),e)&&(t=e.getVolume(),i.setData([[nu,100*t],[rl,0==t]]))},f.on[sO]=function(e){f.update(e),l(tk)},f.on[sD]=function(e,t){t=t.getAd(),i.isInAds()||a(16),s([[iB,1]]),f.update(e,t),a(10,null,t)},f.on[sL]=function(e,t){null!=(t=q(t.getAdData(),["currentTime"]))&&(f.update(e),9==i.getState()&&(null==h?h=t:h!=t&&a(10)),s([[iH,t]]))},f.on[sN]=function(e){f.update(e),a(9),h=null},f.on[sU]=function(e){f.update(e),l(tx,null,2)},f.on[sF]=function(e){f.update(e),a(11)},f.on[sB]=function(e){f.update(e),a(10)},f.on[sV]=function(e){f.update(e),a(13)},f.on[sj]=function(e,t){l(tY,(t=t.getAd())&&g(t),2)},f.on[sz]=function(){a(17),m()},f.on[sH]=function(e){f.update(e),a(14)},f.on[sG]=function(e){f.update(e)},f.on[sq]=function(e,t){f.update(e),i.canSetState(15)?a(15,d(t)):l(tH,d(t),2)},f.$on=e0(f.on),i.sa.imaAdsManager=f,n.push(function(){o&&f.update(o)}),r.push(m);var v={on:{}};function y(){p&&u(p),p=null}v.on[sq]=function(e,t){l(tH,d(t),2)},v.$on=e0(v.on),i.sa.imaAdsLoader=v,r.push(y),e6({attachImaAdsManager:function(t){var n,r;!i.shallBlock("attachImaAdsManager",null,t)&&t!=o&&(m(),o=t)&&(t=q(e.google,["ima"]),n=q(t,["AdEvent","Type"],sW),[[sO],[sD,null,(r=[[sD,sU]])[0]],[sL],[sN],[sU,null,r[0]],[sF],[sB],[sV],[sj],[sz],[sH],[sG],[sq,q(t,["AdErrorEvent","Type"])]].forEach(function(e){var t=e[0],r=(e[1]||n)[t];r&&c(o,r,function(n){var r,a=f.on[t];a&&((r=e[2])?(i.stash(t,a,[o,n]),x(function(){i.unstash(r)},0)):a(o,n))})}),l(tX,null,2))},detachImaAdsManager:m,attachImaAdsLoader:function(t){i.shallBlock("attachImaAdsLoader",null,t)||t==p||(y(),(p=t)&&(t=q(e.google,["ima","AdErrorEvent","Type"],sW)[sq])&&c(p,t,function(e){var t=v.on[sq];t&&t(p,e)}))},detachImaAdsLoader:y},[t,i])}),sc.push(function(t,i,n,r,o,a,s){var l,c,u,d=i.addListener;function h(){l&&i.removeListeners(l),l=c=u=null}function p(e){for(var t;(t=c[0])&&t.t<=e;)c.shift(),delete t.t,l.onTimedMetadata(t)}r.push(h),a.push(function(e){l&&p(u=e[1])}),s.push(function(e,t,i,n,r){var o;l&&n&&r&&td(o="ID3"===e?r:o)&&((e={t:t})[n]=o,c.push(e),null!=u)&&p(u)}),e6({attachImaDaiStreamManager:function(n){i.shallBlock("attachImaDaiStreamManager",null,n)||n==l||(h(),(l=n)&&(n=q(e.google,["ima","dai","api","StreamEvent","Type"]),c=[],n)&&(d(l,n.CUEPOINTS_CHANGED,function(e){i.isIdle()&&(e=q(e.getStreamData(),["cuepoints"]))&&e.length&&t.annotateContentSession(e.map(function(e){return{type:oF,start:e.start,end:e.end}}))}),d(l,n.STARTED,function(e){var t,n,r,e=e.getAd();e&&(t=u||0,n=e.getAdPodInfo(),r=e.getVastMediaHeight(),i.addCtTimeSpans([{type:oF,start:t,end:t+(e.getDuration()||0),_d:[[oo,e.getAdId()],[ol,e.getAdSystem(
13)],[ou,e.getAdvertiserName()],[on,e.getCreativeId()],[od,e.getDealId()],[oh,e.getSkipTimeOffset()],[iX,e.getVastMediaWidth()],[iW,r],[iY,r?r+"p":null],[of,e.getWrapperAdIds()],[om,e.getWrapperAdSystems()],[op,e.getWrapperCreativeIds()],[oc,n?n.getTimeOffset():null]],_a:e}]))})))},detachImaDaiStreamManager:h},[t,i])}),(t$=s.mediatailor)&&(t$.clientInfo+=" DZSDK "+a.cn+" v"+a.sv),j.mediatailor=t$,sc.push(function(e,t,i,n,r,o,a,s){var l,c,u,d,h;function p(e,t,i){if(e&&1===e.playCount)for(var n=s.length,r=0;r<n;r++)s[r](t,i)}function f(){l&&c&&l.removeAdObserver(c),l=c=null,u=d=h=null}n.push(f),r.push(function(e,t,i,n){var r=u&&u[i.nm];return r&&r(e,t,i,n)}),o.push(function(e){l&&!t.isIdle()&&(d=e[1],h=t.getData(iG),eu<el||eF("MT onPlayheadUpdate: "+d+", "+h),l.onPlayheadUpdate(d,h||null))}),e6({attachMediaTailorSession:function(e,i){var n,r,o,a,s;i=i||j.mediatailor,!t.shallBlock("attachMediaTailorSession",null,e)&&i&&e!=l&&(f(),r=function(){var e=t.getData(nu);th(e)&&p(n,14,e)},o=i.AdTrackingEvent,(a=[])[o.IMPRESSION]=(s=function(e){return function(){p(n,e)}})(3),a[o.LOADED]=s(1),a[o.START]=s(2),a[o.FIRST_QUARTILE]=s(4),a[o.MID_POINT]=s(5),a[o.THIRD_QUARTILE]=s(6),a[o.COMPLETE]=s(7),a[o.PAUSE]=s(8),a[o.RESUME]=s(9),a[o.FULLSCREEN]=s(15),a[o.EXIT_FULLSCREEN]=s(16),a[o.MUTE]=function(){p(n,14,0)},a[o.UNMUTE]=r,a[o.CLICK_THROUGH]=function(){t.fire(tk),p(n,13)},a[o.SKIP]=function(){t.fire(tO),p(n,12)},l=e)&&(s=i.PlaybackEvent,u={},[[s.START,t0,1],[s.END,io,tP],[s.PAUSE,tJ,tP],[s.RESUME,t7,tP],[s.MUTE,tZ,tP],[s.UNMUTE,is,tP],[s.FULLSCREEN,tq,tP],[s.EXIT_FULLSCREEN,tG,tP]].forEach(function(e){u[e[1].nm]=function(t,i,n,r){e[2]&r&&l.onPlaybackEvent(e[0])}}),u[il.nm]=r,u[tN.nm]=function(){p(n,10)},u[tU.nm]=function(){p(n,11)},c={onNewAd:function(e){var i;t.addCtTimeSpans([{type:oF,start:i=(i=e.startDate)&&h?i-h+d:e.start,end:i+e.duration,_a:e,_d:[[oo,e.vastAdId],[ol,e.adSystem],[on,e.creativeId],[oh,e.skipOffset],[oc,e.availStart],[oi,e.videoClickThrough]]}])},onAdLoad:function(e){var i,r,o,a,s;1===(n=e).playCount&&(i=e.adVerifications)&&(r={},o=[],a=t.getData(nu),s=e.skipOffset,th(a)&&(r.v=a),r.d=e.duration,r.ap=!!t.getData(rt),r.po=+(0!==e.availStart),r.sk=0<=s,r.so=r.sk?s:null,r.vf=o,i.forEach(function(e){var t=q(e.javaScriptResource,[0,"uri"]),i=e.vendor;t&&i&&o.push({url:t,vd:i,p:e.verificationParameters||""})}),p(e,0,r))},onAdEnd:function(e){p(e,17),n=null},onAdTrackingEvent:function(e,t){(t=a[t])&&t()}},l.addAdObserver(c))},detachMediaTailorSession:f},[e])}),sc.push(function(t,i,n,r,o,a,s){var l,c,d,h,p,m,v,S,_,E=["YMID","YSEQ","YTYP","YDUR"];function T(){l&&c&&l.removeAnalyticObserver(c),l=c=null,d=h=p=v=null}function w(e){for(var t;(t=d[0])&&t.t<=e;)d.shift(),l.onTimedMetadata(_.createFromMetadata(t.YMID,t.YSEQ,t.YTYP,t.YDUR,1e3*t.t))}function A(e,t,i){(h=h&&h.t===e?h:{t:e})[t]=i||"",u.keys(h).length===E.length+1&&(d.push(h),(h=null)!=v)&&w(v)}r.push(T),o.push(function(e,t,i,n){var r=p&&p[i.nm];return r&&r(e,t,i,n)}),a.push(function(e){l&&!i.isIdle()&&(v=e[1],m===S.VOD||m===S.DVRLIVE?l.onPlayheadUpdate(g.round(1e3*v)):w(v))});var P=f.fromCharCode;function I(e,t,i){for(var n,r=[];t<i;)31<(n=e[t++])&&n<127&&r.push(P(n));return r.join("")}s.push(function(e,t,i,n,r){var o;if(l&&r&&m===S.LIVE){if("ID3"===e||"org.id3"===e)E.includes(n)&&(r instanceof b&&(r=new y(r))||r instanceof y?3===r[0]&&(o=I(r,1,r.length)):o=r,td(o))&&A(t,n,o);else if("urn:yospace:a:id3:2016"===e){if(r instanceof y)for(var a,s=I(r,0,r.length).split(","),c=0;c<s.length;c++)a=s[c].split("="),E.includes(a[0])&&A(t,a[0],a[1])}else if("https://aomedia.org/emsg/ID3"===e&&r instanceof y){var u=r.length;if(9<u&&73===r[0]&&68===r[1]&&51===r[2]&&(r[3]<<8|r[4])<=1024&&!(192&r[5])){c=6;for(var d=0,h=10;c<h;)d=d<<7|127&r[c++];for(u=g.min(u,d+10);c+9<u;){for(n="",h=c+4;c<h;)n+=P(r[c++]);for(d=0,h=c+4;c<h;)d=d<<7|127&r[c++];h=(c+=2)+d,E.includes(n)&&h<=u&&A(t,n,I(r,c,h)),c=h}}}}}),e6({attachYospaceSession:function(n){var r,o,a,s,u,h=e.YospaceAdManagement;!i.shallBlock("attachYospaceSession",null,n)&&h&&n!=l&&(T(),l=n)&&(r=h.PlayerEvent,n=h.BreakType,S=h.PlaybackMode,_=h.TimedMetadata,m=l.getPlaybackMode(),d=[],p={},[[r.START,t0,1],[r.STOP,io,tP],[r.PAUSE,tJ,tP],[r.RESUME,t7,tP],[r.STALL,ii,tP],[r.CONTINUE,ir,tP]].forEac
13h(function(e){p[e[1].nm]=function(t,i,n,r){e[2]&r&&l.onPlayerEvent(e[0],0)}}),p[it.nm]=function(){l.onPlayerEvent(r.SEEK,1e3*(v||0))},p[tZ.nm]=function(){l.onVolumeChange(!0)},p[is.nm]=function(){l.onVolumeChange(!1)},o=function(e,t){return(e=e.getProperty(t))&&e.getValue()},a=function(e,t,i,n){e&&(t.push(e.getIdentifier()),i.push(e.getAdSystem()),n.push(e.getCreativeIdentifier()),a(e.getLineage(),t,i,n))},s=function(e){var t=e.getSkipOffset(),i=[],n=[],r=[],t=(a(e.getLineage(),i,n,r),[[oo,e.getIdentifier()],[ol,o(e,"AdSystem")],[ou,o(e,"Advertiser")],[oh,0<t?t/1e3:t],[of,i],[om,n],[op,r]]),i=e.getLinearCreative(),n=(i&&t.push([on,i.getCreativeIdentifier()],[oi,i.getClickThroughUrl()]),e.getStart()/1e3);return{type:oF,start:n,end:n+e.getDuration()/1e3,_d:t,_a:e}},c={onAdvertBreakStart:function(e){},onAdvertBreakEnd:function(){},onAdvertStart:function(e){i.addCtTimeSpans([s(e)])},onAdvertEnd:function(){},onAdvertBreakEarlyReturn:function(e){},onAnalyticUpdate:function(){},onSessionTimeout:function(){},onTrackingEvent:function(e){}},l.addAnalyticObserver(c),m===S.VOD)&&(u=[],(h=l.getAdBreaksByType(n.LINEAR))&&h.forEach(function(e){(e=e.adverts)&&e.forEach(function(e){u.push(s(e))})}),u.length)&&t.annotateContentSession(u)},detachYospaceSession:T},[t])}),"unsupportedDataList"),sK="maxCtPlayheadInterval",sX="maxAdPlayheadInterval",sQ={};function sZ(e,t){var i=null==e?st:td(e)&&sQ[e];return i&&i[5]===t?i:(eL("Invalid adapter for id: "+e),null)}function sJ(e,t,i,n,r){i=[e,si,i,n,r,t],st=st||i,sQ[e]=i}function s$(){if(!sn){var e=aM[2];if(W(e))try{e()}catch(e){eB(e,"onPageUnload")}u.keys(a2).forEach(function(e){a2[e].publicContext.destroy()}),ak(!0),sn=!0}}si="Bitmovin Player",sJ("bitmovin",1,function(t,i){var n={hls:"HLS",progressive:"MP4",dash:oV,smooth:"Smooth"};if(!t)return"Invalid player";function r(e,n){i.addListener(t,e,n,"on","off")}function o(){var t=q(e.cast,["framework","CastContext"]),t=t&&t.getInstance();return t&&t.getCurrentSession()}function a(e){var t=o();return t&&t.sendMessage(et,e)}function s(){if(!i.isIdle()){var e,n=e5(t.subtitles,"list"),n=(n&&n.some(function(t){if(1==t.enabled)return e=t.lang,!0}),t.getVideoElement()),r=t.getAudio(),o=t.getPlaybackSpeed(),a=q(n,["buffered"]),s=t.getCurrentTime(),l=t.getCurrentTime("relativetime"),c=0;if(a)for(var u=0;u<a.length;u++){var d=a.end(u);if(s>=a.start(u)&&s<=d){c=1e3*(d-s);break}}th(l)&&(th(s)&&s!==l&&i.setData([[iG,s]]),i.setData([[iH,l]])),i.setData([[ig,c],[iB,o],[iy,q(r,["lang"])],[ri,t.isCasting()],[rh,q(n,["readyState"])],[rm,!!e],[ib,e||null]])}}function l(){t.ads&&(e=t.ads.getActiveAd(),n=t.ads.getActiveAdBreak());var e,n=q(n,["scheduleTime"]);i.setAdData([[iB,1],[oh,q(e,["skippableAfter"])],[on,q(e,["data","creative","id"])],[oo,q(e,["id"])],[ol,q(e,["data","adSystem","name"])],[oc,isFinite(n)?n:-1]])}function c(){var e=t.getDuration(),r=t.getStreamType(),o=q(t.getConfig(),["adaptation","preload"]),l=t.getSource(),c="unknown"!==r?l[r]:null,r="unknown"!==r?n[r]:null,u=t.isLive()?"Live":"VOD",d=t.isMuted(),h=t.getPlaybackSpeed(),p=t.getConfig();i.isIdle()&&(i.reset(),i.setData([[rN,q(l,["title"])],[rC,q(l,["description"])],[rM,e],[rL,c],[rf,u],[rp,r],[rd,null!=o?o?"auto":"none":null],[rr,d],[ro,h],[rt,q(p,["playback","autoplay"])]]),s(),i.setState(1),i.setState(2),i.initCastTransfer(a))}i.setData([[ru,t.version]]),r("caststarted",function(){i.removeListeners(null,et),i.addListener(o(),et,function(e,t){i.handleCastMessage(ta(t),a)},"addMessageListener","removeMessageListener"),i.initCastTransfer(a)}),r("sourceunloaded",function(){i.isIdle()||(s(),i.setState(7))}),r("sourceloaded",function(){t.isCasting()&&t.isPlaying()&&c()}),r("play",c),r("timechanged",function(e){i.isInAds()?(l(),i.setAdData([[iH,e.time]])):17==i.getState()&&i.setState(3)}),r("stallstarted",function(){i.isInAds()?(l(),i.setState(9)):(s(),i.setState(2))}),r("stallended",function(){i.isInAds()?(l(),i.setState(10)):(s(),i.setState(3))}),r("playing",function(){i.isInAds()?(l(),i.setState(10)):5!=i.getState()&&(s(),i.setState(3))}),r("paused",function(){i.isInAds()?(l(),i.setState(11)):(s(),i.setState(4))}),r("seek",function(){i.setState(5)}),r("seeked",function(){s(),i.setState(t.isPaused()?4:3)}),r("timeshift",function(){i.setState(5)}),r("timeshifted",function(){s(),i.setState(t.isPaused()?4:3)}),r("videoplaybackqualitychanged",function(e){var t=q(e,["targetQuality","height"]),n=q(e,["targetQuality","bitrate"])/1e3;i.setData([[iK,n],[iX,q(e,["targetQuality","width"])],[iW,t],[iY,t?t+"p":null]])}),r("videoqualitychanged",function(){s(),i.fire(t4)}),r("error",function(e){var t=[];e&&(t.push([nQ,e.name]),t.push([nX,e.code])),i.setState(8,t)}),r("playbackfinished",function(){s(),i.setState(6)}),r("adbreakstarted",function(){i.setState(16)}),r("adstarted",function(e){e=q(e,["ad","duration"]),i.setAdData([[or,e]]),l(),i.setState(10),i.fire(tx,null,2)}),r("aderror",function(e){var t=[];e&&(t.push([nQ,q(e,["data","message"])]),t.push([nX,q(e,["data","code"])])),i.canSetState(15)?(l(),i.setState(15,t)):i.fire(tH,t,2)}),r("adclicked",function(){l(),i.fire(tk)}),r("adskipped",function(){l(),i.setState(14)}),r("adfinished",function(){l(),i.setState(13)}),r("adbreakfinished",function(){l(),i.setState(17)}),i.onTimer(function(){var e=t.getVideoElement(),n=t.getVolume(),r=t.getViewMode();(i.isInAds()?l:s)(),i.setData([[iz,e],[rl,t.isMuted()],[ra,r?"fullscreen"==r:null],[nu,n],[rO,q(e,["clientHeight"])],[rD,q(e,["clientWidth"])]])})},function(t,i,n){var r,o,a,s=t[1],l=(oZ&&(r=(l=(s=e0(s||{})).network=e0(s.network||{})).preprocessHttpRequest,o=l.preprocessHttpResponse,a={},l.preprocessHttpRequest=function(e,t){function n(e){var t,n=i.reqTracer(e.url);return oJ?(t=n.headers(),e.url=n.urlBase,u.keys(t).forEach(function(i){e.headers[i]=t[i]})):e.url=n.url(),a[e.url]=n,_.resolve(e)}return(e=r&&r(e,t))?e.then(n):n(t)},l.preprocessHttpResponse=function(e,t){var i=t.request.url,n=a[i];return n&&(n.status(t.status),n.resp(1e3*t.timeToFirstByte),n.end(1e3*t.elapsedTime),delete a[i]),o?o(e,t):t}),n.bitmovinPlayerClass||q(e.bitmovin,["player","Player"]));return l?_.resolve(new l(t[0],s)):_.reject("Missing bitmovin Player class")}),si="DOM",sJ("dom",a0,function(e,t){var i=t.publicContext;if(!e)return"Invalid DOM element";function n(n){var r,o;n&&(t.removeListeners(),r=n.events,o=n.metadata,r)&&u.keys(r).forEach(function(n){var a=r[n],s=a.query_selector,l=a.interaction_type;if(s&&l)try{var c=e.querySelectorAll(s);
13c&&c.forEach(function(r){t.addListener(r,l,function(){var t;o&&(t=i.getMetadata()||{},u.keys(o).forEach(function(i){var n=o[i],r=n.query_selector,a=n.attribute_name;if(r&&a)try{var s=e.querySelectorAll(r);if(s){for(var l=[],c=0;c<s.length;c++){var u=s[c][a];null!=u&&l.push(u)}t[i]=l}}catch(e){eB(e,"querySelectorAll for: "+r)}}),i.setMetadata(t)),i.generateEvent(n)})})}catch(e){eB(e,"querySelectorAll for: "+s)}})}n(a.od),t.onConfig(function(e){n(e.od)})});var s0=!0;function s1(e){if(!sr){if(!(a.ci||ti(J,ee)||e&&e[ee]))return!1;e&&(J=te(J,function(t){u.keys(e).forEach(function(i){t.set(i,e[i])})}),eh()),s0&&(s0=!1,aq(tz,eH()));var t=ti(J,"env");a.cf="staging"===t||"dev"===t||"sandbox"===t?t:"",a.ci=ti(J,ee)||a.ci,a.om=null,aj([[nP,a.ci]]),aU(),sr=!0}return!0}function s2(e){e()}function s3(e,t,i){tf(i)||(null!=i&&eL("Invalid contextOptions",i),i={});var n,r,o,a,s,l,c,d,h,p,f,m,g,v,y=i[aQ]||a1[1];switch(y){case a1[1]:return ss(e,t,i);case a1[a0]:return a=e,s=t,f=a9((l=i)[aX],l[aZ]),m=sZ(l[aY],a0),g=tf(g=l[aK])?e0(g):{},m&&(d=m[2],h=m[3],u.assign(g,m[4]||{})),u.assign(f,{type:a0,fire:function(e,t){f.fireEvent(e,eH(),t)},onTimer:function(e){p=e}}),s?h?new _(function(e,t){try{h(s,f,g).then(function(t){c=b(t),e(c)},function(e){eD(e),t(e)})}catch(e){t(eB(e,m[0]+" createTargetObject"))}}):_.reject("Not implemented"):c=b(a);case a1[a$]:if(!t)return r=(a=a9(null,i[aZ])).publicContext,null!=(o=i[aJ])&&r.setMetadata(o),a.fireEvent(tj,eH()),r;n="Invalid context type: "+y;break;default:n="Unknown context type: "+y}function b(e){var t,i=f.publicContext,n=null;f.target=e,u.assign(i,f.basePublicMethods,{getError:function(){return n},getTarget:function(){return e},adapterID:function(){return m?m[0]:null}});try{n=m?d?d(e,f,g):null:"Missing adapter"}catch(e){n=eB(e,m[0]+" initContext")}return n?(eD(n),i.destroy()):(null!=(t=l[aJ])&&i.setMetadata(t),f.fire(tj),f.setTimer(function(){if(p)try{p()}catch(e){eB(e,"onTimer")}})),i}return eD(n),t?_.reject(n):(v=n,{getError:function(){return v}})}e5(e,"addEventListener",["pagehide",s$]),"Safari"==ap&&e5(e,"addEventListener",["beforeunload",function(e){x(function(){e.defaultPrevented||e.returnValue||s$()},0)}]),eN("Datazoom SDK "+a.sv+" ("+a.cn+") DDv3"),k(function(){a3.length?a3.forEach(s2):eH()},a.ti),u.assign(j,{init:s1,setLogLevel:ed,createContext:function(e,t){return s3(e,null,t)},createBaseContext:function(e){return(e=tf(e)?e0(e):{})[aQ]=a1[a$],s3(null,null,e)},createContextAndTarget:function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);return s3(null,t,e)},createCollectorProxy:function(e,t,i){return(e=e||a1[1])===a1[1]?sl(t,i):(eD("Unsupported context type: "+e),null)},adapterIDs:function(){return u.keys(sQ)},contexts:function(){return u.keys(a2).map(function(e){return a2[e].publicContext})},playerContexts:function(){return u.keys(a2).filter(function(e){return 1==a2[e].type}).map(function(e){return a2[e].publicContext})},setMetadata:function(e){return!(null!=e&&!tf(e)||(aW(at=ta(to(e)),aj),tl(c,ev,at),0))},getMetadata:function(){return ta(to(at))},generateEvent:function(e,t,i){(i=!i&&u.keys(a2)[0])?a2[i].publicContext.generateEvent(e,t):aq({ap:tI,nm:H+e,on:oP},eH(),null,t)},on:function(e,t){aM[e]=t},appSessionID:function(){return an},generateUUID:function(){return tn()},sdkEvent:{APP_SESSION_START:aC,CONTENT_SESSION_START:1,PAGE_UNLOAD:2,AD_START:3,AD_END:4},timeSpanType:{AD:oF,PROMO:"promo"},overridableMetadata:oR,name:a.cn,version:a.sv,dictionaryVersion:3}),t||x(s1,a.kd)})("object"==typeof globalThis?globalThis:window,{},{}),t&&(e.exports=t.datazoom)}()}(collector_bitmovin);var collector_bitmovinExports=collector_bitmovin.exports;let datazoom=getDefaultExportFromCjs$1(collector_bitmovinExports),log$i=loglevelExports.getLogger("DataZoomTracker");function getPlayerContext(e){let t=datazoom.playerContexts();if(!(!t||0===t.length))return t.find(t=>t.getPlayer()===e)}function getGlobalDataZoomMetadata(e){let{customMetadata:t}=e;if(!t)return{};let i={};for(let e of GLOBAL_DATAZOOM_METADATA_FIELDS)Object.prototype.hasOwnProperty.call(t,e)&&(i[e]=t[e]);return i}function createDataZoomTracker(e,t){try{if(!e.configId)return void log$i.warn("datazoom config id is missing, skipping initialization");if(datazoom.init({configuration_id:e.configId}),log$i.info("datazoom initialized"),e.customMetadata){let t=getGlobalDataZoomMetadata(e);datazoom.setMetadata(t),log$i.info("datazoom global metadata set",t)}let i=datazoom.createContext(t);e.customMetadata&&i.setMetadata(e.customMetadata)}catch(e){log$i.error("could not initialize datazoom client",e)}}function destroyDataZoomTracker(e){try{log$i.info("preparing to de
13stroy datazoom");let t=getPlayerContext(e);t&&(log$i.info("destroying datazoom context for player",e,t),t.destroy())}catch(e){log$i.error("error destroying datazoom tracker",e)}}function extendDataZoomMetadata(e,t){if(t)try{let i=getPlayerContext(e);if(!i)return void log$i.warn("no datazoom context found for player",e,"not updating metadata");log$i.info("extending datazoom metadata for player",e,t);let n=i.getMetadata();i.setMetadata({...n,...t})}catch(e){log$i.error("error extending datazoom metadata",e)}}let DEFAULT_16_9_VIDEO_TAG_POSTER_IMAGE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAYAAAA7KqwyAAAABmJLR0QA/wD/AP+gvaeTAAAAGElEQVQokWNkYGD4z0ABYKJE86gBw8YAAFmzAREE4ESyAAAAAElFTkSuQmCC";function convertToAspectRatio(e){let t=[{decimal:1.7777777777777777,ratio:{width:16,height:9}},{decimal:.8,ratio:{width:4,height:5}},{decimal:1.3333333333333333,ratio:{width:4,height:3}},{decimal:.6666666666666666,ratio:{width:2,height:3}},{decimal:2,ratio:{width:2,height:1}},{decimal:1,ratio:{width:1,height:1}},{decimal:.5625,ratio:{width:9,height:16}}].find(t=>t.decimal===e);return t?t.ratio:{width:16,height:9}}function generateVideoTagPosterSource(e){if(!e)return DEFAULT_16_9_VIDEO_TAG_POSTER_IMAGE;let t=convertToAspectRatio(e),i=t.width,n=t.height,r=document.createElement("canvas");r.width=i,r.height=n;let o=r.getContext("2d");return o?(o.fillStyle="black",o.fillRect(0,0,i,n),r.toDataURL("image/png")):DEFAULT_16_9_VIDEO_TAG_POSTER_IMAGE}async function sleep(e){await new Promise(t=>setTimeout(t,e))}let StorageKey={AUDIO_LANGUAGE:"rbup-video-audio-language",QUALITY:"rbup-video-quality",SUBTITLE_LANGUAGE:"rbup-video-subtitle-language",VOLUME:"rbup-video-volume"};function setStorageItem(e,t,i){let n="string"==typeof t?t:JSON.stringify(t);i.setItem(e,n)}function clearSubtitleLanguage(e){e.removeItem(StorageKey.SUBTITLE_LANGUAGE)}function getAudioLanguage(e){return e.getItem(StorageKey.AUDIO_LANGUAGE)}function getQualityHeight(e){let t=e.getItem(StorageKey.QUALITY);return t?parseInt(t,10):null}function getSubtitleLanguage(e){return e.getItem(StorageKey.SUBTITLE_LANGUAGE)}function getVolume(e){let t=e.getItem(StorageKey.VOLUME);return t?parseInt(t,10):null}function setAudioLanguage(e,t){setStorageItem(StorageKey.AUDIO_LANGUAGE,e,t)}function setSubtitleLanguage(e,t){setStorageItem(StorageKey.SUBTITLE_LANGUAGE,e,t)}function setVolume(e,t){setStorageItem(StorageKey.VOLUME,e,t)}let MIN_TIMESHIFT_FOR_DVR_SECS=-200;function detectBasedOnAssetId(e){return!1}function detectBasedOnMaxTimeShift(e){return!!(!Number.isFinite(e)||Number.isNaN(e))||e>MIN_TIMESHIFT_FOR_DVR_SECS}function isLinearStream(e,t,i){return!!detectBasedOnAssetId()||detectBasedOnMaxTimeShift(e)}let isDatazoomEnabled=(e,t)=>!!("ACTIVE"===e&&null!=t&&t.configId),extendDatazoomMetadataWithVideoPlayerMetadata=(e,t,i)=>{var n,r;if(!i)return;let o=null==(n=e.services)?void 0:n.dataZoom,a=e.configs.dataZoom;isDatazoomEnabled(o,a)&&extendDataZoomMetadata(i,null==(r=a.dataZoomMetadataCustomizer)?void 0:r.call(a,t))};class AudioLanguageResolver{constructor(e,t,i,n){this.mediaMetadata=e,this.config=t,this.availableAudioTracks=i,this.availableSubtitleTracks=n}resolveAudioTrackId(e){let t=this.availableAudioTracks,i=getBrowserLanguage(),n=this.mediaMetadata.availableAudioLanguages,r=tryResolveRequestedAudioLanguageForAudioTrack(i,n,t)??i,o=e?tryResolveRequestedAudioLanguageForAudioTrack(e,n,t):void 0,a=this.config.overrideAudioLanguage,s=a?tryResolveRequestedAudioLanguageForAudioTrack(a,n,t):void 0;if(t.length>1)return getMatchedAudioTrackId(s??o??r,t)}resolveSubtitleTrackId(e){let t=this.config.overrideSubtitleLanguage,i=t?tryResolveRequestedSubtitleLanguageForSubtitleTrack(t,this.mediaMetadata.availableSubtitleLanguages,this.availableSubtitleTracks):void 0;if(i)return getMatchedSubtitleTrackId(i,this.availableSubtitleTracks);if(e){let t=tryResolveRequestedSubtitleLanguageForSubtitleTrack(e,this.mediaMetadata.availableSubtitleLanguages,this.availableSubtitleTracks);if(t)return getMatchedSubtitleTrackId(t,this.availableSubtitleTracks)}}resolveStorageLanguageForSubtitle(e){if("USER"===e.issuer)return getIsoMatchForAudioLanguage(e.language,this.mediaMetadata.availableSubtitleLanguages)??e.language}resolveStorageLanguageForAudio(e){if("USER"===e.issuer)return getIsoMatchForAudioLanguage(e.language,this.mediaMetadata.availableAudioLanguages)??e.language}}class AudioVolumeResolver{constructor(e){this.playerConfiguration=e}resolveVolumeToRestore(e){if("MUTED"!==this.playerConfiguration.muted&&isNotNullOrUndefined(e))return e}resolveStorageVolume(e){let t=e.currentVolume;if("MUTED"!==this.playerConfiguration.muted||t>0)return t}}let log$h=loglevelExports.getLogger("StorageService");class StorageService{constructor(e,t,i,n,r){if(Si(this,"playerCoordinator"),Si(this,"sessionStorage"),Si(this,"localStorage"),Si(this,"audioLanguageResolver"),Si(this,"audioVolumeResolver"),Si(this,"eventListener",e=>{let{localStorage:t,sessionStorage:i}=this;switch(e.type){case"audioChanged":this.handleAudioChanged(t,e);break;case"subtitleDisabled":this.handleSubtitleDisabled(t,e);break;case"subtitleEnabled":this.handleSubtitleEnabled(t,e);break;case"volumeChanged":this.handleVolumeChanged(i,e)}}),this.playerCoordinator=e,this.sessionStorage=n,this.localStorage=r,this.audioLanguageResolver=t,this.audioVolumeResolver=i,this.playerCoordinator.addEventListener(this.eventListener),!n)try{this.sessionStorage=window.sessionStorage}catch(e){log$h.warn("cannot get session storage",e)}if(!r)try{this.localStorage=window.localStorage}catch(e){log$h.warn("cannot get local storage",e)}}load(){this.loadVolume(),this.loadVideoQuality(),("LIVE"!==this.playerCoordinator.getPlaybackMode()||"LINEAR"!==this.playerCoordinator.getLiveVariant())&&this.loadSubtitleLanguage(),this.loadAudioLanguage()}destroy(){this.playerCoordinator.removeEventListener(this.eventListener)}getAllStoredValues(){let e=this.localStorage;if(e)return{audioLanguage:getAudioLanguage(e),qualityHeight:getQualityHeight(e),subtitleLanguage:getSubtitleLanguage(e),volume:getVolume(e)}}handleVolumeChanged(e,t){if(e){let i=this.audioVolumeResolver.resolveStorageVolume(t);void 0!==i&&setVolume(i,e)}}handleSubtitleEnabled(e,t){if(e){let i=this.audioLanguageResolver.resolveStorageLanguageForSubtitle(t);i&&setSubtitleLanguage(i,e)}}handleSubtitleDisabled(e,t){e&&"USER"===t.issuer&&clearSubtitleLanguage(e)}handleAudioChanged(e,t){if(e){let i=this.audioLanguageResolver.resolveStorageLanguageForAudio(t);i&&setAudioLanguage(i,e)}}loadAudioLanguage(){let e=this.localStorage;if(!e)return;let t=getAudioLanguage(e),i=this.audioLanguageResolver.resolveAudioTrackId(t);i&&this.playerCoordinator.setAudioTrack(i,"INITIAL")}loadSubtitleLanguage(){let e=this.localStorage;if(!e)return;let t=getSubtitleLanguage(e),i=this.audioLanguageResolver.resolveSubtitleTrackId(t);i&&this.playerCoordinator.enableSubtitle(i,"INITIAL")}loadVideoQuality(){let e=this.sessionStorage;if(!e)return;let t=getQualityHeight(e);if(null!==t){let e=this.playerCoordinator.getAvailableVideoQualities().find(e=>e.height===t);e&&this.playerCoordinator.setVideoQuality(e.id)}}loadVolume(){let e=this.sessionStorage;if(!e)return;let t=getVolume(e),i=this.audioVolumeResolver.resolveVolumeToRestore(t);void 0!==i&&this.playerCoordinator.setVolume(i)}}var bitmovinplayerCore={exports:{}};!function(module,exports){!function(){if("u">typeof commonjsGlobal&&typeof window>"u"){commonjsGlobal.window=self=commonjsGlobal,window.NodeList="u">typeof NodeList?NodeList:{prototype:{}},window.Document="u">typeof Document?Document:{prototype:{}};var shimArrayFn=function(){return[]},shimElementFn=function(){return{appendChild:shimArrayFn}};window.document="u">typeof document?document:{createTextNode:shimArrayFn,getElementsByTagName:shimArrayFn,createElement:shimElementFn,head:{appendChild:shimArrayFn}},window.Event="u">typeof Event?Event:{prototype:{}},window.Element="u">typeof Element?Element:{prototype:{}},window.screen="u">typeof screen?screen:{prototype:{}},window.navigator="u">typeof navigator?navigator:{prototype:{},userAgent:"shim",platform:{toLowerCase:shimArrayFn}},window.location="u">typeof location?location:{}}!function(e,t){module.exports=t()}(self,function(){return function(){var __webpack_modules__={90040:function(module){var URL=window.URL||window.webkitURL;module.exports=function(content,url){try{try{var blob;try{(blob=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(content),blob=blob.getBlob()}catch{blob=new Blob([content])}return new Worker(URL.createObjectURL(blob))}catch{return new Worker("data:application/javascript,"+encodeURIComponent(content))}}catch(e){try{var exportReturnStatement="return __webpack_require__(",exportStatement="var __webpack_exports__ = __webpack_require__(";return"!"===content.substring(0,1)&&(content=content.substring(1,content.length-1),content="("+content+")"),content.indexOf(exportStatement)>0&&(content=content.replace(exportStatement,exportReturnStatement)),eval(content).getContext()}catch(ie){return{}}}}},37007:function(e){var t,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(i,n){function r(i){e.removeListener(t,o),n(i)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,r)})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,i,n){var r,o,a;if(s(i),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),a=o[t]),void 0===a)a=o[t]=i,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),(r=l(e))>0&&a.length>r&&!a.warned){a.warned=!0;var c=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,function(e){console&&console.warn&&console.warn(e)}(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=u.bind(n);return r.listener=i,n.wrapFn=r,r}function h(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):f(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function f(e,t){for(var i=Array(t),n=0;n<t;++n)i[n]=e[n];return i}function m(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function r(o){n.once&&e.removeEventListener(t,r),i(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
vendor: 4,189 bytes, line 13
13,set:function(e){if("number"!=typeof e||e<0||r(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var c=l.length,u=f(l,c);for(i=0;i<c;++i)n(u[i],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var i,n,r,o,a;if(s(t),void 0===(n=this._events)||void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){a=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0==arguments.length){var r,o=Object.keys(i);for(n=0;n<o.length;++n)"removeListener"!==(r=o[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},91829:function(e,t,i){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t,i){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?o(Object(i),!0).forEach(function(t){r(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEac
vendor: 29,337 bytes, line 13
13h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function s(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}i.r(t),i.d(t,{__DO_NOT_USE__ActionTypes:function(){return u},applyMiddleware:function(){return v},bindActionCreators:function(){return m},combineReducers:function(){return p},compose:function(){return g},createStore:function(){return d},legacy_createStore:function(){return h}});var l=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}(),c=function(){return Math.random().toString(36).substring(7).split("").join(".")},u={INIT:"@@redux/INIT"+c(),REPLACE:"@@redux/REPLACE"+c(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c()}};function d(e,t,i){if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw Error(s(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw Error(s(1));return i(d)(e,t)}if("function"!=typeof e)throw Error(s(2));var n,r=e,o=t,a=[],c=a,h=!1;function p(){c===a&&(c=a.slice())}function f(){if(h)throw Error(s(3));return o}function m(e){if("function"!=typeof e)throw Error(s(4));if(h)throw Error(s(5));var t=!0;return p(),c.push(e),function(){if(t){if(h)throw Error(s(6));t=!1,p();var i=c.indexOf(e);c.splice(i,1),a=null}}}function g(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw Error(s(7));if(void 0===e.type)throw Error(s(8));if(h)throw Error(s(9));try{h=!0,o=r(o,e)}finally{h=!1}for(var t=a=c,i=0;i<t.length;i++)(0,t[i])();return e}return g({type:u.INIT}),(n={dispatch:g,subscribe:m,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw Error(s(10));r=e,g({type:u.REPLACE})}})[l]=function(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw Error(s(11));function i(){e.next&&e.next(f())}return i(),{unsubscribe:t(i)}}})[l]=function(){return this},e},n}var h=d;function p(e){for(var t=Object.keys(e),i={},n=0;n<t.length;n++){var r=t[n];"function"==typeof e[r]&&(i[r]=e[r])}var o,a=Object.keys(i);try{!function(e){Object.keys(e).forEach(function(t){var i=e[t];if(void 0===i(void 0,{type:u.INIT}))throw Error(s(12));if(void 0===i(void 0,{type:u.PROBE_UNKNOWN_ACTION()}))throw Error(s(13))})}(i)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var n=!1,r={},l=0;l<a.length;l++){var c=a[l],u=i[c],d=e[c],h=u(d,t);if(void 0===h)throw t&&t.type,Error(s(14));r[c]=h,n=n||h!==d}return(n=n||a.length!==Object.keys(e).length)?r:e}}function f(e,t){return function(){return t(e.apply(this,arguments))}}function m(e,t){if("function"==typeof e)return f(e,t);if("object"!=typeof e||null===e)throw Error(s(16));var i={};for(var n in e){var r=e[n];"function"==typeof r&&(i[n]=f(r,t))}return i}function g(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function v(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e){return function(){var i=e.apply(void 0,arguments),n=function(){throw Error(s(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=t.map(function(e){return e(r)});return n=g.apply(void 0,o)(i.dispatch),a(a({},i),{},{dispatch:n})}}}},88052:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleManager=void 0;var n=i(40306),r=i(3336),o=i(95880);t.ModuleManager=function(){function e(){}return e.initialize=function(){this.modules||(this.modules={})},e.add=function(e){if(this.initialize(),!e)throw new r.PlayerError(n.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no module definition was provided to the API.");if(!e.name)throw new r.PlayerError(n.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `name` property was provided to the module definition.");if(!e.module)throw new r.PlayerError(n.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `module` property was provided to the module definition.");if(e.dependencies){for(var t=0,i=e.dependencies;t<i.length;t++){var a=i[t];if(!this.has(a))throw new o.PlayerModuleMissingError(e.name,a)}if("function"!=typeof e.module)throw new r.PlayerError(n.ErrorCode.MODULE_INVALID_DEFINITION_DEPENDENCY,{name:e.name},"Cannot add the module: modules with dependencies must pass a deferred loading function to the `ModuleDefinition.module` property.")}var s=e.module;"function"==typeof s&&(s=s()),this.modules[e.name]={moduleDefinition:e,module:s},e.hooks&&e.hooks.add&&e.hooks.add(e.module)},e.remove=function(e){var t;if(this.modules){if(!this.modules[e])throw new o.PlayerModuleMissingError(e);var i=this.modules[e].moduleDefinition;null!=(t=i.hooks)&&t.remove&&i.hooks.remove(i.module),delete this.modules[e]}},e.get=function(e,t){void 0===t&&(t=!0),this.initialize();var i=this.modules[e];if(i&&i.module)return i.module;if(t)throw new o.PlayerModuleMissingError(e)},e.has=function(e){return void 0!==this.get(e,!1)},e.getModuleNames=function(){return Object.getOwnPropertyNames(this.modules)},e.getModuleDefinitions=function(){var e=this;return this.getModuleNames().map(function(t){return e.modules[t]})},e.callSetupHooks=function(e){this.getModuleDefinitions().filter(function(e){return e.moduleDefinition.hooks&&e.moduleDefinition.hooks.setup}).forEach(function(t){return t.moduleDefinition.hooks.setup(t.module,e)})},e.callDestroyHooks=function(e){return Promise.all(this.getModuleDefinitions().filter(function(e){return e.moduleDefinition.hooks&&e.moduleDefinition.hooks.destroy}).map(function(t){return t.moduleDefinition.hooks.destroy(t.module,e)})).then(function(){})},e}()},62756:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleName=void 0,function(e){e.VR="VR",e.XML="XML",e.Smooth="Smooth",e.AdvertisingCore="AdvertisingCore",e.Advertising="Advertising",e.AdvertisingIma="Advertising",e.AdvertisingBitmovin="Advertising",e.AdvertisingOmSdk="AdvertisingOmSdk",e.SGAI="SGAI",e.Polyfill="Polyfill",e.Patch="Patch",e.RemoteControl="RemoteControl",e.RendererMse="RendererMSE",e.EngineNative="EngineNative",e.EngineBitmovin="EngineBitmovin",e.ABR="ABR",e.Crypto="Crypto",e.HLS="HLS",e.DRM="DRM",e.DASH="DASH",e.ContainerTS="ContainerTS",e.ContainerMP4="ContainerMP4",e.ContainerWebM="ContainerWebM",e.Subtitles="Subtitles",e.SubtitlesTTML="SubtitlesTTML",e.SubtitlesWebVTT="SubtitlesWebVTT",e.SubtitlesCEA608="SubtitlesCEA608",e.SubtitlesNative="SubtitlesNative",e.Style="Style",e.Thumbnail="Thumbnail",e.ThumbnailImp="Thumbnail",e.UI="UI",e.Tizen="Tizen",e.Webos="webos",e.Vidaa="vidaa",e.Wpe="wpe",e.LowLatency="LowLatency",e.ServiceWorkerClient="ServiceWorkerClient",e.Envivio="Envivio",e.PlayStation5="PlayStation5",e.PlayStation4="PlayStation4",e.EngineWebRtc="EngineWebRtc",e.ReactNative="ReactNative"}(i||(t.ModuleName=i={}))},95880:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModuleMissingError=void 0;var r=i(40306);t.PlayerModuleMissingError=function(e){function t(t,i){return i?e.call(this,r.ErrorCode.MODULE_DEPENDENCY_MISSING,{name:t,dependency:i},"The ".concat(t," module requires the ").concat(i," module to be included as well."))||this:e.call(this,r.ErrorCode.MODULE_MISSING,{name:t},"The ".concat(t," module is required to play this stream."))||this}return n(t,e),t}(i(3336).PlayerError)},22374:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModuleMissingWarning=void 0;var r=i(25926),o=i(4224);t.PlayerModuleMissingWarning=function(e){function t(t,i){return e.call(this,o.WarningCode.MODULE_MISSING,i,{moduleName:t})||this}return n(t,e),t}(r.PlayerWarning)},4524:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferRangeHelper=t.MultiRange=void 0,t.rangeFixedValue=u,t.areDisjoint=function(e,t){return u(e.end)<u(t.start)||u(e.start)>u(t.end)},t.isSurrounding=function(e,t){return u(t.start)>u(e.start)&&u(t.end)<u(e.end)},t.isOverlapping=function(e,t){return u(e.start)>=u(t.start)&&u(e.start)<=u(t.end)||u(e.end)>=u(t.start)&&u(e.end)<=u(t.end)},t.isFullyIncluded=d,t.isInTimeRanges=h,t.getBufferedRanges=function(e){var t=[],i=null==e?void 0:e.buffered;if(i)for(var n=0;n<i.length;n++)t.push({start:i.start(n),end:i.end(n)});return t},t.convertRangeToTimeMode=function(e,t,i){var n,o=(0,s.toSeconds)(null!=(n=null==t?void 0:t.getTime())?n:0);return i===r.TimeMode.RelativeTime&&(o=-o),{start:e.start+o,end:e.end+o}};var r=i(20213),o=i(44468),a=i(76399),s=i(89927),l=100,c=function(){function e(e,t,i){this.start=e,this.end=t,this.hits=i||1}return e.prototype.getHits=function(){return this.hits},e.prototype.getStart=function(){return this.start},e.prototype.getEnd=function(){return this.end},e.prototype.MD=function(t){for(var i=[],n=0;n<t.length;n++){var r=t[n],o=r.start,a=r.end,s=r.hits,l=this.start<o&&this.end>a,c=this.start<o&&this.end>o&&this.end<a,u=this.start>o&&this.start<a&&this.end>a,d=this.start>o&&this.end<a,h=this.start===o&&this.end<a,p=this.start===o&&this.end>a,f=this.start<o&&this.end===a,m=this.start>o&&this.end===a,g=this.start===o&&this.end===a;l||p||f||g?i.push(new e(o,a,s+1)):c||h?(i.push(new e(o,this.end,s+1)),i.push(new e(this.end,a,s))):u||m?(i.push(new e(o,this.start,s)),i.push(new e(this.start,a,s+1))):d?(i.push(new e(o,this.start,s)),i.push(new e(this.start,this.end,s+1)),i.push(new e(this.end,a,s))):i.push(new e(o,a,s))}return i},e.prototype.ND=function(t){for(var i=0;i<t.length&&!(this.end-this.start<=0);i++){var n=t[i],r=null;i+1<t.length&&(r=t[i+1]),this.start<n.start?(t.unshift(new e(this.start,Math.min(n.start,this.end))),i++,this.start=n.end):r&&r.start>this.start?(t.splice(i,0,new e(Math.max(n.end,this.start),Math.min(this.end,r.start))),this.start=r.end,i++):null===r&&this.end>n.end&&(t.push(new e(Math.max(n.end,this.start),this.end)),this.start=this.end)}return t},e.prototype.intersect=function(e){if(0===e.length)return[this];var t=this.MD(e);return this.ND(t)},e}();function u(e){return void 0===e||isNaN(e)?0:Math.round(e*l)/l}function d(e,t){return u(t.start)<=u(e.start)&&u(t.end)>=u(e.end)}function h(e,t,i){void 0===i&&(i=0);for(var n=0,r=e;n<r.length;n++){var o=r[n],a=Math.min(Math.round(1e3*o.start)/1e3,o.start),s=Math.max(Math.round(1e3*o.end)/1e3,o.end);if(t>=a&&t<=s-i)return!0}return!1}t.MultiRange=c,t.BufferRangeHelper=function(){function e(){}return e.mergeRanges=function(e,t,i){if(void 0===t&&(t=0),void 0===i&&(i=!0),e.length<1)return e;e.sort(function(e,t){return e.start-t.start});var r=[];r.push(i?n({},e[0]):e[0]);for(var o=1;o<e.length;o++){var a=r.slice(-1)[0],s=e[o];if(!d(s,a)){var l=a.end>=s.start-t,c=a.end<=s.end+t;l&&c?r[r.length-1].end=s.end:r.push(i?n({},s):s)}}return r},e.excludeTimeRange=function(e,t){return e.filter(function(e){return!d(e,t)}).reduce(function(e,i){var r=function(e,t){return e>t.start&&e<=t.end}(t.start,i),o=function(e,t){return e<t.end&&e>=t.start}(t.end,i);return r&&e.push(n(n({},i),{end:t.start})),o&&e.push(n(n({},i),{start:t.end})),r||o||e.push(n({},i)),e},[])},e.getRangesFromQueue=function(t,i){void 0===i&&(i=0);for(var n=[],r=Array.isArray(t)?new a.ArrayIterator(t):t;r.hasNext();){var o=r.next();if(!o.isInit()){var s={start:o.getPlaybackTime()||0,end:0};s.end=s.start+o.getDuration(),n.push(s)}}return e.mergeRanges(n,i,!1)},e.getMultiRanges=function(e){var t=[],i=0;for(var n in e)if(e.hasOwnProperty(n)){i++;for(var r=e[n],o=0;o<r.length;o++)t=new c(r[o].start,r[o].end).intersect(t)}return[t,i]},e.findGapsInRanges=function(e){for(var t=[],i=0;i<e.length-1;i++)e[i+1].start-e[i].end>0&&t.push({start:e[i].end,end:e[i+1].start});return t},e.getCommonBufferedRanges=function(t){var i=[],n=e.getMultiRanges(t),r=n[0],o=n[1];for(var a in r)r.hasOwnProperty(a)&&r[a].getHits()===o&&i.push(r[a]);return i},e.getCommonBufferedTime=function(t,i,n,r){for(var o=-1,a=e.getCommonBufferedRanges(i),s=0;s<a.length;s++)if(a[s].getStart()<=n&&a[s].getEnd()>=n)return n;for(var l in i)if(i.hasOwnProperty(l)){if(i[l].length<1)return null;var c=i[l];for(s=0;s<c.length&&!(c[s].start>=o&&(o=c[s].start,c[s].start>=n));s++);}return -1===o?null:o<n&&n-o<r?n:(t.debug("common time diff [s]",n-o),o)},e.isInBufferedRange=function(e,t){var i=Object.keys(e);return!!i.length&&i.every(function(i){return h(e[i],t)})},e.getTotalCommonBufferLength=function(e){return this.getCommonBufferedRanges(e).reduce(function(e,t){return e+t.getEnd()-t.getStart()},0)},e.getBufferLevel=function(e,t,i){if(!e||!e.length)return 0;var n=0;return i===o.BufferType.ForwardDuration?n=e[e.length-1].end-t:i===o.BufferType.BackwardDuration&&(n=t-e[0].start),Math.max(n,0)},e}()},17564:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferSettings=void 0;var n=i(44468),r=i(85434);t.BufferSettings=function(){function e(e,t){this.logger=t,this.tbb=JSON.parse(JSON.stringify(e)),this.ubb={},this.wbb(this.ubb,this.tbb),this.vbb={currentDistanceToLiveEdge:1/0,minimumBufferLength:1,streamDuration:1/0}}return e.prototype.wbb=function(e,t){Object.keys(t).forEach(function(t){e[t]={}})},e.prototype.setTargetLevel=function(e,t,i){"number"==typeof t&&(this.tbb[i][e]=t)},e.prototype.xbb=function(e,t,i){this.ubb[i][e]=t},e.prototype.setTargetBufferLevelConstraints=function(e){this.vbb=e},e.prototype.setDistanceToLiveEdge=function(e){this.vbb.currentDistanceToLiveEdge=e},e.prototype.getTargetLevel=function(e,t){var i,r,o,a,s=null!=(r=null==(i=this.tbb[t])?void 0:i[e])?r:1/0,l=null!=(a=null==(o=this.ubb[t])?void 0:o[e])?a:1/0,c=this.vbb.minimumBufferLength,u=this.vbb.streamDuration;return Math.max(Math.min(s,l,e===n.BufferType.BackwardDuration?1/0:this.vbb.currentDistanceToLiveEdge,u),c)},e.prototype.getForwardTargetLevel=function(e){return void 0===e&&(e=n.MediaType.Video),this.getTargetLevel(n.BufferType.ForwardDuration,e)},e.prototype.getBackwardTargetLevel=function(e){return void 0===e&&(e=n.MediaType.Video),this.getTargetLevel(n.BufferType.BackwardDuration,e)},e.prototype.ybb=function(e){var t,i=r.MimeTypeHelper.isAudio(e)?n.MediaType.Audio:n.MediaType.Video;return(t={})[n.BufferType.BackwardDuration]=this.getBackwardTargetLevel(i),t[n.BufferType.ForwardDuration]=this.getForwardTargetLevel(i),t},e.prototype.zbb=function(e,t,i){var r,o=i/2,a=i/2,s=this.ybb(e),l=s[n.BufferType.BackwardDuration],c=s[n.BufferType.ForwardDuration],u=i>=2*t,d=c/(c+l);if(!isFinite(l)&&isFinite(c)?(o=t,a=i-t):isFinite(l)&&!isFinite(c)?(o=i-t,a=t):isFinite(l)&&isFinite(c)&&(o=i*d,a=i*(1-d)),u&&o<t){var h=t-o;o+=h,a-=h}return(r={})[n.BufferType.BackwardDuration]=a,r[n.BufferType.ForwardDuration]=o,r},e.prototype.adjustMaxBufferLevels=function(e,t,i){var r=this.zbb(t,e,i-e),o=r[n.BufferType.BackwardDuration],a=r[n.BufferType.ForwardDuration];this.logger.debug("Setting new target buffer levels to ".concat(a," (forward) and ").concat(o," (backward)")),this.xbb(n.BufferType.ForwardDuration,a,n.MediaType.Audio),this.xbb(n.BufferType.ForwardDuration,a,n.MediaType.Video),this.xbb(n.BufferType.BackwardDuration,o,n.MediaType.Audio),this.xbb(n.BufferType.BackwardDuration,o,n.MediaType.Video)},e}()},66790:function(e,t){var i,n,r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.DrmSetupError=t.TransmuxingRejectionReason=t.SegmentVerificationResult=t.APPLE_KEYFORMAT_DELIVERY=t.HlsEncryptionMethods=t.HlsEncryptionMethod=t.SOURCE_BUFFER_APPEND_STATUS=t.RepresentationType=void 0,function(e){e[e.AUDIO=1]="AUDIO",e[e.VIDEO=2]="VIDEO",e[e.SUBTITLE=3]="SUBTITLE"}(i||(t.RepresentationType=i={})),function(e){e[e.FAILURE=0]="FAILURE",e[e.QUOTA_EXCEEDED=1]="QUOTA_EXCEEDED",e[e.SUSPENDED=2]="SUSPENDED"}(n||(t.SOURCE_BUFFER_APPEND_STATUS=n={})),function(e){e.NONE="NONE",e.AES_128="AES-128",e.SAMPLE_AES="SAMPLE-AES",e.SAMPLE_AES_CTR="SAMPLE-AES-CTR"}(r||(t.HlsEncryptionMethod=r={})),t.HlsEncryptionMethods=Object.keys(r).map(function(e){return r[e]}),t.APPLE_KEYFORMAT_DELIVERY="com.apple.streamingkeydelivery",function(e){e.Publish="publish",e.Drop="drop",e.Park="park"}(o||(t.SegmentVerificationResult=o={})),function(e){e.INVALID_TS_SEGMENT="Invalid TS segment, could not extract segment information",e.TRANSMUXING_ABORTED="Transmuxing was aborted as it is no longer needed"}(a||(t.TransmuxingRejectionReason=a={})),function(e){e.CANCELLED="Loading was cancelled for the DRM source",e.MISSING_CONFIGURATION="DRM is not configured"}(s||(t.DrmSetupError=s={}))},56481:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dispose=function(e){e&&e.dispose()}},86969:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.Player=void 0;var o=i(43662);Object.defineProperty(t,"Player",{enumerable:!0,get:function(){return o.Player}}),r(i(20213),t),t.util=i(64681),t.default=o.Player},45202:function(e,t){function i(e){return e.hasAttribute("src")&&null!=e.src}Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0,t.Environment=function(){function e(){}return Object.defineProperty(e,"hostname",{get:function(){return this._hostname||(this._hostname=location.hostname),this._hostname},set:function(e){this._hostname=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"baseUrl",{get:function(){return e.getURL()},enumerable:!1,configurable:!0}),e.checkDomainLock=function(){if(0===this.domains.length||"localhost"===this.hostname)return!0;for(var e=0,t=this.domains.split(",");e<t.length;e++){var i=t[e],n=i.substring(2),r=this.hostname.length-n.length,o=this.hostname.indexOf(n),a=-1!==o&&o===r,s=i.startsWith("*.")&&a;if(i===this.hostname||s)return!0}return!1},e.getURL=function(){var e=this.getCurrentScriptURL();return e.lastIndexOf("/")>-1?e.substring(0,e.lastIndexOf("/")+1):""},e.generateExceptionStack=function(){try{omgwtfnodocumentdotcurrentscript}catch(e){return e.stack}},e.getCurrentScriptFallback=function(){var e=this.generateExceptionStack();if(!e)return"";for(var t=-1!==e.indexOf(" at ")?" at ":"@";-1!==e.indexOf(t);)e=e.substring(e.indexOf(t)+t.length);var i=e.lastIndexOf(":",e.lastIndexOf(":")-1);return e.substring(e.indexOf("(")+1,i)},e.getCurrentScriptURL=function(){var e,t;if(null!=(e=window.document)&&e.currentScript){var n=window.document.currentScript.src;return n.indexOf("modules/bitmovinplayer-core.js")>-1?n.substring(0,n.lastIndexOf("modules/bitmovinplayer-core.js")):n}for(var r=(null==(t=window.document)?void 0:t.getElementsByTagName("script"))||[],o=r.length,a=0;a<o;a++)if(i(r[a])){if(r[a].src.indexOf("bitmovinplayer.js")>-1)return r[a].src;if(r[a].src.indexOf("modules/bitmovinplayer-core.js")>-1)return r[a].src.substring(0,r[a].src.indexOf("modules/bitmovinplayer-core.js"))}return this.getCurrentScriptFallback()||(r.length>0&&i(r[o-1])?r[o-1].src:"")},e.VERSION_NUMBER="8.259.0",e.idPrefix="bitmovinplayer-",e.domains="",e.modules={playerui:null},e}()},3714:function(e,t){var i,n,r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.ContentLocationChangedReason=t.LatencyMode=t.AdInteractionType=t.AdQuartile=t.MetadataType=t.PlayerEvent=void 0,function(e){e.Ready="ready",e.Play="play",e.Playing="playing",e.Paused="paused",e.Seek="seek",e.Seeked="seeked",e.TimeShift="timeshift",e.TimeShifted="timeshifted",e.VolumeChanged="volumechanged",e.Muted="muted",e.Unmuted="unmuted",e.PlayerResized="playerresized",e.PlaybackFinished="playbackfinished",e.Error="error",e.Warning="warning",e.StallStarted="stallstarted",e.StallEnded="stallended",e.AudioChanged="audiochanged",e.AudioAdded="audioadded",e.AudioRemoved="audioremoved",e.VideoQualityChanged="videoqualitychanged",e.AudioQualityChanged="audioqualitychanged",e.VideoDownloadQualityChange="videodownloadqualitychange",e.AudioDownloadQualityChange="audiodownloadqualitychange",e.VideoDownloadQualityChanged="videodownloadqualitychanged",e.AudioDownloadQualityChanged="audiodownloadqualitychanged",e.VideoPlaybackQualityChanged="videoplaybackqualitychanged",e.AudioPlaybackQualityChanged="audioplaybackqualitychanged",e.TimeChanged="timechanged",e.CueParsed="cueparsed",e.CueEnter="cueenter",e.CueUpdate="cueupdate",e.CueExit="cueexit",e.SegmentPlayback="segmentplayback",e.Metadata="metadata",e.MetadataParsed="metadataparsed",e.MetadataChanged="metadatachanged",e.VideoAdaptation="videoadaptation",e.AudioAdaptation="audioadaptation",e.DownloadFinished="downloadfinished",e.SegmentRequestFinished="segmentrequestfinished",e.AdManifestLoaded="admanifestloaded",e.AdStarted="adstarted",e.OverlayAdStarted="overlayadstarted",e.AdQuartile="adquartile",e.AdSkipped="adskipped",e.AdClicked="adclicked",e.AdInteraction="adinteraction",e.AdLinearityChanged="adlinearitychanged",e.AdBreakStarted="adbreakstarted",e.AdBreakFinished="adbreakfinished",e.RestoringContent="restoringcontent",e.AdFinished="adfinished",e.AdError="aderror",e.VRViewingDirectionChange="vrviewingdirectionchange",e.VRViewingDirectionChanged="vrviewingdirectionchanged",e.VRStereoChanged="vrstereochanged",e.CastAvailable="castavailable",e.CastStopped="caststopped",e.CastStart="caststart",e.CastStarted="caststarted",e.CastWaitingForDevice="castwaitingfordevice",e.SourceLoaded="sourceloaded",e.SourceUnloaded="sourceunloaded",e.PeriodSwitch="periodswitch",e.PeriodSwitched="periodswitched",e.DVRWindowExceeded="dvrwindowexceeded",e.SubtitleAdded="subtitleadded",e.SubtitleRemoved="subtitleremoved",e.ShowAirplayTargetPicker="showairplaytargetpicker",e.AirplayAvailable="airplayavailable",e.AirplayChanged="airplaychanged",e.Destroy="destroy",e.PlaybackSpeedChanged="playbackspeedchanged",e.DurationChanged="durationchanged",e.ViewModeChanged="viewmodechanged",e.ModuleReady="moduleready",e.SubtitleEnable="subtitleenable",e.SubtitleEnabled="subtitleenabled",e.SubtitleDisable="subtitledisable",e.SubtitleDisabled="subtitledisabled",e.VideoQualityAdded="videoqualityadded",e.VideoQualityRemoved="videoqualityremoved",e.AudioQualityAdded="audioqualityadded",e.AudioQualityRemoved="audioqualityremoved",e.TargetLatencyChanged="targetlatencychanged",e.LatencyModeChanged="latencymodechanged",e.LicenseValidated="licensevalidated",e.DrmLicenseAdded="drmlicenseadded",e.AspectRatioChanged="aspectratiochanged",e.VisibilityChanged="visibilitychanged",e.ContentLocationChanged="contentlocationchanged"}(i||(t.PlayerEvent=i={})),function(e){e.CUETAG="CUETAG",e.DATERANGE="DATERANGE",e.EVENT_STREAM="EVENT-STREAM",e.CUSTOM="CUSTOM",e.SCTE="SCTE",e.ID3="ID3",e.EMSG="EMSG",e.CAST="CAST"}(n||(t.MetadataType=n={})),function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(r||(t.AdQuartile=r={})),function(e){e.Vpaid="vpaid"}(o||(t.AdInteractionType=o={})),function(e){e.Idle="idle",e.Catchup="catchup",e.Fallback="fallback",e.Suspended="suspended"}(a||(t.LatencyMode=a={})),function(e){e.Failover="failover",e.ContentSteering="contentsteering"}(s||(t.ContentLocationChangedReason=s={}))},20213:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.util=void 0,r(i(3714),t),t.util=i(29960),r(i(62756),t),r(i(44468),t),r(i(21281),t),r(i(3336),t),r(i(40306),t),r(i(4224),t),r(i(25926),t),r(i(95880),t),r(i(22374),t),r(i(29669),t)},88210:function(e,t){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.EnumerableValue=function(e,t){return t.addInitializer(function(){var e=Object.getOwnPropertyDescriptor(this,t.name)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),t.name);e&&Object.defineProperty(this,t.name,i(i({},e),{enumerable:!0}))}),e}},29691:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var m in n)f[m]="access"===m?{}:n[m];for(var m in n.access)f.access[m]=n.access[m];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,i[p])("accessor"===l?{get:d.get,set:d.set}:d[c],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&r.unshift(s)}else(s=a(g))&&("field"===l?r.unshift(s):d[c]=s)}u&&Object.defineProperty(u,n.name,d),h=!0},a=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.InternalPlayer=t.LOAD_CANCELLED_BY_DESTROY_MESSAGE=t.LOAD_CANCELLED_MESSAGE=void 0;var s,l,c=i(88052),u=i(62756),d=i(90571),h=i(78760),p=i(40306),f=i(3336),m=i(25926),g=i(4224),v=i(48143),y=i(80813),b=i(56481),S=i(45202),_=i(3714),E=i(51289),T=i(75375),w=i(89279),A=i(96859),P=i(13531),I=i(50172),C=i(69957),M=i(44468),R=i(72786),k=i(53031),x=i(29242),O=i(52546),D=i(83913),L=i(70962),N=i(69251),U=i(93907),F=i(23145),B=i(91565),V=i(7387),j=i(98714),z=i(23690),H=i(87827),G=i(85648),q=i(68925),W=i(63879),Y=i(69573),K=i(15971),X=i(30012),Q=i(21513),Z=i(61089),J=i(93204),$=i(47993),ee=i(34841),et=i(85434),ei=i(15487),en=i(28334),er=i(72537),eo=i(89927),ea=i(88844),es=i(23068),el=i(70850),ec=i(2079);(function(e){e[e.NONE=0]="NONE",e[e.MUTED_PLAY=1]="MUTED_PLAY",e[e.UNMUTED_PLAY=2]="UNMUTED_PLAY"})(s||(s={})),function(e){e.DROPPED_VIDEO_FRAMES="droppedVideoFrames",e.TOTAL_STALLED_TIME="totalStalledTime"}(l||(l={})),t.LOAD_CANCELLED_MESSAGE="Load call was cancelled by another load or unload call",t.LOAD_CANCELLED_BY_DESTROY_MESSAGE="Load was cancelled as the player is being destroyed";var eu=function(){var e,i,N,Y=[];return e=function(){function e(e,t,i){var n=this;if(this.sz=r(this,Y),this.xz=null,this.yz=null,this.Gz=Promise.resolve(),this.bA=["aHR0cHM6Ly9saWNlbnNpbmcuYml0bW92aW4uY29tL2xpY2Vuc2luZw==","aHR0cHM6Ly9zdHJlYW1pbmcubXBlZy1kYXNoLmNvbS9hY2Nlc3M=","aHR0cHM6Ly9saWNlbnNpbmcucGFuZG9yYXN0cmVhbWluZy5jb20vbGljZW5zaW5n","aHR0cHM6Ly9iaXRtb3Zpbi5zdGEuc2N0di5jaC9saWNlbnNpbmc="].map(function(e){return atob(e)}),this.cA=["aHR0cHM6Ly9saWNlbnNpbmcuYml0bW92aW4uY29tL2ltcHJlc3Npb24=","aHR0cHM6Ly9zdHJlYW1pbmcubXBlZy1kYXNoLmNvbS9wbGF5YmFjaw==","aHR0cHM6Ly9saWNlbnNpbmcucGFuZG9yYXN0cmVhbWluZy5jb20vaW1wcmVzc2lvbg==","aHR0cHM6Ly9iaXRtb3Zpbi5zdGEuc2N0di5jaC9pbXByZXNzaW9u"].map(function(e){return atob(e)}),this.dA=Promise.resolve(),this.eA=Promise.resolve(),this.HA=function(e){var t,i,r,o;
13if(void 0===e&&(e="api"),null==(i=null==(t=n.wz)?void 0:t.bitdashPlayer)?void 0:i.unload){var a=Promise.resolve();eg(e)||(a=n.JB(),n.GC(),n.JA()),null==(o=null==(r=n.wz)?void 0:r.eventHandler)||o.clearEventsOfType(_.PlayerEvent.TimeChanged),n.gA=!1,n.manifestApi=void 0,n.wz.context&&em(n.wz.context),n.Gz=n.Gz.then(function(){return a}).then(function(){var t,i;return null==(i=null==(t=n.wz)?void 0:t.bitdashPlayer)?void 0:i.unload(e).then(function(){var t;return null==(t=n.sz)?void 0:t.serviceManager.maybeCall(y.ServiceName.DrmService,function(t){return t.shutdownIfNeeded(eg(e))})}).then(function(){var t,i,r,o,a;n.aA&&(null==(t=n.aA)||t.removePosterImage(),null==(i=n.aA)||i.stopVisibilityTracking()),null!=(o=null==(r=n.wz)?void 0:r.context)&&o.sourceContext&&(eg(e)?n.wz.context.sourceContext.isAd&&n.IA():null==(a=n.sz)||a.serviceManager.removeNonPlayerScopeServices(),n.wz.context.sourceContext.dispose())})})}return n.Gz},this.setAudio=function(e){var t;n.wA()&&(null==(t=n.wz.bitdashPlayer)||t.setAudio(e))},this.zB=function(e){return void 0===e&&(e=n.getSource()),!!e&&!!e.vr&&(0,Q.getCapabilities)().isIOS},this.YB=function(e,t,i){if(void 0===i&&(i={}),e)n.fireEvent(_.PlayerEvent.LicenseValidated,{data:i});else{n.Lz=!1,n.Oz=n.XB(t);var r=function(){(0,ea.clearTimeoutIfDefined)(o),n.off(_.PlayerEvent.SourceLoaded,r),n.off(_.PlayerEvent.SourceUnloaded,r),n.Iz&&n.Iz.fireError(n.Oz)},o=window.setTimeout(r,500);n.on(_.PlayerEvent.SourceLoaded,r),n.on(_.PlayerEvent.SourceUnloaded,r),n.unload()}},this.aB=function(){var e,t,i;(null==(i=null==(t=null==(e=n.wz)?void 0:e.videoElement)?void 0:t.style)?void 0:i.getPropertyValue("display"))!=="none"||n.wz.vrHandler||n.wz.videoElement.style.setProperty("display","block","important")},this.bB=function(){n.wz&&n.wz.videoElement&&n.wz.videoElement.style&&n.wz.videoElement.style.setProperty("display","none","important")},this.xC=function(){var e=n.wz.configuration.playback().subtitleLanguage;return e?n.cB(e,n.listSubtitles(),function(e){return n.enableSubtitle(e,!0,!1)}):Promise.resolve()},this.yC=function(){var e=n.wz.configuration.playback().audioLanguage;return e?n.cB(e,n.getAvailableAudio(),n.setAudio):Promise.resolve()},this.DC=function(){var e;if(!(null!=(e=n.sz.sourceContext)&&e.isAd)&&(n.HA(),n.tz)){var t=n.tz.getElementsByClassName(S.Environment.idPrefix+"poster")[0];t&&(t.style.display="block")}},this.FC=function(){if(n.Cz){n.Az.tweaks().hasOwnProperty("impressionServer")&&(n.cA.indexOf(n.Az.tweaks().impressionServer)>-1?n.Cz.setImpressionServerUrl(n.Az.tweaks().impressionServer):n.vz.warn("Invalid impression server",new f.PlayerError(p.ErrorCode.SETUP_INVALID_IMPRESSION_SERVER,{"impression-server":n.Az.tweaks().impressionServer})));var e=n.Az.get("network");n.Cz.issue(n.getConfig().key,n.getPlayerType(),null==e?void 0:e.requestApi).then(function(){},function(){})}},this.JC=function(e,t){if(n.isCastingToCAF()&&t.connectionState===G.ConnectionState.Disconnected&&n.yA()&&n.AA().isLinearAdActive()){var i=n.AA().playerAdvertisingApi;n.KC(i)}},this.LC=function(){var e,t=ey(n.sz);null!=(e=n.AA())&&e.isLinearAdActive()||n.sz.sourceContext.isAd?n.fireEvent(_.PlayerEvent.PlaybackFinished):n.hA||n.jA||setTimeout(function(){n.jA=Promise.resolve().then(function(){var e,t;return null!=(t=null==(e=n.AA())?void 0:e.playPostRollAds())?t:Promise.resolve()}).then(function(){var e;return null!=(e=null==t?void 0:t.playPostRollAds())?e:Promise.resolve()}).then(function(){n.jA=null,n.MC()})})},this.MC=function(){n.Cz&&n.Cz.reset(),n.hA=!0,n.fireEvent(_.PlayerEvent.PlaybackFinished)},this.NC=function(){!(n.yA()&&n.getAds()&&n.getAds().isLinearAdActive())&&n.hA&&(n.hA=!1),n.Nz=n.OC(n.Nz)},Object.keys((0,Q.getCapabilities)()).length||(0,Q.default)().dispatch((0,B.initializeCapabilities)()),this.tz=e,this.id=t,this.uz=i,this.gA=!1,this.vz=new P.Logger(L.DefaultSettings),this.zz=new er.StorageHandler((0,Q.getCapabilities)().isLocalStorageAvailable),this.Az=null,this.Bz=NaN,this.Fz=new x.PlayerFactory,this.Iz=new E.EventHandler(this.vz,this.uz,this.id),this.Mz=s.NONE,c.ModuleManager.has(u.ModuleName.DRM)){var o=c.ModuleManager.get(u.ModuleName.DRM).DRMDetectorService;this.Jz=new o,this.drmApi=c.ModuleManager.get(u.ModuleName.DRM).createDrmApi(function(){var e;return null==(e=n.sz)?void 0:e.serviceManager},this.vz)}this.lA=!1,this.EC()}return e.prototype.tA=function(){return this.sz&&this.sz.store&&(0,H.isBeingDestroyed)(this.sz.store.getState().player)||!1},e.prototype.uA=function(){return this.sz&&this.sz.store&&(0,H.isDestroyed)(this.sz.store.getState().player)||!1},e.prototype.vA=function(){return!!(this.wz&&this.wz.bitdashPlayer)&&!this.uA()},e.prototype.wA=function(){return this.xA()&&this.gA},e.prototype.xA=function(){return this.vA()&&!!this.wz&&!!this.wz.bitdashPlayer},e.prototype.yA=function(){return!!(this.wz&&this.wz.adController)},e.prototype.zA=function(){c.ModuleManager.get(u.ModuleName.Advert
13ising);var e=c.ModuleManager.get(u.ModuleName.AdvertisingCore);this.wz.adController=new e.AdvertisingController(this,this.wz.context),this.Iz&&this.Iz.dispatchEvent(_.PlayerEvent.ModuleReady,{name:u.ModuleName.Advertising})},e.prototype.AA=function(){return this.yA()?this.wz.adController:null},e.prototype.BA=function(){if(!this.vA()||!(null!=(e=this.wz)&&e.vrHandler))return!1;var e,t=this.wz.vrHandler.getState();return!!t&&"error"!==t},e.prototype.CA=function(e,t){var i;if(!e||!t)return null;if(t.streaming===M.StreamType.Dash)i=e.dash;else if(t.streaming===M.StreamType.Hls)i=e.hls;else if(t.streaming===M.StreamType.Progressive)i=e.progressive;else if(t.streaming===M.StreamType.Smooth)i=e.smooth;else{if(t.streaming!==M.StreamType.Whep)return null;i=e.whep}return i?{type:t.streaming,url:i,title:e.title,description:e.description,vr:e.vr,config:e}:null},e.prototype.DA=function(){var e=new v.ServiceManager;return new k.PlayerContext({container:this.tz,eventHandler:this.wz.eventHandler,config:this.wz.configuration.get(),storedConfig:this.zz,settings:this.wz.configuration.getSettings(),logger:this.vz,serviceManager:e,internalPlayer:this,segmentInfoService:this.mA,
13segmentPrefetchingService:this.nA,segmentCacheService:this.oA,adRestorationOptimizationService:this.pA})},e.prototype.EA=function(e,t){var i=this;if(!this.wz)return Promise.resolve();var n=this.wz.configuration;n.logs&&n.logs().level&&this.setLogLevel(n.logs().level),this.vz.setConfig(n);var r=this.Kz;this.wz.videoElement&&(null!=r||(r=this.wz.videoElement.getWrappedElement()),this.wz.videoElement.dispose()),this.sz.setVideoElement(r??document.createElement("video"));var o={context:this.sz,playerInstance:this.wz,container:this.tz,config:n,source:e,forceTech:t,styleManager:this.aA};return this.FA(),this.Fz.getInstance(o).then(function(e){var t,n,r;return i.uA()?null==(t=e.bitdashPlayer)?void 0:t.release().then(function(){e.videoElement&&e.videoElement.dispose(),e.bitdashPlayer=null,e.technology=null,e.videoElement=null}):(i.wz.context=e.context,i.wz.logger=e.logger,i.wz.bitdashPlayer=e.bitdashPlayer,i.wz.technology=e.technology,i.wz.videoElement=e.videoElement,i.wz.hasInitStarted=!0,i.wz.playerConfig.visibility="visible",i.GA(i.wz.context),!i.Pz&&i.tz&&(i.Pz=new ec.ViewModeHandler(i.wz,i.tz,null!=(r=null==(n=i.Iz)?void 0:n.getEventFunction())?r:function(){},i.zB)),i.dB(),Promise.resolve())})},e.prototype.FA=function(){this.rA&&this.rA(),this.sA&&this.sA(),this.rA=(0,J.subscribe)(this.sz.store)(function(e){return(0,H.getIsStopped)((0,H.getPlayerState)(e))},this.LC,function(e){return!0===e}),this.sA=(0,J.subscribe)(this.sz.store)(function(e){return(0,H.getRemoteControlState)((0,H.getPlayerState)(e))},this.JC,function(){return!0})},e.prototype.GA=function(e){this.yA()&&this.AA().updatePlayerContext(e),e.segmentInfoService&&e.segmentInfoService.updatePlayerContext(e),e.segmentPrefetchingService&&e.segmentPrefetchingService.updatePlayerContext(e),e.segmentCacheService&&e.segmentCacheService.updatePlayerContext(e),e.adRestorationOptimizationService&&e.adRestorationOptimizationService.updatePlayerContext(e)},e.prototype.setVideoQuality=function(e){var t;this.wA()&&(e=String(e)||"auto",null==(t=this.wz.bitdashPlayer)||t.setVideoQuality(e))},e.prototype.setAudioQuality=function(e){var t;this.wA()&&(e=String(e)||"auto",null==(t=this.wz.bitdashPlayer)||t.setAudioQuality(e))},e.prototype.IA=function(){this.wz.context.serviceManager.delete(y.ServiceName.SourceStoreService,this.wz.context.sourceContext.sourceIdentifier)},e.prototype.JA=function(){var e,t,i,n,r,o;null==(t=null==(e=this.wz.context)?void 0:e.adRestorationOptimizationService)||t.reset(),null==(n=null==(i=this.wz.context)?void 0:i.segmentPrefetchingService)||n.reset(),null==(o=null==(r=this.sz)?void 0:r.serviceManager)||o.maybeCall(y.ServiceName.ManifestCachingService,function(e){return e.clear()})},e.prototype.unload=function(e){var t,i,n,r,o=this;return void 0===e&&(e="api"),this.fA=null,eg(e)&&(this.Hz=void 0),eg(e)?(this.HC(l.DROPPED_VIDEO_FRAMES,null!=(i=null==(t=this.wz.bitdashPlayer)?void 0:t.getDroppedVideoFrames())?i:0),this.HC(l.TOTAL_STALLED_TIME,null!=(r=null==(n=this.wz.bitdashPlayer)?void 0:n.getTotalStalledTime())?r:0)):(this.xz=null,this.yz=null),this.dA.finally(function(){return o.HA(e)})},e.prototype.isCasting=function(){var e;return!!(this.xA()&&ep(this.wz.bitdashPlayer)&&this.isCastAvailable())&&!!(null!=(e=this.wz.bitdashPlayer)&&e.isCasting())},e.prototype.castVideo=function(){var e;this.xA()&&ep(this.wz.bitdashPlayer)&&this.wz.bitdashPlayer.isCastAvailable()&&(null==(e=this.wz.bitdashPlayer)||e.castVideo())},e.prototype.isCastAvailable=function(){return this.xA()&&ep(this.wz.bitdashPlayer)&&this.wz.bitdashPlayer.isCastAvailable()},e.prototype.seek=function(e,t){if(void 0===t&&(t="api"),this.yA()&&this.AA().isLinearAdActive()||!this.wA())return!1;if(null!=(i=this.Hz)&&i.seeking&&ef(t))return null==(n=this.sz)||n.logger.debug("Seeking blocked by playback restrictions"),!1;var i,n,r,o,a,s=null==(r=this.wz.bitdashPlayer)?void 0:r.isLive(),l=this.getSeekableRange(),c=-1!==l.start||-1!==l.end;return!!(!s||s&&this.wz.settings.ENABLE_SEEK_FOR_LIVE)&&(this.KA()?(this.lA=!0,!!(null!=(o=this.wz.bitdashPlayer)&&o.seek(e,t))):!!c&&(this.lA=!0,e=this.LA(e,l),eg(t)||this.isLive()||(e=Math.min(e,l.end-this.wz.settings.SEEK_TO_END_OFFSET)),!!(null!=(a=this.wz.bitdashPlayer)&&a.seek(e,t))))},e.prototype.KA=function(){return this.getPlayerType().includes(M.PlayerType.
13Native)},e.prototype.addMetadata=function(e,t){var i;return!(!this.xA()||!ep(this.wz.bitdashPlayer))&&(null==(i=this.wz.bitdashPlayer)?void 0:i.addMetadata(e,t))},e.prototype.LA=function(e,t){if(e<t.start||e>t.end){var i=e;e=Math.min(e=Math.max(e,t.start),t.end),this.vz.debug("seek time out of seekable range ("+t.start+" to "+t.end+") correcting from "+i+" to "+e)}return e},e.prototype.isMuted=function(){var e;return this.xA()?!!(null!=(e=this.wz.bitdashPlayer)&&e.isMuted()):this.wz.muted},e.prototype.getAvailableAudio=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getAvailableAudio())?t:[]},e.prototype.setAspectRatio=function(e){this.aA?this.aA.setAspectRatio(e):this.vz.debug("Unable to set aspect ratio: the style module is missing.")},e.prototype.MA=function(e){var t=this.listSubtitles().find(function(t){return t.id===e});t&&this.fireEvent(_.PlayerEvent.SubtitleEnabled,{subtitle:n({},t)})},e.prototype.NA=function(){var e=this;return Promise.all(this.listSubtitles().filter(function(e){return e.enabled}).map(function(t){return e.disableSubtitle(t.id,!1)}))},e.prototype.enableSubtitle=function(e,t,i){var r=this;void 0===t&&(t=!0),void 0===i&&(i=!0);var o=this.listSubtitles().find(function(t){return t.id===e});return this.wA()&&o&&!o.enabled?(i&&this.fireEvent(_.PlayerEvent.SubtitleEnable,{subtitle:n({},o)}),Promise.resolve().then(function(){return t?r.NA():Promise.all([!1])}).then(function(){var t;return!!(null!=(t=r.wz.bitdashPlayer)&&t.enableSubtitle(e))}).then(function(t){return t&&r.MA(e),t})):Promise.resolve(!1)},e.prototype.disableSubtitle=function(e,t){var i=this;if(void 0===t&&(t=!0),this.wA()){var r=this.listSubtitles().find(function(t){return t.id===e});if(r&&r.enabled)return t&&this.fireEvent(_.PlayerEvent.SubtitleDisable,{subtitle:n({},r)}),this.wz.bitdashPlayer?this.wz.bitdashPlayer.disableSubtitle(e).then(function(e){return e&&i.fireEvent(_.PlayerEvent.SubtitleDisabled,{subtitle:n(n({},r),{enabled:!1})}),e}):Promise.resolve(!1)}return Promise.resolve(!1)},e.prototype.preload=function(){var e,t;this.wA()&&!this.isLive()&&(this.lA||this.zC(this.wz.source,!!(null!=(e=this.wz.bitdashPlayer)&&e.isLive())),null==(t=this.wz.bitdashPlayer)||t.preload())},e.prototype.mute=function(e){var t;this.wz.muted=!0,this.xA()&&(this.yA()&&!this.isMuted()&&this.AA().onVolumeChanged(0),this.Ez=this.getVolume(),null==(t=this.wz.bitdashPlayer)||t.mute(e))},e.prototype.unmute=function(e){var t;if(this.wz.muted=!1,this.xA()){if(this.yA()&&this.isMuted()){var i=isNaN(this.Ez)?100:this.Ez;this.Ez=NaN,this.AA().onVolumeChanged(i)}null==(t=this.wz.bitdashPlayer)||t.unmute(e)}},e.prototype.listSubtitles=function(){var e,t;return this.wA()?a([],null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.listSubtitles().map(function(e){return n({},e)}))?t:[],!0):[]},e.prototype.getDuration=function(e){var t,i;return void 0===e&&(e="api"),this.xA()?!eg(e)&&this.WA()?this.AA().getDuration():this.wA()&&null!=(i=null==(t=this.wz.bitdashPlayer)?void 0:t.getDuration())?i:0:0},e.prototype.setVolume=function(e,t){var i;this.wz.volume=e,this.xA()&&(null==(i=this.wz.bitdashPlayer)||i.setVolume(e,t),this.yA()&&this.AA().onVolumeChanged(e))},e.prototype.timeShift=function(e,t){var i,n,r;null!=(i=this.Hz)&&i.seeking&&ef(t)?null==(n=this.sz)||n.logger.debug("Time shift blocked by playback restrictions"):this.wA()&&(e=this.OA(e),null==(r=this.wz.bitdashPlayer)||r.timeShift(e,t),this.lA=!0)},e.prototype.OA=function(e){if(e<=0)return e;var t,i=(0,eo.toSeconds)(Date.now());this.KA()||(i-=null==(t=this.bufferApi.getLevel(M.BufferType.ForwardDuration,M.MediaType.Video))?void 0:t.targetLevel);var n=Math.min(e-i,0);return this.vz.debug("Timeshifting to timestamp: ".concat(e,", converted relative offset is: ").concat(n)),n},e.prototype.setQueryParameters=function(e){var t;this.xA()&&(null==(t=this.wz.bitdashPlayer)||t.setQueryParameters(e))},e.prototype.clearQueryParameters=function(){var e;this.xA()&&(null==(e=this.wz.bitdashPlayer)||e.clearQueryParameters())},e.prototype.showAirplayTargetPicker=function(){var e;this.xA()&&(null==(e=this.wz.bitdashPlayer)||e.showAirplayTargetPicker())},e.prototype.getVolume=function(){var e,t;return this.xA()?null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getVolume())?t:0:this.wz.volume},e.prototype.getLatency=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getLatency())?t:0},e.prototype.setTargetLatency=function(e){var t;this.wA()&&("number"!=typeof e||e<0?this.ZB("lowlatency.setLiveLatency","Invalid value: ".concat(e),"value","".concat(e)):null==(t=this.wz.bitdashPlayer)||t.setTargetLatency(e))},e.prototype.getTargetLatency=function(){var e,t;return this.wA()?null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getTargetLatency())?t:0:-1},e.prototype.setCatchupConfig=function(e){var t;this.wA()&&(null==(t=this.wz.bitdashPlayer)||t.setCatchupConfig(e))},e.prototype.getCatchupConfig=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getCatchupConfig())?t:null},e.prototype.setFallbackConfig=function(e){var t;this.wA()&&(null==(t=this.wz.bitdashPlayer)||t.setFallbackConfig(e))},e.prototype.getFallbackConfig=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getFallbackConfig())?t:null},e.prototype.getCurrentTime=function(e,t){var i,n;return void 0===e&&(e="api"),void 0===t&&(t=M.TimeMode.AbsoluteTime),this.WA()&&!eg(e)?this.AA().getCurrentTime():this.wA()&&null!=(n=null==(i=this.wz.bitdashPlayer)?void 0:i.getCurrentTime(t))?n:0},e.prototype.setTargetBufferLevel=function(e,t,i){var n;if(this.xA()){var r=Object.keys(M.BufferType).some(function(t){return e===M.BufferType[t]}),o=Object.keys(M.MediaType).some(function(e){return i===M.MediaType[e]});r?o?"number"!=typeof t||t<0?this.ZB("buffer.setTargetLevel","Invalid value: ".concat(t),"value","".concat(t)):null==(n=this.wz.bitdashPlayer)||n.setTargetBufferLevel(e,t,i):this.ZB("buffer.setTargetLevel","Invalid media type: ".concat(i),"media","".concat(i)):this.ZB("buffer.setTargetLevel","Invalid buffer type: ".concat(e),"type","".concat(e))}},e.prototype.getBufferLevel=function(e,t){var i,n,r={level:null,targetLevel:null,type:e,media:t};return this.xA()&&this.PA(e,t)&&null!=(n=null==(i=this.wz.bitdashPlayer)?void 0:i.getBufferLevel(e,t))?n:r},e.prototype.PA=function(e,t){var i=Object.keys(M.BufferType).some(function(t){return e===M.BufferType[t]}),n=Object.keys(M.MediaType).some(function(e){return t===M.MediaType[e]});return i&&n},e.prototype.getAudioBufferLength=function(){return this.wA()?this.getBufferLevel(M.BufferType.ForwardDuration,M.MediaType.Audio).level:null},e.prototype.getVideoBufferLength=function(){return this.wA()?this.getBufferLevel(M.BufferType.ForwardDuration,M.MediaType.Video).level:null},e.prototype.getMaxTimeShift=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getMaxTimeShift())?t:0},e.prototype.getTimeShift=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getTimeShift())?t:0},e.prototype.isStalled=function(){var e;return this.wA()&&!!(null!=(e=this.wz.bitdashPlayer)&&e.isStalled())},e.prototype.isLive=function(){var e;return this.wA()&&!!(null!=(e=this.wz.bitdashPlayer)&&e.isLive())},e.prototype.hasEnded=function(){var e;return this.wA()&&!!(null!=(e=this.wz.bitdashPlayer)&&e.hasEnded())},e.prototype.getAvailableVideoQualities=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getAvailableVideoQualities())?t:[]},e.prototype.getAvailableAudioQualities=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getAvailableAudioQualities())?t:[]},e.prototype.QA=function(){var e;return this.xA()&&!!this.wz.videoElement&&!!(null!=(e=this.wz.videoElement)&&e.isPictureInPicture())},e.prototype.isAirplayAvailable=function(){var e;return this.xA()&&!!(null!=(e=this.wz.bitdashPlayer)&&e.isAirplayAvailable())},e.prototype.isAirplayActive=function(){var e;return this.xA()&&!!(null!=(e=this.wz.bitdashPlayer)&&e.isAirplayActive())},e.prototype.getDownloadedVideoData=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getDownloadedVideoData())?t:{i
13d:"",bitrate:0,height:0,width:0,isAuto:!0}},e.prototype.getDownloadedAudioData=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getDownloadedAudioData())?t:{id:"",bitrate:0,isAuto:!0}},e.prototype.getPlaybackVideoData=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getPlaybackVideoData())?t:{id:"",bitrate:0,height:0,width:0,uid:void 0}},e.prototype.getPlaybackAudioData=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getPlaybackAudioData())?t:{id:"",bitrate:0}},e.prototype.getAspectRatio=function(){var e,t;return null!=(t=null==(e=this.aA)?void 0:e.getAspectRatio())?t:0},e.prototype.getVisibility=function(){var e;return(null==(e=this.aA)?void 0:e.getVisibility())||{isVisible:!1,percentVisible:0}},e.prototype.getAudio=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getAudio())?t:null},e.prototype.getBufferedRanges=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getBufferedRanges())?t:[]},e.prototype.getAvailableSegments=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getAvailableSegments())?t:{}},e.prototype.getAudioQuality=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getAudioQuality())?t:{id:"auto",bitrate:null}},e.prototype.getManifest=function(){return this.yz},e.prototype.getDroppedVideoFrames=function(){var e,t;return this.IC(l.DROPPED_VIDEO_FRAMES,!(this.yA()&&this.AA().isLinearAdActive()),this.xA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getDroppedVideoFrames())?t:0)},e.prototype.getTotalStalledTime=function(){var e,t;return this.IC(l.TOTAL_STALLED_TIME,!(this.yA()&&this.AA().isLinearAdActive()),this.xA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getTotalStalledTime())?t:0)},e.prototype.getVideoQuality=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getVideoQuality())?t:{id:"auto",bitrate:null,width:null,height:null}},e.prototype.RA=function(e){var t=this;return new Promise(function(i){var n,r,o=!1,a=!1,s=function(){t.off(_.PlayerEvent.AdBreakStarted,s),o=!0,t.lA=!1},l=function(){t.off(_.PlayerEvent.AdStarted,l),t.iA=null,a=!0,i()};t.on(_.PlayerEvent.AdBreakStarted,s),t.on(_.PlayerEvent.AdStarted,l),t.wz.context.serviceManager.get(y.ServiceName.PlayerStateService).transitionToPlayState(!0,e),(null!=(r=null==(n=t.AA())?void 0:n.playPreRollAds())?r:Promise.resolve()).then(function(){var e,i;return null!=(i=null==(e=ey(t.sz))?void 0:e.playPreRollAds())?i:Promise.resolve()}).then(function(){t.iA=null,t.isContentPlaying()||o&&a||!t.gA?i():i(t.play(e))}).finally(function(){t.off(_.PlayerEvent.AdBreakStarted,s),t.off(_.PlayerEvent.AdStarted,l)})})},e.prototype.isCastingToCAF=function(){var e=(0,H.getRemoteControlState)(this.sz.store.getState().player);return e.remoteControlType===G.RemoteControlType.GoogleCastV3&&e.connectionState!==G.ConnectionState.Disconnected},e.prototype.SA=function(){if(this.hasCurrentSourcePlayedOnce())return!1;var e=this.AA(),t=ey(this.sz);return(null==e?void 0:e.hasAlreadyRequestedPreRollAds())===!1||(null==t?void 0:t.shouldPlayPreRollAds())===!0},e.prototype.TA=function(){if(this.isCasting())return!1;var e=this.Mz===s.NONE,t=this.Mz===s.MUTED_PLAY;return e||!this.isMuted()&&t},e.prototype.UA=function(){var e=this;this.wz.vrHandler&&this.wz.vrHandler.requestDeviceOrientationPermission().then(function(){return e.vz.debug("Device orientation permission granted")}).catch(function(){return e.vz.debug("Device orientation permission denied")})},e.prototype.play=function(e){var t=this;return void 0===e&&(e="api"),this.VA(e)?this.iA?this.iA.then(function(){return t.AA().play()}):this.AA().play():this.wA()?this.SA()&&!this.isCastingToCAF()?this.iA=this.RA(e):(this.lA||this.sz.sourceContext.isAd||this.zC(this.wz.source,this.isLive()),this.UA(),this.wz.bitdashPlayer?this.wz.bitdashPlayer.play(e).then(function(){t.Mz=t.OC(t.Mz),t.setPlaybackSpeed(t.wz.playbackSpeed)}).catch(function(i){var n;return t.vz.debug("playback could not be started: ",i),t.TA()&&(t.fireEvent(_.PlayerEvent.Warning,new m.PlayerWarning(g.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED)),!t.isCasting()&&t.gA&&t.pause(),i instanceof Error&&"NotAllowedError"===i.name&&(null==(n=t.wz.context.serviceManager.get(y.ServiceName.PlayerStateService))||n.transitionToPausedState(!0,e))),Promise.reject(i)}):Promise.reject("Player is not available.")):Promise.reject(new f.PlayerError(p.ErrorCode.SOURCE_INVALID,void 0,"No source was loaded when `play()` was called. Please call `load()` first, and wait for the promise to resolve before calling `play()`."))},e.prototype.VA=function(e){if(eg(e))return!1;var t=!!this.iA;return this.WA()||t},e.prototype.WA=function(){return!!this.yA()&&this.AA().isLinearAdActive()},e.prototype.pause=function(e){var t,i=this;void 0===e&&(e="api"),this.VA(e)?this.iA?this.iA.then(function(){return i.AA(
vendor: 13,153 bytes, line 13
13).pause()}):this.AA().pause():this.wA()&&(null==(t=this.wz.bitdashPlayer)||t.pause(e))},e.prototype.castStop=function(){var e;this.xA()&&ep(this.wz.bitdashPlayer)&&(null==(e=this.wz.bitdashPlayer)||e.castStop())},e.prototype.setLogLevel=function(e){this.vz.setLogLevel(e)},e.prototype.getLogger=function(){return this.vz},e.prototype.XA=function(e,t,i){var n;this.wz&&this.wz.eventHandler?n=this.wz.eventHandler:this.Iz&&(n=this.Iz),n.on(e,t,i)},e.prototype.onInternal=function(e,t){this.XA(e,t,!0)},e.prototype.on=function(e,t){this.XA(e,t,!1)},e.prototype.off=function(e,t){this.wz&&this.wz.eventHandler?this.wz.eventHandler.off(e,t):this.Iz&&this.Iz.off(e,t)},e.prototype.YA=function(e){var t;return{context:null,logger:this.vz,container:this.tz,bitdashPlayer:null,eventHandler:this.Iz,videoElement:null,adController:null,vrHandler:null,hasInitStarted:!1,technology:{player:M.PlayerType.Unknown,streaming:M.StreamType.Unknown},playerConfig:null,configuration:null,settings:null,source:null,volume:null!=(t=e.playback().volume)?t:100,muted:e.playback().muted||!1,playbackSpeed:1}},e.prototype.ZA=function(){try{for(var e=0;this.tz.getElementsByClassName(S.Environment.idPrefix+"error").length>0&&(this.tz.removeChild(this.tz.getElementsByClassName(S.Environment.idPrefix+"error")[0]),!(++e>10)););}catch{this.vz.debug("Error removing container error element")}},e.prototype.kB=function(e){if(!this.wz.playerConfig.isAdPlayer){var t,i=this.Az.licensing().delay,n=this.Az.tweaks();(i||0===i)&&!isNaN(i)&&i>=0&&(t=i);var r=this.bA[0];n.licenseServer&&(this.bA.includes(n.licenseServer)?r=n.licenseServer:this.vz.warn("Invalid license server",new f.PlayerError(p.ErrorCode.SETUP_INVALID_LICENSE_SERVER,{"license-server":n.licenseServer}))),this.Dz=A.LicenseCall.getInstance(this.vz,r,e.key),this.Dz.setDelay(t);var o=this.Az.get("network");this.Dz.issue(this.YB,null==o?void 0:o.requestApi)}},e.prototype.lB=function(e){this.Az=new d.PlayerConfiguration(e),this.zz.setDisabled(!!(null!=(t=e.storage)&&t.disableStorageApi)),this.wz=this.wz||this.YA(this.Az),this.wz.configuration=this.Az,this.wz.settings=this.Az.getSettings(),this.vz.setSettings(this.wz.settings),this.vz.setLogLevel(this.Az.get("logs").level),null==(i=this.Iz)||i.addFromObject(this.Az.get("events")),this.vz.setConfig(this.Az);var t,i,n=this.Az.tweaks().log_level;if(n&&this.setLogLevel(n),this.wz.settings.ENABLE_PERFORMANCE_LOGS&&(0,C.setPerformanceTrackingLogger)(this.vz),c.ModuleManager.has(u.ModuleName.XML)&&c.ModuleManager.get(u.ModuleName.XML).setLogger(this.vz),this.Az.get("logs").bitmovin&&(this.vz.forceLogBeautified("Adaptive Video Streaming Service by www.bitmovin.com","blue","14"),this.vz.forceLogBeautified("Player Version "+S.Environment.VERSION_NUMBER,"black","12")),(0,h.validateAppIdConfig)(this.Az),this.wz.playerConfig={isAdPlayer:!1,prefix:"",visibility:"visible"},this.tz&&(this.tz.player=this.uz,this.ZA()),this.kB(e),c.ModuleManager.has(u.ModuleName.Style)){var r=c.ModuleManager.get(u.ModuleName.Style).StyleManager;this.aA=new r(this,this.wz)}c.ModuleManager.callSetupHooks(this.uz),(0,ei.isLegacyEdge)()&&(L.DefaultSettings.MAX_STARTUP_BUFFER=en.LEGACY_EDGE_MAX_STARTUP_BUFFER),this.sz=this.DA()},e.prototype.postSetup=function(){this.QB(),this.BC()},e.prototype.setup=function(e){if(!S.Environment.checkDomainLock())throw new f.PlayerError(p.ErrorCode.SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST,void 0,"The player is not authorized to play content on the current domain.");return this.lB(e)},e.prototype.addSubtitle=function(e){var t,i=this,r=n(n({},e),{kind:(null==e?void 0:e.kind)||"subtitles",id:(null==e?void 0:e.id)!=null?String(null==e?void 0:e.id):void 0,label:(null==e?void 0:e.label)||(null==e?void 0:e.lang),isSideloaded:!0});if(function(e){return e&&"object"==typeof e&&("string"==typeof e.id||(0,es.isNumber)(e.id))&&"string"==typeof e.lang&&["caption","captions","subtitle","subtitles"].includes(e.kind)}(r)){if(this.wA()&&!r.isFragmented){var o=r.enabled||!1;r.enabled=!1,null==(t=this.wz.bitdashPlayer)||t.addSubtitle(r).then(function(){o&&i.enableSubtitle(r.id,!1,!1)}).catch(function(){return function(){}})}}else this.fireEvent(_.PlayerEvent.Warning,new m.PlayerWarning(g.WarningCode.API_INVALID_ARGUMENT,"Invalid subtitle track: ".concat(JSON.stringify(e)," Please check the documentation for expected properties."),{method:"subtitles.add",parameter:"subtitle",argument:e}))},e.prototype.removeSubtitle=function(e){var t;this.wA()&&(null==(t=this.wz.bitdashPlayer)||t.removeSubtitle(e))},e.prototype.getContainer=function(){return this.tz},e.prototype.setVRStereo=function(e){return!(!this.vA()||!this.BA()||"boolean"!=typeof e)&&this.wz.vrHandler.setStereo(e)},e.prototype.getStreamType=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.technology)?void 0:e.streaming)?t:M.StreamType.Unknown},e.prototype.getPlayerType=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.technology)?void 0:e.player)?t:M.PlayerType.Unknown},e.prototype.getSupportedTech=function(e){switch(e){case M.SupportedTechnologyMode.Platform:return a([],(0,Q.getCapabilities)().techSupportedByPlatform,!0);case M.SupportedTechnologyMode.Modules:return a([],(0,Q.getCapabilities)().techSupportedByModules,!0);case M.SupportedTechnologyMode.PlatformAndModules:return a([],(0,Q.getCapabilities)().techSupportedByModulesOnPlatform,!0);default:return this.fireEvent(_.PlayerEvent.Warning,new m.PlayerWarning(g.WarningCode.API_INVALID_ARGUMENT,"Invalid mode '".concat(e,"'"),{method:"getSupportedTech",parameter:"mode",argument:"".concat(e)})),[]}},e.prototype.getVR=function(){return this.BA()?this.wz.vrHandler:null},e.prototype.getAds=function(){return this.vA()&&this.yA()?this.wz.adController.playerAdvertisingApi:(null==this.getConfig().advertising||c.ModuleManager.has(u.ModuleName.Advertising)||this.vz.warn("A required player module is missing: Advertising"),null)},e.prototype.getSgaiAPI=function(){return this.vA()&&ey(this.sz)?ey(this.sz).getSgaiPlayerAPI():(c.ModuleManager.has(u.ModuleName.AdvertisingCore)&&c.ModuleManager.has(u.ModuleName.SGAI)||this.vz.warn("A required player module is missing: Advertising Core and/or SGAI"),null)},e.prototype.mB=function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){this.vz.log("Could not parse JSON string given as source: "+e.message)}return e&&"object"==typeof e?e:null},e.prototype.nB=function(e){var t;void 0===e&&(e=!1),this.wz&&this.tz&&((t=this.wz.playerConfig&&this.wz.playerConfig.hasOwnProperty("prefix")?document.getElementById(S.Environment.idPrefix+""+this.wz.playerConfig.prefix+"vr-canvas"):document.getElementById(S.Environment.idPrefix+"vr-canvas"))&&t.parentNode&&t.parentNode.removeChild(t),this.tz&&e&&delete this.tz.player)},e.prototype.oB=function(e){var t=!1,i=null;e&&(e.hasOwnProperty("options")&&e.options&&e.options.hasOwnProperty("persistentPoster")&&(t=e.options.persistentPoster),i=e.poster),this.setPosterImage(i,t)},e.prototype.pB=function(e){if(e)return["dash","hls","progressive","smooth","whep","poster","drm","title","description","options","tracks","labeling","vr"].forEach(function(t){e.hasOwnProperty(t)&&!e[t]&&delete e[t]}),e},e.prototype.qB=function(e){var t,i=e.vr,n=(0,Q.getCapabilities)(),r=!!i,o=n[V.CapabilityKey.isIOS];if(r&&o){var a=n[V.CapabilityKey.isInlinePlaybackRestricted];i.restrictedInlinePlayback=a,null!=(t=this.Pz)&&t.isFullscreen()&&this.setViewMode(M.ViewMode.Inline),a&&(i.audioElement=el.Util.getVRAudioElement(),this.tz.appendChild(i.audioElement.getWrappedElement()))}},e.prototype.rB=function(e,t,i,n){var r;return this.wz.source=e,this.wz.loadOptions=t,(null==(r=this.wz.technology)?void 0:r.player)===i.player?(this.wz.technology=i,Promise.resolve()):this.sB(e,i,n)},e.prototype.sB=function(e,t,i){var n=this,r=function(){var t;n.uA()||(null==(t=n.Iz)||t.off(_.PlayerEvent.Error,r),n.oB(e))};return this.onInternal(_.PlayerEvent.Error,r),this.wz.vrHandler=null,this.tB(i).then(function(){return n.EA(e,t)}).then(function(){return n.qB(e)}).catch(function(e){return e&&e.hasOwnProperty("code")&&e.hasOwnProperty("message")&&n.Iz?n.Iz.fireError(e):e&&n.vz.error(e),Promise.reject(e)})},e.prototype.tB=function(e){var t=this;return this.wz&&this.wz.bitdashPlayer?this.wz.bitdashPlayer.release(e).then(function(){t.wz.bitdashPlayer=null,t.nB()}).catch(function(e){return t.vz.error("There was a problem removing the current player: ".concat(e))}):Promise.resolve()},e.prototype.uB=function(e,t,i){return t===T.ADVERTISING_ISSUER_NAME&&e.canReuseEmeHandler()?e.reInitializeEmeHandler():e.isDrmConfigSet()?void 0:e.setDrmConfig(i)},e.prototype.vB=function(e,t,i){var n=this,r=this.CA(e,this.wz.technology);return this.wz.bitdashPlayer&&r?this.wz.bitdashPlayer.load(r,t.restrictions).then(function(){e.drm&&n.sz.serviceManager.maybeCall(y.ServiceName.DrmService,function(t){return n.uB(t,i,e.drm)})}).catch(function(e){return e&&e.code&&e.message&&n.Iz?n.Iz.fireError(e):e&&n.vz.debug("Failed to load source:",e),Promise.reject(e)}):Promise.reject("Could not load source from configuration.")},e.prototype.wB=function(e){return!!this.fA&&(this.fA.reject(Error(e)),this.fA=null,!0)},e.prototype.xB=function(e){this.wz.bitdashPlayer&&e.set(y.ServiceName.StartOffsetService,new F.StartOffsetService(this.wz.bitdashPlayer)),e.set(y.ServiceName.MetadataParsedService,new I.MetadataParsedService(this.wz.context)),e.set(y.ServiceName.StallTimeTrackerService,new U.StallTimeTrackerService(this.wz.context)),e.set(y.ServiceName.ThumbnailService,function(e){if(c.ModuleManager.has(u.ModuleName.Thumbnail))return c.ModuleManager.get(u.ModuleName.Thumbnail).createThumbnailService(e)}(this.wz.context)),e.set(y.ServiceName.PlayerStateService,new O.PlayerStateService(this.wz.context))},e.prototype.prepareSource=function(e,t){if(!this.wz.bitdashPlayer||!this.wz.technology)return Promise.reject(Error("Could not prepare source from configuration: current player is not initialized."));var i=t===T.ADVERTISING_ISSUER_NAME,n=this.CA(e,this.wz.technology);if(!n)return Promise.reject(Error("Could not prepare source from configuration."));var r=eh(this.wz,e,i);return this.sz.serviceManager.has(y.ServiceName.SourceStoreService,r.sourceIdentifier)||ed(this.sz,r.sourceIdentifier),this.wz.bitdashPlayer.prepareSource(n,r)},e.prototype.load=function(e,i,n,r){var o=this;void 0===r&&(r="api");var a=r===T.ADVERTISING_ISSUER_NAME;eg(r)||ev(r)||(this.lA=!1,this.Nz=s.NONE,this.hA=!1,this.xz=null,this.yz=null);var l=this.fA=new ee.Deferred;return this.Hz=n,this.dA=this.dA.then(function(){return o.yB(e,{forceTechnology:i,restrictions:n},r)}).catch(function(e){return o.IB(l,e)}),this.eA=this.eA.then(function(){return o.dA}).then(function(){if(!eg(r))return o.CC()}).then(function(){return function(e,i){return e===i?Promise.resolve():Promise.reject(Error(t.LOAD_CANCELLED_MESSAGE))}(l,o.fA)}).then(function(){var t=eh(o.wz,e,a);o.wz.context.setSourceContext(t),o.sz.serviceManager.has(y.ServiceName.SourceStoreService,t.sourceIdentifier)||ed(o.sz,t.sourceIdentifier),o.xB(o.wz.context.serviceManager),o.QC(r),o.DB()}).then(function(){return Promise.race([o.EB(e,{forceTechnology:i,restrictions:n},r),l.promise])}).then(l.resolve).then(function(){var e,t,i=null==(e=o.sz.videoElement)?void 0:e.getWrappedElement();i&&(null==(t=o.aA)||t.maybeStartTrackingVisibility(i))}).catch(function(e){return o.IB(l,e)}),l.promise},e.prototype.yB=function(e,t,i){var n,r=this;return null==(n=this.Iz)||n.resetErrors(),this.HA(i).then(function(){r.KB(e);var n=function(e,t,i){var n=el.Util.splitPlayerAndStreamingTechnology(i);return(0,$.getBestTech)(e.playback().preferredTech,t,n)}(r.Az,e,t.forceTechnology),o=r.MB(e,n);return r.vz.debug("Using technology: ".concat(o.player,".").concat(o.streaming)),r.LB(e),r.AB(e),r.oB(e),r.rB(r.mB(e),t,o,i)})},e.prototype.AB=function(e){e.hasOwnProperty("vr")&&(0,Q.getCapabilities)().isIOS&&(0,Q.getCapabilities)().isInlinePlaybackRestricted&&(e.vr.audioElement=el.Util.getVRAudioElement(),e.vr.restrictedInlinePlayback=!0),e.hasOwnProperty("vr")&&e.vr.audioElement&&this.tz.appendChild(e.vr.audioElement.getWrappedElement())},e.prototype.BB=function(e){if(c.ModuleManager.has(u.ModuleName.DRM)&&e.drm&&!this.sz.serviceManager.has(y.ServiceName.DrmService)){var t=c.ModuleManager.get(u.ModuleName.DRM).DrmService;this.sz.serviceManager.set(y.ServiceName.DrmService,new t(this.sz))}},e.prototype.CB=function(){var e;this.sz.serviceManager.has(y.ServiceName.RecoveryService)||(null==(e=this.getConfig().playback)?void 0:e.allowDecodingErrorRecovery)===!1||this.sz.serviceManager.set(y.ServiceName.RecoveryService,new D.RecoveryService(this.sz))},e.prototype.DB=function(){!this.sz.serviceManager.has(y.ServiceName.ManifestCachingService)&&this.qA&&this.sz.serviceManager.set(y.ServiceName.ManifestCachingService,this.qA)},e.prototype.EB=function(e,t,i){var n=this,r=this.sz.sourceContext.sourceIdentifier;return this.sz.serviceManager.maybeCall(y.ServiceName.SourceStoreService,function(e){return e.dispatch((0,q.resetLoadedRanges)())},null,r),this.PC(i,r),this.GB(i,r),this.CB(),this.BB(e),this.Jz&&this.sz.serviceManager.set(y.ServiceName.DrmDetectorService,this.Jz),this.FB().then(function(){return n.vB(e,t,i)}
13).then(function(){return n.postSetup(),n.OB(e.subtitleTracks),function(e,t){t.maybeCall(y.ServiceName.ThumbnailService,function(t){e&&e.thumbnailTrack&&t.addThumbnails(e.thumbnailTrack.url)})}(e,n.wz.context.serviceManager),n.HB(e,i)}).then(function(){var e,t,i;null==(e=(0,K.getSourceStore)(n.sz))||e.dispatch((0,W.setMseObjectUrl)(null!=(i=null==(t=n.wz.videoElement)?void 0:t.src)?i:"")),n.fireEvent(_.PlayerEvent.SourceLoaded)})},e.prototype.FB=function(){return this.wz.bitdashPlayer?this.wz.bitdashPlayer.prepareLoad():Promise.reject("Could not load source from configuration.")},e.prototype.GB=function(e,t){eg(e)||ev(e)||!this.sz||(this.sz.serviceManager.maybeCall(y.ServiceName.SourceStoreService,function(e){return e.dispatch((0,X.initializeStartTimeOffset)())},null,t),this.sz.serviceManager.has(y.ServiceName.ManifestCachingService,t)||(this.sz.serviceManager.set(y.ServiceName.ManifestCachingService,this.qA,t),this.sz.serviceManager.maybeCall(y.ServiceName.ManifestCachingService,function(e){return e.clear()},null,t)))},e.prototype.HB=function(e,t){var i,n,r,o;return this.PB(),eg(t)?(this.wz.context.serviceManager.get(y.ServiceName.PlayerStateService).transitionToPlayState(!1,t),Promise.resolve()):ev(t)?(this.yz=null!=(n=null==(i=this.wz.bitdashPlayer)?void 0:i.getManifest())?n:"",Promise.resolve()):(this.Cz&&this.Cz.reset(),this.xz=e,this.yz=null!=(o=null==(r=this.wz.bitdashPlayer)?void 0:r.getManifest())?o:"",this.eB())},e.prototype.IB=function(e,t){this.off(_.PlayerEvent.Error,this.DC),e.reject(t)},e.prototype.JB=function(){var e,t,i,n=this,r=ey(this.sz);if(!this.yA()&&!r)return Promise.resolve();var o=(null==(e=this.AA())?void 0:e.isLinearAdActive())||!!this.iA,a=!this.gA&&o;return(null!=(i=null==(t=this.AA())?void 0:t.reset())?i:Promise.resolve()).then(function(){var e;return null!=(e=null==r?void 0:r.reset())?e:Promise.resolve()}).then(function(){n.iA=null,a&&n.fireEvent(_.PlayerEvent.SourceUnloaded)})},e.prototype.KB=function(e){this.uA()&&this.NB(p.ErrorCode.API_NOT_AVAILABLE,"Cannot load the source: the player has already been destroyed.");var t=this.pB(e),i=Object.values(M.StreamType).filter(function(e){return e!==M.StreamType.Unknown});if(t&&i.some(function(e){return t.hasOwnProperty(e)})||this.NB(p.ErrorCode.SOURCE_INVALID,"Cannot load the source: the provided source config has no usable stream.",{source:e}),!this.Lz)throw this.Oz},e.prototype.LB=function(e){var t,i=!!(null!=(t=e.options)&&t.shouldRecreateSourceBuffersOnPeriodSwitch);i!==L.DefaultSettings.DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES&&(this.vz.debug("Overriding default setting: `DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES = ".concat(i,"`")),L.DefaultSettings.DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES=i,this.sz&&(this.sz.settings=this.wz.configuration.getSettings()))},e.prototype.MB=function(e,t){var i=(0,Q.getCapabilities)().techSupportedByPlatform;return i.length<1&&this.NB(p.ErrorCode.SOURCE_NO_SUPPORTED_TECHNOLOGY,"The platform does not support any of the technologies needed to play back the provided source."),!t&&e.hasOwnProperty("vr")&&this.NB(p.ErrorCode.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY,"This platform does not support VR playback."),t||this.NB(p.ErrorCode.SOURCE_NO_SUPPORTED_TECHNOLOGY,"This platform only supports these technologies: ".concat(JSON.stringify(i),".")),t},e.prototype.NB=function(e,t,i){var n,r=new f.PlayerError(e,i,t,null==(n=this.sz.sourceContext)?void 0:n.sourceIdentifier);throw this.Iz&&this.Iz.fireError(r),r},e.prototype.OB=function(e){var t=this;!this.subtitlesApi&&c.ModuleManager.has(u.ModuleName.Subtitles)&&(this.subtitlesApi=c.ModuleManager.get(u.ModuleName.Subtitles).PlayerSubtitlesApiFactory.build(this),this.fireEvent(_.PlayerEvent.ModuleReady,{name:u.ModuleName.Subtitles})),e&&Array.isArray(e)&&e.forEach(function(e){return t.addSubtitle(e)})},e.prototype.PB=function(){var e,t=null==(e=this.wz.bitdashPlayer)?void 0:e.createManifestApi();t&&(this.manifestApi=t)},e.prototype.QB=function(){if(this.wz.source&&this.wz.source.hasOwnProperty("vr")&&this.vA())if("function"==typeof window.requestAnimationFrame){var e=c.ModuleManager.get(u.ModuleName.VR).VRHandler;this.wz.vrHandler=new e(this.wz.context,this.id,this.wz.source.vr,el.Util.getVRAudioElement(),this.vz,navigator,this.wz.settings),this.fireEvent(_.PlayerEvent.ModuleReady,{name:u.ModuleName.VR})}else this.vz.warn("VR unavailable","This platform does not support VR")},e.prototype.getConfig=function(e){return void 0===e&&(e=!1),this.Az?e?this.Az.get():this.Az.getUserConfig():{}},e.prototype.getSnapshot=function(e,t){var i;if(this.wA())return null==(i=this.wz.bitdashPlayer)?void 0:i.getSnapshot(e,t)},e.prototype.setPlaybackSpeed=function(e,t){var i,n,r;if(void 0===t&&(t="api"),!isNaN(e=Number(e))&&e>0){if(null!=(i=this.Hz)&&i.playbackRate&&ef(t))return void(null==(n=this.sz)||n.logger.debug("Playback rate changes blocked by playback restrictions"));this.wz.playbackSpeed=e,this.xA()&&(null==(r=this.wz.bitdashPlayer)||r.setPlaybackSpeed(e))}},e.prototype.getPlaybackSpeed=function(){var e,t;return this.xA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getPlaybackSpeed())?t:1},e.prototype.RB=function(){var e=this;return new Promise(function(t,i){if(e.Pz&&e.getViewMode()!==M.ViewMode.Inline){var n=function(){t(),e.off(_.PlayerEvent.Vie
vendor: 48,943 bytes, line 13
13wModeChanged,n)};e.on(_.PlayerEvent.ViewModeChanged,n),e.Pz.setViewMode(M.ViewMode.Inline)}else t()})},e.prototype.destroy=function(){var e,t=this;return this.tA()?Promise.resolve():(null==(e=this.sz)||e.store.dispatch((0,z.setDestroyState)(G.DestroyState.Destroying)),c.ModuleManager.callDestroyHooks(this.uz).then(function(){return t.RB()}).then(function(){return t.TB()}).then(function(){var e,i;null==(e=t.sz)||e.store.dispatch((0,z.setDestroyState)(G.DestroyState.Destroyed)),null==(i=t.Iz)||i.setBeingDestroyed(),t.UB()}).then(function(){return t.eA}).then(function(){return t.HA()}).then(function(){return t.VB()}).then(function(){t.sz&&(t.SB(),t.sz.dispose(),t.sz=null)}))},e.prototype.SB=function(){this.rA&&this.rA(),this.sA&&this.sA(),this.rA=null,this.sA=null},e.prototype.TB=function(){var e=this;return new Promise(function(t){var i=function(){(0,ea.clearTimeoutIfDefined)(n),e.off(_.PlayerEvent.Destroy,i),t()},n=window.setTimeout(i,250);e.on(_.PlayerEvent.Destroy,i),e.fireEvent(_.PlayerEvent.Destroy,{},!1,!1)})},e.prototype.UB=function(){this.wB(t.LOAD_CANCELLED_BY_DESTROY_MESSAGE),(0,ea.clearTimeoutIfDefined)(this.Bz)},e.prototype.VB=function(){var e=this;if(!this.wz)return Promise.resolve();var t=Promise.resolve();return this.nB(!0),el.Util.removeVRAudioElement(),this.wz.adController=(0,b.dispose)(this.wz.adController),this.wz.vrHandler=null,this.Pz&&(this.Pz=(0,b.dispose)(this.Pz)),this.mA=(0,b.dispose)(this.mA),this.nA=(0,b.dispose)(this.nA),this.oA=(0,b.dispose)(this.oA),this.pA=(0,b.dispose)(this.pA),this.qA=(0,b.dispose)(this.qA),this.Cz.dispose(),this.wz.bitdashPlayer?t=this.wz.bitdashPlayer.release().then(function(){return e.sz.serviceManager.maybeCall(y.ServiceName.DrmService,function(e){return e.release()})}).finally(function(){e.WB(),e.wz.bitdashPlayer=null}):this.WB(),this.wz.context&&em(this.wz.context),this.Jz=(0,b.dispose)(this.Jz),this.aA=(0,b.dispose)(this.aA),this.Iz=(0,b.dispose)(this.Iz),this.zz=null,t},e.prototype.WB=function(){if(this.wz.videoElement){var e=this.wz.videoElement.getWrappedElement();this.wz.videoElement=(0,b.dispose)(this.wz.videoElement),this.tz&&e&&e!==this.Kz&&this.tz.removeChild(e)}},e.prototype.XB=function(e){if(!e)return new f.PlayerError(p.ErrorCode.SETUP_LICENSE_ERROR,{"error-message":"No license information was returned from the server"});if(e.message&&e.message.includes("Your player is not allowed to play on the domain"))return new f.PlayerError(p.ErrorCode.SETUP_MISSING_LICENSE_ALLOWLIST,{"error-message":e.message});if(e.hasOwnProperty("validationInformation")){for(var t="",i=0;i<e.validationInformation.length;i++)t+=e.validationInformation[i].key+": ",t+=e.validationInformation[i].errorMessage,i<e.validationInformation.length-1&&(t+="</br>");return new f.PlayerError(p.ErrorCode.SETUP_LICENSE_ERROR,{"error-message":t})}return e.hasOwnProperty("message")?new f.PlayerError(p.ErrorCode.SETUP_LICENSE_ERROR,{"error-message":e.message}):void 0},e.prototype.permitControl=function(e){this.wz&&this.wz.bitdashPlayer&&el.Util.isFunction(this.wz.bitdashPlayer.permitControl)&&this.wz.bitdashPlayer.permitControl(e)},e.prototype.ZB=function(e,t,i,n){this.fireEvent(_.PlayerEvent.Warning,new m.PlayerWarning(g.WarningCode.API_INVALID_ARGUMENT,t,{method:e,parameter:i,argument:n}))},e.prototype.fireEvent=function(e,t,i,n){this.Iz&&this.Iz.getEventFunction()(e,t,i,n)},e.prototype.isPlaying=function(){return this.isContentPlaying()||this.isAdPlaying()},e.prototype.isContentPlaying=function(){var e;return this.wA()&&!!(null!=(e=this.wz.bitdashPlayer)&&e.isPlaying())},e.prototype.isAdPlaying=function(){return this.yA()&&this.AA().isPlaying()},e.prototype.isPaused=function(){return this.isContentPaused()||this.isAdPaused()},e.prototype.isContentPaused=function(){var e;return this.wA()&&!!(null!=(e=this.wz.bitdashPlayer)&&e.isPaused())},e.prototype.isAdPaused=function(){return this.yA()&&this.AA().isPaused()},e.prototype.setVideoElement=function(e){this.Kz=e},e.prototype.getVideoElement=function(){return this.Kz?this.Kz:this.wz&&this.wz.videoElement?this.wz.videoElement.getWrappedElement():null},e.prototype.isDRMSupported=function(e){return this.Jz?this.Jz.isSupported(e):Promise.reject("DRM module not loaded")},e.prototype.getSupportedDRM=function(){return this.Jz?this.Jz.getSupported():Promise.reject("DRM module not loaded")},e.prototype.setAuthentication=function(e){this.Dz.setCustomData(e)},e.prototype.setPosterImage=function(e,t){this.aA?this.aA.setPosterImage(e,t):this.vz.debug("Unable to set poster image because style module is missing")},e.prototype.getThumbnail=function(e){var t;return this.xA()?function(e,t,i){return i.maybeCall(y.ServiceName.ThumbnailService,function(i){return i.getThumbnail(e,t)})}(e,{width:this.getContainer().clientWidth,height:this.getContainer().clientHeight,isFullscreen:!!(null!=(t=this.Pz)&&t.isFullscreen())},this.wz.context.serviceManager):null},e.prototype.getSeekableRange=function(){var e,t;return this.wA()&&null!=(t=null==(e=this.wz.bitdashPlayer)?void 0:e.getSeekableRange())?t:{start:-1,end:-1}},e.prototype.cB=function(e,t,i){var n;t=[].concat(t);for(var r=function(e){if(n=t.find(function(t){return t.lang===e}))return"break"},o=0,a=e=[].concat(e);o<a.length&&"break"!==r(a[o]);o++);return n?Promise.resolve(i(n.id)):Promise.resolve()},e.prototype.dB=function(){var e=this.wz.configuration.buffer();this.AC(e)},e.prototype.eB=function(){return this.jB().then(this.yC).then(this.xC)},e.prototype.fB=function(){if(this.wz.configuration.playback().playsInline&&void 0!==this.sz.videoElement){var e=this.sz.videoElement.getWrappedElement();e.setAttribute("webkit-playsinline",""),e.setAttribute("playsinline","")}},e.prototype.gB=function(){this.isLive()||this.SA()||this.zC(this.wz.source,!1)},e.prototype.hB=function(){var e,t;null!=(t=null==(e=this.wz.vrHandler)?void 0:e.deviceOrientationPermissionRequired())&&t?this.vz.debug("Autoplay disabled: user permission is required to access device orientation data for VR playback"):this.wC()},e.prototype.iB=function(){var e=this.isLive(),t=this.wz.configuration.playback(),i=this.wz.configuration.adaptation();t.autoplay?this.hB():this.uC(i,e)&&this.preload()},e.prototype.jB=function(){var e=this;return new Promise(function(t){(0,ea.clearTimeoutIfDefined)(e.Bz),e.wz&&e.wz.bitdashPlayer?(e.fB(),e.gB(),e.iB(),t()):e.Bz=window.setTimeout(function(){t(e.eB())},100)})},e.prototype.uC=function(e,t){return!t&&("boolean"!=typeof e.preload||e.preload)},Object.defineProperty(e.prototype,"vC",{get:function(){return this.fA&&this.fA.promise||Promise.resolve()},enumerable:!1,configurable:!0}),e.prototype.wC=function(){var e=this;this.vC.then(function(){return e.play()}).catch(function(){return e.vz.insane("Autoplay not triggered because current load call failed")})},e.prototype.zC=function(e,t){var i=this.wz.context.serviceManager.get(y.ServiceName.StartOffsetService).getStartOffset(e);t?this.timeShift(i,T.STARTUP_ISSUER_NAME):this.seek(i,T.STARTUP_ISSUER_NAME)},e.prototype.AC=function(e){var t=this;Object.keys(e).forEach(function(i){Object.keys(e[i]).forEach(function(n){if(t.PA(n,i)){var r=e[i][n];t.setTargetBufferLevel(n,r,i)}})})},e.prototype.BC=function(){this.wz&&(this.gA=!0,this.setVolume(this.wz.volume),this.setPlaybackSpeed(this.wz.playbackSpeed),this.wz.muted?this.mute():this.unmute())},e.prototype.CC=function(){var e;if(this.getConfig().advertising){if(!this.yA())try{this.zA()}catch(e){this.vz.warn(e)}null==(e=this.wz.adController)||e.initializeAdModule()}},e.prototype.EC=function(){var e=this;this.Lz=!0,this.cA&&this.cA.length>0&&(this.Cz=new w.ImpressionCall(this.vz,this.cA[0])),this.onInternal(_.PlayerEvent.Error,this.DC),this.onInternal(_.PlayerEvent.Warning,function(t){return e.vz.warn(t.message)}),this.onInternal(_.PlayerEvent.Playing,this.FC),this.onInternal(_.PlayerEvent.SourceLoaded,this.aB),this.on(_.PlayerEvent.SourceUnloaded,this.bB),this.on(_.PlayerEvent.Playing,this.NC),this.bufferApi=R.PlayerBufferApiFactory.create(this),c.ModuleManager.has(u.ModuleName.LowLatency)&&(this.lowLatencyApi=c.ModuleManager.get(u.ModuleName.LowLatency).LowLatencyApiFactory.create(this)),c.ModuleManager.has(u.ModuleName.ABR)&&(this.adaptationApi=c.ModuleManager.get(u.ModuleName.ABR).AdaptationApiFactory.create(this)),c.ModuleManager.has(u.ModuleName.EngineBitmovin)&&(this.mA=new(c.ModuleManager.get(u.ModuleName.EngineBitmovin)).SegmentInfoService,this.nA=new(c.ModuleManager.get(u.ModuleName.EngineBitmovin)).SegmentPrefetchingService,this.oA=new(c.ModuleManager.get(u.ModuleName.EngineBitmovin)).SegmentCacheService,this.pA=new(c.ModuleManager.get(u.ModuleName.EngineBitmovin)).AdRestorationOptimizationService,this.qA=new(c.ModuleManager.get(u.ModuleName.EngineBitmovin)).ManifestCachingService),this.GC()},e.prototype.GC=function(){this.kA=new Map,this.kA.set(l.DROPPED_VIDEO_FRAMES,0),this.kA.set(l.TOTAL_STALLED_TIME,0)},e.prototype.HC=function(e,t){this.kA.has(e)&&this.kA.set(e,this.kA.get(e)+t)},e.prototype.IC=function(e,t,i){return this.kA.get(e)+(t?i:0)},e.prototype.KC=function(e){var t=e.getActiveAdBreak(),i=e.list().filter(function(e){return e.scheduleTime===t.scheduleTime});[t].concat(i).forEach(function(t){return e.discardAdBreak(t.id)})},e.prototype.updateCallback=function(e){},e.prototype.onFullscreenEnter=function(){},e.prototype.onFullscreenExit=function(){},e.prototype.getViewMode=function(){return this.sz?(0,H.getPlayerState)(this.sz.store.getState()).viewMode:M.ViewMode.Inline},e.prototype.isViewModeAvailable=function(e){var t;return this.wA()?!!(null!=(t=this.Pz)&&t.isViewModeAvailable(e)):[M.ViewMode.Fullscreen,M.ViewMode.Inline].includes(e)},e.prototype.setViewMode=function(e,t){void 0===t&&(t={}),this.Pz&&this.Pz.setViewMode(e,t)},e.prototype.addExternalEventFilter=function(e){this.Iz&&this.Iz.addExternalEventFilter(e)},e.prototype.removeExternalEventFilter=function(e){this.Iz&&this.Iz.removeExternalEventFilter(e)},e.prototype.getSource=function(){return this.xz},e.prototype.getLoadOptions=function(){var e;return this.wA()&&(null==(e=this.wz)?void 0:e.loadOptions)||null},e.prototype.hasCurrentSourcePlayedOnce=function(){return this.Nz!==s.NONE},e.prototype.OC=function(e){var t=this.isMuted()?s.MUTED_PLAY:s.UNMUTED_PLAY;return t>e?t:e},e.prototype.PC=function(e,t){if(this.sz&&c.ModuleManager.has(u.ModuleName.ABR))for(var i=c.ModuleManager.get(u.ModuleName.ABR).AdaptationUtils,n=eg(e)?0:i.getStartupBitrateFromConfig(this.sz),r=this.sz.serviceManager.get(y.ServiceName.SourceStoreService,t),o=0,a=Object.values(et.MimeType);o<a.length;o++){var s=a[o];r.dispatch((0,j.setPreferredBitrateForMimeTypeAction)(s,n))}},e.prototype.QC=function(e){var t;if(!eg(e)&&c.ModuleManager.has(u.ModuleName.SGAI)&&this.sz.settings.ENABLE_SGAI_HANDLING){if(!this.sz.serviceManager.has(y.ServiceName.SgaiService)){var i=c.ModuleManager.get(u.ModuleName.SGAI);this.sz.serviceManager.set(y.ServiceName.SgaiService,new i.SgaiService(this.sz))}null==(t=ey(this.sz))||t.initialize()}},e}(),function(){var t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i=[(0,C.trackPerformance)("InternalPlayer.load")],N=[(0,C.trackPerformance)("InternalPlayer.destroy")],o(e,null,i,{kind:"method",name:"load",static:!1,private:!1,access:{has:function(e){return"load"in e},get:function(e){return e.load}},metadata:t},null,Y),o(e,null,N,{kind:"method",name:"destroy",static:!1,private:!1,access:{has:function(e){return"destroy"in e},get:function(e){return e.destroy}},metadata:t},null,Y),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}(),e}();function ed(e,t){var i=new Z.StoreService(e.store,"sources",t);e.serviceManager.set(y.ServiceName.SourceStoreService,i,t),i.addReducers(Y.staticSourceReducers)}function eh(e,t,i){var n,r=el.Util.toHash(t)+e.context.internalPlayerID;return new N.SourceContext({source:t,isAd:i,technology:e.technology,sourceIdentifier:r,mseObjectUrl:null==(n=e.videoElement)?void 0:n.src})}function ep(e){return null!=e&&"isCastAvailable"in e}function ef(e){return"api"===e||e===T.UI_SEEK_ISSUER_NAME}function em(e){[y.ServiceName.MetadataParsedService,y.ServiceName.StartOffsetService,y.ServiceName.PlayerStateService,y.ServiceName.StallTimeTrackerService,y.ServiceName.ThumbnailService].forEach(function(t){return(0,v.disposeService)(e.serviceManager,t)})}function eg(e){return e===T.ADVERTISING_ISSUER_NAME||e===T.ADVERTISING_RESTORE_ISSUER_NAME}function ev(e){return e===T.RECOVERY_ISSUER_NAME}function ey(e){var t;return null==(t=null==e?void 0:e.serviceManager)?void 0:t.get(y.ServiceName.SgaiService)}t.InternalPlayer=eu},75375:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RECOVERY_ISSUER_NAME=t.UI_SEEK_ISSUER_NAME=t.INTERNAL_ISSUER_NAME=t.ADVERTISING_RESTORE_ISSUER_NAME=t.ADVERTISING_ISSUER_NAME=t.STARTUP_ISSUER_NAME=void 0,t.STARTUP_ISSUER_NAME="startup",t.ADVERTISING_ISSUER_NAME="advertising-api",t.ADVERTISING_RESTORE_ISSUER_NAME="advertising-restore",t.INTERNAL_ISSUER_NAME="internal",t.UI_SEEK_ISSUER_NAME="ui-seek",t.RECOVERY_ISSUER_NAME="error-recovery"},99266:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevels=void 0,t.LogLevels={DEBUG:"debug",LOG:"log",WARN:"warn",ERROR:"error",OFF:"off"}},13531:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=void 0;var r,o=i(99266),a=i(44468);!function(e){e[e.OFF=0]="OFF",e[e.INSANE=1]="INSANE",e[e.DEBUG=2]="DEBUG",e[e.LOG=3]="LOG",e[e.WARN=4]="WARN",e[e.ERROR=5]="ERROR"}(r||(t.LogLevel=r={})),t.Logger=function(){function e(e,t){void 0===t&&(t=r.WARN),this.bJ=e,this.setLogLevel(t)}return e.prototype.setConfig=function(e){this.cJ=e.logs&&"function"==typeof e.logs().onLog?e.logs().onLog:void 0},e.prototype.setLogLevel=function(t){"string"==typeof t&&(t=e.parseLogLevel(t)),this.aJ=t},e.prototype.getLogLevel=function(){return this.aJ},e.prototype.isLevelEnabled=function(e){return void 0!==this.cJ&&e!==r.INSANE||this.aJ!==r.OFF&&this.aJ<=e},e.prototype.setSettings=function(e){this.bJ=e},e.parseLogLevel=function(e){switch(e){case o.LogLevels.DEBUG:return r.DEBUG;case o.LogLevels.LOG:return r.LOG;case o.LogLevels.WARN:return r.WARN;case o.LogLevels.ERROR:return r.ERROR;default:return r.OFF}},e.prototype.dJ=function(e,t,i){var o,s,l,c=function(e){switch(e){case r.INSANE:case r.DEBUG:return a.LogLevel.DEBUG;case r.LOG:return a.LogLevel.LOG;case r.WARN:return a.LogLevel.WARN;case r.ERROR:return a.LogLevel.ERROR;default:return null}}(e),u=n([],i,!0);if(this.aJ>0&&this.aJ<=e&&("string"==typeof this.bJ.LOG_PREFIX&&this.bJ.LOG_PREFIX.length>0?(o=console[c]).call.apply(o,n([console,this.bJ.LOG_PREFIX,t],u,!1)):(s=console[c]).call.apply(s,n([console,t],u,!1))),this.cJ&&e!==r.INSANE)try{(l=this.cJ).call.apply(l,n([null,c,t],u,!1))}catch{}},e.prototype.insane=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.dJ(r.INSANE,e,t)},e.prototype.debug=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.dJ(r.DEBUG,e,t)},e.prototype.log=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.dJ(r.LOG,e,t)},e.prototype.warn=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.dJ(r.WARN,e,t)},e.prototype.error=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.dJ(r.ERROR,e,t)},e.prototype.forceLogBeautified=function(e,t,i){navigator.userAgent.indexOf("Trident/")>-1||navigator.userAgent.indexOf("Edge/")>-1?console.log(e):console.log("%c"+e,"color:"+t+";font-weight:bold;font-size:"+i+"px;")},e}()},1001:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.NalUnitTypeHevc=t.NalUnitTypeAvc=t.VisualSampleEntryTypes=void 0,t.VisualSampleEntryTypes={Avc:["avc1","avc2","avc3"],Hvc:["hvc1","hev1"]},function(e){e[e.SEI=6]="SEI"}(i||(t.NalUnitTypeAvc=i={})),function(e){e[e.SEI=39]="SEI"}(n||(t.NalUnitTypeHevc=n={}))},75108:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCodeMap=t.MediaErrorCode=void 0,function(e){e[e.MEDIA_ERR_NETWORK=2]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=3]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=4]="MEDIA_ERR_SRC_NOT_SUPPORTED"}(i||(t.MediaErrorCode=i={})),function(e){e[e.MEDIA_ERR_DECODE=1301]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_NETWORK=1400]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=1204]="MEDIA_ERR_SRC_NOT_SUPPORTED"}(n||(t.ErrorCodeMap=n={}))},50172:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataParsedService=void 0;var n=i(3714),r=i(58735),o=i(89927);t.MetadataParsedService=function(){function e(e){this.xX=1.3,this.kW=e.eventHandler,this.kW.on(n.PlayerEvent.SourceUnloaded,this.yX),this.yX()}return e.prototype.yX=function(){this.wX={},this.lW=1/0},e.prototype.addMetadata=function(e,t){if(this.zX(),[n.MetadataType.EVENT_STREAM,n.MetadataType.DATERANGE].includes(t.metadataType)){var i=(0,r.calculateMetadataHash)(t,e);if(this.wX[i])return;this.wX[i]=Date.now()}this.kW.dispatchEvent(n.PlayerEvent.MetadataParsed,t)},e.prototype.zX=function(){for(var e=0,t=Object.keys(this.wX);e<t.length;e++){var i=t[e];this.AX(this.wX[i])&&delete this.wX[i]}},e.prototype.AX=function(e){if(!e)return!0;var t=(0,o.toMilliSeconds)(this.lW*this.xX);return Date.now()-t>e},Object.defineProperty(e.prototype,"expirationTimeInSeconds",{get:function(){return this.lW},set:function(e){this.lW=Math.abs(e)},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.wX=null,this.kW.off(n.PlayerEvent.SourceUnloaded,this.yX)},e}()},29669:function(e,t){var i,n,r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkRequestApi=t.HttpRequestMethod=t.HttpResponseType=t.HttpRequestType=void 0,function(e){e.MANIFEST_DASH="manifest/dash",e.MANIFEST_HLS_MASTER="manifest/hls/master",e.MANIFEST_HLS_VARIANT="manifest/hls/variant",e.MANIFEST_SMOOTH="manifest/smooth",e.MANIFEST_ADS="manifest/ads",e.MANIFEST_STEERING="manifest/steering",e.MEDIA_AUDIO="media/audio",e.MEDIA_VIDEO="media/video",e.MEDIA_SUBTITLES="media/subtitles",e.MEDIA_THUMBNAILS="media/thumbnails",e.MEDIA_SEGMENTINDEX="media/segmentindex",e.DRM_LICENSE_WIDEVINE="drm/license/widevine",e.DRM_LICENSE_PLAYREADY="drm/license/playready",e.DRM_LICENSE_FAIRPLAY="drm/license/fairplay",e.DRM_LICENSE_PRIMETIME="drm/license/primetime",e.DRM_LICENSE_CLEARKEY="drm/license/clearkey",e.DRM_LICENSE_TVKEY="drm/license/tvkey",e.DRM_CERTIFICATE_FAIRPLAY="drm/certificate/fairplay",e.HLS_INTERSTITIALS_ASSET_LIST="hls/interstitials/asset-list",e.KEY_HLS_AES="key/hls/aes",e.TIME_SYNC="time/sync",e.WEBRTC_SDP_REQUEST="webrtc/sdp/request",e.WEBRTC_SDP_ANSWER="webrtc/sdp/answer",e.WEBRTC_SDP_OFFER="webrtc/sdp/offer",e.UNKNOWN="unknown",e.INTERNAL="internal"}(i||(t.HttpRequestType=i={})),function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.TEXT="text"}(n||(t.HttpResponseType=n={})),function(e){e.GET="GET",e.POST="POST",e.HEAD="HEAD",e.PATCH="PATCH"}(r||(t.HttpRequestMethod=r={})),function(e){e.XHR="xhr",e.Fetch="fetch"}(o||(t.NetworkRequestApi=o={}))},69957:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setPerformanceTrackingLogger=function(e){i=e},t.trackPerformance=function(e,t){return void 0===t&&(t=!1),function(i,s){return function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c=a(n),u=c.callStack,d=c.parent,h=Date.now(),p=o(),f=function(e,t){var i={method:t,isAsync:!1,next:null,subtractions:[]};return e.next=i,i}(d,e),m=function(){var i=o()-p;if(r({name:e,start:h,duration:i,callStack:u}),t&&(d.subtractions=d.subtractions||[],d.subtractions.push({name:e,duration:i})),f.subtractions&&f.subtractions.length){var n=f.subtractions.map(function(e){return e.name}).join(", "),a=f.subtractions.reduce(function(e,t){return e+t.duration},0);r({name:"".concat(e," without ").concat(n),duration:i-a,start:Date.now()})}!function(e){e.isAsync&&e.next.isAsync||(e.next=null)}(d)},g=i.apply(this,s);return g instanceof Promise?(function(e){e.isAsync=!0}(d.next),g.then(m,m)):m(),g}}},t.trackPerformanceStart=function(e){var t=o();s[e]&&l(e,t),s[e]=t},t.trackPerformanceEnd=function(e){l(e,o()),delete s[e]};var i,n={};function r(e){i&&i.debug("[Performance] ".concat(e.name," lasted ").concat(Math.floor(e.duration),"ms"),e)}function o(){var e,t;return(null==(e=performance.now)?void 0:e.call(performance))||(null==(t=performance.webkitNow)?void 0:t.call(performance))||Date.now()}function a(e,t){void 0===t&&(t=[]);var i=e.next,n=e.method;return n&&t.push(n),i?a(i,t):{callStack:t,parent:e}}var s={};function l(e,t){i&&r({name:e,start:s[e],duration:t-s[e]})}},51072:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayPromise=void 0;var r=i(88844),o=i(19274);t.PlayPromise=function(){function e(e,t,i){var o=this;this.kab=function(){var e=function(){(0,r.clearTimeoutIfDefined)(o.hab),o.gab&&o.gab.isLicenseRequestOngoing()?o.hab=setTimeout(e,o.eab.settings.PLAYBACK_TIMEOUT):o.qab({code:0,name:"NotAllowedError",message:"user interaction required"})};o.hab=setTimeout(e,o.eab.settings.PLAYBACK_TIMEOUT)},this.oab=function(){o.nab(),o.iab()},this.pab=function(e,t){return o.qab(n(n({},t),{eventName:e}))},this.qab=function(e){o.nab();var t=e;e&&e.type&&(t="error"===e.type?n(n({},e),{name:"NotSupportedError",message:"The operation is not supported"}):n(n({},e),{name:"AbortError",message:"The play call was interrupted by ".concat(e.type)})),o.jab(t)},this.eab=e,this.fab=t,this.gab=i}return e.prototype.lab=function(){var t=this,i=function(i){var r=e.eventMapping[i];n.fab.addEventListener(i,r?n.oab:function(e){return t.pab(i,e)})},n=this;for(var r in e.eventMapping)i(r);4===this.fab.readyState?this.kab():this.fab.addEventListener(o.MediaElementEvent.canplay,this.kab)},e.prototype.mab=function(){for(var t in e.eventMapping){var i=e.eventMapping[t];this.fab.removeEventListener(t,i?this.oab:this.qab)}this.fab.removeEventListener(o.MediaElementEvent.canplay,this.kab)},e.prototype.nab=function(){(0,r.clearTimeoutIfDefined)(this.hab),this.mab()},e.prototype.rab=function(){var e=this;return new Promise(function(t,i){e.iab=t,e.jab=i,e.lab()})},e.new=function(t,i,n){return new e(t,i,n).rab()},e.eventMapping={playing:!0,ended:!0,pause:!1,abort:!1,emptied:!1,error:!1},e}()},43662:function(e,t,i){var n=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},r=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var m in n)f[m]="access"===m?{}:n[m];for(var m in n.access)f.access[m]=n.access[m];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,i[p])("accessor"===l?{get:d.get,set:d.set}:d[c],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&r.unshift(s)}else(s=a(g))&&("field"===l?r.unshift(s):d[c]=s)}u&&Object.defineProperty(u,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.Player=void 0;var o,a=i(88052),s=i(40306),l=i(3336),c=i(45202),u=i(20213),d=i(88210),h=i(29691),p=i(69957),f=i(44468),m=i(70850),g=0;function v(){o||(o=new WeakMap)}function y(e,t){v();var i=o.get(e);if(!i)throw new f.PlayerAPINotAvailableError(t);return i}t.Player=function(){var e,t,i,b,S,_,E,T,w,A,P,I,C,M,R=[];return e=function(){function e(e,t){n(this,R),this.a(e,t)}return e.prototype.a=function(e,t){if(!(e instanceof HTMLElement))throw new l.PlayerError(s.ErrorCode.SETUP_NO_HTML_ELEMENT,void 0,"The player container must be an HTMLElement.");v();var i=new h.InternalPlayer(e,m.Util.generateUniqueId(),this);o.set(this,i),g++,i.setup(t)},Object.defineProperty(e.prototype,"version",{get:function(){return c.Environment.VERSION_NUMBER},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vr",{get:function(){return y(this,"vr").getVR()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return y(this,"buffer").bufferApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lowlatency",{get:function(){return y(this,"lowlatency").lowLatencyApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"adaptation",{get:function(){return y(this,"adaptation").adaptationApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtitles",{get:function(){return y(this,"subtitles").subtitlesApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"manifest",{get:function(){return y(this,"manifest").manifestApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drm",{get:function(){return y(this,"drm").drmApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ads",{get:function(){return y(this,"ads")?o.get(this).getAds():null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sgai",{get:function(){return y(this,"sgai")?o.get(this).getSgaiAPI():null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"analytics",{get:function(){return y(this,"analytics").analyticsApi},set:function(e){y(this,"analytics").analyticsApi=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exports",{get:function(){return u},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){y(this,"on").on(e,t)},e.prototype.addMetadata=function(e,t){return y(this,"addMetadata").addMetadata(e,t)},e.prototype.castStop=function(){y(this,"cast").castStop()},e.prototype.castVideo=function(){y(this,"castVideo").castVideo()},e.prototype.clearQueryParameters=function(){y(this,"clearQueryParameters").clearQueryParameters()},e.prototype.destroy=function(){var e=y(this,"destroy").destroy();return o.delete(this),g--,e},e.prototype.getAspectRatio=function(){return y(this,"getAspectRatio").getAspectRatio()},e.prototype.getAudio=function(){return y(this,"getAudio").getAudio()},e.prototype.getAudioBufferLength=function(){return y(this,"getAudioBufferLength").getAudioBufferLength()},e.prototype.getAudioQuality=function(){return y(this,"getAudioQuality").getAudioQuality()},e.prototype.getAvailableAudio=function(){return y(this,"getAvailableAudio").getAvailableAudio()},e.prototype.getAvailableAudioQualities=function(){return y(this,"getAvailableAudioQualities").getAvailableAudioQualities()},e.prototype.getAvailableSegments=function(){return y(this,"getAvailableSegments").getAvailableSegments()},e.prototype.getAvailableVideoQualities=function(){return y(this,"getAvailableVideoQualities").getAvailableVideoQualities()},e.prototype.getConfig=function(e){return y(this,"getConfig").getConfig(e)},e.prototype.getContainer=function(){return y(this,"getContainer").getContainer()},e.prototype.getCurrentTime=function(e){return void 0===e&&(e=f.TimeMode.AbsoluteTime),y(this,"getCurrentTime").getCurrentTime("api",e)},e.prototype.getDownloadedAudioData=function(){return y(this,"getDownloadedAudioData").getDownloadedAudioData()},e.prototype.getDownloadedVideoData=function(){return y(this,"getDownloadedVideoData").getDownloadedVideoData()},e.prototype.getDroppedVideoFrames=function(){return y(this,"getDroppedVideoFrames").getDroppedVideoFrames()},e.prototype.getDuration=function(){return y(this,"getDuration").getDuration()},e.prototype.getManifest=function(){return y(this,"getManifest").getManifest()},e.prototype.getMaxTimeShift=function(){return y(this,"getMaxTimeShift").getMaxTimeShift()},e.prototype.getPlaybackAudioData=function(){return y(this,"getPlaybackAudioData").getPlaybackAudioData()},e.prototype.getPlaybackSpeed=function(){return y(this,"getPlaybackSpeed").getPlaybackSpeed()},e.prototype.getPlaybackVideoData=function(){return y(this,"getPlaybackVideoData").getPlaybackVideoData()},e.prototype.getPlayerType=function(){return y(this,"getPlayerType").getPlayerType()},e.prototype.getSnapshot=function(e,t){return y(this,"getSnapshot").getSnapshot(e,t)},e.prototype.getStreamType=function(){return y(this,"getStreamType").getStreamType()},e.prototype.getSupportedDRM=function(){return y(this,"getSupportedDRM").getSupportedDRM()},e.prototype.getSupportedTech=function(e){return void 0===e&&(e=f.SupportedTechnologyMode.Platform),y(this,"getSupportedTech").getSupportedTech(e)},e.prototype.getThumbnail=function(e){return y(this,"getThumbnail").getThumbnail(e)},e.prototype.getTimeShift=function(){return y(this,"getTimeShift").getTimeShift()},e.prototype.getTotalStalledTime=function(){return y(this,"getTotalStalledTime").getTotalStalledTime()},e.prototype.getVideoBufferLength=function(){return y(this,"getVideoBufferLength").getVideoBufferLength()},e.prototype.getVideoQuality=function(){return y(this,"getVideoQuality").getVideoQuality()},e.prototype.getVolume=function(){return y(this,"getVolume").getVolume()},e.prototype.hasEnded=function(){return y(this,"hasEnded").hasEnded()},e.prototype.isCastAvailable=function(){return y(this,"isCastAvailable").isCastAvailable()},e.prototype.isCasting=function(){return y(this,"isCasting").isCasting()},e.prototype.isDRMSupported=function(e){return y(this,"isDRMSupported").isDRMSupported(e)},e.prototype.isLive=function(){return y(this,"isLive").isLive()},e.prototype.isMuted=function(){return y(this,"isMuted").isMuted()},e.prototype.isPaused=function(){return y(this,"isPaused").isPaused()},e.prototype.isPlaying=function(){return y(this,"isPlaying").isPlaying()},e.prototype.isStalled=function(){return y(this,"isStalled").isStalled()},e.prototype.load=function(e,t,i){return y(this,"load").load(e,t,{seeking:i})},e.prototype.mute=function(e){y(this,"mute").mute(e)},e.prototype.pause=function(e){y(this,"pause").pause(e)},e.prototype.play=function(e){return y(this,"play").play(e)},e.prototype.off=function(e,t){y(this,"off").off(e,t)},e.prototype.getSeekableRange=function(){return y(this,"getSeekableRange").getSeekableRange()},e.prototype.seek=function(e,t){return y(this,"seek").seek(e,t)},e.prototype.setAspectRatio=function(e){return y(this,"setAspectRatio").setAspectRatio(e)},e.prototype.setAudio=function(e){y(this,"setAudio").setAudio(e)},e.prototype.setAudioQuality=function(e){y(this,"setAudioQuality").setAudioQuality(e)},e.prototype.setAuthentication=function(e){y(this,"getPlayerInstance").setAuthentication(e)},e.prototype.setPlaybackSpeed=function(e){y(this,"setPlaybackSpeed").setPlaybackSpeed(e)},e.prototype.setPosterImage=function(e,t){y(this,"setPosterImage").setPosterImage(e,t)},e.prototype.setQueryParameters=function(e){y(this,"setQueryParameters").setQueryParameters(e)},e.prototype.setVideoElement=function(e){y(this,"setVideoElement").setVideoElement(e)},e.prototype.setVideoQuality=function(e){y(this,"setVideoQuality").setVideoQuality(e)},e.prototype.setVolume=function(e,t){y(this,"setVolume").setVolume(e,t)},e.prototype.setVRStereo=function(e){return y(this,"setVRStereo").setVRStereo(e)},e.prototype.timeShift=function(e,t){y(this,"timeShift").timeShift(e,t)},e.prototype.unload=function(){return y(this,"unload").unload()},e.prototype.unmute=function(e){y(this,"unmute").unmute(e)},e.prototype.isAirplayAvailable=function(){return y(this,"isAirplayAvailable").isAirplayAvailable()},e.prototype.isAirplayActive=function(){return y(this,"isAirplayActive").isAirplayActive()},e.prototype.showAirplayTargetPicker=function(){y(this,"showAirplayTargetPicker").showAirplayTargetPicker()},e.prototype.getBufferedRanges=function(){return y(this,"getBufferedRanges").getBufferedRanges()},e.prototype.preload=function(){y(this,"preload").preload()},e.prototype.setLogLevel=function(e){y(this,"setLogLevel").setLogLevel(e)},e.prototype.getVideoElement=function(){return y(this,"getVideoElement").getVideoElement()},e.prototype.getViewMode=function(){return y(this,"getViewMode").getViewMode()},e.prototype.isViewModeAvailable=function(e){return y(this,"isViewModeAvailable").isViewModeAvailable(e)},e.prototype.setViewMode=function(e,t){y(this,"setViewMode").setViewMode(e,t)},e.prototype.getSource=function(){return y(this,"getSource").getSource()},Object.defineProperty(e,"version",{get:function(){return c.Environment.VERSION_NUMBER},enumerable:!1,configurable:!0}),e.addModule=function(e){a.ModuleManager.add(e)},e.removeModule=function(e){if(g>0)throw new l.PlayerError(s.ErrorCode.MODULE_REMOVED,void 0,"Cannot remove module while player instances are active");a.ModuleManager.remove(e)},e.getModules=function(){return a.ModuleManager.getModuleNames()},e}(),function(){var n="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[(0,p.trackPerformance)("Player.init")],i=[d.EnumerableValue],b=[d.EnumerableValue],S=[d.EnumerableValue],_=[d.EnumerableValue],E=[d.EnumerableValue],T=[d.EnumerableValue],w=[d.EnumerableValue],A=[d.EnumerableValue],P=[d.EnumerableValue],I=[d.EnumerableValue],C=[d.EnumerableValue],M=[d.EnumerableValue],r(e,null,t,{kind:"method",name:"a",static:!1,private:!1,access:{has:function(e){return"a"in e},get:function(e){return e.a}},metadata:n},null,R),r(e,null,i,{kind:"getter",name:"version",static:!1,private:!1,access:{has:function(e){return"version"in e},get:function(e){return e.version}},metadata:n},null,R),r(e,null,b,{kind:"getter",name:"vr",static:!1,private:!1,access:{has:function(e){return"vr"in e},get:function(e){return e.vr}},metadata:n},null,R),r(e,null,S,{kind:"getter",name:"buffer",static:!1,private:!1,access:{has:function(e){return"buffer"in e},get:function(e){return e.buffer}},metadata:n},null,R),r(e,null,_,{kind:"getter",name:"lowlatency",static:!1,private:!1,access:{has:function(e){return"lowlatency"in e},get:function(e){return e.lowlatency}},metadata:n},null,R),r(e,null,E,{kind:"getter",name:"adaptation",static:!1,private:!1,access:{has:function(e){return"adaptation"in e},get:function(e){return e.adaptation}},metadata:n},null,R),r(e,null,T,{kind:"getter",name:"subtitles",static:!1,private:!1,access:{has:function(e){return"subtitles"in e},get:function(e){return e.subtitles}},metadata:n},null,R),r(e,null,w,{kind:"getter",name:"manifest",static:!1,private:!1,access:{has:function(e){return"manifest"in e},get:function(e){return e.manifest}},metadata:n},null,R),r(e,null,A,{kind:"getter",name:"drm",static:!1,private:!1,access:{has:function(e){return"drm"in e},get:function(e){return e.drm}},metadata:n},null,R),r(e,null,P,{kind:"getter",name:"ads",static:!1,private:!1,access:{has:function(e){return"ads"in e},get:function(e){return e.ads}},metadata:n},null,R),r(e,null,I,{kind:"getter",name:"sgai",static:!1,private:!1,access:{has:function(e){return"sgai"in e},get:function(e){return e.sgai}},metadata:n},null,R),r(e,null,C,{kind:"getter",name:"analytics",static:!1,private:!1,access:{has:function(e){return"analytics"in e},get:function(e){return e.analytics}},metadata:n},null,R),r(e,null,M,{kind:"getter",name:"exports",static:!1,private:!1,access:{has:function(e){return"exports"in e},get:function(e){return e.exports}},metadata:n},null,R),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})}(),e}()},44468:function(e,t,i){var n,r,o,a=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TimeMode=t.SupportedTechnologyMode=t.ViewMode=t.PlayerAPINotAvailableError=t.LogLevel=t.BufferType=t.MediaType=t.StreamType=t.PlayerType=void 0;var s=i(40306),l=i(3336),c=i(32886);Object.defineProperty(t,"PlayerType",{enumerable:!0,get:function(){return c.PlayerType}});var u,d,h,p=i(65623);Object.defineProperty(t,"StreamType",{enumerable:!0,get:function(){return p.StreamType}}),function(e){e.Audio="audio",e.Video="video",e.Subtitles="subtitles",e.Thumbnails="thumbnails"}(u||(t.MediaType=u={})),function(e){e.ForwardDuration="forwardduration",e.BackwardDuration="backwardduration"}(d||(t.BufferType=d={})),function(e){e.DEBUG="debug",e.LOG="log",e.WARN="warn",e.ERROR="error",e.OFF="off"}(h||(t.LogLevel=h={})),t.PlayerAPINotAvailableError=function(e){function t(t){return e.call(this,s.ErrorCode.API_NOT_AVAILABLE,void 0,"Cannot use the `player.".concat(t,"` API: the player has already been destroyed."))||this}return a(t,e),t}(l.PlayerError),function(e){e.Inline="inline",e.Fullscreen="fullscreen",e.PictureInPicture="pictureinpicture"}(n||(t.ViewMode=n={})),function(e){e.Platform="platform",e.Modules="modules",e.PlatformAndModules="platformandmodules"}(r||(t.SupportedTechnologyMode=r={})),function(e){e.RelativeTime="relativetime",e.AbsoluteTime="absolutetime"}(o||(t.TimeMode=o={}))},72786:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerBufferApiFactory=void 0,t.PlayerBufferApiFactory=function(){function e(){}return e.create=function(e){return new(function(){function t(){}return t.prototype.setTargetLevel=function(t,i,n){e.setTargetBufferLevel(t,i,n)},t.prototype.getLevel=function(t,i){return e.getBufferLevel(t,i)},t}())},e}()},21281:function(e,t){var i,n,r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.LiveSynchronizationMethod=t.RttEstimationMethod=t.AdaptationLogicType=t.TimelineReferencePoint=void 0,function(e){e.Start="start",e.End="end",e.CurrentTime="currenttime"}(i||(t.TimelineReferencePoint=i={})),function(e){e.BUFFER="v1",e.BUFFER_FILL_RATE="v2",e.DOWNLOAD_PREDICTION="v3",e.LOW_LATENCY="low-latency-v1",e.WISH="wish"}(n||(t.AdaptationLogicType=n={})),function(e){e.WeightedAverage="weightedaverage",e.Median="median"}(r||(t.RttEstimationMethod=r={})),function(e){e.HttpHead="httphead",e.HttpXsDate="httpxsdate",e.HttpIso="httpiso"}(o||(t.LiveSynchronizationMethod=o={}))},53031:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerContext=void 0;var n=i(17564),r=i(56481),o=i(70962),a=i(6873),s=i(8973),l=i(21513),c=i(61089),u=i(70850),d=i(85902);t.PlayerContext=function(){function e(e){this.internalPlayer=e.internalPlayer,this.internalPlayerID=u.Util.generateUniqueId(),this.config=e.config||{playback:{}},this.storedConfig=e.storedConfig,this.settings=e.settings||o.DefaultSettings,this.bufferSettings=new n.BufferSettings(this.settings.TARGET_BUFFER_LEVEL,e.logger),this.parentHtmlElement=e.container||null,this.jW(),this.logger=e.logger,this.eventHandler=e.eventHandler,this.serviceManager=e.serviceManager,this.segmentInfoService=e.segmentInfoService,this.segmentPrefetchingService=e.segmentPrefetchingService,this.segmentCacheService=e.segmentCacheService,this.adRestorationOptimizationService=e.adRestorationOptimizationService,this.iW=!1}return e.prototype.jW=function(){this.store=new c.StoreService((0,l.default)(),"instances",this.internalPlayerID),this.store.addReducers({player:s.PlayerReducer,metrics:a.MetricsReducer})},e.prototype.setVideoElement=function(e){this.videoElement=d.VideoElementWrapperFactory.createWrappedVideoElement(this,e)},e.prototype.setSourceContext=function(e){this.sourceContext=e},e.prototype.setRenderer=function(e){this.renderer=e},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this.iW},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.iW=!0,this.serviceManager=(0,r.dispose)(this.serviceManager),this.renderer=null,this.parentHtmlElement=null,this.eventHandler=null,this.segmentInfoService=null,this.segmentPrefetchingService=null,this.segmentCacheService=void 0,this.adRestorationOptimizationService=null,this.store=(0,r.dispose)(this.store)},e}()},29242:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerFactory=void 0;var n=i(88052),r=i(62756),o=i(40306),a=i(3336),s=i(44468),l=i(21513),c=i(47993),u=i(43767);t.PlayerFactory=function(){function e(){this.EX=u.FileLoader.getInstance()}return e.constructSetupError=function(t,i,n,r){return e.isSourceValid(i)?t?new a.PlayerError(o.ErrorCode.SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED,{"player-type":t.player,"supported-tech":JSON.stringify(n)},"The selected technology is not supported by the player on this platform."):i.hasOwnProperty("vr")?new a.PlayerError(o.ErrorCode.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY,void 0,"This platform does not support VR playback."):r?new a.PlayerError(o.ErrorCode.SOURCE_NO_SUPPORTED_TECHNOLOGY,void 0,"The platform does not support any of the technologies needed to play back the provided source."):new a.PlayerError(o.ErrorCode.SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY,{"supported-tech":JSON.stringify(n)},"The platform does not support any of the technologies needed to play back the provided source."):new a.PlayerError(o.ErrorCode.SOURCE_INVALID,{source:i},"No DASH / HLS / Smooth / Progressive stream detected in the provided source.")},e.isSourceValid=function(e){var t,i,n,r;return e&&!!(null!=(r=null!=(n=null!=(i=null!=(t=e.dash)?t:e.hls)?i:e.progressive)?n:e.smooth)?r:e.whep)},e.prototype.getInstance=function(t){var i=Object.getOwnPropertyNames(t.source),n=(0,l.getCapabilities)().techSupportedByPlatform,r=(0,c.getBestTech)(t.config.playback().preferredTech,t.source,t.forceTech);if(i.length>0&&!e.isSourceValid(t.source))return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_STREAM_TYPE_NOT_SUPPORTED,{streamType:JSON.stringify(i),supportedTech:JSON.stringify(n)},"The specified stream type is not supported by this platform."));if(i.length>0&&!r)return Promise.reject(e.constructSetupError(t.forceTech,t.source,n,r));if(i.length<=0&&!n.length)return Promise.reject(e.constructSetupError(t.forceTech,t.source,n));i.length<=0&&(r=n[0]);var s=t.context.videoElement.getWrappedElement();t.styleManager?(t.styleManager.initializeInternalPlayer(s),t.styleManager.maybeStartTrackingVisibility(s)):!s.parentNode&&t.container&&t.container.appendChild(s),s.muted=t.playerInstance.muted,s.volume=t.playerInstance.volume/100;var u=t.config.adaptation(),d=u.bitrates.maxSelectableVideoBitrate;if((0,l.getCapabilities)().isMobile&&(u.bitrates.maxSelectableVideoBitrate=Math.min(d,1e7),u.exclude=!0),r){var h=e.createRenderer(t.context,r);t.context.setRenderer(h)}return this.GX(t.context,r)},e.createRenderer=function(e,t){return t.player===s.PlayerType.Html5?((0,l.getCapabilities)().isTizen||e.settings.DWORD_BASE_MEDIA_DECODE_TIMESTAMPS)&&n.ModuleManager.has(r.ModuleName.Tizen)?new(n.ModuleManager.get(r.ModuleName.Tizen).getTizenMSERendererConstructor())(e):(0,l.getCapabilities)().isWebOS&&n.ModuleManager.has(r.ModuleName.Webos)?new(n.ModuleManager.get(r.ModuleName.Webos).getWebosRendererConstructor())(e):(0,l.getCapabilities)().isPlayStation5&&n.ModuleManager.has(r.ModuleName.PlayStation5)?new(n.ModuleManager.get(r.ModuleName.PlayStation5).getPlayStation5MSERendererConstructor())(e):(0,l.getCapabilities)().isPlayStation4&&n.ModuleManager.has(r.ModuleName.PlayStation4)?new(n.ModuleManager.get(r.ModuleName.PlayStation4).getPlayStation4MSERendererConstructor())(e):(0,l.getCapabilities)().isVidaa&&n.ModuleManager.has(r.ModuleName.Vidaa)?new(n.ModuleManager.get(r.ModuleName.Vidaa).getVidaaMSERendererConstructor())(e):(0,l.getCapabilities)().isWpeWebKit&&n.ModuleManager.has(r.ModuleName.Wpe)?new(n.ModuleManager.get(r.ModuleName.Wpe).getWpeMSERendererConstructor())(e):new(n.ModuleManager.get(r.ModuleName.RendererMse)).MSERenderer(e):null},e.prototype.GX=function(e,t){var i,l=this;if(!e.renderer&&t.player===s.PlayerType.Html5)return Promise.reject(new a.PlayerError(o.ErrorCode.SETUP_NO_RENDERING_ENGINE,{tech:JSON.stringify(t)},"Could not create player: no suitable rendering engine was found. Additional modules may be required."));if(!this.FX&&n.ModuleManager.has(r.ModuleName.RemoteControl)){var c=n.ModuleManager.get(r.ModuleName.RemoteControl).RemoteControlManager;this.FX=new c(e,this.EX)}if(t.player===s.PlayerType.WebRtc)i=Promise.resolve(new(n.ModuleManager.get(r.ModuleName.EngineWebRtc)).WebRtcPlayer(e));else if(t.player===s.PlayerType.Native)i=Promise.resolve(new(n.ModuleManager.get(r.ModuleName.EngineNative)).NativePlayer(e));else{if(t.player!==s.PlayerType.Html5)return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_STREAM_TYPE_NOT_SUPPORTED,{given:t.player,supported:"html5, native"},"The specified technology is not supported by the player."));i=e.renderer.ready().then(function(){return new(n.ModuleManager.get(r.ModuleName.EngineBitmovin)).MediaPlayer(e)})}return i.then(function(t){return l.FX?l.FX.getPlayerWrapper(e,t):t}).then(function(i){return{context:e,logger:e.logger,bitdashPlayer:i,technology:t,videoElement:e.videoElement}})},e}()},52546:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerStateService=void 0;var n=i(80813),r=i(3714),o=i(23690),a=i(87827),s=i(85648);t.PlayerStateService=function(){function e(e){var t=this;this.VX=function(){t.YX((0,o.setPlayerHasBeenPlaying)(!1))},this.WX=function(){t.YX((0,o.setPlayerHasBeenPlaying)(!0))},this.XX=function(){return a.getPlayerState(t.RX.store.getState())},this.YX=function(e){t.RX.store.dispatch(e)},this.bX=function(e,i){t.playbackState!==e&&(t.playbackState=e,t.YX((0,o.addPlayerPendingTransition)(e))),i&&i()},this.cX=function(e,i){if(t.playbackState!==e)t.playbackState=e,t.YX((0,o.filterPlayerPendingTransition)(e));else{if(!t.dX(e))return;t.RX.logger.debug("Pending state ".concat(s.PlaybackState[e])),t.YX((0,o.removePlayerPendingTransition)(0))}i&&i()},this.RX=e,this.SX=e.eventHandler,this.SX.on(r.PlayerEvent.Playing,this.WX,!0),this.SX.on(r.PlayerEvent.SourceUnloaded,this.VX,!0),this.YX((0,o.resetPlayerState)(["viewMode","remoteControlState"])),this.TX=e.serviceManager.get(n.ServiceName.StallTimeTrackerService),this.UX=!1}return e.prototype.reset=function(){this.transitionToSeekedState(!1),this.stallExit(),this.playbackState=s.PlaybackState.None,this.seekState=s.SeekState.None},Object.defineProperty(e.prototype,"playbackState",{get:function(){return this.XX().playbackState},set:function(e){var t=this.XX().playbackState;this.RX.logger.debug("State change ".concat(s.PlaybackState[t]," -> ").concat(s.PlaybackState[e])),this.YX((0,o.setPlayerPlayback)(e))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seekState",{get:function(){return this.XX().seekState},set:function(e){var t=this.XX().seekState;this.RX.logger.debug("SeekState change ".concat(s.SeekState[t]," -> ").concat(s.SeekState[e])),this.YX((0,o.setPlayerSeek)(e))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timeShiftState",{get:function(){return this.XX().timeShiftState},set:function(e){var t=this.XX().timeShiftState;this.RX.logger.debug("TimeShiftState change ".concat(s.TimeShiftState[t]," -> ").concat(s.TimeShiftState[e])),this.YX((0,o.setPlayerTimeShift)(e))},enumerable:!1,configurable:!0}),e.prototype.ZX=function(e,t,i,n,a){this.seekState=e,n&&this.SX.dispatchEvent(r.PlayerEvent.Seek,{position:a??this.eX(),seekTarget:t,issuer:i||"api"}),this.YX((0,o.setPlayerTargetPlaybackTime)(t))},e.prototype.transitionToSeekingState=function(e,t,i){void 0===i&&(i=!0),this.ZX(s.SeekState.Seeking,e,t,i)},e.prototype.transitionToSeekingIOSState=function(e,t,i,n){void 0===i&&(i=!0),this.ZX(s.SeekState.SeekingIOS,e,t,i,n)},e.prototype.transitionToSeekedState=function(e){void 0===e&&(e=!0),this.isSeeking()&&(this.seekState=s.SeekState.Seeked,e&&this.SX.dispatchEvent(r.PlayerEvent.Seeked)),this.aX()},e.prototype.aX=function(){this.YX((0,o.setPlayerTargetPlaybackTime)(-1))},e.prototype.isSeeking=function(){return a.getIsSeeking(this.XX())},e.prototype.transitionToTimeShiftingState=function(e,t,i,n){void 0===n&&(n=!0),this.YX((0,o.setPlayerTimeShift)(s.TimeShiftState.Shifting)),n&&this.SX.dispatchEvent(r.PlayerEvent.TimeShift,{position:e,target:t,issuer:i||"api"}),this.YX((0,o.setPlayerTargetPlaybackTime)(t))},e.prototype.transitionToTimeShiftedState=function(e){void 0===e&&(e=!0),this.YX((0,o.setPlayerTimeShift)(s.TimeShiftState.Shifted)),e&&this.SX.dispatchEvent(r.PlayerEvent.TimeShifted),this.aX()},e.prototype.transitionToStoppedState=function(){this.YX((0,o.setPlayerPlayback)(s.PlaybackState.Stopped))},e.prototype.isInitial=function(){return a.getIsInitialPlayback(this.XX())},e.prototype.isTimeShifting=function(){return a.getIsTimeShifting(this.XX())}
vendor: 4,302 bytes, line 13
13,Object.defineProperty(e.prototype,"isStalled",{get:function(){return this.XX().isStalled},set:function(e){this.YX((0,o.setPlayerStall)(e))},enumerable:!1,configurable:!0}),e.prototype.setIsRendererStalling=function(e){this.YX((0,o.setRendererStallAction)(e)),e&&this.isPlaying()&&!this.hasPendingTransitionToPausedState()&&(this.UX=!0),e?this.stallEnter():this.stallExit()},e.prototype.getIsRendererStalling=function(){return a.getIsRendererStalled(this.XX())},e.prototype.isPlaying=function(){return a.getIsPlaying(this.XX())},e.prototype.isPlay=function(){return a.getIsPlay(this.XX())},e.prototype.isPaused=function(){return a.getIsPaused(this.XX())},e.prototype.isStopped=function(){return a.getIsStopped(this.XX())},e.prototype.stallEnter=function(){this.isPlay()||this.isSeeking()||this.isTimeShifting()||this.isSeeking()||this.isTimeShifting()||this.isStalled||this.isPaused()||this.isStopped()||(this.isStalled=!0,this.TX.startStall(),this.SX.dispatchEvent(r.PlayerEvent.StallStarted,{}))},e.prototype.stallExit=function(){this.isStalled&&(this.isStalled=!1,this.TX.endStall(),this.SX.dispatchEvent(r.PlayerEvent.StallEnded,{}))},e.prototype.hasPendingTransitionToPausedState=function(){return this.dX(s.PlaybackState.Paused)},e.prototype.dX=function(e){return this.XX().pendingTransitions[0]===e},e.prototype.eX=function(){return this.RX.videoElement.currentTime},e.prototype.fX=function(e,t,i){var n=this;this.isPlaying()||(e?i(s.PlaybackState.Play,function(){n.SX.dispatchEvent(r.PlayerEvent.Play,{time:n.eX(),issuer:t},!1)}):i(s.PlaybackState.Play))},e.prototype.transitionToPlayState=function(e,t){this.fX(e,t,this.cX)},e.prototype.transitionToPendingPlayState=function(e,t){this.fX(e,t,this.bX)},e.prototype.transitionToPlayingState=function(e,t){var i=this;void 0===t&&(t=!0),this.cX(s.PlaybackState.Playing,function(){t&&i.SX.dispatchEvent(r.PlayerEvent.Playing,{time:i.eX(),issuer:e},!1)})},e.prototype.transitionToPausedState=function(e,t,i){var n=this;(void 0===i&&(i=!1),i&&this.UX)?(this.RX.logger.insane("Ignoring transition to paused from video element"),this.UX=!1):(this.UX=!1,e&&this.isStalled&&this.stallExit(),this.RX.videoElement.ended||(e?this.cX(s.PlaybackState.Paused,function(){n.SX.dispatchEvent(r.PlayerEvent.Paused,{time:n.eX(),issuer:t},!1)}):this.bX(s.PlaybackState.Paused)))},Object.defineProperty(e.prototype,"targetPlaybackTime",{get:function(){return this.XX().targetPlaybackTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackSpeed",{get:function(){var e=this.XX().playbackSpeed;return e.speed*e.multiplier},enumerable:!1,configurable:!0}),e.prototype.setPlaybackSpeed=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=!0);var n=a.getPlaybackSpeed(this.XX());n.speed===e&&n.multiplier===t||(this.YX((0,o.setPlayerPlaybackSpeed)({speed:e,multiplier:t})),i&&this.SX.dispatchEvent(r.PlayerEvent.PlaybackSpeedChanged,{from:n.speed,to:e}))},Object.defineProperty(e.prototype,"seekingOrTimeshifting",{get:function(){return a.getIsSeekingOrTimeshifting(this.XX())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seekedOrTimeshifted",{get:function(){return a.getIsSeekedOrTimeshifted(this.XX())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInitialStall",{get:function(){return a.getIsInitialStall(this.XX())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasBeenPlaying",{get:function(){return this.XX().hasBeenPlaying},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.SX.off(r.PlayerEvent.Playing,this.WX),this.SX.off(r.PlayerEvent.SourceUnloaded,this.VX)},e}()},29488:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):(function(e){return e instanceof i?e:new i(function(t){t(e)})})(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]}
vendor: 4,982 bytes, line 13
13,trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerStateStore=void 0;var a=i(3714),s=i(75375),l=i(19274);t.PlayerStateStore=function(){function e(e,t){var i=this;this.context=e,this.internalPlayer=t,this.storedState=null,this.M4=[],this.b5=function(e){var t=e.subtitle;i.M4.some(function(e){return e.id===t.id})&&(i.internalPlayer.enableSubtitle(t.id),i.M4=i.M4.filter(function(e){return e.id!==t.id}))},this.c5=function(){i.a5()},t.on(a.PlayerEvent.SubtitleAdded,this.b5),t.on(a.PlayerEvent.SourceUnloaded,this.c5)}return e.prototype.getStoredState=function(){return this.storedState},e.prototype.hasStoredState=function(){return null!==this.storedState},e.prototype.capture=function(e){return!(e===s.RECOVERY_ISSUER_NAME&&!this.internalPlayer.getSource()||(this.storedState=this.capturePlayerState(e),0))},e.prototype.clear=function(){this.storedState=null},e.prototype.dispose=function(){this.a5()},e.prototype.capturePlayerState=function(e){var t,i=this.internalPlayer.isLive(),r=i&&!this.context.settings.ENABLE_SEEK_FOR_LIVE;return{source:this.internalPlayer.getSource(),loadOptions:this.internalPlayer.getLoadOptions(),playbackSpeed:this.internalPlayer.getPlaybackSpeed(),audioTrackId:null==(t=this.internalPlayer.getAudio())?void 0:t.id,audioQualityId:this.internalPlayer.getAudioQuality().id,videoQualityId:this.internalPlayer.getVideoQuality().id,subtitles:this.internalPlayer.listSubtitles().map(function(e){return n({},e)}),isLive:i,useTimeshiftForRestore:r,playbackPosition:r?this.internalPlayer.getTimeShift():this.internalPlayer.getCurrentTime(e),wasPaused:this.internalPlayer.isPaused(),contentDuration:this.internalPlayer.getDuration(),sourceIdentifier:this.context.sourceContext.sourceIdentifier,hasEnded:this.internalPlayer.hasEnded(),isStartup:!this.internalPlayer.hasCurrentSourcePlayedOnce()}},e.prototype.loadSource=function(e){var t,i,n=this.storedState;return null!=n&&n.source?this.internalPlayer.load(n.source,null==(t=n.loadOptions)?void 0:t.forceTechnology,null==(i=n.loadOptions)?void 0:i.restrictions,e):Promise.reject(Error("no source to load"))},e.prototype.restore=function(e){return r(this,void 0,void 0,function(){var t;return o(this,function(i){switch(i.label){case 0:if(!(t=this.storedState))throw Error("no stored state to restore");if(!t.source)throw Error("stored state has no source to restore");return[4,this.loadSource(e)];case 1:return i.sent(),this.restoreBaseState(t),this.N4(e),this.restoreSubtitles(t.subtitles),[2,!t.wasPaused]}})})},e.prototype.N4=function(e){var t=this.storedState;t&&(t.useTimeshiftForRestore?this.internalPlayer.timeShift(t.playbackPosition,e):this.internalPlayer.seek(t.playbackPosition,e))},e.prototype.restoreBaseState=function(e){e&&(this.internalPlayer.setPlaybackSpeed(e.playbackSpeed),this.Y5(e.audioTrackId),this.internalPlayer.setAudioQuality(e.audioQualityId),this.internalPlayer.setVideoQuality(e.videoQualityId))},e.prototype.Y5=function(e){var t=this;if(null!=e){var i=function(){return!!t.internalPlayer.getAvailableAudio().find(function(t){return t.id===e})&&(t.internalPlayer.setAudio(e),!0)};i()||(this.context.logger.log("Delaying audio track restore",e),this.Z5(i,a.PlayerEvent.AudioAdded))}},e.prototype.restoreSubtitles=function(e){for(var t=function(e){var t=i.internalPlayer.listSubtitles().find(function(t){return t.id===e.id});t?!t.enabled&&e.enabled&&i.internalPlayer.enableSubtitle(e.id,!1,!1):e.url?i.internalPlayer.addSubtitle(e):e.enabled&&(i.context.logger.log("Delaying subtitle restoration as track is not available yet",e),i.M4.push(e))},i=this,n=0,r=e;n<r.length;n++)t(r[n])},e.prototype.Z5=function(e,t,i,n){var r,o,s=this;void 0===n&&(n=2e3);var c=function(){var e;clearTimeout(o),s.internalPlayer.off(t,u),s.internalPlayer.off(a.PlayerEvent.SourceUnloaded,c),i?s.internalPlayer.off(i,c):null==(e=s.context.videoElement)||e.removeEventListener(l.MediaElementEvent.canplay,c)},u=function(t){e(t)&&c()};
13i?this.internalPlayer.onInternal(i,c):null==(r=this.context.videoElement)||r.addEventListener(l.MediaElementEvent.canplay,c),this.internalPlayer.onInternal(t,u),this.internalPlayer.onInternal(a.PlayerEvent.SourceUnloaded,c),o=setTimeout(c,n)},e.prototype.a5=function(){this.internalPlayer.off(a.PlayerEvent.SubtitleAdded,this.b5),this.internalPlayer.off(a.PlayerEvent.SourceUnloaded,this.c5),this.M4=[]},e}()},32886:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerType=void 0,function(e){e.Html5="html5",e.Native="native",e.WebRtc="webrtc",e.Unknown="unknown"}(i||(t.PlayerType=i={}))},83913:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RecoveryService=void 0;var n=i(40306),r=i(25926),o=i(4224),a=i(3714),s=i(75375),l=i(29488),c=i(40153),u=[a.PlayerEvent.SourceLoaded,a.PlayerEvent.SourceUnloaded,a.PlayerEvent.Play,a.PlayerEvent.Ready,a.PlayerEvent.Playing,a.PlayerEvent.Paused,a.PlayerEvent.Seek,a.PlayerEvent.Seeked,a.PlayerEvent.TimeShift,a.PlayerEvent.TimeShifted];t.RecoveryService=function(){function e(e){this.playerContext=e,this.HX=null,this.IX=null,this.JX=null,this.KX=null,this.LX=function(e){return!u.includes(e)},this.MX=!1,this.NX=-1,this.OX=null,this.HX=e,this.IX=e.internalPlayer,this.JX=e.eventHandler,this.KX=e.logger}return Object.defineProperty(e.prototype,"isRecovering",{get:function(){return this.MX},enumerable:!1,configurable:!0}),e.prototype.PX=function(e){return[n.ErrorCode.PLAYBACK_ERROR,n.ErrorCode.PLAYBACK_VIDEO_DECODING_ERROR].includes(e.code)},e.prototype.handleError=function(e){var t,i,n,r,o,a,s,l,c,u,d,h,p,f,m,g,v=this;return null!=(i=null==(t=this.HX)?void 0:t.sourceContext)&&i.isAd?(null==(o=null==(r=null==(n=this.HX)?void 0:n.logger)?void 0:r.debug)||o.call(r,"Ad is currently playing... Skipping recovery..."),null==(s=null==(a=this.HX)?void 0:a.eventHandler)||s.fireError(e),Promise.resolve()):null!=(l=this.JX)&&l.hasErrorBeenFired?(null==(d=null==(u=null==(c=this.HX)?void 0:c.logger)?void 0:u.debug)||d.call(u,"Error already fired, skipping recovery for ".concat(e.code," (").concat(e.name,")")),Promise.resolve()):!this.PX(e)||this.MX?(this.MX&&(null==(f=null==(p=null==(h=this.HX)?void 0:h.logger)?void 0:p.debug)||f.call(p,"Recovery already in progress, firing error ".concat(e.code," (").concat(e.name,") immediately"))),null==(g=null==(m=this.HX)?void 0:m.eventHandler)||g.fireError(e),Promise.resolve()):(this.MX=!0,Promise.resolve().then(function(){return v.QX()}).catch(function(){var t,i;null==(i=null==(t=v.HX)?void 0:t.eventHandler)||i.fireError(e)}).finally(function(){v.MX=!1}))},e.prototype.QX=function(){var e,t=this;if(!this.IX)return Promise.resolve();if(this.OX=new l.PlayerStateStore(this.HX,this.IX),!this.OX.capture(s.RECOVERY_ISSUER_NAME))return this.OX.dispose(),this.OX=null,Promise.reject(Error("No source available for recovery"));var i=this.IX.getCurrentTime(s.RECOVERY_ISSUER_NAME);return c.ErrorRecoveryUtil.wasRecoveryAttemptedAtPosition(i,this.NX)?(this.OX.dispose(),this.OX=null,Promise.reject(Error("Recovery not allowed: already attempted at position ".concat(i)))):(this.NX=i,this.IX.fireEvent(a.PlayerEvent.Warning,new r.PlayerWarning(o.WarningCode.PLAYBACK_VIDEO_DECODING_ERROR_RECOVERY,"Attempting to recover from error by reloading the media source",{time:i})),null==(e=this.JX)||e.addExternalEventFilter(this.LX),this.OX.restore(s.RECOVERY_ISSUER_NAME).then(function(e){var i,n;return t.OX=null,null==(n=null==(i=t.KX)?void 0:i.log)||n.call(i,"Error recovery completed successfully"),e?t.IX.play(s.RECOVERY_ISSUER_NAME):t.IX.pause(s.RECOVERY_ISSUER_NAME)},function(e){var i,n,r;throw null==(n=null==(i=t.KX)?void 0:i.error)||n.call(i,"Failed to recover from error during reload sequence:",e),null==(r=t.OX)||r.dispose(),t.OX=null,e}).finally(function(){var e;null==(e=t.JX)||e.removeExternalEventFilter(t.LX)}))},e.prototype.dispose=function(){var e,t;this.MX&&(null==(e=this.JX)||e.removeExternalEventFilter(this.LX)),null==(t=this.OX)||t.dispose(),this.OX=null,this.NX=-1,this.MX=!1,this.HX=null,this.IX=null,this.JX=null,this.KX=null},e}()}
vendor: 4,351 bytes, line 13
13,25541:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.dateRangeToISOString=function(e){return new Date(Date.parse(e.startDate)+(0,n.toMilliSeconds)(e.duration)).toISOString()},t.mergeSegmentLists=r,t.updateTimeline=function(e,t){return t.forEach(function(e){return e.consumed=!1}),0===e.length?t:r(e,t)},t.populateCurrentTimelineWithPlaybackTime=function(e,t,i){var n;e[t]&&(function(){n=i;for(var r=t;r<e.length;r++)e[r].playbackTime=n,n+=e[r].duration}(),function(){n=i;for(var r=t-1;r>=0;r--)e[r].playbackTime=n-e[r].duration,n-=e[r].duration}())};var n=i(89927);function r(e,t){var i={},n=function(e){var t=e.discontinuitySequenceNumber,i=e.uri;return t?"".concat(i,"_").concat(t):i};return t.forEach(function(e){return i[n(e)]=e}),e.forEach(function(e){i[n(e)]&&(i[n(e)]=e)}),Object.values(i)}},70962:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultSettings=t.WishDefaultConfig=void 0;var n,r,o,a,s=i(29669),l=i(44468);t.WishDefaultConfig={TARGET_BITRATE_FACTOR:1,TARGET_BUFFER_FACTOR:.8,BITRATE_MODIFIER_FUNCTION_TYPE:"log",USE_RATE_BASED_SELECTION_ON_SEEKING:!1},t.DefaultSettings={TARGET_BUFFER_LEVEL:((n={})[l.MediaType.Video]=((r={})[l.BufferType.ForwardDuration]=40,r[l.BufferType.BackwardDuration]=20,r),n[l.MediaType.Audio]=((o={})[l.BufferType.ForwardDuration]=40,o[l.BufferType.BackwardDuration]=20,o),n),BUFFER_LOGIC_ACTIVATION_THRESHOLD:10,MIN_TIMELINE_LIVE_OFFSET:4,RETRY_DELAY:2,MAX_INCREASE_RETRY_DELAY_SEC:30,INCREASE_RETRY_DELAY:!0,INCREASE_RETRY_DELAY_BASE_SEC:.25,DISABLE_RETRY_FOR_RESPONSE_STATUS:((a={})[s.HttpRequestType.MANIFEST_DASH]=[],a[s.HttpRequestType.MANIFEST_HLS_MASTER]=[],a[s.HttpRequestType.MANIFEST_HLS_VARIANT]=[],a[s.HttpRequestType.MANIFEST_SMOOTH]=[],a[s.HttpRequestType.MANIFEST_ADS]=[],a[s.HttpRequestType.MANIFEST_STEERING]=[],a[s.HttpRequestType.MEDIA_AUDIO]=[],a[s.HttpRequestType.MEDIA_VIDEO]=[],a[s.HttpRequestType.MEDIA_SUBTITLES]=[],a[s.HttpRequestType.MEDIA_THUMBNAILS]=[],a[s.HttpRequestType.MEDIA_SEGMENTINDEX]=[],a[s.HttpRequestType.DRM_LICENSE_WIDEVINE]=[],a[s.HttpRequestType.DRM_LICENSE_PLAYREADY]=[],a[s.HttpRequestType.DRM_LICENSE_FAIRPLAY]=[],a[s.HttpRequestType.DRM_LICENSE_PRIMETIME]=[],a[s.HttpRequestType.DRM_LICENSE_CLEARKEY]=[],a[s.HttpRequestType.DRM_LICENSE_TVKEY]=[],a[s.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY]=[],a[s.HttpRequestType.HLS_INTERSTITIALS_ASSET_LIST]=[],a[s.HttpRequestType.KEY_HLS_AES]=[],a[s.HttpRequestType.TIME_SYNC]=[],a[s.HttpRequestType.WEBRTC_SDP_REQUEST]=[],a[s.HttpRequestType.WEBRTC_SDP_ANSWER]=[],a[s.HttpRequestType.WEBRTC_SDP_OFFER]=[],a[s.HttpRequestType.INTERNAL]=[],a[s.HttpRequestType.UNKNOWN]=[],a),METRIC_HISTORY_SIZE:30,DEFAULT_ADAPTATION_RULE_HISTORY_SIZE:40,LOG_LEVEL:2,LOG_PREFIX:"",RESTART_THRESHOLD:.9,RESTART_THRESHOLD_DELTA:.5,STARTUP_THRESHOLD:.9,STARTUP_THRESHOLD_DELTA:.5,DURATION_MISMATCH_TOLERANCE:.5,MAX_STARTUP_BUFFER:1/0,START_SEARCHING_END:2,MAX_RETRIES:2,MAX_CDN_RETRIES:2,MAX_MPD_RETRIES:2,MPD_RETRY_DELAY:.5,MPD_UPDATE_PERIOD_TOLERANCE:5,DRM_MAX_RETRIES:1,DRM_RETRY_DELAY:.25,DRM_WITH_CREDENTIALS:!1,CAST_APPLICATION_ID:"D3A86B20",CAST_MESSAGE_NAMESPACE:"urn:x-cast:com.bitmovin.player.cast2",BUFFER_VISIBILITY_DELAY:2,MIN_SELECTABLE_VIDEO_BITRATE:0,MAX_SELECTABLE_VIDEO_BITRATE:1/0,EXCLUDE_DISALLOWED_REPRESENTATIONS:!1,MIN_SELECTABLE_AUDIO_BITRATE:0,MAX_SELECTABLE_AUDIO_BITRATE:1/0,XHR_TIMEOUT:20,QUERY_PARAMETERS:void 0,GAP_TOLERANCE:.1,END_OF_BUFFER_TOLERANCE:.1,END_OF_BUFFER_RECOVERY_TOLERANCE:.5,MAX_POTENTIAL_GAP_TIME_DEVIATION:.125,SEEK_TO_END_OFFSET:2,MINIMUM_ALLOWED_UPDATE_PERIOD:1,MAXIMUM_ALLOWED_UPDATE_PERIOD:1/0,GLOBAL_DISABLE_SEEKING:!1,PRE_ROLL_RESTORE_THRESHOLD:.25,IOS_MIN_TIMEUPDATES_AFTER_AD:2,HTTP_HEADERS:{},DOWNLOAD_DURATION_SAFETY_MARGIN:.4,MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER:2,MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER_SAME_QUALITY:3,RATE_SAFETY_MARGIN_PERCENTAGE:10,MAX_ALLOWED_BANDWIDTH_ESTIMATION:1/0,LIVE_SEGMENT_LIST_START_INDEX_OFFSET:0,MAX_NUM_CACHED_SEGMENTS:1,TRUN_VERSION:void 0,IGNORE_MP4_EDTS_BOX:!0,HLS_AUDIO_ONLY_THRESHOLD_BITRATE:2e5,ENABLE_SEEK_FOR_LIVE:!1,LIVE_EDGE_DISTANCE:0,QUALITY_THRESHOLD:.5,QUALITY_UPPER_THRESHOLD:45,MAX_CONSECUTIVE_VR_ERRORS:3,MAX_CONSECUTIVE_RENDERER_ERRORS:3,DISABLE_HLS_BACKUP_STREAM_FAILOVER:!1,PLAYBACK_TIMEOUT:1500,HLS_SYNC_VIA_MEDIA_SEQUENCE:!1,STOP_DOWNLOAD_ON_PAUSE:!1,VR_SCHEME_ID_URI:"https://bitmov
13in.com/082017/vr",HLS_VR_CHARACTERISTICS_UTI:"com.bitmovin.vr.",SAFARI_NUM_PROGRESS_EVENTS_AFTER_SEEK_GLITCH:5,SEGMENT_LOADER_POOL_SIZE:{},NATIVE_HLS_PARSING:!1,NATIVE_HLS_DOWNLOAD_ERROR_HANDLING:!1,AKAMAI_DATETIME_PARSING:!1,QJY_BROWSER_WORKAROUND:!1,DWORD_BASE_MEDIA_DECODE_TIMESTAMPS:!1,FORCE_BASE_MEDIA_DECODE_TIME_REWRITE:!1,WEBOS_MAX_SAFE_BMDT:1/0,WEBOS_MAX_SAFE_PTO:1/0,TIZEN_MAX_SAFE_BMDT:1/0,TIZEN_MAX_SAFE_PTO:1/0,VIDAA_MAX_SAFE_BMDT:0xffffffff,VIDAA_MAX_SAFE_PTO:0xffffffff,ADAPTATION_SET_SWITCHING_WITHOUT_SUPPLEMENTAL_PROPERTY:!1,MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL:.5,CHUNKED_CMAF_STREAMING:!1,LOW_LATENCY_DEFAULT_TARGET_LATENCY:5,LOW_LATENCY_BUFFER_GUARD:.5,LOW_LATENCY_DEFAULT_FALLBACK_PLAYBACK_RATE:.95,LOW_LATENCY_DEFAULT_CATCHUP_PLAYBACK_RATE:1.2,LOW_LATENCY_SEEK_AHEAD:1,ACCEPTABLE_TIMESHIFT_INACCURACY:3,IGNORE_HLS_AUDIO_GROUPS:!1,OPTIMIZE_AD_RESTORATION:!0,AD_RESTORATION_SEGMENT_PREFETCHING_DURATION:5,MIN_SAFE_BUFFER_LEVEL:3,THUMBNAIL_TO_PLAYER_SIZE_RATIO:.1,FAIRPLAY_IGNORE_DUPLICATE_INIT_DATA_KEY_ERRORS:!1,NO_QUOTA_EXCEEDED_ADJUSTMENT:!1,RESUME_LIVE_CONTENT_AT_PREVIOUS_POSITION_AFTER_AD_BREAK:!1,MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME:.5,fixed:{APP_NAME:"html5",VERSION:"8.259.0"},CLEAR_BUFFERS_ON_SEEKING_BACKWARDS:!1,DROP_INVALID_SEGMENTS:!1,PROACTIVE_GAP_SKIP_DISTANCE_SECONDS:0,MIN_SIZE_FOR_GAP_SKIPPING:0,FORCE_SOFTWARE_DECRYPTION:!1,SEGMENT_LOADING_PROGRESS_CHECK_INTERVAL:.5,ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE:!1,HLS_SYNC_SEGMENT_PLAYBACK_TIME_VIA_MEDIA_SEQUENCE:!1,HLS_PARSE_MANIFEST_IN_WORKER:!1,HLS_CLEAR_BUFFERS_ON_DISCONTINUITY_SWITCHES:!1,PARSE_EMSG_BOXES:!0,WISH_ABR_PARAMS:t.WishDefaultConfig,HLS_BACKUP_STREAM_PENALTY_DURATION:30,CHECK_ALL_DRM_LICENSES_FOR_KID:!0,LL_HLS:!0,LL_HLS_SEGMENT_END_TIME_MATCHING_TOLERANCE:.1,LL_HLS_MAX_PLAYLIST_AGE_FOR_BLOCKING_REQUEST_IN_PART_TARGET_MULTIPLES:2,HLS_PARSE_NATIVE_METADATA:!0,PREFER_MANAGED_MEDIA_SOURCE:!0,INFINITE_RETRIES_FOR_LIVE:!0,MAX_SAFE_MSE_DURATION:1/0,ENABLE_MEDIA_ELEMENT_EVENT_LOGS:!1,ENABLE_MEDIA_ELEMENT_ACTION_LOGS:!1,DISABLE_PARALLEL_SEGMENT_LOADING:!1,ENABLE_MUTED_BACKGROUND_PLAYBACK:!1,POSTPONE_MANIFEST_UPDATES_UNTIL_PLAYBACK_START:!0,DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES:!1,DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED:!1,ENABLE_SGAI_HANDLING:!1,SGAI_TRIGGER_DELAY_COMPENSATION:0,ENABLE_PERFORMANCE_LOGS:!1,ENABLE_HLS_CONTENT_STEERING:!1,TIZEN_DELAY_END_OF_STREAM_SIGNALING:!1,AUDIO_TRACK_SWITCH_BUFFER_GRACE_PERIOD:2,DISABLE_AUDIO_BUFFER_CLEARING_ON_TRACK_SWITCH:!1}},69251:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SourceContext=void 0,t.SourceContext=function(){function e(e){this.technology=e.technology,this.source=e.source,this.isAd=e.isAd,this.gX=!1,this.hX=e.sourceIdentifier,this.mseObjectUrl=e.mseObjectUrl}return Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this.gX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceIdentifier",{get:function(){return this.hX},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.gX=!0},e}()},93907:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StallTimeTrackerService=void 0;var n=i(91678),r=i(46151),o=i(33436),a=i(94685),s=i(89927);t.StallTimeTrackerService=function(){function e(e){this.context=e,this.context=e,this.jX=0}return e.prototype.startStall=function(){this.iX=Date.now()},e.prototype.endStall=function(){var e=(0,s.toSeconds)(Date.now()-this.iX);this.jX+=e,this.kX()},e.prototype.kX=function(){var e=this;(0,a.isContextAvailable)(this.context)&&Object.keys((0,r.getMetricsState)(this.context.store.getState())).forEach(function(t){return e.context.store.dispatch((0,n.addMetricsValue)(t,o.MetricType.StalledSeconds,e.jX))})},e.prototype.reset=function(){this.jX=0},e.prototype.dispose=function(){},e}()},23145:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StartOffsetService=void 0;var n=i(21281);t.StartOffsetService=function(){function e(e){this.lX=e,this.mX=0}return e.prototype.nX=function(e,t){var i=e.options.startOffset,r=e.options.startOffsetTimelineReference;if(r)switch(r){case n.TimelineReferencePoint.Start:return i>Math.abs(t)?0:i+t;case n.TimelineReferencePoint.End:}return i},e.prototype.oX=function(e,t){var i=e.options.startOffset,r=e.options.startOffsetTimelineReference;if(r)switch(r){case n.TimelineReferencePoint.Start:break;case n.TimelineReferencePoint.End:return t+i}return i},e.prototype.getStartOffset=function(e){if(e.options){if(void 0!==e.options.startOffset)return this.lX.isLive
vendor: 20,254 bytes, line 13
13()?this.nX(e,this.lX.getMaxTimeShift()):this.oX(e,this.lX.getDuration());if(void 0!==e.options.startTime)return e.options.startTime}return this.mX},Object.defineProperty(e.prototype,"manifestStartOffset",{set:function(e){this.mX=e},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.lX=null},e}()},65623:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamType=void 0,function(e){e.Progressive="progressive",e.Dash="dash",e.Hls="hls",e.Smooth="smooth",e.Whep="whep",e.Unknown="unknown"}(i||(t.StreamType=i={}))},20649:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.kebabCaseToCamelCase=function(e){return e.split("-").map(function(e,t){return 0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join("")},t.forceReallocation=function(e){return e?(0,n.isFirefox)()?JSON.parse(JSON.stringify(e)):(" "+e).slice(1):""};var n=i(15487)},88847:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Suspendable=void 0,t.suspend=function(e){e&&e.suspend()},t.restore=function(e){e&&e.restore()},t.Suspendable=function(){function e(e){this.t1=!1,this.u1=null==e?void 0:e.onSuspend,this.v1=null==e?void 0:e.onRestore}return e.prototype.suspend=function(){var e;this.t1||(this.t1=!0,null==(e=this.u1)||e.call(this))},e.prototype.restore=function(){var e;this.t1&&(this.t1=!1,null==(e=this.v1)||e.call(this))},e.prototype.isSuspended=function(){return this.t1},e.prototype.dispose=function(){this.t1=null,this.u1=null,this.v1=null},e}()},94685:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e},t.isContextAvailable=function(e){return void 0!==e&&!e.isDisposed}},64681:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),r(i(92006),t)},29960:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},41138:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VideoElementUtil=void 0,t.VideoElementUtil=function(){function e(){}return e.removeSource=function(e){for(e.setAttribute("src",""),e.removeAttribute("src");e.firstChild;)e.removeChild(e.firstChild)},e}()},53129:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultConfig=void 0;var n=i(45202);t.DefaultConfig={key:"",playback:{autoplay:!1,muted:!1,volume:100,timeShift:!0,seeking:!0,playsInline:!0,preferredTech:[],videoCodecPriority:["dvhe","dvh1","vvc","vvi","av01","av1","hevc","hev","hvc","vp9","avc"],audioCodecPriority:["ec-4","ac-4","ec-3","mp4a.a6","ac-3","mp4a.a5","mp4a.40"]},style:{aspectratio:1.7777777777777777,uiManagerFactory:function(e,t){var i=n.Environment.modules.playerui.UIFactory;if(null!=i&&i.buildUI&&"function"==typeof i.buildUI)return new i.buildUI(e,t);if(null!=i&&i.buildDefaultUI&&"function"==typeof i.buildDefaultUI)return new i.buildDefaultUI(e,t);throw Error("Default UI initialization method not found. Provide a custom `uiManagerFactory` via `StyleConfig`.")},visibility:{enableTracking:!1,visibilityThreshold:50}},tweaks:{file_protocol:!1},adaptation:{mobile:{limitToPlayerSize:!1,exclude:!1,qualityStabilityBalance:.5,bitrates:{minSelectableAudioBitrate:0,maxSelectableAudioBitrate:1/0,minSelectableVideoBitrate:0,maxSelectableVideoBitrate:1/0},resolution:{minSelectableVideoHeight:0,maxSelectableVideoHeight:1/0,minSelectableVideoWidth:0,maxSelectableVideoWidth:1/0}},desktop:{limitToPlayerSize:!1,exclude:!1,qualityStabilityBalance:.5,bitrates:{minSelectableAudioBitrate:0,maxSelectableAudioBitrate:1/0,minSelectableVideoBitrate:0,maxSelectableVideoBitrate:1/0},resolution:{minSelectableVideoHeight:0,maxSelectableVideoHeight:1/0,minSelectableVideoWidth:0,maxSelectableVideoWidth:1/0}}},cast:{enable:!1},events:{},licensing:{},live:{incrementalManifestUpdates:!0},logs:{bitmovin:!0},location:{ui:n.Environment.baseUrl+"bitmovinplayer-ui.js",ui_css:n.Environment.baseUrl+"bitmovinplayer-ui.css",serviceworker:"",cast:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",google_ima:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}}},60865:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getLowLatencyDefaultConfig=function(e){return void 0===e&&(e={}),{live:r(e),tweaks:o()}};var n=i(21281),r=function(e){return{lowLatency:{targetLatency:e.targetLatency??5,catchup:{playbackRateThreshold:.075,seekThreshold:5,playbackRate:1.2},fallback:{playbackRateThreshold:.075,seekThreshold:5,playbackRate:.95}},synchronization:[{method:n.LiveSynchronizationMethod.HttpHead,serverUrl:"https://time.akamai.com"}]}},o=function(){return{RESTART_THRESHOLD:.2,RESTART_THRESHOLD_DELTA:.05,STARTUP_THRESHOLD:.2,STARTUP_THRESHOLD_DELTA:.05,DURATION_MISMATCH_TOLERANCE:.05,LOW_LATENCY_BUFFER_GUARD:.8}}},90571:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerConfiguration=void 0;var r=i(40306),o=i(3336),a=i(44468),s=i(70962),l=i(21513),c=i(70850),u=i(53129);t.PlayerConfiguration=function(){function e(e){if(!e)throw new o.PlayerError(r.ErrorCode.SETUP_MISSING_CONFIGURATION,void 0,"The player must be configured with a valid `PlayerConfig`, but no configuration was provided.");this.BX={},this.CX=e,this.DX()}return e.mergeSizeConfig=function(e,t){var i,n,r=!1,o=!1,a=!1;if(t.style?(a=!!t.style.width,o=!!t.style.height,r=!!t.style.aspectratio):t.style={},e.style=e.style||{},r){var s=(0,c.parseAspectRatio)(null!=(n=null==(i=u.DefaultConfig.style)?void 0:i.aspectratio)?n:1.7777777777777777);e.style.aspectratio=(0,c.parseAspectRatio)(t.style.aspectratio)||s}else e.style.aspectratio=u.DefaultConfig.style.aspectratio;a&&!isNaN(String(t.style.width).slice(-1))&&(e.style.width=t.style.width+"px"),o&&!isNaN(String(t.style.height).slice(-1))&&(e.style.height=t.style.height+"px")},e.prototype.DX=function(){var t=this;c.Util.deepCopyMulti(this.BX,u.DefaultConfig,this.CX);var i=this.CX.adaptation||{},n={};c.Util.deepCopy(n,i),delete n.mobile,delete n.desktop,(0,l.getCapabilities)().isMobile?this.BX.adaptation=c.Util.deepCopyMulti({},u.DefaultConfig.adaptation.mobile,n,i.mobile):this.BX.adaptation=c.Util.deepCopyMulti({},u.DefaultConfig.adaptation.desktop,n,i.desktop);var r=this.BX.adaptation.bitrates;["minSelectableAudioBitrate","maxSelectableAudioBitrate","minSelectableVideoBitrate","maxSelectableVideoBitrate"].forEach(function(e){t.BX.adaptation.bitrates[e]=c.Util.extractBitrateFromString(e.substring(0,3),r[e])}),e.mergeSizeConfig(this.BX,this.CX)},e.overwriteConfigEntries=function(e,t,i){if(t.hasOwnProperty(i)){var n=t[i];for(var r in n)n.hasOwnProperty(r)&&"fixed"!==r&&e.hasOwnProperty(r.toUpperCase())?e[r.toUpperCase()]=n[r]:n.hasOwnProperty(r)&&"MAX_BUFFER_LEVEL"===r.toUpperCase()&&(e.TARGET_BUFFER_LEVEL[a.MediaType.Video][a.BufferType.ForwardDuration]=n[r],e.TARGET_BUFFER_LEVEL[a.MediaType.Audio][a.BufferType.ForwardDuration]=n[r])}},e.prototype.getSettings=function(t){void 0===t&&(t=this.BX);var i,r={},o=t.adaptation||{};return c.Util.deepCopy(r,s.DefaultSettings),e.overwriteConfigEntries(r,t,"tweaks"),e.overwriteConfigEntries(r,t,"cast"),o.bitrates=o.bitrates||{},o.exclude=o.exclude||!1,r.EXCLUDE_DISALLOWED_REPRESENTATIONS=o.exclude,r.MIN_SELECTABLE_AUDIO_BITRATE=o.bitrates.minSelectableAudioBitrate||0,r.MAX_SELECTABLE_AUDIO_BITRATE=o.bitrates.maxSelectableAudioBitrate||1/0,r.MIN_SELECTABLE_VIDEO_BITRATE=o.bitrates.minSelectableVideoBitrate||0,r.MAX_SELECTABLE_VIDEO_BITRATE=o.bitrates.maxSelectableVideoBitrate||1/0,r.QUALITY_THRESHOLD=o.qualityThreshold||r.QUALITY_THRESHOLD,r.QUALITY_UPPER_THRESHOLD=o.qualityUpperThreshold||r.QUALITY_UPPER_THRESHOLD,r.WISH_ABR_PARAMS=n(n({},s.DefaultSettings.WISH_ABR_PARAMS),(null==(i=t.tweaks)?void 0:i.wish_abr_params)||{}),r},e.prototype.getUserConfig=function(){return this.CX},e.prototype.update=function(e){var t={};for(var i in c.Util.deepCopy(t,e),t)t.hasOwnProperty(i)&&(this.BX[i]=t[i],this.CX[i]=t[i])},e.prototype.get=function(e,t){return void 0===t&&(t=this.BX),e?t.hasOwnProperty(e)?this.BX[e]:{}:t},e.prototype.playback=function(){return this.get("playback")},e.prototype.style=function(){return this.get("style")},e.prototype.buffer=function(){return this.get("buffer")},e.prototype.tweaks=function(){return this.get("tweaks")},e.prototype.adaptation=function(){return this.get("adaptation")},e.prototype.advertising=function(){return this.get("advertising")},e.prototype.cast=function(){return this.get("cast")},e.prototype.logs=function(){return this.get("logs")},e.prototype.licensing=function(){return this.get("licensing")},e.prototype.live=function(){return this.get("live")},e.prototype.location=function(){return this.get("location")},e}()},65567:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getTvDefaultConfig=function(e){if((0,n.isUsingFileProtocol)()&&!e)throw Error("You have to provide an app_id if you are loading the app through file protocol");return function(e){var t={forwardduration:r,backwardduration:o},i={buffer:{video:t,audio:t},playback:{autoplay:!0},tweaks:{minimal_backward_buffer_clearing_interval:5}};return e&&(i.tweaks.app_id=e,i.tweaks.file_protocol=!0,i.analytics={config:{origin:e}}),i}(e)};var n=i(47993),r=30,o=10},78760:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAppIdConfig=function(e){var t=e.get("tweaks"),i=(0,s.getCapabilities)()[a.CapabilityKey.isReactNative],c=(0,l.isUsingFileProtocol)();if(c||i){if(!t.app_id||c&&!t.file_protocol)throw new r.PlayerError(n.ErrorCode.SETUP_UNSUPPORTED_PROTOCOL,{tweaks:JSON.stringify(t)},"The current tweaks configuration is not valid: ".concat(t.app_id?"file_protocol":"app_id"," is missing."));t.app_id&&(!o.Environment.hostname||i)&&(o.Environment.hostname=t.app_id)}};var n=i(40306),r=i(3336),o=i(45202),a=i(7387),s=i(21513),l=i(47993)},40306:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0,function(e){e[e.UNKNOWN=1e3]="UNKNOWN",e[e.API_NOT_AVAILABLE=1001]="API_NOT_AVAILABLE",e[e.SETUP_ERROR=1100]="SETUP_ERROR",e[e.SETUP_NO_HTML_ELEMENT=1101]="SETUP_NO_HTML_ELEMENT",e[e.SETUP_MISSING_CONFIGURATION=1102]="SETUP_MISSING_CONFIGURATION",e[e.SETUP_LICENSE_ERROR=1103]="SETUP_LICENSE_ERROR",e[e.SETUP_MISSING_DOMAIN_LICENSE_WHITELIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_WHITELIST",e[e.SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST",e[e.SETUP_MISSING_LICENSE_WHITELIST=1105]="SETUP_MISSING_LICENSE_WHITELIST",e[e.SETUP_MISSING_LICENSE_ALLOWLIST=1105]="SETUP_MISSING_LICENSE_ALLOWLIST",e[e.SETUP_INVALID_LICENSE_SERVER=1106]="SETUP_INVALID_LICENSE_SERVER",e[e.SETUP_INVALID_IMPRESSION_SERVER=1107]="SETUP_INVALID_IMPRESSION_SERVER",e[e.SETUP_NO_RENDERING_ENGINE=1108]="SETUP_NO_RENDERING_ENGINE",e[e.SETUP_UNSUPPORTED_PROTOCOL=1113]="SETUP_UNSUPPORTED_PROTOCOL",e[e.SOURCE_ERROR=1200]="SOURCE_ERROR",e[e.SOURCE_INVALID=1201]="SOURCE_INVALID",e[e.SOURCE_MANIFEST_INVALID=1202]="SOURCE_MANIFEST_INVALID",e[e.SOURCE_NO_SUPPORTED_TECHNOLOGY=1203]="SOURCE_NO_SUPPORTED_TECHNOLOGY",e[e.SOURCE_STREAM_TYPE_NOT_SUPPORTED=1204]="SOURCE_STREAM_TYPE_NOT_SUPPORTED",e[e.SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED=1205]="SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED",e[e.SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY=1206]="SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY",e[e.SOURCE_EMPTY_SEGMENT=1207]="SOURCE_EMPTY_SEGMENT",e[e.SOURCE_COULD_NOT_LOAD_MANIFEST=1208]="SOURCE_COULD_NOT_LOAD_MANIFEST",e[e.SOURCE_PROGRESSIVE_STREAM_ERROR=1209]="SOURCE_PROGRESSIVE_STREAM_ERROR",e[e.SOURCE_HLS_STREAM_ERROR=1210]="SOURCE_HLS_STREAM_ERROR",e[e.SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED=1211]="SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED",e[e.SOURCE_INVALID_H264_CODEC=7043]="SOURCE_INVALID_H264_CODEC",e[e.PLAYBACK_ERROR=1300]="PLAYBACK_ERROR",e[e.PLAYBACK_VIDEO_DECODING_ERROR=1301]="PLAYBACK_VIDEO_DECODING_ERROR",e[e.PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER=1304]="PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER",e[e.NETWORK_ERROR=1400]="NETWORK_ERROR",e[e.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT=1401]="NETWORK_MANIFEST_DOWNLOAD_TIMEOUT",e[e.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT=1402]="NETWORK_SEGMENT_DOWNLOAD_TIMEOUT",e[e.NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT=1403]="NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT",e[e.NETWORK_FAILED_CERTIFICATE_REQUEST=1404]="NETWORK_FAILED_CERTIFICATE_REQUEST",e[e.DRM_ERROR=2e3]="DRM_ERROR",e[e.DRM_MISSING_CONFIGURATION=2001]="DRM_MISSING_CONFIGURATION",e[e.DRM_NO_LICENSE_SERVER_URL_PROVIDED=2002]="DRM_NO_LICENSE_SERVER_URL_PROVIDED",e[e.DRM_FAILED_LICENSE_REQUEST=2003]="DRM_FAILED_LICENSE_REQUEST",e[e.DRM_KEY_SIZE_NOT_SUPPORTED=2005]="DRM_KEY_SIZE_NOT_SUPPORTED",e[e.DRM_NO_KEY_SYSTEM=2006]="DRM_NO_KEY_SYSTEM",e[e.DRM_KEY_SESSION_INITIALIZATION_FAILED=2007]="DRM_KEY_SESSION_INITIALIZATION_FAILED",e[e.DRM_MEDIA_KEY_INITIALIZATION_FAILED=2008]="DRM_MEDIA_KEY_INITIALIZATION_FAILED",e[e.DRM_KEY_ERROR=2009]="DRM_KEY_ERROR",e[e.DRM_KEY_SYSTEM_NOT_SUPPORTED=2010]="DRM_KEY_SYSTEM_NOT_SUPPORTED",e[e.DRM_CERTIFICATE_ERROR=2011]="DRM_CERTIFICATE_ERROR",e[e.DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR=2012]="DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR",e[e.DRM_RESTRICTED_OUTPUT=2013]="DRM_RESTRICTED_OUTPUT",e[e.DRM_INIT_DATA_MISSING=2015]="DRM_INIT_DATA_MISSING",e[e.VR_ERROR=2100]="VR_ERROR",e[e.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY=2101]="VR_INCOMPATIBLE_PLAYER_TECHNOLOGY",e[e.MODULE_ERROR=3e3]="MODULE_ERROR",e[e.MODULE_INVALID_DEFINITION=3001]="MODULE_INVALID_DEFINITION",e[e.MODULE_INVALID_DEFINITION_DEPENDENCY=3002]="MODULE_INVALID_DEFINITION_DEPENDENCY",e[e.MODULE_MISSING=3003]="MODULE_MISSING",e[e.MODULE_DEPENDENCY_MISSING=3004]="MODULE_DEPENDENCY_MISSING",e[e.MODULE_REMOVED=3005]="MODULE_REMOVED",e[e.MODULE_ADVERTISING_ERROR=3100]="MODULE_ADVERTISING_ERROR",e[e.SEGMENT_PSSH_DATA_MISSING=4e3]="SEGMENT_PSSH_DATA_MISSING"}(i||(t.ErrorCode=i={}))},3336:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerError=void 0;var n=i(40306);t.PlayerError=function(){return function(e,t,i,r){this.code=e,this.name=n.ErrorCode[e],this.sourceIdentifier=r,this.message=i??"".concat(this.name),this.data=t,"captureStackTrace"in Error&&"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error(this.message).stack}}()},25926:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerWarning=void 0;var n=i(3714),r=i(4224);t.PlayerWarning=function(){return function(e,t,i){this.type=n.PlayerEvent.Warning,this.code=e,this.name=r.WarningCode[e],this.message=t||"".concat(this.code,"/").concat(this.name),this.data=i}}()},4224:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.WarningCode=void 0,function(e){e[e.GENERAL_WARNING=1e3]="GENERAL_WARNING",e[e.API_INVALID_ARGUMENT=1001]="API_INVALID_ARGUMENT",e[e.SETUP_WARNING=1100]="SETUP_WARNING",e[e.SETUP_CREATE_OBJECT_URL_MISSING=1101]="SETUP_CREATE_OBJECT_URL_MISSING",e[e.SETUP_SERVICE_WORKER_INITIALIZATION_FAILED=1103]="SETUP_SERVICE_WORKER_INITIALIZATION_FAILED",e[e.SETUP_SERVICE_WORKER_LOCATION_MISSING=1104]="SETUP_SERVICE_WORKER_LOCATION_MISSING",e[e.SOURCE_WARNING=1200]="SOURCE_WARNING",e[e.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED=1201]="SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED",e[e.SOURCE_SMOOTH_REPRESENTATION_MISSING=1202]="SOURCE_SMOOTH_REPRESENTATION_MISSING",e[e.SOURCE_SMOOTH_INVALID_INIT_DATA=1203]="SOURCE_SMOOTH_INVALID_INIT_DATA",e[e.SOURCE_SMOOTH_UNKNOWN_STREAM_INDEX_TYPE=1204]="SOURCE_SMOOTH_UNKNOWN_STREAM_INDEX_TYPE",e[e.SOURCE_SMOOTH_EMPTY_QUALITY_LEVEL=1205]="SOURCE_SMOOTH_EMPTY_QUALITY_LEVEL",e[e.PLAYBACK_WARNING=1300]="PLAYBACK_WARNING",e[e.PLAYBACK_GAP_DETECTED=1301]="PLAYBACK_GAP_DETECTED",e[e.PLAYBACK_DECODE_RETRIES_EXCEEDED=1302]="PLAYBACK_DECODE_RETRIES_EXCEEDED",e[e.PLAYBACK_COULD_NOT_BE_STARTED=1303]="PLAYBACK_COULD_NOT_BE_STARTED",e[e.PLAYBACK_NEGATIVE_DECODING_TIMESTAMP_ENCOUNTERED=1304]="PLAYBACK_NEGATIVE_DECODING_TIMESTAMP_ENCOUNTERED",e[e.PLAYBACK_INVALID_DATA_SEGMENT_ENCOUNTERED=1305]="PLAYBACK_INVALID_DATA_SEGMENT_ENCOUNTERED",e[e.PLAYBACK_VIDEO_DECODING_ERROR_RECOVERY=1306]="PLAYBACK_VIDEO_DECODING_ERROR_RECOVERY",e[e.NETWORK_WARNING=1400]="NETWORK_WARNING",e[e.NETWORK_COULD_NOT_LOAD_MANIFEST=1401]="NETWORK_COULD_NOT_LOAD_MANIFEST",e[e.NETWORK_COULD_NOT_LOAD_SUBTITLE=1402]="NETWORK_COULD_NOT_LOAD_SUBTITLE",e[e.DRM_WARNING=2e3]="DRM_WARNING",e[e.DRM_SERVER_CERTIFICATE_NOT_SUPPORTED=2001]="DRM_SERVER_CERTIFICATE_NOT_SUPPORTED",e[e.DRM_COULD_NOT_DECRYPT_SEGMENT=2002]="DRM_COULD_NOT_DECRYPT_SEGMENT",e[e.DRM_LICENSE_RENEWAL_FAILED=2003]="DRM_LICENSE_RENEWAL_FAILED",e[e.DRM_FAILED_LICENSE_REQUEST=2004]="DRM_FAILED_LICENSE_REQUEST",e[e.DRM_RESTRICTED_OUTPUT=2013]="DRM_RESTRICTED_OUTPUT",e[e.VR_WARNING=2100]="VR_WARNING",e[e.VR_RENDERING_ERROR=2101]="VR_RENDERING_ERROR",e[e.MODULE_WARNING=3e3]="MODULE_WARNING",e[e.MODULE_MISSING=3001]="MODULE_MISSING",e[e.MODULE_ADVERTISING_WARNING=3100]="MODULE_ADVERTISING_WARNING",e[e.MODULE_ADVERTISING_IMA_SDK_NOT_FOUND=3101]="MODULE_ADVERTISING_IMA_SDK_NOT_FOUND",e[e.MODULE_ADVERTISING_OM_SDK_MODULE_MISSING=3102]="MODULE_ADVERTISING_OM_SDK_MODULE_MISSING",e[e.MODULE_ADVERTISING_OM_SDK_INIT_FAILURE=3103]="MODULE_ADVERTISING_OM_SDK_INIT_FAILURE",e[e.MODULE_ADVERTISING_OM_SDK_TRACKING_FAILURE=3104]="MODULE_ADVERTISING_OM_SDK_TRACKING_FAILURE"}(i||(t.WarningCode=i={}))},48143:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceManager=void 0,t.disposeService=function(e,t,i){void 0===i&&(i=r);var n=e.get(t,i);n&&(n.dispose(),e.set(t,null,i))};var n=i(80813),r="player-scoped";function o(e){return Object.keys(e).sort(function(e){return e!==n.ServiceName.SourceStoreService?-1:1}).filter(function(t){return!!e[t]})}t.ServiceManager=function(){function e(){this.OD={},this.PD=new WeakMap}return e.prototype.has=function(e,t){return void 0===t&&(t=r),!!this.get(e,t)},e.prototype.get=function(e,t){if(void 0===t&&(t=r),this.OD[t])return this.OD[t][e]},e.prototype.set=function(e,t,i){void 0===i&&(i=r),this.OD[i]||(this.OD[i]={}),this.OD[i][e]=t,t&&this.PD.set(t,i)},e.prototype.getScope=function(e){return this.PD.get(e)},e.prototype.delete=function(e,t){void 0===t&&(t=r),this.OD[t]&&this.OD[t][e]&&(this.PD.delete(this.OD[t][e]),this.OD[t][e].dispose(),delete this.OD[t][e])},e.prototype.maybeCall=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=r);var o=this.get(e,n);return o?t(o):i},e.prototype.dispose=function(){Object.values(this.OD).forEach(function(e){o(e).forEach(function(t){e[t].dispose()})}),this.OD={},delete this.PD},e.prototype.removeNonPlayerScopeServices=function(){var e=this;Object.keys(this.OD).filter(function(e){return e!==r}).forEach(function(t){o(e.OD[t]).forEach(function(i){e.delete(i,t)}),delete e.OD[t]})},e}()},80813:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceName=void 0,function(e){e.AdaptationService="AdaptationService",e.DrmDetectorService="DrmDetectorService",e.DrmService="DrmService",e.HeartbeatService="HeartbeatService",e.LiveLatencyService="LiveLatencyService",e.ManifestCachingService="ManifestCachingService",e.ManifestLoadingService="ManifestLoadingService",e.ManifestService="ManifestService",e.ManifestUpdateSchedulingService="ManifestUpdateSchedulingService",e.MetadataParsedService="MetadataParsedService",e.NativeManifestService="NativeManifestService",e.PlayerStateService="PlayerStateService",e.RecoveryService="RecoveryService",e.SegmentService="SegmentService",e.SourceStoreService="SourceStoreService",e.StallTimeTrackerService="StallTimeTrackerService",e.StartOffsetService="StartOffsetService",e.StreamTimeService="StreamTimeService",e.SubtitleService="SubtitleService",e.SynchronizedTimeService="SynchronizedTimeService",e.ThumbnailService="Thumbn
13ailService",e.TimedMetadataService="TimedMetadataService",e.SgaiService="SgaiService"}(i||(t.ServiceName=i={}))},51289:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandler=void 0,t.generateTroubleshootUrl=l;var r=i(3336),o=i(3714),a=i(48669),s=function(){function e(){var e=this;this.call=function(){e.aH.call(e.bH,e.data)},this.match=function(t){return!!e.cH&&("string"==typeof t?t===e.eventType:t===e.aH)}}return e.prototype.set=function(e,t,i,n,r){void 0===r&&(r=!0),this.aH=e,this.eventType=t,this.bH=i,this.data=n,this.cH=r},e.prototype.clear=function(){this.aH=null,this.eventType=null,this.bH=null,this.data=null,this.cH=null},Object.defineProperty(e.prototype,"cancelable",{get:function(){return this.cH},enumerable:!1,configurable:!0}),e}();function l(e){return"https://bitmovin.com/docs/player/web/errors/".concat(e)}t.EventHandler=function(){function e(e,t,i){var n=this;for(var r in this.mH=!1,this.nH=!1,this.oH=function(){for(var e,t=n.gH?n.iH.length:20,i=null!=(e=n.iH.splice(0,t))?e:[],r=0;r<i.length;r++){var a=i[r];!a||n.hH&&a.eventType!==o.PlayerEvent.Destroy||n.pH(a)}n.mH=!1,n.iH.length>0&&n.KI()},this.CI=function(e,t,i,r){if(void 0===r&&(r=!0),n.rH(e,t,i)){var o=n.GI(i),l=0,c=n.qH(t,e);o[e].forEach(function(t){var i=n.kH.pop()||new s;i.set(t.listener,e,n.dH,c,r),n.iH.push(i),l+=+!!t.repeatable}),l<o[e].length&&(o[e].sort(function(e,t){return a.Comparators.reverseBoolean(e.repeatable,t.repeatable)}),o[e].length=l),n.iH.length>0&&n.KI()}},this.dispatchEvent=function(e,t,i){void 0===i&&(i=!0),n.gH||n.HI(e,t,i)},this.clearEventsOfType=function(e){var t=n.iH.reduce(function(t,i,n){return i.match(e)?t.concat(n):t},[]);for(t.sort(function(e,t){return e-t});t.length>0;)n.iH.splice(t.pop(),1)},this.LI=function(e){e.data===n.lH&&(window.removeEventListener("message",n.LI),n.oH())},this.eH=e,this.dH=t,this.fH={internal:{},external:{}},this.gH=!1,this.hH=!1,this.iH=[],this.kH=[],o.PlayerEvent)o.PlayerEvent.hasOwnProperty(r)&&(this.fH.internal[o.PlayerEvent[r]]=[],this.fH.external[o.PlayerEvent[r]]=[]);this.jH=[],this.lH="".concat("bitmovin.triggerQueueWorker",".").concat(i)}return e.prototype.pH=function(e){try{e.call(),e.clear(),this.kH.push(e)}catch(e){this.eH.warn("unhandled exception in event callback",e)}},e.prototype.qH=function(e,t){return n({type:t,timestamp:Date.now()},e)},e.prototype.rH=function(e,t,i){var n=this.GI(i),r=n.hasOwnProperty(e)&&n[e].length;return!!(!this.gH&&r)},e.prototype.DI=function(e){this.iH=this.iH.filter(function(t){return!t.match(e)})},e.prototype.EI=function(e,t,i){var n=this.GI(i);n.hasOwnProperty(e)&&(n[e]=n[e].filter(function(e){return e.listener!==t}))},e.prototype.FI=function(e,t){if(e&&e instanceof r.PlayerError){var i={type:o.PlayerEvent.Error,timestamp:Date.now(),code:e.code,name:e.name,message:e.message,data:e.data,troubleShootLink:l(e.code)};t&&(i.sourceIdentifier=e.sourceIdentifier),this.CI(o.PlayerEvent.Error,i,t)}else this.eH.error("Supplied error is not of type PlayerError:",e)},e.prototype.GI=function(e){return e?this.fH.internal:this.fH.external},e.prototype.HI=function(e,t,i){if(void 0===t&&(t={}),void 0===i&&(i=!0),e===o.PlayerEvent.Error){var n=t;n.hasOwnProperty("code")||(n.code=3e3)}t&&!t.hasOwnProperty("timestamp")&&(t.timestamp=Date.now()),this.CI(e,t,!0,i),this.jH.length>0&&!this.II(e,t)||this.CI(e,t,!1,i)},e.prototype.II=function(e,t){return this.jH.every(function(i){return i(e,t)})},e.prototype.JI=function(e,t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!0);var r=this.GI(i);r.hasOwnProperty(e)&&t&&!r[e].find(function(e){return e&&e.listener===t})&&r[e].push({listener:t,repeatable:n})},e.prototype.on=function(e,t,i){void 0===i&&(i=!1),this.JI(e,t,i)},e.prototype.one=function(e,t,i){void 0===i&&(i=!1),this.JI(e,t,i,!1)},e.prototype.addFromObject=function(e,t){for(var i in void 0===t&&(t=!1),e)e.hasOwnProperty(i)&&this.on(i,e[i],t)},e.prototype.off=function(e,t,i){void 0===i&&(i=!0),i&&this.DI(t),this.EI(e,t,!0),this.EI(e,t,!1)},e.prototype.getEventFunction=function(){var e=this;return function(t,i,n,r){void 0===r&&(r=!0),e.dispatchEvent(t,i,r)}},e.prototype.addExternalEventFilter=function(e){0>this.jH.indexOf(e)&&this.jH.push(e)},e.prototype.removeExternalEventFilter=function(e){var t=this.jH.indexOf(e);t>=0&&this.jH.splice(t,1)},e.prototype.dispose=function(){this.iH=this.iH.filter(function(e){return!e.cancelable}),this.gH=!0,this.HI=null,this.jH=null,this.oH()},e.prototype.setBeingDestroyed=function(){this.hH=!0},Object.defineProperty(e.prototype,"hasErrorBeenFired",{get:function(){return this.nH}
vendor: 65,617 bytes, lines 13-14
13,enumerable:!1,configurable:!0}),e.prototype.resetErrors=function(){this.nH=!1},e.prototype.fireError=function(e){var t,i;this.FI(e,!0),!this.nH&&this.II(o.PlayerEvent.Error,e)&&(this.nH=!0,this.FI(e,!1)),this.eH.error("PlayerError(".concat(e.code,"/").concat(e.name,") ").concat(null!=(t=e.message)?t:""),null!=(i=e.data)?i:" ")},e.prototype.KI=function(){this.mH||(this.mH=!0,window.addEventListener("message",this.LI),window.postMessage(this.lH,location.origin+location.pathname))},e}()},90408:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.maybeFireDurationChangedEvent=function(e,t,i){null!=e&&e!==t&&i&&i.dispatchEvent(n.PlayerEvent.DurationChanged,{from:e,to:t})},t.createPlayerErrorFromMediaError=function(e,t,i){void 0===i&&(i=!1);var n,s=a(e)?e.errorObject.code:e.code,l=a(e)?e.errorMessage:JSON.stringify(e),c=a(e)?e.errorObject:{errorMessage:JSON.stringify(e),code:s};i&&(c.exception=l);var u=null!=(n=o.ErrorCodeMap[o.MediaErrorCode[s]])?n:r.ErrorCode.UNKNOWN;return new r.PlayerError(u,c,"The video element has thrown a media error.",t)};var n=i(3714),r=i(20213),o=i(75108);function a(e){return"errorObject"in e}},89279:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ImpressionCall=void 0;var n=i(45202),r=i(4129),o=i(29669),a=i(7387),s=i(21513),l=i(79069);function c(){return(0,s.getCapabilities)()[a.CapabilityKey.isReactNative]?"Kepler:unknown":"generic"}t.ImpressionCall=function(){function e(e,t){this.logger=e,this.rX=!1,this.sX=l.LicensingLegacySslBackendBaseUrl+"/impression",this.setImpressionServerUrl(t)}return e.prototype.tX=function(e){return new r.DefaultContentLoader({settings:{RETRY_DELAY:0,INCREASE_RETRY_DELAY:!1,INCREASE_RETRY_DELAY_BASE_SEC:0,MAX_INCREASE_RETRY_DELAY_SEC:0,QUERY_PARAMETERS:[],HTTP_HEADERS:null,XHR_TIMEOUT:2e4,DISABLE_RETRY_FOR_RESPONSE_STATUS:{}},logger:this.logger,config:{network:{requestApi:e}}})},e.prototype.issue=function(e,t,i){var r,a=this;if(this.rX)return Promise.resolve(void 0);this.pX=null!=(r=this.pX)?r:this.tX(i),this.rX=!0;var l={domain:n.Environment.hostname,key:e,version:n.Environment.VERSION_NUMBER,type:"web:"+t,platform:c()};return this.pX.load(this.qX,o.HttpRequestMethod.POST,null,JSON.stringify(l)).then(function(e){return e},function(n){return a.qX!==a.sX&&(0,s.getCapabilities)().isTizen?(a.rX=!1,a.setImpressionServerUrl(a.sX),a.issue(e,t,i)):n})},e.prototype.setImpressionServerUrl=function(e){e&&(this.qX=e)},e.prototype.reset=function(){this.rX=!1},e.prototype.dispose=function(){var e;null==(e=this.pX)||e.dispose()},e}()},96859:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCall=void 0;var n,r=i(45202),o=i(4129),a=i(29669),s=i(21513),l=i(79069);!function(e){e.Granted="granted",e.Denied="denied"}(n||(n={}));var c=["localhost","127.0.0.1"],u=l.LicensingLegacySslBackendBaseUrl+"/licensing";function d(e){if("string"==typeof e)try{return JSON.parse(e)}catch{return{}}return e}t.LicenseCall=function(){function e(e,t,i){this.IY=0,this.JY=[],this.KY=!1,this.LY=void 0,this.uX=t,this.vX=i,this.HY=e}return e.prototype.issue=function(e,t){var i=this;this.MY()?setTimeout(function(){return e(!0)},0):this.vX?this.LY?setTimeout(function(){return e(i.LY.granted,i.LY.payload,i.LY.data)},0):(this.JY.push(e),this.KY||(this.KY=!0,setTimeout(function(){i.OY(i.vX,i.uX,t)},this.IY))):setTimeout(function(){return e(!1,{validationInformation:[{key:"key",errorMessage:"field can't take an empty string"}]})},0)},e.prototype.MY=function(){return c.includes(r.Environment.hostname)||!this.uX},e.handleSuccessfulLicenseRequest=function(e){var t={granted:!1,payload:{},data:{}};return e&&e.analytics&&(t.data.analytics={key:e.analytics}),e&&e.hasOwnProperty("status")&&(e.status===n.Granted?(t.granted=!0,t.payload=function(e){var t={};return e.hasOwnProperty("reporting")&&e.reporting&&(t.reporting=!0),e.hasOwnProperty("reportingUrls")&&(t.reportingUrls=e.reportingUrls),e.hasOwnProperty("reportingInterval")&&(t.reportingInterval=e.reportingInterval),e.hasOwnProperty("reportingSampleInterval")&&(t.reportingSampleInterval=e.reportingSampleInterval),t}(e)):e.status===n.Denied&&(t.granted=!1,t.payload={message:e.message})),t},e.handleFailedLicenseRequest=function(e){var t={granted:!1,payload:{},data:{}};return e&&e.hasOwnProperty("validationInformation")?(t.granted=!1,t.payload=e):t.granted=!0,t},e.prototype.NY=function(e){for(var t=0,i=this.JY;t<i.length;t++)(0,i[t])(e.granted,e.payload,e.data)},e.prototype.setCustomData=function(e){this.GY=e},e.prototype.setDelay=function(e){isNaN(e)||(this.IY=Math.min(e,3e4))},e.prototype.OY=function(t,i,n){var o=this,l=JSON.stringify({domain:r.Environment.hostname,key:t||"",version:r.Environment.VERSION_NUMBER,customData:this.GY}),c=this.PY(n);c.load(i,a.HttpRequestMethod.POST,a.HttpResponseType.JSON,l).then(function(t){c.dispose(),o.LY=e.handleSuccessfulLicenseRequest(d(t.body)),o.KY=!1,o.NY(o.LY)},function(r){c.dispose(),i!==u&&(0,s.getCapabilities)().isTizen?setTimeout(function(){return o.OY(t,u,n)},o.IY):(o.LY=e.handleFailedLicenseRequest(d(r.body)),o.KY=!1,o.NY(o.LY))})},e.prototype.PY=function(e){return new o.DefaultContentLoader({settings:{RETRY_DELAY:0,INCREASE_RETRY_DELAY:!1,INCREASE_RETRY_DELAY_BASE_SEC:0,MAX_INCREASE_RETRY_DELAY_SEC:0,QUERY_PARAMETERS:[],HTTP_HEADERS:null,XHR_TIMEOUT:2e4,DISABLE_RETRY_FOR_RESPONSE_STATUS:{}},logger:this.HY,config:{network:{requestApi:e}}})},e.getInstance=function(t,i,n){var r=[i,n].toString();return e.instanceMap.hasOwnProperty(r)||(e.instanceMap[r]=new e(t,i,n)),e.instanceMap[r]},e.reset=function(){Object.keys(e.instanceMap).forEach(function(t){return delete e.instanceMap[t]})},e.instanceMap={},e}()},79069:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LicensingLegacySslBackendBaseUrl=void 0,t.LicensingLegacySslBackendBaseUrl=atob("aHR0cHM6Ly9saWNlbnNpbmctbGVnYWN5LXNzbC1jb21wYXQuYml0bW92aW4uY29t")},32703:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getDateRangeEvent=r,t.nextDateRangeWithSameClass=o,t.extractDateRangeMetadata=function(e,t,i){e.forEach(function(e,n,a){var s;e.endOnNext&&e.class&&(s=o(e,n,a)),i(r(e,t,s))})};var n=i(89927);function r(e,t,i){var r={};return r.startTime=(0,n.toSeconds)(Date.parse(e.startDate)),e.endDate?r.endTime=(0,n.toSeconds)(Date.parse(e.endDate)):void 0===e.duration||isNaN(e.duration)?e.endOnNext&&i&&(r.endTime=(0,n.toSeconds)(Date.parse(i.startDate))):r.endTime=(0,n.toSeconds)(Date.parse(e.startDate))+e.duration,t&&(r.startTime-=t),r.endTime&&t&&(r.endTime-=t),r.data=e,r}function o(e,t,i){for(var n=t+1;n<i.length;n++)if(i[n].class&&i[n].class===e.class)return i[n]}},58735:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateMetadataHash=function(e,t){var i;return void 0===t&&(t=""),o(e)?String((0,r.calcHash)(e.metadataType+e.start+e.metadata.id+Object.keys(e.metadata).length+Object.keys(null!=(i=e.metadata.clientAttributes)?i:{}).length)):String((0,r.calcHash)(t+JSON.stringify(e)))},t.isDateRangeMetadata=o;var n=i(20213),r=i(57387);function o(e){return e.metadataType===n.MetadataType.DATERANGE}},59225:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataService=void 0;var n=i(80813),r=i(32485);t.MetadataService=function(){function e(e,t){this.K1=e,this.L1=new r.TimeMetadataHandler(e,t)}return e.prototype.addToMetadataParsedService=function(e,t,i){var r;t.start=t.start||e,null==(r=this.K1.serviceManager.get(n.ServiceName.MetadataParsedService))||r.addMetadata(i,t)},e.prototype.addToTimeline=function(e,t,i){this.L1.add(e,t,i)},e.prototype.removeUntil=function(e){this.L1.removeUntil(e)},e.prototype.removeMatchingCues=function(e,t){this.L1.removeMatchingCues(e,t)},e.prototype.reset=function(e){this.L1.reset(e)},e.prototype.dispose=function(){this.L1.dispose()},e}()},34851:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataTimeline=void 0;var o=i(3714);t.MetadataTimeline=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.addCue=function(t,i,n){var a,s;if(!isNaN(t)&&!isNaN(i)&&n){var l=this.scb(n.metadata,this.cues);if(-1===l)e.prototype.addCue.call(this,t,i,n);else{var c=this.scb(n.metadata,this.activeCues);if(this.tcb(l,c,{start:t+this.timestampOffset,end:i+this.timestampOffset,content:n,updates:r([],this.cues[l].updates,!0)}),-1!==c){var u={metadataType:n.metadataType,metadata:n.metadata,data:n.metadata,start:null!=(a=n.start)?a:t,end:null!=(s=n.end)?s:i};this.context.eventHandler.dispatchEvent(o.PlayerEvent.MetadataChanged,u)}}}},t.prototype.scb=function(e,t){return t.findIndex(function(t){return t.content.metadata.id===e.id})},t.prototype.tcb=function(e,t,i){-1!==e&&this.cues.splice(e,1,i),-1!==t&&this.activeCues.splice(t,1,i)},t}(i(80438).Timeline)},8719:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StoredCueTracker=void 0,t.StoredCueTracker=function(){function e(){this.ugb={}}return e.prototype.add=function(e){this.ugb[e]=void 0},e.prototype.remove=function(e){delete this.ugb[e]},e.prototype.removeAll=function(){this.ugb={}},e.prototype.has=function(e){return e in this.ugb},e.prototype.dispose=function(){this.removeAll()},e}()},32485:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.TimeMetadataHandler=t.TimedMetadataType=void 0,t.isSegmentBoundMetadata=u;var r,o=i(3714),a=i(86897),s=i(15971),l=i(34851),c=i(80438);function u(e){return[r.InBand,r.SegmentPlayback,r.CustomTag].includes(e)}!function(e){e.InBand="inband",e.SegmentPlayback="segmentPlayback",e.Manifest="manifest",e.EventStream="eventStream",e.DateRange="dateRange",e.CustomTag="customTag"}(r||(t.TimedMetadataType=r={})),t.TimeMetadataHandler=function(){function e(e,t){var i=this;this.R1=function(e){var t,n,r;if((null==(t=null==e?void 0:e.content)?void 0:t.eventType)!=null)return null==(r=(n=i.O1)[e.content.eventType])?void 0:r.call(n,e.content)},this.M1=e,this.O1=t,this.P1()}return e.prototype.P1=function(){for(var e in this.N1={},this.O1)this.O1.hasOwnProperty(e)&&(this.N1[e]="dateRange"===e?new l.MetadataTimeline(this.M1,{onCueEnter:this.R1}):new c.Timeline(this.M1,{onCueEnter:this.R1,allowDuplicates:e===r.SegmentPlayback}),this.N1[e].show())},e.prototype.Q1=function(e,t){var i=(0,a.getBufferState)((0,s.getSourceState)(this.M1)),n=(0,a.getBufferStartTime)(null==i?void 0:i.bufferStateMap);e.removeMatchingCues(function(e){return e.start<=t&&e.end<=t+1&&e.end<=n})},e.prototype.add=function(e,t,i){if(this.O1.hasOwnProperty(e)){var a=this.N1[e],s=t+1;e===r.SegmentPlayback&&function(e){return e.metadata&&e.metadata.event&&e.metadata.representationId}(i)&&"event"in i.metadata&&"duration"in i.metadata.event?s=t+i.metadata.event.duration:function(e){return e.metadataType===o.MetadataType.DATERANGE}(i)&&(s=!0===i.metadata.endOnNext&&void 0===i.end?1/0:i.start===i.end?i.end+1:i.end),u(e)&&this.Q1(a,t);var l=n({eventType:e},i);a.addCue(t,s,l)}},e.prototype.reset=function(e){if(e&&this.O1.hasOwnProperty(e))this.N1[e].removeCues();else for(var t in this.O1)this.O1.hasOwnProperty(t)&&this.N1[t].removeCues()},e.prototype.removeMatchingCues=function(e,t){this.N1[e].removeMatchingCues(t)},e.prototype.removeUntil=function(e){var t=this;Object.keys(this.N1).forEach(function(i){t.N1[i].removeCuesUntil(e)})},e.prototype.dispose=function(){for(var e in this.N1)this.N1.hasOwnProperty(e)&&(this.N1[e].dispose(),this.N1[e]=null);this.N1=null},e.prototype.getTimeline=function(e){if(this.N1)return this.N1[e]},e}()},80438:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Timeline=void 0;var r=i(80813),o=i(3714),a=i(13531),s=i(57387),l=i(70850),c=i(58735),u=i(8719);function d(e){return(0,c.isDateRangeMetadata)(e.content)?(0,c.calculateMetadataHash)(e.content):String((0,s.calcHash)(JSON.stringify({start:e.start,end:e.end,content:e.content})))}function h(e){var t={text:e.text};return"html"in e&&(t.html=e.html,t.text=t.text||t.html),"region"in e&&(t.region=e.region),"regionStyle"in e&&(t.regionStyle=e.regionStyle),"position"in e&&(t.position=e.position),"image"in e&&(t.image=e.image),"vtt"in e&&(t.vtt=e.vtt),t}function p(e){var t=[];return"updates"in e&&(t=e.updates.map(function(t){return{updateTime:t.updateTime,content:{html:t.html,text:e.text}}})),t}function f(e,t){for(var i=e.length-1;i>=0;i--)if(e[i].updateTime<=t)return e[i]}t.Timeline=function(){function e(e,t){var i=this;this.cues=[],this.activeCues=[],this.activeCueUpdates=[],this.timestampOffset=0,this.cbb=function(e){var t=e.time||e.relativeTime||0;i.ebb(t),i.fbb(t),i.qcb(t)},this.context=e,this.abb=e.internalPlayer,this.Zbb=t,this.bbb=!1,t.allowDuplicates||(this.storedCueTracker=new u.StoredCueTracker),this.abb&&this.startListening()}return e.prototype.startListening=function(){this.bbb||(this.bbb=!0,this.abb.on(o.PlayerEvent.TimeChanged,this.cbb))},e.prototype.stopListening=function(){this.bbb&&(this.abb.off(o.PlayerEvent.TimeChanged,this.cbb),this.bbb=!1)},e.shouldCueBeActive=function(e,t){return e.end>=t&&e.start<=t},e.prototype.dbb=function(e){for(var t=0;t<this.activeCues.length;t++)if(e===this.activeCues[t])return!0;return!1},e.prototype.ebb=function(t){for(var i,n,r=0;r<this.activeCues.length;r++){var o=this.activeCues[r];e.shouldCueBeActive(o,t)||(this.activeCues.splice(r,1),r--,null==(n=(i=this.Zbb).onCueExit)||n.call(i,o))}},e.prototype.fbb=function(t){for(var i,n,r=0;r<this.cues.length;r++){var o=this.cues[r];if(e.shouldCueBeActive(o,t)&&!this.dbb(o)){if((null==(n=(i=this.Zbb).onCueEnter)?void 0:n.call(i,o))===!1)continue;this.activeCues.push(o)}}},e.prototype.qcb=function(e){for(var t,i,r=[],o=0,a=this.activeCues;o<a.length;o++){var s=a[o],l=f(s.updates,e);void 0!==l&&(r.push(l),this.rcb(l)||null==(i=(t=this.Zbb).onCueUpdate)||i.call(t,n(n({},s),{content:n(n({},s.content),l.content)})))}this.activeCueUpdates=r},e.prototype.rcb=function(e){return!!this.activeCueUpdates.find(function(t){return t===e})},e.prototype.addCue=function(e,t,i,r){var o,s=this;if(void 0===r&&(r=[]),!isNaN(e)&&!isNaN(t)&&i){var c=this.storedCueTracker?d({start:e,end:t,content:i}):void 0;if(!(null!=(o=this.storedCueTracker)&&o.has(c))){var u=r.map(function(e){return n(n({},e),{updateTime:e.updateTime+s.timestampOffset})}),h={start:e+this.timestampOffset,end:t+this.timestampOffset,content:i,updates:u};if(this.cues.length>0){var p=this.cues[this.cues.length-1];if(l.Util.deepEqual(i,p.content)&&e>=p.start&&e-.5<=p.end)return this.context.logger.isLevelEnabled(a.LogLevel.INSANE)&&this.context.logger.insane("changing end time of existing cue instead of adding a new cue ["+e+"-"+t+"] "+i),void(this.cues[this.cues.length-1].end=Math.max(t,p.end))}if(this.context.logger.isLevelEnabled(a.LogLevel.INSANE)){var f=JSON.stringify(i);f.length>500&&(f=f.substring(0,497)+"..."),this.context.logger.insane("add new cue ["+e+"-"+t+"] "+f)}this.storedCueTracker&&this.storedCueTracker.add(c),this.cues.push(h)}}},e.prototype.addCues=function(e,t){t=t||0;for(var i=0,n=0,r=e;n<r.length;n++){var o=r[n];if(o&&o.hasOwnProperty("start")&&o.hasOwnProperty("end")&&o.end>t){var a=h(o),s=p(o);this.addCue(o.start,o.end,a,s),i=Math.max(i,o.end)}}return i},e.prototype.removeMatchingCues=function(e){var t=this;this.cues=this.cues.filter(function(i){var n,r=e(i);return r&&(null==(n=t.storedCueTracker)||n.remove(d(i))),!r})},e.prototype.removeCuesUntil=function(e){this.removeMatchingCues(function(t){return t.end<e})},e.prototype.removeCues=function(){var e;this.hide(),this.cues=[],null==(e=this.storedCueTracker)||e.removeAll()},e.prototype.hide=function(){this.ebb(-1),this.activeCues=[],this.activeCueUpdates=[]},e.prototype.show=function(){var e=this.context.serviceManager.get(r.ServiceName.PlayerStateService),t=null!=e&&e.seekingOrTimeshifting?e.targetPlaybackTime:this.abb.getCurrentTime();this.cbb({time:t})},e.prototype.isVisible=function(){return!0},e.prototype.setTimestampOffset=function(e){this.timestampOffset=e},e.prototype.dispose=function(){var e;this.cues=[],this.activeCues=[],this.activeCueUpdates=[],null==(e=this.storedCueTracker)||e.dispose(),this.stopListening()},e.prototype.getCues=function(){return this.cues},e}()},4129:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultContentLoader=void 0;var r,o=i(89927),a=i(88052),s=i(62756),l=i(3714),c=i(29669),u=i(70962),d=i(68205),h=i(21513),p=i(4527),f=i(47993),m=i(88844),g=i(58313),v=i(70850),y=i(39980),b=i(77401),S=i(91523),_=i(57456),E=i(10647);function T(){return{requestType:c.HttpRequestType.INTERNAL,maxRetries:0}}!function(e){e.start="_download-start"}(r||(r={})),t.DefaultContentLoader=function(){function e(e,t){void 0===t&&(t=T());var i=this;this.load=function(e,t,n,r,o,a,s,l){return void 0===a&&(a=!1),void 0===l&&(l=!1),(i.cI||i.lI)&&i.ZI.logger.debug("DefaultContentLoader: load called while a request is already active"),i.jI=s,i.mI=l,t=t||c.HttpRequestMethod.GET,e=i.sI(e),o=_.XhrHelper.mergeHeaders(i.iI.HTTP_HEADERS,o),e?(i.kI={method:t,url:g.URLHelper.toFullUrl(e),headers:JSON.parse(JSON.stringify(o)),responseType:n||c.HttpResponseType.TEXT,credentials:a?"include":"omit"},r&&(i.kI.body=r),i.AI(i.kI).then(function(e){return i.tI(e).catch(i.OJ)}).then(i.BI).then(i.yI).then(function(e){return i.nI&&e.body instanceof i.nI.Stream?e.body=e.body.transform(function(e){return e},function(){return i.NJ(e)},function(t){return t.message===b.RequestError.Failed&&i.cancel(),e.body.abort(t.message),t.message}):i.NJ(e),e})):Promise.reject("no url given")},this.yI=function(e){return i.SJ(e.status)?i.RJ("Bad response from server",e):Promise.resolve(e)},this.AI=function(e){return i.zI(e,i.bI.preprocessHttpRequest)},this.BI=function(e){return i.zI(e,i.bI.preprocessHttpResponse)},this.MJ=function(e){if("function"==typeof i.aI.onProgress&&!i.dI&&i.cI&&(!(e.loadedBytes>=0)||void 0===e.totalBytes||!(e.loadedBytes>=e.totalBytes))){var t=i.oI.getElapsedTimeFrom(i.pI.start);i.aI.onProgress(n(n({},e),{elapsedTime:t}))}},this.OJ=function(e){return i.gI++,e.error===b.RequestError.Canceled?i.RJ(e.error,e.response):i.BI(e.response).then(function(t){var n,r=null==t?void 0:t.status,o=t?t.url:null;if(!r&&i.aI.resetRetriesWhenOffline&&o&&function(e){return"string"==typeof e&&(0,h.getReachableDomains)().domains.includes((0,g.extractOrigin)(e))}(o)&&(i.gI=0),i.bI.retryHttpRequest&&"function"==typeof i.bI.retryHttpRequest)return i.PJ(e.error,t);if(null!=t&&t.status&&i.SJ(t.status))return i.RJ("retry disabled for HTTP status code "+t.status,t);var a=null!=(n=i.aI.maxRetries)?n:0;return i.gI>a?(i.ZI.logger.debug("Retries exceeded for ".concat(i.aI.requestType," (max retries: ").concat(a,")")),i.RJ(e.error,t)):i.QJ().catch(i.OJ)})},this.RJ=function(e,t){var n=i.gI;return i.TJ(),i.cI=!1,i.rI(!1,t,n),i.aI.onFailure(t,{name:e},n-1),Promise.reject(t??Error(e))},this.ZI=e,this.bI=this.ZI.config&&this.ZI.config.network||{},a.ModuleManager.has(s.ModuleName.EngineBitmovin)&&(this.nI=a.ModuleManager.get(s.ModuleName.EngineBitmovin)),this.aI=n(n({},T()),t),this.oI=new y.PerformanceMonitor(this.ZI),this.UJ()}return e.prototype.qI=function(e,t,i){return Math.min(Math.exp(e*t),i)},e.prototype.rI=function(e,t,i){t&&this.aI.requestType&&this.hI(l.PlayerEvent.DownloadFinished,{type:l.PlayerEvent.DownloadFinished,timestamp:Date.now(),httpStatus:t.status,success:e,url:t.url,downloadTime:(0,o.toSeconds)(v.Util.roundValue((0,o.toMilliSeconds)(t.elapsedTime),0)),size:t.length||0,attempt:i,maxAttempts:this.aI.maxRetries+1,downloadType:this.aI.requestType,mimeType:this.jI,timeToFirstByte:t.timeToFirstByte})},e.prototype.isLoading=function(){return this.cI},e.prototype.isRetrying=function(){return this.gI>0},e.prototype.setResetRetriesWhenOffline=function(e){this.aI.resetRetriesWhenOffline=e},e.prototype.setMaxRetries=function(e){this.aI.maxRetries=e},e.prototype.sI=function(e){return g.URLHelper.appendQueryParametersToUrl(e,this.iI.QUERY_PARAMETERS)},e.prototype.tI=function(e){var t=this;if(this.dI)return Promise.reject({error:b.RequestError.Canceled,response:null});this.pI&&this.oI.clear(this.pI);var i="request-"+v.Util.generateUniqueId();return this.pI={start:i+r.start},this.oI.addMarker(this.pI.start),this.kI=e,this.cI=!0,this.vI(),this.eI.getResponse().then(function(e){return null==e.elapsedTime&&(e.elapsedTime=t.oI.getElapsedTimeFrom(t.pI.start),e.timeToFirstByte=0),e})},e.prototype.uI=function(){var e,t=this;this.bI.sendHttpRequest&&"function"==typeof this.bI.sendHttpRequest&&(e=(0,v.safeUserCallback)(function(){return t.bI.sendHttpRequest(t.aI.requestType,t.kI)},this.ZI.logger));var i=this.bI.requestApi===c.NetworkRequestApi.Fetch||this.mI;if(i&&!(0,f.isFetchSupported)()&&(this.ZI.logger.debug("Using fetch API is configured but not supported, falling back to XHR!"),i=!1),!e||"function"!=typeof e.getResponse){var n=(0,S.getRequestTimeout)(this.ZI,this.aI.requestType);e=i?this.xI(n):this.wI(n)}return e},e.prototype.vI=function(){var e=this,t=this.uI();t.setProgressListener(function(t){return e.MJ(t)});var i=p.CancelablePromise.makeCancelable(t.getResponse());this.eI={getResponse:function(){return i},cancel:function(){t.cancel(),i.cancel({error:b.RequestError.Canceled,response:null})},setProgressListener:t.setProgressListener}},e.prototype.wI=function(e){var t=this.aI.disableDownloadTimeout?-1:e;return new E.XhrRequestController(this.ZI.logger,this.kI,t)},e.prototype.xI=function(e){return new this.nI.FetchController(this.ZI,this.kI,e,this.mI)},e.prototype.zI=function(e,t){var i,n=this;return t&&"function"==typeof t?Promise.resolve(null!=(i=(0,v.safeUserCallback)(function(){return t(n.aI.requestType,e)},this.ZI.logger))?i:e):Promise.resolve(e)},e.prototype.NJ=function(e){this.cI=!1,this.rI(!0,e,this.gI+1),this.aI.onSuccess(e,e.elapsedTime,e.url),this.TJ(),e.url&&(0,h.default)().dispatch((0,d.addReachableDomain)((0,g.extractOrigin)(e.url)))},e.prototype.PJ=function(e,t){var i=this;return Promise.resolve((0,v.safeUserCallback)(function(){return i.bI.retryHttpRequest(i.aI.requestType,t,i.gI)},this.ZI.logger)).then(function(e){return e.request?(i.ZI.logger.debug("HttpResponse was passed on 'retryHttpRequest' instead of a HttpRequest",e),i.RJ("HttpResponse was passed on 'retryHttpRequest' instead of a HttpRequest",t)):i.tI(e).catch(i.OJ)}).catch(function(){return i.RJ(e,t)})},e.prototype.QJ=function(){var e=this,t=this.aI.retryDelay,i="constant";return this.iI.INCREASE_RETRY_DELAY&&(t=this.qI(this.iI.INCREASE_RETRY_DELAY_BASE_SEC,this.gI,this.iI.MAX_INCREASE_RETRY_DELAY_SEC),i="incremental"),this.ZI.logger.debug("Using ".concat(i," retry delay (").concat(null==t?void 0:t.toFixed(1)," seconds, retry ").concat(this.gI,") for ").concat(this.kI.url)),new Promise(function(i,n){var r=window.setTimeout(function(){e.tI(e.kI).then(i).catch(n)},(0,o.toMilliSeconds)(t));e.lI=function(){e.lI=null,(0,m.clearTimeoutIfDefined)(r),n({error:b.RequestError.Canceled,response:null})}})},e.prototype.SJ=function(e){return this.aI.requestType in this.iI.DISABLE_RETRY_FOR_RESPONSE_STATUS&&this.iI.DISABLE_RETRY_FOR_RESPONSE_STATUS[this.aI.requestType].includes(e)},e.prototype.TJ=function(){this.gI=0,this.dI=!1,this.lI&&"function"==typeof this.lI&&this.lI()},e.prototype.cancel=function(){this.dI=!0,this.cI&&(this.cI=!1,this.lI&&this.lI(),this.eI&&this.eI.cancel())},e.prototype.getResponse=function(){if(this.eI&&"function"==typeof this.eI.getResponse)return this.eI.getResponse()},e.prototype.UJ=function(){var e=["onSuccess","onFailure"];this.gI=0;var t={};v.Util.deepCopy(t,u.DefaultSettings),this.iI=this.ZI.settings||t;for(var i=0;i<e.length;i++)this.aI.hasOwnProperty(e[i])&&"function"==typeof this.aI[e[i]]||(this.aI[e[i]]=function(){});this.ZI.eventHandler&&"function"==typeof this.ZI.eventHandler.dispatchEvent?this.hI=this.ZI.eventHandler.dispatchEvent:this.hI=function(){}},e.prototype.dispose=function(){this.isLoading()&&this.cancel(),this.pI&&this.oI.clear(this.pI),this.eI=null,this.hI=null,this.iI=null},e}()},85625:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestMimeType=void 0,function(e){e.Dash="application/dash+xml",e.Hls="application/x-mpegurl",e.Smooth="application/vnd.ms-sstr+xml"}(i||(t.ManifestMimeType=i={}))},39980:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PerformanceMonitor=void 0;var n=i(89927),r=i(50025);t.PerformanceMonitor=function(){function e(e){this.context=e}return e.prototype.g5=function(e){return 0===e.length?(this.context.logger.warn("[PERFORMANCE] Mark was not found"),[{startTime:0,duration:0}]):e},e.prototype.h5=function(e){return this.g5(r.performanceWrapper.getEntriesByName(e))},e.prototype.addMarker=function(e){r.performanceWrapper.mark(e)},e.prototype.getElapsedTimeFrom=function(e){var t=this.h5(e);return(0,n.toSeconds)(r.performanceWrapper.now()-t[0].startTime)},e.prototype.clear=function(e){(function(){return Array.isArray(e)?e:Object.values(e)})().forEach(function(e){r.performanceWrapper.clearMarks(e)})},e}()},13053:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getPerformanceShim=void 0,function(e){e.mark="mark",e.measure="measure"}(i||(i={}));var i,n=[],r={},o=function(e,t){n=t?n.filter(function(i){return i.name!==t&&i.entryType===e}):n.filter(function(t){return t.entryType!==e})},a=function(e,t){return n.filter(function(i){return i[e]===t})},s=function(e,t){r[t]=e,n.push(e)};t.getPerformanceShim=function(){return{now:function(){return Date.now()},mark:function(e){s({name:e,entryType:i.mark,startTime:this.now(),duration:0},e)},measure:function(e,t,n){!function(e,t){var i=function(e){return"[Performance] Mark ".concat(e," does not exist.")};if(!r[t])throw Error(i(t));if(!r[e])throw Error(i(e))}(t,n);var o=r[t]?r[t].startTime:0;s({name:e,startTime:o,duration:(r[n]?r[n].startTime:this.now())-o,entryType:i.measure},e)},getEntriesByName:function(e){return a("name",e)},getEntriesByType:function(e){return a("entryType",e)},clearMarks:function(e){o(i.mark,e)},clearMeasures:function(e){o(i.measure,e)}}}},50025:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.performanceWrapper=t.resolvePerformanceApi=t.requiredMethodNames=void 0;var n=i(13053);t.requiredMethodNames=["now","mark","measure","getEntriesByName","getEntriesByType","clearMarks","clearMeasures"],t.resolvePerformanceApi=function(e){return!function(e,t){return t.every(function(t){return"function"==typeof e[t]})}(e.performance,t.requiredMethodNames)?(0,n.getPerformanceShim)():e.performance},t.performanceWrapper=(0,t.resolvePerformanceApi)(window)},77401:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.RequestError=void 0,function(e){e.Failed="request failed",e.Canceled="canceled by user",e.TimedOut="request has timed out"}(i||(t.RequestError=i={}))},4131:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hasLoadedData=function(e){var t,i,n=(null!=(i=null==(t=e.responseTiming)?void 0:t.headersReceivedTimestamp)?i:-1)>-1,r=e.loadedBytes>0;return n&&r}},43446:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimingUtil=void 0;var n=i(89927);t.TimingUtil=function(){function e(){}return e.getHiResTimestamp=function(){return window.performance&&"function"==typeof window.performance.now?(0,n.toSeconds)(window.performance.now()):(0,n.toSeconds)(Date.now())},e}()},96266:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.XhrEvent=void 0,function(e){e.ReadyStateChange="readystatechange",e.Abort="abort",e.Error="error",e.Load="load",e.LoadEnd="loadend",e.LoadStart="loadstart",e.Progress="progress",e.Timeout="timeout"}(i||(t.XhrEvent=i={}))},57456:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.XhrHelper=void 0,t.isDownloadTimeInformationValid=function(e){return e.length>0&&e.elapsedTime>=0&&e.timeToFirstByte>=0&&e.elapsedTime>e.timeToFirstByte};var r=i(29669),o=i(21513);t.XhrHelper=function(){function e(){}return e.headersStringToArray=function(e){if(!e||0===e.trim().length)return{};for(var t={},i=0,n=e.split(`\r
14`);i<n.length;i++){var r=n[i],o=r.indexOf(": ");-1!==o&&(t[r.slice(0,o)]=r.slice(o+2))}return t},e.toHttpResponse=function(t,i,r){var a=t.readyState===XMLHttpRequest.OPENED&&(0,o.getCapabilities)().isTizen?{status:-1,statusText:"PENDING"}:{status:t.status,statusText:t.statusText},s=e.headersStringToArray(t.getAllResponseHeaders()),l=n({request:i,url:t.responseURL||i.url,headers:s},a);return function(e){return e.openedTimestamp>-1&&e.headersReceivedTimestamp>-1&&e.doneTimestamp>-1}(r)&&(l.timeToFirstByte=r.headersReceivedTimestamp-r.openedTimestamp,l.elapsedTime=r.doneTimestamp-r.openedTimestamp),t.response&&(l.body=this.getResponseBody(t,i.responseType),l.length=t.response.byteLength||t.response.length||0),l},e.getResponseBody=function(e,t){var i;if(t===r.HttpResponseType.JSON&&null!=(i=e.getResponseHeader("content-type"))&&i.includes("application/json")&&"string"==typeof e.response)try{return JSON.parse(e.response)}catch{return null}return e.response},e.setHeaders=function(e,t){t&&Object.keys(t).length>0&&Object.keys(t).forEach(function(i){e.setRequestHeader(i,t[i])})},e.mergeHeaders=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i={};return e.forEach(function(e){e&&Object.keys(e).forEach(function(t){var n=function(e,t){return Object.keys(e).find(function(e){return e.toLowerCase()===t.toLowerCase()})}(i,t);n?i[n]=e[t]:i[t]=e[t]})}),i},e}()},10647:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.XhrRequestController=void 0;var n=i(77401),r=i(96266),o=i(99313);t.XhrRequestController=function(){function e(e,t,i){var n=this;this.setProgressListener=function(e){n.i5.on(r.XhrEvent.Progress,function(t){return e(t)})},this.i5=new o.XhrWrapper(e,t,i)}return e.prototype.getResponse=function(){return this.j5=this.j5||this.i5.send(),this.j5},e.prototype.cancel=function(){this.i5.abort(n.RequestError.Canceled)},e}()},99313:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.XhrWrapper=void 0;var r=i(89927),o=i(88844),a=i(77401),s=i(43446),l=i(96266),c=i(57456);t.XhrWrapper=function(){function e(e,t,i){var n=this;this.fdb=!1,this.hdb=function(e){var t,i,r=null!=(t=e.total)?t:-1,o=null!=(i=e.loaded)?i:-1,a=s.TimingUtil.getHiResTimestamp();n.ddb.totalBytes=r,n.ddb.loadedBytes=o,n.edb.progressTimestamp=a,o<r&&n.gdb()},this.idb=function(e){var t=(0,r.toSeconds)(e.timeStamp);if(n.Ydb.readyState===n.Ydb.OPENED)n.edb.openedTimestamp=t,n.gdb();else if(n.Ydb.readyState===n.Ydb.HEADERS_RECEIVED)n.edb.headersReceivedTimestamp=t,n.gdb();else if(n.Ydb.readyState===n.Ydb.DONE){var i=n.Ydb.status>=200&&n.Ydb.status<300;n.edb.doneTimestamp=t,i&&null!==n.Ydb.response?n.Zdb(c.XhrHelper.toHttpResponse(n.Ydb,n.Wdb,n.edb)):n.fdb||n.jdb(a.RequestError.Failed),n.dispose()}},this.Vdb=e,this.Wdb=t,this.timeout=i,this.bdb={},this.cdb=!1,this.edb={sendTimestamp:-1,openedTimestamp:-1,headersReceivedTimestamp:-1,progressTimestamp:-1,doneTimestamp:-1},this.ddb={totalBytes:-1,loadedBytes:-1,url:t.url,responseTiming:this.edb}}return e.prototype.on=function(e,t){this.bdb=this.bdb||{},this.bdb[e]=this.bdb[e]||[],this.bdb[e].push(t)},e.prototype.gdb=function(){var e,t=this;(null!=(e=this.bdb[l.XhrEvent.Progress])?e:[]).forEach(function(e){return e(n({},t.ddb))})},e.prototype.send=function(){var e=this;return this.Ydb=new XMLHttpRequest,this.cdb=!1,this.fdb=!1,new Promise(function(t,i){e.Zdb=t,e.adb=i;try{e.Ydb.addEventListener(l.XhrEvent.Progress,e.hdb),e.Ydb.addEventListener(l.XhrEvent.ReadyStateChange,e.idb)}catch(i){return e.Vdb.debug("ContentLoader: could not add event listeners",i),t(e.send())}e.edb.sendTimestamp=s.TimingUtil.getHiResTimestamp(),e.Ydb.open(e.Wdb.method,e.Wdb.url),e.Ydb.withCredentials="include"===e.Wdb.credentials,e.gdb(),c.XhrHelper.setHeaders(e.Ydb,e.Wdb.headers),e.Wdb.responseType&&(e.Ydb.responseType=e.Wdb.responseType),e.timeout>0&&(e.Xdb=window.setTimeout(function(){return e.abort(a.RequestError.TimedOut)},e.timeout)),e.Wdb.body?e.Ydb.send(e.Wdb.body):e.Ydb.send()})},e.prototype.dispose=function(){this.cdb||((0,o.clearTimeoutIfDefined)(this.Xdb),this.Ydb.removeEventListener(l.XhrEvent.Progress,this.hdb),this.Ydb.removeEventListener(l.XhrEvent.ReadyStateChange,this.idb),this.bdb=null,this.Ydb=null,this.Zdb=null,this.adb=null,this.cdb=!0)},e.prototype.jdb=function(e,t){void 0===t&&(t=!1),this.cdb||(this.adb({error:e,response:c.XhrHelper.toHttpResponse(this.Ydb,this.Wdb,this.edb)}),t&&this.Ydb.abort())},e.prototype.abort=function(e){void 0===e&&(e=a.RequestError.Canceled),this.cdb||this.fdb||(this.fdb=!0,this.jdb(e,!0),this.dispose())},e}()},91523:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestTimeout=function(e,t){var i,r,o,a,s=null!=(i=e.config.network)?i:{};return(0,n.toMilliSeconds)(null!=(a=null!=(o=null==(r=s.requestTimeout)?void 0:r[t])?o:s.defaultRequestTimeout)?a:e.settings.XHR_TIMEOUT)};var n=i(89927)},25811:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DRMSchemeIDURIs=void 0,t.keySystemNameToSchemeUri=function(e){return Object.keys(t.DRMSchemeIDURIs).find(function(i){return t.DRMSchemeIDURIs[i]===e})},t.DRMSchemeIDURIs={"urn:mpeg:dash:mp4protection:2011":"cenc","urn:mpeg:dash:13818:1:CA_descriptor:2011":"cenc4ts","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"widevine","urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4":"marlin_v1","urn:uuid:adb41c24-2dbf-4a6d-958b-4457c0d27b95":"tvkey","urn:uuid:a68129d3-575b-4f1a-9cba-3223846cf7c3":"nds_videoguard","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"playready","urn:uuid:9a27dd82-fde2-4725-8cbc-4234aa06ec09":"verimatrix_vcas","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"primetime","urn:uuid:1f83e1e8-6ee9-4f0d-ba2f-5ec4e3ed1a66":"securemedia","urn:uuid:644fe7b5-260f-4fad-949a-0762ffb054b4":"cmla_oma","urn:uuid:6a99532d-869f-5922-9a91-113ab7b1e2f3":"mobitv","urn:uuid:35bf197b-530e-42d7-8b65-1b4bf415070f":"divx_drm5","urn:uuid:b4413586-c58c-ffb0-94a5-d4896c1af6c3":"viaccess-orca","urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"common_system-id"}},51682:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ISOBMFFConstants=void 0,t.ISOBMFFConstants={BOX_HEADER_LENGTH_REGULAR:8,BOX_HEADER_LENGTH_LARGE:16,BOX_SIZE_LENGTH:4,BOX_TYPE_LENGTH:4,FULL_BOX_VERSION_LENGTH:1,FULL_BOX_FLAGS_LENGTH:3,PSSH_KID_COUNT_LENGTH:4,PSSH_KID_LEN:16,PSSH_SYSTEM_ID_LENGTH:16,PSSH_DATA_SIZE:4}},33468:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.KeySystemMap=t.KeySystemKind=void 0,t.keySystemUidToKind=function(e){return Object.keys(t.KeySystemMap).find(function(i){return t.KeySystemMap[i].includes(e)})},t.getRelevantKeySystemMap=function(e){var i,r=((i={})[n.FAIRPLAY]=[],i[n.PLAYREADY]=[],i[n.PRIMETIME]=[],i[n.WIDEVINE]=[],i[n.TVKEY]=[],i);return Object.keys(n).forEach(function(i){var o=n[i];e[o]&&(r[o]=t.KeySystemMap[o])}),r},function(e){e.FAIRPLAY="fairplay",e.PLAYREADY="playready",e.PRIMETIME="primetime",e.WIDEVINE="widevine",e.TVKEY="tvkey"}(n||(t.KeySystemKind=n={})),(i={})[n.FAIRPLAY]=["com.apple.fairplay","com.apple.fps.1_0","com.apple.fps.2_0","com.apple.fps.3_0"],i[n.PLAYREADY]=["com.youtube.playready","com.microsoft.playready","com.microsoft.playready.recommendation","com.microsoft.playready.recommendation.3000"],i[n.PRIMETIME]=["com.adobe.primetime","com.adobe.access"],i[n.WIDEVINE]=["com.widevine.alpha","com.widevine.alpha.experiment"],i[n.TVKEY]=["com.tvkey.drm"],t.KeySystemMap=i},35267:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createAction=function(e,t){return{type:e,meta:{},payload:t}}},48774:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.devToolsExtension=void 0,t.devToolsExtension=i(4081).default.__REDUX_DEVTOOLS_EXTENSION__},39541:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ReducerTree=void 0,t.isReducer=o,t.isReducerTree=function(e){return!!e&&e instanceof r};var n=i(91829),r=function(){function e(){this.R8={}}return e.prototype.has=function(e){return!!this.R8[e]},e.prototype.set=function(e,t){return this.R8[e]=t,this},e.prototype.get=function(e){return this.R8[e]},e.prototype.delete=function(e){delete this.R8[e]},e.prototype.keys=function(){return Object.keys(this.R8)},e.prototype.S8=function(e){var t=this,i={};return this.keys().forEach(function(n){var r=t.get(n),a=e.concat(String(n));i[n]=o(r)?r:r.S8(a)}),0===Object.keys(i).length?function(e){return{}}:(0,n.combineReducers)(i)},e.prototype.buildReducer=function(){return this.S8([])},e}();function o(e){return!!e&&"function"==typeof e}t.ReducerTree=r},61674:function(e,t){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.addStoreServiceDecoration=void 0,t.addStoreServiceDecoration=function(e){return function(t){return function(){var n=function(){return e.buildReducer()},r=t(n()),o=function(){return r.replaceReducer(n())};return o(),i(i({},r),{addReducer:function(t,i){e.set(t,i),o()},getReducer:function(t){return e.get(t)},removeReducer:function(t){e.delete(t),o()},hasReducer:function(t){return e.has(t)}})}}}},21513:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=d,t.getCapabilities=function(){return function(e){return e.capabilities}(d().getState())},t.getReachableDomains=function(){return function(e){return e.reachableDomains}(d().getState())};var n,r=i(91829),o=i(14638),a=(i(48774),i(81683),i(60430)),s=i(39541),l=i(61674),c=new s.ReducerTree;c.set("capabilities",o.CapabilityReducer).set("reachableDomains",a.ReachableDomainsReducer);var u=function(){var e=[(0,l.addStoreServiceDecoration)(c)];return(0,r.createStore)(function(){return{}},r.compose.apply(void 0,e))};function d(){return n||(n=u()),n}},61089:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.StoreService=void 0;var r=i(39541),o=i(93204);t.StoreService=function(){function e(e,t,i){var n=this;this.parentStore=e,this.levelIdentifier=t,this.identifierValue=i,this.RY=[],this.TY=function(e){return e[n.levelIdentifier][n.identifierValue]},this.QY=new r.ReducerTree,this.VY(this.QY)}return e.prototype.dispatch=function(e){var t;return null==(t=this.parentStore)?void 0:t.dispatch(this.SY(e))},e.prototype.SY=function(e){var t;return n(n({},e),{meta:n(n({},e.meta),((t={})[this.levelIdentifier]=this.identifierValue,t))})},e.prototype.UY=function(){return this.parentStore.hasReducer(this.levelIdentifier)||this.parentStore.addReducer(this.levelIdentifier,new r.ReducerTree),this.parentStore.getReducer(this.levelIdentifier)},e.prototype.VY=function(e){var t=this.UY();(0,r.isReducerTree)(t)&&t.set(this.identifierValue,e),this.parentStore.addReducer(this.levelIdentifier,t)},e.prototype.getState=function(){var e,t=null==(e=this.parentStore)?void 0:e.getState();if(t)return this.TY(t)},e.prototype.subscribe=function(e,t){var i=this,n=(0,o.subscribe)(this.parentStore)(this.TY,e,t);return this.RY.push(n),function(){i.RY=i.RY.filter(function(e){return e!==n}),n()}},e.prototype.WY=function(e){var t=this;return function(i,n){return n.meta&&n.meta[t.levelIdentifier]&&n.meta[t.levelIdentifier]!==t.identifierValue?i:e(i,n)}},e.prototype.addReducer=function(e,t){this.QY.set(e,(0,r.isReducer)(t)?this.WY(t):t),this.VY(this.QY)},e.prototype.addReducers=function(e){for(var t=0,i=Object.entries(e);t<i.length;t++){var n=i[t],o=n[0],a=n[1];void 0!==a&&this.QY.set(o,(0,r.isReducer)(a)?this.WY(a):a)}this.VY(this.QY)},e.prototype.getReducer=function(e){return this.QY.get(e)},e.prototype.removeReducer=function(e){this.QY.delete(e),this.VY(this.QY)},e.prototype.hasReducer=function(e){return this.QY.has(e)},e.prototype.dispose=function(){var e=this.UY();this.RY.forEach(function(e){return e()}),e&&(0,r.isReducerTree)(e)&&e.delete(this.identifierValue),this.parentStore.addReducer(this.levelIdentifier,e),this.RY=[],this.QY=null,this.parentStore=null},e}()},93204:function(e,t){function i(e){return function(t,i,n){void 0===n&&(n=function(){return!0});var r=t(e.getState());return e.subscribe(function(){var o=t(e.getState()),a=r;r=o,null!=o&&o!==a&&n(o,a)&&i(o,a)})}}function n(e){return function(t,n,r){void 0===r&&(r=function(){return!0});var o=i(e)(t,function(e){o(),n(e)},r);return o}}Object.defineProperty(t,"__esModule",{value:!0}),t.subscribe=i,t.waitForStateChange=n,t.waitForStateChangeThen=function(e){return function(t,i){return void 0===i&&(i=function(){return!0}),new Promise(function(r){n(e)(t,function(e){r(e)},i)})}}},91565:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.initializeCapabilities=function(){return(0,o.createAction)(s,c())},t.setCapabilityKey=function(e,t){return(0,o.createAction)(l,{key:e,value:t})};var n=i(47993),r=i(15487),o=i(35267),a=i(7387),s=a.CapabilityActionType.InitCapabilities,l=a.CapabilityActionType.SetCapability,c=function(){var e;return{isPlayStation5:r.isPlayStation5(),isPlayStation4:r.isPlayStation4(),isMobile:r.isMobile(),isTizen:r.isTizen(),isSafari:r.isSafari(),isIOS:r.isIOS(),isSafariIOS:r.isSafariIOS(),isEdge:r.isEdge(),isLegacyEdge:r.isLegacyEdge(),isEdgeChromium:r.isEdgeChromium(),isChrome:r.isChrome(),isChromium:r.isChromium(),isFirefox:r.isFirefox(),isFirefoxIOS:r.isFirefoxIOS(),isWebOS:r.isWebOS(),isVidaa:r.isVidaa(),isVizio:r.isVizio(),isReactNative:r.isReactNative(),isWpeWebKit:r.isWpeWebKit(),MSESafari:n.MSESafari(),isLocalStorageAvailable:n.isLocalStorageAvailable(),isInlinePlaybackRestricted:n.isInlinePlaybackRestricted(),edgeVersion:r.getEdgeVersion(),IOSVersion:r.getIOSVersion(),safariVersion:r.getSafariVersion(),webOSChromiumVersion:null!=(e=r.getWebOsChromiumVersion().major)?e:0,techSupportedByModules:n.getTechSupportedByModules(),techSupportedByPlatform:n.getTechSupportedByPlatform(),techSupportedByModulesOnPlatform:n.getTechSupportedByModulesOnPlatform()}}},14638:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CapabilityReducer=void 0;var o=i(3793),a=i(7387);t.CapabilityReducer=(0,o.default)({},((n={})[a.CapabilityActionType.InitCapabilities]=function(e,t){return t.payload},n[a.CapabilityActionType.SetCapability]=function(e,t){return function(e,t){var i,n=t.key,o=t.value;return r(r({},e),((i={})[n]=o,i))}(e,t.payload)},n))},7387:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.CapabilityKey=t.CapabilityActionType=void 0,function(e){e.InitCapabilities="initcapabilities",e.SetCapability="setcapability"}(i||(t.CapabilityActionType=i={})),function(e){e.isPlayStation5="isPlayStation5",e.isPlayStation4="isPlayStation4",e.isMobile="isMobile",e.isTizen="isTizen",e.isSafari="isSafari",e.isChrome="isChrome",e.isChromium="isChromium",e.isFirefox="isFirefox",e.isFirefoxIOS="isFirefoxIOS",e.isWebOS="isWebOS",e.isVidaa="isVidaa",e.isVizio="isVizio",e.isIOS="isIOS",e.isSafariIOS="isSafariIOS",e.isEdge="isEdge",e.isLegacyEdge="isLegacyEdge",e.isEdgeChromium="isEdgeChromium",e.isReactNative="isReactNative",e.isWpeWebKit="isWpeWebKit",e.MSESafari="MSESafari",e.isLocalStorageAvailable="isLocalStorageAvailable",e.isInlinePlaybackRestricted="isInlinePlaybackRestricted",e.IOSVersion="IOSVersion",e.edgeVersion="edgeVersion",e.safariVersion="safariVersion",e.webOSChromiumVersion="webOSChromiumVersion",e.techSupportedByModules="techSupportedByModules",e.techSupportedByPlatform="techSupportedByPlatform",e.techSupportedByModulesOnPlatform="techSupportedByModulesOnPlatform"}(n||(t.CapabilityKey=n={}))},3793:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StaticActionTypes=void 0,function(e){e.Default="default"}(i||(t.StaticActionTypes=i={})),t.default=function(e,t){return function(n,r){return void 0===n&&(n=e),t[r.type]?t[r.type](n,r):t[i.Default]?t[i.Default](n,r):n}}},77753:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isInstanceState=function(e){return(0,n.isObject)(e)&&["player","metrics"].every(function(t){return t in e})};var n=i(94685)},98714:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setPreferredBitrateForMimeTypeAction=function(e,t){return(0,n.createAction)(r.AdaptationActionType.SetPreferredBitrateForMimeType,{mimeType:e,preferredBitrate:t})},t.clearPreferredBitrateForMimeTypeAction=function(e){return(0,n.createAction)(r.AdaptationActionType.ClearPreferredBitrateForMimeType,{mimeType:e})};var n=i(35267),r=i(56960)},87133:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationReducer=void 0;var o=i(3793),a=i(56960);t.AdaptationReducer=(0,o.default)({},((n={})[a.AdaptationActionType.SetPreferredBitrateForMimeType]=function(e,t){var i=t.payload;return function(e,t,i){var n;return r(r({},e),((n={})[t]=r(r({},e[t]),{preferredBitrate:i}),n))}(e,i.mimeType,i.preferredBitrate)},n[a.AdaptationActionType.ClearPreferredBitrateForMimeType]=function(e,t){return function(e,t){var i;return r(r({},e),((i={})[t]=r(r({},e[t]),{preferredBitrate:void 0}),i))}(e,t.payload.mimeType)},n))},49859:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdaptationState=function(e){return e.adaptation},t.getPreferredBitrate=function(e,t){return e[t]?e[t].preferredBitrate:void 0}},56960:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationActionType=void 0,function(e){e.SetPreferredBitrateForMimeType="setpreferredbitrateformimetype",e.ClearPreferredBitrateForMimeType="clearpreferredbitrateformimetype"}(i||(t.AdaptationActionType=i={}))},91678:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.initializeMetricsForMimeType=function(e,t,i){return void 0===i&&(i=e),(0,n.createAction)(r.MetricsActionType.InitializeMetricsForMimeType,{mimeType:e,settings:t,saveUnderName:i})},t.removeMetricsForMimeType=function(e){return(0,n.createAction)(r.MetricsActionType.RemoveMetricsForMimeType,{mimeType:e})},t.addMetricsValue=function(e,t,i){return(0,n.createAction)(r.MetricsActionType.AddMetricsValue,{mimeType:e,metricType:t,value:i})},t.removeMetricsValue=function(e,t,i){return(0,n.createAction)(r.MetricsActionType.RemoveMetricsValue,{mimeType:e,metricType:t,value:i})},t.clearMetricsHistory=function(e,t){return(0,n.createAction)(r.MetricsActionType.ClearMetricsHistory,{mimeType:e,metricType:t})},t.setBufferLogicActivationThreshold=function(e,t){return(0,n.createAction)(r.MetricsActionType.SetBufferLogicActivationThreshold,{mimeType:e,threshold:t})};var n=i(35267),r=i(33436)},27359:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.containMimeTypeGuard=function(e){return function(t,i){return t[i.mimeType]?e(t,i):t}}},6873:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MetricsReducer=void 0;var a=i(3793),s=i(27359),l=i(33436);function c(e,t){var i,n=t.mimeType,o=t.threshold;return r(r({},e),((i={})[n]=r(r({},e[n]),{bufferLogicActivationThreshold:o}),i))}function u(e,t){var i,n,a=t.mimeType,s=t.metricType,l=t.value,c=e[a].settings.metricHistorySize,u=e[a].data[s]||[],d=c>0&&u.length>=c;return r(r({},e),((i={})[a]=r(r({},e[a]),{data:r(r({},e[a].data),((n={})[s]=o(o([],d?u.slice(1,u.length):u,!0),[{time:Date.now(),value:l}],!1),n))}),i))}function d(e,t){var i,n,o=t.mimeType,a=t.metricType;return r(r({},e),((i={})[o]=r(r({},e[o]),{data:r(r({},e[o].data),((n={})[a]=[],n))}),i))}function h(e,t){var i,n,o=t.mimeType,a=t.metricType,s=t.value,l=(e[o].data[a]||[]).filter(function(e){return e.time!==s.time||e.value!==s.value});return r(r({},e),((i={})[o]=r(r({},e[o]),{data:r(r({},e[o].data),((n={})[a]=l,n))}),i))}t.MetricsReducer=(0,a.default)({},((n={})[l.MetricsActionType.InitializeMetricsForMimeType]=function(e,t){return function(e,t){var i,n=t.mimeType,o=t.settings,a=t.saveUnderName;return r(r({},e),((i={})[a]={mimeType:n,settings:{metricHistorySize:o.METRIC_HISTORY_SIZE},bufferLogicActivationThreshold:o.BUFFER_LOGIC_ACTIVATION_THRESHOLD,data:{}},i))}(e,t.payload)},n[l.MetricsActionType.RemoveMetricsForMimeType]=function(e,t){return function(e,t){var i=r({},e);return delete i[t.mimeType],i}(e,t.payload)},n[l.MetricsActionType.SetBufferLogicActivationThreshold]=function(e,t){var i=t.payload;return(0,s.containMimeTypeGuard)(c)(e,i)},n[l.MetricsActionType.AddMetricsValue]=function(e,t){var i=t.payload;return(0,s.containMimeTypeGuard)(u)(e,i)},n[l.MetricsActionType.ClearMetricsHistory]=function(e,t){var i=t.payload;return(0,s.containMimeTypeGuard)(d)(e,i)},n[l.MetricsActionType.RemoveMetricsValue]=function(e,t){var i=t.payload;return(0,s.containMimeTypeGuard)(h)(e,i)},n))},46151:function(e,t){function i(e,t,i){return e[t]&&e[t].data[i]||[]}Object.defineProperty(t,"__esModule",{value:!0}),t.getMetricsHistoryFromInstanceState=t.getMetricsState=void 0,t.getMetricsHistory=i,t.getMetricsLastEntry=function(e,t,n){var r=i(e,t,n);return 0===r.length?{time:void 0,value:void 0}:r[r.length-1]},t.getMetricsState=function(e){return e.metrics},t.getMetricsHistoryFromInstanceState=function(e,n,r){return i((0,t.getMetricsState)(e),n,r)}},33436:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.MetricsActionType=t.MetricType=void 0,function(e){e.DownloadTime="downloadtime",e.DecryptionTime="decryptiontime",e.TransmuxingTime="transmuxingtime",e.ProcessingTime="processingtime",e.DownloadSuccess="downloadsuccess",e.RequestedRepresentations="requestedrepresentations",e.DownloadedRepresentation="downloadedrepresentation",e.DownloadedAdaptationSet="downloadedadaptationset",e.DownloadInformation="downloadinformation",e.SegmentInformation="segmentinformation",e.ChunkedDownloadInformation="chunkeddownloadinformation",e.StalledSeconds="stalledseconds",e.StartTime="starttime",e.StartupTimeSeconds="startuptime",e.CachedInitSegments="cachedinitsegments"}(i||(t.MetricType=i={})),function(e){e.InitializeMetricsForMimeType="@instance/metrics/initializemetricsformimetype",e.RemoveMetricsForMimeType="@instance/metrics/removemetricsformimetype",e.AddMetricsValue="@instance/metrics/addmetricsvalue",e.RemoveMetricsValue="@instance/metrics/removemetricsvalue",e.ClearMetricsHistory="@instance/metrics/clearMetricsHistory",e.SetBufferLogicActivationThreshold="@instance/metrics/setbufferlogicactivationthreshold"}(n||(t.MetricsActionType=n={}))},23690:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialPlayerState=void 0,t.setPlayerViewMode=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerViewMode,e)},t.setPlayerHasBeenPlaying=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerHasBeenPlaying,e)},t.setPlayerSeek=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerSeek,e)},t.setPlayerPlayback=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerPlayback,e)},t.setPlayerTimeShift=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerTimeshift,e)},t.setPlayerStall=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerStall,e)},t.setRendererStallAction=function(e){return(0,r.createAction)(o.PlayerActionType.SetRendererStall,e)},t.setPlayerTargetPlaybackTime=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerTargetPlaybackTime,e)},t.setPlayerPlaybackSpeed=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerPlaybackSpeed,e)},t.setDestroyState=function(e){return(0,r.createAction)(o.PlayerActionType.SetDestroyState,e)},t.addPlayerPendingTransition=function(e){return(0,r.createAction)(o.PlayerActionType.AddPlayerPendingTransition,e)},t.filterPlayerPendingTransition=function(e){return(0,r.createAction)(o.PlayerActionType.FilterPlayerPendingTransition,e)},t.removePlayerPendingTransition=function(e){return(0,r.createAction)(o.PlayerActionType.RemovePlayerPendingTransition,e)},t.clearPlayerPendingTransitions=function(){return(0,r.createAction)(o.PlayerActionType.ClearPlayerPendingTransitions)},t.setRemoteControlType=function(e){return(0,r.createAction)(o.PlayerActionType.SetRemoteControlType,e)},t.setConnectionState=function(e){return(0,r.createAction)(o.PlayerActionType.SetConnectionState,e)},t.resetPlayerState=function(e){return void 0===e&&(e=[]),(0,r.createAction)(o.PlayerActionType.ResetPlayerState,{keepState:e})},t.updateSeekingProcess=function(e){return(0,r.createAction)(o.PlayerActionType.UpdateSeekingProcess,e)};var n=i(44468),r=i(35267),o=i(85648);t.getInitialPlayerState=function(){return{playbackState:o.PlaybackState.None,seekState:o.SeekState.None,timeShiftState:o.TimeShiftState.None,hasBeenPlaying:!1,isStalled:!1,isRendererStalled:!1,targetPlaybackTime:-1,playbackSpeed:{speed:1,multiplier:1},pendingTransitions:[],viewMode:n.ViewMode.Inline,destroyState:o.DestroyState.None,remoteControlState:{connectionState:o.ConnectionState.Disconnected,remoteControlType:o.RemoteControlType.None},seekingProcess:{targetTime:-1,seekableRange:{start:-1,end:-1},isInitial:!1,issuer:""}}}},8973:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerReducer=void 0;var a=i(3793),s=i(23690),l=i(85648),c=(0,s.getInitialPlayerState)();t.PlayerReducer=(0,a.default)(c,((n={})[l.PlayerActionType.SetPlayerPlayback]=function(e,t){var i=t.payload;return r(r({},e),{playbackState:i})},n[l.PlayerActionType.SetPlayerSeek]=function(e,t){var i=t.payload;return r(r({},e),{seekState:i})},n[l.PlayerActionType.SetPlayerStall]=function(e,t){var i=t.payload;return r(r({},e),{isStalled:i})},n[l.PlayerActionType.SetRendererStall]=function(e,t){return r(r({},e),{isRendererStalled:t.payload})},n[l.PlayerActionType.SetPlayerTimeshift]=function(e,t){var i=t.payload;return r(r({},e),{timeShiftState:i})},n[l.PlayerActionType.SetPlayerHasBeenPlaying]=function(e,t){var i=t.payload;return r(r({},e),{hasBeenPlaying:i})},n[l.PlayerActionType.SetPlayerTargetPlaybackTime]=function(e,t){var i=t.payload;return r(r({},e),{targetPlaybackTime:i})},n[l.PlayerActionType.SetPlayerPlaybackSpeed]=function(e,t){var i=t.payload;return r(r({},e),{playbackSpeed:i})},n[l.PlayerActionType.SetPlayerViewMode]=function(e,t){var i=t.payload;return r(r({},e),{viewMode:i})},n[l.PlayerActionType.AddPlayerPendingTransition]=function(e,t){var i=t.payload;return r(r({},e),{pendingTransitions:o(o([],e.pendingTransitions,!0),[i],!1)})},n[l.PlayerActionType.FilterPlayerPendingTransition]=function(e,t){var i=t.payload;return r(r({},e),{pendingTransitions:e.pendingTransitions.filter(function(e){return e!==i})})},n[l.PlayerActionType.RemovePlayerPendingTransition]=function(e,t){var i=t.payload;return r(r({},e),{pendingTransitions:e.pendingTransitions.filter(function(e,t){return t!==i})})},n[l.PlayerActionType.ClearPlayerPendingTransitions]=function(e,t){return r(r({},e),{pendingTransitions:[]})},n[l.PlayerActionType.ResetPlayerState]=function(e,t){var i=t.payload.keepState,n={};return i.forEach(function(t){return n[t]=e[t]}),r(r({},c),n)},n[l.PlayerActionType.SetDestroyState]=function(e,t){var i=t.payload;return r(r({},e),{destroyState:i})},n[l.PlayerActionType.SetRemoteControlType]=function(e,t){var i=t.payload;return r(r({},e),{remoteControlState:r(r({},e.remoteControlState),{remoteControlType:i})})},n[l.PlayerActionType.SetConnectionState]=function(e,t){var i=t.payload;return r(r({},e),{remoteControlState:r(r({},e.remoteControlState),{connectionState:i})})},n[l.PlayerActionType.UpdateSeekingProcess]=function(e,t){var i=t.payload;return r(r({},e),{seekingProcess:r(r({},e.seekingProcess),i)})},n))},87827:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToSeekedOrTimeshifted=t.subscribeToSeeked=t.subscribeToSeek=t.getRemoteControlState=t.getIsRendererStalled=t.isDestroyed=t.isBeingDestroyed=t.getIsSeekedOrTimeshifted=t.getIsSeekingOrTimeshifting=t.getPlaybackSpeed=t.getTargetPlaybackTime=t.getIsTimeShifted=t.getIsTimeShifting=t.getIsSeeked=t.getIsSeeking=t.getIsInitialSeek=t.getIsInitialStall=t.getIsStopped=t.getIsPaused=t.getIsPlay=t.getIsPlaying=t.getIsInitialPlayback=t.getPlayerState=void 0;var n=i(23068),r=i(93204),o=i(85648);t.getPlayerState=function(e){return e.player},t.getIsInitialPlayback=function(e){return e.playbackState===o.PlaybackState.None},t.getIsPlaying=function(e){return e.playbackState===o.PlaybackState.Playing},t.getIsPlay=function(e){return e.playbackState===o.PlaybackState.Play},t.getIsPaused=function(e){return e.playbackState===o.PlaybackState.Paused},t.getIsStopped=function(e){return e.playbackState===o.PlaybackState.Stopped},t.getIsInitialStall=function(e){return!e.hasBeenPlaying&&e.isStalled},t.getIsInitialSeek=function(e){return e.seekState===o.SeekState.None},t.getIsSeeking=function(e){return[o.SeekState.Seeking,o.SeekState.SeekingIOS].includes(e.seekState)},t.getIsSeeked=function(e){return e.seekState===o.SeekState.Seeked},t.getIsTimeShifting=function(e){return e.timeShiftState===o.TimeShiftState.Shifting},t.getIsTimeShifted=function(e){return e.timeShiftState===o.TimeShiftState.Shifted},t.getTargetPlaybackTime=function(e){return e.targetPlaybackTime},t.getPlaybackSpeed=function(e){return e.playbackSpeed},t.getIsSeekingOrTimeshifting=function(e){return(0,t.getIsSeeking)(e)||(0,t.getIsTimeShifting)(e)},t.getIsSeekedOrTimeshifted=function(e){return(0,t.getIsSeeked)(e)||(0,t.getIsTimeShifted)(e)},t.isBeingDestroyed=function(e){return e.destroyState!==o.DestroyState.None},t.isDestroyed=function(e){return e.destroyState===o.DestroyState.Destroyed},t.getIsRendererStalled=function(e){return e.isRendererStalled},t.getRemoteControlState=function(e){return e.remoteControlState},t.subscribeToSeek=function(e,i){return(0,r.subscribe)(e)(function(e){return e&&(0,t.getPlayerState)(e)},i,function(e,i){return(0,n.isDefined)(i)&&(0,n.isDefined)(e)&&!(0,t.getIsSeeking)(i)&&(0,t.getIsSeeking)(e)})},t.subscribeToSeeked=function(e,i){return(0,r.subscribe)(e)(function(e){return e&&(0,t.getPlayerState)(e)},i,function(e,i){return(0,n.isDefined)(i)&&(0,n.isDefined)(e)&&(0,t.getIsSeeking)(i)&&!(0,t.getIsSeeking)(e)})},t.subscribeToSeekedOrTimeshifted=function(e,i){return(0,r.subscribe)(e)(function(e){return e&&(0,t.getPlayerState)(e)&&(0,t.getIsSeekingOrTimeshifting)((0,t.getPlayerState)(e))},i,function(e,t){return!0===t&&!1===e})}},85648:function(e,t){var i,n,r,o,a,s,l;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerActionType=t.DestroyState=t.TimeShiftState=t.SeekState=t.PlaybackState=t.ConnectionState=t.RemoteControlType=void 0,function(e){e[e.None=0]="None",e[e.Websocket=1]="Websocket",e[e.GoogleCastV2=2]="GoogleCastV2",e[e.GoogleCastV3=3]="GoogleCastV3"}(i||(t.RemoteControlType=i={})),function(e){e[e.Connecting=0]="Connecting",e[e.Connected=1]="Connected",e[e.Disconnecting=2]="Disconnecting",e[e.Disconnected=3]="Disconnected"}(n||(t.ConnectionState=n={})),function(e){e[e.None=0]="None",e[e.Stopped=1]="Stopped",e[e.Play=2]="Play",e[e.Playing=3]="Playing",e[e.Paused=4]="Paused"}(r||(t.PlaybackState=r={})),function(e){e[e.None=0]="None",e[e.Seeking=1]="Seeking",e[e.SeekingIOS=2]="SeekingIOS",e[e.Seeked=3]="Seeked"}(o||(t.SeekState=o={})),function(e){e[e.None=0]="None",e[e.Shifting=1]="Shifting",e[e.Shifted=2]="Shifted"}(a||(t.TimeShiftState=a={})),function(e){e.None="none",e.Destroying="destroying",e.Destroyed="destroyed"}(s||(t.DestroyState=s={})),function(e){e.SetPlayerSeek="@instance/player/setplayerseek",e.SetPlayerPlayback="@instance/player/setplayerplayback",e.SetPlayerTimeshift="@instance/player/setplayertimeshift",e.SetPlayerStall="@instance/player/setplayerstall",e.SetRendererStall="@instance/player/setplayerrendererstall",e.SetPlayerHasBeenPlaying="@instance/player/setplayerhasbeenplaying",e.SetPlayerTargetPlaybackTime="@instance/player/setplayertargetplaybacktime",e.SetPlayerPlaybackSpeed="@instance/player/setplayerplaybackspeed",e.SetPlayerViewMode="@instance/player/setplayerviewmode",e.SetDestroyState="@instance/player/setDestroyState",e.AddPlayerPendingTransition="@instance/player/addplayerpendingtransition",e.FilterPlayerPendingTransition="@instance/player/filterplayerpendingtransition",e.RemovePlayerPendingTransition="@instance/player/removeplayerpendingtransition",e.ClearPlayerPendingTransitions="@instance/player/clearplayerpendingtransitions",e.ResetPlayerState="@instance/player/resetplayerstate",e.SetRemoteControlType="@instance/player/setremotecontroltype",e.SetConnectionState="@instance/player/setconnectionstate",e.UpdateSeekingProcess="@instance/player/updateseekingprocess"}(l||(t.PlayerActionType=l={}))},48488:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialDrmState=void 0,t.setManifestDrm=function(e){return(0,n.createAction)(r.DrmActionType.SetManifestDrm,e)},t.resetManifestDrm=function(){return(0,n.createAction)(r.DrmActionType.ResetManifestDrm)},t.trackDrmKidError=function(e){return(0,n.createAction)(r.DrmActionType.TrackDrmKidError,e)},t.resetDrmKidErrors=function(){return(0,n.createAction)(r.DrmActionType.ResetDrmKidErrors)},t.setUsedKeySystem=function(e){return(0,n.createAction)(r.DrmActionType.SetUsedKeySystem,e)},t.resetUsedKeySystem=function(){return(0,n.createAction)(r.DrmActionType.ResetUsedKeySystem)};var n=i(35267),r=i(29682);t.getInitialDrmState=function(){return{keyIdsWithErrors:[],usedKeySystem:{kind:null,uid:null}}}},44991:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.DrmReducer=void 0;var a=i(3793),s=i(48488),l=i(29682),c=(0,s.getInitialDrmState)();t.DrmReducer=(0,a.default)(c,((n={})[l.DrmActionType.SetManifestDrm]=function(e,t){var i=t.payload;return r(r({},e),i)},n[l.DrmActionType.ResetManifestDrm]=function(){return c},n[l.DrmActionType.TrackDrmKidError]=function(e,t){var i=t.payload;return e.keyIdsWithErrors.includes(i)?e:r(r({},e),{keyIdsWithErrors:o(o([],e.keyIdsWithErrors,!0),[i],!1)})},n[l.DrmActionType.ResetDrmKidErrors]=function(e){return e.keyIdsWithErrors.length>0?r(r({},e),{keyIdsWithErrors:[]}):e},n[l.DrmActionType.SetUsedKeySystem]=function(e,t){var i=t.payload;return r(r({},e),{usedKeySystem:i})},n[l.DrmActionType.ResetUsedKeySystem]=function(e,t){return r(r({},e),{usedKeySystem:{kind:null,uid:null}})},n))},29682:function(e,t){var i;
14Object.defineProperty(t,"__esModule",{value:!0}),t.DrmActionType=void 0,function(e){e.SetManifestDrm="@instance/sources/@source/drm/setManifest",e.ResetManifestDrm="@instance/sources/@source/drm/setManifest/resetManifest",e.TrackDrmKidError="@instance/sources/@source/drm/trackDrmKidError",e.ResetDrmKidErrors="@instance/sources/@source/drm/resetDrmKidErrors",e.SetUsedKeySystem="@instance/sources/@source/drm/setusedkeysystem",e.ResetUsedKeySystem="@instance/sources/@source/drm/resetusedkeysystem"}(i||(t.DrmActionType=i={}))},69573:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.staticSourceReducers=void 0;var n=i(87133),r=i(44991),o=i(48557);t.staticSourceReducers={startOptions:i(77179).StartOptionsReducer,drm:r.DrmReducer,adaptation:n.AdaptationReducer,playback:o.PlaybackReducer}},15971:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceStore=o,t.getSourceState=function(e,t){var i;return void 0===t&&(t=e.sourceContext),null==(i=o(e,t))?void 0:i.getState()};var n=i(80813),r=i(94685);function o(e,t){var i;return void 0===t&&(t=e.sourceContext),(0,r.isContextAvailable)(e)?null==(i=e.serviceManager)?void 0:i.get(n.ServiceName.SourceStoreService,null==t?void 0:t.sourceIdentifier):void 0}},68925:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setBufferMaxSize=function(e,t){return(0,n.createAction)(r.BufferActionType.SetBufferMaxSize,{mimeType:e,maxBufferSize:t})},t.setRendererRanges=function(e,t){return(0,n.createAction)(r.BufferActionType.SetRendererRanges,{mimeType:e,ranges:t})},t.setBufferBlockSwitchOngoing=function(e){return(0,n.createAction)(r.BufferActionType.SetBufferBlockSwitchOngoing,{isOngoing:e})},t.setTimestampRollingOver=function(e){return(0,n.createAction)(r.BufferActionType.SetTimestampRollingOver,{isRollingOver:e})},t.addLoadedRange=function(e,t){return(0,n.createAction)(r.BufferActionType.AddLoadedRange,{mimeType:e,range:t})},t.removeLoadedRange=function(e,t){return(0,n.createAction)(r.BufferActionType.RemoveLoadedRange,{mimeType:e,range:t})},t.resetLoadedRanges=function(e){return(0,n.createAction)(r.BufferActionType.ResetLoadedRanges,{mimeType:e})},t.setLoadingRangeFinished=function(e){return(0,n.createAction)(r.BufferActionType.SetLoadingRangeFinished,{isFinished:e})};var n=i(35267),r=i(70118)},86897:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getRendererBufferRangesMap=t.getBufferRangesMap=t.getBufferBlockLoadedRanges=t.getBufferMaxSize=t.hasBufferRangesChanged=t.hasBufferMaxSizeChanged=t.getRendererBufferedRanges=t.getBufferState=t.getBufferStateMap=t.DefaultBufferMaxSize=void 0,t.getLoadedRangesForMimeType=function(e,t){var i,n;return null!=(n=null==(i=e.bufferStateMap[t])?void 0:i.loadedRanges)?n:[]},t.getBufferStartTime=function(e){if(!e)return -1;var t=Object.keys(e).map(function(t){var i,n;return null==(n=null==(i=e[t].rendererRanges)?void 0:i[0])?void 0:n.start}).filter(function(e){return void 0!==e});return t.length>0?Math.max.apply(Math,t):-1},t.getIsTimestampRollingOver=function(e){var t,i;return null!=(i=null==(t=e.buffer)?void 0:t.isTimestampRollingOver)&&i};var n=i(4524),r=i(85434);function o(e){var t;return null!=(t=e.loadedRanges)?t:[]}function a(e,t){return e!==t&&(0!==e.length||0!==t.length)&&e!==t}t.DefaultBufferMaxSize=0,t.getBufferStateMap=function(e){var t;return null==(t=null==e?void 0:e.buffer)?void 0:t.bufferStateMap},t.getBufferState=function(e){return null==e?void 0:e.buffer},t.getRendererBufferedRanges=function(e,t){var i;return t in e&&null!=(i=e[t].rendererRanges)?i:[]},t.hasBufferMaxSizeChanged=function(e){return function(i,n){var r=(0,t.getBufferState)(i),o=(0,t.getBufferState)(n);return(r?(0,t.getBufferMaxSize)(r,e):t.DefaultBufferMaxSize)!==(o?(0,t.getBufferMaxSize)(o,e):t.DefaultBufferMaxSize)}},t.hasBufferRangesChanged=function(e,i){var n=e.bufferStateMap,r=i.bufferStateMap,s=Object.keys(n),l=Object.keys(r);if(s.length!==l.length||s.some(function(e){return!l.includes(e)}))return!0;for(var c=0,u=s;c<u.length;c++){var d=u[c];if(a((0,t.getRendererBufferedRanges)(n,d),(0,t.getRendererBufferedRanges)(r,d))||a(o(n[d]),o(r[d])))return!0}return!1},t.getBufferMaxSize=function(e,i){var n;return i in e.bufferStateMap&&null!=(n=e.bufferStateMap[i].maxBufferSize)?n:t.DefaultBufferMaxSize},t.getBufferBlockLoadedRanges=function(e,t){return e?Object.keys(e.bufferStateMap).reduce(function(i,n){return i[n]=function(e,t){return o(e).filter(function(e){return e.bufferBlockId===t})}(e.bufferStateMap[n],t),i},{}):{}},t.getBufferRangesMap=function(e,t,i){return void 0===t?{}:function(e,t,i){var r=Object.keys(e.bufferStateMap),o=t.getSegmentStoreRangesMap(e,r),a=s(e,r);
vendor: 41,040 bytes, line 14
14return Object.keys(a).forEach(function(e){return o[e].push(a[e])}),function(e,t,i){var r={};return e.forEach(function(e){return r[e]=n.BufferRangeHelper.mergeRanges(t[e].flatMap(function(e){return e}),i)}),r}(r,o,i)}(t,e,i)},t.getRendererBufferRangesMap=function(e,t){return function(i){var n=e.getBufferBlock(i),o=null==n?void 0:n.getAllKnownPeriodIds()[0];return void 0===o||void 0===t||void 0===n?{}:s(t,e.getMediaTypes(o).map(function(e){return e.mimeType}).filter(function(e){return r.MimeTypeHelper.isAV(e)}))}};var s=function(e,i){var n={};return i.forEach(function(i){return n[i]=(0,t.getRendererBufferedRanges)(e.bufferStateMap,i)}),n}},47602:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToRendererBufferChanges=function(e,t){var i=(function(e){var t=e.getState(),i=(0,r.getBufferStateMap)(t);return void 0!==i?Object.keys(i):[]})(e).map(function(i){return(0,n.subscribe)(e)(function(e){return function(t){var i=(0,r.getBufferStateMap)(t);return i?(0,r.getRendererBufferedRanges)(i,e):[]}}(i),function(e){return t(i,e??[])})});return function(){return i.forEach(function(e){return e()})}};var n=i(93204),r=i(86897)},70118:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.BufferActionType=void 0,function(e){e.SetBufferMaxSize="@instance/source/buffer/setbuffermaxsize",e.SetRendererRanges="@instance/source/buffer/setrendererranges",e.SetBufferBlockSwitchOngoing="@instance/source/buffer/setbufferblockswitchongoing",e.SetTimestampRollingOver="@instance/source/buffer/settimestamprollingover",e.AddLoadedRange="@instance/source/buffer/addloadedrange",e.RemoveLoadedRange="@instance/source/buffer/removeloadedrange",e.ResetLoadedRanges="@instance/source/buffer/resetloadedranges",e.SetLoadingRangeFinished="@instance/source/buffer/setloadingrangefinished"}(i||(t.BufferActionType=i={}))},46922:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setBackgroundPlaybackState=t.setMainContentPlaybackState=void 0;var n=i(35267),r=i(18192);t.setMainContentPlaybackState=function(e){return(0,n.createAction)(r.PlaybackActionType.SetMainContentPlaybackState,e)},t.setBackgroundPlaybackState=function(e){return(0,n.createAction)(r.PlaybackActionType.SetBackgroundPlaybackState,e)}},48557:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackReducer=void 0;var o=i(3793),a=i(18192);t.PlaybackReducer=(0,o.default)({kind:a.PlaybackKind.MainContent},((n={})[a.PlaybackActionType.SetMainContentPlaybackState]=function(e,t){return function(e){return r({},e)}(t.payload)},n[a.PlaybackActionType.SetBackgroundPlaybackState]=function(e,t){return function(e,t){return r(r({},e),t)}(e,t.payload)},n))},81524:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getPlaybackPosition=void 0;var n=i(18192);t.getPlaybackPosition=function(e){return e.kind===n.PlaybackKind.Background?e.position:NaN}},18192:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackActionType=t.PlaybackKind=void 0,function(e){e.MainContent="maincontent",e.Background="background"}(i||(t.PlaybackKind=i={})),function(e){e.SetMainContentPlaybackState="@instance/sources/@source/playback/setmaincontentplaybackstate",e.SetBackgroundPlaybackState="@instance/sources/@source/playback/setbackgroundplaybackstate"}(n||(t.PlaybackActionType=n={}))},63879:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setMseObjectUrl=function(e){return(0,n.createAction)(r.RendererActionType.SetMseObjectUrl,{url:e})};var n=i(35267),r=i(39564)},39564:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.RendererActionType=void 0,function(e){e.SetMseObjectUrl="@instance/source/renderer/setmseobjecturl"}(i||(t.RendererActionType=i={}))},30012:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.initialStartOptions=void 0,t.initializeStartTimeOffset=function(){return o(t.initialStartOptions.startTimeOffset)},t.setStartTimeOffset=o;var n=i(35267),r=i(25934);function o(e){return(0,n.createAction)(r.StartOptionsActionKey.SetStartTimeOffset,{startTimeOffset:e})}t.initialStartOptions={startTimeOffset:0}},77179:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.StartOptionsReducer=void 0,t.getStartTimeOffset=function(e){return e.startOptions.startTimeOffset};var o=i(3793),a=i(30012),s=i(25934),l=a.initialStartOptions,c=function(e,t){var i=t.payload;return r(r({},e),i)};t.StartOptionsReducer=(0,o.default)(l,((n={})[s.StartOptionsActionKey.InitStartTimeOffset]=c,n[s.StartOptionsActionKey.SetStartTimeOffset]=c,n))},25934:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StartOptionsActionKey=void 0,function(e){e.InitStartTimeOffset="@instance/sources/@source/startOptions/initStartTimeOffset",e.SetStartTimeOffset="@instance/sources/@source/startOptions/setStartTimeOffset"}(i||(t.StartOptionsActionKey=i={}))},81683:function(e,t){function i(e){Object.freeze(e);var t="function"==typeof e,n=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(e).forEach(function(r){!n.call(e,r)||t&&("caller"===r||"callee"===r||"arguments"===r)||null===e[r]||"object"!=typeof e[r]&&"function"!=typeof e[r]||Object.isFrozen(e[r])||i(e[r])}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.freeze=void 0,t.deepFreeze=i;var n=function(e){var t=e.getState();(function(e){return null!==e&&"object"==typeof e})(t)&&i(t)};t.freeze=function(e){return n(e),function(t){return function(i){n(e);try{return t(i)}finally{n(e)}}}}},68205:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.addReachableDomain=function(e){return(0,n.createAction)(r.ReachableDomainsActionType.AddDomain,e)};var n=i(35267),r=i(32027)},60430:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ReachableDomainsReducer=void 0;var a=i(3793),s=i(32027);t.ReachableDomainsReducer=(0,a.default)({domains:[]},((n={})[s.ReachableDomainsActionType.AddDomain]=function(e,t){return function(e,t){return r(r({},e),{domains:e.domains.includes(t)?e.domains:o(o([],e.domains,!0),[t],!1)})}(e,t.payload)},n))},32027:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ReachableDomainsActionType=void 0,function(e){e.AddDomain="adddomain"}(i||(t.ReachableDomainsActionType=i={}))},74853:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayHelper=void 0,t.invert=function(e){return function(t,i,n){return!e(t,i,n)}},t.findIndexFromEnd=o,t.findIndexWithin=function(e,t,i,n){for(var r=t;r<i;r++)if(n(e[r]))return r;return -1},t.findFromEnd=function(e,t){return e[o(e,t)]},t.forEachFromIndex=function(e,t,i){for(;t<e.length;t++)i(e[t-1],e[t])},t.forceArray=function(e){return Array.isArray(e)?e:[e]},t.contains=function(e,t,i){return void 0===i&&(i=a),null!=e.find(function(e){return i(t,e)})},t.shallowObjectMatcher=a,t.clearArray=function(e){e.splice(0,e.length)},t.removeEntriesFromStart=function(e,t){return t<1?[]:e.splice(0,t)};var r=i(70233);function o(e,t){var i;for(i=e.length-1;i>=0&&!t(e[i]);i--);return i}function a(e,t){return Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(function(i){return e[i]===t[i]})}t.ArrayHelper=function(){function e(){}return e.comparePrimitiveArrays=function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},e.stringToArrayWithoutEncoding=function(e){for(var t=new Uint8Array(e.length),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t},e.convertBufferSourceToUTF8=function(t,i){return void 0===i&&(i="utf-8"),t instanceof ArrayBuffer?t=new Uint8Array(t):t instanceof DataView&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),e.convertUint8ArrayToUtf8(t,i)},e.convertUint8ArrayToUtf8=function(e,t){if("u">typeof TextDecoder)return new TextDecoder(t).decode(e);for(var i=0,n="";i<e.length;){var r=e[i++];if(r>127)if(r>191&&r<224){if(i>=e.length||64&e[i]){n+="�";continue}r=(31&r)<<6|63&e[i++]}else if(r>223&&r<240){if(i+1>=e.length||64&e[i]||64&e[i+1]){n+="�";continue}r=(15&r)<<12|(63&e[i++])<<6|63&e[i++]}else{if(!(r>239&&r<248)||i+2>=e.length||64&e[i]||64&e[i+1]||64&e[i+2]){n+="�";continue}r=(7&r)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++]}r<=65535?n+=String.fromCharCode(r):r<=1114111?(r-=65536,n+=String.fromCharCode(r>>10|55296),n+=String.fromCharCode(1023&r|56320)):n+="�"}return n},e.sort=function(e,t,i){if("string"==typeof t&&"[object Array]"===Object.prototype.toString.call(e)){var n;if(i||(i="asc"),"asc"===i)n=-1;else{if("desc"!==i)return;n=1}return e.length<2?e:e.sort(function(e,i){return e[t]<i[t]?n:e[t]>i[t]?-1*n:0})}},e.append=function(t,i){var n=e.getTypedArrayType(t),r=e.getTypedArrayType(i);if(!n&&!r||n!==r)return null;var o=new n((t.byteLength+i.byteLength)/n.BYTES_PER_ELEMENT);return o.set(new n(t),0),o.set(new n(i),t.byteLength/n.BYTES_PER_ELEMENT),o},e.concatBuffers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!(e=e.filter(function(e){return e})).length)return null;var i=new Uint8Array(e.reduce(function(e,t){return e+t.byteLength},0));return e.reduce(function(e,t){return i.set(new Uint8Array(t),e),e+t.byteLength},0),i.buffer},e.getTypedArrayType=function(e){return e instanceof Uint8Array?Uint8Array:e instanceof Uint16Array?Uint16Array:e instanceof Uint32Array?Uint32Array:null},e.getArray=function(t){return e.getTypedArrayType(t)?[].slice.call(t):Array.isArray(t)?t:null},e.union=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=[];return e.filter(function(e){return!!e}).forEach(function(e){return e.forEach(function(e){i.includes(e)||i.push(e)})}),i},e.isArrayBuffer=function(e){return!!e&&e instanceof ArrayBuffer&&void 0!==e.byteLength},e.arrayBufferToAsciiString=function(t,i){return void 0===i&&(i=!0),e.sparseArrayBufferToAsciiString(t,1,0,i)},e.arrayBufferToBase64=function(e){for(var t="",i=new Uint8Array(e),n=0;n<i.length;n++)t+=String.fromCharCode(i[n]);return window.btoa(t)},e.sparseArrayBufferToAsciiString=function(e,t,i,n){void 0===t&&(t=2),void 0===i&&(i=0),void 0===n&&(n=!0);for(var r="",o=n?new Uint8Array(e):new Uint16Array(e),a=i;a<o.length;a+=t)r+=String.fromCharCode(o[a]);return r},e.intersect=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=[],r=t.filter(function(e){return!!e});return e.union.apply(e,t).forEach(function(e){r.every(function(t){return t.includes(e)})&&n.push(e)}),n},e.addAndMergeIntersects=function(t,i){var r=t.filter(function(t){return e.intersect(t,i).length>0}),o=t.filter(function(e){return!r.includes(e)});return 0===r.length?n(n([],t,!0),[i],!1):n([e.union.apply(e,n(n([],r,!1),[i],!1))],o,!0)},e.extractAsciiString=function(e,t,i){for(var n=t+i,r="";t<n;t++)r+=String.fromCharCode(e.getUint8(t));return r},e.extractHexString=function(e,t,i){for(var n=t+i,o="";t<n;t++)o+=r.FormatHelper.intToHex(e.getUint8(t));return o},e.insertInSortedArray=function(e,t,i){var n=e.findIndex(i);return n<0?e.push(t):e.splice(n,0,t),e},e.removeUntilInSortedArray=function(e,t){var i=e.findIndex(t),n=-1===i?e.length:i;return 0===n?[]:e.splice(0,n)},e.toArray=function(e){try{if(!e||!e.length)return[];for(var t=Array(e.length),i=0;i<e.length;i++)t[i]=e[i];return t}catch{return[]}},e}()},19483:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayMap=void 0,t.ArrayMap=function(){function e(){this.k5=new Map}return e.prototype.get=function(e){return this.k5.get(e)},e.prototype.apply=function(e,t){this.k5.has(e)&&this.k5.set(e,t(this.k5.get(e)))},e.prototype.has=function(e){return this.k5.has(e)},e.prototype.delete=function(e){return this.k5.delete(e)},e.prototype.clear=function(){this.k5.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this.k5.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){var e=0;return this.k5.forEach(function(t){return e+=t.length}),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){var e=[];return this.k5.forEach(function(t){e.push(t)}),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){var e=[];return this.k5.forEach(function(t,i){e.push(i)}),e},enumerable:!1,configurable:!0}),e.prototype.add=function(e,t){return this.ensure(e),null!=t&&this.get(e).push(t),this},e.prototype.ensure=function(e){this.has(e)||this.set(e,[])},e.prototype.set=function(e,t){return this.k5.set(e,t),this},e.prototype.addAll=function(e,t){var i=this;this.ensure(e),t.forEach(function(t){return i.add(e,t)})},e.prototype.getObject=function(){var e={};return this.k5.forEach(function(t,i){e[i]=t}),e},e.prototype.forAll=function(e){this.k5.forEach(function(t,i){return t.forEach(function(t){return e(i,t)})})},e.prototype.sort=function(e){this.k5.forEach(function(t){t.sort(e)})},e.prototype.mapEach=function(t){var i=new e;return this.k5.forEach(function(e,n){return i.set(n,e.map(t))}),i},e.prototype.transform=function(e){var t=[];return this.k5.forEach(function(i){return t.push(e(i))}),t},e.prototype.mapAll=function(t){var i=new e;return this.k5.forEach(function(e,n){return i.set(n,t(e))}),i},e.prototype.getAll=function(){var e=[];return this.k5.forEach(function(t){return e.push.apply(e,t)}),e},e.prototype.deleteValue=function(e,t){if(!this.has(e))return!1;var i=this.k5.get(e),n=i.indexOf(t);return n>=0&&(i.splice(n,1),!0)},e}()},81199:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getPlayableBufferLevel=function(e){var t=[null==e?void 0:e.getAudioBufferLength(),null==e?void 0:e.getVideoBufferLength()].filter(n.isDefined);return Math.min.apply(Math,t)};var n=i(23068)},4527:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CancelablePromise=void 0,t.CancelablePromise=function(){function e(){}return e.makeCancelable=function(e){var t=function(e){},i=new Promise(function(i,n){t=n,e.then(i,n)});return i.cancel=t.bind(i),i},e}()},47993:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MSESafari=t.getBestTech=t.getTechSupportedByModules=t.getTechSupportedByPlatform=t.getTechSupportedByModulesOnPlatform=t.isLocalStorageAvailable=t.isInlinePlaybackRestricted=t.isFairPlayDrmSupported=t.supports=t.checkPlatformSupports=t.hasMediaSourceSupport=t.FairplayKeySystems=void 0,t.isUsingFileProtocol=function(){return"file:"===c.default.location.protocol},t.isFetchSupported=function(){return"function"==typeof c.default.fetch&&"function"==typeof c.default.AbortController};var r,o=i(88052),a=i(62756),s=i(44468),l=i(21513),c=i(4081),u=i(85434),d=i(15487);!function(e){e.FPS_1="com.apple.fps.1_0",e.FPS_2="com.apple.fps.2_0"}(r||(t.FairplayKeySystems=r={}));var h=[{player:s.PlayerType.Html5,streaming:s.StreamType.Dash},{player:s.PlayerType.Html5,streaming:s.StreamType.Hls},{player:s.PlayerType.Html5,streaming:s.StreamType.Smooth},{player:s.PlayerType.WebRtc,streaming:s.StreamType.Whep},{player:s.PlayerType.Native,streaming:s.StreamType.Hls},{player:s.PlayerType.Native,streaming:s.StreamType.Progressive}],p=!!(c.default.ArrayBuffer&&c.default.Uint8Array&&c.default.Uint16Array);t.hasMediaSourceSupport=function(){var e,t,i,n="MediaSource"in c.default&&"function"==typeof(null==(e=c.default.MediaSource)?void 0:e.isTypeSupported),r="WebKitMediaSource"in c.default&&"function"==typeof(null==(t=c.default.WebKitMediaSource)?void 0:t.isTypeSupported),o="ManagedMediaSource"in c.default&&"function"==typeof(null==(i=c.default.ManagedMediaSource)?void 0:i.isTypeSupported);return n||r||o},t.checkPlatformSupports=function(){var e=[];if(p?e=h.filter(function(e){return(0,t.supports)(e.player,e.streaming)}):e.push({player:s.PlayerType.Native,streaming:s.StreamType.Progressive}),(0,d.isSafari)()){for(var i=1;i<e.length;i++)if(e[i].player===s.PlayerType.Native&&e[i].streaming===s.StreamType.Hls){e=e.splice(i,1).concat(e);break}}return e},t.supports=function(e,i){var n=(0,t.hasMediaSourceSupport)()?[s.StreamType.Dash,s.StreamType.Hls,s.StreamType.Smooth]:[],r=!function(){var e=c.default.RTCPeerConnection,t=!!e&&"function"==typeof e.prototype.addTransceiver;return function(){var e,t,i,n,r;return!!(null!=(r=null!=(n=null!=(i=null!=(t=null==(e=navigator.mediaDevices)?void 0:e.getUserMedia)?t:navigator.getUserMedia)?i:navigator.webkitGetUserMedia)?n:navigator.mozGetUserMedia)?r:navigator.msGetUserMedia)}()&&t}()?[]:[s.StreamType.Whep],o=function(e){return e.some(function(e){return e===i})};switch(e){case s.PlayerType.Html5:return o(n);case s.PlayerType.WebRtc:return o(r);case s.PlayerType.Native:return o(function(){var e=[];return function(){var e=document.createElement("video");return e&&"function"==typeof e.canPlayType&&("maybe"===e.canPlayType("application/vnd.apple.mpegURL")||"maybe"===e.canPlayType("application/x-mpegURL")||"maybe"===e.canPlayType("audio/mpegurl")||"maybe"===e.canPlayType("audio/x-mpegurl"))}()&&!(0,d.isEdge)()&&e.push(s.StreamType.Hls),function(){return"function"==typeof document.createElement("video").canPlayType}()&&e.push(s.StreamType.Progressive),e}());default:return!1}},t.isFairPlayDrmSupported=function(){return Object.values(r).some(function(e){var t;return null==(t=c.default.WebKitMediaKeys)?void 0:t.isTypeSupported(e,u.MimeType.VideoMp4)})},t.isInlinePlaybackRestricted=function(){var e=(0,d.getIOSVersion)(),t=e<d.IOS_9&&/iPad/i.test(navigator.userAgent),i=e<d.IOS_10&&/iP(hone|od)/i.test(navigator.userAgent);return d.isSafariIOS&&(t||i)},t.isLocalStorageAvailable=function(){try{return c.default.localStorage&&"function"==typeof localStorage.getItem&&"function"==typeof localStorage.setItem}catch{return!1}},t.getTechSupportedByModulesOnPlatform=function(){var e=(0,t.getTechSupportedByModules)();return(0,t.getTechSupportedByPlatform)().filter(function(t){return e.filter(function(e){return function(e,t){return e.player===t.player&&e.streaming===t.streaming}(e,t)}).length>0})},t.getTechSupportedByPlatform=function(){return(0,t.checkPlatformSupports)()},t.getTechSupportedByModules=function(){var e=o.ModuleManager.has(a.ModuleName.EngineBitmovin)?o.ModuleManager.get(a.ModuleName.EngineBitmovin).technologyChecker.getSupportedTechnologies():[],t=o.ModuleManager.has(a.ModuleName.EngineNative)?o.ModuleManager.get(a.ModuleName.EngineNative).technologyChecker.getSupportedTechnologies():[],i=o.ModuleManager.has(a.ModuleName.EngineWebRtc)?o.ModuleManager.get(a.ModuleName.EngineWebRtc).technologyChecker.getSupportedTechnologies():[];return n(n(n([],e,!0),t,!0),i,!0)},t.getBestTech=function(e,t,i){void 0===e&&(e=[]),void 0===t&&(t={});var r=(0,l.getCapabilities)(),o=function(e){var t=n([],(0,l.getCapabilities)().techSupportedByPlatform,!0);return e&&0!==e.length?n(n([],e.filter(function(e){return t.some(function(i,n){var r,o=e.player===i.player&&e.streaming===i.streaming,a=null!=(r=e.exclude)&&r;return o&&t.splice(n,1),o&&!a})}).map(function(e){return{player:e.player,streaming:e.streaming}}),!0),t,!0):t}(e),a=r.techSupportedByPlatform;return i&&(o=a.filter(function(e){return e.player===i.player&&e.streaming===i.streaming})),(t.vr&&((0,d.isSafariIOS)()||(0,d.isSafari)())?o.filter(function(e){var t=e.streaming===s.StreamType.Progressive&&e.player===s.PlayerType.Native,i=e.streaming===s.StreamType.Hls&&e.player===s.PlayerType.Native;return t||i&&(!(0,d.isSafariIOS)()||(0,d.getIOSVersion)()>d.IOS_9)}):o).find(function(e){return!!t[e.streaming]})},t.MSESafari=function(){return(0,d.isSafari)()&&(0,t.hasMediaSourceSupport)()}},34047:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.CodecStringHelper=t.HEVC_CODEC_TAGS=t.AVC_CODEC_TAGS=void 0,t.isAVMuxedTogether=function(e){return!!e&&e.indexOf(",")>-1},t.assembleHvcCodecString=function(e,t){if(!t)return null;for(var i=n([],t.general_constraint_indicator_flags_bytes,!0);0===i[i.length-1];)i.pop();var r=i.map(function(e){return e.toString(16).toUpperCase()});return n([e,"".concat(["","A","B","C"][t.general_profile_space]).concat(t.general_profile_idc),"".concat(t.general_profile_compatibility_flags),"".concat(0===t.general_tier_flag?"L":"H").concat(t.general_level_idc)],r,!0).join(".")},t.getMediaTypeFromCodec=function(e){return a.isVideoCodec(e)?r.MediaType.Video:a.isAudioCodec(e)?r.MediaType.Audio:a.isSubtitleCodec(e)?r.MediaType.Subtitles:void 0},t.getCodecTag=function(e){var t=e.getCodec();return(null==t?void 0:t.slice(0,3))||""};var r=i(44468),o=i(84568);t.AVC_CODEC_TAGS=["avc"],t.HEVC_CODEC_TAGS=["hev","hvc"];var a=function(){function e(){}return e.hasOldAvc1CodecFormat=function(t){return e.unsupportedCodecStringFormatRegex.test(t)},e.convertAvc1ToAvcotiCodecFormat=function(e){var t=e.split(".");return t.length>2?t.shift()+"."+parseInt(t.shift()).toString(16)+("000"+parseInt(t.shift()).toString(16)).slice(-4):e},e.isSupportedByRenderer=function(e,t,i){return e.isMediaTypeSupported(t,i)},e.getExtractedCodecStrings=function(t){return e.memoizedExtractCodecStrings||(e.memoizedExtractCodecStrings=(0,o.memoize)(s)),e.memoizedExtractCodecStrings(t)},e.getMimeTypeForCodecString=function(t){if(!t)return"unknown";for(var i=0,n=e.mimeTypeOrder;i<n.length;i++){var r=n[i];if(e.mimeTypeMap[r].find(function(e){return t.indexOf(e)>-1}))return r}return"unknown"},e.addCodec=function(t,i){var n;e.mimeTypeMap[t].push(i),null==(n=e.memoizedExtractCodecStrings)||n.invalidate()},e.canSwitchBetweenAudioCodecs=function(e,t){return e===t||[["mp4a.40.2","mp4a.40.5"],["ac-3","mp4a.a5","mp4a.A5"],["ec-3","mp4a.a6","mp4a.A6"]].some(function(i){return i.includes(e)&&i.includes(t)})},e.extractCodec=function(e){return e?e.split(".")[0]:null},e.isVideoCodec=function(t){return"video"===e.getMimeTypeForCodecString(t)},e.isAudioCodec=function(t){return"audio"===e.getMimeTypeForCodecString(t)},e.isSubtitleCodec=function(t){return"application"===e.getMimeTypeForCodecString(t)},e.unsupportedCodecStringFormatRegex=RegExp("^avc1.[0-9]{2,3}.[0-9]{2,3}$"),e.mimeTypeOrder=["video","audio","application"],e.mimeTypeMap={video:["avc","hvc","hev","mp4v","svc","mvc","av1","av01","vp8","vp9","dvh1","dvhe","dvav","dva1","vvc","vvi"],audio:["mp4a","mp3","opus","vorbis","speex","flac","samr","ac-3","ec-3","ac-4","ec-4"],application:["stpp","wvtt","vtt"]},e}();function s(e){return e||"string"==typeof e?e.split(",").reduce(function(e,t){return t=t.trim(),e[a.getMimeTypeForCodecString(t)]=t,e},{}):{}}t.CodecStringHelper=a},48669:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Comparators=void 0,t.Comparators=function(){function e(){}return e.boolean=function(e,t){return e===t?0:e?1:-1},e.reverseBoolean=function(t,i){return e.boolean(i,t)},e}()},19541:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.compareValues=function(e,t,i){return!e&&!t||!(!e||!t)&&(i||Object.keys(e)).every(function(i){return e[i]===t[i]})}},79721:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PERIOD_ID=void 0,t.DEFAULT_PERIOD_ID="0"},76399:function(e,t){var i=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.FilterIterator=t.ArrayIterator=t.EmptyIterator=void 0;var n=function(){function e(){}return e.prototype.toArray=function(){for(var e=[];this.hasNext();)e.push(this.next());return e},e}();t.EmptyIterator=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.hasNext=function(){return!1},t.prototype.next=function(){},t.getInstance=function(){return this.singletonInstance||(this.singletonInstance=new t),this.singletonInstance},t}(n),t.ArrayIterator=function(e){function t(t){var i=e.call(this)||this;return i.data=t,i.JZ=-1,i}return i(t,e),t.prototype.hasNext=function(){return this.KZ=void 0,this.JZ<this.data.length&&(this.JZ++,this.KZ=this.data[this.JZ]),null!=this.KZ},t.prototype.next=function(){return this.KZ},t}(n),t.FilterIterator=function(e){function t(t,i){var n=e.call(this)||this;return n.iterator=t,n.filter=i,n}return i(t,e),t.prototype.hasNext=function(){var e;for(this.LZ=void 0;this.iterator.hasNext();)if(e=this.iterator.next(),this.filter(e)){this.LZ=e;break}return null!=this.LZ},t.prototype.next=function(){return this.LZ},t}(n)},65348:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DOMHelper=void 0,t.DOMHelper=function(){function e(){}return e.createTag=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i={});var n=document.createElement(e);return Object.keys(i).forEach(function(e){return n.style[e]=i[e]}),Object.keys(t).forEach(function(e){return n.setAttribute(e,t[e])}),n},e}()},34841:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=function(){function e(){var e=this;this.YJ="pending",this.VJ=new Promise(function(t,i){e.WJ=function(i){return e.YJ="resolved",t(i)},e.XJ=function(t){return e.YJ="rejected",i(t)}})}return Object.defineProperty(e.prototype,"hasSettled",{get:function(){return"pending"!==this.YJ},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this.VJ},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolve",{get:function(){return this.WJ},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"reject",{get:function(){return this.XJ},enumerable:!1,configurable:!0}),e}()},35660:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DelayedEndOfStreamHelper=void 0;var n=i(19274),r=i(34841);t.DelayedEndOfStreamHelper=function(){function e(e,t){void 0===t&&(t=1);var i=this;this.context=e,this.delayThreshold=t,this.aU=function(){i.XU&&!i.ZU(!0)&&i.XU.resolve()},this.YU=e.videoElement}return e.prototype.ZU=function(e){var t;return!(!e||!(null!=(t=this.YU)&&t.buffered.length))&&this.YU.buffered.end(this.YU.buffered.length-1)-this.YU.currentTime>this.delayThreshold},e.prototype.bU=function(){this.context.logger.debug("Resolving delayed setEndOfStream"),this.YU.removeEventListener(n.MediaElementEvent.timeupdate,this.aU),this.XU=void 0},e.prototype.setEndOfStream=function(e,t){var i=this;if(this.ZU(e)){if(this.XU)return Promise.resolve();var o=this.YU.buffered.end(this.YU.buffered.length-1),a=this.YU.currentTime;return this.context.logger.debug("Delaying setEndOfStream(".concat(e,") until playhead is close to end of buffer"),{threshold:this.delayThreshold,currentTime:a,endOfBuffer:o}),this.XU=new r.Deferred,this.YU.addEventListener(n.MediaElementEvent.timeupdate,this.aU),this.XU.promise.then(function(){return i.bU(),t()}).catch(function(){return i.bU()}),Promise.resolve()}return this.XU&&!this.ZU(e)&&this.XU.reject(),t()},e.prototype.release=function(){this.XU&&(this.YU.removeEventListener(n.MediaElementEvent.timeupdate,this.aU),this.XU.reject(),this.XU=void 0)},e}()},52424:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DurationConverter=void 0,t.DurationConverter=function(){function e(){}return e.getDurationInSec=function(e){if("string"!=typeof e)return NaN;var t=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?(T)?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*|Infinity)S)?/.exec(e);if(t){var i=!!t[1],n=12*parseFloat(t[2]||"0")*2592e3,r=30*parseFloat(t[4]||"0")*86400,o=24*parseFloat(t[6]||"0")*3600,a=60*parseFloat(t[9]||"0")*60,s=60*parseFloat(t[11]||"0"),l=parseFloat(t[13]||"0");if("T"===t[8]&&(t[9]||t[11]||t[13])===void 0)return NaN;var c=n+r+o+a+s+l;return i&&(c=-c),c}return NaN},e}()},40153:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorRecoveryUtil=void 0,t.ErrorRecoveryUtil=function(){function e(){}return e.wasRecoveryAttemptedAtPosition=function(t,i){return!(i<0)&&Math.abs(t-i)<e.POSITION_TOLERANCE},e.POSITION_TOLERANCE=.1,e}()},43767:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FileLoader=void 0,t.FileLoader=function(){function e(){this.kL={}}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.loadScript=function(e,t){return void 0===t&&(t=!1),this.kL.hasOwnProperty(e)&&this.kL[e]||(t&&window.requirejs&&window.define?this.kL[e]=new Promise(function(t,i){window.requirejs([e],function(e){t(e)},function(e){i(e)})}):this.kL[e]=new Promise(function(t,i){var n=document.getElementsByTagName("head")[0]||document.documentElement,r=!1,o=document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.onload=o.onreadystatechange=function(){r||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(r=!0,o.onload=o.onreadystatechange=null,n&&o.parentNode&&n.removeChild(o),t(void 0))},o.onerror=i,n.insertBefore(o,n.firstChild)})),this.kL[e]},e.prototype.removeScript=function(e,t){this.kL.hasOwnProperty(e)&&this.kL[e]&&delete this.kL[e];for(var i=document.head.getElementsByTagName("script"),n=0;n<i.length;n++)i[n].src.includes(t)&&document.head.removeChild(i[n])},e.prototype.loadCSS=function(e,t){for(var i,n=(null==(i=null==t?void 0:t.container)?void 0:i.call(t))||document.getElementsByTagName("head")[0]||document.documentElement,r=n.querySelectorAll("link"),o=0;o<r.length;o++){var a=r[o];if(a.hasAttribute("href")&&a.getAttribute("href").indexOf(e)>-1)return}var s=document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.setAttribute("href",e),n.insertBefore(s,n.firstChild),this.kL[e]=!0},e}()},70233:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FormatHelper=void 0,t.FormatHelper=function(){function e(){}return e.hexToBytes=function(e){var t=e.length;1&t&&(e="0"+e,t++);for(var i=new Uint8Array(t>>1),n=0;n<t;n+=2)i[n>>1]=parseInt(e.substring(n,n+2),16);return i},e.bytesToHex=function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));for(var t="",i=0;i<e.byteLength;i++){var n=(255&e[i]).toString(16);n.length<2&&(t+="0"),t+=n}return t},e.bytesToUUID=function(e){return this.beautifyUUID(this.bytesToHex(e))},e.beautifyUUID=function(e){return e.slice(0,8)+"-"+e.slice(8,12)+"-"+e.slice(12,16)+"-"+e.slice(16,20)+"-"+e.slice(20)},e.intToHex=function(e){return("00"+e.toString(16)).slice(-2)},e.base64UrlEncode=function(e){return window.btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},e.base64UrlDecode=function(e){return window.atob((e+"===".slice((e.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/"))},e}()},87244:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isSwitchingBufferBlocks=function(e){var t,i=null==e?void 0:e.getState();return!!i&&(null==(t=i.buffer)?void 0:t.isBufferBlockSwitchOngoing)}},68922:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.applyLabeling=t.getLabelFunction=t.handleLabelAssignment=t.DEFAULT_LABEL=t.LabelingType=void 0;var n,r=i(70850);(function(e){e.Qualities="qualities",e.Tracks="tracks",e.Subtitles="subtitles"})(n||(t.LabelingType=n={})),t.DEFAULT_LABEL="",t.handleLabelAssignment=function(e,i,n){if(!n)return t.DEFAULT_LABEL;var o=(0,r.safeUserCallback)(function(){return n(e)},i.logger);return"string"==typeof o?o:t.DEFAULT_LABEL},t.getLabelFunction=function(e,t,i){var n,r;return null==(r=null==(n=e.labeling)?void 0:n[t])?void 0:r[i]},t.applyLabeling=function(e,i){var n=(0,t.getLabelFunction)(e.source,e.streamType,e.labelingType);return(0,t.handleLabelAssignment)(i,e.context,n)}},84568:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.memoize=function(e,t){var i=new Map;function n(n){return function(i,n){var r=t?t.apply(void 0,n):e;return i.has(r)||i.set(r,e.apply(void 0,n)),i.get(r)}(t||0===n.length?i:r(i,n),n)}function r(e,t,i){void 0===i&&(i=0);var n,o=t.length-1===i,a=t[i];return e.has(a)?n=e.get(a):(n=new Map,e.set(a,n)),i+=1,o?n:r(n,t,i)}return function(){var e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(e)};return e.invalidate=function(){return i.clear()},e}()}},85434:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MimeTypeHelper=t.MimeType=void 0,t.isMediaTypeContained=function(e,t){return Object.keys(e).map(function(e){return a.getMediaType(e)}).includes(a.getMediaType(t))};var n,r=i(85625),o=i(44468);!function(e){e.VideoMp4="video/mp4",e.VideoTs="video/mp2t",e.AudioMp4="audio/mp4",e.AudioTs="audio/mp2t"}(n||(t.MimeType=n={}));var a=function(){function e(){}return e.isSubtitle=function(e){return this.isApplication(e)||this.isText(e)},e.isText=function(e){return e.toLowerCase().includes("text")},e.isTtmlXml=function(e){return e.toLowerCase().includes("ttml+xml")},e.isApplication=function(e){return e.toLowerCase().includes("application")},e.isAV=function(e){return this.isVideo(e)||this.isAudio(e)},e.isVideo=function(e){return e.toLowerCase().includes("video")},e.isUnknown=function(e){return e.toLowerCase().includes("unknown")},e.isAudio=function(e){return e.toLowerCase().includes("audio")},e.isImage=function(e){return e.toLowerCase().includes("image")},e.isDash=function(e){return e.toLowerCase().includes(r.ManifestMimeType.Dash)},e.isHls=function(e){var t=e.toLowerCase();return t.includes(r.ManifestMimeType.Hls)||t.includes("vnd.apple.mpegurl")},e.isMP4=function(e){return e.toLowerCase().includes("mp4")},e.getMediaType=function(e){return this.isVideo(e)?o.MediaType.Video:this.isAudio(e)?o.MediaType.Audio:this.isSubtitle(e)?o.MediaType.Subtitles:this.isImage(e)?o.MediaType.Thumbnails:void 0},e.extractContentType=function(e){return e.split("/")[0]},e.extractContainerType=function(e){var t=e.split("/");return t.length>1?t[1]:null},e}();t.MimeTypeHelper=a},15014:function(e,t){function i(e,t){var i;return null==(i=null==e?void 0:e.Period)?void 0:i.find(function(e){return e._id===t})}function n(e,t){var n,r=i(e,t.periodId);if(r)return null==(n=r.AdaptationSet)?void 0:n.find(function(e){return e._internalId.equals(t)})}Object.defineProperty(t,"__esModule",{value:!0}),t.findRepresentation=void 0,t.findPeriod=i,t.findAdaptationSet=n,t.findRepresentation=function(e,t){var i,r=n(e,t);if(r)return null==(i=r.Representation)?void 0:i.find(function(e){return e._internalId.equals(t)})}},15487:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getVidaaVersion=t.isVidaa=t.getTizenVersion=t.isTizen2024=t.isTizen2023=t.isTizen2022=t.isTizen2020=t.isTizen2016=t.isTizen2017=t.isTizen2018=t.isTizen2019=t.isTizen=t.getEdgeVersion=t.isEdge=t.getSafariVersion=t.isSafari=t.isFirefoxIOS=t.isFirefox=t.isChromium=t.isChrome=t.WEBOS_2022_CHROMIUM_VERSION=t.WEBOS_2021_CHROMIUM_VERSION=t.WEBOS_2020_CHROMIUM_VERSION=t.WEBOS_2018_2019_CHROMIUM_VERSION=t.WEBOS_2016_2017_CHROMIUM_VERSION=t.TIZEN_2024_MINOR_VERSION=t.TIZEN_2024_MAJOR_VERSION=t.TIZEN_2023_MINOR_VERSION=t.TIZEN_2023_MAJOR_VERSION=t.TIZEN_2022_MINOR_VERSION=t.TIZEN_2022_MAJOR_VERSION=t.TIZEN_2020_MINOR_VERSION=t.TIZEN_2020_MAJOR_VERSION=t.TIZEN_2019_MINOR_VERSION=t.TIZEN_2019_MAJOR_VERSION=t.TIZEN_2018_MINOR_VERSION=t.TIZEN_2018_MAJOR_VERSION=t.TIZEN_2017_MINOR_VERSION=t.TIZEN_2017_MAJOR_VERSION=t.TIZEN_2016_MINOR_VERSION=t.TIZEN_2016_MAJOR_VERSION=t.SAFARI_18_MAJOR_VERSION=t.SAFARI_17_MAJOR_VERSION=t.SAFARI_15_MAJOR_VERSION=t.IOS_18=t.IOS_17=t.IOS_15=t.IOS_10=t.IOS_9=t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=void 0,t.resetPlatformDetectorCache=t.isSafariPlatform18orNewer=t.isSafari17orIOS17=t.isSafari15orIOS15=t.getIOSVersion=t.isSafariIOS=t.isIOS=t.isMobile=t.isEdgeAndroid=t.isAndroid=t.isWebOs2022OrNewer=t.isWebOs2020=t.isWebOs2017=t.isWebOs2016=t.isWebOs2019OrOlder=t.getWebOsChromiumVersion=t.isWebOS=t.isWpeWebKit=t.isVizio=void 0,t.isLegacyEdge=r,t.isEdgeChromium=function(){return(0,t.isEdge)()&&(0,t.getEdgeVersion)().major>=t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION},t.isPlayStation5=o,t.isPlayStation4=a,t.isReactNative=function(){return"ReactNative"===window.navigator.product};var n=i(47993);function r(){return(0,t.isEdge)()&&(0,t.getEdgeVersion)().major<t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION}function o(){return/PlayStation 5/i.test(navigator.userAgent)}function a(){return/PlayStation 4/i.test(navigator.userAgent)}t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=79,t.IOS_9=9,t.IOS_10=10,t.IOS_15=15,t.IOS_17=17,t.IOS_18=18,t.SAFARI_15_MAJOR_VERSION=15,t.SAFARI_17_MAJOR_VERSION=17,t.SAFARI_18_MAJOR_VERSION=18,t.TIZEN_2016_MAJOR_VERSION=2,t.TIZEN_2016_MINOR_VERSION=4,t.TIZEN_2017_MAJOR_VERSION=3,t.TIZEN_2017_MINOR_VERSION=0,t.TIZEN_2018_MAJOR_VERSION=4,t.TIZEN_2018_MINOR_VERSION=0,t.TIZEN_2019_MAJOR_VERSION=5,t.TIZEN_2019_MINOR_VERSION=0,t.TIZEN_2020_MAJOR_VERSION=5,t.TIZEN_2020_MINOR_VERSION=5,t.TIZEN_2022_MAJOR_VERSION=6,t.TIZEN_2022_MINOR_VERSION=5,t.TIZEN_2023_MAJOR_VERSION=7,t.TIZEN_2023_MINOR_VERSION=0,t.TIZEN_2024_MAJOR_VERSION=8,t.TIZEN_2024_MINOR_VERSION=0,t.WEBOS_2016_2017_CHROMIUM_VERSION=38,t.WEBOS_2018_2019_CHROMIUM_VERSION=53,t.WEBOS_2020_CHROMIUM_VERSION=68,t.WEBOS_2021_CHROMIUM_VERSION=79,t.WEBOS_2022_CHROMIUM_VERSION=87,t.isChrome=function(){return navigator.userAgent.includes("Chrome")&&!(0,t.isEdge)()},t.isChromium=function(){return(0,t.isChrome)()||(0,t.isEdge)()&&!r()},t.isFirefox=function(){return navigator.userAgent.includes("Firefox")},t.isFirefoxIOS=function(){return navigator.userAgent.includes("FxiOS")&&(0,t.isIOS)()},t.isSafari=function(){return navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")&&!navigator.userAgent.includes("IEMobile")&&!navigator.userAgent.includes("Edge")&&!(0,t.isTizen)()&&!o()&&!a()&&!(0,t.isWpeWebKit)()||(0,n.isFairPlayDrmSupported)()},t.getSafariVersion=function(){var e=/Version\/(\d+)\.?(\d+)?\.?(\d+)?/.exec(navigator.userAgent)||null;if(!e)return{};var t=e[1],i=e[2],n=e[3],r=function(e){return parseInt(e)};return{major:r(t),minor:r(i),patch:r(n)}},t.isEdge=function(){return/Edge\/\d+/i.test(navigator.userAgent)||/Edg\/\d+/i.test(navigator.userAgent)||/EdgA\/\d+/i.test(navigator.userAgent)||/EdgiOS\/\d+/i.test(navigator.userAgent)},t.getEdgeVersion=function(){var e=/Edge\/(\d+)\.?(\d+)/.exec(navigator.userAgent)||/Edg\/(\d+)\.?(\d+)/.exec(navigator.userAgent)||/EdgA\/(\d+)\.?(\d+)/.exec(navigator.userAgent)||/EdgiOS\/(\d+)\.?(\d+)/.exec(navigator.userAgent);if(!e||0===e.length)return{major:0,minor:0};var t={};return e[1]&&(t.major=parseInt(e[1])),e[1]&&(t.minor=parseInt(e[2])),t};var s,l,c,u,d=function(e,i){var n=(0,t.getTizenVersion)();return n.major===e&&n.minor===i};t.isTizen=function(){return null!=s||(s=navigator.userAgent.includes("Tizen")),s},t.isTizen2019=function(){return d(t.TIZEN_2019_MAJOR_VERSION,t.TIZEN_2019_MINOR_VERSION)},t.isTizen2018=function(){return d(t.TIZEN_2018_MAJOR_VERSION,t.TIZEN_2018_MINOR_VERSION)},t.isTizen2017=function(){return d(t.TIZEN_2017_MAJOR_VERSION,t.TIZEN_2017_MINOR_VERSION)},t.isTizen2016=function(){return d(t.TIZEN_2016_MAJOR_VERSION,t.TIZEN_2016_MINOR_VERSION)},t.isTizen2020=function(){return d(t.TIZEN_2020_MAJOR_VERSION,t.TIZEN_2020_MINOR_VERSION)},t.isTizen2022=function(){return d(t.TIZEN_2022_MAJOR_VERSION,t.TIZEN_2022_MINOR_VERSION)},t.isTizen2023=function(){return d(t.TIZEN_2023_MAJOR_VERSION,t.TIZEN_2023_MINOR_VERSION)},t.isTizen2024=function(){return d(t.TIZEN_2024_MAJOR_VERSION,t.TIZEN_2024_MINOR_VERSION)},t.getTizenVersion=function(){if(void 0===l){var e=/Tizen (\d).(\d)/.exec(navigator.userAgent);l=null!=e&&e[1]?{major:Number(e[1]),minor:Number(e[2]||0)}:{}}return l},t.isVidaa=function(){return navigator.userAgent.includes("VIDAA")},t.getVidaaVersion=function(){var e=new RegExp(/VIDAA\/(\d+)\.?(\d+)/).exec(navigator.userAgent);return null!=e&&e[1]?{major:Number(e[1]),minor:Number(e[2])}:{}}
14,t.isVizio=function(){return navigator.userAgent.includes("VIZIO")},t.isWpeWebKit=function(){return navigator.userAgent.includes("WPE")||navigator.userAgent.includes("Astro")},t.isWebOS=function(){return null!=c||(c=navigator.userAgent.includes("Web0S")||navigator.userAgent.includes("NetCast")),c},t.getWebOsChromiumVersion=function(){var e;if(void 0===u){var t=new RegExp(/Chrome\/(\d+)\.?(\d+)/).exec(navigator.userAgent);if(!(null!=t&&t[1]))return{};u={major:Number(t[1]),minor:Number(null!=(e=t[2])?e:0)}}return u},t.isWebOs2019OrOlder=function(){var e=(0,t.getWebOsChromiumVersion)();return(0,t.isWebOS)()&&(null==e?void 0:e.major)!==void 0&&e.major<=t.WEBOS_2018_2019_CHROMIUM_VERSION},t.isWebOs2016=function(){return(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2016_2017_CHROMIUM_VERSION&&!("requestMediaKeySystemAccess"in navigator)},t.isWebOs2017=function(){return(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2016_2017_CHROMIUM_VERSION&&"requestMediaKeySystemAccess"in navigator},t.isWebOs2020=function(){return(0,t.isWebOS)()&&(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2020_CHROMIUM_VERSION},t.isWebOs2022OrNewer=function(){var e=(0,t.getWebOsChromiumVersion)();return(0,t.isWebOS)()&&(null==e?void 0:e.major)!==void 0&&e.major>=t.WEBOS_2022_CHROMIUM_VERSION},t.isAndroid=function(){return/Android/i.test(navigator.userAgent)},t.isEdgeAndroid=function(){return(0,t.isEdge)()&&(0,t.isAndroid)()},t.isMobile=function(){return/Android/i.test(navigator.userAgent)||/IEMobile/i.test(navigator.userAgent)||/Windows Phone 10.0/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)},t.isIOS=function(){return/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)&&!/Android/i.test(navigator.userAgent)&&!/Windows Phone 10.0/i.test(navigator.userAgent)},t.isSafariIOS=function(){return/Safari/i.test(navigator.userAgent)&&/iP(hone|od|ad)/i.test(navigator.userAgent)},t.getIOSVersion=function(){var e=/OS (\d+)(_\d+)*/.exec(navigator.userAgent);return e&&e.length>0&&parseInt(e[1],10)||0},t.isSafari15orIOS15=function(){return function(){return(0,t.isSafari)()&&(0,t.getSafariVersion)().major===t.SAFARI_15_MAJOR_VERSION}()||function(){return(0,t.isIOS)()&&(0,t.getIOSVersion)()===t.IOS_15}()},t.isSafari17orIOS17=function(){return function(){return(0,t.isSafari)()&&(0,t.getSafariVersion)().major===t.SAFARI_17_MAJOR_VERSION}()||function(){return(0,t.isIOS)()&&(0,t.getIOSVersion)()===t.IOS_17}()},t.isSafariPlatform18orNewer=function(){var e;return!!((0,t.isSafari)()&&(null!=(e=(0,t.getSafariVersion)().major)?e:0)>=t.SAFARI_18_MAJOR_VERSION)||!!((0,t.isIOS)()&&(0,t.getIOSVersion)()>=t.IOS_18)},t.resetPlatformDetectorCache=function(){s=void 0,l=void 0,c=void 0,u=void 0}},28334:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.LEGACY_EDGE_MAX_STARTUP_BUFFER=void 0,t.getPlatformSafeStartupBuffer=function(e,t){if((0,r.isTizen2016)()){var i=t.map(function(e){return n.MimeTypeHelper.getMediaType(e)}).map(function(t){return e.bufferSettings.getForwardTargetLevel(t)});return Math.max.apply(Math,i)}return 0};var n=i(85434),r=i(15487);t.LEGACY_EDGE_MAX_STARTUP_BUFFER=6},92006:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerConfigBuilder=void 0;var r=i(60865),o=i(65567),a=i(15487),s=i(70850);t.PlayerConfigBuilder=function(){function e(e){"string"==typeof e?this.RC={key:e}:(this.RC={},s.Util.deepCopy(this.RC,e))}return e.prototype.optimizeForPlatform=function(e){var t=(e??{}).appId;if((0,a.isTizen)()||(0,a.isWebOS)()){var i=(0,o.getTvDefaultConfig)(t);s.Util.deepCopy(this.RC,i)}return this},e.prototype.enableLowLatency=function(e){var t=(0,r.getLowLatencyDefaultConfig)(e);return s.Util.deepCopy(this.RC,t),this},e.prototype.mergeWith=function(e){return s.Util.deepCopy(this.RC,e),this},e.prototype.build=function(){return n({},this.RC)},e}()}
vendor: 33,958 bytes, line 14
14,72537:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StorageHandler=void 0;var n=i(4081);t.StorageHandler=function(){function e(e){this.ZY=e,this.XY="bitmovinplayer_config",this.data={},this.YY=function(){var e=new Date;return e.setTime(e.getTime()+316224e5),"expires="+e.toUTCString()}(),this.dY()}return e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){this.data[e]=t,this.eY()},e.prototype.setDisabled=function(e){this.disabled=e},e.prototype.aY=function(e){var t=this.bY();if(!t)return"";for(var i=e+"=",n=t.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1);if(0===o.indexOf(i))return o.substring(i.length,o.length)}return""},e.prototype.bY=function(){try{return document.cookie}catch{return""}},e.prototype.cY=function(e){if(e)try{this.data=JSON.parse(e)}catch{}},e.prototype.dY=function(){this.ZY?this.cY(localStorage.getItem(this.XY)):this.cY(this.aY(this.XY))},e.prototype.eY=function(){if(!this.disabled)try{if(this.ZY)localStorage.setItem(this.XY,JSON.stringify(this.data));else{var e=n.default.isSecureContext?"Secure; ":"";document.cookie=this.XY+"="+JSON.stringify(this.data)+"; "+e+"SameSite=Strict; path=/; "+this.YY}}catch{}},e}()},66502:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TextSegmentAnalyzer=void 0;var n=i(74853);t.TextSegmentAnalyzer=function(){function e(){}return e.isPlainTextPayload=function(e){if(!e)return!1;var t=[87,69,66,86,84,84],i=new Uint8Array(e.slice(0,6)),r=new Uint8Array(e.slice(0,9));return n.ArrayHelper.comparePrimitiveArrays(i,new Uint8Array(t))||n.ArrayHelper.comparePrimitiveArrays(r,new Uint8Array([239,187,191].concat(t)))},e.detectEncoding=function(e){for(var t,i=!0,n=[34,85,84,70,45,56,34],r=e instanceof ArrayBuffer?new DataView(e):e,o=0;o<r.byteLength;o++)if((t=r.getUint8(o))>128)i=!1;else{if(0===t)return"utf-16";if(t===n[0]&&r.byteLength>o+n.length){for(var a=!0,s=1;s<n.length;s++)if(n[s]!==r.getUint8(o+s)){a=!1;break}if(a)return"utf-8"}}return i?"ascii":"utf-8"},e}()},89927:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.toSeconds=function(e){return e/i},t.toMilliSeconds=function(e){return e*i};var i=1e3},88844:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.clearTimeoutIfDefined=function(e){e&&n.default.clearTimeout(e)},t.clearIntervalIfDefined=function(e){e&&n.default.clearInterval(e)};var n=i(4081)},23068:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isBoolean=t.isNumber=void 0,t.isDefined=function(e){return null!=e},t.isVideoRepresentation=function(e){return null!=e._height&&null!=e._width},t.isNumber=function(e){return"number"==typeof e},t.isBoolean=function(e){return"boolean"==typeof e}},58313:function(e,t){function i(e,t,i){return e+=t,null!=i&&(e+="="+encodeURIComponent(i)),e}function n(){var e;return(null==(e=window.location)?void 0:e.protocol)||"https:"}function r(e){var t=e.indexOf("//")+2,i=e.indexOf("/",t);return -1===i&&(i=e.indexOf("?",t)),-1===i?e:e.slice(0,i)}Object.defineProperty(t,"__esModule",{value:!0}),t.URLHelper=void 0,t.extractOrigin=r,t.removeQueryParameters=function(e,t){var i=e.split("?"),n=i[0],r=i[1];if(!r)return e;var o=r.split("&").filter(function(e){var i=e.split("=")[0];return!t.includes(i)}).join("&");return o?"".concat(n,"?").concat(o):n},t.URLHelper=function(){function e(){}return e.isUrlAbsolute=function(t){return!!t&&("string"!=typeof t&&(t=e.urlObjectToString(t)),!!e.isDataUri(t)||e.ABSOLUTE_URL_REGEX.test(t))},e.removeUrlParameters=function(e){return e.indexOf("?")>-1&&(e=e.split("?")[0]),e},e.urlObjectToString=function(e){return e&&"string"!=typeof e?!function(e){return e&&"string"==typeof e.__text}(e)?!function(e){return e&&"string"==typeof e.url}(e)?null:e.url:e.__text:e},e.concatUrlParts=function(t,i){var n="/",o=e.urlObjectToString(t),a=e.urlObjectToString(i);return!o||o.length<1||e.isUrlAbsolute(a)?a:!a||a.length<1?o:((o=e.removeUrlParameters(o)).indexOf("/")>-1&&(o=o.substring(0,o.lastIndexOf("/"))),"/"===a[0]&&(o=r(o),n=""),o+n+a)},e.removeLastPathPart=function(t){if(!t)return null;t=e.removeUrlParameters(t);var i=e.getProtocolOffset(t),n=t.lastIndexOf("/");return n===t.length-1&&(t=t.substring(0,n)),(n=t.lastIndexOf("/"))<0?"":n>t.length-1?t:n<=i?t+"/":t.substring(0,n+1)},e.isRootRelativeUrl=function(e){return!!(e&&e.length>0)&&"/"===e[0]},e.getProtocolOffset=function(e){var t=e.indexOf("://");return t>-1?t+3:2*(-1===t&&0===e.indexOf("//"))},e.replaceCdn=function(e,t){var i=r(e),n=r(t);return e.replace(i,n)},e.isSubUrl=function(e,t){return!(!e||!t)&&(0===t.indexOf("../")&&(t=t.substring(3)),e.indexOf(t)>-1)},e.concatBaseUrlWithPartial=function(t,i){return e.isUrlAbsolute(i)?(i.startsWith("/")&&(i=(function(e){return e.substring(0,e.indexOf("//"))}(t)||n())+i),i):(t=this.toFullUrl(t),i&&0!==i.length?e.isRootRelativeUrl(i)?r(t)+i:(t.endsWith("/")||(t=this.removeLastPathPart(t)),t+i):t)},e.appendQueryParametersToUrl=function(e,t){if(!t||0===Object.keys(t).length)return e;var n="",r=e.indexOf("?")>=0;for(var o in t)t.hasOwnProperty(o)&&(n+=r?"&":"?",r=!0,n=i(n,o,t[o]));return e+n},e.toFullUrl=function(t){if(e.isDataUri(t)||!t.includes("//"))return t;var i=t.startsWith("//")?n()+t:t;return t.split("//")[1].includes("/")||(i+="/"),i},e.isDataUri=function(e){return e&&0===e.indexOf(this.DATA_URI_PROTOCOL)},e.parseDataUri=function(e){if(!this.isDataUri(e))throw Error("Invalid data uri: "+e);-1===(e=e.substring(this.DATA_URI_PROTOCOL.length)).indexOf(this.COMMA_CHARACTER)&&(e=this.DATA_URI_DEFAULT_MEDIA_TYPE+this.COMMA_CHARACTER+e);var t=e.split(this.COMMA_CHARACTER),i=t[0],n=t[1],r=i.endsWith(this.DATA_URI_BASE64_MARKER),o=i.length-this.DATA_URI_BASE64_MARKER.length-this.COMMA_CHARACTER.length;return{mediaType:r?i.substring(0,o):i,base64:r?n:void 0,data:r?atob(n):n}},e.buildAbsoluteUrl=function(t,i,n){return e.isUrlAbsolute(n)?n:e.isRootRelativeUrl(n)?i+n:t+n},e.getAbsoluteUrl=function(t,i){return e.isUrlAbsolute(t)?t:e.concatBaseUrlWithPartial(i,t)},e.removeDotSegments=function(t){for(var i=e.isUrlAbsolute(t)?r(t):"",n=[],o=0,a=t.substring(i.length).split("/");o<a.length;o++){var s=a[o];if(".."===s){if(0===n.length)return t;n.pop()}else"."!==s&&n.push(s)}return i+n.join("/")},e.DATA_URI_PROTOCOL="data:",e.DATA_URI_BASE64_MARKER="base64",e.DATA_URI_DEFAULT_MEDIA_TYPE="text/plain;charset=US-ASCII",e.ABSOLUTE_URL_REGEX=RegExp("^(?:[a-z]+:)?//","i"),e.COMMA_CHARACTER=",",e}()},70850:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0,t.parseAspectRatio=function(e){if(!e)return 0;if((e=String(e).replace(",",".")).indexOf(":")>-1)t=e.split(":");else{if(!(e.indexOf("/")>-1))return isNaN(parseFloat(e))?0:parseFloat(e);t=e.split("/")}if(t&&Array.isArray(t)&&t.length>1){var t,i=parseFloat(t[0])/parseFloat(t[1]);return isNaN(i)?0:i}return 0},t.removeDuplicates=function(e){return e.filter(function(e,t,i){return t===i.findIndex(function(t){return u.deepEqual(t,e)})})},t.safeUserCallback=function(e,t){if(!u.isFunction(e))return null;try{return e()}catch(e){return t&&t.warn("Exception in userCallback",e),null}};var r=i(56481),o=i(70962),a=i(19274),s=i(26225),l=i(57387),c=i(89927),u=function(){function e(){}return e.deepEqual=function(t,i){if(t===i)return!0;if(!t||"object"!=typeof t||!i||"object"!=typeof i||Object.keys(t).length!==Object.keys(i).length)return!1;for(var n in t)if(!i.hasOwnProperty(n)||!e.deepEqual(t[n],i[n]))return!1;return!0},e.deepCopy=function(t,i){var n=void 0!==window.ArrayBuffer;for(var r in i)i.hasOwnProperty(r)&&(n&&i[r]instanceof ArrayBuffer?t[r]=i[r].slice(0,i[r].byteLength):"object"==typeof i[r]&&null!==i[r]?(t.hasOwnProperty(r)||(Array.isArray(i[r])?t[r]=[]:t[r]={}),e.deepCopy(t[r],i[r])):t[r]=i[r])},e.deepCopyMulti=function(e){for(var t=this,i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];return i.forEach(function(i){return t.deepCopy(e,i)}),e},e.isFunction=function(e){return!!e&&"[object Function]"===({}).toString.call(e)},e.extractBitrateFromString=function(e,t){return isNaN(t)?(t=t.toLowerCase().trim().replace(/,/g,".")).indexOf("mbps")>-1?1e6*t.split("m")[0]:t.indexOf("kbps")>-1?1e3*t.split("k")[0]:t.indexOf("bps")>-1?+t.split("b")[0]:"max"===e?1/0:0:t===1/0?t:+t},e.splitPlayerAndStreamingTechnology=function(e){if(e&&"string"==typeof e){for(var t=e.split("."),i=0,n=0;n<e.length;n++)""===t[n]&&(t[n]=null,i++);return i===e.length?null:{player:t[0],streaming:t[1]}}return null},e.createVRAudioElement=function(){var t=document.createElement("source");t.setAttribute("type","audio/mp3"),t.setAttribute("src","data:audio/mpeg;base64,/+MYxAAAAANIAUAAAASEEB/jwOFM/0MM/90b/+RhST//w4NFwOjf///PZu////9lns5GFDv//l9GlUIEEIAAAgIg8Ir/JGq3/+MYxDsLIj5QMYcoAP0dv9HIjUcH//yYSg+CIbkGP//8w0bLVjUP///3Z0x5QCAv/yLjwtGKTEFNRTMuOTeqqqqqqqqqqqqq/+MYxEkNmdJkUYc4AKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq");var i={settings:o.DefaultSettings};for(e.vrAudioElement=e.vrAudioElement||new s.MediaElementWrapper(i,document.createElement("audio")),e.vrAudioElement.setAttribute("id","bitmovinplayer-audio"),e.vrAudioElement.addEventListener(a.MediaElementEvent.playing,function(){return e.vrAudioElement.bit_wasPlayCalled=!0}),e.vrAudioElement.setAttribute("crossorigin","anonymous"),e.vrAudioElement.hasAttribute("src")&&e.vrAudioElement.removeAttribute("src");e.vrAudioElement.firstChild;)e.vrAudioElement.removeChild(e.vrAudioElement.firstChild);e.vrAudioElement.load()},e.getVRAudioElement=function(){return e.vrAudioElement||e.createVRAudioElement(),e.vrAudioElement},e.removeVRAudioElement=function(){if(e.vrAudioElement){var t=e.vrAudioElement.getWrappedElement();e.vrAudioElement=(0,r.dispose)(e.vrAudioElement),t.parentNode&&t.parentNode.removeChild(t)}},e.isFullscreen=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.webkitCurrentFullScreenElement},e.generateUniqueId=function(){return Date.now().toString(16)+Math.floor(1048576*(1+Math.random())).toString(16).substring(1)},e.getUtcDate=function(t){var i=null;return"string"!=typeof t&&isNaN(t)||(i=new Date("string"==typeof t?e.timeZoneRegex.test(t)?t:t+"Z":t)),i},e.delay=function(e,t){return new Promise(function(i){setTimeout(function(){"function"==typeof t?i(t()):i()},e)})},e.timeInSeconds=function(e){return(0,c.toSeconds)(e.getTime())},e.toHash=function(e){var t=new WeakMap,i=JSON.stringify(e,function e(i,n){if(null==n)return n;if("function"==typeof n)return n.toString().replace(/\n|\s\s/g,"");if(n instanceof ArrayBuffer)return String.fromCharCode.apply(null,new Uint8Array(n.slice(0,20)));if(n instanceof Uint8Array)return String.fromCharCode.apply(null,n.slice(0,20));if("object"==typeof n&&!Array.isArray(n)){if(t.has(n)){var r=JSON.stringify(Object.keys(n),e);return"[Object ".concat(Math.abs((0,l.calcHash)(r)).toString(16),"]")}t.set(n,!0)}return n});return(0x10000000|Math.abs((0,l.calcHash)(i))).toString(16)},e.roundValue=function(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i},e.arrayMove=function(e,t,i){var r=n([],e,!0),o=r[t];return r.splice(t,1),r.splice(i,0,o),r},e.vrAudioElement=null,e.timeZoneRegex=/(?:Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])$/,e}();t.Util=u},57387:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calcHash=function(e){return(n.ModuleManager.has(r.ModuleName.Subtitles)?n.ModuleManager.get(r.ModuleName.Subtitles).hashCode:o)(e)};var n=i(88052),r=i(62756);function o(e){var t=0;if(0===e.length)return t;for(var i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i)|0;return t}},78877:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getBufferEndSafetyMargin=function(e){var t=(0,r.getCapabilities)(),i=t.isChromium,l=t.isChrome,c=t.isVizio,u=t.isWebOS,d=t.isPlayStation4;if(u||c||(0,o.isTizen2018)()||(0,o.isTizen2019)()||d)return s;var h=(null==e?void 0:e.usedKeySystem.kind)===n.KeySystemKind.PLAYREADY;return i&&!l&&h?s:a};var n=i(33468),r=i(21513),o=i(15487),a=.25,s=1.25},4081:function(e,t){var i;function n(e){return"Math"in e&&e.Math===Math}Object.defineProperty(t,"__esModule",{value:!0}),t.default=null!=(i=function(){return"object"==typeof window&&window&&n(window)?window:void 0}())?i:function(){return"object"==typeof self&&self&&n(self)?self:void 0}()},2992:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.rewriteMp4BoxType=function(e,t){t.split("").slice(0,n).forEach(function(t,n){return e._raw.setUint8(i+n,t.charCodeAt(0))})};var i=4,n=4},60877:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldResetCurrentTimeAfterBufferUnderrun=function(){var e=(0,r.getCapabilities)();return e.isWebOS?e[n.CapabilityKey.webOSChromiumVersion]===o.WEBOS_2020_CHROMIUM_VERSION:e.isChromium};var n=i(7387),r=i(21513),o=i(15487)},17891:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createResizeObserver=function(e,t){var i=["style","width","height","class"],n=function(){return t(e.clientWidth,e.clientHeight)},r=new MutationObserver(n);return{observe:function(){r.observe(e,{attributes:!0,attributeFilter:i,childList:!1,subtree:!0}),window.addEventListener("resize",n)},dispose:function(){r.disconnect(),window.removeEventListener("resize",n)}}}},2079:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewModeHandler=void 0;var n=i(56481),r=i(3714),o=i(44468),a=i(23690),s=i(87827),l=i(93204),c=i(19274),u=i(17891),d=["","webkit","moz","ms","o"],h=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","webkitbeginfullscreen","webkitendfullscreen"];function p(e,t){return d.some(function(i){var n=t;return""!==i&&(n="".concat(i).concat(t.substring(0,1).toUpperCase()).concat(t.substring(1))),"function"==typeof e[n]&&(e[n](),!0)})}function f(){var e,t,i;return null!=(i=null!=(t=null!=(e=document.fullscreenElement)?e:document.mozFullScreenElement)?t:document.webkitFullscreenElement)?i:null}t.ViewModeHandler=function(){function e(e,t,i,n){var s=this;this.currentPlayer=e,this.container=t,this.eventDispatcher=i,this.shouldForceLegacyFullscreen=n,this.OZ=!1,this.width=0,this.height=0,this.a0=function(e){return s.currentPlayer.context.store.dispatch(e)},this.b0=function(e,t){e===s.width&&t===s.height||(s.width=e,s.height=t,s.eventDispatcher(r.PlayerEvent.PlayerResized,{width:"".concat(s.width,"px"),height:"".concat(s.height,"px")}),s.currentPlayer.adController&&"function"==typeof s.currentPlayer.adController.onPlayerResize&&s.currentPlayer.adController.onPlayerResize(s.width,s.height))},this.c0=function(e,t){var i={from:t.viewMode,to:e.viewMode,legacy:s.shouldForceLegacyFullscreen()};s.h0()&&(e.viewMode===o.ViewMode.Fullscreen?(s.currentPlayer.bitdashPlayer.onFullscreenEnter(i),s.width=0,s.height=0):t.viewMode===o.ViewMode.Fullscreen&&s.currentPlayer.bitdashPlayer.onFullscreenExit()),s.eventDispatcher(r.PlayerEvent.ViewModeChanged,i)},this.m0=function(){s.a0((0,a.setPlayerViewMode)(o.ViewMode.PictureInPicture))},this.n0=function(){s.a0((0,a.setPlayerViewMode)(o.ViewMode.Inline))},this.t0=function(e){s.isFullscreen()&&e.type===s.PZ?(s.PZ=void 0,s.s0()):(s.OZ||s.o0())&&!s.PZ&&(s.PZ=e.type,s.r0())},this.MZ=(0,u.createResizeObserver)(this.currentPlayer.container,this.b0),this.MZ.observe(),this.d0(),this.f0(),this.g0()}return e.prototype.d0=function(){this.NZ=(0,l.subscribe)(this.currentPlayer.context.store)(function(e){return(0,s.getPlayerState)(e)},this.c0,function(e,t){return e.viewMode!==t.viewMode})},e.prototype.e0=function(){return(0,s.getPlayerState)(this.currentPlayer.context.store.getState()).viewMode},e.prototype.f0=function(){var e=this;h.forEach(function(t){return document.addEventListener(t,e.t0)}),this.o0()&&(this.a0((0,a.setPlayerViewMode)(o.ViewMode.Fullscreen)),this.q0(!0))},e.prototype.g0=function(){this.currentPlayer.videoElement&&(this.currentPlayer.videoElement.addEventListener(c.MediaElementEvent.enterpictureinpicture,this.m0),this.currentPlayer.videoElement.addEventListener(c.MediaElementEvent.leavepictureinpicture,this.n0))},e.prototype.h0=function(){return!!this.currentPlayer&&!!this.currentPlayer.bitdashPlayer},e.prototype.i0=function(){return this.h0()&&!!this.currentPlayer.videoElement&&this.currentPlayer.videoElement.isPictureInPictureAvailable()},e.prototype.j0=function(){return this.currentPlayer.videoElement.isPictureInPicture()},e.prototype.isViewModeAvailable=function(e){return e===o.ViewMode.PictureInPicture?this.i0():[o.ViewMode.Fullscreen,o.ViewMode.Inline].includes(e)},e.prototype.k0=function(){this.h0()&&this.currentPlayer.videoElement&&(this.currentPlayer.videoElement.exitPictureInPicture(),this.a0((0,a.setPlayerViewMode)(o.ViewMode.Inline)))},e.prototype.l0=function(){var e;null==(e=this.currentPlayer.videoElement)||e.enterPictureInPicture(),this.a0((0,a.setPlayerViewMode)(o.ViewMode.PictureInPicture))},e.prototype.o0=function(){var e=f();return e&&this.currentPlayer.videoElement.getWrappedElement()===e},e.prototype.p0=function(){return this.shouldForceLegacyFullscreen()?"data-legacy-fullscreen":"data-fullscreen"},e.prototype.q0=function(e){var t=this.p0();this.container.setAttribute(t,String(e))},e.prototype.r0=function(){this.q0(!0),this.OZ=!1,this.a0((0,a.setPlayerViewMode)(o.ViewMode.Fullscreen))},e.prototype.s0=function(){this.q0(!1),this.OZ=!1,this.e0()===o.ViewMode.Fullscreen&&this.a0((0,a.setPlayerViewMode)(o.ViewMode.Inline))},e.prototype.isFullscreen=function(){return this.e0()===o.ViewMode.Fullscreen||"true"===this.container.getAttribute(this.p0())},e.prototype.u0=function(e){if(void 0===e&&(e=this.container),f())this.currentPlayer.context.logger.debug("cannot enter fullscreen, another element is already fullscreen");else if(this.shouldForceLegacyFullscreen())this.r0();else{var t=p(e,"requestFullscreen");t?this.OZ=!0:!t&&this.currentPlayer.videoElement.webkitEnterFullScreen&&(this.OZ=!0,this.currentPlayer.videoElement.webkitEnterFullScreen())}},e.prototype.v0=function(){if(this.shouldForceLegacyFullscreen())this.s0();else{var e=p(window.document,"exitFullscreen");e?this.OZ=!0:!e&&this.currentPlayer.videoElement.webkitExitFullscreen&&(this.OZ=!0,this.currentPlayer.videoElement.webkitExitFullscreen())}},e.prototype.w0=function(){var e=this.e0();this.isFullscreen()?this.v0():(e===o.ViewMode.PictureInPicture||this.j0())&&this.k0()},e.prototype.x0=function(e,t){e!==o.ViewMode.Fullscreen?e===o.ViewMode.PictureInPicture&&this.l0():this.u0(t.fullscreenElement)},e.prototype.setViewMode=function(e,t){void 0===t&&(t={}),e!==this.e0()&&(this.w0(),this.isViewModeAvailable(e)&&this.x0(e,t))},e.prototype.dispose=function(){var e,t,i=this;this.MZ=(0,n.dispose)(this.MZ),h.forEach(function(e){return document.removeEventListener(e,i.t0)}),null==(e=this.currentPlayer.videoElement)||e.removeEventListener(c.MediaElementEvent.enterpictureinpicture,this.m0),null==(t=this.currentPlayer.videoElement)||t.removeEventListener(c.MediaElementEvent.leavepictureinpicture,this.n0),this.NZ()},e}()},46057:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.yieldToMain=function(){return new Promise(function(e){window.setTimeout(e)})}},19274:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MediaElementEvent=void 0,function(e){e.abort="abort",e.canplay="canplay",e.canplaythrough="canplaythrough",e.durationchange="durationchange",e.emptied="emptied",e.encrypted="encrypted",e.ended="ended",e.error="error",e.loadeddata="loadeddata",e.loadedmetadata="loadedmetadata",e.loadstart="loadstart",e.pause="pause",e.play="play",e.playing="playing",e.progress="progress",e.ratechange="ratechange",e.seeked="seeked",e.seeking="seeking",e.stalled="stalled",e.suspend="suspend",e.timeupdate="timeupdate",e.volumechange="volumechange",e.waiting="waiting",e.waitingforkey="waitingforkey",e.currenttimenotadvancing="currenttimenotadvancing",e.primestart="primestart",e.msneedkey="msneedkey",e.enterpictureinpicture="enterpictureinpicture",e.leavepictureinpicture="leavepictureinpicture",e.webkitkeymessage="webkitkeymessage",e.webkitneedkey="webkitneedkey",e.webkitkeyerror="webkitkeyerror",e.webkitkeyadded="webkitkeyadded",e.webkitplaybacktargetavailabilitychanged="webkitplaybacktargetavailabilitychanged",e.webkitpresentationmodechanged="webkitpresentationmodechanged",e.webkitcurrentplaybacktargetiswirelesschanged="webkitcurrentplaybacktargetiswirelesschanged"}(i||(t.MediaElementEvent=i={}))},96556:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MediaElementEventHandler=void 0;var n=i(13531),r=i(4081),o=i(88844),a=i(70850),s=i(19274);t.MediaElementEventHandler=function(){function e(t,i){var n=this;this.handleVideoElementErrorEvent=function(t){if(n.Aab(t.type,t),!n.shouldSuppressEvent(t)){if(n.tab.error){t.errorObject={code:n.tab.error.code};var i=e.getMediaErrorName(n.tab.error.code);i&&(t.errorObject.mediaError=i),"msExtendedCode"in n.tab.error&&n.tab.error.msExtendedCode&&(t.errorObject.systemCode=n.tab.error.msExtendedCode.toString(16)),n.tab.error.message&&(t.errorObject.message=n.tab.error.message),t.errorMessage=Object.keys(t.errorObject).map(function(e){return e+": "+t.errorObject[e]}).join(", ")}else t.errorMessage="Video element triggered an Error, but has no error object.";n.callAllHandlers(t)}},this.handleVideoElementEvent=function(e){n.Aab(e.type),n.shouldSuppressEvent(e)||n.callAllHandlers(e)},this.sab=t,this.tab=i,this.uab={},this.vab={},this.wab=[],this.xab=!1,this.yab=!1,this.attachVideoEventHandlers()}return Object.defineProperty(e.prototype,"isAd",{get:function(){return this.xab},set:function(e){this.xab=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPriming",{get:function(){return this.yab},set:function(e){this.yab=e},enumerable:!1,configurable:!0}),e.prototype.suppressEvent=function(e,t,i){var n=this;if(void 0===t&&(t=1e8),this.vab[e]=this.vab[e]||0,this.vab[e]+=t,i&&i>0){var r=window.setTimeout(function(){n.vab[e]=Math.max(n.vab[e]-t,0),n.wab.splice(n.wab.indexOf(r),1)},i);this.wab.push(r)}},e.prototype.clearEventSuppression=function(e){this.vab[e]&&(this.vab[e]=0)},e.prototype.zab=function(){var e=this;Object.keys(this.vab).forEach(function(t){return e.clearEventSuppression(t)}),this.wab.forEach(function(e){return(0,o.clearTimeoutIfDefined)(e)})},e.prototype.triggerEvent=function(e,t){void 0===t&&(t={type:e}),e===s.MediaElementEvent.error?this.handleVideoElementErrorEvent(t):this.handleVideoElementEvent(t)},e.prototype.attachVideoEventHandlers=function(){var e=this;Object.keys(s.MediaElementEvent).forEach(function(t){t===s.MediaElementEvent.error?e.tab.addEventListener(s.MediaElementEvent.error,e.handleVideoElementErrorEvent):e.tab.addEventListener(t,e.handleVideoElementEvent)})},e.prototype.removeVideoEventHandlers=function(){var e=this;Object.keys(s.MediaElementEvent).forEach(function(t){e.tab.removeEventListener(t,e.handleVideoElementEvent)}),this.tab.removeEventListener(s.MediaElementEvent.error,this.handleVideoElementErrorEvent)},e.prototype.shouldSuppressEvent=function(t){return!!this.isAd||!(!this.isPriming||!e.PRIME_RELATED_EVENTS.includes(t.type))||this.vab[t.type]>0&&(this.vab[t.type]--,!0)},e.prototype.Aab=function(e,t){var i,r;if(null!=(r=null==(i=this.sab)?void 0:i.logger)&&r.isLevelEnabled(n.LogLevel.DEBUG)){var o=this.sab.logger,a="[MediaElementEvent] ".concat(e);this.sab.settings.ENABLE_MEDIA_ELEMENT_EVENT_LOGS?t?o.debug(a,t):o.debug(a):o.isLevelEnabled(n.LogLevel.INSANE)&&(t?o.insane(a,t):o.insane(a))}},e.prototype.callAllHandlers=function(e){var t=this;this.uab[e.type]&&this.uab[e.type].forEach(function(i){t.Bab(i,e)})},e.prototype.Bab=function(e,t){var i=e.eventModification?e.eventModification(t):t;e.eventHandler.handleEvent?e.eventHandler.handleEvent(i):"function"==typeof e.eventHandler?e.eventHandler(i):this.sab.logger.debug("Encountered unknown event handler for "+t.type+": ",e.eventHandler)},e.prototype.addEventListener=function(e,t,i){this.uab[e]=this.uab[e]||[],this.uab[e].push(new l(t,i))},e.prototype.hasEventHandler=function(e,t){return!!this.uab[e]&&null!=this.uab[e].find(function(e){return e.eventHandler===t})},e.prototype.removeEventListener=function(e,t){this.uab[e]&&(this.uab[e]=this.uab[e].filter(function(e){return e.eventHandler!==t}))},e.prototype.reset=function(){this.zab()},e.prototype.dispose=function(){this.reset(),this.removeVideoEventHandlers(),this.uab=null},e.getMediaErrorName=function(e){if("MediaError"in r.default){for(var t in MediaError)if(t.indexOf("MEDIA_ERR_")>-1&&MediaError[t]===e)return t}return null},e.PRIME_RELATED_EVENTS=[s.MediaElementEvent.play,s.MediaElementEvent.playing,s.MediaElementEvent.pause,s.MediaElementEvent.timeupdate],e}();var l=function(){return function(e,t){this.eventHandler=e,t&&a.Util.isFunction(t)&&(this.eventModification=t)}}()},26225:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MediaElementWrapper=void 0;var r=i(56481),o=i(13531),a=i(51072),s=i(88844),l=i(19274),c=i(96556),u=i(97583);t.MediaElementWrapper=function(){function e(e,t){this.element=t,this.context=e,this.mediaElementEventHandler=new c.MediaElementEventHandler(e,t),this.nativeMediaEventListener=new u.NativeMediaEventListener(e,this),this.drmHandler=null}return Object.defineProperty(e.prototype,"audioTracks",{get:function(){return this.element.audioTracks},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this.element.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentSrc",{get:function(){return this.element.currentSrc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this.element.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this.element.ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"error",{get:function(){return this.element.error},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaKeys",{get:function(){return this.element.mediaKeys},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"msKeys",{get:function(){return this.element.msKeys},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this.element.paused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"networkState",{get:function(){return this.element.networkState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"played",{get:function(){return this.element.played},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this.element.readyState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seekable",{get:function(){return this.element.seekable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seeking",{get:function(){return this.element.seeking},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this.element&&this.element.style},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textTracks",{get:function(){return this.element.textTracks},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"videoTracks",{get:function(){return this.element.videoTracks},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.element.firstChild},enumerable:!1,configurable:!0}),e.prototype.SU=function(e){for(var t,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];this.context.settings.ENABLE_MEDIA_ELEMENT_ACTION_LOGS&&this.context.logger.isLevelEnabled(o.LogLevel.DEBUG)&&(t=this.context.logger).debug.apply(t,n(["[MediaElementAction] ".concat(e)],i,!1))},Object.defineProperty(e.prototype,"autoplay",{get:function(){return this.element.autoplay},set:function(e){this.SU("set 'autoplay'",e),this.element.autoplay=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controls",{get:function(){return this.element.controls},set:function(e){this.SU("set 'controls'",e),this.element.controls=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"crossOrigin",{get:function(){return this.element.crossOrigin},set:function(e){this.SU("set 'crossOrigin'",e),this.element.crossOrigin=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){var e,t;return null!=(t=null==(e=this.element)?void 0:e.currentTime)?t:0},set:function(e){this.SU("set 'currentTime'",e),this.element.currentTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"innerHTML",{get:function(){return this.element.innerHTML},set:function(e){this.element.innerHTML=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this.context.settings.ENABLE_MUTED_BACKGROUND_PLAYBACK?this.element&&0===this.element.volume:this.element&&this.element.muted},set:function(e){if(this.context.settings.ENABLE_MUTED_BACKGROUND_PLAYBACK){if(e){var t=this.volume;this.volume=0,this.nativeMediaEventListener.lastKnownState.volume=t}else this.volume=this.nativeMediaEventListener.lastKnownState.volume;this.SU("set 'muted'",!1),this.nativeMediaEventListener.lastKnownState.muted=e,this.element.muted=!1}else this.SU("set 'muted'",e),this.nativeMediaEventListener.lastKnownState.muted=e,this.element.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"preload",{get:function(){return this.element.preload},set:function(e){this.SU("set 'preload'",e),this.element.preload=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"src",{get:function(){return this.element.src},set:function(e){this.SU("set 'src'",e),this.nativeMediaEventListener.reset(),this.element.src=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"srcObject",{get:function(){return this.element.srcObject},set:function(e){this.SU("set 'srcObject'",e),this.nativeMediaEventListener.reset(),this.element.srcObject=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this.element.playbackRate},set:function(e){this.SU("set 'playbackRate'",e);try{this.element.playbackRate=e}catch{this.context.logger.log("Browser rejected to set playback rate to "+e)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){var e;return(null==(e=this.nativeMediaEventListener)?void 0:e.lastKnownState.muted)===!0&&this.context.settings.ENABLE_MUTED_BACKGROUND_PLAYBACK?this.nativeMediaEventListener.lastKnownState.volume:this.element.volume},set:function(e){this.SU("set 'volume'",e),this.nativeMediaEventListener.lastKnownState.volume=e,this.element.volume=e},enumerable:!1,configurable:!0}),e.prototype.addTextTrack=function(e,t,i){return this.SU("addTextTrack()",e,t,i),this.element.addTextTrack(e,t,i)},e.prototype.canPlayType=function(e,t){return this.element.canPlayType(e,t)},e.prototype.load=function(){this.SU("load()"),this.element.load()},e.prototype.pause=function(){this.SU("pause()"),this.element&&this.element.pause()},e.prototype.play=function(){return this.internalPlay()},e.prototype.internalPlay=function(){return this.SU("play()"),this.element.play()||a.PlayPromise.new(this.context,this,this.drmHandler)},e.prototype.prime=function(){var e=this;this.SU("prime()");var t=function(t){e.mediaElementEventHandler&&(e.mediaElementEventHandler.isPriming=t)};return t(!0),this.mediaElementEventHandler.triggerEvent(l.MediaElementEvent.primestart),this.internalPrime().then(function(){t(!1)})},e.prototype.internalPrime=function(){this.internalPlay().catch(function(){}),this.pause();var e=this.getWrappedElement();return new Promise(function(t){var i=window.setTimeout(function(){e.removeEventListener(l.MediaElementEvent.pause,n),t()},100),n=function(){(0,s.clearTimeoutIfDefined)(i),e.removeEventListener(l.MediaElementEvent.pause,n),t()};e.addEventListener(l.MediaElementEvent.pause,n)})},e.prototype.setMediaKeys=function(e){return this.SU("setMediaKeys()",e),this.element&&this.element.setMediaKeys(e)||Promise.resolve()},e.prototype.msSetMediaKeys=function(e){return this.SU("msSetMediaKeys()",e),this.element&&this.element.msSetMediaKeys(e)},e.prototype.msSetMediaProtectionManager=function(e){this.SU("msSetMediaProtectionManager()",e),this.element.msSetMediaProtectionManager(e)},e.prototype.getAttribute=function(e){return this.element.getAttribute(e)},e.prototype.setAttribute=function(e,t){this.SU("setAttribute()",e,t),this.element.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this.SU("removeAttribute()",e),this.element.removeAttribute(e)},e.prototype.hasAttribute=function(e){return this.element.hasAttribute(e)},e.prototype.appendChild=function(e){this.element.appendChild(e)},e.prototype.removeChild=function(e){return this.element.removeChild(e)},e.prototype.getElementsByTagName=function(e){return this.element.getElementsByTagName(e)},e.prototype.addEventListener=function(e,t,i){this.mediaElementEventHandler.addEventListener(e,t,i)},e.prototype.removeEventListener=function(e,t){this.mediaElementEventHandler&&this.mediaElementEventHandler.removeEventListener(e,t)},Object.defineProperty(e.prototype,"eventHandler",{get:function(){return this.mediaElementEventHandler},enumerable:!1,configurable:!0}),e.prototype.getWrappedElement=function(){return this.element},e.prototype.dispose=function(){this.mediaElementEventHandler=(0,r.dispose)(this.mediaElementEventHandler),this.nativeMediaEventListener=(0,r.dispose)(this.nativeMediaEventListener),this.drmHandler=null,this.element=null,this.context.logger&&this.context.logger.debug("Disposed wrapped element")},e}()}
14,97583:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.NativeMediaEventListener=void 0;var n=i(80813),r=i(3714),o=i(94685),a=i(19274);t.NativeMediaEventListener=function(){function e(e,t){var i,o,a,s,l,c,u=this;this.context=e,this.Eab=function(){var e=u.Cab.volume,t=u.Cab.muted;u.lastKnownState.muted!==t&&(t?u.Hab(r.PlayerEvent.Muted,{issuer:"media-element"}):u.Hab(r.PlayerEvent.Unmuted,{issuer:"media-element"}),u.lastKnownState.muted=t),u.lastKnownState.volume!==e&&(u.Hab(r.PlayerEvent.VolumeChanged,{issuer:"media-element",targetVolume:100*e,sourceVolume:100*u.lastKnownState.volume}),u.lastKnownState.volume=e)},this.Fab=function(){var e=u.Cab.playbackRate;u.context.serviceManager.maybeCall(n.ServiceName.PlayerStateService,function(t){t.playbackSpeed!==e&&t.setPlaybackSpeed(e)})},this.Gab=function(){u.lastKnownState.canPlay||(u.lastKnownState.canPlay=!0,u.Hab(r.PlayerEvent.Ready))},this.Cab=t,this.lastKnownState={muted:null!=(a=null==(o=null==(i=e.config)?void 0:i.playback)?void 0:o.muted)?a:t.muted,volume:null!=(c=null==(l=null==(s=e.config)?void 0:s.playback)?void 0:l.volume)?c:t.volume,playbackRate:t.playbackRate,canPlay:!1},this.Dab()}return e.prototype.Dab=function(){this.Cab.addEventListener(a.MediaElementEvent.volumechange,this.Eab),this.Cab.addEventListener(a.MediaElementEvent.canplay,this.Gab),this.Cab.addEventListener(a.MediaElementEvent.ratechange,this.Fab)},e.prototype.Hab=function(e,t){(0,o.isContextAvailable)(this.context)&&this.context.eventHandler&&this.context.eventHandler.dispatchEvent(e,t)},e.prototype.Iab=function(){this.Cab.removeEventListener(a.MediaElementEvent.volumechange,this.Eab),this.Cab.removeEventListener(a.MediaElementEvent.canplay,this.Gab),this.Cab.removeEventListener(a.MediaElementEvent.ratechange,this.Fab)},e.prototype.reset=function(){this.lastKnownState.canPlay=!1},e.prototype.dispose=function(){this.Iab()},e}()},79186:function(e,t,i){var n,r=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.VideoElementWrapper=void 0;var o,a=i(44468),s=i(26225);!function(e){e.Inline="inline",e.PictureInPicture="picture-in-picture",e.Fullscreen="fullscreen"}(o||(o={}));var l=((n={})[o.Inline]=a.ViewMode.Inline,n[o.PictureInPicture]=a.ViewMode.PictureInPicture,n[o.Fullscreen]=a.ViewMode.Fullscreen,n);t.VideoElementWrapper=function(e){function t(t,i){return e.call(this,t,i)||this}return r(t,e),Object.defineProperty(t.prototype,"droppedVideoFrames",{get:function(){var e,t;return null!=(t=null!=(e=this.element.droppedVideoFrames)?e:this.element.webkitDroppedFrameCount)?t:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoWidth",{get:function(){return this.element&&this.element.videoWidth||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoHeight",{get:function(){return this.element&&this.element.videoHeight||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"webkitKeys",{get:function(){return this.element.webkitKeys},enumerable:!1,configurable:!0}),t.prototype.webkitGenerateKeyRequest=function(e,t){this.element.webkitGenerateKeyRequest(e,t)},Object.defineProperty(t.prototype,"width",{get:function(){return this.element.width},set:function(e){this.element.width=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.element.height},set:function(e){this.element.height=e},enumerable:!1,configurable:!0}),t.prototype.webkitAddKey=function(e,t,i,n){this.element.webkitAddKey(e,t,i,n)},t.prototype.webkitEnterFullScreen=function(){this.element.webkitEnterFullScreen()},t.prototype.webkitExitFullscreen=function(){this.element.webkitExitFullscreen()},t.prototype.webkitShowPlaybackTargetPicker=function(){return this.element.webkitShowPlaybackTargetPicker()}
vendor: 13,698 bytes, line 14
14,Object.defineProperty(t.prototype,"webkitDisplayingFullscreen",{get:function(){var e;return null!=(e=this.element.webkitDisplayingFullscreen)&&e},enumerable:!1,configurable:!0}),t.prototype.getViewModeFromPresentationMode=function(){return l[this.element.webkitPresentationMode]||(document.pictureInPictureElement===this.element?a.ViewMode.PictureInPicture:a.ViewMode.Inline)},t.prototype.getVideoPlaybackQuality=function(){var e,t;return null==(t=(e=this.element).getVideoPlaybackQuality)?void 0:t.call(e)},Object.defineProperty(t.prototype,"disableRemotePlayback",{set:function(e){this.element.disableRemotePlayback=e},enumerable:!1,configurable:!0}),t.prototype.isPictureInPictureAvailable=function(){if(!this.element)return!1;var e="function"==typeof this.element.webkitSupportsPresentationMode&&this.element.webkitSupportsPresentationMode(o.PictureInPicture)&&"function"==typeof this.element.webkitSetPresentationMode&&!/iP(hone|od)/i.test(navigator.userAgent),t="function"==typeof this.element.requestPictureInPicture&&"function"==typeof document.exitPictureInPicture&&document.pictureInPictureEnabled;return e||t},t.prototype.isPictureInPicture=function(){return!!this.isPictureInPictureAvailable()&&(this.element.webkitPresentationMode===o.PictureInPicture||document.pictureInPictureElement===this.element)},t.prototype.isAirplayActive=function(){return!!this.element.webkitCurrentPlaybackTargetIsWireless},t.prototype.enterPictureInPicture=function(){var e=this;this.isPictureInPictureAvailable()&&(this.element.webkitSetPresentationMode?this.element.webkitSetPresentationMode(o.PictureInPicture):this.element.requestPictureInPicture&&this.element.requestPictureInPicture().catch(function(t){e.context.logger.debug("Request for PiP failed",t)}))},t.prototype.exitPictureInPicture=function(){var e=this;this.isPictureInPicture()&&(this.element.webkitPresentationMode===o.PictureInPicture?this.element.webkitSetPresentationMode(o.Inline):document.pictureInPictureElement===this.element&&document.exitPictureInPicture().catch(function(t){e.context.logger.debug("Exiting of PiP failed",t)}))},t.prototype.webkitSetMediaKeys=function(e){this.element.webkitSetMediaKeys(e)},t}(s.MediaElementWrapper)},85902:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VideoElementWrapperFactory=void 0;var n=i(88052),r=i(62756),o=i(7387),a=i(21513),s=i(15487),l=i(96907),c=i(76253),u=i(79186);function d(e,t){return{casUse:e,getConstructor:t}}var h=[d(function(){return(0,s.isSafari15orIOS15)()},function(){return l.Safari15VideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isSafari]},function(){return c.SafariVideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isWpeWebKit]&&n.ModuleManager.has(r.ModuleName.Wpe)},function(){return n.ModuleManager.get(r.ModuleName.Wpe).WpeVideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isTizen]&&n.ModuleManager.has(r.ModuleName.Tizen)},function(){return n.ModuleManager.get(r.ModuleName.Tizen).TizenVideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isWebOS]&&n.ModuleManager.has(r.ModuleName.Webos)},function(){return n.ModuleManager.get(r.ModuleName.Webos).WebosVideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isVidaa]&&n.ModuleManager.has(r.ModuleName.Vidaa)},function(){return n.ModuleManager.get(r.ModuleName.Vidaa).VidaaVideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isPlayStation5]&&n.ModuleManager.has(r.ModuleName.PlayStation5)},function(){return n.ModuleManager.get(r.ModuleName.PlayStation5).PlayStation5VideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isPlayStation4]&&n.ModuleManager.has(r.ModuleName.PlayStation4)},function(){return n.ModuleManager.get(r.ModuleName.PlayStation4).PlayStation4VideoElementWrapper})];t.VideoElementWrapperFactory=function(){function e(){}return e.createWrappedVideoElement=function(e,t){var i,n;if(t&&t.nodeName&&"video"===t.nodeName.toLowerCase())return new(null!=(n=null==(i=h.find(function(e){return(0,e.casUse)()}))?void 0:i.getConstructor())?n:u.VideoElementWrapper)(e,t)},e}()},50239:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CurrentTimeCache=void 0;var n=i(19274);t.CurrentTimeCache=function(){function e(e){var t=e.eventHandler,i=e.getVideoElementCurrentTime,r=this;this.Ghb=function(){r.Dhb=r.Ehb(),r.Fhb.addEventListener(n.MediaElementEvent.timeupdate,r.reset),r.Fhb.addEventListener(n.MediaElementEvent.playing,r.reset)},this.reset=function(){r.Fhb.removeEventListener(n.MediaElementEvent.timeupdate,r.reset),r.Fhb.removeEventListener(n.MediaElementEvent.playing,r.reset),r.Hhb()},this.Fhb=t,this.Ehb=i,this.Fhb.addEventListener(n.MediaElementEvent.primestart,this.Ghb)}return e.prototype.Hhb=function(){this.Dhb=void 0},e.prototype.get=function(){return void 0!==this.Dhb?this.Dhb:this.Ehb()},e.prototype.dispose=function(){this.Fhb.removeEventListener(n.MediaElementEvent.primestart,this.Ghb),this.Fhb.removeEventListener(n.MediaElementEvent.timeupdate,this.reset),this.Fhb.removeEventListener(n.MediaElementEvent.playing,this.reset),this.Hhb()},e}()},11103:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CurrentTimeObserver=t.MIN_CURRENT_TIME_PROGRESSION=void 0;var n=i(88844),r=i(19274);t.MIN_CURRENT_TIME_PROGRESSION=.01;var o=function(){function e(e,t){var i=this;this.context=e,this.videoElement=t,this.Uab=!1,this.gbb=Date.now(),this.hbb=0,this.ibb=function(){!i.context.isDisposed&&i.videoElement&&(i.videoElement.paused||i.videoElement.seeking||Date.now()-i.gbb>1e3&&(i.hbb++,i.nbb()))},this.jbb=function(){i.Uab=!1,(0,n.clearIntervalIfDefined)(i.Tab),i.Tab=void 0},this.kbb=function(){i.Uab=!0,(0,n.clearIntervalIfDefined)(i.Tab),i.Tab=window.setInterval(i.ibb,250)},this.lbb=function(){i.hbb++},this.mbb=function(){if(i.gbb=Date.now(),!i.videoElement.paused&&!i.videoElement.seeking){i.Uab=!0;var e=i.videoElement.currentTime;e===i.Vab?i.hbb++:(i.hbb=0,i.Vab=e)}},this.videoElement.addEventListener(r.MediaElementEvent.pause,this.jbb),this.videoElement.addEventListener(r.MediaElementEvent.playing,this.kbb),this.videoElement.addEventListener(r.MediaElementEvent.timeupdate,this.mbb),this.videoElement.addEventListener(r.MediaElementEvent.waiting,this.lbb),this.Tab=window.setInterval(this.ibb,250)}return e.prototype.dispose=function(){(0,n.clearIntervalIfDefined)(this.Tab),this.videoElement.removeEventListener(r.MediaElementEvent.pause,this.jbb),this.videoElement.removeEventListener(r.MediaElementEvent.playing,this.kbb),this.videoElement.removeEventListener(r.MediaElementEvent.timeupdate,this.mbb),this.videoElement.removeEventListener(r.MediaElementEvent.waiting,this.lbb)},e.prototype.reset=function(){this.hbb=0,this.Uab=!1,this.gbb=Date.now()},e.prototype.maybePokeVideoElement=function(){var e=this.videoElement.currentTime,i=this.videoElement.duration;i>0&&e>=i?(this.context.logger.debug("[".concat(this.logPrefix,"] Playback has stalled at the end of the stream. Trying to recover...")),this.videoElement.dispatchEvent(new Event(r.MediaElementEvent.ended))):(this.context.logger.debug("[".concat(this.logPrefix,"] Video element is stuck. Trying to recover...")),this.setCurrentTime(e+t.MIN_CURRENT_TIME_PROGRESSION))},e.prototype.setCurrentTime=function(e){try{this.videoElement.currentTime=e}catch(t){this.context.logger.debug("[".concat(this.logPrefix,"] Failed to set currentTime on video element to ").concat(e),t)}},e.prototype.nbb=function(){this.hbb<=12||(this.hbb=0,this.Uab?(this.context.logger.debug("[".concat(this.logPrefix,"] currentTime is not progressing from ").concat(this.videoElement.currentTime)),this.maybePokeVideoElement()):this.context.logger.debug("[".concat(this.logPrefix,"] Playback is possibly stuck, but no `playing` event was emitted")))},e}();t.CurrentTimeObserver=o},96907:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Safari15VideoElementWrapper=void 0;var r=i(19274);function o(e){return 0!==e.buffered.length&&e.getWrappedElement().currentTime>=e.buffered.start(0)}t.Safari15VideoElementWrapper=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.Pfb=-1,n.Qfb=!1,n.Rfb=!1,n.Sfb=function(){n.Pfb=n.getWrappedElement().currentTime,n.paused||(n.Qfb=!0,n.mediaElementEventHandler.suppressEvent(r.MediaElementEvent.seeked),n.mediaElementEventHandler.suppressEvent(r.MediaElementEvent.timeupdate))},n.Tfb=function(){n.Rfb=!0},n.egb=function(){o(n)&&(n.Pfb=n.getWrappedElement().currentTime,n.Qfb&&n.Rfb&&!n.getWrappedElement().seeking&&(n.Qfb=!1,n.Rfb=!1,n.mediaElementEventHandler.clearEventSuppression(r.MediaElementEvent.timeupdate),n.mediaElementEventHandler.clearEventSuppression(r.MediaElementEvent.seeked),n.mediaElementEventHandler.triggerEvent(r.MediaElementEvent.seeked),n.mediaElementEventHandler.triggerEvent(r.MediaElementEvent.timeupdate)))},n.getWrappedElement().addEventListener(r.MediaElementEvent.seeking,n.Sfb),n.getWrappedElement().addEventListener(r.MediaElementEvent.seeked,n.Tfb),n.getWrappedElement().addEventListener(r.MediaElementEvent.timeupdate,n.egb),n}return n(t,e),Object.defineProperty(t.prototype,"currentTime",{get:function(){var e=this.currentTimeCache.get();return -1===this.Pfb&&0!==e&&(this.Pfb=e),o(this)?e:Math.max(this.Pfb,0)},set:function(e){this.getWrappedElement().currentTime=e},enumerable:!1,configurable:!0}),t.prototype.load=function(){this.fgb(),e.prototype.load.call(this)},t.prototype.play=function(){return this.ended&&(this.Pfb=-1),e.prototype.play.call(this)},t.prototype.dispose=function(){this.getWrappedElement().removeEventListener(r.MediaElementEvent.seeking,this.Sfb),this.getWrappedElement().removeEventListener(r.MediaElementEvent.seeked,this.Tfb),this.getWrappedElement().removeEventListener(r.MediaElementEvent.timeupdate,this.egb),e.prototype.dispose.call(this)},t.prototype.fgb=function(){this.Pfb=-1,this.Qfb=!1,this.Rfb=!1},t}(i(76253).SafariVideoElementWrapper)},55471:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SafariCurrentTimeObserver=void 0;var r=i(20213),o=i(15487);t.SafariCurrentTimeObserver=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.logPrefix="Safari",t}return n(t,e),t.prototype.maybePokeVideoElement=function(){(this.context.internalPlayer.getStreamType()!==r.StreamType.Progressive||function(){var e;return!!((0,o.isSafari)()&&(null!=(e=(0,o.getSafariVersion)().major)?e:0)>=o.SAFARI_15_MAJOR_VERSION)||!!((0,o.isIOS)()&&(0,o.getIOSVersion)()>=o.IOS_15)}())&&e.prototype.maybePokeVideoElement.call(this)},t}(i(11103).CurrentTimeObserver)},76253:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SafariVideoElementWrapper=void 0;var r=i(51072),o=i(19274),a=i(79186),s=i(50239),l=i(55471);t.SafariVideoElementWrapper=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.hgb=!1,n.onPlaying=function(){var e;n.paused||n.hgb||(n.hgb=!0,null==(e=n.mediaElementEventHandler)||e.suppressEvent(o.MediaElementEvent.playing))},n.maybeTriggerDelayedPlaying=function(){var e,t;n.hgb&&!n.paused&&!n.seeking&&function(e){return e.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA}(n)&&(n.hgb=!1,null==(e=n.mediaElementEventHandler)||e.clearEventSuppression(o.MediaElementEvent.playing),null==(t=n.mediaElementEventHandler)||t.triggerEvent(o.MediaElementEvent.playing))},n.ggb=new l.SafariCurrentTimeObserver(t,i),n.currentTimeCache=new s.CurrentTimeCache({eventHandler:n.eventHandler,getVideoElementCurrentTime:function(){return n.getWrappedElement().currentTime}}),n.igb(),n}return n(t,e),t.prototype.igb=function(){this.getWrappedElement().addEventListener(o.MediaElementEvent.timeupdate,this.maybeTriggerDelayedPlaying),this.getWrappedElement().addEventListener(o.MediaElementEvent.playing,this.onPlaying)},t.prototype.jgb=function(){this.getWrappedElement().removeEventListener(o.MediaElementEvent.timeupdate,this.maybeTriggerDelayedPlaying),this.getWrappedElement().removeEventListener(o.MediaElementEvent.playing,this.onPlaying)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.currentTimeCache.get()},set:function(e){this.getWrappedElement().currentTime=e}
14,enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.ggb.dispose(),this.currentTimeCache.dispose(),this.jgb(),e.prototype.dispose.call(this)},t.prototype.load=function(){this.mediaElementEventHandler.suppressEvent(o.MediaElementEvent.playing),this.hgb=!1,this.ggb.reset(),this.currentTimeCache.reset(),e.prototype.load.call(this)},t.prototype.prime=function(){return e.prototype.prime.call(this).then(function(){return new Promise(function(e){return setTimeout(e,0)})})},t.prototype.play=function(){var e=this;this.mediaElementEventHandler.suppressEvent(o.MediaElementEvent.playing),this.mediaElementEventHandler.suppressEvent(o.MediaElementEvent.timeupdate,1);var t=this.element.play();return null==t&&(t=r.PlayPromise.new(this.context,this,this.drmHandler)),t.then(function(){return e.maybeTriggerDelayedPlaying()})},t}(a.VideoElementWrapper)}},__webpack_module_cache__={};function __nested_webpack_require_1402483__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__nested_webpack_require_1402483__),i.exports}__nested_webpack_require_1402483__.m=__webpack_modules__,function(){var e=[];__nested_webpack_require_1402483__.O=function(t,i,n,r){if(!i){var o=1/0;for(c=0;c<e.length;c++){i=e[c][0],n=e[c][1],r=e[c][2];for(var a=!0,s=0;s<i.length;s++)(!1&r||o>=r)&&Object.keys(__nested_webpack_require_1402483__.O).every(function(e){return __nested_webpack_require_1402483__.O[e](i[s])})?i.splice(s--,1):(a=!1,r<o&&(o=r));if(a){e.splice(c--,1);var l=n();void 0!==l&&(t=l)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[i,n,r]}}(),function(){__nested_webpack_require_1402483__.d=function(e,t){for(var i in t)__nested_webpack_require_1402483__.o(t,i)&&!__nested_webpack_require_1402483__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}}(),function(){__nested_webpack_require_1402483__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch{if("object"==typeof window)return window}}()}(),function(){__nested_webpack_require_1402483__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){__nested_webpack_require_1402483__.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){__nested_webpack_require_1402483__.p=""}(),function(){var e={114:0};__nested_webpack_require_1402483__.O.j=function(t){return 0===e[t]};var t=function(t,i){var n,r,o=i[0],a=i[1],s=i[2],l=0;if(o.some(function(t){return 0!==e[t]})){for(n in a)__nested_webpack_require_1402483__.o(a,n)&&(__nested_webpack_require_1402483__.m[n]=a[n]);if(s)var c=s(__nested_webpack_require_1402483__)}try{s&&!c&&(c=s(__nested_webpack_require_1402483__))}catch{}for(t&&t(i);l<o.length;l++)r=o[l],__nested_webpack_require_1402483__.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return __nested_webpack_require_1402483__.O(c)},i=self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))}();var __nested_webpack_exports__=__nested_webpack_require_1402483__(86969);return __nested_webpack_require_1402483__.O(__nested_webpack_exports__)}()})}()}(bitmovinplayerCore);var bitmovinplayerCoreExports=bitmovinplayerCore.exports,bitmovinplayerAdvertisingCore={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[561],{28610:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.VmapTrackingEventType=void 0,function(e){e.BreakStart="breakstart",e.BreakEnd="breakend",e.Error="error"}(i||(t.VmapTrackingEventType=i={}))},45392:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdManifestHelper=void 0,t.pingVmapTrackingUrls=function(e,t){void 0===e&&(e=[]),e.filter(function(e){return e.type===t}).forEach(function(e){return(0,r.pingUrl)(e.url)})};var n=i(70850),r=i(95217),o=i(88457),a=i(60326),s=i(47091);t.AdManifestHelper=function(){function e(){}return e.setLoader=function(t){e.loader=t},e.setVideoLoadTimeout=function(t){e.videoLoadTimeout=t},e.setWithCredentials=function(t){e.withCredentials=t},e.setDisableStorage=function(t){e.disableStorage=t},e.downloadVastManifest=function(t){return e.domParser||(e.domParser=new DOMParser),e.loader.load(t,void 0,void 0,void 0,void 0,e.withCredentials).catch(function(){return Promise.reject({code:o.AdvertisingModuleErrorCode.COULD_NOT_LOAD_AD_MANIFEST})}).then(function(t){if(!t.body)return Promise.reject({code:s.VastErrorCode.XML_PARSING_ERROR});var i,n=e.domParser.parseFromString(t.body,"text/xml"),r=null==(i=n.childNodes[0].childNodes[0])?void 0:i.nodeName.includes("Error"),a=void 0===r||r,l=n.childNodes[0].nodeName.includes("error");return n.childNodes[0].nodeName.includes("VMAP")?Promise.reject({code:o.AdvertisingModuleErrorCode.AD_TAG_TYPE_NOT_MATCHING}):a?Promise.reject({code:s.VastErrorCode.NO_ADS_VAST_RESPONSE}):l?Promise.reject({code:s.VastErrorCode.XML_PARSING_ERROR}):Promise.resolve({manifest:n,downloadTiming:{downloadTime:t.elapsedTime,timeToFirstByte:t.timeToFirstByte}})})},e.downloadVmapManifest=function(t){return e.loader.load(t,void 0,void 0,void 0,void 0,e.withCredentials)},e.parseAdVerifications=function(t){return e.vastClientWrapper||(e.vastClientWrapper=new a.VastClientWrapper(e.videoLoadTimeout,e.withCredentials,e.disableStorage)),e.vastClientWrapper.parseManifest(t,!1).then(function(e){return e.ads.length<1?Promise.resolve([]):Promise.resolve(e.ads.map(function(e){return{id:e.id||"adVerification-"+n.Util.generateUniqueId(),verifications:e.verifications}}))}).catch(function(e){return Promise.resolve([])})},e.xmlToString=function(e){return new XMLSerializer().serializeToString(e.documentElement)},e.toDataUri=function(e){return"data:text/xml,"+encodeURIComponent(e)},e}()}
vendor: 4,865 bytes, line 14
14,63524:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlaybackFactory=void 0;var n=i(60937),r=i(52448);t.AdPlaybackFactory=function(){function e(){}return e.create=function(e,t){var i=!1,o=function(){i=!1},a=function(e){return Promise.reject("The current ad playback has to be finished by calling ".concat(e,".done(), before a new one can be requested."))};return new(function(){function s(){}return s.prototype.requestPlayer=function(){return i?a("AdPlayerAPI"):(i=!0,Promise.resolve(r.AdPlayerFactory.createAdPlayer(e,o)))},s.prototype.requestReporter=function(){return i?a("AdPlaybackReportingAPI"):(i=!0,Promise.resolve(new n.AdPlaybackReporter(e,o)))},s.prototype.done=function(e){return void 0===e&&(e=!0),t(e)},s}())},e}()},60937:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlaybackReporter=void 0;var n=i(3714),r=i(75375),o=i(19483);t.AdPlaybackReporter=function(){return function(e,t){var i=this,a=new o.ArrayMap;this.videoElement=e.getVideoElement();var s=!1,l=function(){if(s)throw"AdPlaybackReporter is no longer usable. Request a new one."},c=this.videoElement.addEventListener;this.videoElement.addEventListener=function(e,t,n){a.add(e,t),c.apply(i.videoElement,[e,t,n])},this.started=function(t){if(l(),i.K4)throw"Ad playback is already in progress. A new one can not be started.";i.K4=t,i.L4=!1,e.hasCurrentSourcePlayedOnce()||e.fireEvent(n.PlayerEvent.Playing,{time:e.getCurrentTime(),issuer:r.ADVERTISING_ISSUER_NAME}),e.fireEvent(n.PlayerEvent.AdStarted,{ad:t})},this.paused=function(t){l(),e.fireEvent(n.PlayerEvent.Paused,{time:t,issuer:r.ADVERTISING_ISSUER_NAME})},this.resumed=function(t){l(),e.fireEvent(n.PlayerEvent.Play,{time:t,issuer:r.ADVERTISING_ISSUER_NAME}),e.fireEvent(n.PlayerEvent.Playing,{time:t,issuer:r.ADVERTISING_ISSUER_NAME})},this.timeupdate=function(t){l(),e.fireEvent(n.PlayerEvent.TimeChanged,{time:t,issuer:r.ADVERTISING_ISSUER_NAME})},this.skipped=function(){i.L4||(l(),e.fireEvent(n.PlayerEvent.AdSkipped,{ad:i.K4}),i.L4=!0,i.K4=null)},this.done=function(){return l(),a.forAll(function(e,t){i.videoElement.removeEventListener(e,t),i.videoElement.addEventListener=c}),!i.L4&&i.K4&&e.fireEvent(n.PlayerEvent.AdFinished,{ad:i.K4}),i.K4=null,t(),s=!0,Promise.resolve()}}}()},43255:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlayerDelegate=void 0;var r=i(40306),o=i(80813),a=i(3714),s=i(51289),l=i(90408),c=i(20213),u=i(75375),d=i(18192),h=i(94685),p=i(41138),f=i(63524),m=i(44202),g=i(65185),v=i(47091);t.AdPlayerDelegate=function(){function e(t){var i,h=t.internalPlayer,p=new m.AdPlayerStateStore(t.context,h),y=Promise.resolve(),_=!1,E=!1,T=!1,w={width:0,height:0},A=[],P=function(e){e.code===c.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&(E=!0)};h.onInternal(a.PlayerEvent.PlayerResized,function(e){w={width:b(e.width),height:b(e.height)}});var I=function(){E=!1};this.getVideoElement=function(){return h.getVideoElement()},this.getVolume=function(){return h.isMuted()?0:h.getVolume()},this.parsePosition=function(t){var i;return i=p.hasStoredState()?p.getStoredState().contentDuration:h.getDuration(),e.parsePosition(t,i)},this.selectMediaFile=function(e){var i=e.every(function(e){return e.bitrate||e.minBitrate&&e.maxBitrate}),n=h.getDownloadedVideoData(),r=h.getDownloadedAudioData(),a=!!(r&&n&&n.bitrate>0),s=t.context.serviceManager.get(o.ServiceName.AdaptationService);return i&&(s||a)?C(e,[n,r],s):function(e,t,i){return i&&i.width>0?(0,g.findMediaFileByResolution)(i.width,i.height,e):(0,g.findMediaFileByResolution)(t.width,t.height,e)}(e,w,n)};var C=function(e,t,i){var n=t[0],r=t[1];return i?i.selectQualityBasedOnBitrateMeasurement(e):(0,g.findMediaFileByBitrate)(n.bitrate+r.bitrate,e)};this.metadataLoaded=function(e,t){var i={adBreak:null,downloadTiming:t};e.hasOwnProperty("scheduleTime")&&(i.adBreak=e),i.adConfig=e,h.fireEvent(a.PlayerEvent.AdManifestLoaded,i)};var M=function(){A.forEach(function(e){return h.fireEvent(a.PlayerEvent.Error,{type:a.PlayerEvent.Error,code:e.code,name:e.name,message:e.message,data:e.data,troubleShootLink:(0,s.generateTroubleshootUrl)(e.code)})})},R=function(e){if(!p.hasStoredState())return Promise.resolve();var n=p.getStoredState().contentDuration,s=Promise.resolve();return _=!e,e&&(s=y=(function(){return A.length?function(){return h.removeExternalEventFilter(x),p.clear(),h.off(a.PlayerEvent.Warning,P),h.off(a.PlayerEvent.Playing,I),h.unload().then(M)}():(h.fireEvent(a.PlayerEvent.RestoringContent),h.addExternalEventFilter(D),p.restore(u.ADVERTISING_RESTORE_ISSUER_NAME).then(function(e){if(h.removeExternalEventFilter(x),A.length)throw Error("Backgroun
14d errors occurred during ad break");if(E)E=!1;else{if(e)return h.play(u.ADVERTISING_ISSUER_NAME).catch(function(e){T=!0,t.context.logger.debug("Unable to start playback after restoring the content after an ad break:",e)});var i=t.context.serviceManager.get(o.ServiceName.PlayerStateService);null==i||i.transitionToStoppedState()}}).catch(function(){A.length?M():h.fireEvent(a.PlayerEvent.Error,{code:r.ErrorCode.UNKNOWN})}).finally(function(){p.clear(),h.removeExternalEventFilter(D),h.off(a.PlayerEvent.Warning,P),h.off(a.PlayerEvent.Playing,I)}))})().then(function(){t.restoreContentDeferred&&t.restoreContentDeferred.resolve()})),s.then(function(){var r=i?{adBreak:i}:void 0;h.fireEvent(a.PlayerEvent.AdBreakFinished,r),i=null,e&&(0,l.maybeFireDurationChangedEvent)(n,h.getDuration(),t.context.eventHandler),h.hasCurrentSourcePlayedOnce()||T||h.fireEvent(a.PlayerEvent.Playing,{time:h.getCurrentTime(),issuer:u.ADVERTISING_ISSUER_NAME}),T=!1})},k=[a.PlayerEvent.Error,a.PlayerEvent.SourceLoaded,a.PlayerEvent.SourceUnloaded,a.PlayerEvent.PlaybackFinished,a.PlayerEvent.Ready],x=function(e,i){var n=function(){var e=t.context.store.getState();return(null==e?void 0:e.sources)&&Object.keys(e.sources).find(function(t){var i;return e.sources&&e.sources[t]&&(null==(i=e.sources[t].playback)?void 0:i.kind)===d.PlaybackKind.Backgroun
vendor: 9,288 bytes, line 14
14d})}();return S(e,i)&&n&&i.sourceIdentifier===n&&A.push(i),!k.includes(e)},O=[a.PlayerEvent.Play,a.PlayerEvent.Playing,a.PlayerEvent.Seek,a.PlayerEvent.Seeked,a.PlayerEvent.TimeShift,a.PlayerEvent.TimeShifted],D=function(e){return!O.includes(e)};this.requestAdPlayback=function(e){return i?Promise.reject("Ad break already in progress"):(i=e,y.then(function(){var t=_?Promise.resolve():L(e),i={adBreak:n(n({},JSON.parse(JSON.stringify(e))),{scheduleTime:e.scheduleTime})};return h.fireEvent(a.PlayerEvent.AdBreakStarted,i),h.onInternal(a.PlayerEvent.Warning,P),h.onInternal(a.PlayerEvent.Playing,I),t.then(function(){return h.unload(u.ADVERTISING_ISSUER_NAME)}).then(function(){return f.AdPlaybackFactory.create(h,R)})}))},this.updateAdRestoreState=function(e){i&&p.setAdRestoreState(e)};var L=function(i){var n=t.context,r=n.sourceContext.sourceIdentifier,a=n.adRestorationOptimizationService,s=n.serviceManager.get(o.ServiceName.ManifestService,r),l=a&&n.settings.OPTIMIZE_AD_RESTORATION,c=e.getAdBreakDuration(i),d=i.replaceContentDuration;return p.capture(u.ADVERTISING_ISSUER_NAME),p.setAdRestoreState({adBreakDuration:c,replaceContentDuration:d}),h.addExternalEventFilter(x),l&&s&&!s.isLive()?a.optimizeRestorationAfterUpcomingAdBreak():Promise.resolve()};this.overlayAdStarted=function(e){h.fireEvent(a.PlayerEvent.OverlayAdStarted,{ad:e})},this.adClicked=function(e){h.fireEvent(a.PlayerEvent.AdClicked,{clickThroughUrl:e})},this.adInteraction=function(e,t){h.fireEvent(a.PlayerEvent.AdInteraction,{interactionType:e,id:t})},this.onQuartile=function(e){h.fireEvent(a.PlayerEvent.AdQuartile,{quartile:e})},this.onError=function(e,t,i){var n={code:e||v.VastErrorCode.UNDEFINED_ERROR};t&&(n.message=t),i&&(n.adConfig=i),h.fireEvent(a.PlayerEvent.AdError,{code:r.ErrorCode.MODULE_ADVERTISING_ERROR,data:n,name:r.ErrorCode[r.ErrorCode.MODULE_ADVERTISING_ERROR],message:t,troubleShootLink:(0,s.generateTroubleshootUrl)(r.ErrorCode.MODULE_ADVERTISING_ERROR)})},this.onWarning=function(e,t,i){h.fireEvent(a.PlayerEvent.Warning,new c.PlayerWarning(e,t,i))},this.reset=function(){var t=h.getVideoElement();_=!1,E=!1,p.clear(),h.removeExternalEventFilter(x),h.removeExternalEventFilter(D),i&&t instanceof HTMLVideoElement&&e.clearVideoElement(t),i=null}}return e.getAdBreakDuration=function(e){var t,i;return e.totalPlannedDuration??(null!=(i=null==(t=e.ads)?void 0:t.reduce(function(e,t){var i;return e+(t.isLinear&&null!=(i=t.duration)?i:0)},0))?i:0)},e.parsePosition=function(e,t){var i=Number(e);return!isNaN(i)&&i<=0&&(e="pre"),e.includes("pre")||"0%"===e?0:e.includes("post")?1/0:this.parseNumericalPosition(e,t)},e.parseNumericalPosition=function(e,t){var i;if(/%/.test(e)){if(!t)return NaN;i=parseFloat(e=e.replace(/%/gi,""))/100*t}else if(e.indexOf(":")>-1){var n=e.split(":");i=3600*parseFloat(n[0])+60*parseFloat(n[1])+parseFloat(n[2])}else i=parseFloat(e);return i>=0?i:NaN},e.clearVideoElement=function(e){p.VideoElementUtil.removeSource(e),e.load()},e}();var y=/(\d+)/;function b(e){return Number(e.match(y)?e.match(y)[0]:0)}var S=function(e,t){return e===a.PlayerEvent.Error&&(0,h.isObject)(t)}},52448:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlayerFactory=t.DEFAULT_AD_PLAYBACK_RATE=void 0;var n=i(40306),r=i(3714),o=i(75375),a=i(19483),s=i(85434),l=i(6365),c=i(7581);t.DEFAULT_AD_PLAYBACK_RATE=1;var u=function(){function e(){}return e.createAdPlayer=function(e,i){var u,d=new a.ArrayMap,h=!1,p=!1,f=[r.PlayerEvent.Play,r.PlayerEvent.Playing],m=function(){if(p)throw"AdPlayer is no longer usable. Request a new one."};return new(function(){function a(){this.adPlaybackStartEventFilter=function(t){return!e.hasCurrentSourcePlayedOnce()||!f.includes(t)}}return a.prototype.done=function(){m();var t=Promise.resolve();return h?t=e.unload(o.ADVERTISING_ISSUER_NAME):e.hasEnded()?function(e,t){e.fireEvent(r.PlayerEvent.AdFinished,{ad:t})}(e,u):function(e,t){e.fireEvent(r.PlayerEvent.AdSkipped,{ad:t})}(e,u),u=null,d.forAll(function(t,i){e.off(t,i)}),i(),p=!0,h=!1,t},a.prototype.on=function(t,i){m(),d.add(t,i),e.onInternal(t,i)},a.prototype.pause=function(){m(),e.pause(o.ADVERTISING_ISSUER_NAME)},a.prototype.play=function(){return m(),e.play(o.ADVERTISING_ISSUER_NAME)},a.prototype.load=function(i,a){var d=this;return m(),u=i,e.addExternalEventFilter(this.adPlaybackStartEventFilter),h=!0,e.load(function(e){return e.data.delivery===l.MediaFileDeliveryType.Streaming?s.MimeTypeHelper.isDash(e.data.mimeType)?{dash:e.mediaFileUrl}:{hls:e.mediaFileUrl}:{progressive:e.mediaFileUrl}}(i),void 0,a??{seeking:!0},o.ADVERTISING_ISSUER_NAME).then(function(){return e.setPlaybackSpeed(t.DEFAULT_AD_PLAYBACK_RATE)}).then(function(){return e.play(o.ADVERTISING_ISSUER_NAME).catch(function(){})}).then(function(){h&&e.fireEvent(r.PlayerEvent.AdStarted,{ad:i})}).catch(function(t){throw t&&t.code===n.ErrorCode.MODULE_MISSING?{code:c.AdvertisingModuleErrorCode.REQUIRED_PLAYER_MODULE_MISSING,message:t.data.name}:(e.getLogger().debug("Failed to load Ad due to error: ".concat(null==t?void 0:t.message),t),t)}).finally(function(){e.removeExternalEventFilter(d.adPlaybackStartEventFilter),h=!1})},Object.defineProperty(a.prototype,"duration",{get:function(){return m(),e.getDuration(o.ADVERTISING_ISSUER_NAME)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"currentTime",{get:function(){return m(),e.getCurrentTime(o.ADVERTISING_ISSUER_NAME)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"volume",{get:function(){return m(),e.getVolume()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"muted",{get:function(){return m(),e.isMuted()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"paused",{get:function(){m();var t=e.isContentPaused(),i=e.isContentPlaying();return!1===t&&!1===i||t},enumerable:!1,configurable:!0}),a}())},e}();t.AdPlayerFactory=u},44202:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):(function(e){return e instanceof i?e:new i(function(t){t(e)})})(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlayerStateStore=void 0;var a=i(80813),s=i(3714),l=i(44468),c=i(29488),u=i(46922),d=i(81524),h=i(18192),p=i(15487),f=i(88844),m=i(93531);t.AdPlayerStateStore=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.UI=null,t}return n(t,e),t.prototype.setAdRestoreState=function(e){this.hasStoredState()&&(this.UI=e,this.XI())},t.prototype.VI=function(){var e,t,i=null!=(t=null==(e=this.storedState)?void 0:e.sourceIdentifier)?t:this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(a.ServiceName.SourceStoreService,i)},t.prototype.WI=function(){if(!this.storedState)return NaN;if(!this.UI)return this.storedState.playbackPosition;var e={adBreakDuration:this.UI.adBreakDuration,isLive:this.storedState.isLive,replaceContentDuration:this.UI.replaceContentDuration,playbackPosition:this.storedState.playbackPosition,resumeLiveContentAtPreviousPosition:this.context.settings.RESUME_LIVE_CONTENT_AT_PREVIOUS_POSITION_AFTER_AD_BREAK};return this.storedState.useTimeshiftForRestore?(0,m.calculateTimeshiftRestorationPosition)(e):(0,m.calculatePlaybackRestorationPosition)(e)},t.prototype.XI=function(){var e;if(this.storedState){var t=this.WI();this.context.logger.debug("Saving content restore position: ".concat(t)),null==(e=this.VI())||e.dispatch((0,u.setBackgroundPlaybackState)({kind:h.PlaybackKind.Backgroun
14d,position:t}))}},t.prototype.YI=function(e){var t,i,n,r,o=this,a=this.storedState;if(!a)return Promise.reject(Error("no stored state to restore playback position"));if(a.isStartup)return Promise.resolve(!0);var c=null==(i=null==(t=this.VI())?void 0:t.getState())?void 0:i.playback;if(!c)return Promise.reject(Error("no playback state available to restore playback position"));var u=(0,d.getPlaybackPosition)(c);if(a.useTimeshiftForRestore)return this.internalPlayer.timeShift(u,e),Promise.resolve(!0);var h=(null==(n=this.context.renderer)?void 0:n.getDuration())||(null==(r=this.context.videoElement)?void 0:r.duration)||a.contentDuration||u;return u>=h?Promise.resolve(!1):new Promise(function(t,i){var n,r=function(){(0,f.clearTimeoutIfDefined)(n),o.internalPlayer.off(s.PlayerEvent.Seeked,a),o.internalPlayer.off(s.PlayerEvent.Error,c)},a=function(){r(),t(!0)},c=function(){r(),i(Error("Error during playback restoration"))};o.internalPlayer.onInternal(s.PlayerEvent.Seeked,a),o.internalPlayer.onInternal(s.PlayerEvent.Error,c),o.internalPlayer.getPlayerType()===l.PlayerType.Native&&((0,p.isWebOS)()||(0,p.isPlayStation4)())&&(n=window.setTimeout(a,5e3)),o.internalPlayer.seek(u,e)||a()})},t.prototype.restore=function(e){return r(this,void 0,void 0,function(){var t,i,n;return o(this,function(r){switch(r.label){case 0:if(!(t=this.storedState))throw Error("no stored state to restore");if(!t.source)throw Error("stored state has no source to restore");return[4,this.loadSource(e)];case 1:return r.sent(),this.restoreBaseState(t),[4,this.YI(e)];case 2:return i=r.sent(),this.restoreSubtitles(t.subtitles),null==(n=this.VI())||n.dispatch((0,u.setMainContentPlaybackState)({kind:h.PlaybackKind.MainContent})),this.clear(),[2,i]}})})},t.prototype.clear=function(){e.prototype.clear.call(this),this.UI=null},t}(c.PlayerStateStore)},95217:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdTrackingEvent=void 0,t.pingUrl=function(e){new Image().src=e},function(e){e.FirstQuartile="firstQuartile",e.Midpoint="midpoint",e.ThirdQuartile="thirdQuartile"}(i||(t.AdTrackingEvent=i={}))},90176:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdvertisingController=t.adTagPlaceholderDefaults=void 0,t.applyModuleSpecificConfig=y,t.createPlayerAdvertisingApi=b;var n=i(4224),r=i(3714),o=i(4129),a=i(29669),s=i(44468),l=i(87827),c=i(93204),u=i(94685),d=i(34841),h=i(88844),p=i(70850),f=i(88052),m=i(62756),g=i(45392),v={videoLoadTimeout:i(6365).DEFAULT_VIDEO_LOAD_TIMEOUT,strategy:{shouldLoadAdBreak:function(){return!0},shouldPlayAdBreak:function(){return!0},shouldPlaySkippedAdBreaks:function(e){var t=Math.max.apply(Math,e.map(function(e){return e.scheduleTime}));return[e.find(function(e){return e.scheduleTime===t})]}}};
14function y(e,t,i){f.ModuleManager.get(m.ModuleName.Advertising).bitmovinMarker?(i.debug("Using Bitmovin Advertising Module"),function(e,t){var i=t;e.playback&&Array.isArray(e.playback.preferredTech)?i.preferredTechnology=e.playback.preferredTech:i.preferredTechnology=[]}(e,t)):f.ModuleManager.get(m.ModuleName.Advertising).imaMarker&&(i.debug("Using IMA Advertising Module"),function(e,t){var i=t;i.sdkUrl||(i.sdkUrl=e.location.google_ima)}(e,t))}function b(e,t){return new(function(){function i(){}return i.prototype.schedule=function(t){return e.scheduleAd(t)},i.prototype.skip=function(){return t.skip()},i.prototype.list=function(){return t.list()},i.prototype.getActiveAdBreak=function(){return t.getActiveAdBreak()},i.prototype.getActiveAd=function(){return t.getActiveAd()},i.prototype.discardAdBreak=function(e){t.discardAdBreak(e)},i.prototype.isLinearAdActive=function(){return t.isLinearAdActive()},i.prototype.getModuleInfo=function(){return t.getModuleInfo()},i}())}function S(e){return!!e.position}t.adTagPlaceholderDefaults={playbackTime:["[CONTENTPLAYHEAD]"],height:["[HEIGHT]"],width:["[WIDTH]"],domain:["[DOMAIN]"],page:["[SITE]"],referrer:["[REFERRER]"],random:["[random]","[CACHEBUSTING]"],timestamp:["[TIMESTAMP]"]},t.AdvertisingController=function(){function e(e,t){var i=this;this.context=t,this.Yb=function(e){i.Ob.isCastingToCAF()||i.Ub.onTimeChanged(e.time)},this.Zb=function(e){return i.Ub.onSeek(e.position,e.seekTarget)},this.ab=function(e){return i.Xb=e.position},this.bb=function(){return i.Zb({position:i.Xb,seekTarget:i.Ob.getCurrentTime()})},this.cb=function(e){i.Tb&&e.code===n.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&(i.Tb=!1)},this.onVolumeChanged=function(e){return i.Ub.onVolumeChanged(e)},this.db=function(){i.Qb.length>0&&i.fb(i.Qb.splice(0,i.Qb.length)),i.Ob.off(r.PlayerEvent.SourceLoaded,i.db)},this.onPlayerResize=function(e,t){i.Ub.onResize(e,t,i.Ob.getViewMode()===s.ViewMode.Fullscreen)};var l=e.getConfig(!0);this.Pb=l.advertising||{},this.Ob=e,this.Qb=[],this.Rb=null,this.Sb=!0,this.Tb=!1;var c=function(e,t){var i,n,r={},o={};return p.Util.deepCopy(o,e),delete o.adBreaks,p.Util.deepCopyMulti(r,v,o),r.hasOwnProperty("withCredentials")||(r.withCredentials=!0),r.hasOwnProperty("disableStorageApi")||(r.disableStorageApi=null!=(n=null==(i=t.storage)?void 0:i.disableStorageApi)&&n),r}(this.Pb,l);(function(e,t){g.AdManifestHelper.setLoader(new o.DefaultContentLoader(t,{requestType:a.HttpRequestType.MANIFEST_ADS})),g.AdManifestHelper.setVideoLoadTimeout(e.videoLoadTimeout),g.AdManifestHelper.setWithCredentials(e.withCredentials),g.AdManifestHelper.setDisableStorage(e.disableStorageApi)})(c,t),y(l,c,t.logger),this.createAdvertisingModule(c),this.Pb.adBreaks&&this.Pb.adBreaks.length>0&&this.Pb.adBreaks.splice(0).forEach(function(e){return i.scheduleAd(e).catch(function(e){return i.context.logger.warn(e)})}),this.Ob.on(r.PlayerEvent.TimeChanged,this.Yb),this.Ob.on(r.PlayerEvent.Seek,this.Zb),this.Ob.on(r.PlayerEvent.Warning,this.cb),this.Ob.on(r.PlayerEvent.TimeShift,this.ab),this.Ob.on(r.PlayerEvent.TimeShifted,this.bb),this.playerAdvertisingApi=b(this,this.Ub)}return e.prototype.createAdvertisingModule=function(e){this.Wb={internalPlayer:this.Ob,context:this.context,restoreContentDeferred:null};
vendor: 4,056 bytes, line 14
14var t=f.ModuleManager.get(m.ModuleName.AdvertisingCore),i=f.ModuleManager.get(m.ModuleName.Advertising),n=new t.AdPlayerDelegate(this.Wb);this.Ub=new i(n,e),this.Vb=n},e.prototype.updatePlayerContext=function(e){this.context=e,this.Wb.context=e},e.prototype.initializeAdModule=function(){this.Ub.initialize()},e.prototype.scheduleAd=function(e){return S(e)&&(e.discardAfterPlayback=!1!==e.discardAfterPlayback,this.eb(e)&&!this.hb())?(this.Qb.push(e),this.Rb||(this.Rb=new d.Deferred,this.Ob.on(r.PlayerEvent.SourceLoaded,this.db)),this.Rb.promise):this.gb(e)},e.prototype.eb=function(e){return e.position.includes("%")&&"0%"!==e.position},e.prototype.fb=function(e){var t=this,i=e.map(function(e){return t.gb(e)});this.Rb&&Promise.all(i).then(function(e){var i=[].concat.apply([],e);t.Rb.resolve(i),t.Rb=null}).catch(function(e){return t.context.logger.warn(e)})},e.prototype.gb=function(e){return S(e)&&this.Ob.isLive()&&this.eb(e)?Promise.reject("percentage based ad break positions can not be used for live streams"):this.Ub.schedule(e)},e.prototype.playPreRollAds=function(){var e,t,i=this,n=Promise.resolve();return this.Tb=!0,this.Sb&&null!=(t=null==(e=this.context)?void 0:e.videoElement)&&t.prime&&(n=this.context.videoElement.prime()),Promise.resolve(this.Ub.beforeContent()).catch(function(e){(0,u.isContextAvailable)(i.context)&&i.context.logger.debug("Failed to trigger preroll ad playback: ",e)}).then(function(){return n}).catch(function(e){(0,u.isContextAvailable)(i.context)&&i.context.logger.debug("Failed to prime video element: ",e)})},e.prototype.playPostRollAds=function(){var e=this,t=!1,i=function(){t=!0,e.Ob.off(r.PlayerEvent.AdBreakStarted,i)};return this.Ob.on(r.PlayerEvent.AdBreakStarted,i),this.Wb.restoreContentDeferred=new d.Deferred,Promise.resolve(this.Ub.afterContent()).then(function(){return new Promise(function(i,n){if(t){var r,o=function(){e.Wb.restoreContentDeferred.promise.then(i).catch(n),a(),(0,h.clearTimeoutIfDefined)(r)},a=(0,c.subscribe)(e.context.store)(function(e){return(0,l.getIsStopped)((0,l.getPlayerState)(e))},o,function(e){return e});r=window.setTimeout(o,1e3)}else i()})}).then(function(){return e.Wb.restoreContentDeferred=null}).catch(function(t){e.Wb.restoreContentDeferred=null,e.context.logger.debug(t)})},e.prototype.hasAlreadyRequestedPreRollAds=function(){return this.Tb},e.prototype.play=function(){return this.Ub.resume(),Promise.resolve()},e.prototype.pause=function(){this.Ub.pause()},e.prototype.getCurrentTime=function(){var e,t=null==(e=this.Ub)?void 0:e.currentTime();return isNaN(t)?0:t??0},e.prototype.getDuration=function(){return this.Ub.duration()},e.prototype.isLinearAdActive=function(){return this.Ub.isLinearAdActive()},e.prototype.isPlaying=function(){return this.Ub.isLinearAdActive(!0)},e.prototype.isPaused=function(){return this.isLinearAdActive()&&!this.isPlaying()},e.prototype.hb=function(){return this.Ob.getDuration()>0},e.prototype.reset=function(){return this.Qb=[],this.Tb=!1,this.Vb.reset(),this.Ub.reset()},e.prototype.dispose=function(){this.Ob.off(r.PlayerEvent.TimeChanged,this.Yb),this.Ob.off(r.PlayerEvent.Seek,this.Zb),this.Ob.off(r.PlayerEvent.Warning,this.cb),this.Ob.off(r.PlayerEvent.TimeShift,this.ab),this.Ob.off(r.PlayerEvent.TimeShifted,this.bb),this.Ob=null,this.Pb=null,this.Ub.dispose(),this.Ub=null,this.Vb=null},e}()},28412:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AdvertisingModule=void 0,t.AdvertisingModule=function(){return function(e,t){this.player=e,this.config=t}}()},88457:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdvertisingModuleErrorCode=void 0,function(e){e[e.AD_TAG_TYPE_NOT_MATCHING=110]="AD_TAG_TYPE_NOT_MATCHING",e[e.COULD_NOT_LOAD_AD_MANIFEST=404]="COULD_NOT_LOAD_AD_MANIFEST",e[e.REQUIRED_PLAYER_MODULE_MISSING=2e3]="REQUIRED_PLAYER_MODULE_MISSING"}(i||(t.AdvertisingModuleErrorCode=i={}))},23912:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdTagType=void 0,function(e){e.VAST="vast",e.VMAP="vmap",e.VPAID="vpaid"}(i||(t.AdTagType=i={}))}
14,93531:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePlaybackRestorationPosition=function(e){var t=e.adBreakDuration,i=e.isLive,n=e.playbackPosition,r=e.replaceContentDuration,o=e.resumeLiveContentAtPreviousPosition;return n+(r??(!i||o?0:t))},t.calculateTimeshiftRestorationPosition=function(e){var t=e.adBreakDuration,i=e.playbackPosition,r=e.replaceContentDuration,o=e.resumeLiveContentAtPreviousPosition?t:0;return Math.min(i-((0,n.isDefined)(r)?t-r:o),0)};var n=i(23068)},6365:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.VastApiFramework=t.MediaFileDeliveryType=t.DEFAULT_OVERLAY_AD_BOTTOM_POSITION=t.DEFAULT_VIDEO_LOAD_TIMEOUT=t.NON_SKIPPABLE_IDENTIFIER=t.DEFAULT_PRELOAD_OFFSET=t.DEFAULT_AD_BREAK_POSITION=void 0,t.DEFAULT_AD_BREAK_POSITION="pre",t.DEFAULT_PRELOAD_OFFSET=0,t.NON_SKIPPABLE_IDENTIFIER=-1,t.DEFAULT_VIDEO_LOAD_TIMEOUT=8e3,t.DEFAULT_OVERLAY_AD_BOTTOM_POSITION="4.5em",function(e){e.Progressive="progressive",e.Streaming="streaming"}(i||(t.MediaFileDeliveryType=i={})),function(e){e.Vpaid="vpaid"}(n||(t.VastApiFramework=n={}))},65185:function(e,t){function i(e){return e.bitrate||(e.maxBitrate+e.minBitrate)/2}Object.defineProperty(t,"__esModule",{value:!0}),t.findMediaFileByResolution=function(e,t,i){return i.reduce(function(i,n){var r=Math.abs(e-i.width)+Math.abs(t-i.height);return Math.abs(e-n.width)+Math.abs(t-n.height)<r?n:i})},t.findMediaFileByBitrate=function(e,t){return t.reduce(function(t,n){var r=i(t),o=i(n),a=Math.abs(r-e);return Math.abs(o-e)<a?n:t})}},7581:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}
vendor: 6,028 bytes, line 14
14),t.VastErrorCode=t.AdvertisingModuleErrorCode=t.AdTagType=t.AdvertisingCoreModuleDefinition=void 0;var n=i(62756),r=i(43255),o=i(90176),a=i(88457);Object.defineProperty(t,"AdvertisingModuleErrorCode",{enumerable:!0,get:function(){return a.AdvertisingModuleErrorCode}});var s=i(23912);Object.defineProperty(t,"AdTagType",{enumerable:!0,get:function(){return s.AdTagType}});var l=i(47091);Object.defineProperty(t,"VastErrorCode",{enumerable:!0,get:function(){return l.VastErrorCode}}),t.AdvertisingCoreModuleDefinition={name:n.ModuleName.AdvertisingCore,module:function(){return{AdvertisingController:o.AdvertisingController,AdPlayerDelegate:r.AdPlayerDelegate}},dependencies:[n.ModuleName.XML],exports:{AdTagType:s.AdTagType,AdvertisingModuleErrorCode:a.AdvertisingModuleErrorCode,VastErrorCode:l.VastErrorCode}},t.default=t.AdvertisingCoreModuleDefinition},60326:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VastClientWrapper=void 0;var n=i(6036),r=i(6365),o=i(47091);t.VastClientWrapper=function(){function e(e,t,i){this.lL=new n.VASTClient({allowUsingBrowserStorageApi:!i}),this.lL.vastParser.initParsingStatus(),this.mL=e||r.DEFAULT_VIDEO_LOAD_TIMEOUT,this.nL=t}return e.prototype.parseManifest=function(e,t){var i=this,n=[],r=function(e){n.push({code:e.ERRORCODE})};return this.lL.vastParser.addListener("VAST-error",r),this.lL.vastParser.parseVAST(e,{timeout:this.mL,withCredentials:this.nL,replaceUnavailableAdPodAds:!t}).catch(function(e){return i.lL.vastParser.removeListener("VAST-error",r),Promise.reject({code:e&&e.ERRORCODE||o.VastErrorCode.UNDEFINED_ERROR})}).then(function(e){var t;return i.lL.vastParser.removeListener("VAST-error",r),(null==(t=e.ads)?void 0:t.length)>0?e:n.length>0?Promise.reject(n[0]):Promise.reject({code:o.VastErrorCode.UNDEFINED_ERROR})})},e}()},47091:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.VastErrorCode=void 0,function(e){e[e.XML_PARSING_ERROR=100]="XML_PARSING_ERROR",e[e.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",e[e.VERSION_NOT_SUPPORTED=102]="VERSION_NOT_SUPPORTED",e[e.TRAFFICKING_ERROR=200]="TRAFFICKING_ERROR",e[e.EXPECTING_DIFFERENT_LINEARITY=201]="EXPECTING_DIFFERENT_LINEARITY",e[e.EXPECTING_DIFFERENT_DURATION=202]="EXPECTING_DIFFERENT_DURATION",e[e.EXPECTING_DIFFERENT_SIZE=203]="EXPECTING_DIFFERENT_SIZE",e[e.GENERAL_WRAPPER_ERROR=300]="GENERAL_WRAPPER_ERROR",e[e.WRAPPER_VAST_URI_TIMEOUT=301]="WRAPPER_VAST_URI_TIMEOUT",e[e.WRAPPER_LIMIT_REACHED=302]="WRAPPER_LIMIT_REACHED",e[e.NO_ADS_VAST_RESPONSE=303]="NO_ADS_VAST_RESPONSE",e[e.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",e[e.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",e[e.MEDIAFILE_URI_TIMEOUT=402]="MEDIAFILE_URI_TIMEOUT",e[e.NO_SUPPORTED_MEDIAFILE=403]="NO_SUPPORTED_MEDIAFILE",e[e.PROBLEM_DISPLAYING_MEDIAFILE=405]="PROBLEM_DISPLAYING_MEDIAFILE",e[e.GENERAL_NONLINEARADS_ERROR=500]="GENERAL_NONLINEARADS_ERROR",e[e.NONLINEAR_AD_INVALID_DIMENSIONS=501]="NONLINEAR_AD_INVALID_DIMENSIONS",e[e.UNABLE_TO_FETCH_NONLINEAR_RESOURCE=502]="UNABLE_TO_FETCH_NONLINEAR_RESOURCE",e[e.NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE=503]="NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE",e[e.GENERAL_COMPANIONADS_ERROR=600]="GENERAL_COMPANIONADS_ERROR",e[e.COMPANION_AD_INVALID_DIMENSIONS=601]="COMPANION_AD_INVALID_DIMENSIONS",e[e.UNABLE_TO_DISPLAY_REQUIRED_COMPANION=602]="UNABLE_TO_DISPLAY_REQUIRED_COMPANION",e[e.UNABLE_TO_FETCH_COMPANION_RESOURCE=603]="UNABLE_TO_FETCH_COMPANION_RESOURCE",e[e.NO_SUPPORTED_COMPANION_RESOURCE_TYPE=604]="NO_SUPPORTED_COMPANION_RESOURCE_TYPE",e[e.UNDEFINED_ERROR=900]="UNDEFINED_ERROR",e[e.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR"}(i||(t.VastErrorCode=i={}))},5838:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VmapExtractor=void 0;var n=i(70850),r=i(88052),o=i(62756),a=i(45392),s=i(88457),l=i(23912),c=i(6365),u=i(47091);t.VmapExtractor=function(){function e(){}return e.xml2js=function(e){return(0,r.ModuleManager.get(o.ModuleName.XML).parseXML)(e,{decodeEntities:!1,useArrayRepresentationForChildren:!0})},e.js2xml=function(e){return(0,r.ModuleManager.get(o.ModuleName.XML).parseJSONtoXML)(e)},e.extractAdBreakConfigs=function(t){return e.getParsedManifest(t.tag.url).then(function(i){return i.manifest.VMAP?Promise.resolve({adBreakConfigs:e.parseVmapAdBreaks(i.manifest,t),downloadTiming:i.downloadTiming}):Promise.reject({code:s.AdvertisingModuleErrorCode.AD_TAG_TYPE_NOT_MATCHING})})},e.getParsedManifest=function(t){return a.AdManifestHelper.downloadVmapManifest(t).catch(function(){return Promise.reject({code:s.AdvertisingModuleErrorCode.COULD_NOT_LOAD_AD_MANIFEST})}).then(function(t){if(!t.body)return Promise.reject({code:u.VastErrorCode.XML_PARSING_ERROR});try{var i=e.xml2js(t.body),n=i.success?i.parsed:{},r={downloadTime:t.elapsedTime,timeToFirstByte:t.timeToFirstByte};return Promise.resolve({manifest:n,downloadTiming:r})}catch{return Promise.reject({code:u.VastErrorCode.XML_PARSING_ERROR})}})},e.parseVmapAdBreaks=function(t,i){return e.extractAdBreaks(t).map(function(e){var t,r={id:e.id||n.Util.generateUniqueId(),tag:{url:e.tag,type:l.AdTagType.VAST},position:e.offset,preloadOffset:null!=(t=i.preloadOffset)?t:c.DEFAULT_PRELOAD_OFFSET};i.hasOwnProperty("replaceContentDuration")&&(r.replaceContentDuration=i.replaceContentDuration),i.passthroughMode&&(r.passthroughMode=i.passthroughMode);var o={publicAdBreakConfig:r};return e.trackingEvents&&Object.keys(e.trackingEvents).length>0&&(o.trackingEvents=e.trackingEvents),o})||[]},e.extractAdBreaks=function(t){return t.VMAP?t.VMAP.AdBreak.map(function(t){var i=t._breakId,n=t._timeOffset;switch(n){case"start":n="pre";break;case"end":n="post"}var r=e.getAdBreakUri(t),o=[];return t.TrackingEvents&&t.TrackingEvents[0]&&t.TrackingEvents[0].Tracking&&t.TrackingEvents[0].Tracking.forEach(function(e){var t=e._event.toLocaleLowerCase();o.push({type:t,url:e.toString()})}),{id:i,offset:n,tag:r,trackingEvents:o}}):[]},e.getAdBreakUri=function(t){var i=!!(t.AdSource&&t.AdSource[0]),n=!!(i&&t.AdSource[0].AdTagURI&&t.AdSource[0].AdTagURI[0]),r
14=!!(i&&t.AdSource[0].VASTAdData&&t.AdSource[0].VASTAdData[0]);return n||r?n&&t.AdSource[0].AdTagURI[0].toString?t.AdSource[0].AdTagURI[0].toString():r?a.AdManifestHelper.toDataUri(e.js2xml(t.AdSource[0].VASTAdData[0])):void 0:""},e}()},63207:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Ad=void 0,t.Ad=function(){return function(){this.id=null,this.wrapperAdIds=[],this.sequence=null,this.system=null,this.title=null,this.description=null,this.advertiser=null,this.pricing=null,this.survey=null,this.errorURLTemplates=[],this.impressionURLTemplates=[],this.creatives=[],this.extensions=[],this.verifications=[]}}()},19637:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AdExtension=void 0,t.AdExtension=function(){function e(){this.name=null,this.value=null,this.attributes={},this.children=[]}return e.prototype.isEmpty=function(){return null===this.value&&0===Object.keys(this.attributes).length&&0===this.children.length},e}()},31472:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CompanionAd=void 0,t.CompanionAd=function(){return function(){this.id=null,this.width=0,this.height=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.altText=null,this.companionClickThroughURLTemplate=null,this.companionClickTrackingURLTemplates=[],this.trackingEvents={}}}()},36828:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Creative=void 0,t.Creative=function(){return function(e){void 0===e&&(e={}),this.id=e.id||null,this.adId=e.adId||null,this.universalAdId=e.universalAdId||null,this.sequence=e.sequence||null,this.apiFramework=e.apiFramework||null,this.trackingEvents={}}}()},81214:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CreativeCompanion=void 0,t.CreativeCompanion=function(e){function t(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i.type="companion",i.variations=[],i}return n(t,e),t}(i(36828).Creative)},77615:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CreativeLinear=void 0,t.CreativeLinear=function(e){function t(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i.type="linear",i.duration=0,i.skipDelay=null,i.mediaFiles=[],i.videoClickThroughURLTemplate=null,i.videoClickTrackingURLTemplates=[],i.videoCustomClickURLTemplates=[],i.adParameters=null,i.icons=[],i}return n(t,e),t}(i(36828).Creative)},35475:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CreativeNonLinear=void 0,t.CreativeNonLinear=function(e){function t(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i.type="nonlinear",i.variations=[],i}return n(t,e),t}(i(36828).Creative)}
vendor: 29,431 bytes, line 14
14,50199:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0,t.Icon=function(){return function(){this.program=null,this.height=0,this.width=0,this.xPosition=0,this.yPosition=0,this.apiFramework=null,this.offset=null,this.duration=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.iconClickThroughURLTemplate=null,this.iconClickTrackingURLTemplates=[],this.iconViewTrackingURLTemplate=null}}()},36629:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MediaFile=void 0,t.MediaFile=function(){return function(){this.id=null,this.fileURL=null,this.deliveryType="progressive",this.mimeType=null,this.codec=null,this.bitrate=0,this.minBitrate=0,this.maxBitrate=0,this.width=0,this.height=0,this.apiFramework=null,this.scalable=null,this.maintainAspectRatio=null}}()},57219:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NonLinearAd=void 0,t.NonLinearAd=function(){return function(){this.id=null,this.width=0,this.height=0,this.expandedWidth=0,this.expandedHeight=0,this.scalable=!0,this.maintainAspectRatio=!0,this.minSuggestedDuration=0,this.apiFramework="static",this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.nonlinearClickThroughURLTemplate=null,this.nonlinearClickTrackingURLTemplates=[],this.adParameters=null}}()},71119:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAd=function(e){var t=e.childNodes;for(var i in t){var n=t[i];if(-1!==["Wrapper","InLine"].indexOf(n.nodeName)){if(l.parserUtils.copyNodeAttribute("id",e,n),l.parserUtils.copyNodeAttribute("sequence",e,n),"Wrapper"===n.nodeName)return u(n);if("InLine"===n.nodeName)return c(n)}}},t.parseExtensions=d;var n=i(63207),r=i(19637),o=i(93088),a=i(2035),s=i(64815),l=i(75065);function c(e){var t=e.childNodes,i=new n.Ad;for(var r in i.id=e.getAttribute("id")||null,i.sequence=e.getAttribute("sequence")||null,t){var c=t[r];switch(c.nodeName){case"Error":i.errorURLTemplates.push(l.parserUtils.parseNodeText(c));break;case"Impression":i.impressionURLTemplates.push(l.parserUtils.parseNodeText(c));break;case"Creatives":l.parserUtils.childrenByName(c,"Creative").forEach(function(e){var t={id:e.getAttribute("id")||null,adId:f(e),sequence:e.getAttribute("sequence")||null,apiFramework:e.getAttribute("apiFramework")||null};for(var n in e.childNodes){var r=e.childNodes[n];switch(r.nodeName){case"UniversalAdId":t.universalAdId=m(r);break;case"Linear":var l=(0,a.parseCreativeLinear)(r,t);l&&i.creatives.push(l);break;case"NonLinearAds":var c=(0,s.parseCreativeNonLinear)(r,t);c&&i.creatives.push(c);break;case"CompanionAds":var u=(0,o.parseCreativeCompanion)(r,t);u&&i.creatives.push(u)}}});break;case"Extensions":i.extensions=d(l.parserUtils.childrenByName(c,"Extension"),i);break;case"AdSystem":i.system={value:l.parserUtils.parseNodeText(c),version:c.getAttribute("version")||null};break;case"AdTitle":i.title=l.parserUtils.parseNodeText(c);break;case"Description":i.description=l.parserUtils.parseNodeText(c);break;case"Advertiser":i.advertiser={name:l.parserUtils.parseNodeText(c),id:c.getAttribute("id")||null};break;case"Pricing":i.pricing={value:l.parserUtils.parseNodeText(c),model:c.getAttribute("model")||null,currency:c.getAttribute("currency")||null};break;case"Survey":i.survey={uri:l.parserUtils.parseNodeText(c),type:c.getAttribute("type")||null};break;case"AdVerifications":p(i.verifications,l.parserUtils.childrenByName(c,"Verification"))}}return i}function u(e){var t=c(e),i=l.parserUtils.childByName(e,"VASTAdTagURI");if(i?t.nextWrapperURL=l.parserUtils.parseNodeText(i):(i=l.parserUtils.childByName(e,"VASTAdTagURL"))&&(t.nextWrapperURL=l.parserUtils.parseNodeText(l.parserUtils.childByName(i,"URL"))),t.creatives.forEach(function(e){if(-1!==["linear","nonlinear"].indexOf(e.type)){if(e.trackingEvents){t.trackingEvents||(t.trackingEvents={}),t.trackingEvents[e.type]||(t.trackingEvents[e.type]={});var i=function(i){var n=e.trackingEvents[i];t.trackingEvents[e.type][i]||(t.trackingEvents[e.type][i]=[]),n.forEach(function(n){t.trackingEvents[e.type][i].push(n)})};for(var n in e.trackingEvents)i(n)}e.videoClickTrackingURLTemplates&&(t.videoClickTrackingURLTemplates||(t.videoClickTrackingURLTemplates=[]),e.videoClickTrackingURLTemplates.forEach(function(e){t.videoClickTrackingURLTemplates.push(e)})),e.videoClickThroughURLTemplate&&(t.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate),e.videoCustomClickURLTemplates&&(t.videoCustomClickURLTemplates||(t.videoCustomClickURLTemplates=[]),e.videoCustomClickURLTemplates.forEach(function(e){t.videoCustomClickURLTemplates.push(e)}))}}),t.nextWrapperURL)return t}function d(e,t){var i=[];return e.forEach(function(e){var n=h(e,t);n&&i.push(n)}),i}function h(e,t){if("#comment"===e.nodeName)return null;var i=new r.AdExtension,n=e.attributes,o=e.childNodes;if(i.name=e.nodeName,e.attributes){for(var a in n)if(n.hasOwnProperty(a)){var s=n[a];s.nodeName&&s.nodeValue&&(i.attributes[s.nodeName]=s.nodeValue)}}for(var c in o)if(o.hasOwnProperty(c)){if("AdVerifications"===o[c].nodeName){p(t.verifications,l.parserUtils.childrenByName(o[c],"Verification"));continue}var u=h(o[c],t);u&&i.children.push(u)}if(0===i.children.length||1===i.children.length&&["#cdata-section","#text"].indexOf(i.children[0].name)>=0){var d=l.parserUtils.parseNodeText(e);""!==d&&(i.value=d),i.children=[]}return i.isEmpty()?null:i}function p(e,t){var i=["Verification","JavaScriptResource","ExecutableResource","TrackingEvents","Tracking","VerificationParameters"],n=function(e){var t={},r=l.parserUtils.parseNodeText(e);return Object.keys(e.attributes).forEach(function(i){var n=e.attributes[i].nodeName,r=e.attributes[i].nodeValue;n&&r&&(t[n]=r)}),"#comment"!==e.nodeName&&""!==r&&(e.children&&e.children.length>0?e.childNodes.forEach(function(e){i.includes(e.nodeName)&&(t[e.nodeName]||(t[e.nodeName]=[]),t[e.nodeName].push(n(e)))}):t.content=r),t};t.forEach(function(t){var i=n(t);e.push(i)})}function f(e){return e.getAttribute("AdID")||e.getAttribute("adID")||e.getAttribute("adId")||null}function m(e){return{idRegistry:e.getAttribute("idRegistry")||"unknown",value:l.parserUtils.parseNodeText(e)||"unknown"}}},93088:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCreativeCompanion=function(e,t){var i=new r.CreativeCompanion(t);return o.parserUtils.childrenByName(e,"Companion").forEach(function(e){var t=new n.CompanionAd;t.id=e.getAttribute("id")||null,t.width=e.getAttribute("width"),t.height=e.getAttribute("height"),t.companionClickTrackingURLTemplates=[],o.parserUtils.childrenByName(e,"HTMLResource").forEach(function(e){t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=o.parserUtils.parseNodeText(e)}),o.parserUtils.childrenByName(e,"IFrameResource").forEach(function(e){t.type=e.getAttribute("creativeType")||0,t.iframeResource=o.parserUtils.parseNodeText(e)}),o.parserUtils.childrenByName(e,"StaticResource").forEach(function(i){t.type=i.getAttribute("creativeType")||0,o.parserUtils.childrenByName(e,"AltText").forEach(function(e){t.altText=o.parserUtils.parseNodeText(e)}),t.staticResource=o.parserUtils.parseNodeText(i)}),o.parserUtils.childrenByName(e,"TrackingEvents").forEach(function(e){o.parserUtils.childrenByName(e,"Tracking").forEach(function(e){var i=e.getAttribute("event"),n=o.parserUtils.parseNodeText(e);i&&n&&(null==t.trackingEvents[i]&&(t.trackingEvents[i]=[]),t.trackingEvents[i].push(n))})}),o.parserUtils.childrenByName(e,"CompanionClickTracking").forEach(function(e){t.companionClickTrackingURLTemplates.push(o.parserUtils.parseNodeText(e))}),t.companionClickThroughURLTemplate=o.parserUtils.parseNodeText(o.parserUtils.childByName(e,"CompanionClickThrough")),t.companionClickTrackingURLTemplate=o.parserUtils.parseNodeText(o.parserUtils.childByName(e,"CompanionClickTracking")),i.variations.push(t)}),i};var n=i(31472),r=i(81214),o=i(75065)},2035:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCreativeLinear=function(e,t){var i,s=new n.CreativeLinear(t);s.duration=a.parserUtils.parseDuration(a.parserUtils.parseNodeText(a.parserUtils.childByName(e,"Duration")));var l=e.getAttribute("skipoffset");if(null==l)s.skipDelay=null;else if("%"===l.charAt(l.length-1)&&-1!==s.duration){var c=parseInt(l,10);s.skipDelay=s.duration*(c/100)}else s.skipDelay=a.parserUtils.parseDuration(l);var u=a.parserUtils.childByName(e,"VideoClicks");u&&(s.videoClickThroughURLTemplate=a.parserUtils.parseNodeText(a.parserUtils.childByName(u,"ClickThrough")),a.parserUtils.childrenByName(u,"ClickTracking").forEach(function(e){s.videoClickTrackingURLTemplates.push(a.parserUtils.parseNodeText(e))}),a.parserUtils.childrenByName(u,"CustomClick").forEach(function(e){s.videoCustomClickURLTemplates.push(a.parserUtils.parseNodeText(e))}));var d=a.parserUtils.childByName(e,"AdParameters");d&&(s.adParameters=a.parserUtils.parseNodeText(d)),a.parserUtils.childrenByName(e,"TrackingEvents").forEach(function(e){a.parserUtils.childrenByName(e,"Tracking").forEach(function(e){var t=e.getAttribute("event"),n=a.parserUtils.parseNodeText(e);if(t&&n){if("progress"===t){if(!(i=e.getAttribute("offset")))return;t="%"===i.charAt(i.length-1)?"progress-".concat(i):"progress-".concat(Math.round(a.parserUtils.parseDuration(i)))}null==s.trackingEvents[t]&&(s.trackingEvents[t]=[]),s.trackingEvents[t].push(n)}})}),a.parserUtils.childrenByName(e,"MediaFiles").forEach(function(e){a.parserUtils.childrenByName(e,"MediaFile").forEach(function(e){var t=new o.MediaFile;t.id=e.getAttribute("id"),t.fileURL=a.parserUtils.parseNodeText(e),t.deliveryType=e.getAttribute("delivery"),t.codec=e.getAttribute("codec"),t.mimeType=e.getAttribute("type"),t.apiFramework=e.getAttribute("apiFramework"),t.bitrate=parseInt(e.getAttribute("bitrate")||0),t.minBitrate=parseInt(e.getAttribute("minBitrate")||0),t.maxBitrate=parseInt(e.getAttribute("maxBitrate")||0),t.width=parseInt(e.getAttribute("width")||0),t.height=parseInt(e.getAttribute("height")||0);var i=e.getAttribute("scalable");i&&"string"==typeof i&&("true"===(i=i.toLowerCase())?t.scalable=!0:"false"===i&&(t.scalable=!1));var n=e.getAttribute("maintainAspectRatio");n&&"string"==typeof n&&("true"===(n=n.toLowerCase())?t.maintainAspectRatio=!0:"false"===n&&(t.maintainAspectRatio=!1)),s.mediaFiles.push(t)})});var h=a.parserUtils.childByName(e,"Icons");return h&&a.parserUtils.childrenByName(h,"Icon").forEach(function(e){var t=new r.Icon;t.program=e.getAttribute("program"),t.height=parseInt(e.getAttribute("height")||0),t.width=parseInt(e.getAttribute("width")||0),t.xPosition=function(e){return -1!==["left","right"].indexOf(e)?e:parseInt(e||0)}(e.getAttribute("xPosition")),t.yPosition=function(e){return -1!==["top","bottom"].indexOf(e)?e:parseInt(e||0)}(e.getAttribute("yPosition")),t.apiFramework=e.getAttribute("apiFramework"),t.offset=a.parserUtils.parseDuration(e.getAttribute("offset")),t.duration=a.parserUtils.parseDuration(e.getAttribute("duration")),a.parserUtils.childrenByName(e,"HTMLResource").forEach(function(e){t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=a.parserUtils.parseNodeText(e)}),a.parserUtils.childrenByName(e,"IFrameResource").forEach(function(e){t.type=e.getAttribute("creativeType")||0,t.iframeResource=a.parserUtils.parseNodeText(e)}),a.parserUtils.childrenByName(e,"StaticResource").forEach(function(e){t.type=e.getAttribute("creativeType")||0,t.staticResource=a.parserUtils.parseNodeText(e)});var i=a.parserUtils.childByName(e,"IconClicks");i&&(t.iconClickThroughURLTemplate=a.parserUtils.parseNodeText(a.parserUtils.childByName(i,"IconClickThrough")),a.parserUtils.childrenByName(i,"IconClickTracking").forEach(function(e){t.iconClickTrackingURLTemplates.push(a.parserUtils.parseNodeText(e))})),t.iconViewTrackingURLTemplate=a.parserUtils.parseNodeText(a.parserUtils.childByName(e,"IconViewTracking")),s.icons.push(t)}),s};var n=i(77615),r=i(50199),o=i(36629),a=i(75065)},64815:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCreativeNonLinear=function(e,t){var i=new n.CreativeNonLinear(t);return o.parserUtils.childrenByName(e,"TrackingEvents").forEach(function(e){var t,n;o.parserUtils.childrenByName(e,"Tracking").forEach(function(e){t=e.getAttribute("event"),n=o.parserUtils.parseNodeText(e),t&&n&&(null==i.trackingEvents[t]&&(i.trackingEvents[t]=[]),i.trackingEvents[t].push(n))})}),o.parserUtils.childrenByName(e,"NonLinear").forEach(function(e){var t=new r.NonLinearAd;t.id=e.getAttribute("id")||null,t.width=e.getAttribute("width"),t.height=e.getAttribute("height"),t.expandedWidth=e.getAttribute("expandedWidth"),t.expandedHeight=e.getAttribute("expandedHeight"),t.scalable=o.parserUtils.parseBoolean(e.getAttribute("scalable")),t.maintainAspectRatio=o.parserUtils.parseBoolean(e.getAttribute("maintainAspectRatio")),t.minSuggestedDuration=o.parserUtils.parseDuration(e.getAttribute("minSuggestedDuration")),t.apiFramework=e.getAttribute("apiFramework"),o.parserUtils.childrenByName(e,"HTMLResource").forEach(function(e){t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=o.parserUtils.parseNodeText(e)}),o.parserUtils.childrenByName(e,"IFrameResource").forEach(function(e){t.type=e.getAttribute("creativeType")||0,t.iframeResource=o.parserUtils.parseNodeText(e)}),o.parserUtils.childrenByName(e,"StaticResource").forEach(function(e){t.type=e.getAttribute("creativeType")||0,t.staticResource=o.parserUtils.parseNodeText(e)});var n=o.parserUtils.childByName(e,"AdParameters");n&&(t.adParameters=o.parserUtils.parseNodeText(n)),t.nonlinearClickThroughURLTemplate=o.parserUtils.parseNodeText(o.parserUtils.childByName(e,"NonLinearClickThrough")),o.parserUtils.childrenByName(e,"NonLinearClickTracking").forEach(function(e){t.nonlinearClickTrackingURLTemplates.push(o.parserUtils.parseNodeText(e))}),i.variations.push(t)}),i};var n=i(35475),r=i(57219),o=i(75065)},75065:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parserUtils=void 0;var n=i(11417);t.parserUtils={childByName:function(e,t){var i=e.childNodes;for(var n in i){var r=i[n];if(r.nodeName===t)return r}},childrenByName:function(e,t){var i=[],n=e.childNodes;for(var r in n){var o=n[r];o.nodeName===t&&i.push(o)}return i},resolveVastAdTagURI:function(e,t){if(!t)return e;if(0===e.indexOf("//")){var i=location.protocol;return"".concat(i).concat(e)}if(-1===e.indexOf("://")){var n=t.slice(0,t.lastIndexOf("/"));return"".concat(n,"/").concat(e)}return e},parseBoolean:function(e){return -1!==["true","TRUE","1"].indexOf(e)},parseNodeText:function(e){return e&&(e.textContent||e.text||"").trim()},copyNodeAttribute:function(e,t,i){var n=t.getAttribute(e);n&&i.setAttribute(e,n)},parseDuration:function(e){if(null==e)return -1;if(n.util.isNumeric(e))return parseInt(e);var t=e.split(":");if(3!==t.length)return -1;var i=t[2].split("."),r=parseInt(i[0]);2===i.length&&(r+=parseFloat("0.".concat(i[1])));var o=parseInt(60*t[1]),a=parseInt(60*t[0]*60);return isNaN(a)||isNaN(o)||isNaN(r)||o>3600||r>60?-1:a+o+r},splitVAST:function(e){var t=[],i=null;return e.forEach(function(n,r){if(n.sequence&&(n.sequence=parseInt(n.sequence,10)),n.sequence>1){var o=e[r-1];if(o&&o.sequence===n.sequence-1)return void(i&&i.push(n));delete n.sequence}i=[n],t.push(i)}),t},mergeWrapperAdData:function(e,t){if(e.errorURLTemplates=t.errorURLTemplates.concat(e.errorURLTemplates),e.impressionURLTemplates=t.impressionURLTemplates.concat(e.impressionURLTemplates),e.extensions=t.extensions.concat(e.extensions),e.verifications=t.verifications.concat(e.verifications),e.wrapperAdIds.push(t.id),e.creatives.forEach(function(e){if(t.trackingEvents&&t.trackingEvents[e.type])for(var i in t.trackingEvents[e.type]){var n=t.trackingEvents[e.type][i];e.trackingEvents[i]||(e.trackingEvents[i]=[]),e.trackingEvents[i]=e.trackingEvents[i].concat(n)}}),t.videoClickTrackingURLTemplates&&t.videoClickTrackingURLTemplates.length&&e.creatives.forEach(function(e){"linear"===e.type&&(e.videoClickTrackingURLTemplates=e.videoClickTrackingURLTemplates.concat(t.videoClickTrackingURLTemplates))}),t.videoCustomClickURLTemplates&&t.videoCustomClickURLTemplates.length&&e.creatives.forEach(function(e){"linear"===e.type&&(e.videoCustomClickURLTemplates=e.videoCustomClickURLTemplates.concat(t.videoCustomClickURLTemplates))}),t.videoClickThroughURLTemplate&&e.creatives.forEach(function(e){"linear"===e.type&&null==e.videoClickThroughURLTemplate&&(e.videoClickThroughURLTemplate=t.videoClickThroughURLTemplate)}),e.fallbackAdSequence&&e.sequence!==e.fallbackAdSequence)(t.sequence||t.fallbackAdSequence)&&(e.sequence=null,e.fallbackAdSequence=t.fallbackAdSequence||t.sequence);else if(t.fallbackAdSequence)e.sequence=null,e.fallbackAdSequence=t.fallbackAdSequence||t.sequence;else{if(!t.sequence&&!t.fallbackAdSequence)return;e.sequence=t.sequence}}}},29902:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.VASTParser=void 0;var o=i(71119),a=i(37007),s=i(75065),l=i(27294),c=i(11417),u=i(71076),d={ERRORCODE:900,extensions:[]};t.VASTParser=function(e){function t(){var t=e.call(this)||this;return t.remainingAds=[],t.parentURLs=[],t.errorURLTemplates=[],t.rootErrorURLTemplates=[],t.maxWrapperDepth=null,t.URLTemplateFilters=[],t.fetchingOptions={},t.currentAdSequence=null,t}return n(t,e),t.prototype.addURLTemplateFilter=function(e){"function"==typeof e&&this.URLTemplateFilters.push(e)},t.prototype.removeURLTemplateFilter=function(){this.URLTemplateFilters.pop()},t.prototype.countURLTemplateFilters=function(){return this.URLTemplateFilters.length},t.prototype.clearURLTemplateFilters=function(){this.URLTemplateFilters=[]},t.prototype.trackVastError=function(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];this.emit("VAST-error",Object.assign.apply(Object,r([d,t],i,!1))),c.util.track(e,t)},t.prototype.getErrorURLTemplates=function(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)},t.prototype.fetchVAST=function(e,t,i){var n=this;return new Promise(function(r,o){n.URLTemplateFilters.forEach(function(t){e=t(e)}),n.parentURLs.push(e),n.emit("VAST-resolving",{url:e,wrapperDepth:t,originalUrl:i}),n.urlHandler.get(e,n.fetchingOptions,function(t,i){n.emit("VAST-resolved",{url:e,error:t}),t?o(t):r(i)})})},t.prototype.initParsingStatus=function(e){void 0===e&&(e={}),this.rootURL="",this.remainingAds=[],this.parentURLs=[],this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.maxWrapperDepth=e.wrapperLimit||10,this.fetchingOptions={timeout:e.timeout,withCredentials:e.withCredentials},this.urlHandler=e.urlhandler||l.urlHandler},t.prototype.getRemainingAds=function(e){var t=this;if(0===this.remainingAds.length)return Promise.reject(Error("No more ads are available for the given VAST"));var i=e?c.util.flatten(this.remainingAds):this.remainingAds.shift();return this.errorURLTemplates=[],this.parentURLs=[],this.resolveAds(i,{wrapperDepth:0,originalUrl:this.rootURL}).then(function(e){return t.buildVASTResponse(e)})},t.prototype.getAndParseVAST=function(e,t){var i=this;return void 0===t&&(t={}),this.initParsingStatus(t),this.rootURL=e,this.fetchVAST(e).then(function(n){return t.originalUrl=e,t.isRootVAST=!0,i.parse(n,t).then(function(e){return i.buildVASTResponse(e,t)})})},t.prototype.parseVAST=function(e,t){var i=this;return void 0===t&&(t={}),this.initParsingStatus(t),t.isRootVAST=!0,this.parse(e,t).then(function(e){return i.buildVASTResponse(e,t)})},t.prototype.getPodAds=function(e){return e.filter(function(e){return null!=e.sequence})},t.prototype.getStandaloneAds=function(e){return e.filter(function(e){return null==e.sequence})},t.prototype.hasMediaFiles=function(e){return!(!e||null!=e.errorCode)&&(Array.isArray(e.creatives)?e.creatives:[]).some(function(e){return e.mediaFiles&&e.mediaFiles.length>0})},t.prototype.replaceUnavailableAdPodAds=function(e){var t=this,i=this.getPodAds(e),n=this.getStandaloneAds(e).filter(this.hasMediaFiles);return 0===i.length||0===n.length?e:(i=i.map(function(e){return t.hasMediaFiles(e)?e:n.shift()}).filter(Boolean),n.forEach(function(e){return e.isFallback=!0}),i.concat(n))},t.prototype.markFallbackAds=function(e){return this.getPodAds(e).length>0&&this.getStandaloneAds(e).forEach(function(e){return e.isFallback=!0}),e},t.prototype.buildVASTResponse=function(e,t){void 0===t&&(t={});var i=new u.VASTResponse;return i.errorURLTemplates=this.getErrorURLTemplates(),e.forEach(function(e){return e.isFallback=!1}),i.ads=t.replaceUnavailableAdPodAds?this.replaceUnavailableAdPodAds(e):this.markFallbackAds(e),this.completeWrapperResolving(i),i},t.prototype.parse=function(e,t){var i=this,n=t.resolveAll,r=void 0===n||n,a=t.wrapperSequence,l=void 0===a?null:a,c=t.originalUrl,u=void 0===c?null:c,d=t.wrapperDepth,h=void 0===d?0:d,p=t.isRootVAST,f=void 0!==p&&p,m=t.parentAdSequence,g=void 0===m?null:m;if(!e||!e.documentElement||"VAST"!==e.documentElement.nodeName)return Promise.reject(Error("Invalid VAST XMLDocument"));var v=[],y=e.documentElement.childNodes;for(var b in y){var S=y[b];if("Error"===S.nodeName){var _=s.parserUtils.parseNodeText(S);f?this.rootErrorURLTemplates.push(_):this.errorURLTemplates.push(_)}if("Ad"===S.nodeName){var E=(0,o.parseAd)(S);E?v.push(E):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}var T=v.length,w=v[T-1];return 1===T&&null!=l&&w&&!w.sequence&&(w.sequence=l),v.forEach(function(e){return i.handleFallbackAdSequence(e,g)}),!1===r&&(this.remainingAds=s.parserUtils.splitVAST(v),v=this.remainingAds.shift()),this.resolveAds(v,{wrapperDepth:h,originalUrl:u})},t.prototype.handleFallbackAdSequence=function(e,t){null==e.sequence?e.fallbackAdSequence=t||this.currentAdSequence:this.currentAdSequence=e.sequence},t.prototype.resolveAds=function(e,t){var i=this;void 0===e&&(e=[]);var n=t.wrapperDepth,r=t.originalUrl,o=[];return e.forEach(function(e){var t=i.resolveWrappers(e,n,r);o.push(t)}),Promise.all(o).then(function(e){var t=c.util.flatten(e);if(!t&&i.remainingAds.length>0){var o=i.remainingAds.shift();return i.resolveAds(o,{wrapperDepth:n,originalUrl:r})}return t})},t.prototype.resolveWrappers=function(e,t,i){var n=this;return new Promise(function(r){if(t++,!e.nextWrapperURL)return delete e.nextWrapperURL,r(e);if(t>=n.maxWrapperDepth||-1!==n.parentURLs.indexOf(e.nextWrapperURL))return e.errorCode=302,delete e.nextWrapperURL,r(e);e.nextWrapperURL=s.parserUtils.resolveVastAdTagURI(e.nextWrapperURL,i);var o=e.sequence;i=e.nextWrapperURL,n.fetchVAST(e.nextWrapperURL,t,i).then(function(a){return n.parse(a,{originalUrl:i,wrapperSequence:o,wrapperDepth:t,parentAdSequence:e.sequence||e.fallbackAdSequence}).then(function(t){if(delete e.nextWrapperURL,0===t.length)return e.creatives=[],r(e);t.forEach(function(t){t&&s.parserUtils.mergeWrapperAdData(t,e)}),r(t)})}).catch(function(t){e.errorCode=301,e.errorMessage=t.message,r(e)})})},t.prototype.completeWrapperResolving=function(e){if(0===e.ads.length)this.trackVastError(e.errorURLTemplates,{ERRORCODE:303});else for(var t=e.ads.length-1;t>=0;t--){var i=e.ads[t];(i.errorCode||0===i.creatives.length)&&(this.trackVastError(i.errorURLTemplates.concat(e.errorURLTemplates),{ERRORCODE:i.errorCode||303},{ERRORMESSAGE:i.errorMessage||""},{extensions:i.extensions},{system:i.system}),e.ads.splice(t,1))}},t}(a.EventEmitter)},27294:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.urlHandler=void 0;var n=i(82664),r=i(13769),o=i(2860);t.urlHandler={get:function(e,t,i){return i||("function"==typeof t&&(i=t),t={}),typeof window>"u"||null===window?r.nodeURLHandler.get(e,t,i):o.XHRURLHandler.supported()?o.XHRURLHandler.get(e,t,i):n.flashURLHandler.supported()?n.flashURLHandler.get(e,t,i):i(Error("Current context is not supported by any of the default URLHandlers. Please provide a custom URLHandler"))}}},82664:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.flashURLHandler=void 0,t.flashURLHandler={get:function(e,t,i){var n="function"==typeof window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLDOM"):void 0;if(!n)return i(Error("FlashURLHandler: Microsoft.XMLDOM format not supported"));n.async=!1;var r=r();request.open("GET",e),request.timeout=t.timeout||0,request.withCredentials=t.withCredentials||!1,request.send(),request.onprogress=function(){},request.onload=function(){n.loadXML(request.responseText),i(null,n)}},supported:function(){return!!function(){var e;return window.XDomainRequest&&(e=new XDomainRequest),e}()}}},13769:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.nodeURLHandler=void 0,t.nodeURLHandler={get:function(e,t,i){i(Error("Please bundle the library for node to use the node urlHandler"))}}},2860:function(e,t){function i(){try{var e=new window.XMLHttpRequest;return"withCredentials"in e?e:null}catch(e){return console.log("Error in XHRURLHandler support check:",e),null}}Object.defineProperty(t,"__esModule",{value:!0}),t.XHRURLHandler=void 0,t.XHRURLHandler={get:function(e,t,n){if("https:"===window.location.protocol&&0===e.indexOf("http://"))return n(Error("XHRURLHandler: Cannot go from HTTPS to HTTP."));try{var r=i();r.open("GET",e),r.timeout=t.timeout||0,r.withCredentials=t.withCredentials||!1,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(null,r.responseXML):n(Error("XHRURLHandler: ".concat(r.statusText))))},r.send()}catch{n(Error("XHRURLHandler: Unexpected error"))}},supported:function(){return!!i()}}},1100:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var i=null,n={data:{},length:0,getItem:function(e){return this.data[e]},setItem:function(e,t){this.data[e]=t,this.length=Object.keys(this.data).length},removeItem:function(e){delete data[e],this.length=Object.keys(this.data).length},clear:function(){this.data={},this.length=0}};t.Storage=function(){function e(e){this.storage=this.initStorage(e)}return e.prototype.initStorage=function(e){if(i&&(typeof window>"u"||null===window||Object.getPrototypeOf(i)!==window.Storage.prototype||e))return i;try{i="u">typeof window&&null!==window?window.localStorage||window.sessionStorage:null}catch{i=null}return i&&e&&!this.isStorageDisabled(i)||(i=n).clear(),i},e.prototype.isStorageDisabled=function(e){var t="__VASTStorage__";try{if(e.setItem(t,t),e.getItem(t)!==t)return e.removeItem(t),!0}catch{return!0}return e.removeItem(t),!1},e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.setItem=function(e,t){return this.storage.setItem(e,t)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.clear=function(){return this.storage.clear()},e}()},11417:function(e,t){function i(e,t){void 0===t&&(t={});var i=[];t.ASSETURI&&(t.ASSETURI=n(t.ASSETURI)),t.CONTENTPLAYHEAD&&(t.CONTENTPLAYHEAD=n(t.CONTENTPLAYHEAD)),t.ERRORCODE&&!/^[0-9]{3}$/.test(t.ERRORCODE)&&(t.ERRORCODE=900),t.CACHEBUSTING=r(Math.round(1e8*Math.random()).toString()),t.TIMESTAMP=n(new Date().toISOString()),t.RANDOM=t.random=t.CACHEBUSTING;for(var o=0,a=e;o<a.length;o++){var s=a[o];if("string"==typeof s){for(var l in t){var c=t[l],u="[".concat(l,"]"),d="%%".concat(l,"%%");s=(s=s.replace(u,c)).replace(d,c)}i.push(s)}}return i}function n(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%".concat(e.charCodeAt(0).toString(16))})}function r(e){return e.length<8?o(0,8-e.length,!1).map(function(e){return"0"}).join("")+e:e}function o(e,t,i){for(var n=[],r=e<t,o=i?r?t+1:t-1:t,a=e;r?a<o:a>o;r?a++:a--)n.push(a);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.util=void 0,t.util={track:function(e,t){i(e,t).forEach(function(e){"u">typeof window&&null!==window&&(new Image().src=e)})},resolveURLTemplates:i,encodeURIComponentRFC3986:n,leftpad:r,range:o,isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},flatten:function e(t){return t.reduce(function(t,i){return t.concat(Array.isArray(i)?e(i):i)},[])}}},6036:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VASTClient=void 0;var n=i(1100),r=i(29902);t.VASTClient=function(){function e(e){e=e||{},this.cappingFreeLunch=e.cappingFreeLunch||0,this.cappingMinimumTimeInterval=e.cappingMinimumTimeInterval||0,this.defaultOptions={withCredentials:!1,timeout:0},this.vastParser=new r.VASTParser;var t=null==e.allowUsingBrowserStorageApi||e.allowUsingBrowserStorageApi;this.storage=e.customStorage||new n.Storage(t),void 0===this.lastSuccessfulAd&&(this.lastSuccessfulAd=0),void 0===this.totalCalls&&(this.totalCalls=0),void 0===this.totalCallsTimeout&&(this.totalCallsTimeout=0)}return e.prototype.getParser=function(){return this.vastParser},Object.defineProperty(e.prototype,"lastSuccessfulAd",{get:function(){return this.storage.getItem("vast-client-last-successful-ad")},set:function(e){this.storage.setItem("vast-client-last-successful-ad",e)}
14,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalCalls",{get:function(){return this.storage.getItem("vast-client-total-calls")},set:function(e){this.storage.setItem("vast-client-total-calls",e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalCallsTimeout",{get:function(){return this.storage.getItem("vast-client-total-calls-timeout")},set:function(e){this.storage.setItem("vast-client-total-calls-timeout",e)},enumerable:!1,configurable:!0}),e.prototype.hasRemainingAds=function(){return this.vastParser.remainingAds.length>0},e.prototype.getNextAds=function(e){return this.vastParser.getRemainingAds(e)},e.prototype.get=function(e,t){var i=this;void 0===t&&(t={});var n=Date.now();return(t=Object.assign(this.defaultOptions,t)).hasOwnProperty("resolveAll")||(t.resolveAll=!1),this.totalCallsTimeout<n?(this.totalCalls=1,this.totalCallsTimeout=n+36e5):this.totalCalls++,new Promise(function(r,o){if(i.cappingFreeLunch>=i.totalCalls)return o(Error("VAST call canceled – FreeLunch capping not reached yet ".concat(i.totalCalls,"/").concat(i.cappingFreeLunch)));var a=n-i.lastSuccessfulAd;if(a<0)i.lastSuccessfulAd=0;else if(a<i.cappingMinimumTimeInterval)return o(Error("VAST call canceled – (".concat(i.cappingMinimumTimeInterval,")ms minimum interval reached")));i.vastParser.getAndParseVAST(e,t).then(function(e){return r(e)}).catch(function(e){return o(e)})})},e}()},71076:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VASTResponse=void 0,t.VASTResponse=function(){return function(){this.ads=[],this.errorURLTemplates=[]}}()}},function(e){return function(){return e(e.s=7581)}()}])})}()}(bitmovinplayerAdvertisingCore);var bitmovinplayerAdvertisingCoreExports=bitmovinplayerAdvertisingCore.exports;let AdvertisingCoreModule=getDefaultExportFromCjs$1(bitmovinplayerAdvertisingCoreExports);function defaultVideoQuality(){return{isAuto:!0,id:"auto",height:0,width:0}}class SubtitleHandler{constructor(){Si(this,"subtitles",[])}handleSubtitleEvent(e,t){return this.updateSubtitles(e),this.getMappedEvent(t)}updateSubtitles(e){let t=`${e.subtitleId}-${e.text}`;e.type===bitmovinplayerCoreExports.PlayerEvent.CueEnter?this.addSubtitle({id:t,text:e.html??e.text,startTime:e.start,endTime:e.end}):e.type===bitmovinplayerCoreExports.PlayerEvent.CueUpdate?this.updateExistingSubtitle(e,t):e.type===bitmovinplayerCoreExports.PlayerEvent.CueExit&&this.removeSubtitle(t)}updateExistingSubtitle(e,t){let i=t=>t.startTime===e.start&&t.endTime===e.end,n=t=>t.text===e.text||t.text===e.html,r=this.subtitles.length>=0?this.subtitles[this.subtitles.length-1]:void 0,o=this.subtitles.find(e=>i(e)||n(e))??r;o&&(o.text=e.html??e.text,o.id=t,o.endTime=e.end,o.startTime=e.start)}removeSubtitle(e){this.subtitles=this.subtitles.filter(t=>t.id!==e)}addSubtitle(e){this.subtitles.push(e)}getMappedEvent(e){return{type:"subtitleUpdate",playerId:e,currentSubtitleHtmls:this.subtitles.flatMap(e=>e.text)}}resetAndGetEvent(e){return this.subtitles=[],this.getMappedEvent(e)}}function isMediaTimeWithinTheLast3Secs(e,t){return e>0&&3>Math.abs(e-t)}function calculateAdType(e,t,i){return 3>Math.abs(e-t)?"PRE_ROLL":isMediaTimeWithinTheLast3Secs(i,e)?"POST_ROLL":"MID_ROLL"}function mapBitmovinPlayerEvent(e,t,i){var n;if(isAirplayChangedEvent(e))return{type:"airPlayAvailabilityChanged",playerId:t,isAirPlayAvailable:e.airplayEnabled};if(isAudioChangedEvent(e))return{type:"audioChanged",language:e.targetAudio.lang,previousLanguage:null==(n=e.sourceAudio)?void 0:n.lang,playerId:t,issuer:i.getCurrentSetAudioTrackIssuer()??"USER",playbackPosition:e.time};if(isMutedEvent(e))return{type:"muted",playerId:t};
14if(isDownloadFinished(e))return{type:"downloadFinished",playerId:t};if(isPlayEvent(e))return{type:"play",playerId:t,playbackPosition:e.time};if(isPlayingEvent(e))return{type:"playing",playerId:t,playbackPosition:e.time};if(isPausedEvent(e))return{type:"paused",playerId:t,playbackPosition:e.time};if(isTimeChangedEvent(e))return{type:"timeChanged",playerId:t,playbackPosition:e.time,duration:i.getDurationInSec()};if(isViewModeChangedEvent(e))return{type:"toggleFullscreen",playerId:t,isInFullscreen:"fullscreen"===e.to};if(isUnmuteEvent(e))return{type:"unmuted",playerId:t};if(isVolumeChangedEvent(e))return{type:"volumeChanged",playerId:t,currentVolume:e.targetVolume};if(isSeekEvent(e))return{type:"seeking",playerId:t,playbackPosition:e.position,targetPosition:e.seekTarget,issuer:e.issuer};if(isSeekedEvent(e))return{type:"seekingDone",playerId:t,playbackPosition:i.getActualTimeFromPlayer(),issuer:e.issuer};if(isTimeshiftEvent(e))return{type:"timeshifting",playerId:t,playbackPosition:e.position,targetPosition:e.target,issuer:e.issuer};if(isTimeshiftedEvent(e))return{type:"timeshiftingDone",playerId:t,playbackPosition:e.time,issuer:e.issuer};if(isPlaybackFinishedEvent(e))return{type:"playbackFinished",playerId:t,playbackPosition:i.getActualTimeFromPlayer()};if(isPlaybackSpeedChangedEvent(e))return{type:"playbackSpeedChanged",playerId:t,currentSpeed:e.to,previousSpeed:e.from};if(isSubtitleAddedEvent(e))return{type:"subtitleAdded",trackId:e.subtitle.id,playerId:t};
14if(isSubtitleDisabledEvent(e))return{type:"subtitleDisabled",playbackPosition:i.getCurrentTimeInSeconds(),playerId:t,issuer:i.getCurrentSetSubtitleTrackIssuer()??"USER"};if(isSubtitleEnabledEvent(e))return{type:"subtitleEnabled",language:e.subtitle.lang,playbackPosition:i.getCurrentTimeInSeconds(),playerId:t,issuer:i.getCurrentSetSubtitleTrackIssuer()??"USER"};if(isErrorEvent(e))return{type:"error",code:String(e.code),playerId:t};if(isAdBreakStartedEvent(e)){let{scheduleTime:i}=e.adBreak;return{type:"adBreakStarted",playerId:t,scheduleTime:i}}if(isAdBreakFinishedEvent(e))return{type:"adBreakFinished",playerId:t};if(isAdStartedEvent(e)){let n=e.ad;if(isLinearAd(n))return{type:"adStarted",playerId:t,adId:n.id,skippable:(n.skippableAfter??0)>0,adType:calculateAdType(i.getLastMainMediaPositionInSec(),i.getInitialSeekTimeInSec(),i.getMainMediaDurationInSec()),duration:n.duration};throw Error(`unsupported non-linear ad ${n}`)}return isAdFinishedEvent(e)?{type:"adFinished",playerId:t,adId:e.ad.id}:isAdSkippedEvent(e)?{type:"adSkipped",playerId:t,adId:e.ad.id}:isVideoQualityChangedEvent(e)?{type:"videoQualityChanged",playerId:t,quality:i.getSelectedVideoQuality()}:isStalledStartedEvent(e)?{type:"bufferingStarted",playerId:t}:isStalledEndedEvent(e)?{type:"bufferingEnded",playerId:t}:void 0}function isAirplayChangedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.AirplayChanged}function isAudioChangedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.AudioChanged}function isMutedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.Muted}function isPlayEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.Play}function isDownloadFinished(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.DownloadFinished}function isPlayingEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.Playing}function isPausedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.Paused}function isTimeChangedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.TimeChanged}function isPlaybackFinishedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.PlaybackFinished}function isSeekEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.Seek}function isTimeshiftEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.TimeShift}function isVolumeChangedEvent(e){return(!("issuer"in e)||"media-element"!==e.issuer)&&e.type===bitmovinplayerCoreExports.PlayerEvent.VolumeChanged}function isSeekedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.Seeked}function isVideoQualityChangedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.VideoQualityChanged}function isTimeshiftedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.TimeShifted}function isUnmuteEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.Unmuted}function isViewModeChangedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.ViewModeChanged}function isPlaybackSpeedChangedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.PlaybackSpeedChanged}function isErrorEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.Error}function isAdBreakStartedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.AdBreakStarted}function isAdBreakFinishedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.AdBreakFinished}function isAdStartedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.AdStarted}function isAdFinishedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.AdFinished}function isAdSkippedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.AdSkipped}function isSubtitleAddedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.SubtitleAdded}function isSubtitleDisabledEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.SubtitleDisabled}function isSubtitleEnabledEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.SubtitleEnabled}function isStalledStartedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.StallStarted}function isStalledEndedEvent(e){return e.type===bitmovinplayerCoreExports.PlayerEvent.StallEnded}function isLinearAd(e){return e.isLinear}var bitmovinplayerAbr={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[744],{98154:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
14Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationApiFactory=void 0;var r=i(23068);function o(e){return(0,r.isNumber)(e)&&e>=0}t.AdaptationApiFactory=function(){function e(){}return e.create=function(e){var t=e.getLogger(),i=function(e){t.debug("[ABR] ".concat(e))};return{setConfig:function(t){i("Updating adaptation config with ".concat(JSON.stringify(t))),(0,r.isNumber)(t.qualityStabilityBalance)&&function(t){if(t<0||t>1)i("Failed to set qualityStabilityBalance to ".concat(t,", valid range is 0 to 1"));else{var n=e.getConfig(!0).adaptation;n&&(n.qualityStabilityBalance=t,i("Updated qualityStabilityBalance to ".concat(t)))}}(t.qualityStabilityBalance),t.resolution&&function(t){var n=t.maxSelectableVideoHeight,r=t.maxSelectableVideoWidth,a=t.minSelectableVideoHeight,s=t.minSelectableVideoWidth,l=e.getConfig(!0).adaptation.resolution;o(n)&&(l.maxSelectableVideoHeight=n),o(r)&&(l.maxSelectableVideoWidth=r),o(a)&&(l.minSelectableVideoHeight=a),o(s)&&(l.minSelectableVideoWidth=s),i("Updated resolution boundaries to ".concat(JSON.stringify(l)))}(t.resolution),(0,r.isBoolean)(t.limitToPlayerSize)&&function(t){var n=e.getConfig(!0).adaptation;n&&(n.limitToPlayerSize=t,i("Updated limitToPlayerSize to ".concat(t)))}(t.limitToPlayerSize)},getConfig:function(){var t=e.getConfig(!0).adaptation,i=t.qualityStabilityBalance,r=t.resolution,o=t.limitToPlayerSize;return{qualityStabilityBalance:i,resolution:n({},r),limitToPlayerSize:o}}}},e}()},89498:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationHandler=void 0;var r=i(80813),o=i(98714),a=i(49859),s=i(91678),l=i(33436),c=i(86897),u=i(93204),d=i(79721),h=i(85434),p=i(70850),f=i(46057),m=i(47151),g=i(79505),v=i(49024),y=i(19119),b=i(43008),S=i(59113),_=i(7676),E=1/0;function T(e,t,i){return e>=t&&e<=i}t.AdaptationHandler=function(){function e(e,t,i){var n,r,o=this;this.context=e,this.mimeType=t,this.constraints=i,this.jO=!1,this.lO=function(e){var t;return void 0===e&&(e=null==(t=o.hO)?void 0:t.getState()),e?(0,a.getPreferredBitrate)((0,a.getAdaptationState)(e),o.mimeType):null},this.aO=(0,v.createAdaptationLogic)(this.context,this.mimeType,{minBitrate:this.constraints.minBitrate,maxBitrate:this.constraints.maxBitrate},null==(r=null==(n=this.context.config)?void 0:n.adaptation)?void 0:r.logic),this.eO=this.BO(this.fO),this.sO()}return Object.defineProperty(e.prototype,"hO",{get:function(){var e=this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(r.ServiceName.SourceStoreService,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"kO",{get:function(){var e=this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(r.ServiceName.ManifestService,e)},enumerable:!1,configurable:!0}),e.prototype.mO=function(e,t,i){var n,r;return e?this.eO:t&&null!=(r=null==(n=this.aO.findRepresentationForBitrate(t,i))?void 0:n._internalId)?r:null},e.prototype.nO=function(e,t){var i,n=this.oO(),r=this.lO();return n||r?this.mO(n,r,t):null!=(i=this.aO.selectRepresentationID(e,t))?i:null},e.prototype.oO=function(){return!this.isAuto()&&!!this.tO(this.eO,this.qO())},e.prototype.pO=function(e){this.bO=e},e.prototype.qO=function(){var e,t,i;return null!=(i=null==(t=null==(e=this.kO)?void 0:e.getAdaptationSet(this.fO))?void 0:t.Representation)?i:[]},e.prototype.selectRepresentationID=function(e,t){void 0===e&&(e={});var i=this.uO(t??this.qO()),n=this.nO(e,i);return n&&this.pO(n),this.bO},e.prototype.rO=function(){var e=this,t=!!this.dO;this.hO&&!t&&(this.dO=(0,u.subscribe)(this.hO)(c.getBufferStateMap,function(t){var i,n,r=null==t?void 0:t[e.mimeType];if(r){var a=r.rendererRanges;a&&a.length>0&&(null==(i=e.hO)||i.dispatch((0,o.clearPreferredBitrateForMimeTypeAction)(e.mimeType)),null==(n=e.dO)||n.call(e),e.dO=void 0)}}))},e.prototype.sO=function(){var e=this;this.hO&&(this.lO()&&this.rO(),this.cO=(0,u.subscribe)(this.hO)(this.lO,function(){return e.rO()},function(e){return!!e}))},e.prototype.tO=function(e,t){var i;return t?t.find(function(t){return t._internalId.equals(e)}):null==(i=this.kO)?void 0:i.getRepresentationById(e)},e.prototype.uO=function(e){this.yO();var t=e.map(function(e){return{representation:e,bitrate:e._bandwidth,width:e._width,height:e._height}});return this.vO(t).map(function(e){return e.representation})},e.prototype.vO=function(e){var t=this,i=this.context.config.adaptation.resolution,n=i.minSelectableVideoHeight,r=i.maxSelectableVideoHeight,o=i.minSelectableVideoWidth,a=i.maxSelectableVideoWidth,s=e.filter(function(e){return!((0,b.hasBitrate)(e)&&!T(e.bitrate,t.constraints.minBitrate,t.constraints.maxBitrate))&&(!(0,b.hasResolution)(e)||T(e.width,o,a)&&T(e.height,n,r))});if(s.length>0)return s;this.context.logger.debug("No selectable qualities found for mimeType ".concat(this.mimeType," within the given b
14itrate/resolution constraints! Falling back to alternative selection."));var l=this.wO(e);return l?[l]:e},e.prototype.wO=function(e){var t=0!==this.constraints.minBitrate,i=this.constraints.maxBitrate!==E,n=e.filter(b.hasBitrate);return t?(0,_.findMaximum)(n,function(e){return e.bitrate}):i?(0,_.findMinimum)(n,function(e){return e.bitrate}):h.MimeTypeHelper.isVideo(this.mimeType)?this.xO(e):void 0},e.prototype.xO=function(e){var t=this.context.config.adaptation.resolution,i=t.minSelectableVideoHeight,n=t.maxSelectableVideoHeight,r=t.minSelectableVideoWidth,o=t.maxSelectableVideoWidth,a=e.filter(b.hasResolution);return 0!==i?(0,_.findMaximum)(a,function(e){return e.height}):n!==1/0?(0,_.findMinimum)(a,function(e){return e.height}):0!==r?(0,_.findMaximum)(a,function(e){return e.width}):o!==1/0?(0,_.findMinimum)(a,function(e){return e.width}):void 0},e.prototype.yO=function(){h.MimeTypeHelper.isVideo(this.mimeType)&&(this.context.config.adaptation.limitToPlayerSize&&!this.jO?this.AO():!this.context.config.adaptation.limitToPlayerSize&&this.jO&&this.zO())},e.prototype.zO=function(){this.jO=!1,this.context.config.adaptation.onVideoAdaptation=this.iO},e.prototype.AO=function(){var e=this;this.jO=!0;var t=this.context.config.adaptation.onVideoAdaptation;this.iO=t,this.context.config.adaptation.onVideoAdaptation=t&&"function"==typeof t?function(i){var n,r,o;
14return i.suggested=(0,y.AdaptToPlayerResolution)(e.context.internalPlayer,i.suggested,null!=(r=null==(n=e.gO)?void 0:n.isFullscreen())&&r)||i.suggested,null!=(o=(0,p.safeUserCallback)(function(){return t(i)},e.context.logger))?o:i.suggested}:function(t){var i,n;return(0,y.AdaptToPlayerResolution)(e.context.internalPlayer,t.suggested,null!=(n=null==(i=e.gO)?void 0:i.isFullscreen())&&n)||t.suggested}},e.prototype.BO=function(e){return e?new g.RepresentationId(e,"auto"):new g.RepresentationId(new m.AdaptationSetId(d.DEFAULT_PERIOD_ID,this.mimeType),"auto")},e.prototype.CO=function(e){var t,i={id:e._id,bitrate:e._bandwidth,width:e._width,height:e._height};null==(t=this.context.store)||t.dispatch((0,s.addMetricsValue)(this.mimeType,l.MetricType.DownloadedAdaptationSet,i))},e.prototype.DO=function(){var e,t,i=this;if(this.kO){var r=this.kO.getAdaptationSet(this.fO);if(r){var o=n(n({},r),{Representation:this.uO(r.Representation),_minBandwidth:Math.max(null!=(e=r._minBandwidth)?e:0,this.constraints.minBitrate),_maxBandwidth:Math.min(null!=(t=r._maxBandwidth)?t:E,this.constraints.maxBitrate)});this.aO.setAdaptationSet(o),(0,f.yieldToMain)().then(function(){return i.CO(o)})}}else this.context.logger.debug("Could not update adaptation set in AdaptationHandler!")},e.prototype.EO=function(e){return this.fO&&e&&this.kO?this.kO.getRepresentation(this.fO,e):null},e.prototype.FO=function(){if(this.eO){var e=this.eO.representationId;this.eO=this.BO(this.fO);var t=this.EO(e);t&&(this.eO=t._internalId)}else this.eO=this.BO(this.fO)},e.prototype.setAdaptationSetId=function(e){e||this.context.logger.debug("newAdaptationSetId is ".concat(e)),this.fO=e,this.FO(),this.DO()},e.prototype.setFixedRepresentation=function(e){var t;if("auto"===e)this.eO=new g.RepresentationId(this.fO,"auto");else if(this.fO){var i=null==(t=this.kO)?void 0:t.getRepresentation(this.fO,e);i&&(this.eO=i._internalId,this.selectRepresentationID())}},e.prototype.getFixedRepresentation=function(){return this.bO},e.prototype.getLowestRepresentationId=function(){var e;return this.isAuto()?null==(e=this.aO.getLowestRepresentation())?void 0:e._internalId.representationId:this.eO.representationId},e.prototype.isAuto=function(){return"auto"===this.eO.representationId},e.prototype.shouldDownloadBeCancelled=function(e,t){var i,n,r,o,a,s,l,c=null!=(n=null==(i=this.context.config.adaptation)?void 0:i.disableDownloadCancelling)&&n,u=null!=(a=null==(o=null==(r=this.kO)?void 0:r.getAdaptationSet(this.fO))?void 0:o.Representation)?a:[],d=1===u.length,h=u.some(function(e){return!!e._bandwidth});if(!this.isAuto()||c||d||!h)return!1;var p=function(e){if(!(0,_.hasTotalBytes)(e))return 1/0;var t=function(e){var t,i=null!=(t=e.elapsedTime)?t:0;return e.loadedBytes>0&&i>0?8*e.loadedBytes/1024/i:0}(e);return t>0?8*e.totalBytes/1024/t:1/0}(e),f=(null!=(l=null==(s=e.responseTiming)?void 0:s.doneTimestamp)?l:0)>0,m=!!e.segmentDuration&&p>1.5*e.segmentDuration;return!(f||!m)&&!function(e){return!!(0,_.hasTotalBytes)(e)&&e.loadedBytes>=.9*e.totalBytes}(e)&&this.aO.shouldDownloadBeCancelled(e,t)},e.prototype.setStartupPhase=function(){this.aO.setStartupPhase()},e.prototype.addSample=function(e){this.aO.addSample(n({timestamp:Date.now()},e))},e.prototype.shutdown=function(){this.aO.shutdown()},e.prototype.dispose=function(){var e,t;this.shutdown(),this.aO.dispose(),null==(e=this.cO)||e.call(this),null==(t=this.dO)||t.call(this)},e.prototype.selectQualityBasedOnBitrateMeasurement=function(e){var t=this.vO(e),i=this.lO();if(i)return(0,S.findQualityForBitrate)(i,t);if(this.oO()){var n=this.uO(this.qO()),r=this.tO(this.bO,n);if(r)return(0,S.findQualityForBitrate)(r._bandwidth,t)}return(0,S.findQualityForBitrate)(this.aO.getCurrentBitrateMeasurement(),t)},e}()},49024:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createAdaptationLogic=function(e,t,i,c){var u=i.minBitrate,d=i.maxBitrate;return void 0===c&&(c=n.AdaptationLogicType.DOWNLOAD_PREDICTION),e.logger.debug("Using adaptation logic ".concat(c)),c===n.AdaptationLogicType.LOW_LATENCY?new s.LowLatencyAbr(e,t):c===n.AdaptationLogicType.WISH?new l.WishLogic(e,t):c===n.AdaptationLogicType.DOWNLOAD_PREDICTION?new a.DownloadPredictionLogic(e,t):c===n.AdaptationLogicType.BUFFER_FILL_RATE?new r.BufferFillRateLogic(e,t):new o.BufferLogic(e,t,u||0,d||
141/0)};var n=i(21281),r=i(48968),o=i(39201),a=i(85696),s=i(24296),l=i(7290)},49541:function(e,t,i){t.X=void 0;var n=i(85434),r=i(89498),o=i(83429);t.X=function(){function e(e){this.context=e,this.dm=new Map}return e.prototype.em=function(e){if(e){if(!this.dm.has(e)){var t=function(e,t){var i={minBitrate:0,maxBitrate:1/0};return n.MimeTypeHelper.isVideo(e)?(i.minBitrate=Number(t.MIN_SELECTABLE_VIDEO_BITRATE)||i.minBitrate,i.maxBitrate=Number(t.MAX_SELECTABLE_VIDEO_BITRATE)||i.maxBitrate):n.MimeTypeHelper.isAudio(e)&&(i.minBitrate=Number(t.MIN_SELECTABLE_AUDIO_BITRATE)||i.minBitrate,i.maxBitrate=Number(t.MAX_SELECTABLE_AUDIO_BITRATE)||i.maxBitrate),i}(e,this.context.settings);this.dm.set(e,new r.AdaptationHandler(this.context,e,t))}return this.dm.get(e)}},e.prototype.selectRepresentation=function(e,t,i){var n,r;return void 0===t&&(t={}),null!=(r=null==(n=this.em(e))?void 0:n.selectRepresentationID(t,i))?r:void 0},e.prototype.isAuto=function(e){var t,i;return null==(i=null==(t=this.em(e))?void 0:t.isAuto())||i},e.prototype.shouldDownloadBeCancelled=function(e,t,i){var n,r;return null!=(r=null==(n=this.em(e))?void 0:n.shouldDownloadBeCancelled(t,i))&&r},e.prototype.selectQualityBasedOnBitrateMeasurement=function(e,t){var i=t?this.dm.get(t):this.fm(),r=null;i||(r=t??n.MimeType.VideoMp4,i=this.em(r));var o=null==i?void 0:i.selectQualityBasedOnBitrateMeasurement(e);return r&&this.release(r),o??e[0]},e.prototype.fm=function(){var e=void 0;return this.dm.forEach(function(t,i){e&&!n.MimeTypeHelper.isVideo(i)||(e=t)}),e},e.prototype.setAdaptationSetId=function(e,t){var i;null==(i=this.em(e))||i.setAdaptationSetId(t)},e.prototype.setFixedRepresentation=function(e,t){var i;null==(i=this.em(e))||i.setFixedRepresentation(t)},e.prototype.getCurrentRepresentationId=function(e){var t,i;return null!=(i=null==(t=this.em(e))?void 0:t.getFixedRepresentation())?i:null},e.prototype.getLowestRepresentationId=function(e){var t;return null==(t=this.em(e))?void 0:t.getLowestRepresentationId()},e.prototype.setStartupPhase=function(e){var t;null==(t=this.em(e))||t.setStartupPhase()},e.prototype.shutdown=function(e){var t;null==(t=this.em(e))||t.shutdown()},e.prototype.addSample=function(e,t){var i;null==(i=this.em(e))||i.addSample(t)},e.prototype.getUserSelectedRepresentation=function(e,t,i){return(0,o.getUserSelectedRepresentation)(this.context,e,t,i)},e.prototype.release=function(e){var t;null==(t=this.dm.get(e))||t.dispose(),this.dm.delete(e)},e.prototype.dispose=function(){this.dm.forEach(function(e){return e.dispose()}),this.dm.clear()},e}()},81723:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAdaptationLogic=void 0;var r=i(46151),o=i(15971),a=i(85434),s=i(89927),l=i(88844),c=i(59113),u=i(59406),d=i(70238),h=i(7676);t.BaseAdaptationLogic=function(){function e(e,t){this.context=e,this.mimeType=t,this.lastRateMeasurement=0,this.availableRepresentations=[],this.startupPhase=!0,this.lastDownloadCancelled=!1,this.monitoringMimeType=this.getMonitoringMimeType()}return e.prototype.getMonitoringMimeType=function(){var e,t=null,i=null==(e=this.context.store)?void 0:e.getState();return i&&(t=Object.keys((0,r.getMetricsState)(i)).find(a.MimeTypeHelper.isVideo)),t??this.mimeType},e.prototype.updateAvailableRepresentations=function(e){e&&(this.availableRepresentations=e.map(function(e,t){return n(n({},e),{arrayIndex:t})}))},e.prototype.getAvailableRepresentations=function(){var e,t=this;return this.lastDownloadCancelled&&null!=(e=this.lastRepresentation)&&e._bandwidth?this.availableRepresentations.filter(function(e){var i=e._bandwidth;return t.lastRepresentation&&i<t.lastRepresentation._bandwidth}):this.availableRepresentations},e.prototype.setAdaptationSet=function(e){var t,i,n;if(this.updateAvailableRepresentations(e.Representation),this.lastRepresentation)this.lastRepresentation=this.findRepresentationForBitrate(this.lastRepresentation._bandwidth,e.Representation);else{var r=null==(n=null==(i=null==(t=(0,o.getSourceState)(this.context))?void 0:t.activeTracks)?void 0:i[e._internalId.adaptationSetId])?void 0:n.selectedRepresentationId;this.lastRepresentation=r?this.availableRepresentations.find(function(e){return e._internalId.equals(r)}):void 0}},e.prototype.findRepresentationForBitrate=function(e,t){var i,n;return this.updateAvailableRepresentations(t),null!=(n=null==(i=(0,c.findQualityForBitrate)(e,this.getAvailableRepresentations().map(function(e){return{rep:e,bitrate:Number(e._bandwidth)}})))?void 0:i.rep)?n:this.getLowestRepresentation()},e.prototype.checkStartupPhase=function(e){this.startupPhase&&this.ygb(e)},e.prototype.getLowestRepresentation=function(){return(0,h.getLowestRepresentation)(this.availableRepresentations)},e.prototype.ygb=function(e){var t=this,i=this.context.bufferSettings.getForwardTargetLevel();this.startupPhaseTimerID||(this.startupPhaseTimerID=window.setTimeout(function(){t.context.logger.insane("startup phase timed out... moving to normal adaptation"),t.startupPhase=!1,t.startupPhaseTimerID=void 0},(0,s.toMilliSeconds)(i))),e.value>=.5*i&&(this.context.logger.insane("startup is over as steady phase has been reached... moving to normal adaptation"),(0,l.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhase=!1,this.startupPhaseTimerID=void 0)},e.prototype.getRepresentationForNormalChange=function(e,t,i){return this.startupPhase||!i?this.getRepresentationForRateMeasurement(d.SwitchingAggressiveness.Mid):this.getRepresentationToSwitchTo(t.result,e.result)},e.prototype.getCurrentBitrate=function(e){return this.lastDownloadCancelled?this.lastRateMeasurement:e.value},e.prototype.getRepresentationToSwitchTo=function(e,t){if(this.lastDownloadCancelled)return this.switchDown(d.SwitchingAggressiveness.VeryHigh);switch(e){case u.Rules.SHOULD_SWITCH_UP:return this.ifFillStateHigh(t);case u.Rules.SHOULD_STAY:return this.ifFillStateMid(t);case u.Rules.SHOULD_SWITCH_DOWN:return this.ifFillStateLow(t);default:return this.context.logger.insane("unknown fill state result, keep the current representation"),this.useLastRepresentation()}},e.prototype.switchUp=function(e){if(void 0===e&&(e=d.SwitchingAggressiveness.Conservative),(null==(t=this.lastRepresentation)?void 0:t.arrayIndex)!==void 0&&this.lastRepresentation.arrayIndex>=this.availableRepresentations.length-1)return this.lastRepresentation;var t,i=this.getRepresentationForRateMeasurement(e);return this.lastRepresentation&&Number(i._bandwidth)<=Number(this.lastRepresentation._bandwidth)?this.lastRepresentation:(this.context.logger.insane("switching up to "+i._id),i)},e.prototype.switchDown=function(e){if(void 0===e&&(e=d.SwitchingAggressiveness.VeryHigh),(null==(t=this.lastRepresentation)?void 0:t.arrayIndex)!==void 0&&(null==(i=this.lastRepresentation)?void 0:i.arrayIndex)<1&&(null==(n=this.lastRepresentation)?void 0:n._id)!==null)return this.context.logger.insane(this.mimeType+" is already on the lowest quality, can not switch to lower quality."),this.lastRepresentation;var t,i,n,r,o=this.getRepresentationForRateMeasurement(e);return this.lastRepresentation&&(!o||o._bandwidth>=(null==(r=this.lastRepresentation)?void 0:r._bandwidth))?(o=this.getOneRepresentationLower(),this.context.logger.insane("step-wise switch down to "+o._id)):this.context.logger.insane("switching down to "+o._id),o},e.prototype.stay=function(){var e;return null!=(e=this.lastRepresentation)?e:this.getLowestRepresentation()},e.prototype.ifFillStateHigh=function(e){switch(e){case u.Rules.SHOULD_SWITCH_UP:return this.switchUp(d.SwitchingAggressiveness.VeryHigh);case u.Rules.SHOULD_STAY:return this.switchUp(d.SwitchingAggressiveness.High);case u.Rules.SHOULD_SWITCH_DOWN:return this.stay();default:return this.context.logger.insane("unknown fill rate result, keep the current representation"),this.stay()}},e.prototype.ifFillStateMid=function(e){switch(e){case u.Rules.SHOULD_SWITCH_UP:return this.switchUp(d.SwitchingAggressiveness.Mid);case u.Rules.SHOULD_STAY:return this.stay();case u.Rules.SHOULD_SWITCH_DOWN:return this.switchDown(d.SwitchingAggressiveness.High);default:return this.context.logger.insane("unknown fill rate result, keep the current representation"),this.stay()}},e.prototype.ifFillStateLow=function(e){switch(e){case u.Rules.SHOULD_SWITCH_UP:return this.stay();case u.Rules.SHOULD_STAY:return this.switchDown(d.SwitchingAggressiveness.High);case u.Rules.SHOULD_SWITCH_DOWN:return this.switchDown(d.SwitchingAggressiveness.VeryHigh);default:return this.context.logger.insane("unknown fill rate result, keep the current representation"),this.stay()}},e.prototype.useLastRepresentation=function(){var e;return null!=(e=this.lastRepresentation)&&e._id?this.lastRepresentation:this.getLowestRepresentation()},e.prototype.getOneRepresentationLower=function(){var e,t,i=Math.max(0,(null!=(t=null==(e=this.lastRepresentation)?void 0:e.arrayIndex)?t
vendor: 9,425 bytes, line 14
14:0)-1);return this.availableRepresentations[i]},e}()},48968:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.BufferFillRateLogic=void 0;var r=i(46151),o=i(33436),a=i(88844),s=i(81723),l=i(4865),c=i(20066),u=i(64463),d=i(70238);t.BufferFillRateLogic=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.Aeb=0,n.shouldDownloadBeCancelled=function(e,t){var i,r;return(null==(i=n.lastRepresentation)?void 0:i.arrayIndex)!==0&&n.Feb()._id!==(null==(r=n.lastRepresentation)?void 0:r._id)&&(n.lastDownloadCancelled=!0,!0)},n.zeb={bufferFillRate:new c.BufferFillRateRule(n.context,n.monitoringMimeType),bufferFillState:(0,u.BufferFillStateRule)(n.context,n.monitoringMimeType),rateMeasurement:new l.BlockBasedRateMeasurementRule(n.context,n.monitoringMimeType)},n}return n(t,e),t.prototype.getRepresentationForRateMeasurement=function(e){void 0===e&&(e=d.SwitchingAggressiveness.Mid);var t=this.zeb.rateMeasurement.getStatus(e),i=this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE/100,n=t.value*(1-i);return this.findRepresentationForBitrate(n)},t.prototype.addSample=function(e){Object.values(this.zeb).forEach(function(t){return t.addSample(e)})},t.prototype.Beb=function(e){var t=this.switchDown(d.SwitchingAggressiveness.VeryHigh);return this.context.logger.insane("connection dropped more than half, use aggressive adaptation [last="+this.lastRateMeasurement/1024+"kbps, current="+e/1024+"], using "+t._id),t},t.calcEstimatedDownloadDuration=function(e,t,i,n){var r=parseFloat((i*e/t).toFixed(2));return n&&(r*=2),1.1*r},t.prototype.Ceb=function(e,i,n,r,o){var a=t.calcEstimatedDownloadDuration(n,e,i,o);return a<r||a<=n},t.prototype.Deb=function(e,t,i,n){var r,o,a,s,l=null==e?void 0:e.hlsDependentSegments;if(l&&(null==(r=this.lastRepresentation)?void 0:r._id)!==null&&(null==(o=this.lastRepresentation)?void 0:o.arrayIndex)!==t.arrayIndex){var c=Math.min.apply(null,this.availableRepresentations.map(function(e){return Number(e._bandwidth)})),u=Number(t._bandwidth);if(!(isFinite(u)&&u===c||this.Ceb(i,t._bandwidth,e.segmentDuration,n,l))){for(var d=!1,h=null!=(a=t.arrayIndex)?a:-1;h>=0;h--){var p=this.availableRepresentations[h];if(this.Ceb(i,p._bandwidth,e.segmentDuration,n,l)){this.context.logger.insane("fall back to "+p.arrayIndex),t=p,d=!0;break}}d||(this.context.logger.insane("keep old rep for now, not switching from "+(null==(s=this.lastRepresentation)?void 0:s.arrayIndex)+" to "+t.arrayIndex),t=this.useLastRepresentation())}}return t},t.prototype.Eeb=function(e){var t,i=this.lastRateMeasurement>0&&2*e<=this.lastRateMeasurement;return i&&null!=(t=this.lastRepresentation)&&t._id?1.5*e<this.lastRepresentation._bandwidth:i},t.prototype.Feb=function(e){var t,i,n=this.context.store.getState();n&&(i=(0,r.getMetricsState)(n));var a,s=this.zeb.bufferFillState.getStatus(),l=this.zeb.bufferFillRate.getStatus(),c=this.zeb.rateMeasurement.getStatus(1).value,u=null!=i&&this.context.bufferSettings.getForwardTargetLevel()>i.default.bufferLogicActivationThreshold,h=this.Eeb(c);this.checkStartupPhase(s),a=h?this.Beb(c):this.getRepresentationForNormalChange(l,s,u);var p=(0,r.getMetricsLastEntry)(i??{},this.mimeType,o.MetricType.StalledSeconds).value;return p>this.Aeb?(this.Aeb=p,this.switchDown(d.SwitchingAggressiveness.MidHigh)):(a=this.Deb(e,a,c,s.value),this.lastRateMeasurement=c,this.lastDownloadCancelled&&void 0!==a.arrayIndex&&(null==(t=this.lastRepresentation)?void 0:t.arrayIndex)!==void 0&&a.arrayIndex>=this.lastRepresentation.arrayIndex&&(a=this.getOneRepresentationLower(),this.lastDownloadCancelled=!1),a)},t.prototype.selectRepresentationID=function(e,t){return this.updateAvailableRepresentations(t),this.lastRepresentation=this.Feb(e),this.lastRepresentation._internalId},t.prototype.setAdaptationSet=function(t){var i;e.prototype.setAdaptationSet.call(this,t),null!=(i=this.lastRepresentation)||(this.lastRepresentation={_id:null,_bandwidth:0,arrayIndex:-1})},t.prototype.getCurrentBitrateMeasurement=function(){return this.getCurrentBitrate(this.zeb.rateMeasurement.getStatus())},t.prototype.getAvailableRepresentations=function(){return this.availableRepresentations},t.prototype.setStartupPhase=function(){this.startupPhase=!0,(0,a.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,Object.values(this.zeb).forEach(function(e){return e.setStartupPhase()})},t.prototype.shutdown=function(){(0,a.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,this.lastDownloadCancelled=!1,Object.values(this.zeb).forEach(function(e){return e.shutdown()})},t.prototype.dispose=function(){this.shutdown(),Object.values(this.zeb).forEach(function(e){return e.dispose()}),this.zeb={},this.lastRepresentation=void 0,this.availableRepresentations=[]},t}(s.BaseAdaptationLogic)},39201:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLogic=void 0;var n=i(85434),r=i(96533),o=i(7676);t.BufferLogic=function(){function e(e,t,i,r){this.context=e,this.mimeType=t,this.minSelectableBitrate=i,this.maxSelectableBitrate=r,this.Ufb=[],this.Geb=n.MimeTypeHelper.getMediaType(this.mimeType),this.Jeb={timestamp:Date.now(),bufferLevel:0,bufferTargetLevel:0}}return e.prototype.Vfb=function(e){e&&(this.Ufb=e)},e.prototype.Wfb=function(){return(0,r.findLowestPossibleBandwidthFromRepresentations)(this.Ufb,this.minSelectableBitrate)},e.prototype.Xfb=function(){var e;return null==(e=this.findRepresentationForBitrate(this.maxSelectableBitrate))?void 0:e._bandwidth},e.prototype.Yfb=function(){return this.context.bufferSettings.getForwardTargetLevel(this.Geb)},e.prototype.Zfb=function(){var e=this.Wfb(),t=this.Xfb();return this.Ieb=this.Yfb(),function(e,t,i){var n=[];0===t&&(t=e);var r=2*Math.floor(.1*i),o=8*Math.floor(.1*i);o<=r&&(o=Math.floor(.9*i)),r<=1&&(r=1);for(var a=(t-e)/(o-r),s=e-a*r,l=0;l<r;l++)n[l]=e;for(l=r;l<o;l++)n[l]=Math.floor(a*l+s);for(l=o;l<=i;l++)n[l]=t;return n}(e,t||e,this.Ieb)},e.prototype.afb=function(){var e=this.Yfb();this.Ieb!==e&&(this.Heb=this.Zfb())},e.prototype.findRepresentationForBitrate=function(e,t){return this.Vfb(t),(0,r.getMatchingRepresentationByBandwidth)(this.Ufb,e)},e.prototype.bfb=function(){var e,t=this.Yfb(),i=this.Jeb.bufferLevel;return(i=Math.floor(i))>t&&(i=t),e=this.Heb.hasOwnProperty(i)?this.Heb[i]:this.Heb[0],this.findRepresentationForBitrate(e)},e.prototype.selectRepresentationID=function(e,t){this.Vfb(t);var i=this.bfb();return this.afb(),i._internalId},e.prototype.setAdaptationSet=function(e){this.Vfb(e.Representation),this.Heb=this.Zfb()},e.prototype.shouldDownloadBeCancelled=function(){return!1},e.prototype.setStartupPhase=function(){},e.prototype.shutdown=function(){},e.prototype.addSample=function(e){this.Jeb=e},e.prototype.dispose=function(){this.Heb=[]},e.prototype.getCurrentBitrateMeasurement=function(){return 0},e.prototype.getLowestRepresentation=function(){return(0,o.getLowestRepresentation)(this.Ufb)},e}()},11958:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CancellableAdaptationLogic=void 0;var r=i(80813),o=i(4131),a=i(21281),s=i(46151),l=i(33436),c=i(81199),u=i(81723),d=i(39185),h=i(45199),p=i(17006),f=i(70238),m=i(7676);function g(e){var t,i,n,r,o=null!=(i=null==(t=e.responseTiming)?void 0:t.openedTimestamp)?i:-1,a=null!=(r=null==(n=e.responseTiming)?void 0:n.headersReceivedTimestamp)?r:-1;return o<0||a<0?0:a-o}function v(e,t){var i=e.filter(function(e){return e.value.representationId.equals(t)}).slice(-3).map(function(e){return e.value.time});return(0,p.calculateExponentialWeightedAverage)(i,.8)}t.CancellableAdaptationLogic=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.shouldDownloadBeCancelled=function(e,t){var i,r,a=null!=(i=e.elapsedTime)?i:-1,s=null==(r=n.Fgb)?void 0:r.isPaused(),l=n.isStartupBitrateInEffect(),c=function(e){var t,i=null!=(t=e.elapsedTime)?t:-1;return i<0?0:i-g(e)}(e),u=n.Ggb(t),d=(0,o.hasLoadedData)(e),h=d?c>n.context.settings.MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME:a>n.context.settings.MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME;return!(s||l||u||!h)&&n.Tgb(e,c,d,a)},n.timeToFirstByteMeasurementRule=new h.TimeToFirstByteMeasurementRule(n.context,n.monitoringMimeType),n.rateMeasurementRule=new d.SegmentBasedRateMeasurementRule(n.context,n.monitoringMimeType),n}return n(t,e),Object.defineProperty(t.prototype,"Egb",{get:function(){return this.context.serviceManager.get(r.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier)}
14,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Fgb",{get:function(){return this.context.serviceManager.get(r.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),t.prototype.setAdaptationSet=function(t){e.prototype.setAdaptationSet.call(this,t),this.previousRequestProgress=void 0},t.prototype.isStartupBitrateInEffect=function(){var e,t=this.context.store.getState(),i=t?(0,s.getMetricsHistoryFromInstanceState)(t,this.mimeType,l.MetricType.DownloadInformation):[],n=!!(null!=(e=this.context.config.adaptation)&&e.startupBitrate),r=i.filter(function(e){return!!e.value}).length>0;return n&&!r},t.prototype.Ggb=function(e){return!!e&&this.getLowestRepresentation()._internalId.equals(e)},t.prototype.Hgb=function(){return(0,c.getPlayableBufferLevel)(this.context.internalPlayer)},t.prototype.estimateTimeToFirstByte=function(e){var t;switch(void 0===e&&(e=0),t=0!==e?this.timeToFirstByteMeasurementRule.estimateStatus(e,5,.2).value:this.timeToFirstByteMeasurementRule.getStatus(5,.2).value,function(e){var t,i;return null!=(i=null==(t=e.adaptation)?void 0:t.rttEstimationMethod)?i:a.RttEstimationMethod.WeightedAverage}(this.context.config)){case a.RttEstimationMethod.Median:return t.median;case a.RttEstimationMethod.WeightedAverage:default:return t.standardDeviation>t.mean?t.mean+t.standardDeviation:t.weightedAverage}},t.prototype.Igb=function(e,t,i,n,r,o){var a,c,u,d,h,f,m,g=n*t/i+r,y=null!=(c=null==(a=this.Egb)?void 0:a.isManifestFetchRequired(e))&&c,b=!this.Kgb(e),S=null!=(u=null==o?void 0:o.hlsDependentSegments)&&u,_=null!=(h=null==(d=this.Egb)?void 0:d.getRepresentationById(e))?h:null,E=!!this.lastRepresentation&&(null==(f=this.lastRepresentation)?void 0:f._id)!==null&&(null==(m=this.lastRepresentation)?void 0:m.arrayIndex)!==(null==_?void 0:_.arrayIndex),T=this.context.store.getState(),w=g;return w+=function(e,t,i){var n=e?(0,s.getMetricsState)(e):{};return v((0,s.getMetricsHistory)(n,t,l.MetricType.DecryptionTime),i)+v((0,s.getMetricsHistory)(n,t,l.MetricType.TransmuxingTime),i)}(T,this.mimeType,e),S&&E&&(w*=2),b&&(w+=r),y&&(w+=Math.max(function(e){var t=e?(0,s.getMetricsState)(e):{};return function(e){var t=(0,s.getMetricsHistory)(e,"default",l.MetricType.DownloadInformation).slice(-3).map(function(e){return e.value.time});return(0,p.calculateExponentialWeightedAverage)(t,.8)}(t)+function(e){var t=(0,s.getMetricsHistory)(e,"default",l.MetricType.ProcessingTime).slice(-3).map(function(e){return e.value});return(0,p.calculateExponentialWeightedAverage)(t,.8)}(t)}(T),r)),w},t.prototype.Jgb=function(e,t,i,n){var r=1-this.context.settings.DOWNLOAD_DURATION_SAFETY_MARGIN,o=(n?this.context.settings.MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER_SAME_QUALITY:this.context.settings.MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER)-r;return Math.min(e*(r+Math.min(t,i)*o/i),i)},t.prototype.isDownloadFeasible=function(e,t,i,n,r,o,a){var s,l=e.arrayIndex===(null==(s=this.lastRepresentation)?void 0:s.arrayIndex),c=this.Jgb(i,o,a,l);return this.Igb(e._internalId,i,t,e._bandwidth,r,{hlsDependentSegments:n})<=c},t.prototype.Kgb=function(e){var t,i,n=this.context.store.getState(),r=n?(0,s.getMetricsHistoryFromInstanceState)(n,this.mimeType,l.MetricType.CachedInitSegments):[];return 0===r.length?null!=(i=null==(t=this.Egb)?void 0:t.hasSelfInitialisingSegments())&&i:r.some(function(t){var i=t.hasOwnProperty("value")&&t.value.hasOwnProperty("internalRepId")?t.value.internalRepId:null;return null!==i&&i.equals(e)})},t.prototype.Lgb=function(e,t,i){var n=this;void 0===i&&(i=this.estimateTimeToFirstByte());var r=this.availableRepresentations.filter(function(e){var t;return n.lastRepresentation&&!e._internalId.equals(null==(t=n.lastRepresentation)?void 0:t._internalId)});return Math.min.apply(Math,r.map(function(r){var o;return n.Igb(r._internalId,null!=(o=n.lastSegmentInfo?n.lastSegmentInfo.segmentDuration:t)?o:0,e,r._bandwidth,i,n.lastSegmentInfo)}))},t.prototype.Mgb=function(e){var t,i,n,r,o,a,s=null!=(t=e.elapsedTime)?t:0,l=(null==(i=this.previousRequestProgress)?void 0:i.url)===e.url?(e.loadedBytes-(null!=(r=null==(n=this.previousRequestProgress)?void 0:n.loadedBytes)?r:0))/(s-(null!=(a=null==(o=this.previousRequestProgress)?void 0:o.elapsedTime)?a:0)):-1;return this.previousRequestProgress=e,l},t.prototype.Ngb=function(e,t){var i,n=t?g(e):null!=(i=e.elapsedTime)?i:0;return this.estimateTimeToFirstByte(n)},t.prototype.Ogb=function(e){return void 0===e&&(e=4),this.lastRepresentation?this.lastRepresentation._bandwidth/8*e*1.2:0},t.prototype.Pgb=function(e,t){var i=(0,o.hasLoadedData)(e),n=i?this.Mgb(e):0,r=i&&(0,m.hasTotalBytes)(e)?e.totalBytes-e.loadedBytes:this.Ogb(e.segmentDuration);return Math.min(r/(t/8),n>0?r/n:1/0)},t.prototype.Qgb=function(e,t,i){if((0,o.hasLoadedData)(e))return e.loadedBytes/t*8;var n=this.context.bufferSettings.getForwardTargetLevel(),r=this.rateMeasurementRule.getStatus(f.SwitchingAggressiveness.Mid,i/n);return this.getCurrentBitrate(r)},t.prototype.Rgb=function(e,t,i,n,r){var o=this.Pgb(n,i);return o>t&&o>r&&t<=r+e},t.prototype.Sgb=function(e,t,i,n){var r,o;return(null==(o=null==(r=this.Fgb)?void 0:r.isPlay())||!o)&&n>
14Math.max(e,3*function(e){return e.getStatus(5,.2).value.mean}(this.timeToFirstByteMeasurementRule))&&t<=i+e},t.prototype.Tgb=function(e,t,i,n){var r,o,a,s=this.Hgb(),l=this.Qgb(e,t,s),c=this.Ngb(e,i),u=null!=(a=null!=(r=e.segmentDuration)?r:null==(o=this.lastSegmentInfo)?void 0:o.segmentDuration)?a:0,d=this.Lgb(l,u,c);if(i?this.Rgb(u,s,l,e,d):this.Sgb(u,s,d,n)){var h=(0,m.hasTotalBytes)(e)?(e.loadedBytes/e.totalBytes*100).toFixed(1):void 0;return this.context.logger.debug("Cancelling download after ".concat(n.toFixed(2),"s, bw: ").concat((0,m.toKbps)(l).toFixed(2),"kbps, buffer: ").concat(s.toFixed(2),"s, ").concat(i?"".concat(h,"% progress"):"headers not received")),this.lastDownloadCancelled=!0,this.lastRateMeasurement=l,!0}return!1},t}(u.BaseAdaptationLogic)},85696:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadPredictionLogic=void 0;var r=i(13531),o=i(70962),a=i(46151),s=i(88844),l=i(11958),c=i(64463),u=i(43829),d=i(70238),h=i(7676);t.DownloadPredictionLogic=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.cfb=new u.DownloadRateRule(n.context,n.monitoringMimeType),n.dfb=(0,c.BufferFillStateRule)(n.context,n.monitoringMimeType),n}return n(t,e),t.prototype.getRepresentationForRateMeasurement=function(e){void 0===e&&(e=d.SwitchingAggressiveness.Mid);var t=this.context.bufferSettings.getForwardTargetLevel(),i=this.dfb.getStatus().value,n=this.rateMeasurementRule.getStatus(e,i/t),r=this.getCurrentBitrate(n),o=(0,h.adjustRateToSafetyMargin)(r,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE);return this.findRepresentationForBitrate(o)},t.prototype.getCurrentBitrateMeasurement=function(){var e=this.getCurrentBitrate(this.rateMeasurementRule.getStatus());return(0,h.adjustRateToSafetyMargin)(e,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE)},t.prototype.addSample=function(e){this.cfb.addSample(e),this.dfb.addSample(e),this.rateMeasurementRule.addSample(),this.timeToFirstByteMeasurementRule.addSample()},t.prototype.efb=function(e,t,i,n,r){var o=this;if(!e.segmentDuration||this.isStartupBitrateInEffect())return t;this.lastSegmentInfo=e;var a=this.availableRepresentations.filter(function(e){return e._bandwidth<=t._bandwidth});if(0===a.length)return this.availableRepresentations[0];var s=r.value||0,l=this.context.bufferSettings.getForwardTargetLevel(),c=(0,h.adjustRateToSafetyMargin)(i,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE),u=a.filter(function(t){var i;return o.isDownloadFeasible(t,c,null!=(i=e.segmentDuration)?i:0,!1,n,s,l)});return 0===u.length?a[0]:u[u.length-1]},t.prototype.ffb=function(e,t,i,n){this.checkStartupPhase(t);var r,s,l=this.context.store.getState(),c=null!=(s=null==(r=(l?(0,a.getMetricsState)(l):{}).default)?void 0:r.bufferLogicActivationThreshold)?s:o.DefaultSettings.BUFFER_LOGIC_ACTIVATION_THRESHOLD,u=this.context.bufferSettings.getForwardTargetLevel()>c,d=this.getRepresentationForNormalChange(i,t,u);if(n){var h=this.estimateTimeToFirstByte();d=this.efb(n,d,e,h,t)}return d},t.prototype.selectRepresentationID=function(e,t){this.updateAvailableRepresentations(t);var i,n,o,a,s=this.rateMeasurementRule.getStatus(),l=this.getCurrentBitrate(s),c=this.dfb.getStatus(),u=this.cfb.getStatus(),d=this.ffb(l,c,u,e);return this.lastRepresentation&&!(null!=(n=null==(i=this.lastRepresentation)?void 0:i._internalId)&&n.equals(null==d?void 0:d._internalId))&&this.context.logger.isLevelEnabled(r.LogLevel.DEBUG)&&this.context.logger.debug("Switching from ".concat(null==(o=this.lastRepresentation)?void 0:o._internalId.representationId," to ").concat(null==d?void 0:d._internalId.representationId," (currentRate: ").concat((0,h.toMbps)(l).toFixed(2)+"mbps",", fillState: ").concat(c.value.toFixed(2),", fillRate: ").concat(u.value.toFixed(2),")")),this.lastRepresentation=d,this.lastRateMeasurement=l,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(a=this.lastRepresentation)?void 0:a._internalId},t.prototype.setStartupPhase=function(){var e,t,i,n;this.startupPhase=!0,(0,s.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,null==(e=this.cfb)||e.setStartupPhase(),null==(t=this.dfb)||t.setStartupPhase(),null==(i=this.rateMeasurementRule)||i.setStartupPhase(),null==(n=this.timeToFirstByteMeasurementRule)||n.setStartupPhase()},t.prototype.shutdown=function(){var e,t,i,n;(0,s.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(e=this.cfb)||e.shutdown(),null==(t=this.dfb)||t.shutdown(),null==(i=this.rateMeasurementRule)||i.shutdown(),null==(n=this.timeToFirstByteMeasurementRule)||n.shutdown()},t.prototype.dispose=function(){var e,t,i,n;this.shutdown(),null==(e=this.cfb)||e.dispose(),null==(t=this.dfb)||t.dispose(),null==(i=this.rateMeasurementRule)||i.dispose(),null==(n=this.timeToFirstByteMeasurementRule)||n.dispose(),this.lastRepresentation=void 0,this.availableRepresentations=[]},t}(l.CancellableAdaptationLogic)}
vendor: 11,196 bytes, line 14
14,76344:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationModuleDefinition=void 0;var n=i(62756),r=i(98154),o=i(7676);t.AdaptationModuleDefinition={name:n.ModuleName.ABR,module:function(){return{AdaptationService:i(49541).X,AdaptToPlayerResolution:i(19119).AdaptToPlayerResolution,AdaptationUtils:o,AdaptationApiFactory:r.AdaptationApiFactory}},dependencies:[n.ModuleName.EngineBitmovin]},t.default=t.AdaptationModuleDefinition},19119:function(e,t){function i(e){return e&&e.clientWidth&&e.clientHeight?{width:e.clientWidth*devicePixelRatio,height:e.clientHeight*devicePixelRatio}:null}Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptToPlayerResolution=function(e,t,n){var r,o=function(e,t){var n=t.getVideoElement();if(!n)return null;var r=n.parentElement,o=r&&r.querySelector("#bitmovinplayer-vr-canvas");return e?{width:screen.width*devicePixelRatio,height:screen.height*devicePixelRatio}:i(n)||o&&i(o)||r&&i(r)}(n,e);if(!o)return t;var a=null!=(r=e.getAvailableVideoQualities())?r:[],s=a.find(function(e){return e.id===t});if(!s)return t;var l=function(e,t,i){return e.filter(function(e){var n=e.bitrate<=t,r=function(e,t){var i=t.width/t.height;return e.width/e.height<i?t.width>=e.width:t.height>=e.height}(i,e);return n&&r})}(a,s.bitrate,o);return 0===l.length?t:l[function(e){return Math.max(0,e.findIndex(function(t){return t.width>e[0].width&&t.height>e[0].height})-1)}(l)].id}},43008:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hasBitrate=function(e){return null!=e.bitrate},t.hasBitrateBounds=function(e){return null!=e.minBitrate&&null!=e.maxBitrate},t.hasResolution=function(e){return null!=e.height&&null!=e.width}},59113:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.findQualityForBitrate=function(e,t){if(t&&0!==t.length)return o.invalidate(),t.reduce(function(t,i){var n=o(i),r=o(t);return r>e||n>e?n>r?t:i:n>r?i:t})};var n=i(84568),r=i(43008),o=(0,n.memoize)(function(e){return(0,r.hasBitrate)(e)&&e.bitrate>0?e.bitrate:(0,r.hasBitrateBounds)(e)?(e.maxBitrate+e.minBitrate)/2:0})},17006:function(e,t){function i(e){return e.length>0?e.reduce(function(e,t){return e+t},0)/e.length:0}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateExponentialWeightedAverage=void 0,t.calculateMean=i,t.calculateStandardDeviation=function(e,t){if(void 0===t&&(t=i(e)),e.length<2)return 0;var n=e.reduce(function(e,i){return e+Math.pow(i-t,2)},0);return Math.sqrt(1/(e.length-1)*n)},t.calculateMedian=function(e){var t=e.slice(0).sort(function(e,t){return e-t});return 0===t.length?0:t.length%2==1?t[Math.floor(t.length/2)]:.5*(t[t.length/2-1]+t[t.length/2])},t.calculateExponentialWeightedAverage=function(e,i,n){return void 0===n&&(n=e.length-1),0===e.length||n<0?0:0===n||0===i?e[n]:i*e[n]+(1-i)*(0,t.calculateExponentialWeightedAverage)(e,i,n-1)}},70238:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchingAggressiveness=void 0,function(e){e[e.Conservative=10]="Conservative",e[e.VeryLow=8]="VeryLow",e[e.Low=7]="Low",e[e.LowMid=6]="LowMid",e[e.Mid=5]="Mid",e[e.MidHigh=4]="MidHigh",e[e.High=3]="High",e[e.VeryHigh=2]="VeryHigh",e[e.Extreme=1]="Extreme"}(i||(t.SwitchingAggressiveness=i={}))},7676:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.toMbps=t.toKbps=t.findMaximum=t.findMinimum=void 0,t.getMaxStartupBitrateFromConfig=function(e){var t,i=null==(t=e.config)?void 0:t.adaptation;if(!i)return 0;var r=function(e){return e.maxStartupBitrate?n.Util.extractBitrateFromString("max",e.maxStartupBitrate):1/0}(i);return!isNaN(r)&&isFinite(r)?r:0},t.getStartupBitrateFromConfig=function(e){var t,i=null==(t=e.config)?void 0:t.adaptation,r=e.settings;if(!i||!r)return 0;var o=i.startupBitrate||0;if(!o)return 0;var a=function(e,t){var i=n.Util.extractBitrateFromString("min",e);return i*=1+t/100,i+=8}(o,r.RATE_SAFETY_MARGIN_PERCENTAGE);return!isNaN(a)&&isFinite(a)?a:0},t.findExtremum=r,t.hasTotalBytes=function(e){return void 0!==e.totalBytes},t.adjustRateToSafetyMargin=function(e,t){return e*(1-t/100)},t.getLowestRepresentation=function(e){return(0,t.findMinimum)(e,function(e){return e._bandwidth})};var n=i(70850);function r(e,t){return e[e.reduce(function(i,n,r){return t(e[i],e[r])?i:r},0)]}var o=function(e){return e};t.findMinimum=function(e,t){return void 0===t&&(t=o),r(e,function(e,i){return t(e)<t(i)})},t.findMaximum=function(e,t){return void 0===t&&(t=o),r(e,function(e,i){return t(e)>t(i)})},t.toKbps=function(e){return e/1024},t.toMbps=function(e){return e/1048576}},7290:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.WishLogic=void 0;var r=i(44468),o=i(70962),a=i(46151),s=i(33436),l=i(85434),c=i(88844),u=i(11958),d=i(59113),h=i(59406),p=i(70238),f=i(7676),m=i(47577),g=1e-4,v=1e-4;t.WishLogic=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.context=t,n.mimeType=i,n.hfb=[],n.ifb=[],n.jfb=0,n.ofb(),n.gfb=t.settings.WISH_ABR_PARAMS,n}return n(t,e),Object.defineProperty(t.prototype,"kfb",{get:function(){var e,t=l.MimeTypeHelper.isVideo(this.mimeType)?r.MediaType.Video:r.MediaType.Audio,i=null!=(e=this.context.internalPlayer.bufferApi.getLevel(r.BufferType.ForwardDuration,t).level)?e:0;return i>this.context.bufferSettings.getTargetLevel(r.BufferType.ForwardDuration,t)+this.jfb?0:i},enumerable:!1,configurable:!0}),t.prototype.ofb=function(){var e=this.context.settings.WISH_ABR_PARAMS.BITRATE_MODIFIER_FUNCTION_TYPE,t=this.context.settings.WISH_ABR_PARAMS.TARGET_BUFFER_FACTOR,i=this.context.settings.WISH_ABR_PARAMS.TARGET_BITRATE_FACTOR;if(!["log","linear"].includes(e)){var n=o.WishDefaultConfig.BITRATE_MODIFIER_FUNCTION_TYPE;this.context.logger.warn("WISH: invalid bitrate function type: ".concat(e,", falling back to default (").concat(n,")")),this.context.settings.WISH_ABR_PARAMS.BITRATE_MODIFIER_FUNCTION_TYPE=n}if(t>1||t<g){var r=Math.min(Math.max(t,g),1);this.context.logger.warn("WISH: invalid xi value: ".concat(t,", falling back to closest valid value: ").concat(r)),this.context.settings.WISH_ABR_PARAMS.TARGET_BUFFER_FACTOR=r}if(i<v){var a=Math.max(i,v);this.context.logger.warn("WISH: invalid delta value: ".concat(i,", falling back to closest valid value: ").concat(a)),this.context.settings.WISH_ABR_PARAMS.TARGET_BITRATE_FACTOR=a}},t.prototype.getRepresentationForRateMeasurement=function(e){void 0===e&&(e=p.SwitchingAggressiveness.Mid);var t=this.context.bufferSettings.getForwardTargetLevel(),i=this.rateMeasurementRule.getStatus(e,this.kfb/t),n=this.getCurrentBitrate(i),r=(0,f.adjustRateToSafetyMargin)(n,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE);return this.findRepresentationForBitrate(r)},t.prototype.pfb=function(){var e=this.context.store.getState();return(e?(0,a.getMetricsHistoryFromInstanceState)(e,this.mimeType,s.MetricType.DownloadInformation):[]).filter(function(e){return!!e.value}).length>2},t.prototype.addSample=function(e){(function(e){return null!=e.segmentDuration})(e)&&(this.rateMeasurementRule.addSample(),this.timeToFirstByteMeasurementRule.addSample(),e.segmentDuration!==this.jfb&&(this.jfb=e.segmentDuration,this.qfb()))},t.prototype.selectRepresentationID=function(e,t){this.updateAvailableRepresentations(t),this.checkStartupPhase({value:this.kfb,result:h.Rules.SHOULD_STAY});var i,n=this.sfb(),r=null==(i=n.rep)?void 0:i._internalId,o=n.index;return this.ifb.push(this.hfb[o]),this.ifb.length>20&&(this.ifb=this.ifb.slice(-10)),this.lastSegmentInfo=e,this.lastRepresentation=n.rep,this.lastRateMeasurement=this.getCurrentBitrate(this.rateMeasurementRule.getStatus()),this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,r},t.prototype.getCurrentBitrateMeasurement=function(){return this.rateMeasurementRule.getStatus().value},t.prototype.setAdaptationSet=function(t){e.prototype.setAdaptationSet.call(this,t);var i=this.getAvailableRepresentations().map(function(e){return(0,f.toKbps)(e._bandwidth)});this.hfb=(0,m.applyQualityFunction)(i,this.gfb.BITRATE_MODIFIER_FUNCTION_TYPE),this.qfb()},t.prototype.findRepresentationForBitrate=function(e,t){var i,n=(0,d.findQualityForBitrate)(e,this.getAvailableRepresentations().map(function(e){return{rep:e,bitrate:e._bandwidth}}));return null!=(i=null==n?void 0:n.rep)?i:this.getLowestRepresentation()},t.prototype.setStartupPhase=function(){this.startupPhase=!0,(0,c.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0},t.prototype.shutdown=function(){var e,t;this.lastRateMeasurement=0,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(e=this.rateMeasurementRule)||e.shutdown(),null==(t=this.timeToFirstByteMeasurementRule)||t.shutdown()},t.prototype.dispose=function(){var e,t;this.shutdown(),null==(e=this.rateMeasurementRule)||e.dispose(),null==(t=this.timeToFirstByteMeasurementRule)||t.dispose(),this.lastRepresentation=void 0,this.availableRepresentations=[],this.hfb=[],this.jfb=0,this.ifb=[]},t.prototype.qfb=function(){if((0,m.canUseWishAlgorithm)(this.hfb,this.jfb)){var e=this.getAvailableRepresentations().map(function(e){return(0,f.toKbps)(e._bandwidth)}),t=l.MimeTypeHelper.isVideo(this.mimeType)?r.MediaType.Video:r.MediaType.Audio,i=this.context.bufferSettings.getTargetLevel(r.BufferType.ForwardDuration,t);this.lfb=(0,m.computeAlpha)(this.gfb,e,this.hfb,this.jfb,i),this.mfb=(0,m.computeBeta)(this.gfb,this.lfb,i,this.jfb),this.nfb=(0,m.computeGamma)(this.lfb,this.mfb)}},t.prototype.rfb=function(e,t,i,n){var r=(0,m.determineBandwidthCost)(e._bandwidth,n),o=(0,m.determineBufferCost)(r,this.jfb,this.kfb),a=(0,m.determineQualityCost)(this.hfb,t,i);return this.lfb*r+this.mfb*o+this.nfb*a},t.prototype.isStartupBitrateInEffect=function(){var e,t,i=!!(null!=(e=this.context.config.adaptation)&&e.startupBitrate),n=!!(null!=(t=this.context.config.adaptation)&&t.maxStartupBitrate);return(i||n)&&!this.pfb()},t.prototype.sfb=function(){var e=this;if(this.startupPhase&&(this.isStartupBitrateInEffect()||this.gfb.USE_RATE_BASED_SELECTION_ON_SEEKING)){var t=this.getRepresentationForRateMeasurement(),i=this.getAvailableRepresentations().indexOf(t);return{rep:t,index:-1!==i?i:0}}if(this.kfb<this.jfb||!(0,m.canUseWishAlgorithm)(this.hfb,this.jfb))return{rep:this.getAvailableRepresentations()[0],index:0};var n=(0,m.getAverageSelectedQuality)(this.ifb,10),r=this.rateMeasurementRule.getStatus(5,.325).value,o=Math.min(r,this.getCurrentBitrate(this.rateMeasurementRule.getStatus())),a=Math.max(1.1*r,this.getAvailableRepresentations()[0]._bandwidth),s=this.getAvailableRepresentations().filter(function(e){return e._bandwidth<=a}).map(function(t,i){return{rep:t,index:i,cost:e.rfb(t,i,n,o)}}).sort(function(e,t){return e.cost-t.cost});return{rep:s[0].rep,index:s[0].index}},t}(u.CancellableAdaptationLogic)}
14,47577:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.applyQualityFunction=function(e,t){switch(t){case"linear":var i=e[e.length-1];return e.map(function(e){return e/i});case"log":var n=e[0];return e.map(function(e){return function(e,t){return Math.log(e/t)}(e,n)})}},t.computeAlpha=function(e,t,i,n,r){switch(e.BITRATE_MODIFIER_FUNCTION_TYPE){case"linear":return function(e,t,i,n){var r=e.TARGET_BITRATE_FACTOR;return 1/(1+(e.TARGET_BUFFER_FACTOR*n-i)/i+Math.exp(3-2*t[0]-t[t.length-2])/r)}(e,i,n,r);case"log":return function(e,t,i,n){var r=e.TARGET_BITRATE_FACTOR,o=e.TARGET_BUFFER_FACTOR,a=i,s=t[0],l=t[t.length-1];return 1/(1+(o*n-a)/i+2*l*l/(r*s*t[t.length-2]))}(e,t,n,r)}},t.computeBeta=function(e,t,i,n){return t*((e.TARGET_BUFFER_FACTOR*i-n)/n)},t.computeGamma=function(e,t){return 1-e-t},t.determineBandwidthCost=function(e,t){return t?e/t:1},t.determineBufferCost=function(e,t,i){return i<=t?1/0:t/(i-t)*e},t.determineQualityCost=function(e,t,i){var n=e[e.length-1],r=e[0];return Math.exp(n+i-2*e[t])/Math.exp(2*n-2*r)},t.getAverageSelectedQuality=function(e,t){if(0===e.length)return 0;var i=e.slice(-t);return i.reduce(function(e,t){return e+t})/i.length},t.canUseWishAlgorithm=function(e,t){return!(e.length<=1||!t)}},82873:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BandwidthValueType=void 0,t.getBandwidth=function(e){if(0!==e.length){for(var t=e.length,r=t-1;r>=0;r--){var o=e[r].value,a=o.downloadRate,s=o.segmentBitrate;if(void 0===s||a<s*n)return{rateBps:a,type:i.Accurate}}return{rateBps:e[t-1].value.downloadRate,type:i.Estimated}}};var i,n=.9;!function(e){e.Accurate="accurate",e.Estimated="estimated"}(i||(t.BandwidthValueType=i={}))},24296:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.LowLatencyAbr=void 0;var r=i(80813),o=i(46151),a=i(33436),s=i(59113),l=i(28922),c=i(7676),u=i(82873),d=i(50265),h=i(52902);t.LowLatencyAbr=function(){function e(e,t){this.context=e,this.mimeType=t,this.Jfb=new d.RateLimitedCancelCheck}return Object.defineProperty(e.prototype,"Kfb",{get:function(){return this.context.serviceManager.get(r.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier)},enumerable:!1,configurable:!0}),e.prototype.Lfb=function(e){for(var t,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];this.context.logger&&(t=this.context.logger).debug.apply(t,n(["[".concat("LL-ABR","][").concat(this.mimeType,"] ").concat(e)],i,!1))},e.prototype.Mfb=function(){var e=(0,o.getMetricsHistoryFromInstanceState)(this.context.store.getState(),this.mimeType,a.MetricType.ChunkedDownloadInformation),t=this.Nfb();return(0,u.getBandwidth)(e.slice(-t))},e.prototype.Nfb=function(){var e;return Math.max(1,Math.ceil(20*(null==(e=this.context.config.adaptation)?void 0:e.qualityStabilityBalance)))},e.prototype.Ofb=function(e){var t,i,n,r,o=null!=(n=null==(i=null==(t=this.Kfb)?void 0:t.getAdaptationSet(e))?void 0:i.Representation)?n:[],a=(0,c.getLowestRepresentation)(o);return null!=(r=null==a?void 0:a._internalId.equals(e))&&r},e.prototype.getCurrentBitrateMeasurement=function(){var e,t;return null!=(t=null==(e=this.Mfb())?void 0:e.rateBps)?t:0},e.prototype.getLowestRepresentation=function(){var e,t,i;if(this.Ifb){var n=null!=(i=null==(t=null==(e=this.Kfb)?void 0:e.getAdaptationSet(this.Ifb._internalId))?void 0:t.Representation)?i:[];return(0,c.getLowestRepresentation)(n)}},e.prototype.selectRepresentationID=function(e,t){var i,n,r,s;if(t&&0!==t.length){var d,h=this.Mfb();if(this.Lfb("current bandwidth",h),!h)return null==(i=(0,c.getLowestRepresentation)(t))?void 0:i._internalId;if(h.type===u.BandwidthValueType.Accurate&&(d=null!=(n=this.findRepresentationForBitrate(h.rateBps,t))?n:void 0,this.Lfb("accurate value, selecting ",null==d?void 0:d._bandwidth)),h.type===u.BandwidthValueType.Estimated){var p=null==(r=(0,o.getMetricsLastEntry)((0,o.getMetricsState)(this.context.store.getState()),this.mimeType,a.MetricType.ChunkedDownloadInformation).value)?void 0:r.representationBitrate;void 0!==p&&(d=(0,l.findNextHigherBitrateRepresentation)(t,p),this.Lfb("estimated value, currently on ".concat(p,", selecting ").concat(null==d?void 0:d._bandwidth)))}return d?d._internalId:null==(s=(0,c.getLowestRepresentation)(t))?void 0:s._internalId}},e.prototype.findRepresentationForBitrate=function(e,t){var i,n;return!t||t.length<1?null:null!=(n=(null==(i=(0,s.findQualityForBitrate)(e,t.map(function(e){return{rep:e,bitrate:e._bandwidth}})))?void 0:i.rep)??(0,c.getLowestRepresentation)(t))?n:null},e.prototype.shouldDownloadBeCancelled=function(e,t){if(this.Jfb.shouldExecuteCancelCheck(e)){if(this.Ofb(t))return!1;var i=(0,h.shouldCancelDownload)(e);return i&&this.Lfb("Cancelling segment download, current download rate is significantly lower than segment bitrate"),i}return!1},e.prototype.addSample=function(e){},e.prototype.setAdaptationSet=function(e){this.Ifb=e},e.prototype.setStartupPhase=function(){},e.prototype.shutdown=function(){},e.prototype.dispose=function(){this.shutdown()},e}()}
vendor: 28,275 bytes, line 14
14,50265:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RateLimitedCancelCheck=void 0,t.RateLimitedCancelCheck=function(){function e(){this.Bhb=0}return e.prototype.shouldExecuteCancelCheck=function(e){if(void 0===e.segmentDuration||void 0===e.elapsedTime)return!1;this.Chb(e)&&(this.Bhb=0);var t=this.Bhb+.2;if(e.elapsedTime>=e.segmentDuration*t){var i=e.elapsedTime/e.segmentDuration;return this.Bhb=.2*Math.floor(i/.2),!0}return!1},e.prototype.Chb=function(e){return e.elapsedTime<this.Bhb*e.segmentDuration},e}()},52902:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldCancelDownload=function(e){var t=e.responseTiming;if(!t)return!1;var i=t.progressTimestamp-t.headersReceivedTimestamp,r=(0,n.bytesToBits)(e.loadedBytes)/i,o=1-(0,n.bytesToBits)(e.loadedBytes)/(e.representationBitrate*e.segmentDuration);return r<e.representationBitrate*o};var n=i(33004)},4865:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.BlockBasedRateMeasurementRule=void 0;var r=i(46151),o=i(33436),a=i(70850),s=i(59406),l=1e6;function c(e){return e/8}t.BlockBasedRateMeasurementRule=function(e){function t(t,i){var n,r,o,s,l=e.call(this,t,i)||this;return l.Vgb=t.settings,l.Ugb=i,l.agb=!0,l.Ygb=16e5,(null==(r=null==(n=t.config)?void 0:n.adaptation)?void 0:r.maxStartupBitrate)!=null&&(l.Ygb=a.Util.extractBitrateFromString("max",t.config.adaptation.maxStartupBitrate)),(null==(s=null==(o=t.config)?void 0:o.adaptation)?void 0:s.startupBitrate)!=null&&(l.Wgb=a.Util.extractBitrateFromString("min",t.config.adaptation.startupBitrate)),l.Zgb={bytes:0,time:0},l.Xgb=[],l}return n(t,e),t.calcRateInBps=function(e,t){return 8*e/t},t.prototype.bgb=function(e){var i=this.Xgb.pop();if((null==i?void 0:i.bytes)===l&&(this.Xgb.push(i),i=void 0),i||(i={bytes:0,time:0,rateInBps:0}),i.bytes+e.bytes<=l){var n=i.bytes+e.bytes,r=i.time+e.time;this.Xgb.push({bytes:n,time:r,rateInBps:t.calcRateInBps(n,r)})}else{var o=(l-i.bytes)/e.bytes;i.bytes+=e.bytes*o,i.time+=e.time*o,i.rateInBps=t.calcRateInBps(i.bytes,i.time),this.Xgb.push(i);for(var a=e.bytes*(1-o),s=e.time*(1-o);a>l;){var c=s/(a/l);this.Xgb.push({bytes:l,time:c,rateInBps:t.calcRateInBps(l,c)}),a-=l,s-=c}this.Xgb.push({bytes:a,time:s,rateInBps:t.calcRateInBps(a,s)})}},t.prototype.cgb=function(e){if(e&&!isNaN(e.bytes)){var t=this.Zgb;(t.bytes!==e.bytes||t.time!==e.time)&&(this.Zgb=e,this.bgb(e),this.Xgb.length>40&&this.Xgb.shift(),this.phb())}},t.prototype.dgb=function(e,i){var n,r=-e;null!=i&&(r=-e-i,n=-i);var o=this.Xgb.slice(r,n);if(0===o.length)return 0;var a=o.reduce(function(e,t){return{bytes:e.bytes+t.bytes,time:e.time+t.time,rateInBps:e.rateInBps+t.rateInBps}});return a.rateInBps=t.calcRateInBps(a.bytes,a.time),a.rateInBps},t.prototype.ohb=function(){if(null==this.Wgb)return null;var e=this.Wgb;return e*=1+this.Vgb.RATE_SAFETY_MARGIN_PERCENTAGE/100,isNaN(e+=8)?null:(this.context.logger.insane("use startup bitrate from configuration ".concat(e)),{bytes:c(e),time:1})},t.prototype.addSample=function(){if(this.instanceState){var e=(0,r.getMetricsState)(this.instanceState),t=(0,r.getMetricsLastEntry)(e,this.Ugb,o.MetricType.DownloadInformation);if(this.agb){this.agb=!1;var i=this.ohb();i&&(t={value:i})}if(!t||!t.value||!t.value.bytes){t=t||{};var n=this.qhb();n>0&&(t.value={bytes:c(n),time:1}),t&&t.value||(t=(0,r.getMetricsLastEntry)(e,"default",o.MetricType.DownloadInformation));var a=1/0;t&&t.value&&!isNaN(t.value.bytes)&&!isNaN(t.value.time)&&(a=t.value.bytes/t.value.time),a>this.Ygb&&(t.value=t.value||{},t.value.bytes=c(this.Ygb),t.value.time=1)}this.cgb(t.value)}},t.prototype.getStatus=function(e){0===this.Xgb.length&&this.addSample();var t=this.dgb(e),i=this.dgb(e,1);return{value:t,result:t>1.1*i?s.Rules.SHOULD_SWITCH_UP:t<.9*i?s.Rules.SHOULD_SWITCH_DOWN:s.Rules.SHOULD_STAY}},t.prototype.phb=function(){if(this.instanceState){var e=(0,r.getMetricsHistoryFromInstanceState)(this.instanceState,this.Ugb,o.MetricType.DownloadInformation).slice(-3).map(function(e){return Math.round(8*e.value.bytes/e.value.time)});this.context.storedConfig.set("b",e),this.context.storedConfig.set("b_t",Date.now())}},t.prototype.qhb=function(){var e=this.context.storedConfig.get("b")||[];return Math.round(e.reduce(function(e,t){return e+t},0)/e.length)||-1},t.prototype.shutdown=function(){},t.prototype.setStartupPhase=function(){},t.prototype.dispose=function(){},t}(s.AdaptationRule)},20066:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.BufferFillRateRule=void 0;var r=i(89927),o=i(88844),a=i(59406);t.BufferFillRateRule=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.rhb=t.bufferSettings,n.shb=!0,n.uhb=[],n}return n(t,e),t.prototype.vhb=function(){if(0===this.uhb.length)return NaN;var e=this.uhb[this.uhb.length-1],t=e.bufferTargetLevel;if(this.shb){var i=e.bufferLevel,n=this.uhb[this.uhb.length-2],r=0;n&&(r=n.bufferLevel),i>=e.bufferTargetLevel||r>i?(this.logger.insane("startup phase is over"),this.shb=!1):t=i}return t},t.prototype.whb=function(e){isNaN(e)&&(e=this.rhb.getForwardTargetLevel());for(var t,i=Date.now()-(0,r.toMilliSeconds)(e),n=0,o=0,a=0;a<this.uhb.length;a++)(t=this.uhb[a]).timestamp>=i&&(n+=t.bufferLevel-o),o=t.bufferLevel;return((n/=this.vhb())<-1||n>1)&&this.logger.insane("buffer is changing too fast, fill rate should be between -1 and 1, but is "+n),isNaN(n)?1:n},t.prototype.addSample=function(e){var t=this;this.thb||(this.thb=window.setTimeout(function(){t.logger.insane("buffer fill rate startup phase is over (timeout)"),t.shb=!1},(0,r.toMilliSeconds)(this.rhb.getForwardTargetLevel()))),this.uhb.push(e),e.timestamp-this.uhb[0].timestamp>6e4&&this.uhb.shift()},t.prototype.getStatus=function(e){var t=this.whb(e),i=a.Rules.SHOULD_STAY;return t>.7?i=a.Rules.SHOULD_SWITCH_UP:t<-.5&&(i=a.Rules.SHOULD_SWITCH_DOWN),{value:t,result:i}},t.prototype.setStartupPhase=function(){this.shb=!0},t.prototype.shutdown=function(){(0,o.clearTimeoutIfDefined)(this.thb),this.thb=void 0},t.prototype.dispose=function(){this.shutdown(),this.uhb=[]},t}(a.AdaptationRule)},64463:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferFillStateRule=function(e,t){var i,s,l=!0,c={bufferTargetLevel:(null==(i=n.DefaultSettings.TARGET_BUFFER_LEVEL.video)?void 0:i.forwardduration)||0,bufferLevel:0},u=function(){(0,o.clearTimeoutIfDefined)(s),s=void 0};return{addSample:function(t){s||(s=window.setTimeout(function(){l=!1},(0,r.toMilliSeconds)(e.bufferSettings.getForwardTargetLevel()))),c=t},getStatus:function(){var e;return c.bufferLevel>.8*c.bufferTargetLevel?(e=a.Rules.SHOULD_SWITCH_UP,l&&(l=!1,(0,o.clearTimeoutIfDefined)(s))):e=c.bufferLevel<.4*c.bufferTargetLevel?a.Rules.SHOULD_SWITCH_DOWN:a.Rules.SHOULD_STAY,l&&(e=a.Rules.SHOULD_STAY),{value:c.bufferLevel,result:e}},setStartupPhase:function(){l=!0},shutdown:u,dispose:function(){u()}}};var n=i(70962),r=i(89927),o=i(88844),a=i(59406)},43829:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadRateRule=void 0;var r=i(89927),o=i(59406);t.DownloadRateRule=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.xhb=[],n}return n(t,e),t.prototype.yhb=function(e){void 0===e&&(e=this.context.bufferSettings.getForwardTargetLevel());var t=Date.now()-(0,r.toMilliSeconds)(e),i=this.xhb.filter(function(e){return e.timestamp>=t});if(0===i.length)return 1;var n=0;return i.forEach(function(e,t){var o=i[t-1],a=e.segmentDuration,s=a/8,l=Math.min(e.bufferLevel/e.bufferTargetLevel,1),c=Math.max(e.segmentDownloadDuration,s),u=a/c*l+a/(o?Math.max(e.timestamp-o.timestamp,s):(0,r.toMilliSeconds)(Math.max(a,c)))*(1-l);n=e.downloadCancelled?n-u:n+u}),n/i.length},t.prototype.addSample=function(e){(function(e){return null!=e.segmentDuration&&null!=e.segmentDownloadDuration})(e)&&(this.xhb.push(e),e.timestamp-this.xhb[0].timestamp>6e4&&this.xhb.shift())},t.prototype.getStatus=function(e,t){var i=this.yhb(e),n=o.Rules.SHOULD_STAY;return i>1.7?n=o.Rules.SHOULD_SWITCH_UP:i<.5&&(n=o.Rules.SHOULD_SWITCH_DOWN),{value:i,result:n}},t.prototype.setStartupPhase=function(){},t.prototype.shutdown=function(){},t.prototype.dispose=function(){this.shutdown(),this.xhb=[]},t}(o.AdaptationRule)},59406:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationRule=t.Rules=void 0,function(e){e.SHOULD_SWITCH_UP="SWITCH_UP",e.SHOULD_STAY="STAY",e.SHOULD_SWITCH_DOWN="SWITCH_DOWN"}(i||(t.Rules=i={})),t.AdaptationRule=function(){function e(e,t){this.context=e,this.samples=[],this.mimeType=t,this.logger=e.logger,this.Settings=e.settings,this.maxHistorySize=this.Settings.DEFAULT_ADAPTATION_RULE_HISTORY_SIZE}return Object.defineProperty(e.prototype,"instanceState",{get:function(){var e;return null==(e=this.context.store)?void 0:e.getState()},enumerable:!1,configurable:!0}),e.prototype.estimateStatus=function(e,t,i){return this.getStatus(t,i)},e}()},39185:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentBasedRateMeasurementRule=void 0;var r=i(46151),o=i(33436),a=i(89927),s=i(70850),l=i(17006),c=i(7676),u=i(59406);function d(e){return e.transferSize>0&&!/^https?:\/\/localhost(:\d+)?(\/|$)/.test(e.name)}function h(e,t){void 0===t&&(t=1/0);var i,n=e.value.time-(null!=(i=e.value.timeToFirstByte)?i:0);return p(8*e.value.bytes/n,t)}function p(e,t){return Math.min(e,s.Util.extractBitrateFromString("max",t))}t.SegmentBasedRateMeasurementRule=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.Ihb=-1,n.Jhb=.1,n.Khb=!0,n}return n(t,e),t.getBitrateFromPerformanceAPI=function(){if(!performance||"function"!=typeof performance.getEntriesByName)return 0;var e=0,t=0;return performance.getEntriesByType("resource").filter(d).forEach(function(i){e+=8*i.transferSize,t+=(0,a.toSeconds)(i.duration-(i.responseStart-i.requestStart))}),e>0&&t>0?e/t:0},t.prototype.Lhb=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=0);var n,r=-e-i;return n=0!==i?this.samples.slice(r,-i):this.samples.slice(r),(0,l.calculateExponentialWeightedAverage)(n,1-t)},t.validateDownloadInfo=function(e){if(e&&e.value){var t=!!e.value.bytes,i=!isNaN(e.value.time),n=void 0!==e.value.timeToFirstByte&&!isNaN(e.value.timeToFirstByte);return t&&i&&n}return!1},t.prototype.Mhb=function(e){if(!this.instanceState)return 0;var i=(0,r.getMetricsLastEntry)((0,r.getMetricsState)(this.instanceState),e,o.MetricType.DownloadInformation),n=t.validateDownloadInfo(i),a=n&&this.Ihb<i.time;return a&&isFinite(i.time)&&(this.Ihb=i.time),n&&a?h(i,this.context.settings.MAX_ALLOWED_BANDWIDTH_ESTIMATION):n&&!a?-1:0},t.prototype.Nhb=function(){var e=[],i=this.Phb();i>0&&e.push(i);var n=this.Mhb("default");n>0&&e.push(n);var r=Math.min.apply(Math,e);return r>0&&isFinite(r)?r:t.getBitrateFromPerformanceAPI()},t.prototype.addSample=function(){var e=this.Mhb(this.mimeType),t=0;this.Khb&&(t=function(e,t){var i=(0,c.getStartupBitrateFromConfig)(e),n=(0,c.getMaxStartupBitrateFromConfig)(e);return n=t>0?Math.min(n,t):n,i||n||0}(this.context,e),this.Khb=!1),0===(t=t||e||0)&&(t=this.Nhb()),t>0&&(this.samples.push(t),this.samples.length>this.maxHistorySize&&this.samples.splice(0,this.samples.length-this.maxHistorySize)),e>0&&this.Ohb()},t.prototype.getStatus=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1),0===this.samples.length&&this.addSample();var i=this.Lhb(e,t),n=this.Lhb(e,t,1);return{value:i,result:i>n*(1+this.Jhb)?u.Rules.SHOULD_SWITCH_UP:i<n*(1-this.Jhb)?u.Rules.SHOULD_SWITCH_DOWN:u.Rules.SHOULD_STAY}},t.prototype.Ohb=function(){if(this.instanceState){var e=(0,r.getMetricsHistoryFromInstanceState)(this.instanceState,this.mimeType,o.MetricType.DownloadInformation).filter(t.validateDownloadInfo).slice(-3).map(function(e){return h(e)});this.context.storedConfig.set("b",e),this.context.storedConfig.set("b_t",Date.now())}},t.prototype.Phb=function(){var e=this,t=(this.context.storedConfig.get("b")||[]).map(function(t){return p(t,e.context.settings.MAX_ALLOWED_BANDWIDTH_ESTIMATION)});return Math.round(t.reduce(function(e,t){return e+t},0)/t.length)||0},t.prototype.shutdown=function(){},t.prototype.setStartupPhase=function(){},t.prototype.dispose=function(){},t}(u.AdaptationRule)},45199:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.TimeToFirstByteMeasurementRule=void 0;var o=i(46151),a=i(33436),s=i(17006),l=i(59406);t.TimeToFirstByteMeasurementRule=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.Qhb=-1,n}return n(t,e),t.prototype.Rhb=function(e){if(!this.instanceState)return 0;var t=(0,o.getMetricsLastEntry)((0,o.getMetricsState)(this.instanceState),e,a.MetricType.DownloadInformation),i=!!t&&!!t.value,n=i&&void 0!==t.value.timeToFirstByte&&!isNaN(t.value.timeToFirstByte),r=i&&this.Qhb<t.time;return r&&isFinite(t.time)&&(this.Qhb=t.time),n&&r?t.value.timeToFirstByte:n&&!r?-1:0},t.prototype.addSample=function(){var e=this.Rhb(this.mimeType),t=this.Rhb("default"),i=e||t||0;if(i>0)for(this.samples.push(i);this.samples.length>this.maxHistorySize;)this.samples.shift()},t.prototype.Shb=function(e){var t=-e;return e>0?this.samples.slice(t):[]},t.prototype.Thb=function(e,t){var i=(0,s.calculateMean)(e),n=(0,s.calculateExponentialWeightedAverage)(e,t),r=(0,s.calculateStandardDeviation)(e,i);return{value:{median:(0,s.calculateMedian)(e),mean:i,weightedAverage:n,standardDeviation:r},result:l.Rules.SHOULD_STAY}},t.prototype.getStatus=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=1),this.Thb(this.Shb(e),t)},t.prototype.estimateStatus=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=1);var n=r(r([],this.Shb(t-1),!0),[e],!1);return this.Thb(n,i)},t.prototype.setStartupPhase=function(){},t.prototype.shutdown=function(){},t.prototype.dispose=function(){},t}(l.AdaptationRule)},28922:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.findNextHigherBitrateRepresentation=function(e,t){for(var i,n,r=0,o=e;r<o.length;r++){var a=o[r];a._bandwidth>t&&(void 0===i||a._bandwidth<i._bandwidth)&&(i=a),(void 0===n||a._bandwidth>n._bandwidth)&&(n=a)}return i??n}},83429:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getUserSelectedRepresentation=function(e,t,i,a){var s,l,c,u=function(e,t){return r.MimeTypeHelper.isAudio(e)?null==t?void 0:t.onAudioAdaptation:r.MimeTypeHelper.isVideo(e)?null==t?void 0:t.onVideoAdaptation:void 0}(t,e.config.adaptation);if(u){var d=e.serviceManager.maybeCall(n.ServiceName.ManifestService,function(e){return e.getAdaptationSet(i)},null,e.sourceContext.sourceIdentifier),h=null!=(s=null==d?void 0:d.Representation.map(function(e){return{bandwidth:e._bandwidth,id:e._id}}))?s:[],p={suggested:a.representationId,isAd:e.sourceContext.isAd,representations:h},f=null!=(l=(0,o.safeUserCallback)(function(){return u(p)},e.logger))?l:void 0;return f&&(null==(c=e.logger)||c.debug("[".concat(t,"] user has overridden adaptation suggestion! suggested: ").concat(a.representationId,", user: ")+"".concat(f))),function(e,t,i){return e.serviceManager.maybeCall(n.ServiceName.ManifestService,function(e){return t&&e.getRepresentation(t,i)},void 0,e.sourceContext.sourceIdentifier)||void 0}(e,i,f)}};var n=i(80813),r=i(85434),o=i(70850)}},function(e){return function(){return e(e.s=76344)}()}])})}()}(bitmovinplayerAbr);var bitmovinplayerAbrExports=bitmovinplayerAbr.exports;let ABRModule=getDefaultExportFromCjs$1(bitmovinplayerAbrExports);var bitmovinplayerEngineBitmovin={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[238],{34795:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerFormat=void 0,function(e){e.MP4="mp4",e.TS="ts",e.WEBM="webm"}(i||(t.ContainerFormat=i={}))},12030:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DrmKidErrorHandler=void 0;var n=i(80813),r=i(91678),o=i(46151),a=i(33436),s=i(93204),l=i(13114);t.DrmKidErrorHandler=function(){function e(e,t){var i=this;this.context=e,this.onDownloadedRepresentationExcludedCallback=t,this.g1=function(e,t){if(void 0!==e&&void 0!==t){var n=e.filter(function(e){return!t.includes(e)});i.f1(n)}};var r=e.sourceContext.sourceIdentifier;this.d1=e.store,this.a1=e.logger,this.e1=e.serviceManager.get(n.ServiceName.SourceStoreService,r),this.b1=e.serviceManager.get(n.ServiceName.ManifestService,r),this.c1=(0,s.subscribe)(this.e1)(l.getDrmKeyIdsWithErrors,this.g1)}return e.prototype.f1=function(e){var t=function(e,t){return e.getAllRepresentations().filter(function(e){return e.associatedKid&&t.includes(e.associatedKid)}).map(function(e){return e._internalId})}(this.b1,e),i=this.d1.getState();if(0!==t.length&&void 0!==i){var n=function(e,t){return t.some(function(t){return e.some(function(e){return e.equals(t)})})}(function(e){return(0,o.getMetricsHistoryFromInstanceState)(e,"default",a.MetricType.RequestedRepresentations).map(function(e){return e.value})}(i),t);this.a1.debug("Excluding representations due to DRM licenses not being available",t),this.b1.excludeRepresentations(t)&&n&&(this.d1.dispatch((0,r.clearMetricsHistory)("default",a.MetricType.RequestedRepresentations)),this.onDownloadedRepresentationExcludedCallback())}},e.prototype.trackSegment=function(e){var t=e.getDrmKid();if(void 0!==t){var i=this.e1.getState(),n=e.getRepresentationId(),r=i?(0,l.getDrmKeyIdsWithErrors)(i):[];(function(e,t,i){return e!==i.getRepresentationDrmKid(t)})(t,n,this.b1)&&(function(e,t,i){i.setRepresentationDrmKid(t,e)}(t,n,this.b1),this.f1(r))}},e.prototype.dispose=function(){this.c1()},e}()},65272:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HeartbeatService=void 0;var n=i(80813),r=i(88844);function o(e){e.shouldClearSubtitleServiceBuffers()&&e.clearSubtitleServiceBuffers()}function a(e,t){e.shouldSuspendHeartbeat()||function(e,t){var i=e.getActiveSegmentControllers(),n=i.length>0;n&&i.forEach(function(i){var n=t.getTimeForNextSegment(i.getMimeType());e.getNextSegment(i,n)}),e.areAllLoadersReady()&&(n?o(e):e.isLoadingLastPeriod()?function(e){e.areMediaTypesFinalForPlayingPeriod()?e.maybeStop():e.isAVCompletelyLoaded()&&e.signalEndOfStream(),o(e)}(e):(e.switchLoadingPeriod(),a(e,t)))}(e,t)}t.HeartbeatService=function(){function e(e,t){this.serviceManager=e,this.mediaPlayerController=t,this.QD=-1}return Object.defineProperty(e.prototype,"RD",{get:function(){return this.serviceManager.get(n.ServiceName.StreamTimeService)},enumerable:!1,configurable:!0}),e.prototype.SD=function(){var e=this;(0,r.clearTimeoutIfDefined)(this.QD),this.QD=window.setTimeout(function(){return e.TD()},250)},e.prototype.TD=function(){this.SD(),a(this.mediaPlayerController,this.RD)},e.prototype.beat=function(){this.started&&a(this.mediaPlayerController,this.RD)},Object.defineProperty(e.prototype,"started",{get:function(){return -1!==this.QD},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.TD()},e.prototype.stop=function(){(0,r.clearTimeoutIfDefined)(this.QD),this.QD=-1},e.prototype.dispose=function(){this.stop()},e}()},94358:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.MediaPlayer=t.LoadState=void 0,t.checkIfGapSkip=q;var r,o=i(4524),a=i(48143),s=i(80813),l=i(56481),c=i(3714),u=i(90408),d=i(75375),h=i(44468),p=i(91678),f=i(46151),m=i(33436),g=i(23690),v=i(87827),y=i(93204),b=i(34047),S=i(85434),_=i(89927),E=i(19274),T=i(88052),w=i(62756),A=i(65272),P=i(23901),I=i(96533),C=i(38568),M=i(90087),R=i(23940),k=i(52090),x=i(44552),O=i(15761),D=i(36193),L=i(52447),N=i(88935),U=i(27531),F=i(33903),B=i(47531),V=i(16870),j=i(68981);!function(e){e.Unloaded="unloaded",e.Preparing="preparing",e.Loading="loading",e.Loaded="loaded"}(r||(t.LoadState=r={}));var z=Object.freeze({id:"auto",bitrate:null}),H=Object.freeze({id:"auto",bitrate:null,width:null,height:null});function G(e){return e===d.ADVERTISING_ISSUER_NAME||e===d.ADVERTISING_RESTORE_ISSUER_NAME}function q(e,t){if(!T.ModuleManager.has(w.ModuleName.RendererMse)||!e.videoElement)return!1;for(var i=T.ModuleManager.get(w.ModuleName.RendererMse).Ranges,n=e.settings.MIN_SIZE_FOR_GAP_SKIPPING,r=i.findGaps(e.videoElement.buffered,n),o=!1,a=0;a<r.length;a++).1>=Math.abs(r.end(a)+i.TIME_FUDGE_FACTOR-t)&&(o=!0);return o}t.MediaPlayer=function(){function e(e){var t=this;this.j=-1,this.l=!1,this.o=!1,this.p=!1,this.q=!0,this.r="api",this.s="api",this.I=function(e){if(null==t.R()&&!e.isInit()){var i=t.isLive()?t.J(e):0;t.S(i)}},this.K=function(){t.isLive()&&t.O()&&t.P()},this.L=function(e){if(t.l)t.l=!1;else{t.d.debug("Caught a video element error: ",e);var i=(0,u.createPlayerErrorFromMediaError)(e,t.c.sourceContext.sourceIdentifier),n=t.c.serviceManager.get(s.ServiceName.RecoveryService);if(n)return void n.handleError(i);t.unload(),t.h.fireError(i)}},this.N=function(){if(t.w){var e=t.w.getStatus(t.v,t.T());t.v!==e.mode&&(t.c.eventHandler.dispatchEvent(c.PlayerEvent.LatencyModeChanged,{from:t.v,to:e.mode}),t.v=e.mode),e.mode===c.LatencyMode.Suspended||t.x.seekingOrTimeshifting||(e.requiredAction===t.i.LiveLatencyControlAction.Seek?t.M():e.requiredAction===t.i.LiveLatencyControlAction.PlaybackRate&&t.setPlaybackSpeed(1,e.actionParam,!1))}},this.V=function(){t.x.getIsRendererStalling()?(t.d.debug("Renderer is currently stalled. Waiting for unstalling before ending stall."),t.Hb(),t.A=(0,y.subscribe)(t.c.store)(function(e){return(0,v.getPlayerState)(e)},function(){return t.U()},function(e){return!(0,v.getIsRendererStalled)(e)})):t.U()},this.W=function(){t.o&&(t.d.debug("Detected replay attempt from video element"),t.c.internalPlayer.play()),t.x.transitionToPlayState(!0,t.r)},this.X=function(){t.d.insane("video element signaled pause in state: ".concat(t.x.playbackState)),t.m.maybeTransitionToPausedState(t.s)},this.zb=function(e){return{id:e.id,lang:e.lang,label:e.label,role:e.role,metadata:e.metadata,getQualities:function(){var i=(0,I.getManifestService)(t.c);return i?M.MediaPlayerManifestApiFactory.getAudioQualities(i,t.getCurrentPlayingPeriodId(),e.id):[]}}},this.Bb=function(e){var i=q(t.c,e.time);t.f.GLOBAL_DISABLE_SEEKING&&!i&&Math.abs(e.time-t.t)>.05&&(t.d.debug("Seeking now allowed, seeking back to expected time"),t.c.videoElement.currentTime=t.t)},this.Cb=function(e){if(!t.o){var i=0===t.g.getCurrentTime(!0),n=t.isPlaying(),r=t.x.isSeeking(),o=t.isStalled();!n||r||o||i?t.d.debug("Skipping timeupdate",{isPlaying:n,isSeeking:r,isStalled:o,timeUpdateWithoutBuffer:i,time:e.time}):t.kb(t.getCurrentTime())}},this.Db=function(){t.o=!0},this.Eb=function(){t.c.logger.debug("DVR window exceeded"),t.x.isPlaying()?t.f.DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED||t.Fb():t.p=!0},this.Gb=function(e){3001===e.code&&t.unload()},this.Kb=function(){var e;null!=(e=(0,I.getManifestService)(t.c))&&e.isHlsManifest()||t.Jb()},this.Lb=function(){var e;null!=(e=(0,I.getManifestService)(t.c))&&e.isHlsManifest()||t.Ib()},this.Nb=function(e){t.isLive()&&(t.O()?t.P():t.Q(!1))},this.c=e,this.d=e.logger,this.e=e.config,this.f=e.settings,this.g=e.renderer,this.h=e.eventHandler,this.n=r.Unloaded,this.c.store.dispatch((0,p.initializeMetricsForMimeType)("default",this.c.settings)),this.m=new k.MediaPlayerController(e,this.I),T.ModuleManager.has(w.ModuleName.LowLatency)&&(this.i=T.ModuleManager.get(w.ModuleName.LowLatency)),this.h.on(c.PlayerEvent.PeriodSwitch,this.Kb),this.h.on(c.PlayerEvent.PeriodSwitched,this.Lb),this.h.on(c.PlayerEvent.PlaybackSpeedChanged,this.Nb),this.z=(0,y.subscribe)(this.c.store)(function(e){return(0,v.getIsPlaying)((0,v.getPlayerState)(e))},this.K,function(e,t){return e&&!t})}return e.prototype.C=function(e,t){this.D(e,t,t.sourceContext),this.E(t)},e.prototype.D=function(e,t,i){(0,V.initializeSynchronizedTimeService)(t,i),(0,I.initializeManifestService)(t,i),(0,P.initializeManifestLoadingService)(t,i,e),(0,C.initializeManifestUpdateSchedulingService)(t,i)},e.prototype.E=function(e){(function(e){var t=T.ModuleManager.get(w.ModuleName.ABR).AdaptationService;e.serviceManager.set(s.ServiceName.AdaptationService,new t(e))})(e),function(e){e.serviceManager.set(s.ServiceName.TimedMetadataService,new O.TimedMetadataService(e))}(e),function(e){e.serviceManager.set(s.ServiceName.SegmentService,new x.SegmentService(e))}(e),function(e){var t=new B.StreamTimeService(e.serviceManager,e.sourceContext.sourceIdentifier);e.serviceManager.set(s.ServiceName.StreamTimeService,t)}(e),function(e,t){e.serviceManager.set(s.ServiceName.HeartbeatService,new A.HeartbeatService(e.serviceManager,t),e.sourceContext.sourceIdentifier)}(e,this.m),this.u=this.F(e),this.w=this.G(e)},e.prototype.F=function(e){var t=e.serviceManager,i=e.sourceContext.sourceIdentifier;if(T.ModuleManager.has(w.ModuleName.Subtitles)&&!t.has(s.ServiceName.SubtitleService,i)){var n=T.ModuleManager.get(w.ModuleName.Subtitles).SubtitleService;t.set(s.ServiceName.SubtitleService,new n(e),i)}return t.get(s.ServiceName.SubtitleService,i)},e.prototype.G=function(e){var t,i=e.serviceManager;if(null==(t=this.w)||t.dispose(),T.ModuleManager.has(w.ModuleName.LowLatency)&&this.i)return i.set(s.ServiceName.LiveLatencyService,new this.i.LiveLatencyService(e)),i.get(s.ServiceName.LiveLatencyService)},e.prototype.H=function(e){var t,i,n,r,o=this.c.serviceManager;[s.ServiceName.LiveLatencyService,s.ServiceName.TimedMetadataService].forEach(function(e){return(0,a.disposeService)(o,e)});var l=null==(t=this.c.sourceContext)?void 0:t.sourceIdentifier;if(l){(0,a.disposeService)(o,s.ServiceName.HeartbeatService,l),(0,a.disposeService)(o,s.ServiceName.SegmentService,l);
14var c=!this.c.sourceContext.isAd;e===d.ADVERTISING_ISSUER_NAME&&c?(null==(i=o.get(s.ServiceName.ManifestService,l))||i.suspend(),null==(n=o.get(s.ServiceName.ManifestUpdateSchedulingService,l))||n.suspend(),null==(r=o.get(s.ServiceName.SubtitleService,l))||r.disableAllSubtitles()):[s.ServiceName.ManifestService,s.ServiceName.ManifestLoadingService,s.ServiceName.ManifestUpdateSchedulingService,s.ServiceName.SynchronizedTimeService,s.ServiceName.SubtitleService].forEach(function(e){return(0,a.disposeService)(o,e,l)})}},e.prototype.J=function(e){var t=null!=e.getSegmentInfo().wallClockTime?e.getPlaybackTime()-(0,_.toSeconds)(e.getSegmentInfo().wallClockTime):0;return this.m.getSeekableRange().start+t},e.prototype.play=function(e){return this.r=e,this.q?this.k?this.x.isPlaying()?(this.d.debug("Ignoring play call as play was already triggered or we're already playing"),Promise.resolve()):(this.o=!1,this.x.isPaused()&&this.isLive()&&(this.p||this.getMaxTimeShift()>=0)&&!this.f.DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED&&(this.c.logger.debug("Handling DVR window excursion - going to live edge"),this.M(),this.p=!1),this.m.start(),this.x.transitionToPendingPlayState(!1,e),this.g.play()):Promise.resolve():Promise.reject("Play control not permitted")},e.prototype.M=function(){var e=this;this.f.ENABLE_SEEK_FOR_LIVE?this.x.isSeeking()||this.seek(this.getSeekableRange().end,d.INTERNAL_ISSUER_NAME):this.m.timeShift(0,function(){return e.yb()}).catch(function(){return e.xb()})},e.prototype.O=function(){return!!this.w&&!this.isPaused()&&0===this.getTimeShift()&&1===this.getPlaybackSpeed()&&!this.x.isTimeShifting()&&!this.x.isSeeking()},e.prototype.P=function(){var e;null==(e=this.w)||e.resumeControl()},e.prototype.Q=function(e){void 0===e&&(e=!0);var t=this.v===c.LatencyMode.Suspended;this.w&&!t&&(this.w.suspendControl(),e&&this.setPlaybackSpeed(1,1,!1))},e.prototype.R=function(){var e;
vendor: 23,883 bytes, line 14
14return(0,F.getRelativeCurrentTimeOffset)(null==(e=this.rb())?void 0:e.getState())},e.prototype.S=function(e){var t;null==(t=this.rb())||t.dispatch((0,U.setRelativeCurrentTimeOffset)(e))},e.prototype.T=function(){var e=[this.getBufferLevel(h.BufferType.ForwardDuration,h.MediaType.Audio),this.getBufferLevel(h.BufferType.ForwardDuration,h.MediaType.Video)].map(function(e){return e.level}).filter(function(e){return null!==e});return 0===e.length?0:Math.min.apply(Math,e)},e.prototype.U=function(){this.Hb(),this.x.stallExit(),this.x.transitionToPlayingState(this.r),this.o=!1},e.prototype.preload=function(){this.n!==r.Unloaded&&this.m&&this.m.start()},e.prototype.pause=function(e){var t;this.q&&(this.d.insane("Pause was called via the API"),this.x.isInitial()||(this.s=e,this.isLive()&&null!=(t=this.w)&&t.isConfigured()&&(this.Q(),this.N()),this.x.isPaused()||this.x.isStopped()||this.g.pause(),this.x.transitionToPausedState(this.g.isPaused(),e)))},e.prototype.mute=function(e){this.isMuted()||(this.g.mute(),this.c.eventHandler.dispatchEvent(c.PlayerEvent.Muted,{issuer:e||"api"}))},e.prototype.unmute=function(e){this.isMuted()&&(this.g.unmute(),this.c.eventHandler.dispatchEvent(c.PlayerEvent.Unmuted,{issuer:e||"api"}))},e.prototype.Y=function(e,t){var i,n=null==(i=this.rb())?void 0:i.getState();if(!n)return e;for(var r=T.ModuleManager.get(w.ModuleName.HLS).selectors,o=r.getHlsState,a=(0,r.getMergedDiscontinuityTimings)(o(n)),s=Object.values(a),l=0;l<s.length-1;l++){var c=s[l].endTime,u=s[l+1].startTime;if(e>=c-t&&e<u)return this.d.debug("Adjusting seek target to discontinuity start: ".concat(e," -> ").concat(u)),u}return e},e.prototype.seek=function(e,t){void 0===t&&(t="");var i,n,r,o=this.e&&this.e.hasOwnProperty("playback")?this.e.playback:{},a=!o.hasOwnProperty("seeking")||o.seeking,s=this.c.store.getState(),l=!!s&&null!=(r=null==(n=null==(i=(0,v.getPlayerState)(s))?void 0:i.seekingProcess)?void 0:n.isInitial)&&r,c=![d.STARTUP_ISSUER_NAME,d.INTERNAL_ISSUER_NAME].includes(t),u=l||!this.f.GLOBAL_DISABLE_SEEKING&&a,h=(0,I.getManifestService)(this.c);if(!u||!this.q||!h)return!1;var p=this.f.END_OF_BUFFER_TOLERANCE,f=h.isHlsManifest()?this.Y(e,p):(0,j.adjustTargetTimeToPeriodStart)(e,p,h,this.d);return this.o=!1,this.Z(),this.Mb(),this.x.transitionToSeekingState(f,t,c),this.c.store.dispatch((0,g.updateSeekingProcess)({issuer:t,targetTime:f,seekableRange:this.getSeekableRange(),isInitial:l})),!0},e.prototype.Z=function(){this.x.isTimeShifting()&&(this.m.getTimeShiftHandler().cancel(),this.x.transitionToTimeShiftedState(!1))},e.prototype.kb=function(e){var t;e!==this.t&&(this.c.eventHandler.dispatchEvent(c.PlayerEvent.TimeChanged,{time:e}),this.t=e,this.isLive()&&null!=(t=this.w)&&t.isConfigured()&&this.N())},e.prototype.setVolume=function(e,t){var i=this.g.getVolume();this.g.setVolume(e),i!==e&&this.c.eventHandler.dispatchEvent(c.PlayerEvent.VolumeChanged,{targetVolume:e,sourceVolume:i,issuer:t||"api"})},e.prototype.setAudioQuality=function(e){var t,i=this.getAvailableAudioQualities(),n=this.getAudioQuality();(t="auto"===e?z:i.find(function(t){return t.id===e}))&&n.id!==t.id&&(this.lb(h.MediaType.Audio,e),this.c.eventHandler.dispatchEvent(c.PlayerEvent.AudioQualityChanged,{sourceQuality:n,sourceQualityId:n.id,targetQuality:t,targetQualityId:t.id}))},e.prototype.getAudioQuality=function(){var e=this.tb(h.MediaType.Audio),t=this.c.serviceManager.get(s.ServiceName.AdaptationService),i=t.isAuto(e),n=t.getCurrentRepresentationId(e);return i||null===n?z:this.getAvailableAudioQualities().find(function(e){return e.id===n.representationId})},e.prototype.lb=function(e,t){var i=this.tb(e);this.c.serviceManager.get(s.ServiceName.AdaptationService).setFixedRepresentation(i,t)},e.prototype.setVideoQuality=function(e){var t,i=this.getAvailableVideoQualities(),n=this.getVideoQuality();(t="auto"===e?H:i.find(function(t){return t.id===e}))&&n.id!==t.id&&(this.c.eventHandler.dispatchEvent(c.PlayerEvent.VideoQualityChanged,{sourceQuality:n,sourceQualityId:n.id,targetQuality:t,targetQualityId:t.id}),this.lb(h.MediaType.Video,e))},e.prototype.getVideoQuality=function(){var e=this.tb(h.MediaType.Video),t=this.c.serviceManager.get(s.ServiceName.AdaptationService),i=t.isAuto(e),n=t.getCurrentRepresentationId(e);return i||null===n?H:this.getAvailableVideoQualities().find(function(e){return e.id===n.representationId})},e.prototype.mb=function(){var e=this.c.sourceContext;e.source&&e.source.options&&e.source.options.headers&&(this.f.HTTP_HEADERS=e.source.options.headers)},e.prototype.nb=function(e,t){var i=this.rb(t);if(void 0!==i)if(e.type===h.StreamType.Hls&&T.ModuleManager.has(w.ModuleName.HLS)&&!i.hasReducer("hls")){var r=T.ModuleManager.get(w.ModuleName.HLS);i.addReducers(n(n({},L.engineBitmovinSourceReducers),{hls:r.HlsReducer}))}else i.addReducers(L.engineBitmovinSourceReducers)},e.prototype.ob=function(){this.g.on(E.MediaElementEvent.error,this.L),this.g.on(E.MediaElementEvent.timeupdate,this.Cb),this.g.on(E.MediaElementEvent.seeking,this.Bb),this.g.on(E.MediaElementEvent.playing,this.V),this.g.on(E.MediaElementEvent.play,this.W),this.g.on(E.MediaElementEvent.pause,this.X)},e.prototype.pb=function(){this.d.debug("setting bitrate boundaries for audio to "+this.f.MIN_SELECTABLE_AUDIO_BITRATE+" - "+this.f.MAX_SELECTABLE_AUDIO_BITRATE),this.d.debug("setting bitrate boundaries for video to "+this.f.MIN_SELECTABLE_VIDEO_BITRATE+" - "+this.f.MAX_SELECTABLE_VIDEO_BITRATE)},e.prototype.qb=function(e,t){var i,n=this;return this.n===r.Unloaded?Promise.reject("Unload during load"):(this.C(e,this.c),this.c.sourceContext.source=e.config,null!=(i=this.c.videoElement)&&i.eventHandler&&this.c.videoElement.eventHandler.reset(),this.k=e,this.o=!1,this.p=!1,this.c.store.dispatch((0,g.updateSeekingProcess)({isInitial:!0})),this.pb(),this.w&&(this.v=c.LatencyMode.Suspended,this.w.reset()),this.ob(),this.f.GLOBAL_DISABLE_SEEKING=t||!1,this.n=r.Loading,this.m.init(e).then(function(){n.n=r.Loaded,n.Ib()}))},e.prototype.prepareSource=function(e,t){this.nb(e,t.sourceIdentifier),this.D(e,this.c,t);var i,n=this.c.serviceManager.get(s.ServiceName.ManifestUpdateSchedulingService,t.sourceIdentifier);return null!=n&&n.isInitiated()?Promise.resolve():null!=(i=null==n?void 0:n.init(e.url.toString()))?i:Promise.resolve()},e.prototype.prepareLoad=function(){var e=this.c.serviceManager.get(s.ServiceName.PlayerStateService);e&&(this.x=e);var t=Promise.resolve();return this.n===r.Loading&&(t=this.unload()),this.x.reset(),this.n=r.Preparing,t},e.prototype.load=function(e,t){var i,n=this;if("dash"!==e.type&&"hls"!==e.type&&"smooth"!==e.type)return Promise.reject("invalid source");this.nb(e),this.mb(),this.y=(0,y.subscribe)(this.c.store)(function(e){return(0,v.getIsStopped)((0,v.getPlayerState)(e))},this.Db,function(e){return!0===e}),this.h.on(c.PlayerEvent.DVRWindowExceeded,this.Eb,!0),this.h.on(c.PlayerEvent.Error,this.Gb,!0);var r=null!=(i=null==t?void 0:t.seeking)&&i;return this.g.ready().then(function(){return n.qb(e,r)})},e.prototype.rb=function(e){return this.c.serviceManager.get(s.ServiceName.SourceStoreService,e??this.c.sourceContext.sourceIdentifier)},e.prototype.unload=function(e){var t=this;if(this.Hb(),this.n===r.Unloaded)return Promise.resolve();var i=this.n===r.Loaded;this.o=!1,this.n=r.Unloaded,this.l=!0,this.g.off(E.MediaElementEvent.error,this.L),this.g.off(E.MediaElementEvent.timeupdate,this.Cb),this.g.off(E.MediaElementEvent.seeking,this.Bb),this.g.off(E.MediaElementEvent.playing,this.V),this.g.off(E.MediaElementEvent.play,this.W),this.g.off(E.MediaElementEvent.pause,this.X),this==null||this.y(),this.h.off(c.PlayerEvent.DVRWindowExceeded,this.Eb),this.h.off(c.PlayerEvent.Error,this.Gb),this.x.isPlaying()&&this.g.pause(),this.x.reset();var n=this.c.sourceContext.sourceIdentifier;return this.c.serviceManager.has(s.ServiceName.SynchronizedTimeService,n)&&!G(e)&&this.c.serviceManager.get(s.ServiceName.SynchronizedTimeService,n).reset(),this.Jb(),(this.m?this.m.terminate():Promise.resolve()).then(function(){t.k=void 0,t.H(e),G(e)||function(e){return!!e&&e===d.RECOVERY_ISSUER_NAME}(e)||(t.rb().dispatch((0,D.clearActiveTracksAction)()),t.S(null)),i&&t.h.dispatchEvent(c.PlayerEvent.SourceUnloaded)})},e.prototype.sb=function(){return this.m.isInitialized()},e.prototype.isPlaying=function(){return this.x.isPlaying()},e.prototype.isPaused=function(){return this.x.isPaused()},e.prototype.hasEnded=function(){return this.o},e.prototype.isMuted=function(){return this.g.isMuted()},e.prototype.isStalled=function(){return this.x.isStalled},e.prototype.isLive=function(){var e,t;return null!=(t=null==(e=(0,I.getManifestService)(this.c))?void 0:e.isLive())&&t},e.prototype.getVolume=function(){return this.g.getVolume()},e.prototype.getCurrentTime=function(e){void 0===e&&(e=h.TimeMode.AbsoluteTime);var t,i=null!=(t=this.R())?t:0;return!this.isLive()&&this.hasEnded()?e===h.TimeMode.RelativeTime?this.getDuration():this.getDuration()+i:e===h.TimeMode.RelativeTime?Math.max(0,this.m.getCurrentTime()-i):this.m.getCurrentTime()},e.prototype.getDuration=function(){var e,t;return null!=(t=null==(e=(0,I.getManifestService)(this.c))?void 0:e.getDuration())?t:0},e.prototype.getAvailableVideoQualities=function(){var e=(0,I.getManifestService)(this.c);return this.sb()&&e?e.getVideoRepresentations(this.getCurrentPlayingPeriodId()):[]},e.prototype.getAvailableSegments=function(){return this.sb()?this.m.getAvailableSegments():{}},e.prototype.getAvailableAudioQualities=function(){var e=this.getAudio(),t=(0,I.getManifestService)(this.c);if(!this.sb()||!e||!t)return[];var i=t.getAudioRepresentations(this.getCurrentPlayingPeriodId());return i[e.id]?i[e.id]:[]},e.prototype.getDroppedVideoFrames=function(){return this.g.getDroppedVideoFrames()},e.prototype.setTargetBufferLevel=function(e,t,i){this.c.bufferSettings.setTargetLevel(e,t,i)},e.prototype.getBufferLevel=function(e,t){var i={level:null,targetLevel:this.c.bufferSettings.getTargetLevel(e,t),type:e,media:t},n=this.g.getCurrentTime(),r=(0,f.getMetricsState)(this.c.store.getState()),o=Object.keys(r).find(function(e){return S.MimeTypeHelper.isVideo(e)}),a=Object.keys(r).find(function(e){return S.MimeTypeHelper.isAudio(e)});return t===h.MediaType.Video&&o?i.level=this.m.getBufferLevel(o,n,e):t===h.MediaType.Audio&&a&&(i.level=this.m.getBufferLevel(a,n,e)),i},e.prototype.getTotalStalledTime=function(){var e=(0,f.getMetricsState)(this.c.store.getState());for(var t in e)if(e[t]){var i=(0,f.getMetricsLastEntry)(e,t,m.MetricType.StalledSeconds);if(i&&i.value&&!isNaN(i.value))return Math.round(100*i.value)/100}return 0},e.prototype.tb=function(e){return Object.keys((0,f.getMetricsState)(this.c.store.getState())).find(function(t){return t.includes(e)})},e.prototype.getDownloadedData=function(e){var t=this.tb(e),i=n({},this.vb(t)),r=n({},this.ub(t));return r.id&&(r.id=""+r.id),void 0===r.width&&void 0!==i.width&&(r.width=i.width),r.width=parseInt(""+r.width),void 0===r.height&&void 0!==i.height&&(r.height=i.height),r.height=parseInt(""+r.height),void 0===r.bitrate&&void 0!==i.bitrate&&(r.bitrate=i.bitrate),r.bitrate=parseInt(""+r.bitrate),r.isAuto=this.c.serviceManager.get(s.ServiceName.AdaptationService).isAuto(t),r},e.prototype.ub=function(e){if(this.m.hasStarted()){var t=(0,f.getMetricsState)(this.c.store.getState());if(t[e])return(0,f.getMetricsLastEntry)(t,e,m.MetricType.DownloadedRepresentation).value}return{}},e.prototype.vb=function(e){if(this.m.hasStarted()){var t=(0,f.getMetricsState)(this.c.store.getState());if(t[e])return(0,f.getMetricsLastEntry)(t,e,m.MetricType.DownloadedAdaptationSet).value}return{}},e.prototype.getDownloadedVideoData=function(){var e=this.getDownloadedData(h.MediaType.Video),t=!0;return e.hasOwnProperty("isAuto")&&(t=e.isAuto),e&&(e.bitrate||e.id)?{id:e.id,bitrate:e.bitrate,height:e.height,width:e.width,isAuto:t}:{id:"",bitrate:0,height:0,width:0,isAuto:!0}},e.prototype.getDownloadedAudioData=function(){var e=this.getDownloadedData(h.MediaType.Audio),t=!0;return e.hasOwnProperty("isAuto")&&(t=e.isAuto),e&&(e.bitrate||e.id)?{id:e.id,bitrate:e.bitrate,isAuto:t}:{id:"",bitrate:0,isAuto:!0}},e.prototype.getPlaybackVideoData=function(){var e=this.m.getPlaybackRepresentation(h.MediaType.Video)||{},t=isNaN(e._height)?0:Number(e._height),i=isNaN(e._width)?0:Number(e._width),n={id:e._id+"",bitrate:Number(e._bandwidth)||0,frameRate:e._frameRate,height:t,width:i,uid:e.uid};return e._codecs&&(n.codec=b.CodecStringHelper.getExtractedCodecStrings(e._codecs).video),n},e.prototype.getPlaybackAudioData=function(){var e,t={id:String(void 0),bitrate:NaN},i=this.m.getPlaybackRepresentation(h.MediaType.Audio);return i&&null!=(e=(0,R.representationToQuality)(i,i._mimeType))?e:t},e.prototype.setQueryParameters=function(e){this.f.QUERY_PARAMETERS=e},e.prototype.clearQueryParameters=function(){this.f.QUERY_PARAMETERS=void 0},e.prototype.wb=function(e){this.x&&this.x.isTimeShifting()&&(this.x.transitionToTimeShiftedState(e),this.j=-1)},e.prototype.xb=function(){this.wb(!1)},e.prototype.yb=function(e){this.wb(e!==d.STARTUP_ISSUER_NAME)},e.prototype.getMaxTimeShift=function(){if(this.isLive()&&this.sb())return this.e.playback&&!1===this.e.playback.timeShift?0:this.m.getMaxTimeShift()},e.prototype.timeShift=function(e,t){var i=this;if(this.sb()&&0>=this.getMaxTimeShift()){-1===this.j&&(this.j=this.getCurrentTime(),0===this.j&&(this.j=this.m.getTimeShiftLiveEdge())),this.Mb();var n=this.m.getPlaybackTimeForTimeShiftOffset(e);this.x.transitionToTimeShiftingState(this.j,n,t||"api",t!==d.STARTUP_ISSUER_NAME),this.m.timeShift(e,function(){return i.yb(t)}).catch(function(){return i.xb()})}},e.prototype.getTimeShift=function(){return this.sb()?this.m.getTimeShift():0},e.prototype.addSubtitle=function(e){var t=this;return this.sb()&&this.u?Promise.resolve(void 0).then(function(){t.u.addExternalSubtitle(e)}):Promise.reject(void 0)},e.prototype.removeSubtitle=function(e){this.sb()&&this.u&&this.u.removeSubtitle(e)},e.prototype.enableSubtitle=function(e){return this.sb()&&this.u?this.u.enableSubtitle(e):Promise.resolve(!1)},e.prototype.disableSubtitle=function(e){return this.sb()&&this.u?this.u.disableSubtitle(e):Promise.resolve(!1)},e.prototype.listSubtitles=function(){return this.sb()&&this.u&&this.m?this.u.getAvailableSubtitles(this.getCurrentPlayingPeriodId()):[]},e.prototype.setAudio=function(e){var t=this;if(this.sb()&&this.m&&"string"==typeof e){var i=this.getAudio();if(i&&i.id===String(e))return;this.m.setAudio(e).then(function(){var e=t.getAudio();e&&i&&e.id!==i.id&&t.c.eventHandler.dispatchEvent(c.PlayerEvent.AudioChanged,{targetAudio:e,sourceAudio:i,time:t.g.getCurrentTime()})}).catch(function(e){t.d.debug("setAudio failed for lang ",e)})}},e.prototype.getAvailableAudio=function(){return this.sb()&&this.m?this.m.getAvailableAudio(this.getCurrentPlayingPeriodId()).map(this.zb):[]},e.prototype.getAudio=function(){if(this.sb()&&this.m){var e=this.m.getAudio();if(e)return this.zb(e)}return null},e.prototype.getManifest=function(){var e,t=null==(e=(0,I.getManifestService)(this.c))?void 0:e.getManifest();if(t)return t._isHls?this.Ab():t.originalDashManifest},e.prototype.Ab=function(){return T.ModuleManager.get(w.ModuleName.HLS).selectors.getHlsState(this.rb().getState()).masterPlaylist.string},e.prototype.getBufferedRanges=function(){var e=this.m.getBufferedRanges(!0);return o.BufferRangeHelper.getCommonBufferedRanges(e).map(function(e){return{start:e.getStart(),end:e.getEnd()}})},e.prototype.getSnapshot=function(e,t){if(this.isPlaying()||this.isPaused())return this.g.getSnapshotData(e,t)},e.prototype.setPlaybackSpeed=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=!0),this.g.setPlaybackSpeed(e*t),this.x.playbackSpeed!==this.g.getPlaybackSpeed()&&this.x.setPlaybackSpeed(e,t,i)},e.prototype.getPlaybackSpeed=function(){return this.x.playbackSpeed},e.prototype.permitControl=function(e){this.q=e},e.prototype.getSeekableRange=function(){return(!this.isLive()||this.f.ENABLE_SEEK_FOR_LIVE)&&this.m?this.m.getSeekableRange():{start:-1,end:-1}},e.prototype.createManifestApi=function(){return M.MediaPlayerManifestApiFactory.create(this,this.c)},e.prototype.Fb=function(){var e=this.m.getTimeShiftHandler(),t=this.getMaxTimeShift()+e.getMinSegmentDuration(),i=this.m.getPlaybackTimeForTimeShiftOffset(t),n=e.isTimeInBufferedRange(i);this.c.logger.debug("Handling DVRWindowExceeded - TimeShifting to ".concat(n?t:"live edge")),this.timeShift(n?t:0)},e.prototype.getLatency=function(){var e;return null==(e=this.w)?void 0:e.getLatency()},e.prototype.setTargetLatency=function(e){var t=(0,I.getManifestService)(this.c);if(this.w&&t){var i=Math.abs(t.getTimeShiftBufferDepthSeconds());e>i&&(e=i,this.d.debug("Tried to set target latency outside DVR window, corrected to lower bound",i)),this.c.eventHandler.dispatchEvent(c.PlayerEvent.TargetLatencyChanged,{from:this.w.getTargetLatency(),to:e}),this.w.setTargetLatency(e)}},e.prototype.getTargetLatency=function(){var e;return null==(e=this.w)?void 0:e.getTargetLatency()},e.prototype.setCatchupConfig=function(e){var t;null==(t=this.w)||t.setCatchupConfig(e)},e.prototype.getCatchupConfig=function(){var e;return null==(e=this.w)?void 0:e.getCatchupConfig()},e.prototype.setFallbackConfig=function(e){var t;null==(t=this.w)||t.setFallbackConfig(e)},e.prototype.getFallbackConfig=function(){var e;return null==(e=this.w)?void 0:e.getFallbackConfig()},e.prototype.release=function(e){var t,i=this;return this.h.off(c.PlayerEvent.PeriodSwitch,this.Kb),this.h.off(c.PlayerEvent.PeriodSwitched,this.Lb),this.h.off(c.PlayerEvent.PlaybackSpeedChanged,this.Nb),this.z(),null==(t=this.B)||t.call(this),this.unload(e).then(function(){return i.x=null,i.m=(0,l.dispose)(i.m),i.g.release().then(function(){return i.g=null})})},e.prototype.Hb=function(){this.A&&(this.A(),this.A=void 0)},e.prototype.Ib=function(){for(var e=this.getCurrentTime(),t=0,i=this.getAvailableAudio();t<i.length;t++){var n=i[t];this.c.eventHandler.dispatchEvent(c.PlayerEvent.AudioAdded,{track:n,time:e})}},e.prototype.Jb=function(){for(var e=this.getCurrentTime(),t=0,i=this.getAvailableAudio();t<i.length;t++){var n=i[t];this.c.eventHandler.dispatchEvent(c.PlayerEvent.AudioRemoved,{track:n,time:e})}},e.prototype.Mb=function(){var e=this;!this.B&&this.c.store&&(this.B=(0,v.subscribeToSeekedOrTimeshifted)(this.c.store,function(){var t;null==(t=e.B)||t.call(e),e.B=void 0,e.O()?e.P():e.Q()}))},e.prototype.getCurrentPlayingPeriodId=function(){return(0,N.getPlayingPeriodId)(this.rb().getState())},e.prototype.updateCallback=function(e){},e.prototype.onFullscreenEnter=function(){},e.prototype.onFullscreenExit=function(){},e.prototype.isAirplayAvailable=function(){return!1},e.prototype.isAirplayActive=function(){return!1},e.prototype.showAirplayTargetPicker=function(){},e}()},52090:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MediaPlayerController=void 0,t.isBufferChangeRequired=W;var n=i(4524),r=i(80813),o=i(56481),a=i(3714),s=i(75375),l=i(44468),c=i(70962),u=i(91678),d=i(23690),h=i(87827),p=i(48488),f=i(15971),m=i(77179),g=i(93204),v=i(34047),y=i(79721),b=i(78877),S=i(87244),_=i(85434),E=i(28334),T=i(19274),w=i(88052),A=i(62756),P=i(35046),I=i(12030),C=i(87222),M=i(13422),R=i(16197),k=i(84696),x=i(14443),O=i(58784),D=i(11536),L=i(36193),N=i(62198),U=i(42208),F=i(88935),B=i(13114),V=i(39523),j=i(99529),z=i(52602),H=i(69102),G=i(60729);function q(e){var t=w.ModuleManager.get(A.ModuleName.HLS,!1),i=null==t?void 0:t.M3u8Loader;return void 0!==i&&e instanceof i}function W(e,t){return!(0,H.areAudioMimeCodecsCompatible)({mimeType:e._mimeType,codec:(0,M.getCodecsFromAdaptationSet)(e)},{mimeType:t._mimeType,codec:(0,M.getCodecsFromAdaptationSet)(t)})}function Y(e,t){var i=e.getPlaybackTimeRange(),n=(0,j.getTrackIdentifier)(e.getSegmentInfo());i&&(null==t||t.dispatch((0,V.removeStreamTimeRange)(n,i,j.StreamTimeRangeType.Loading)))}t.MediaPlayerController=function(){function e(e,t){var i=this;this.zF={},this.iG=function(e){if(i.yF.isBufferClearingOngoing())Y(e,i.jG());else{if(i.PF.trackSegment(e),i.XF(e))return i.sF.logger.debug("Dropping segment ".concat(e.getUrl())),void Y(e,i.jG());var t=e.getMimeType(),n=i.zF[t];n&&i.kG(n)&&i.UF(e.getPeriodId()),i.yF.addSegment(e).then(function(){var e;null==(e=i.LF)||e.beat()}).catch(function(e){i.nF&&i.nF.debug(e)}),i.tF(e)}},this.HG=function(){var e=i.yF.getBufferedRangesMap(),t=Math.max.apply(Math,Object.values(e).filter(function(e){return e.length>0}).map(function(e){return e[e.length-1].start}));i.seek(t,!1,!0)},this.IG=function(){var e;i.KG(),i.vF&&i.vG(),i.GG(),i.JG(),i.vF&&(i.getAllSegmentControllers().forEach(function(e){return e.updateMpd()}),null==(e=i.NF)||e.onManifestUpdate()),i.sF.serviceManager.get(r.ServiceName.TimedMetadataService).parseEventStream()},this.YG=function(){(i.hasStreamEnded()||i.isInitialized()&&!i.DF.isPlaying())&&i.start()},this.eG=function(e){var t;if(e){if(e.success||408===e.httpStatus){var n=i.zF[e.mimeType];n&&i.fG(e,n)}e.success||null==(t=i.LF)||t.beat()}},this.gG=function(){i.getAllSegmentControllers().every(function(e){var t=i.MF.getTimeForNextSegment(e.getMimeType());return e.hasNext(t)})?i.nF.debug("ignoring ended event in firePlaybackFinishedEvent as there are more segments available"):i.CF.isLastPeriod(i.EF.getCurrentPlayingPeriodId())?i.yF.hasFutureBufferBlockData()||(i.stop(),i.nF.debug("Stopping buffer controller"),i.yF.stop(!0),i.DF.transitionToStoppedState()):i.nF.debug("ignoring ended event in firePlaybackFinishedEvent as there is a future period")},this.sF=e,this.nF=e.logger,this.oF=e.settings,this.pF=e.bufferSettings,this.qF=e.eventHandler,this.rF=e.renderer,this.tF=t,this.vF=!1,this.uF=null,this.wF={},this.xF=0,this.HF=!1,this.GF=!1,this.QF=new D.PlayerConfigEnhancer(e)}return e.prototype.UF=function(e){this.yF.addRequiredMediaType(e,"video/mp4"),this.yF.addRequiredMediaType(e,"audio/mp4")},e.prototype.VF=function(){var e=this,t=this.CF.isLive(),i=t?this.getTimeShift():this.rF.getCurrentTime();t?this.timeShift(i,function(){},!0).catch(function(t){return e.sF.logger.debug("TimeShift failed",t)}):this.seek(i,!1,!1,!0)},e.prototype.WF=function(){this.VF(),this.sF.logger.debug("manifest update interrupted by DRM key status change")},e.prototype.XF=function(e){var t=_.MimeTypeHelper.isSubtitle(e.getMimeType()),i=this.sF.sourceContext.technology.streaming===l.StreamType.Hls,n=(0,m.getStartTimeOffset)(this.jG().getState())+this.CF.getDuration(),r=this.isVod()&&e.getPlaybackTime()>=n,o=this.HF||r,a=this.CF.isRepresentationExcluded(e.getRepresentationId());return!t&&!i&&o||a},e.prototype.jG=function(){return this.sF.serviceManager.get(r.ServiceName.SourceStoreService,this.sF.sourceContext.sourceIdentifier)},e.prototype.kG=function(e){var t=v.CodecStringHelper.getExtractedCodecStrings(e.getCodecs());return!!(t.video&&t.audio)},e.prototype.getMaxTimeShift=function(){return this.getTimeShiftHandler().getMaxTimeShift()},e.prototype.lG=function(){this.qF.off(a.PlayerEvent.SegmentRequestFinished,this.eG)},e.prototype.mG=function(){var e=this,t=this.sF.store;!this.TF&&t&&(this.TF=(0,g.subscribe)(t)(function(e){if(e)return(0,h.getPlayerState)(e).seekingProcess},function(t,i){return t&&i&&e.bG(t,i)}))},e.prototype.nG=function(){var e=this.jG();!this.RF&&e&&(this.RF=(0,g.subscribe)(e)(N.getManifest,this.IG,function(e,t){return e.isInitialized&&!t.isInitialized}))},e.prototype.oG=function(){this.RF&&(this.RF(),this.RF=null)},e.prototype.pG=function(){var e=this.jG();!this.SF&&e&&(this.SF=(0,g.subscribe)(e)(F.getPlayingTracksState,this.YG,F.wasSwitchingToPeriodIdReset))},e.prototype.qG=function(){this.SF&&(this.SF(),this.SF=void 0)},e.prototype.rG=function(e){var t,i,n=(0,M.getMimeTypeForAdaptationSet)(e);if(_.MimeTypeHelper.isAV(n)){this.sF.store.dispatch((0,u.initializeMetricsForMimeType)(n,this.sF.settings)),this.jG().dispatch((0,L.setMediaTypeAction)(e._internalId,(0,k.resolveMediaTypes)(e))),this.wF[n]=(0,M.getCodecsFromAdaptationSet)(e);
14var r=this.EF.getCurrentPlayingPeriodId();this.zF[n]=new x.SegmentController(this.sF,this.iG,n,this.wF[n],e.isTransmuxingRequired,this.AF,null!=(t=e._periodId)?t:r,this.jG()),null==(i=this.NF)||i.updateSegmentControllers(this.zF),this.IF&&this.zF[n].setTransmuxer(this.IF),r&&this.rF.storeDrmInitDataFromManifest(e),this.sF.segmentInfoService&&this.sF.segmentInfoService.setSegmentControllers(Object.values(this.zF))}},e.prototype.updatePeriodForTimeshift=function(e,t,i){var n,r=this.EF.getCurrentPlayingPeriodId();r||this.EF.setCurrentPlayingPeriodId(e),this.EF.getCurrentLoadingPeriodId()!==e&&i&&this.switchLoadingPeriodForAllMedia(e),t&&r!==e&&(this.sF.logger.debug("Updating current playing period to ".concat(e)),this.EF.setCurrentPlayingPeriodId(e)),r!==e&&(null==(n=(0,f.getSourceStore)(this.sF))||n.dispatch((0,U.periodSwitchStarted)(e)))},e.prototype.sG=function(e){var t=e.AdaptationSet.find(function(e){return _.MimeTypeHelper.isVideo(e._mimeType)});t&&this.yF.addRequiredMediaType(e._id,t._mimeType);var i=e.AdaptationSet.find(function(e){return _.MimeTypeHelper.isAudio(e._mimeType)});i&&this.yF.addRequiredMediaType(e._id,i._mimeType)},e.prototype.tG=function(e){var t=this;e.AdaptationSet.filter(function(e){return _.MimeTypeHelper.isSubtitle(e._mimeType)}).forEach(function(i){t.yF.addRequiredMediaType(e._id,i._mimeType)})},e.prototype.uG=function(e){this.sG(e),this.tG(e)},e.prototype.vG=function(){var e=this;
14this.CF.getAllPeriods().forEach(function(t){e.uG(t),e.yF.checkIfEndOfBufferReached(e.oF.END_OF_BUFFER_TOLERANCE,!0)})},e.prototype.wG=function(){var e=this;return this.uF?this.uF:!0===this.vF||null===this.CF.getManifest()?this.uF=Promise.resolve():(this.xG(),this.wF={},this.uF=this.rF.ready().then(function(){return e.AG()}))},e.prototype.xG=function(){var e=this;this.zF&&(Object.keys(this.zF).forEach(function(t){return e.zF[t].dispose()}),this.zF={})},e.prototype.yG=function(){var e=this;if(w.ModuleManager.has(A.ModuleName.ContainerTS)){var t=w.ModuleManager.get(A.ModuleName.ContainerTS);this.getAllSegmentControllers().filter(function(e){return e.isTransmuxerRequired()}).forEach(function(i){e.IF=e.IF||new t.WebWorkerTransmuxer(e.sF,e.zG()),i.setTransmuxer(e.IF)}),this.JF&&this.JF.setTransmuxer(this.IF)}},e.prototype.zG=function(){return this.getAllSegmentControllers().filter(function(e){return _.MimeTypeHelper.isAV(e.getMimeType())}).length>1},e.prototype.AG=function(){this.EF.setInitialPeriod(),this.FG(),this.vG();var e=this.EF.getCurrentPlayingPeriod()||this.CF.getFirstPeriod();e&&this.CG(e),this.BG(),this.yG(),this.vF=!0},e.prototype.BG=function(){var e,t,i,n,r=this.getAudioSegmentController();if(this.JF){var o=null!=(i=null==(t=null==(e=null==r?void 0:r.getCurrentLangObj)?void 0:e.call(r))?void 0:t.lang)?i:null==(n=(0,C.getPreferredLanguage)("audio/mp4"))?void 0:n.language;this.JF.enableForcedSubtitle(o)}},e.prototype.CG=function(e){var t,i=this;this.DG(null!=(t=null==e?void 0:e.AdaptationSet)?t:[]).forEach(function(e){return i.EG(e)})},e.prototype.DG=function(e){var t,i,n,r=e.find(function(e){return _.MimeTypeHelper.isAudio(e._mimeType)}),o=e.find(function(e){return _.MimeTypeHelper.isVideo(e._mimeType)}),a=(null!=(i=null==(t=null==o?void 0:o.ContentComponent)?void 0:t.length)?i:0)>1;if(!r||!o||!a)return e;var s=(0,C.getHlsDefaultLanguage)(r._mimeType,this.jG().getState()),l=null==(n=o.ContentComponent)?void 0:n.find(function(e){return e._lang===(null==s?void 0:s.language)&&e._id===(null==s?void 0:s.name)});return s&&l?[o]:e},e.prototype.EG=function(e){var t=(0,M.getMimeTypeForAdaptationSet)(e);(0,_.isMediaTypeContained)(this.wF,t)||this.rG(e)},e.prototype.FG=function(){this.yF&&this.yF.dispose(),this.yF=new P.BufferController(this.sF,this.HG,this.CF.getTotalDuration(),this.EF.getCurrentPlayingPeriodId())},e.prototype.getBufferLevel=function(e,t,i,n){return void 0===n&&(n=!0),this.yF?this.yF.getOverallBufferLevel(e,t,i,n):0},e.prototype.GG=function(){var e=this;if(this.EF.shouldHandleDroppedOutPeriod()&&this.EF.isLoadingPeriodDroppedOut()){var t=this.getTimeShift();this.nF.debug("Current loading period (".concat(this.EF.getCurrentLoadingPeriodId(),") ")+"dropped out of the manifest, handling gracefully by time shifting to current offset ".concat(t)),this.timeShift(t,void 0,!0).catch(function(t){return e.sF.logger.debug("TimeShift failed",t)})}},e.prototype.JG=function(){var e=this;this.sF.serviceManager.maybeCall(r.ServiceName.ThumbnailService,function(t){e.sF.sourceContext.source&&e.sF.sourceContext.source.thumbnailTrack||t.addThumbnails(e.CF.getAllDashThumbnailSources())})},e.prototype.KG=function(){var e=this.CF.isLive(),t=this.sF.serviceManager.get(r.ServiceName.StartOffsetService),i=this.CF.hasSuggestedStartPosition();if(e){var n=this.CF.getTimeShiftBufferDepthSeconds();0!==n&&(this.KF.expirationTimeInSeconds=n),i&&(t.manifestStartOffset=this.CF.getLiveStartOffset(),this.LG())}else i&&(t.manifestStartOffset=this.CF.getVodStartOffset())},e.prototype.LG=function(){if(!this.isInitialized()){var e=Math.abs(this.CF.getLiveStartOffset(!1));e=e>0?e:this.CF.getMaxSegmentDuration(),this.sF.bufferSettings.setDistanceToLiveEdge(e)}},e.prototype.terminate=function(){var e,t,i=this;this.nF.debug("stopping playback"),this.stop(),this.getAllSegmentControllers().forEach(function(e){return e.stop()}),this.yF&&this.yF.stop(!0),this.IF=(0,o.dispose)(this.IF),this.NF=(0,o.dispose)(this.NF),this.PF=(0,o.dispose)(this.PF),(0,o.dispose)(this.EF),this.OF=null,this.rF.off(T.MediaElementEvent.ended,this.gG);var n=this.rF.shutdown(!1).catch(function(e){return i.nF.debug("Got an error on shutdown",{message:e.message}),Promise.resolve()});return this.lG(),this.qG(),this.vF=!1,null==(e=this.EF)||e.setCurrentPlayingPerio
vendor: 24,649 bytes, line 14
14dId(void 0),this.wF=null,this.sF.store.dispatch((0,p.resetDrmKidErrors)()),null==(t=this.CF)||t.resetExcludedRepresentations(),this.xG(),n},e.prototype.dispose=function(){this.NF=(0,o.dispose)(this.NF),this.yF=(0,o.dispose)(this.yF),(0,o.dispose)(this.EF);try{this.lG()}catch{}this.oG(),this.qG(),this.xG(),this.TF&&this.TF(),this.JF=null,this.LF=null,this.MF=null,this.zF=null,this.oF=null,this.pF=null,this.qF=null,this.rF=null,this.wF=null},e.prototype.MG=function(){var e=this.sF.sourceContext.sourceIdentifier;this.CF=this.sF.serviceManager.get(r.ServiceName.ManifestService,e),this.DF=this.sF.serviceManager.get(r.ServiceName.PlayerStateService),this.JF=this.sF.serviceManager.get(r.ServiceName.SubtitleService,e),this.KF=this.sF.serviceManager.get(r.ServiceName.MetadataParsedService),this.AF=this.sF.serviceManager.get(r.ServiceName.ManifestLoadingService,e),this.LF=this.sF.serviceManager.get(r.ServiceName.HeartbeatService,e),this.MF=this.sF.serviceManager.get(r.ServiceName.StreamTimeService),this.BF=this.sF.serviceManager.get(r.ServiceName.ManifestUpdateSchedulingService,e)},e.prototype.init=function(e){var t,i=this,n=this.jG();this.EF=new O.PeriodSwitchTracker(this.sF),this.pG(),this.mG(),this.FF=!1,this.sF.store.dispatch((0,p.resetDrmKidErrors)()),this.MG(),n&&!this.PF&&(this.PF=new I.DrmKidErrorHandler(this.sF,function(){return i.WF()})),this.rF.on(T.MediaElementEvent.ended,this.gG);var o=this.BF.isInitiated()?Promise.resolve():this.BF.init(e.url.toString());e.config.drm&&(null==(t=this.sF.serviceManager.get(r.ServiceName.DrmService))||t.resolveDrmSystemFromSourceConfig(e.config.drm));var a=this.sF.settings.MAX_STARTUP_BUFFER,s=c.DefaultSettings.MAX_STARTUP_BUFFER;return s!==1/0&&a<s&&this.nF.debug("MAX_STARTUP_BUFFER (".concat(a," s) is below the recommended startup buffer for this platform (").concat(s," s). Playback may stall on initial play.")),o.then(function(){return i.nG(),i.IG(),i.QF.adjustToCurrentSource(i.sF,i.CF),i.vF?Promise.resolve():i.wG()})},e.prototype.stop=function(){var e;this.nF.debug("Stopping main timer"),null==(e=this.LF)||e.stop(),this.uF=null,this.qF.off(a.PlayerEvent.SegmentRequestFinished,this.eG),this.oG()},e.prototype.isOneLoaderReady=function(){return this.getAllSegmentControllers().some(function(e){return e.canLoad()})},e.prototype.areAllLoadersReady=function(){return this.getAllSegmentControllers().every(function(e){return e.canLoad()})},e.prototype.isVod=function(){return!this.CF.isLive()},e.prototype.NG=function(){return this.DF.isPaused()&&this.oF.STOP_DOWNLOAD_ON_PAUSE&&this.CF.isLive()},e.prototype.OG=function(e){var t=Object.keys(this.zF).find(function(t){return _.MimeTypeHelper.isAV(t)&&e!==t});if(!t||(0,G.isPlayingLowLatencyHls)(this.sF))return!1;if(this.FF)return _.MimeTypeHelper.isAudio(t);var i=this.zF[t],n=this.MF.getTimeForNextSegment(t);if(i.hasNext(n)&&!i.hasDownloadError&&!i.hasDelayedSegmentsInTransmuxer()){var r=this.getBufferRelevantTime(),o=this.VG(e,r),a=this.VG(t,r);return this.oF.DISABLE_PARALLEL_SEGMENT_LOADING&&o===a?_.MimeTypeHelper.isVideo(t):!this.PG(t,a)&&n<this.MF.getTimeForNextSegment(e)}return i.getCurrentPeriodId()!==this.zF[e].getCurrentPeriodId()},e.prototype.PG=function(e,t){var i=_.MimeTypeHelper.getMediaType(e);return t>=this.pF.getForwardTargetLevel(i)},e.prototype.QG=function(){var e=this,t=this.getAllSegmentControllers(),i=this.yF.hasPendingSegments(),n=t.map(function(e){return e.getMimeType()}),r=t.some(function(e){return e.hasPendingSegments()}),o=n.some(function(t){return e.rF.isDataBeingAppended(t)});return!r&&!i&&!o},e.prototype.shouldSuspendHeartbeat=function(){return!this.isOneLoaderReady()||this.NG()||this.yF.isBufferClearingOngoing()||this.GF},e.prototype.getActiveSegmentControllers=function(){var e=this;return this.getAllSegmentControllers().filter(function(t){return e.RG(t)})},e.prototype.RG=function(e){var t=this.EF.getCurrentLoadingPeriodId(),i=this.MF.getTimeForNextSegment(e.getMimeType());return e.canLoad()&&(e.hasNext(i)||e.hasPendingSegments(t))&&!this.OG(e.getMimeType())},e.prototype.shouldClearSubtitleServiceBuffers=function(){var e;return!this.DF.seekingOrTimeshifting&&!!(null!=(e=this.JF)&&e.hasSubtitles())},e.prototype.clearSubtitleServiceBuffers=function(){var e;null==(e=this.JF)||e.clearBuffersUntil(this.rF.getCurrentTime()-10)},e.prototype.areMediaTypesFinalForPlayingPeriod=function(){var e=this.EF.getCurrentPlayingPeriodId();return this.yF.areBufferBlockMediaTypesFinalForPeriod(e)},e.prototype.maybeStop=function(){var e=this.CF.isManifestFinalized(),t=this.CF.isLastPeriod(this.EF.getCurrentLoadingPeriodId());e&&t&&(this.yF.stop(!1),this.QG()&&(this.signalEndOfStream(),this.stop()))},e.prototype.SG=function(){var e=this;if(!this.DF.isPlay()||this.DF.hasBeenPlaying)return!1;var t=this.sF.settings.MAX_STARTUP_BUFFER;if(t===1/0||this.yF.isSegmentStoreWaitingForSegments())return!1;var i=this.getBufferRelevantTime();if(this.UG(i))return this.nF.debug("Not delaying segment loading despite reaching max startup buffer: current time ".concat(i," is in an A/V timeline gap")),!1;var n=Object.keys(this.wF),r=Math.max(t,this.TG(n)),o=n.map(function(t){return e.VG(t,i)});return!(Math.min.apply(Math,o)<r||(this.nF.debug("Max startup buffer of ".concat(r," reached, delaying segment loading until playback has started"),{currentTime:i,maxStartupBuffer:r,bufferLevels:o}),0))},e.prototype.TG=function(e){var t=this.sF.settings.STARTUP_THRESHOLD,i=this.jG(),n=(0,B.getDrmState)(null==i?void 0:i.getState()),r=(0,b.getBufferEndSafetyMargin)(n);return Math.max((0,E.getPlatformSafeStartupBuffer)(this.sF,e),t,r)},e.prototype.UG=function(e){if(this.yF.isInStartupPhase())return!1;var t=this.yF.getBufferedRangesMap(!1),i=Object.keys(t),r=i.filter(function(i){return!(0,n.isInTimeRanges)(t[i],e)});return 0!==r.length&&r.length!==i.length&&r.every(function(i){return Math.min.apply(Math,t[i].map(function(e){return e.start}))-e>=1})},e.prototype.getNextSegment=function(e,t){if(e.canLoad()&&this.rF.shouldContinueBuffering()&&!this.SG()){var i=_.MimeTypeHelper.getMediaType(e.getMimeType()),n=this.pF.getForwardTargetLevel(i),o=this.VG(e.getMimeType(),this.getBufferRelevantTime());o>=n||(this.sF.serviceManager.get(r.ServiceName.AdaptationService).addSample(e.getMimeType(),{bufferTargetLevel:n,bufferLevel:o}),e.hasNext(t)&&e.getNext(t))}},e.prototype.getBufferRelevantTime=function(){return this.DF.seekingOrTimeshifting?this.DF.targetPlaybackTime:this.rF.getCurrentTime()},e.prototype.VG=function(e,t){return this.getBufferLevel(e,t,l.BufferType.ForwardDuration)},e.prototype.isLoadingLastPeriod=function(){return this.EF.isLoadingLastPeriod()&&!this.FF},e.prototype.switchLoadingPeriod=function(){if(this.FF){var e=this.getAudioSegmentController(),t=e.getCurrentPeriodId(),i=this.CF.getNextPeriod(t)._id;this.XG(i),e.getCurrentPeriodId()===this.EF.getCurrentLoadingPeriodId()&&(e.isTransmuxerRequired()&&e.getTransmuxer()&&(e.getTransmuxer().dispose(),e.setTransmuxer(this.IF)),this.FF=!1,this.nF.debug("The audio SegmentController caught up to the overall loading period again."))}else{var n=this.CF.getNextPeriod(this.EF.getCurrentLoadingPeriodId());n&&this.switchLoadingPeriodForAllMedia(n._id)}},e.prototype.switchLoadingPeriodForAllMedia=function(e){var t=this;e!==this.EF.getCurrentLoadingPeriodId()&&(this.FF=!1,this.WG(e),this.getAllSegmentControllers().filter(function(t){return t.getCurrentPeriodId()!==e}).forEach(function(i){i.switchPeriod(e),t.rF.storeDrmInitDataFromManifest(i.getAdaptationSetForPeriodId(e))}),this.EF.setCurrentLoadingPeriodId(e))},e.prototype.WG=function(e){var t,i,n=this;(null!=(i=null==(t=this.CF.getPeriod(new R.PeriodId(e)))?void 0:t.AdaptationSet)?i:[]).forEach(function(e){return n.EG(e)}),this.resetTransmuxer()},e.prototype.XG=function(e){var t=this.getAudioSegmentController(),i=t.getCurrentPeriodId();t.resetTransmuxer(),t.switchPeriod(e),this.nF.debug("Switched audio loading period from ".concat(i," to ").concat(e))},e.prototype.isAVCompletelyLoaded=function(){var e=this.getAllSegmentControllers().some(function(e){return e.hasPendingSegments()})||this.yF.hasPendingSegments();return this.CF.isManifestFinalized()&&!e},e.prototype.getBufferedRanges=function(e){return void 0===e&&(e=!1),this.yF.getBufferedRangesMap(e)},e.prototype.resetTransmuxer=function(){this.IF&&(this.IF.dispose(),this.IF=null),this.yG()},e.prototype.ZG=function(){this.yF.hasStopped()&&this.yF.restart()},e.prototype.aG=function(e,t,i,n){if(i&&0===e)return!1;var r=e<this.rF.getCurrentTime()&&this.sF.settings.CLEAR_BUFFERS_ON_SEEKING_BACKWARDS;return!t&&(!this.yF.isInBufferedRange(e)||r)||n},e.prototype.bG=function(e,t){var i;if(-1===e.targetTime&&t.targetTime>=0)null==(i=this.DF)||i.transitionToSeekedState(t.issuer!==s.STARTUP_ISSUER_NAME);else{var n=e.targetTime!==t.targetTime,r=e.targetTime>=0;n&&r&&this.seek(e.targetTime,e.issuer===s.STARTUP_ISSUER_NAME)}},e.prototype.seek=function(e,t,i,n){var r,o=this;if(void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),this.yF){this.ZG(),this.xF++;var a=this.xF,l=null!=(r=this.CF.getPeriodIdForTime(e))?r:y.DEFAULT_PERIOD_ID;this.cG(l);var c,u,p=this.EF.getCurrentPlayingPeriodId();this.nF.debug("seek from current period (".concat(p,") to target period ")+"(".concat(l,") - seek time in period is: ").concat(e)),this.yF.readyToSeek().then(function(){var r;if(u=o.aG(e,i,t,n),c=o.EF.getCurrentLoadingPeriodId()!==l&&u,p!==l&&(null==(r=(0,f.getSourceStore)(o.sF))||r.dispatch((0,U.periodSwitchStarted)(l))),u&&o.yF.isBufferAvailable())return o.dG()}).then(function(){return o.vF?(c&&o.switchLoadingPeriodForAllMedia(l),u&&o.getAllSegmentControllers().forEach(function(t){t.setAdaptionLogicStartupPhase(),t.seekTo(e)}),(t?Promise.resolve():o.start()).then(function(){var t;null==(t=o.LF)||t.beat(),o.yF.setCurrentTime(e).then(function(t){var i;o.sF.isDisposed||(o.xF===a?(o.nF.debug("Successfully seeked to ".concat(t)),null==(i=(0,f.getSourceStore)(o.sF))||i.dispatch((0,U.periodSwitchFinished)(l)),o.sF.store.dispatch((0,d.updateSeekingProcess)({targetTime:-1,issuer:"",isInitial:!1,seekableRange:{start:-1,end:-1}}))):function(e){var t=e.getState();if(!t)return!1;var i=(0,h.getPlayerState)(t).seekingProcess.issuer;return i!==s.STARTUP_ISSUER_NAME&&""!==i}(o.sF.store)&&o.sF.logger.debug("Seek to ".concat(e," has finished but a newer operation has been started")))}).catch(function(e){o.nF.debug("Failed to set currentTime on seek",e)})})):(o.nF.debug("Aborting seek as MediaPlayerController has been terminated!"),Promise.resolve())})}},e.prototype.cG=function(e){var t=this;void 0===this.EF.getCurrentPlayingPeriodId()&&(this.nF.debug("current period is undefined, using seek target period "+e),this.EF.setCurrentPlayingPeriodId(e),this.resetTransmuxer(),this.getAllSegmentControllers().forEach(function(e){e.switchPeriod(t.EF.getCurrentPlayingPeriodId()),_.MimeTypeHelper.isAV(e.getMimeType())&&t.rF.storeDrmInitDataFromManifest(e.getCurrentAdaptationSet())}),this.EF.setCurrentLoadingPeriodId(this.EF.getCurrentPlayingPeriodId()))},e.prototype.dG=function(){var e=this;return this.sF.logger.debug("Clearing buffer on seek"),this.HF=!1,this.getAllSegmentControllers().forEach(function(e){return e.cancelLoading()}),this.yF.clearBuffers().catch(function(){e.nF.debug("Failed to clear buffers on seek, carrying on regardless")})},e.prototype.getAllSegmentControllers=function(){return Object.values(this.zF||{})},e.prototype.getAudioSegmentController=function(){return this.getAllSegmentControllers().find(function(e){return _.MimeTypeHelper.isAudio(e.getMimeType())})},e.prototype.fG=function(e,t){var i,n;if(!(e.isInit||!e.success&&this.DF.seekingOrTimeshifting)){var o=_.MimeTypeHelper.getMediaType(t.getMimeType()),a=this.getBufferLevel(t.getMimeType(),this.rF.getCurrentTime(),l.BufferType.ForwardDuration),s=this.pF.getForwardTargetLevel(o);null==(n=null==(i=this.sF.serviceManager)?void 0:i.get(r.ServiceName.AdaptationService))||n.addSample(t.getMimeType(),{bufferTargetLevel:s,bufferLevel:a,segmentDuration:e.duration,segmentDownloadDuration:e.downloadTime,downloadCancelled:!e.success})}},e.prototype.signalEndOfStream=function(e){void 0===e&&(e=!0),this.isVod()&&(this.HF||(this.HF=!0,this.yF.setEndOfStream(!0),e&&this.stop()),this.yF.isStarted()&&this.yF.stop())},e.prototype.start=function(){var e=this;return this.hasStarted()?Promise.resolve():this.wG().then(function(){var t;e.yF.hasStreamEnded()&&(e.seek((0,m.getStartTimeOffset)(e.jG().getState())),e.getAllSegmentControllers().forEach(function(e){return e.resetTransmuxer()})),e.yF.isStarted()||e.yF.restart(),e.getAllSegmentControllers().filter(function(e){return _.MimeTypeHelper.isAV(e.getMimeType())}).forEach(function(t){return e.rF.storeDrmInitDataFromManifest(t.getCurrentAdaptationSet())}),e.nF.debug("Starting main timer"),e.HF=!1,null==(t=e.LF)||t.start(),e.nG(),e.qF.on(a.PlayerEvent.SegmentRequestFinished,e.eG)})},e.prototype.maybeTransitionToPausedState=function(e){(0,S.isSwitchingBufferBlocks)(this.jG())?this.sF.logger.debug("Ignoring transition to Paused because buffer block switch is ongoing"):this.DF.transitionToPausedState(!0,e,!0)},e.prototype.hG=function(e){var t=this;return Promise.all(e.map(function(e){return t.yF.clearCacheForMimeType(e),t.yF.clearBuffer(e)})).then(function(){})},e.prototype.sH=function(e,t){var i=this,n=e.getSourceBufferTypes().find(_.MimeTypeHelper.isAudio);return this.yF.clearCacheForMimeType(n),this.yF.removeBufferRange(n,t+this.oF.AUDIO_TRACK_SWITCH_BUFFER_GRACE_PERIOD).catch(function(){return i.nF.debug("Failed to trim forward buffer after audio track switch")})},e.prototype.tH=function(e,t){var i=this;return this.yF.setEndOfStream(!1).then(function(){var n=i.oF.DISABLE_AUDIO_BUFFER_CLEARING_ON_TRACK_SWITCH?i.sH(e,t):i.hG(e.getSourceBufferTypes());return e.getCurrentPeriodId()!==i.EF.getCurrentPlayingPeriodId()?i.CH(e):e.getCurrentPeriodId()!==i.EF.getCurrentLoadingPeriodId()&&i.EF.setCurrentLoadingPeriodId(e.getCurrentPeriodId()),e.setAdaptionLogicStartupPhase(),e.seekTo(t),i.start().catch(function(){return i.nF.debug("Failed to restart stopped MPC after audio track switch")}),n.then(function(){i.oF.DISABLE_AUDIO_BUFFER_CLEARING_ON_TRACK_SWITCH||i.rF.setCurrentTime(t).catch(function(e){return i.nF.debug("Failed to set currentTime on audio track switch",e)})}).catch(function(e){return i.nF.debug("Failed to attempt to restore playback after audio track switch",e)})})},e.prototype.setAudio=function(e){var t,i=this,n=this.getAvailableAudio(this.EF.getCurrentPlayingPeriodId()),r=n.find(function(t){return t.id===e});if(!this.vF||!r)return Promise.reject(null);var o=null==(t=this.getAudio())?void 0:t.id,a=n.find(function(e){return e.id===o});if(!a||o===e)return Promise.reject(o);var s=Object.keys(this.zF),l=s.find(_.MimeTypeHelper.isAudio)||s.find(_.MimeTypeHelper.isVideo),c=this.CF.getAdaptationSet(a.adaptationSetId),u=this.CF.getAdaptationSet(r.adaptationSetId);return c&&u&&l?(this.GF=!0,this.uH(u,r.id).then(function(){var e,t=null!=(e=i.CF.getAdaptationSet(r.adaptationSetId))?e:u;return i.wH(c,t,l).then(function(e){return i.xH(c,t,r,e)}).then(function(e){return i.vH(e)}).then(function(e){return i.AH(e,r)})}).finally(function(){return i.GF=!1})):Promise.reject("Did not find matching adaptation set")},e.prototype.uH=function(e,t){return _.MimeTypeHelper.isAudio(e._mimeType)&&q(this.AF)?this.AF.updateAdaptationSet(t):Promise.resolve()},e.prototype.vH=function(e){return Object.keys(e).some(_.MimeTypeHelper.isAudio)&&q(this.AF)&&this.getAllSegmentControllers().forEach(function(e){return e.updateMpd()}),Promise.resolve(e)},e.prototype.wH=function(e,t,i){var n,r=this,o=W(t,e),a=_.MimeTypeHelper.isVideo(t._mimeType)||_.MimeTypeHelper.isVideo(e._mimeType),s=!(0,H.hasContentProtection)(e.ContentProtection,t.ContentProtection);return!a&&(o||s)?(this.yF.updateRequiredMediaType(t._mimeType,i),this.zH(i,t).then(function(){var e=Object.keys(r.zF).find(_.MimeTypeHelper.isVideo);return s&&e?r.hG([e]).then(function(){var t,i=r.zF[e],n=r.EF.getCurrentPlayingPeriodId();i.getCurrentPeriodId()!==n&&r.zF[e].switchPeriod(n),r.zF[e].seekTo(r.rF.getCurrentTime()),null==(t=r.NF)||t.updateSegmentControllers(r.zF)}):Promise.resolve()}).then(function(){return r.yF.changeBufferType(t._mimeType,r.wF[t._mimeType],s)})):Promise.resolve(((n={})[t._mimeType]="",n))},e.prototype.xH=function(e,t,i,n){var r=this;return _.MimeTypeHelper.isVideo(t._mimeType)||_.MimeTypeHelper.isVideo(e._mimeType)?this.hG([e._mimeType,t._mimeType]).then(function(){var n=_.MimeTypeHelper.isVideo(t._mimeType);return r.IF.setShouldExpectSeparateAvSegments(!n),n?(r.yH(e),Promise.resolve()):(r.EG(t),r.BH(i,e._mimeType))}).then(function(){return n}):Promise.resolve(n)},e.prototype.yH=function(e){var t;if(e){var i=e._mimeType,n=this.zF[i];n.cancelLoading(),n.dispose(),delete this.zF[i],delete this.wF[i],null==(t=this.NF)||t.updateSegmentControllers(this.zF),this.jG().dispatch((0,L.removeActiveTrackAction)(e._internalId)),this.sF.segmentInfoService&&this.sF.segmentInfoService.setSegmentControllers(Object.values(this.zF))}},e.prototype.zH=function(e,t){var i=this,n=this.zF[e];return this.yH(n.getCurrentAdaptationSet()),this.hG([e]).then(function(){return i.rG(t),t._mimeType})},e.prototype.AH=function(e,t){var i=this;return Promise.all(Object.keys(e).map(function(e){return i.BH(t,e)})).then(function(){})},e.prototype.BH=function(e,t){if(this.JF&&this.JF.enableForcedSubtitle(e.lang),this.zF[t].setCurrentLangObj(e),this.zF[t].cancelLoading(),this.hasStarted()||this.HF){var i=this.getBufferRelevantTime();return this.tH(this.zF[t],i)}return Promise.resolve()},e.prototype.getAudio=function(){if(this.vF){var e=void 0,t=Object.keys(this.zF).find(function(e){return _.MimeTypeHelper.isAudio(e)});if(t&&(e=this.zF[t].getCurrentLangObj()),!e){var i=Object.keys(this.zF).find(function(e){return _.MimeTypeHelper.isVideo(e)});if(i&&this.zF[i].getSourceBufferTypes()){var n=this.zF[i];if(n.getSourceBufferTypes().some(function(e){return _.MimeTypeHelper.isAudio(e)})){var r=n.getCurrentAdaptationSet()._internalId;e=this.getAvailableAudio(this.EF.getCurrentPlayingPeriodId()).find(function(e){return e.adaptationSetId===r})||n.getCurrentLangObj()}}}return e||null}return null},e.prototype.CH=function(e){if(this.kG(e))this.switchLoadingPeriodForAllMedia(this.EF.getCurrentPlayingPeriodId());else{if(this.nF.debug("audio needs to load previous period(s) and catch up to the overall loading period"),e.isTransmuxerRequired()){var t=w.ModuleManager.get(A.ModuleName.ContainerTS);e.setTransmuxer(new t.WebWorkerTransmuxer(this.sF,this.zG()))}this.FF=!0,this.XG(this.EF.getCurrentPlayingPeriodId())}},e.prototype.getPlaybackRepresentation=function(e){for(var t in this.zF)if(this.zF[t]&&t.includes(e))return this.sF.serviceManager.get(r.ServiceName.TimedMetadataService).getPlaybackRepresentation(t)},e.prototype.getTimeShift=function(){return this.getTimeShiftHandler().getTimeShift()},e.prototype.getTimeShiftLiveEdge=function(){return this.CF.isLive()?this.getTimeShiftHandler().getTimeShiftLiveEdge():0},e.prototype.getPlaybackTimeForTimeShiftOffset=function(e){return this.getTimeShiftHandler().calculatePlaybackTimeForTimeShiftOffset(e)},e.prototype.getTimeShiftHandler=function(){return this.NF||(this.NF=new z.TimeShiftHandler(this.sF,this,this.yF,this.zF)),this.NF},e.prototype.timeShift=function(e,t,i){return void 0===i&&(i=!1),this.getTimeShiftHandler().timeShift(e,t,i)},e.prototype.getAvailableAudio=function(e){return this.CF.getAvailableAudio(e)},e.prototype.hasStreamEnded=function(){return!!this.yF&&this.yF.hasStreamEnded()},e.prototype.getCurrentTime=function(){return this.rF.getCurrentTime()},e.prototype.getSeekableRange=function(){if(this.CF.isLive()){if(this.DF.seekingOrTimeshifting&&this.OF)return this.OF;var e=this.getTimeShiftLiveEdge(),t=e+this.getMaxTimeShift();return this.OF={start:t,end:e}}var i=this.getAllSegmentControllers().find(function(e){return _.MimeTypeHelper.isAV(e.getMimeType())});return i?i.getMPDHandler().getSeekableRange():{start:-1,end:-1}},e.prototype.getAvailableSegments=function(){var e=this,t={};return Object.keys(this.zF).forEach(function(i){t[i]=e.zF[i].getSegmentInfos()}),t},e.prototype.isInitialized=function(){return this.vF},e.prototype.hasStarted=function(){var e,t;return null!=(t=null==(e=this.LF)?void 0:e.started)&&t},e}()},84696:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveMediaTypes=function(e){return(0,r.getCodecsFromAdaptationSet)(e).split(",").map(function(e){return(0,n.getMediaTypeFromCodec)(e)})};var n=i(34047),r=i(13422)},52570:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MseModuleDefinition=void 0;var n=i(68925),r=i(86897),o=i(62756),a=i(34795),s=i(47151),l=i(67580),c=i(13422),u=i(79505),d=i(94358),h=i(99257),p=i(71809),f=i(88618),m=i(48514),g=i(14443),v=i(25248),y=i(63066),b=i(54015),S=i(97587),_=i(36193),E=i(44115),T=i(88935),w=i(72498),A=i(39523),P=i(99529),I=i(64922),C={removeStreamTimeRange:A.removeStreamTimeRange,removeLoadedRange:n.removeLoadedRange,addLoadedRange:n.addLoadedRange,resetLoadedRanges:n.resetLoadedRanges,resetStreamTimeline:A.resetStreamTimeline,removeActiveTrackAction:_.removeActiveTrackAction,setRepresentationIdAction:_.setRepresentationIdAction,setMediaTypeAction:_.setMediaTypeAction},M={getPlayingPeriodId:T.getPlayingPeriodId,getContainerFormat:E.getContainerFormat,getLoadedRangesForMimeType:r.getLoadedRangesForMimeType,getSegmentInfos:w.getSegmentInfos},R={containerFormat:a.ContainerFormat,streamTimeRangeType:P.StreamTimeRangeType};t.MseModuleDefinition={name:o.ModuleName.EngineBitmovin,module:{MediaPlayer:d.MediaPlayer,SegmentController:g.SegmentController,technologyChecker:new I.TechnologyChecker,Stream:S.Stream,FetchController:f.FetchController,SegmentInfoService:v.SegmentInfoService,SegmentPrefetchingService:b.SegmentPrefetchingService,SegmentCacheService:m.SegmentCacheService,AdRestorationOptimizationService:h.AdRestorationOptimizationService,ManifestCachingService:l.ManifestCachingService,SegmentListMPDHandler:y.SegmentListMPDHandler,actions:C,selectors:M,mseModuleTypes:R,AdaptationSetId:s.AdaptationSetId,RepresentationId:u.RepresentationId,getTrackIdentifier:P.getTrackIdentifier,getCodecsFromAdaptationSet:c.getCodecsFromAdaptationSet,getMimeTypeForAdaptationSet:c.getMimeTypeForAdaptationSet,collectInitialAdSegmentInfos:p.collectInitialAdSegmentInfos}},t.default=t.MseModuleDefinition},58784:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PeriodSwitchTracker=void 0;var n=i(80813),r=i(3714),o=i(93204),a=i(89927),s=i(42208),l=i(88935);t.PeriodSwitchTracker=function(){function e(e){var t=this;this.z2=function(e,i){var n=t.getCurrentPlayingPeriodId(),o=e.switchingToPeriodId;n!==o&&(t.i1.debug("Starting switch from Period ".concat(n," to Period ").concat(o)),t.h1.eventHandler.dispatchEvent(r.PlayerEvent.PeriodSwitch,{sourcePeriod:{periodId:n},targetPeriod:{periodId:o}}))},this.A2=function(e,i){var n=i.switchingToPeriodId,o=t.getCurrentPlayingPeriodId();if(n!==o){t.setCurrentPlayingPeriodId(n);var a=t.getCurrentPlayingPeriod();a&&a.AdaptationSet.forEach(function(e){return t.h1.renderer.storeDrmInitDataFromManifest(e)}),t.i1.debug("Successfully switched from Period ".concat(o," to Period ").concat(n)),t.h1.eventHandler.dispatchEvent(r.PlayerEvent.PeriodSwitched,{sourcePeriod:{periodId:o},targetPeriod:{periodId:n}})}},this.h1=e,this.i1=e.logger,this.x2()}return e.prototype.w2=function(){return this.h1.serviceManager.get(n.ServiceName.ManifestService,this.h1.sourceContext.sourceIdentifier)},e.prototype.getCurrentPlayingPeriod=function(){return this.w2().findPeriod(this.getCurrentPlayingPeriodId())},e.prototype.x2=function(){var e=this.B2();!this.v2&&e&&(this.v2=(0,o.subscribe)(e)(l.getPlayingTracksState,this.z2,l.isSwitchingPeriods)),!this.u2&&e&&(this.u2=(0,o.subscribe)(e)(l.getPlayingTracksState,this.A2,l.wasSwitchingToPeriodIdReset))},e.prototype.y2=function(){this.u2&&(this.u2(),this.u2=void 0),this.v2&&(this.v2(),this.v2=void 0)},e.prototype.B2=function(){return this.h1.serviceManager.get(n.ServiceName.SourceStoreService,this.h1.sourceContext.sourceIdentifier)},e.prototype.getCurrentLoadingPeriodId=function(){return this.j1},e.prototype.setCurrentLoadingPeriodId=function(e){this.j1=e},e.prototype.getCurrentPlayingPeriodId=function(){return(0,l.getPlayingPeriodId)(this.B2().getState())},e.prototype.setCurrentPlayingPeriodId=function(e){this.B2().dispatch((0,s.setPlayingPeriodId)(e))},e.prototype.resetPeriodIds=function(){this.setCurrentPlayingPeriodId(void 0),this.setCurrentLoadingPeriodId(void 0)},e.prototype.shouldHandleDroppedOutPeriod=function(){return null!=this.getCurrentPlayingPeriodId()||null!=this.j1}
14,e.prototype.C2=function(e){return!this.w2().getAllPeriods().map(function(e){return e._id}).includes(e)},e.prototype.isLoadingPeriodDroppedOut=function(){return this.C2(this.j1)},e.prototype.isLoadingLastPeriod=function(){return this.w2().isLastPeriod(this.j1)},e.prototype.setInitialPeriod=function(){var e=this.w2().isLive()?this.D2():this.E2();this.j1=e,this.setCurrentPlayingPeriodId(this.j1),this.i1.debug("setting initial period to ".concat(this.j1))},e.prototype.D2=function(){var e=(0,a.toSeconds)(Date.now())-this.w2().getDesiredDistanceToLiveEdge();return this.w2().getPeriodIdForTime(e)},e.prototype.E2=function(){var e=this.h1.serviceManager.get(n.ServiceName.StartOffsetService).getStartOffset(this.h1.sourceContext.source);return this.w2().getPeriodIdForTime(e)},e.prototype.dispose=function(){this.y2()},e}()},11536:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerConfigEnhancer=void 0;var n=i(21281),r=i(70850),o=i(50962);t.PlayerConfigEnhancer=function(){function e(e){this.F2={},r.Util.deepCopy(this.F2,e.config),this.G2={},r.Util.deepCopy(this.G2,e.settings)}return e.prototype.adjustToCurrentSource=function(e,t){var i,r,a,s,l=e.config;if(l.adaptation&&(l.adaptation.logic=null==(i=this.F2.adaptation)?void 0:i.logic),e.settings.CHUNKED_CMAF_STREAMING=this.G2.CHUNKED_CMAF_STREAMING,t.isDashManifest()&&t.isLive()&&(0,o.isLowLatencyConfigured)(e)){e.logger.debug("Detected DASH Live stream and LL config, enabling 'low-latency-v1' adaptation logic and CHUNKED_CMAF_STREAMING tweak"),l.adaptation=null!=(r=l.adaptation)?r:{},l.adaptation.logic=null!=(a=l.adaptation.logic)?a:n.AdaptationLogicType.LOW_LATENCY;var c=e.internalPlayer.getConfig().tweaks||{};e.settings.CHUNKED_CMAF_STREAMING=null==(s=c.CHUNKED_CMAF_STREAMING)||s}},e}()},3095:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createSegmentParser=function(e,t){if(t===o.ContainerFormat.MP4&&n.ModuleManager.has(r.ModuleName.ContainerMP4)){var i=n.ModuleManager.get(r.ModuleName.ContainerMP4);return new i.MP4Parser(e,new i.MP4EncryptionParser(e))}if(t===o.ContainerFormat.WEBM&&n.ModuleManager.has(r.ModuleName.ContainerWebM))return new(n.ModuleManager.get(r.ModuleName.ContainerWebM)).WebMParser};var n=i(88052),r=i(62756),o=i(34795)},47531:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTimeService=void 0;var n=i(80813),r=i(74853),o=i(99529);function a(e){return[o.StreamTimeRangeType.Loading,o.StreamTimeRangeType.Failed].includes(e.type)}t.StreamTimeService=function(){function e(e,t){this.serviceManager=e,this.sourceIdentifier=t}return Object.defineProperty(e.prototype,"WH",{get:function(){return this.serviceManager.get(n.ServiceName.SourceStoreService,this.sourceIdentifier).getState()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"XH",{get:function(){var e;return null==(e=this.WH)?void 0:e.streamTimeline},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"YH",{get:function(){var e;return null==(e=this.WH)?void 0:e.buffer.bufferStateMap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ZH",{get:function(){return this.serviceManager.get(n.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),e.prototype.getTimeForNextSegment=function(e){var t,i,n,o,s=(0,r.findFromEnd)(this.XH[e]||[],a),l=null==(t=this.YH)?void 0:t[e],c=[s,(null==(i=null==l?void 0:l.loadedRanges)?void 0:i[l.loadedRanges.length-1])||(null==(n=null==l?void 0:l.rendererRanges)?void 0:n[l.rendererRanges.length-1])].filter(function(e){return e}).map(function(e){return e.end}),u=Math.max.apply(Math,c);return isFinite(u)?u:null!=(o=this.ZH)&&o.seekingOrTimeshifting?this.ZH.targetPlaybackTime:0},e.prototype.dispose=function(){},e}()},64922:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TechnologyChecker=void 0;var n=i(88052),r=i(62756);t.TechnologyChecker=function(){function e(){}return e.prototype.getSupportedTechnologies=function(){return n.ModuleManager.has(r.ModuleName.RendererMse)?n.ModuleManager.get(r.ModuleName.RendererMse).technologyChecker.getSupportedTechnologies():[]},e}()}
14,52602:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimeShiftHandler=void 0;var n=i(80813),r=i(3714),o=i(87827),a=i(15971),s=i(79721),l=i(89927),c=i(23068),u=i(70850),d=i(88052),h=i(62756),p=i(42208),f=i(39523),m=i(99529),g=i(68981),v=i(50962),y=i(60729);t.TimeShiftHandler=function(){function e(e,t,i,r){var o=this;this.S2=!1,this.f2=function(){o.g2(!0)},this.h2=function(e){var t=o.H2.renderer.getCurrentTime(!0),i=t-e;i=u.Util.roundValue(i,1),o.e2(i,t)},this.H2=e,this.I2=t,this.J2=i,this.K2=Object.keys(r).map(function(e){return r[e]}),this.L2=e.serviceManager.get(n.ServiceName.ManifestService,e.sourceContext.sourceIdentifier),this.M2=e.logger,this.P2=0,this.T2=e.sourceContext.sourceIdentifier,this.i2()}return e.prototype.U2=function(){var e=(0,v.isLowLatencyConfigured)(this.H2),t=(0,y.isPlayingLowLatencyHls)(this.H2);return e||t},e.prototype.V2=function(){var e;if(this.Q2&&!this.Q2.isOngoing){var t=(0,l.toSeconds)(Date.now()-this.Q2.timestamp);e=this.Q2.liveEdge+t}else e=this.W2();return isFinite(e)||(e=(0,l.toSeconds)(Date.now()-this.L2.getAvailabilityStartTime())),e},e.prototype.W2=function(){var e=this.Y2();if(!this.U2())return e;var t=this.K2.reduce(function(e,t){return Math.min(e,t.getMPDHandler().getSegmentDuration())},1/0),i=this.X2();return i-e<t?i:e},e.prototype.X2=function(){var e=this.H2.serviceManager.maybeCall(n.ServiceName.SynchronizedTimeService,function(e){return e.getTimeDifference()},0,this.H2.sourceContext.sourceIdentifier);return(0,l.toSeconds)(Date.now()+e)},e.prototype.Y2=function(){return this.K2.map(function(e){return e.getLiveEdgeTime()}).reduce(function(e,t){return t<e&&t>=0?t:e},1/0)},e.prototype.updateSegmentControllers=function(e){this.K2=Object.values(e)},e.prototype.getMaxTimeShift=function(){return this.L2.getManifest()?Math.min(this.L2.getTimeShiftBufferDepthSeconds()+this.L2.getDesiredDistanceToLiveEdge(),0):0},e.prototype.getTimeShiftLiveEdge=function(){return this.V2()-this.L2.getDesiredDistanceToLiveEdge()},e.prototype.getTimeShift=function(){var e=this.Z2();if(this.R2&&Math.abs((0,l.toSeconds)(Date.now()-this.R2.completionDate)-(this.I2.getCurrentTime()-this.R2.reachedTime))<this.H2.settings.ACCEPTABLE_TIMESHIFT_INACCURACY)return this.R2.offset;var t=this.getMaxTimeShift();return e<t&&(e=t),e>0&&(e=0),e},e.prototype.Z2=function(e){return void 0===e&&(e=!1),!this.Q2||this.Q2.isOngoing?0:(e?this.I2.getBufferRelevantTime():this.I2.getCurrentTime())-this.getTimeShiftLiveEdge()},e.prototype.a2=function(){return this.V2()-this.I2.getBufferRelevantTime()},e.prototype.timeShift=function(e,t,i){var n,r=this;void 0===i&&(i=!1);var o=!!this.Q2;o||this.d2(),e=Math.max(this.getMaxTimeShift(),e);var l=this.I2.getCurrentTime(),u=this.calculatePlaybackTimeForTimeShiftOffset(e),d=null!=(n=this.L2.getPeriodIdForTime(u))?n:s.DEFAULT_PERIOD_ID;this.P2++;var h=this.P2,f=i||this.J2.shouldBuffersBeClearedOnTimeshift(u);return this.M2.debug("Performing timeShift to offset ".concat(e,", time: ").concat(l," -> ").concat(u,", period: ").concat(d)),this.J2.setTimeshiftCancelState(!1),(0,c.isDefined)(d)&&this.I2.updatePeriodForTimeshift(d,!o,f),f&&this.K2.forEach(function(e){return e.seekTo(u)}),o&&this.b2(u),this.g2(!0),this.J2.setCurrentTime(u,!0,i).then(function(i){var n;r.g2(!1),r.R2={offset:e,completionDate:Date.now(),reachedTime:i},r.P2===h&&t?(r.M2.debug("Successfully timeShifted to ".concat(i,", hit target time with a diff of ").concat(i-u)),null==(n=(0,a.getSourceStore)(r.H2))||n.dispatch((0,p.periodSwitchFinished)(d)),t()):t&&r.H2.logger.debug("Timeshift to ".concat(e," has finished but a newer operation has been started"))}).catch(function(e){r.M2.debug("Failed to set currentTime on timeShift",e)}).finally(function(){return r.J2.setTimeshiftCancelState(!1)})},e.prototype.b2=function(e){var t;if(this.L2.isHlsManifest()){var i=this.H2.serviceManager.get(n.ServiceName.SourceStoreService,this.T2);(function(e,t){var i,n,r=null!=(n=null==(i=null==e?void 0:e.timestampRolloverPositions)?void 0:i.next)?n:-1;return -1!==r&&(t>=r||t<=e.timestampRolloverPositions.previous)})(null==(t=d.ModuleManager.get(h.ModuleName.HLS))?void 0:t.selectors.getHlsState(null==i?void 0:i.getState()),e)&&(this.H2.logger.debug("Resetting transmuxer because target is beyond a timestamp rollover"),this.I2.resetTransmuxer())}},e.prototype.cancel=function(){this.H2.logger.debug("Cancelling ongoing time shift operation..."),this.J2.setTimeshiftCancelState(!0)},e.prototype.calculatePlaybackTimeForTimeShiftOffset=function(e){var t=this.L2.getDesiredDistanceToLiveEdge(),i=this.V2(),n=i+(e-t);return n=Math.max(n,0),this.L2.hasMultiplePeriods()?(0,g.adjustTargetTimeToPeriodStart)(n,this.H2.settings.END_OF_BUFFER_TOLERANCE,this.L2,this.H2.logger):0===e&&this.U2()?Math.min(i,n+this.H2.settings.LOW_LATENCY_SEEK_AHEAD):n},e.prototype.onManifestUpdate=function(){this.d2(),this.L2.isLive()&&
vendor: 11,441 bytes, line 14
14(this.Z2(!0)<this.getMaxTimeShift()-this.getMinSegmentDuration()?this.H2.settings.DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED?this.S2||(this.H2.eventHandler.dispatchEvent(r.PlayerEvent.DVRWindowExceeded),this.S2=!0):this.H2.eventHandler.dispatchEvent(r.PlayerEvent.DVRWindowExceeded):this.S2=!1,this.c2())},e.prototype.c2=function(){var e=this;this.H2.serviceManager.maybeCall(n.ServiceName.SourceStoreService,function(t){var i,n=e.L2.getTimeShiftBufferDepthSeconds(),r=e.V2()+n,o=null==(i=t.getState())?void 0:i.streamTimeline;void 0!==o&&Object.keys(o).forEach(function(e){t.dispatch((0,f.removeStreamTimeRange)(e,{start:0,end:r},m.StreamTimeRangeType.Failed))})})},e.prototype.isTimeInBufferedRange=function(e){return this.J2.isInBufferedRange(e)},e.prototype.getMinSegmentDuration=function(){return this.K2.reduce(function(e,t){return Math.min(e,t.getMPDHandler().getSegmentDuration())},1/0)},e.prototype.d2=function(){var e=this.L2.isLive(),t=e?this.a2():1/0,i=e?Math.abs(this.L2.getTimeShiftBufferDepthSeconds()):this.L2.getDuration();this.H2.bufferSettings.setTargetBufferLevelConstraints({minimumBufferLength:this.getMinSegmentDuration(),currentDistanceToLiveEdge:t,streamDuration:i})},e.prototype.e2=function(e,t){this.R2={completionDate:Date.now(),reachedTime:t,offset:e},this.g2(!1)},e.prototype.g2=function(e){this.Q2&&(e||!this.Q2.isOngoing)||(this.Q2={timestamp:Date.now(),liveEdge:this.V2(),isOngoing:e})},e.prototype.i2=function(){var e=this;this.N2=(0,o.subscribeToSeek)(this.H2.store,this.f2),this.O2=(0,o.subscribeToSeeked)(this.H2.store,function(t,i){return e.h2(i.seekingProcess.seekableRange.end)})},e.prototype.j2=function(){var e,t;null==(e=this.N2)||e.call(this),null==(t=this.O2)||t.call(this)},e.prototype.dispose=function(){this.j2(),this.J2.setTimeshiftCancelState(!0)},e}()},90685:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferBlock=t.EncryptionState=void 0,t.isPrecedingSegment=s;var n,r=i(85434),o=i(48954);function a(e,t,i){e.hasOwnProperty(t)&&i(e[t])}function s(e,t,i){var n=e.isInit(),r=e.getMimeType()!==t;return!n&&!r&&e.getPlaybackTime()+e.getDuration()<i}!function(e){e.Encrypted="encrypted",e.Clear="clear"}(n||(t.EncryptionState=n={})),t.BufferBlock=function(){function e(e){this.wcb={},this.xcb={},this.id=e,this.ucb=[],this.vcb=new Map}return e.prototype.addSegment=function(e){var t=e.getMimeType();e.isInit()&&this.Dcb(t),this.ycb(e),this.zcb(e);var i=e.isInit()?0:e.getDuration();this.ucb.push({segment:e}),e.isInit()||(this.setMaxSegmentDuration(t,Math.max(i,this.getMaxSegmentDuration(t))),this.Ccb(e,t)),e.setBufferBlockId(this.id),this.Bcb(e)},e.prototype.ycb=function(e){var t=e.getSegmentInfo(),i=t.discontinuitySequenceNumber,n=t.mimeType;n&&(this.wcb[n]||(this.wcb[n]=[]),null==i||this.wcb[n].includes(i)||this.wcb[n].push(i))},e.prototype.zcb=function(e){var t=e.getSegmentInfo(),i=t.periodId,n=t.mimeType;n&&(this.xcb[n]||(this.xcb[n]=[]),null==i||this.xcb[n].includes(i)||this.xcb[n].push(i))},e.prototype.setSegregationCriteria=function(e,t){this.vcb.has(t)||this.Acb(t),this.Ecb(t).segregationCriteria=e},e.prototype.Acb=function(e){var t={};return this.vcb.set(e,t),t},e.prototype.updateMediaTypeForMimeType=function(e){var t=this.Ecb(e.mimeType)||this.Acb(e.mimeType);t.mediaType?(a(e,"codec",function(e){t.mediaType.codec=e}),a(e,"timescale",function(e){t.mediaType.timescale=e})):t.mediaType=e},e.prototype.getSegregationCriteria=function(e){var t;return null==(t=this.Ecb(e))?void 0:t.segregationCriteria},e.prototype.Bcb=function(e){var t,i,n=e.getMimeType(),r=this.getMediaType(n);r?(null!=(t=r.codec)||(r.codec=e.getCodec()),null!=(i=r.timescale)||(r.timescale=e.getTimescale())):(this.vcb.has(n)||this.vcb.set(n,{}),this.Ecb(n).mediaType={mimeType:n,codec:e.getCodec(),timescale:e.getTimescale()})},e.prototype.getMediaType=function(e){var t,i;return null!=(i=null==(t=this.Ecb(e))?void 0:t.mediaType)?i:null},e.prototype.addMediaType=function(e){r.MimeTypeHelper.isAV(e.mimeType)&&!this.getMediaType(e.mimeType)&&(this.vcb.has(e.mimeType)||this.Acb(e.mimeType),this.Ecb(e.mimeType).mediaType=e)},e.prototype.removeMediaType=function(e){this.vcb.delete(e)},e.prototype.hasMediaType=function(e){var t,i;return null!=(i=null==(t=this.vcb)?void 0:t.has(e))&&i},e.prototype.getMediaTypes=function(){return(0,o.getValues)(this.vcb).map(function(e){return e.mediaType})},e.prototype.getMediaTypesWithoutSubs=function(){return this.getMediaTypes().filter(function(e){return r.MimeTypeHelper.isAV(e.mimeType)})},e.prototype.removeSegment=function(e){var t=this.ucb.findIndex(function(t){return t.segment===e});t>-1&&this.ucb.splice(t,1)},e.prototype.clearSegments=function(e){this.ucb=this.ucb.filter(function(t){return t.segment.getMimeType()!==e});var t=this.Ecb(e);t&&(t.playbackTimeRange=void 0),this.wcb[e]=[],this.xcb[e]=[]},e.prototype.getPrecedingSegments=function(e,t){var i=[];return this.ucb.forEach(function(n){s(n.segment,e,t)&&i.push(n.segment)}),i},e.prototype.Ccb=function(e,t){var i=this.getPlaybackTimeRange(t),n=e.getPlaybackTime(),r=n+e.getDuration();i?(n<i.start&&(i.start=n),r>i.end&&(i.end=r)):this.Ecb(t).playbackTimeRange={start:n,end:r}},e.prototype.getPlaybackTimeRange=function(e){var t,i;return null!=(i=null==(t=this.Ecb(e))?void 0:t.playbackTimeRange)?i:null},e.prototype.getId=function(){return this.id},e.prototype.getAllKnownPeriodIds=function(){var e;return(e=[]).concat.apply(e,Object.values(this.xcb))},e.prototype.getMinCommonStartTime=function(){return(0,o.getValues)(this.vcb).filter(function(e){return e.playbackTimeRange}).map(function(e){return e.playbackTimeRange}).reduce(function(e,t){return Math.max(t.start,e)},-1/0)},e.prototype.getCommonPlaybackTimeRanges=function(){return(0,o.getValues)(this.vcb).filter(function(e){return e.playbackTimeRange}).map(function(e){return e.playbackTimeRange}).reduce(function(e,t){return{start:Math.max(t.start,e.start),end:Math.min(t.end,e.end)}},{start:-1/0,end:1/0})},e.prototype.setMaxSegmentDuration=function(e,t){this.vcb.has(e)||this.Acb(e),this.Ecb(e).maxSegmentDuration=t},e.prototype.getMaxSegmentDuration=function(e){var t;return(null==(t=this.Ecb(e))?void 0:t.maxSegmentDuration)||0},e.prototype.hasMaxSegmentDuration=function(e){var t;return(null==(t=this.Ecb(e))?void 0:t.maxSegmentDuration)!=null},e.prototype.hasMaxSegmentDurations=function(){return!!(0,o.getValues)(this.vcb).map(function(e){return e.maxSegmentDuration}).find(function(e){return e>=0})},e.prototype.getMinMaxSegmentDuration=function(){var e=Number.MAX_VALUE;return(0,o.getValues)(this.vcb).map(function(e){return e.maxSegmentDuration}).forEach(function(t){return e=t<e?t:e}),e},e.prototype.getAllSegmentsForMimeType=function(e){return this.getAllSegments().filter(function(t){return t.getMimeType()===e})},e.prototype.getAllSegments=function(){return this.ucb.map(function(e){return e.segment})},e.prototype.hasDataSegments=function(e){return this.ucb.some(function(t){return!t.segment.isInit()&&t.segment.getMimeType()===e})},e.prototype.hasSegments=function(){return this.getAllSegments().length>0},e.prototype.hasTrackedDiscontinuity=function(e){var t=this;return Object.keys(this.wcb).some(function(i){return t.wcb[i].includes(e)})},e.prototype.hasTrackedPeriodId=function(e){var t=this;return Object.keys(this.xcb).some(function(i){return t.xcb[i].includes(e)})},e.prototype.getNextSegment=function(){var e=this.ucb.filter(function(e){return!e.pendingRemoval});if(0===e.length)return null;var t=e.find(function(t){return e.filter(function(e){return t.segment.getMimeType()===e.segment.getMimeType()}).some(function(e){return!e.segment.isInit()})});return t?(t.pendingRemoval=!0,t.segment):null},e.prototype.Dcb=function(e){var t=this.getAllSegmentsForMimeType(e);if(t.length>0){var i=t[t.length-1];i.isInit()&&this.removeSegment(i)}},e.prototype.Ecb=function(e){return this.vcb.get(e)},Object.defineProperty(e.prototype,"mediaTypes",{get:function(){var e={};return this.vcb.forEach(function(t,i){e[i]=t.mediaType}),e},enumerable:!1,configurable:!0}),e.prototype.getMinDistanceFromBufferBlock=function(e){var t=this.getCommonPlaybackTimeRanges();return Math.min(Math.min(Math.abs(e.getPlaybackTime()-t.start),Math.abs(e.getPlaybackTime()-t.end)),Math.min(Math.abs(e.getPlaybackEndTime()-t.start),Math.abs(e.getPlaybackEndTime()-t.end)))},e}()},674:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.areBufferBlocksEqual=function(e,t){return!(!e||!t)&&e===t}},35046:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferController=void 0;var r=i(4524),o=i(66790),a=i(40306),s=i(3336),l=i(25926),c=i(4224),u=i(80813),d=i(56481),h=i(3714),p=i(44468),f=i(33468),m=i(91678),g=i(46151),v=i(33436),y=i(87827),b=i(85648),S=i(68925),_=i(86897),E=i(21513),T=i(93204),w=i(79721),A=i(34841),P=i(87244),I=i(85434),C=i(15487),M=i(89927),R=i(23068),k=i(70850),x=i(19274),O=i(88052),D=i(62756),L=i(95880),N=i(62198),U=i(42208),F=i(59604),B=i(13114),V=i(39523),j=i(14808),z=i(99529),H=i(90685),G=i(60632),q=i(94305),W=i(51888),Y=i(39494),K=i(77264);function X(e,t){return{periodId:t,contentInformation:e.getMediaTypes().map(function(t){return{codec:t.codec,mimeType:t.mimeType,isDrmProtected:e.getSegregationCriteria(t.mimeType).encryption===H.EncryptionState.Encrypted}})}}t.BufferController=function(){function e(e,t,i,n){var r=this;this.s2=[],this.M3=!1,this.N3=!0,this.O3=!1,this.P3=!1,this.W3={},this.Y3={},this.b3=!1,this.d3=0,this.i3=function(){r.K3=r.q2.getTotalDuration(),r.K3>(r.p2.getDuration()||0)&&r.l3()},this.l3=function(){r.O3||r.p2.setDuration(r.K3)},this.m3=function(e){r.k2.logger.debug("Renderer setup failed with",e)},this.O4=function(){Date.now()-r.S3>r.R3&&r.D3()&&r.w3();var e=!(0,E.getCapabilities)().isTizen;r.checkIfEndOfBufferReached(r.m2.END_OF_BUFFER_TOLERANCE,e)},this.P4=function(){if(r.r2){var e=r.r2.getBufferBlock(r.I3),t=e?r.r2.getSmallestMaxSegmentDuration(e):r.m2.END_OF_BUFFER_RECOVERY_TOLERANCE;r.checkIfEndOfBufferReached(t,!0)}},this.Q4=function(){r.V4(r.p2.getCurrentTime(!0))},this.R4=function(){r.checkIfEndOfBufferReached(r.m2.END_OF_BUFFER_RECOVERY_TOLERANCE,!0)},this.k2=e,this.l2=e.logger,this.m2=e.settings,this.n2=e.bufferSettings,this.o2=e.eventHandler,this.p2=e.renderer,this.q2=e.serviceManager.get(u.ServiceName.ManifestService,e.sourceContext.sourceIdentifier),this.r2=new Y.SegmentStore(this.k2,this.m2),this.J3=t,this.X3=new q.BufferStallingService(this.B4(),this.l2,this.k2.renderer),this.K3=i,this.I3=Y.INITIAL_BUFFER_BLOCK_ID,this.V3=new Map,this.Q3=!1,this.S3=0,this.R3=(0,M.toMilliSeconds)(this.k2.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL),this.U3=new Map,this.a3=new W.DeferredReject,this.t2=Promise.resolve(null),this.e3=new G.BufferRangesCache(this.k2,this.r2),this.h3(),this.p2.ready().then(function(){r.l3(),r.k3()&&r.q3(n)}).catch(this.m3),this.g3=(0,T.subscribe)(this.k2.store)(function(e){return e&&(0,y.getPlayerState)(e).seekState},function(){r.D3()&&r.w3()},function(e,t){return e===b.SeekState.Seeked&&t!==b.SeekState.Seeked})}return e.prototype.h3=function(){var e=this,t=this.k2.store;void 0!==t&&(this.f3=(0,T.subscribe)(t)(function(e){return e&&(0,y.getIsStopped)((0,y.getPlayerState)(e))},function(){return e.P3=!0},function(e){return!0===e}))}
14,Object.defineProperty(e.prototype,"j3",{get:function(){return this.X3.isRendererStalling()},enumerable:!1,configurable:!0}),e.prototype.k3=function(){var e,t;return!!(null!=(t=(0,B.getDrmState)(null==(e=this.r3())?void 0:e.getState()))&&t.immediateLicenseRequest)},e.prototype.n3=function(e,t){var i=this,n=Promise.resolve();return this.T3=new A.Deferred,this.N3||(n=this.p2.shutdown(!0)),this.W3={},this.T3.resolve(n.then(function(){return i.p2.ready()}).then(function(){i.l3(),i.I4(),e.forEach(function(e){var t=e.mimeType;i.addMimeTypeAndCodec(t,e.codec)||(i.l2.debug("Could not create source buffer for ".concat(t)),i.k2.store.dispatch((0,m.removeMetricsForMimeType)(t))),i.o3(t)}),i.s2=e.filter(function(e){return I.MimeTypeHelper.isAV(e.mimeType)});var n,r=null!=(n=t.getAllKnownPeriodIds()[0])?n:w.DEFAULT_PERIOD_ID;return i.q3(r),Promise.resolve(i.s2.length)})),this.T3.promise.catch(function(e){return i.l2.warn(e)}).then(function(){i.T3=null}),this.T3.promise},e.prototype.o3=function(e){var t=this,i=this.r3();i&&(this.Y3[e]=i.subscribe(function(){return t.x3(e)},(0,_.hasBufferMaxSizeChanged)(e)))},e.prototype.p3=function(e){var t=this.Y3[e];t&&(t(),delete this.Y3[e])},e.prototype.q3=function(e){var t,i=this,r=(0,B.getDrmState)(null==(t=this.r3())?void 0:t.getState());if(void 0!==r&&Object.keys(r).length>0){var a=n(n({},this.k2.sourceContext.source),{drm:r}),s=this.q2.getDRMCapabilitiesForPeriod(e);Object.keys(f.KeySystemMap).some(function(e){return a.drm.hasOwnProperty(e)})&&(this.t2=this.p2.setDrmConfig(r,s),this.t2.catch(function(e){(null==e?void 0:e.message)!==o.DrmSetupError.CANCELLED&&i.l2.debug("Could not initialize renderer with given DRM config: ".concat(null==e?void 0:e.message),e)}))}},e.prototype.r3=function(){var e;return null==(e=this.k2.serviceManager)?void 0:e.get(u.ServiceName.SourceStoreService,this.k2.sourceContext.sourceIdentifier)},e.prototype.s3=function(){var e=this;return this.c3?this.c3.catch(function(){return e.b3=!0,Promise.reject("Failed to clear buffer on timeshift, stopping segment cache processing")}).then(function(){return e.b3?(e.b3=!1,Promise.reject("Timeshift cancelled, stopping segment cache processing")):Promise.resolve()}):Promise.resolve()},e.prototype.addSegment=function(e){var t,i=this;if(!this.r2)return Promise.reject("Skipping segment processing, segment store is already disposed");this.l2.insane("adding segment to cache for period ".concat(e.getPeriodId()," with playback time ").concat(e.getPlaybackTime()," and mime type ").concat(e.getMimeType())),this.r2.addSegment(e);var n=this.F4(),r=this.r2.getBufferBlock(n);if(this.r2.getNextBufferBlock(n)&&this.B3(r)&&(null==(t=this.r3())||t.dispatch((0,S.setLoadingRangeFinished)(!0))),this.H4(),function(e,t){var i=(0,z.getTrackIdentifier)(e.getSegmentInfo()),n=e.getPlaybackTimeRange();
vendor: 11,033 bytes, line 14
14n&&(null==t||t.dispatch((0,V.removeStreamTimeRange)(i,n,z.StreamTimeRangeType.Loading))),null==t||t.dispatch((0,S.addLoadedRange)(i,(0,F.segmentToBufferBlockTimeRange)(e)))}(e,this.r3()),!this.areBufferBlockMediaTypesFinalForPeriod(e.getPeriodId()))return Promise.resolve();var o=Promise.resolve();if(this.E3){var a=this.E3.time,s=this.a4(a);if(!this.r2.canSwitchToBufferBlock(s))return Promise.resolve();o=this.s3().then(function(){return i.b4(a,s)})}else if((0,P.isSwitchingBufferBlocks)(this.r3())||this.isBufferAvailable()||this.T3)this.T3&&(o=this.T3.promise);else{var l=this.r2.getBufferBlockForSegment(e),c=null==l?void 0:l.getMediaTypesWithoutSubs();if(!c||!l)return this.l2.debug("Chosen buffer block for segment unexpectedly had no mediaTypes"),Promise.resolve();o=this.n3(c,l)}return o.then(function(){return i.p2?i.p2.ready():Promise.reject("Stopping queue processing, renderer is not available")}).then(function(){return i.z3()})},e.prototype.t3=function(e,t){var i=this;this.r2&&this.r2.getPrecedingSegments(e,t).forEach(function(e){var t;i.r2.removeSegment(e),null==(t=i.r3())||t.dispatch((0,S.removeLoadedRange)(e.getMimeType(),(0,F.segmentToBufferBlockTimeRange)(e)))})},e.prototype.u3=function(e,t){var i=this;return this.t3(e,t),this.S3=Date.now(),this.p2.removeData(e,0,t).catch(function(t){return i.l2.debug("Error clearing ".concat(e," backward buffer:"),t)})},e.prototype.v3=function(){if(this.r2){var e=this.r2.getBufferBlock(this.I3),t=e?this.r2.getSmallestMaxSegmentDuration(e):-1;this.R3=(0,M.toMilliSeconds)(Math.max(t/2,this.k2.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL))}},e.prototype.w3=function(){var e,t,i=this;this.v3();var n=null==(e=this.r2)?void 0:e.getBufferBlock(this.I3),r=this.p2.getCurrentTime(),o=(0,_.getBufferStateMap)(null==(t=this.r3())?void 0:t.getState());o&&Object.keys(o).forEach(function(e){var t,a=null==(t=(0,_.getRendererBufferedRanges)(o,e)[0])?void 0:t.start,s=I.MimeTypeHelper.getMediaType(e);if(void 0!==a&&null!=n&&n.hasMaxSegmentDuration(e)){var l=r-Math.max(n.getMaxSegmentDuration(e)+1,i.n2.getBackwardTargetLevel(s));a<l&&(i.l2.debug("Clearing backward buffer for ".concat(e," from ").concat(a," to ").concat(l)),i.u3(e,l).catch(function(e){i.k2.logger.debug("Could not clear backward buffer",e)}))}})},e.prototype.setEndOfStream=function(e){var t;return e&&this.H3||!this.p2?(this.l2.debug("Skipping setting EOS"),Promise.resolve()):(e&&(null==(t=this.r3())||t.dispatch((0,S.setLoadingRangeFinished)(!0))),this.Q3=e,this.p2.setEndOfStream(e))},e.prototype.x3=function(e){var t,i=(0,_.getBufferState)(null==(t=this.r3())?void 0:t.getState()),n=void 0!==i?(0,_.getBufferMaxSize)(i,e):_.DefaultBufferMaxSize;if(this.l2.debug("Exceeded quota for ".concat(e," with ").concat(n," seconds of data in the buffers")),!this.k2.settings.NO_QUOTA_EXCEEDED_ADJUSTMENT){var r=this.p2.getCurrentTime(),o=this.r2.getSmallestSafeBufferSize(r,e);this.n2.adjustMaxBufferLevels(o,e,n)}},e.prototype.y3=function(){var e,t=this.r2.getBufferBlock(this.I3),i=function(e){return e.reduce(function(e,t){var i=e.getPlaybackTime();return t.getPlaybackTime()<i?t:e},e[0])}(this.r2.getAllSegmentsFromBufferBlock(t).toArray()),n=null!=(e=null==i?void 0:i.getPlaybackTime())?e:0;n<0&&(this.o2.dispatchEvent(h.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.PLAYBACK_NEGATIVE_DECODING_TIMESTAMP_ENCOUNTERED)),this.l2.debug("Encountered negative DTS ".concat(n,", attempting to correct PTO...")),this.d3=n)},e.prototype.z3=function(){var e=this;return this.N3?this.p4()?(this.y3(),this.C3(1/0).then(function(){return e.r4()})):Promise.resolve():this.C3(1/0)},e.prototype.getBufferedRangesMap=function(e){void 0===e&&(e=!0);var t,i=(0,_.getBufferState)(null==(t=this.r3())?void 0:t.getState());return void 0!==i&&this.r2?e?this.e3.getRanges(i):(0,_.getRendererBufferRangesMap)(this.r2,i)(this.I3):{}},e.prototype.A3=function(e,t){var i=this;if(!this.r2)return Promise.resolve();var n=this.r2.getAllSegmentsFromBufferBlock(e),o=n.hasNext()&&n.next();return o?(this.r2.removeSegment(o),this.v4(o).catch(function(e){i.l2.warn("Could not add segment to renderer (mimeType: ".concat(o.getMimeType(),", playbackTime: ").concat(o.getPlaybackTime(),")"),e)}).then(function(){o.isInit()||null==(n=i.r3())||n.dispatch((0,S.removeLoadedRange)(o.getMimeType(),(0,F.segmentToBufferBlockTimeRange)(o))),i.V3.set(o.getMimeType(),!o.isInit());var n,a=r.BufferRangeHelper.getTotalCommonBufferLength(i.getBufferedRangesMap());return!(0,P.isSwitchingBufferBlocks)(i.r3())||a<t?i.A3(e,t):Promise.resolve()})):Promise.resolve()},e.prototype.B3=function(e){var t,i,n=this;if(!e)return!1;var r=this.hasStopped(),o=null==(t=this.r2)?void 0:t.hasStartedLoadingNextBufferBlock(this.I3),a=null==(i=this.r2)?void 0:i.hasSegmentsForBufferBlock(e);return!this.s2.some(function(e){return n.p2.isDataBeingAppended(e.mimeType)})&&(o||r)&&!a},e.prototype.isSegmentStoreWaitingForSegments=function(){var e,t;return null!=(t=null==(e=this.r2)?void 0:e.isWaitingForSegments())&&t},e.prototype.C3=function(e){var t=this,i=this.r2.getBufferBlock(this.I3);return this.H3=!0,this.A3(i,e).then(function(){var e,n;t.H3=!1,t.j3&&!t.isBufferClearingOngoing()&&t.y4()&&t.D4(),t.B3(i)?(t.l2.debug("Finished loading BB ".concat(t.I3,": signaling EOS")),null==(e=t.r3())||e.dispatch((0,S.setLoadingRangeFinished)(!0)),t.G3?t.l2.debug("Skipped EOS signaling as a BufferBlock switch is just being executed"):t.F3&&(0,P.isSwitchingBufferBlocks)(t.r3())?(t.l2.debug("delaying EOS signal until ongoing period switch is completed"),t.F3.then(function(){t.setEndOfStream(!0)})):t.setEndOfStream(!0)):null==(n=t.r3())||n.dispatch((0,S.setLoadingRangeFinished)(!1))})},e.prototype.D3=function(){var e,t,i=this.k2.serviceManager.get(u.ServiceName.PlayerStateService);if(!i)return!1;var n=null!=(e=i.seekingOrTimeshifting)&&e,r=null==(t=this.r3())?void 0:t.getState(),o=r&&(0,_.getIsTimestampRollingOver)(r);return!(this.Q3||(0,P.isSwitchingBufferBlocks)(this.r3())||n||o)},e.prototype.checkIfEndOfBufferReached=function(e,t){if(this.p2.hasDataInSourceBuffers()){var i=this.p2.getCurrentTime(!0);this.S4(i,e)&&(this.T4()?t?this.V4(i):this.l2.debug("End of buffer reached, but cannot switch buffer block yet."):!this.O3&&this.q4()>0&&(this.A4(),this.U4()))}else this.p2.isPaused()||this.A4()},e.prototype.S4=function(e,t){var i=this.p2.getEndOfBufferTime();return void 0!==i&&(e>=i-t||this.q2.isLive()&&0===e)},e.prototype.T4=function(){var e,t=null==(e=this.r2)?void 0:e.getBufferBlock(this.I3);return!!t&&!!this.r2&&this.r2.hasStartedLoadingNextBufferBlock(t.getId())},e.prototype.U4=function(){var e,t=!0;this.V3.forEach(function(i,n){I.MimeTypeHelper.isVideo(n)&&(t=i,e=n)}),t||(this.l2.debug("Resetting currentTime on video element on stalling"),this.k2.videoElement.currentTime=this.k2.videoElement.currentTime,this.V3.set(e,!0))},e.prototype.V4=function(e){var t,i,n=this.r3();if((0,P.isSwitchingBufferBlocks)(n))return!1;var r=null==n?void 0:n.getState();if(!r||(0,_.getIsTimestampRollingOver)(r))return!1;var o=this.T4(),a=null==(t=this.r2)?void 0:t.getNextBufferBlock(this.I3);if(o&&a&&null!=(i=this.r2)&&i.areBufferBlockMediaTypesFinal(a)){var s=a.getMinCommonStartTime(),l=isFinite(s)&&s>=e?s:e;return this.b4(l,a),!0}return!1},e.prototype.readyToSeek=function(){return this.F3?(this.l2.debug("Awaiting ongoing buffer block switch before seek"),this.F3.then(function(){}).catch(function(){})):Promise.resolve()},e.prototype.shouldBuffersBeClearedOnTimeshift=function(e){var t=this.p2.getCurrentTime();return!this.isInBufferedRange(e)||e<t},e.prototype.W4=function(e,t){return void 0===t&&(t=!1),t||this.shouldBuffersBeClearedOnTimeshift(e)?this.X4():Promise.resolve()},e.prototype.setTimeshiftCancelState=function(e){this.b3=e},e.prototype.X4=function(){var e=this;return this.k2.logger.debug("Clearing buffer on timeshift"),this.clearBuffers().then(function(){return e.b3?(e.b3=!1,Promise.reject("cancelled timeshift")):Promise.resolve()})},e.prototype.setCurrentTime=function(e,t,i){var n=this;void 0===t&&(t=!1),void 0===i&&(i=!1);var r=this.r2.getBufferBlockForPlaybackTime(e),o=this.r2.getBufferBlock(this.I3),a=!r||r.getId()!==o.getId();return this.L3=e,this.N3||this.isInBufferedRange(e)||this.A4(),t&&this.isBufferAvailable()&&!this.isBufferClearingOngoing()&&this.W4(e,i).catch(function(e){return n.l2.debug("Error clearing buffers:",e)}),a?r?this.b4(e,r):this.d4(e):(this.E3=void 0,this.p2.setCurrentTime(e).then(function(e){return n.Y4(e)}))},e.prototype.Y4=function(e){return this.L3=void 0,this.y4()?this.j3&&(this.l2.debug("End stalling after seek to ".concat(e)),this.D4()):this.l2.debug("Delay ending stall as the restart threshold is not yet reached"),Promise.resolve(e)},e.prototype.Z4=function(e,t){var i,n,r,o,a,s=null!=(n=null==(i=this.E3)?void 0:i.time)?n:t,l=(0,R.isNumber)(null==(r=this.E3)?void 0:r.time)&&(null==(o=this.r2)?void 0:o.canSwitchToBufferBlockForTime(s));if(this.l2.debug("Buffer block switch failed:",e),this.a3=new W.DeferredReject,l){this.l2.debug("Trying to continue delayed BufferBlock switch to ".concat(s,"..."));var c=this.a4(s);return this.b4(s,c)}return null==(a=this.r3())||a.dispatch((0,S.setBufferBlockSwitchOngoing)(!1)),Promise.resolve(t)},e.prototype.a4=function(e){var t,i=this.q2.getPeriodIdForTime(e);return null==(t=this.r2)?void 0:t.getTargetBufferBlock(e,i)},e.prototype.b4=function(e,t){var i,n,r=this,o=function(){};if(this.a3&&this.a3.reject("BufferBlock switch interrupted by newest one"),this.a3=new W.DeferredReject,null==(i=this.r3())||i.dispatch((0,S.setBufferBlockSwitchOngoing)(!0)),this.E3&&(o=this.E3.deferred.resolve),!(null!=(n=this.r2)&&n.canSwitchToBufferBlock(t)))return this.d4(e);this.G3=!0;var a=this.c3||Promise.resolve();return this.F3=a.then(function(){return r.setEndOfStream(!1)}).then(function(){return r.E3=void 0}).then(function(){return r.a3.next(function(){return r.clearRendererBuffers()})}).then(function(){return r.a3.next(function(){return r.c4(t,e)})}).then(function(e){return r.G3=!1,r.a3=new W.DeferredReject,o(e),e}).catch(function(t){return r.Z4(t,e)}).finally(function(){r.F3=void 0}),this.F3},e.prototype.c4=function(e,t){var i,n;return this.hasStreamEnded()?(null==(i=this.a3)||i.reject("BufferBlock switch interrupted by source unloading"),Promise.reject("Source was unloaded")):(0,C.isTizen2017)()||null!=(n=this.r2)&&n.shouldSwitchBufferBlock(e,this.I3)?this.i4(t,e):this.e4(t,e)},e.prototype.d4=function(e){(0,P.isSwitchingBufferBlocks)(this.r3())&&this.a3&&this.a3.reject("BufferBlock switch interrupted by newest one");var t=this.r2.getAvailablePositionForTime(e,this.p2.getCurrentTime());return this.E3&&this.E3.time===e||(this.E3&&this.E3.time!==e&&this.E3.deferred.reject(),this.E3={time:t,deferred:new A.Deferred}),this.E3.deferred.promise},e.prototype.e4=function(e,t){var i,n=this,r=t.getId();return null!=(i=this.r2)&&i.getBufferBlock(r)?(this.Q3=!1,this.I3=r,this.r2.deleteOldBufferBlocks(r),this.G3=!1,this.U3.clear(),this.a3.next(function(){return n.C3(1/0)}).then(function(){return n.a3.next(function(){return n.k4(e)}
14)}).then(function(e){var t;return null==(t=n.r3())||t.dispatch((0,S.setBufferBlockSwitchOngoing)(!1)),n.f4(),n.Y4(e)})):(this.l2.debug("Target BufferBlock is no longer available, cancelling BufferBlock switch..."),Promise.reject("The targeted buffer BufferBlock is no longer available"))},e.prototype.f4=function(){var e=this,t=this.B4();t&&(this.j3||t.isPaused()||this.p2.play().catch(function(t){e.l2.debug("play call failed with reason: ".concat(t))}))},e.prototype.g4=function(e,t){var i,n=null==(i=this.r2)?void 0:i.getBufferBlock(this.I3);if(!n)return!0;var r=n.getAllKnownPeriodIds().some(function(t){return e.hasTrackedPeriodId(t)}),o=this.s2.length===t.length,a=!(r||o)||!(0,K.canReuseSourceBuffer)(n,e,t);return this.h4(a,n,e)},e.prototype.h4=function(e,t,i){var n,r,o,a,s=null==(n=this.k2)?void 0:n.sourceContext.source,l=null==(r=null==s?void 0:s.options)?void 0:r.shouldRecreateSourceBuffersOnPeriodSwitch;if(!l)return e;var c=t.getAllKnownPeriodIds(),u=X(t,null!=(o=c[c.length-1])?o:w.DEFAULT_PERIOD_ID),d=null!=(a=i.getAllKnownPeriodIds()[0])?a:w.DEFAULT_PERIOD_ID,h=X(i,d),p=(0,k.safeUserCallback)(function(){return l(u,h,e)},this.k2.logger);return"boolean"==typeof p?(this.l2.debug("User overwrote default SourceBuffer recreation strategy from ".concat(e," to ").concat(p)+" for the switch from ".concat(u.periodId," to ").concat(h.periodId,".")),p):e},e.prototype.i4=function(e,t){var i,n,r,o,a,s,l=this;this.l2.debug("Switching buffer block for time ".concat(e));var c=t.getMediaTypesWithoutSubs(),d=this.j4(t,c);if(this.s2=c,null==(i=this.r3())||i.dispatch((0,S.setLoadingRangeFinished)(!1)),null==(r=null==(n=this.k2.serviceManager)?void 0:n.get(u.ServiceName.TimedMetadataService))||r.resetContentBoundaryTracking(),(null==(o=this.B4())?void 0:o.seekingOrTimeshifting)===!1){var h=null!=(a=t.getAllKnownPeriodIds()[0])?a:w.DEFAULT_PERIOD_ID;null==(s=this.r3())||s.dispatch((0,U.periodSwitchStarted)(h))}return this.a3.next(function(){return d}).then(function(){return l.a3.next(function(){return l.e4(e,t)})}).then(function(e){return l.a3.next(function(){return l.C3(1/0).catch(function(){return l.k2.logger.debug("Could not push segment into renderer")})}).then(function(){return e})})},e.prototype.j4=function(e,t){return this.g4(e,t)?(this.l2.debug("recreating the buffers with types",t),this.n3(t,e)):Promise.resolve(0)},e.prototype.k4=function(e){var t=this,i=this.E3;return this.E3=void 0,this.a3.next(function(){return t.p2.setCurrentTime(e)}).then(function(e){return i&&i.deferred&&i.deferred.resolve(e),e})},e.prototype.addMimeTypeAndCodec=function(e,t,i){if(void 0===i&&(i=!1),!I.MimeTypeHelper.isAV(e))return!0;var n=this.p2.addBuffer(e,t);return n&&((0,g.getMetricsState)(this.k2.store.getState())[e]||this.k2.store.dispatch((0,m.initializeMetricsForMimeType)(e,this.k2.settings)),i||this.k2.store.dispatch((0,m.addMetricsValue)(e,v.MetricType.StalledSeconds,0))),n},e.prototype.l4=function(){var e,t,i,n,r,o=this.F4(),a=null==(e=this.r2)?void 0:e.getAllBufferBlocks(),s=null==(t=this.r2)?void 0:t.getFutureBufferBlocks(o),l=null==(i=this.r2)?void 0:i.getBufferBlock(o);if(null!=a&&a.length){if(!(null!=s&&s.length))return l;for(var c=a.findIndex(function(e){return e.getId()===o}),u=c;u<a.length;u++){var d=a[u];null!=(n=this.r2)&&n.hasStartedLoadingNextBufferBlock(d.getId())&&(l=null==(r=this.r2)?void 0:r.getNextBufferBlock(d.getId()))}return l}},e.prototype.m4=function(){return this.s2.map(function(e){return e.mimeType})},e.prototype.n4=function(){var e,t;return null!=(t=null==(e=this.l4())?void 0:e.getMediaTypes().map(function(e){return e.mimeType}))?t:[]},e.prototype.o4=function(e,t,i){var n=this;if(!this.isBufferAvailable())return 0;var r=e.map(function(e){return n.getOverallBufferLevel(e,t,p.BufferType.ForwardDuration,i)});return r.length>0?Math.min.apply(Math,r):0},e.prototype.p4=function(){var e=this.n2.getForwardTargetLevel(),t=this.q4()-this.m2.DURATION_MISMATCH_TOLERANCE,i=Math.min(this.m2.STARTUP_THRESHOLD,e-this.m2.STARTUP_THRESHOLD_DELTA,isFinite(t)?t:1/0),n=this.n4();return this.o4(n)>=i},e.prototype.q4=function(){return this.q2.isLive()?1/0:this.p2.getDuration()-this.E4()},e.prototype.r4=function(){if(this.N3){var e=Date.now(),t=(0,g.getMetricsState)(this.k2.store.getState()),i=(0,g.getMetricsLastEntry
vendor: 4,102 bytes, line 14
14)(t,"default",v.MetricType.StartTime).value,n=(0,M.toSeconds)(e-i);this.k2.store.dispatch((0,m.addMetricsValue)("default",v.MetricType.StartupTimeSeconds,n)),isNaN(n)||this.l2.debug("start up time: ".concat(n)),this.N3=!1,this.D4()}},e.prototype.s4=function(e){var t=this.p2.getCurrentTime(!0);e.isInit()&&I.MimeTypeHelper.isVideo(e.getMimeType())&&this.j3&&this.isInBufferedRange(t)&&(this.l2.debug("Resetting currentTime on video element on unstalling"),this.k2.videoElement.currentTime=this.k2.videoElement.currentTime)},e.prototype.t4=function(e){var t=this;e.getDrmInitData().filter(function(e){var t;return(null==(t=e.kid)?void 0:t.length)>0}).forEach(function(i){return t.q2.setRepresentationDrmKid(e.getRepresentationId(),i.kid[0])})},e.prototype.u4=function(e){var t=e.getPresentationTimeOffset()+this.d3;isNaN(t)||e.setPresentationTimeOffset(t)},e.prototype.v4=function(e){var t=this;this.d3<0&&this.u4(e);var i=I.MimeTypeHelper.extractContentType(e.getMimeType());if(this.W3[i]!==e.getInitSegment()){var n=e.getInitSegment();return this.W3[i]=n,Promise.all([n,e].map(function(e){return t.w4(e)})).then()}return this.w4(e)},e.prototype.w4=function(e){var t=this;return e.hasDrmInitData()&&this.t4(e),this.t2.catch(function(i){if(e.isEncrypted())throw(null==i?void 0:i.message)!==o.DrmSetupError.CANCELLED&&t.k2.eventHandler.fireError(function(e,t){var i;return O.ModuleManager.has(D.ModuleName.DRM)?(null==e?void 0:e.message)===o.DrmSetupError.MISSING_CONFIGURATION?new s.PlayerError(a.ErrorCode.DRM_MISSING_CONFIGURATION,{reason:e.message},void 0,t):new s.PlayerError(a.ErrorCode.DRM_NO_KEY_SYSTEM,{reason:null!=(i=null==e?void 0:e.message)?i:e},void 0,t):new L.PlayerModuleMissingError(D.ModuleName.DRM)}(i,t.k2.sourceContext.sourceIdentifier)),"DRMConfig failure";t.l2.debug("Problem ensuring segment, error:",i)}).then(function(){return t.s4(e),t.x4(e),t.p2.appendData(e).catch(function(e){t.l2.debug("could not append data to renderer",e)})})},e.prototype.x4=function(e){var t,i;if(!e.isInit()){var n=e.getSegmentInfo().discontinuitySequenceNumber,r=e.getPeriodId(),o=void 0!==n?String(n):r,a=e.getMimeType();if(o!==this.U3.get(a)){var s=e.getPresentationTimeOffset();(0,R.isNumber)(s)&&isFinite(s)&&this.p2.setTimestampOffset(a,-s),this.U3.set(a,o),null==(i=null==(t=this.k2.serviceManager)?void 0:t.get(u.ServiceName.TimedMetadataService))||i.trackContentBoundary(e)}}},e.prototype.y4=function(){var e=this;if(!this.n2)return!1;var t=this.m2.RESTART_THRESHOLD;(0,C.isWebOS)()&&(t=Math.max(t,1.5));var i=Math.min(t,this.n2.getForwardTargetLevel()-this.m2.RESTART_THRESHOLD_DELTA,this.q4()),n=this.m4();return n.every(function(t){return e.p2.getBufferedRanges(t).length>0})&&this.o4(n)>=i},e.prototype.z4=function(){return!this.N3&&!(0,P.isSwitchingBufferBlocks)(this.r3())},e.prototype.A4=function(){this.z4()&&this.X3.startStalling()},e.prototype.B4=function(){return this.k2.serviceManager.get(u.ServiceName.PlayerStateService)},e.prototype.C4=function(e){var t=this.B4();if(!t)return!1;var i=this.m2,n=Math.max(i.END_OF_BUFFER_TOLERANCE,i.END_OF_BUFFER_RECOVERY_TOLERANCE,i.RESTART_THRESHOLD),r=this.m4(),o=this.o4(r,e,!1),a=o>=n,s=o>=this.q4()||this.O3;return!a&&!s&&!t.seekingOrTimeshifting},e.prototype.D4=function(){if(this.j3)if((0,P.isSwitchingBufferBlocks)(this.r3()))this.l2.debug("Ending stall was aborted due to buffer block switching");else{var e=this.E4();this.C4(e)?this.G4(e)?(this.l2.debug("Ending stall at the gap"),this.J3()):this.l2.debug("Cannot unstall yet as playback is stalling at a gap and there is no future common buffer"):this.X3.endStalling()}},e.prototype.E4=function(){return void 0!==this.L3?this.L3:this.p2.getCurrentTime()},e.prototype.F4=function(){return this.r2.getCurrentBufferBlockId()},e.prototype.hasPendingSegments=function(e){return e=e||this.F4(),this.r2.getFutureBufferBlocks(e).some(function(e){return e.hasSegments()})},e.prototype.getOverallBufferLevel=function(e,t,i,n){void 0===t&&(t=this.p2.getCurrentTime()),void 0===i&&(i=p.BufferType.ForwardDuration),void 0===n&&(n=!0),this.N3&&(t=this.E4());var o=this.getBufferedRangesMap()[e];
14return o&&0!==o.length?(o=n?r.BufferRangeHelper.mergeRanges(o.concat(r.BufferRangeHelper.findGapsInRanges(o)),this.m2.GAP_TOLERANCE):o.filter(function(e){return e.start<=t&&t<=e.end}),r.BufferRangeHelper.getBufferLevel(o,t,i)):0},e.prototype.G4=function(e){return void 0===e&&(e=this.p2.getCurrentTime()),r.BufferRangeHelper.getCommonBufferedRanges(this.getBufferedRangesMap()).some(function(t){return t.getStart()>e})},e.prototype.hasFutureBufferBlockData=function(){var e;return!!(null!=(e=this.r2)&&e.getNextBufferBlock(this.I3))||(0,P.isSwitchingBufferBlocks)(this.r3())},e.prototype.isInBufferedRange=function(e){return r.BufferRangeHelper.isInBufferedRange(this.getBufferedRangesMap(),e)},e.prototype.isStarted=function(){return this.M3},e.prototype.isInStartupPhase=function(){return this.N3},e.prototype.hasStreamEnded=function(){return this.P3},e.prototype.H4=function(){var e;if(!this.Z3){var t=this.r3();void 0!==t&&(null==(e=t.getState())?void 0:e.manifest)!==void 0&&(this.Z3=(0,T.subscribe)(t)(N.getManifest,this.i3,function(e){return(null==e?void 0:e.isInitialized)||!1}))}},e.prototype.stop=function(e){void 0===e&&(e=!1),this.O3=!0,this.M3=!1,this.N3=!1,e?(this.p2.end(),this.P3=!0,this.l2.debug("stopped playback"),this.p2.off(x.MediaElementEvent.stalled,this.R4),this.p2.off(x.MediaElementEvent.waiting,this.R4),this.p2.off(x.MediaElementEvent.ended,this.Q4),this.p2.off(x.MediaElementEvent.timeupdate,this.O4),this.p2.off(x.MediaElementEvent.currenttimenotadvancing,this.P4),this.Z3&&(this.Z3(),this.Z3=void 0),void 0!==this.f3&&(this.f3(),this.f3=void 0),this.I4(),this.V3.clear()):this.D4()},e.prototype.hasStopped=function(){return this.O3},e.prototype.I4=function(){var e=this;Object.keys(this.Y3).forEach(function(t){return e.p3(t)})},e.prototype.restart=function(){this.O3=!1,this.M3||(this.M3=!0,this.p2.on(x.MediaElementEvent.stalled,this.R4),this.p2.on(x.MediaElementEvent.waiting,this.R4),this.p2.on(x.MediaElementEvent.ended,this.Q4),this.p2.on(x.MediaElementEvent.timeupdate,this.O4),this.p2.on(x.MediaElementEvent.currenttimenotadvancing,this.P4)),this.P3=!1},e.prototype.dispose=function(){var e,t;this.stop(!0),this.p2=null,this.o2=null,this.m2=null,this.n2=null,this.o2=null,this.r2=void 0,this.W3=null,null==(e=this.g3)||e.call(this),null==(t=this.r3())||t.dispatch((0,S.resetLoadedRanges)()),this.e3.dispose(),this.s2=[],this.I4(),this.t2=null,this.X3=(0,d.dispose)(this.X3)},e.prototype.changeBufferType=function(e,t,i){var n,r,o=this.s2.find(function(t){return I.MimeTypeHelper.getMediaType(t.mimeType)===I.MimeTypeHelper.getMediaType(e)});return o&&(this.s2.splice(this.s2.indexOf(o),1),this.s2.push({mimeType:e,codec:t}),this.p3(o.mimeType),null==(r=this.r3())||r.dispatch((0,S.resetLoadedRanges)(o.mimeType))),this.o3(e),this.W3={},o?this.p2.changeBufferType(e,t,i):Promise.resolve(((n={})[e]=t,n))},e.prototype.addRequiredMediaType=function(e,t){this.r2.addRequiredMediaType(e,t)},e.prototype.updateRequiredMediaType=function(e,t){var i;null==(i=this.r2)||i.changeMediaType(e,t)},e.prototype.areBufferBlockMediaTypesFinalForPeriod=function(e){var t,i;return null!=(i=null==(t=this.r2)?void 0:t.areBufferBlockMediaTypesFinalForPeriod(e))&&i},e.prototype.clearCacheForMimeType=function(e){var t;null==(t=this.r3())||t.dispatch((0,S.resetLoadedRanges)(e)),this.r2.clearSegments(e)},e.prototype.J4=function(){var e,t=this;Object.keys((0,j.getStreamTimeline)(null==(e=this.r3())?void 0:e.getState())).filter(function(e){return I.MimeTypeHelper.isAV(e)}).forEach(function(e){return t.clearCacheForMimeType(e)})},e.prototype.isBufferClearingOngoing=function(){return void 0!==this.c3},e.prototype.clearBuffers=function(){var e=this;return this.c3?this.l2.debug("Skipping buffer clearing as it is already ongoing"):(this.A4(),this.J4(),this.c3=this.setEndOfStream(!1).then(function(){return e.clearRendererBuffers()}),this.c3.finally(function(){return e.c3=void 0})),this.c3},e.prototype.clearRendererBuffers=function(){var e=this;return this.isBufferAvailable()?Promise.all(this.s2.map(function(t){return e.clearBuffer(t.mimeType)})).then(function(){}):Promise.resolve()},e.prototype.clearBuffer=function(e){var t=this;return this.p2.removeData(e).catch(function(i){return t.l2.debug("Error clearing ".concat(e," buffer:"),i)})},e.prototype.removeBufferRange=function(e,t,i){var n=this;return this.p2.removeData(e,t,i).catch(function(t){return n.l2.debug("Error removing ".concat(e," buffer range:"),t)})},e.prototype.isBufferAvailable=function(){return this.s2.length>0},e}()}
vendor: 14,201 bytes, line 14
14,60632:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferRangesCache=void 0;var n=i(80813),r=i(86897),o=i(93204),a=i(10333);t.BufferRangesCache=function(){function e(e,t){var i=this;this.context=e,this.segmentStore=t,this.Icb=this.Kcb(),this.Gcb=(0,o.subscribe)(e.store)(a.sourceIdentifiersSelector,function(){return i.Jcb()},function(e,t){return!!e.includes(i.context.sourceContext.sourceIdentifier)&&(0,a.hasASourceStoreIdentifierChanged)(e,t)}),this.Mcb(),this.Ncb((0,r.getBufferState)(this.Icb.getState()))}return e.prototype.Jcb=function(){this.Icb=this.Kcb(),this.Icb?(this.Mcb(),this.Ncb((0,r.getBufferState)(this.Icb.getState()))):this.Lcb()},e.prototype.Kcb=function(){return this.context.serviceManager.get(n.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier)},e.prototype.Lcb=function(){this.Fcb&&this.Fcb(),this.Fcb=void 0,this.Gcb=void 0},e.prototype.Mcb=function(){var e=this;this.Lcb(),this.Fcb=(0,o.subscribe)(this.Icb)(function(e){return(0,r.getBufferState)(e)},function(t){return e.Ncb(t)},r.hasBufferRangesChanged)},e.prototype.Ncb=function(e){this.Hcb={overallBufferRanges:(0,r.getBufferRangesMap)(this.segmentStore,e,this.context.settings.GAP_TOLERANCE)}},e.prototype.getRanges=function(e){return void 0!==this.Fcb&&void 0!==this.Hcb&&0!==Object.keys(this.Hcb.overallBufferRanges).length||this.Ncb(e),this.Hcb.overallBufferRanges},e.prototype.dispose=function(){this.Lcb(),this.Gcb&&(this.Gcb(),this.Gcb=void 0),this.Hcb=void 0},e}()},94305:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferStallingService=void 0;var n=i(85648),r=i(60877);t.BufferStallingService=function(){function e(e,t,i){this.playerStateService=e,this.logger=t,this.renderer=i}return e.prototype.startStalling=function(){this.isRendererStalling()||(this.logger.debug("Stalling playback at ".concat(this.renderer.getCurrentTime(!0))),this.logger.insane("Video element stall started in state: ".concat(this.playerStateService.playbackState)),this.playerStateService.setIsRendererStalling(!0),this.playerStateService.isPlaying()&&(this.logger.insane("Call pause on renderer"),this.renderer.pause()))},e.prototype.endStalling=function(){var e=this;if(this.isRendererStalling()){this.playerStateService.setIsRendererStalling(!1);var t=[n.PlaybackState.Play,n.PlaybackState.Playing].includes(this.playerStateService.playbackState);this.logger.debug("Unstalling and ".concat(t?"":"not ","restarting playback")),t&&(!this.playerStateService.seekingOrTimeshifting&&(0,r.shouldResetCurrentTimeAfterBufferUnderrun)()&&(this.logger.debug("Resetting current time before unstalling"),this.renderer.setCurrentTime(this.renderer.getCurrentTime())),this.renderer.play().catch(function(t){e.logger&&e.logger.debug("Play after unstalling failed with reason: ".concat(t))}))}},e.prototype.isRendererStalling=function(){return this.playerStateService.getIsRendererStalling()},e.prototype.dispose=function(){this.logger=null,this.playerStateService=null,this.renderer=null},e}()},51888:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeferredReject=void 0,t.DeferredReject=function(){function e(){this.dcb=!1}return e.prototype.reject=function(e){this.dcb=!0,this.ecb=e},e.prototype.next=function(e){return this.dcb?Promise.reject(this.ecb):e()},e}()},39494:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentStore=t.INITIAL_BUFFER_BLOCK_ID=void 0;var r=i(68925),o=i(86897),a=i(15971),s=i(34047),l=i(79721),c=i(76399),u=i(85434),d=i(88052),h=i(62756),p=i(59604),f=i(99529),m=i(90685),g=i(674),v=i(77264);t.INITIAL_BUFFER_BLOCK_ID=0;var y=function(){function e(e,i){this.context=e,this.Pcb=[],this.Rcb={};var n=new m.BufferBlock(t.INITIAL_BUFFER_BLOCK_ID);this.Rcb={},this.Qcb=new v.Segregation(this.Rcb,i),this.Ocb=[n]}return e.prototype.Scb=function(e){return this.Ocb.find(function(t){return t.hasTrackedPeriodId(e)})},e.prototype.hasSegmentsForBufferBlock=function(e){return this.getAllSegmentsFromBufferBlock(e).hasNext()},e.prototype.isWaitingForSegments=function(){return 0!==this.Pcb.length},e.prototype.hasDataSegmentsForBufferBlock=function(e){return Object.keys(e.mediaTypes).filter(function(e){return u.MimeTypeHelper.isAV(e)}).every(function(t){return e.hasDataSegments(t)})},e.prototype.getTargetBufferBlock=function(e,t){return this.getBufferBlockForPlaybackTime(e)||this.ccb(e)||this.Scb(t)},e.prototype.canSwitchToBufferBlock=function(e){if(!e)return!1;var t=this.areBufferBlockMediaTypesFinal(e);return this.hasDataSegmentsForBufferBlock(e)&&t},e.prototype.canSwitchToBufferBlockForTime=function(e){var t=this.getBufferBlockForPlaybackTime(e);return this.canSwitchToBufferBlock(t)},e.prototype.areBufferBlockMediaTypesFinalForPeriod=function(e){var t,i=this;if(void 0===this.Rcb[e])return!1;var n=this.Scb(e);if(!n||0===Object.keys(null!=(t=null==n?void 0:n.mediaTypes)?t:{}).length)return!1;var r=Object.keys(n.mediaTypes);return Object.keys(this.Rcb[e]).filter(function(e){return u.MimeTypeHelper.isAV(e)}).every(function(t){var n;return r.includes(t)&&(null==(n=i.Rcb[e][t])?void 0:n.codec)})},e.prototype.areBufferBlockMediaTypesFinal=function(e){var t,i=this;return!(!e||0===Object.keys(null!=(t=null==e?void 0:e.mediaTypes)?t:{}).length)&&e.getAllKnownPeriodIds().every(function(e){return i.areBufferBlockMediaTypesFinalForPeriod(e)})},e.prototype.addRequiredMediaType=function(e,t){this.Rcb[e]||(this.Rcb[e]={}),this.Rcb[e][t]||(this.Rcb[e][t]={mimeType:t});var i=this.Scb(e);i&&(i.mediaTypes[t]||i.addMediaType({mimeType:t}))},e.prototype.changeMediaType=function(e,t){var i=this,n=Object.keys(this.Rcb),r=t;n.forEach(function(n){t||(r=Object.keys(i.Rcb[n]).find(function(t){return u.MimeTypeHelper.getMediaType(t)===u.MimeTypeHelper.getMediaType(e)})),i.Tcb(n,r),i.addRequiredMediaType(n,e),i.clearSegments(r)})},e.prototype.Tcb=function(e,t){if(this.Rcb[e]){delete this.Rcb[e][t];var i=this.Scb(e);i&&i.removeMediaType(t)}},e.prototype.Ucb=function(e,t){var i;if(this.Rcb[e]){var r=this.Rcb[e][t.mimeType];this.Rcb[e][t.mimeType]=n(n({},r),t)}else this.Rcb[e]=((i={})[t.mimeType]=t,i)},e.prototype.Vcb=function(e,t){var i=this;if(1===this.Ocb.length&&this.Qcb.canAddSegmentToBufferBlock(e,this.Ocb[0],t))return this.Ocb[0];var n=this.Ocb.reduce(function(n,r){return i.Qcb.canAddSegmentToBufferBlock(e,r,t)&&(!n||r.getMinDistanceFromBufferBlock(e)<n.getMinDistanceFromBufferBlock(e))?r:n},void 0);if(n){var r=n.getCommonPlaybackTimeRanges(),o=e.getPlaybackTime(),a=function(e){return e.map(function(e){return{range:e.getCommonPlaybackTimeRanges(),block:e}}).sort(function(e,t){return e.range.start-t.range.start})}(this.Ocb.filter(function(e){return e!==n})),s=function(e,t){return t.reduce(function(t,i){return i.range.end<=e?Math.max(i.range.start,t):t},-1/0)}(r.start,a),l=function(e,t){return t.reduce(function(t,i){return i.range.start>=e?Math.min(i.range.start,t):t},1/0)}(r.end,a);if(s<=o&&o<=l&&!this.Wcb(o,n,a))return n}},e.prototype.Wcb=function(e,t,i){return i.filter(function(e){return isFinite(e.range.start)&&e.range.start>t.getCommonPlaybackTimeRanges().start&&isFinite(e.range.end)&&e.range.end>t.getCommonPlaybackTimeRanges().end}).some(function(t){var i=t.range.start<=e&&e<=t.range.end,n=e>t.range.end;return i||n})},e.prototype.Xcb=function(e,t){var i=this,n=e??l.DEFAULT_PERIOD_ID;return Object.keys(this.Rcb[n]).filter(function(e){return u.MimeTypeHelper.isAV(e)}).every(function(e){return i.Pcb.some(function(i){return i.getMimeType()===e&&i.getSegmentInfo().discontinuitySequenceNumber===t&&i.getPeriodId()===n})})},e.prototype.Ycb=function(e){var t,i=null==(t=(0,a.getSourceState)(this.context))?void 0:t.hls;return!!i&&(0,d.ModuleManager.get(h.ModuleName.HLS).selectors.areDiscontinuitiesMisaligned)(i,Object.keys(this.Rcb[l.DEFAULT_PERIOD_ID]).filter(function(e){return u.MimeTypeHelper.isAV(e)}),e.getDuration())},e.prototype.addSegment=function(e){var t=this;if(function(e,t){var i=e.getSegmentInfo(),n=i.codecs,r=i.discontinuitySequenceNumber,o=i.periodId;return null!=r?!t.some(function(e){return e.hasTrackedDiscontinuity(r)})&&!(0,s.isAVMuxedTogether)(n):void 0!==o&&!t.some(function(e){return e.hasTrackedPeriodId(o)})}(e,this.Ocb)){var i=e.getSegmentInfo(),n=i.discontinuitySequenceNumber,r=i.periodId;if(this.Pcb.push(e),this.context.logger.debug("[SegmentStore] Reached new content boundary ".concat(n??r," with ").concat(e.getMimeType()," segment"),{url:e.getUrl()}),this.Xcb(r,n)){var o=this.Pcb.filter(function(e){return e.getSegmentInfo().discontinuitySequenceNumber===n&&e.getSegmentInfo().periodId===r});this.context.logger.debug("[SegmentStore] ".concat(null==n?"Period":"Discontinuity"," ").concat(n??r," is ready: adding segments to store")),this.Zcb(o),this.Pcb=this.Pcb.filter(function(e){return e.getSegmentInfo().discontinuitySequenceNumber!==n||e.getSegmentInfo().periodId!==r})}else this.Ycb(e)&&(this.context.logger.debug("[SegmentStore] Detected misaligned discontinuities: flushing all delayed segments"),this.Pcb.forEach(function(e){return t.Zcb([e])}),this.Pcb=[])}else this.Zcb([e])},e.prototype.Zcb=function(e){var t=this,i=e.reduce(function(e,i){var n=t.Qcb.getSegregationCriteria(i),r=t.Vcb(i,n);return null===e?r:r!==e?void 0:r},null);i||(i=this.bcb(),this.Ocb.push(i)),e.forEach(function(e){var n=t.Qcb.getSegregationCriteria(e);t.context.logger.debug("[SegmentStore] Added ".concat(e.getMimeType()," segment to BB with ID ").concat(i.getId()),{segment:e.getUrl(),segmentCriteria:n});var o=(0,a.getSourceStore)(t.context),s=(0,f.getTrackIdentifier)(e.getSegmentInfo());null==o||o.dispatch((0,r.removeLoadedRange)(s,(0,p.segmentToBufferBlockTimeRange)(e))),i.addSegment(e),null==o||o.dispatch((0,r.addLoadedRange)(s,(0,p.segmentToBufferBlockTimeRange)(e))),i.getSegregationCriteria(e.getMimeType())||i.setSegregationCriteria(n,e.getMimeType());var l=i.getMediaType(e.getMimeType());l&&t.Ucb(e.getPeriodId(),l)})},e.prototype.acb=function(){var e=this.Ocb[this.Ocb.length-1];return e?e.getId()+1:t.INITIAL_BUFFER_BLOCK_ID},e.prototype.bcb=function(){var e=this.acb();return this.context.logger.debug("[SegmentStore] creating new BB with ID ".concat(e)),new m.BufferBlock(e)},e.prototype.getMediaTypes=function(e){var t=this;return e&&this.Rcb[e]?Object.keys(this.Rcb[e]).map(function(i){return t.Rcb[e][i]}):[]},e.prototype.getAllBufferBlocks=function(){return this.Ocb},e.prototype.getCurrentBufferBlockId=function(){var e,i=this.Ocb[0];return null!=(e=null==i?void 0:i.getId())?e:t.INITIAL_BUFFER_BLOCK_ID},e.prototype.deleteOldBufferBlocks=function(e){this.Ocb=this.Ocb.filter(function(t){return t.getId()>=e&&t.getAllSegments().length>0})},e.prototype.getActiveBufferBlock=function(){var e;return null!=(e=this.getBufferBlock(this.getCurrentBufferBlockId()))?e:null},e.prototype.getBufferBlock=function(e){return this.Ocb.find(function(t){return t.getId()===e})},e.prototype.getBufferBlockForSegment=function(e){return this.getBufferBlock(e.getBufferBlockId())},e.prototype.getBufferBlockForPlaybackTime=function(e){var t=this,i=this.Ocb.filter(function(i){var n=0===e?t.getSmallestMaxSegmentDuration(i)-.01:.01;return Object.keys(i.mediaTypes).filter(function(e){return u.MimeTypeHelper.isAV(e)}).every(function(t){var r,o;return(null==(r=i.getPlaybackTimeRange(t))?void 0:r.start)<=e+n&&(null==(o=i.getPlaybackTimeRange(t))?void 0:o.end)>=e})});return i[i.length-1]},e.prototype.ccb=function(e){return this.Ocb.filter(function(t){return t.getMinCommonStartTime()>=e}).sort(function(e,t){return e.getMinCommonStartTime()-t.getMinCommonStartTime()})[0]},e.prototype.getNextSegment=function(){var e,t;return null!=(t=null==(e=this.getActiveBufferBlock())?void 0:e.getNextSegment())?t:null},e.prototype.removeSegment=function(e){var t=this.getBufferBlockForSegment(e);t&&t.removeSegment(e),this.Pcb=this.Pcb.filter(function(t){return t!==e})},e.prototype.getAllSegmentsFromBufferBlock=function(e,t){if(!e)return c.EmptyIterator.getInstance();var i=e.getAllSegments();return t?new c.FilterIterator(new c.ArrayIterator(i),function(e){return e.getMimeType()===t}):new c.ArrayIterator(i)},e.prototype.getNextBufferBlock=function(e){return this.Ocb.find(function(t){return t.getId()>e})},e.prototype.getFutureBufferBlocks=function(e){return this.Ocb.filter(function(t){return t.getId()>=e})},e.prototype.getPrecedingSegments=function(e,t){var i=this.Pcb.filter(function(i){return(0,m.isPrecedingSegment)(i,e,t)});return this.Ocb.flatMap(function(i){return i.getPrecedingSegments(e,t)}).concat(i)},e.prototype.clearSegments=function(e){this.context.logger.debug("[SegmentStore] clearing all segments for ".concat(e)),this.Ocb.forEach(function(t){return t.clearSegments(e)}),this.Pcb=this.Pcb.filter(function(t){return t.getMimeType()!==e})},e.prototype.getSmallestMaxSegmentDuration=function(e){return e&&e.hasMaxSegmentDurations()?e.getMinMaxSegmentDuration():-1},e.prototype.getSmallestSafeBufferSize=function(e,t){var i=this.getBufferBlockForPlaybackTime(e);return null!=i&&i.hasMaxSegmentDuration(t)?i.getMaxSegmentDuration(t)+1:1},e.prototype.getAvailablePositionForTime=function(e,t){var i=e;if(t&&e>t){var n=this.getBufferBlockForPlaybackTime(e);n||(n=this.ccb(e))&&(i=n.getMinCommonStartTime())}return i},e.prototype.getPlaybackTimesForBufferBlock=function(e,t){var i=this,n=this.getBufferBlock(e);return t.map(function(e){var t=new c.FilterIterator(i.getAllSegmentsFromBufferBlock(n,e),function(e){return!e.isInit()});return t.hasNext()?t.next().getPlaybackTime():-1/0})},e.prototype.hasStartedLoadingNextBufferBlock=function(e){var t=this.getNextBufferBlock(e);return!!t&&this.hasDataSegmentsForBufferBlock(t)},e.prototype.shouldSwitchBufferBlock=function(e,t){return!(0,g.areBufferBlocksEqual)(e,this.getBufferBlock(t))},e.prototype.getSegmentStoreRangesMap=function(e,t){var i={};return t.forEach(function(e){return i[e]=[]}),this.getFutureBufferBlocks(this.getCurrentBufferBlockId()).map(function(e){return e.getId()}).concat(1/0).map(function(t){return(0,o.getBufferBlockLoadedRanges)(e,t)}
14).forEach(function(e){return Object.keys(e).forEach(function(t){return i[t].push(e[t])})}),i},e}();t.SegmentStore=y},77264:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Segregation=void 0,t.areSegregationCriteriaEqual=c,t.canReuseSourceBuffer=function(e,t,i){var o=function(){return(0,r.getCapabilities)().isTizen?g:(0,r.getCapabilities)().isLegacyEdge?y:(0,r.getCapabilities)()[n.CapabilityKey.isEdge]?m:(0,r.getCapabilities)()[n.CapabilityKey.isWebOS]?v:(0,r.getCapabilities)()[n.CapabilityKey.isPlayStation4]?p:(0,r.getCapabilities)()[n.CapabilityKey.isPlayStation5]?f:h}();return i.every(function(i){var n=i.mimeType;return o.canReuseSourceBuffers(e,t,n)})};var n=i(7387),r=i(21513),o=i(34047),a=i(85434),s=i(15487),l=i(90685);function c(e,t,i){return void 0===i&&(i=[]),Object.keys(e).filter(function(e){return!i.includes(e)}).every(function(i){return t&&t[i]===e[i]})}function u(e,t){var i=e.getMediaTypes().find(function(e){return e.mimeType===t});return i?i.timescale:0}function d(e,t,i){return{currentCriteria:e.getSegregationCriteria(i),nextCriteria:t.getSegregationCriteria(i)}}t.Segregation=function(){function e(e,t){this.requiredMediaTypes=e,this.settings=t,this.requiredMediaTypes=e}return e.prototype.fcb=function(e){var t;return!!(null!=(t=this.requiredMediaTypes[e.getPeriodId()])&&t[e.getMimeType()])},e.prototype.gcb=function(e,t){var i=this;if(void 0!==t.getSegmentInfo().discontinuitySequenceNumber)return!0;if(!this.fcb(t))return!1;var n=t.getPeriodId(),r=Object.keys(this.requiredMediaTypes[n]||{}).filter(function(e){return a.MimeTypeHelper.isAV(e)});return e.length===r.length&&e.every(function(e){var t;return null==(t=i.requiredMediaTypes[n])?void 0:t[e.mimeType]})},e.prototype.getSegregationCriteria=function(e){var t,i={encryption:function(e){return e.isEncrypted()?l.EncryptionState.Encrypted:l.EncryptionState.Clear}(e),codec:o.CodecStringHelper.extractCodec(e.getCodec())};if(this.settings.HLS_CLEAR_BUFFERS_ON_DISCONTINUITY_SWITCHES){var n=null==(t=e.getSegmentInfo())?void 0:t.discontinuitySequenceNumber;null!=n&&(i.discontinuityNumber=n)}return(this.settings.DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES||(0,s.isTizen2016)())&&(i.periodId=e.getPeriodId()),i},e.prototype.canAddSegmentToBufferBlock=function(e,t,i){var n,r=t.getMediaTypes();if(0===r.length)return!0;if(!this.gcb(r,e))return!1;var o=e.getMimeType(),a=t.getSegregationCriteria(o);if(a)return c(i,a);var s=null==(n=r.find(function(e){return e.mimeType!==o}))?void 0:n.mimeType;return!s||c(i,t.getSegregationCriteria(s),["codec","encryption"])},e}();var h={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i);return b(n.currentCriteria,n.nextCriteria)}},p={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i),r=n.currentCriteria,o=n.nextCriteria;return b(r,o)&&S(r,o)&&_(r,o)&&function(e,t){return(null==e?void 0:e.periodId)===(null==t?void 0:t.periodId)}(r,o)&&E(e,t,i)}},f={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i),r=n.currentCriteria,o=n.nextCriteria;return b(r,o)&&S(r,o)&&E(e,t,i)}},m={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i),r=n.currentCriteria,o=n.nextCriteria;return b(r,o)&&S(r,o)}},g={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i),r=n.currentCriteria,o=n.nextCriteria;return!(0,s.isTizen2017)()&&b(r,o)&&S(r,o)&&E(e,t,i)}},v={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i),r=n.currentCriteria,o=n.nextCriteria,a=b(r,o)&&E(e,t,i)&&!_(r,o);return((0,s.isWebOs2017)()||(0,s.isWebOs2016)())&&(a=a&&S(r,o)),a}},y={canReuseSourceBuffers:function(e,t,i){return!1}};function b(e,t){return(null==e?void 0:e.codec)===(null==t?void 0:t.codec)}function S(e,t){return(null==e?void 0:e.encryption)===(null==t?void 0:t.encryption)}function _(e,t){return(null==e?void 0:e.discontinuityNumber)===(null==t?void 0:t.discontinuityNumber)}function E(e,t,i){return u(e,i)===u(t,i)}},14302:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractUpdater=t.REPRESENTATION_UPDATE_CANCEL=void 0,t.calculateUpdateDelayInMillis=c;var n=i(80813),r=i(3714),o=i(34841),a=i(89927),s=i(88844);t.REPRESENTATION_UPDATE_CANCEL="CANCEL";var l=function(){function e(e,t){var i=this;this.context=e,this.updateCallbacks=t,this.yQ=function(){var e,t;(null==(e=i.xQ)?void 0:e.hasSettled)===!1&&(i.context.logger.debug("Scheduling delayed manifest update as playback has started"),null==(t=i.xQ)||t.resolve(),i.xQ=void 0)},this.EQ=function(e){i.FQ(e),i.clearTimeout()},this.GQ=function(e){i.success(e),i.clearTimeout(),i.wQ||i.scheduleUpdate()},this.wQ=!1,e.eventHandler.on(r.PlayerEvent.Playing,this.yQ,!0)}return e.prototype.cancel=function(){var e;this.uQ&&(this.uQ.reject(t.REPRESENTATION_UPDATE_CANCEL),this.updateCallbacks.error(t.REPRESENTATION_UPDATE_CANCEL),null==(e=this.xQ)||e.reject(t.REPRESENTATION_UPDATE_CANCEL),this.xQ=void 0),this.clearTimeout()},e.prototype.clearTimeout=function(){(0,s.clearTimeoutIfDefined)(this.vQ),this.vQ=null},e.prototype.stop=function(){null!==this.vQ&&(this.wQ=!0,this.cancel())},e.prototype.start=function(){this.wQ=!1,this.scheduleUpdate()},e.prototype.scheduleUpdate=function(e){void 0===e&&(e=!1),this.vQ||this.wQ||this.zQ(e)},e.prototype.zQ=function(e){var t=this,i=c(this.getLastReloadTimestamp(),this.getReloadIntervalInSeconds());if(!(i>
vendor: 4,211 bytes, line 14
140x7fffffff)){var n=new o.Deferred,r={isForcedUpdate:e,wasInvalidated:function(){return n!==t.uQ}};n.promise.catch(function(){}),this.uQ=n,this.vQ=window.setTimeout(function(){return t.AQ(r)},i)}},e.prototype.AQ=function(e){var t=this;this.BQ(e.isForcedUpdate).then(function(){return t.update()}).then(function(i){e.wasInvalidated()||t.GQ(i)}).catch(function(i){e.wasInvalidated()||t.EQ(i)})},e.prototype.BQ=function(e){var t;return!(null!=(t=this.context.settings)&&t.POSTPONE_MANIFEST_UPDATES_UNTIL_PLAYBACK_START)||e||!function(e){var t,i;return(null==(i=null==(t=null==e?void 0:e.serviceManager)?void 0:t.get(n.ServiceName.PlayerStateService))?void 0:i.isPlay())===!0}(this.context)||this.DQ()?Promise.resolve():(this.context.logger.debug("Delaying manifest update until playback has started"),this.xQ=this.xQ||new o.Deferred,this.xQ.promise)},e.prototype.CQ=function(){return this.context.serviceManager.get(n.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier)},e.prototype.DQ=function(){var e,t,i;return null==(i=null==(t=null==(e=this.CQ())?void 0:e.getState())?void 0:t.hls)?void 0:i.isLowLatencyPlaylist},e.prototype.FQ=function(e){this.uQ.reject(e),this.updateCallbacks.error(e)},e.prototype.success=function(e){this.uQ.resolve(e),this.updateCallbacks.success(e)},e.prototype.dispose=function(){this.context.eventHandler.off(r.PlayerEvent.Playing,this.yQ,!0)},Object.defineProperty(e.prototype,"isStopped",{get:function(){return this.wQ},enumerable:!1,configurable:!0}),e.prototype.getPayload=function(){return this.uQ.promise},e}();function c(e,t){if(isNaN(t))return 0;var i=(0,a.toSeconds)(Date.now()-e);return i>=t?0:(0,a.toMilliSeconds)(t-i)}t.AbstractUpdater=l},87222:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.findAdaptationSetOfMimeType=function(e,t,i){void 0===i&&(i={});var n,r=i.sourceState,o=i.langObj,c=i.periodSwitched,d=s(e,r),h=u(t,e);return d&&(n=l(h,d,o,c)),!n&&r&&(n=l(h,a(e,r),o,c)),n||h[0]},t.getHlsDefaultLanguage=a,t.getPreferredLanguage=s,t.findAdaptationSetsForMimeType=u;var n=i(85434),r=i(88052),o=i(62756);function a(e,t){var i;if(r.ModuleManager.has(o.ModuleName.HLS)){var a=r.ModuleManager.get(o.ModuleName.HLS).selectors,s=a.getHlsState,l=a.getDefaultLanguages,c=s(t),u=c?l(c):void 0;if(u){var d=null==(i=n.MimeTypeHelper.getMediaType(e))?void 0:i.toUpperCase();return d?u[d]:void 0}}}function s(e,t){var i=t&&a(e,t),n={language:navigator.language||navigator.userLanguage||(null==i?void 0:i.language)};return n.language&&i&&c(n.language,i.language)&&(n.name=i.name),n}function l(e,t,i,n){if(void 0===n&&(n=!1),0!==e.length){var r=void 0;if(i&&(r=function(e,t,i){var n=e.find(function(e){return e._lang&&t.lang&&e._lang===t.lang}),r=e.find(function(e){return t.adaptationSetId&&e._internalId.equals(t.adaptationSetId)});return r=r||e.find(function(e){return t.id===e._internalId.adaptationSetId}),i?n||r:r||n}(e,i,n)),r)return r;if(t&&t.language){var o=e.filter(function(e){return!(!e._lang||null==e._lang)&&c(e._lang,t.language)});return o.find(function(e){return e.Representation.find(function(e){return e._name===t.name})})||o[0]}}}function c(e,t){return!!(null!=e&&e.includes(t)||null!=t&&t.includes(e))}function u(e,t){return e.AdaptationSet.filter(function(e){return e._mimeType===t||e.Representation.find(function(e){return e._mimeType===t})})}},47151:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationSetId=void 0,t.createAdaptationSetIdFromMimeTypeAndIndex=function(e,t,i){return new r(e,"".concat(t,"-").concat(i))};var r=function(e){function t(t,i){var n=e.call(this,t)||this;return n.ib=i,n}return n(t,e),Object.defineProperty(t.prototype,"adaptationSetId",{get:function(){return this.ib}
14,enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.adaptationSetId===(null==t?void 0:t.adaptationSetId)},t.prototype.key=function(){return e.prototype.key.call(this)+"-"+this.adaptationSetId},t}(i(16197).PeriodId);t.AdaptationSetId=r},92778:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DashSchemeUri=void 0,function(e){e.AudioChannelConfig="urn:mpeg:dash:23003:3:audio_channel_configuration:2011"}(i||(t.DashSchemeUri=i={}))},23940:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MPDExtractor=void 0,t.stripUnderscorePrefix=g,t.applyProperties=v,t.representationToQuality=y,t.getMinimumUpdatePeriodInSeconds=function(e){return(null==e?void 0:e._minimumUpdatePeriod)==null?1/0:s.DurationConverter.getDurationInSec(e._minimumUpdatePeriod)},t.getContentTypeFromMimeTypeAndCodecs=S;var n=i(80813),r=i(44468),o=i(77179),a=i(34047),s=i(52424),l=i(85434),c=i(89927),u=i(70850),d=i(88052),h=i(62756),p=i(59707),f=i(62198),m=i(92778);function g(e){return 0===e.indexOf("_")?e.substring(1):e}function v(e,t,i){return void 0===i&&(i=[]),Object.keys(e).filter(function(e){return 0===i.length||i.indexOf(e)>-1}).forEach(function(i){t[g(i)]=e[i]}),t}function y(e,t,i){if(!e)return null;var n={id:e._id?String(e._id):null,bitrate:e._bandwidth||0},r=a.CodecStringHelper.getExtractedCodecStrings(e._codecs||i);return!function(e){return l.MimeTypeHelper.isAudio(e)}(t)?!function(e){return l.MimeTypeHelper.isVideo(e)}(t)?(n.label=e._label||b(n.bitrate),n):function(e,t,i){e.width=t._width||0,e.height=t._height||0,i.video&&(e.codec=i.video),t.hasOwnProperty("_frameRate")&&(e.frameRate=t._frameRate);var n=b(e.bitrate);return e.width&&e.height&&(n="".concat(e.width,"x").concat(e.height,", ").concat(n)),e.label=t._label||n,e}(n,e,r):function(e,t,i){i.audio&&(e.codec=i.audio);var n,r,o=null==(r=null==(n=t.AudioChannelConfiguration)?void 0:n.find(function(e){var t=e._schemeIdUri,i=e._value;return t===m.DashSchemeUri.AudioChannelConfig&&void 0!==i}))?void 0:r._value;return o&&(e.channels=parseInt(o)),e.label=t._label||b(e.bitrate),e}(n,e,r)}function b(e){return"".concat(Math.round(e/1e3),"kbps")}function S(e,t){return"".concat(e,'; codecs="').concat(t,'"')}function _(e,t){for(var i=function(t){-1===e.findIndex(function(e){return e.contentType===t.contentType})&&e.push(t)},n=0,r=t;n<r.length;n++)i(r[n])}t.MPDExtractor=function(){function e(e,t){var i=this;this.isLive=function(){var e;return(null==(e=i.BE())?void 0:e._type)==="dynamic"},this.vE=e,this.wE=t,this.xE=e.settings,this.zE=!1,this.yE=e.serviceManager.get(n.ServiceName.SynchronizedTimeService,this.wE.sourceIdentifier),this.AE=e.serviceManager.get(n.ServiceName.SourceStoreService,this.wE.sourceIdentifier)}return e.prototype.BE=function(){var e;return(0,f.getManifest)(null==(e=this.AE)?void 0:e.getState())},e.prototype.CE=function(){var e,t;return null!=(t=null==(e=this.BE())?void 0:e.Period)?t:[]},e.prototype.DE=function(e){var t=this.CE().find(function(t){return t._id===e});return t?t.AdaptationSet:[]},e.prototype.adjustPeriodStartTimes=function(){var e,t,i,n=null==(e=this.AE)?void 0:e.getState();if(n&&!this.zE&&!(null!=(t=this.BE())&&t._isHls)){var r=this.isLive()?(0,c.toSeconds)(this.getAvailabilityStartTime()):(0,o.getStartTimeOffset)(n);null==(i=this.AE)||i.dispatch((0,p.adjustPeriodStartTimes)(r)),this.zE=!0}},e.prototype.getAvailabilityStartTime=function(){var e;return this.isLive()&&null!=(e=this.BE())&&e._availabilityStartTime?u.Util.getUtcDate(this.BE()._availabilityStartTime).getTime()-this.EE():0},e.prototype.getAvailabilityEndTime=function(){var e;return null!=(e=this.BE())&&e.hasOwnProperty("_availabilityEndTime")?new Date(u.Util.getUtcDate(this.BE()._availabilityEndTime).getTime()-this.EE()):null},e.prototype.EE=function(){return this.yE?this.yE.getTimeDifference():0},e.prototype.getType=function(){var e;return null==(e=this.BE())?void 0:e._type},e.prototype.getDuration=function(){var e;return null==(e=this.BE())?void 0:e._mediaPresentationDuration},e.prototype.getRequestTimestamp=function(){var e;return null==(e=this.BE())?void 0:e._requestTimestamp},e.isValueWithinBounds=function(e,t,i){return!e||e>=t&&e<=i},e.prototype.FE=function(t){var i=e.isValueWithinBounds(t.width,this.vE.config.adaptation.resolution.minSelectableVideoWidth,this.vE.config.adaptation.resolution.maxSelectableVideoWidth),n=e.isValueWithinBounds(t.height,this.vE.config.adaptation.resolution.minSelectableVideoHeight,this.vE.config.adaptation.resolution.maxSelectableVideoHeight),r=e.isValueWithinBounds(t.bitrate,this.xE.MIN_SELECTABLE_VIDEO_BITRATE,this.xE.MAX_
vendor: 9,460 bytes, line 14
14SELECTABLE_VIDEO_BITRATE);return i&&n&&r},e.prototype.GE=function(t){return e.isValueWithinBounds(t.bitrate,this.xE.MIN_SELECTABLE_AUDIO_BITRATE,this.xE.MAX_SELECTABLE_AUDIO_BITRATE)},e.prototype.HE=function(e,t){var i=this;if(!e)return[];var n=t.filter(function(t){return l.MimeTypeHelper.isVideo(e)&&i.FE(t)||l.MimeTypeHelper.isAudio(e)&&i.GE(t)});return n.length<1&&t.length>0?t:n},e.prototype.IE=function(e){if(!e)return[];var t=e.Representation.map(function(t){return y(t,e._mimeType,e._codecs)});return this.xE.EXCLUDE_DISALLOWED_REPRESENTATIONS&&(t=this.HE(e._mimeType,t)),t},e.prototype.getAudioQualities=function(e){var t=this,i=this.KE(e);return i?this.DE(i).reduce(function(e,i){return i._mimeType&&l.MimeTypeHelper.isAudio(i._mimeType)&&(e[i._internalId.adaptationSetId]=t.IE(i)),e},{}):{}},e.prototype.getVideoQualities=function(e){var t=this.KE(e);if(!t)return[];var i=this.DE(t).find(function(e){return e._mimeType&&l.MimeTypeHelper.isVideo(e._mimeType)});return i?this.IE(i):[]},e.prototype.getLangObjectFromAdaptationSet=function(e,t,i){var n={id:null,lang:null,adaptationSetId:null,kind:null,label:"off",url:null},r=e._mimeType&&e._mimeType.indexOf(t)>-1,o=i&&e._mimeType.indexOf(i)>-1;return l.MimeTypeHelper.isSubtitle(t)&&(n.kind="subtitle"),e.Role&&e.Role.length>0&&(n.role=e.Role.map(function(e){return v(e,{})})),(r||o)&&(v(e,n,["_lang","_isFragmented"]),n.lang=n.lang||"und",n.label=e._label||n.lang,n.adaptationSetId=e._internalId,n.id=e._internalId.adaptationSetId,n.metadata=this.JE(e)),n},e.prototype.JE=function(e){var t;if(null!=(t=e.SupplementalProperty)&&t.length)return e.SupplementalProperty.map(function(e){return{schemeIdUri:e._schemeIdUri,value:e._value,id:e._id}})},e.prototype.toSubtitleTrack=function(e,t,i){var n,r=this.getLangObjectFromAdaptationSet(e,t,i),o={id:r.id,lang:r.lang,kind:r.kind,isFragmented:null!=(n=r.isFragmented)&&n,isSideloaded:!1,enabled:!1,label:r.label};return null!=r.role&&(o.role=r.role),null!=r.metadata&&(o.metadata=r.metadata),o.forced=function(e,t){var i,n;return!!(null!=(i=e.role)&&i.some(function(e){return e.value&&["forced_subtitle","forced-subtitle"].includes(e.value)}))||!!(null!=(n=null==t?void 0:t._hls)&&n.isForced)}(o,e.Representation[0]),o},e.prototype.getAvailableSubtitles=function(e){var t=this,i=0;return(e=this.KE(e))?this.DE(e).filter(function(e){return l.MimeTypeHelper.isSubtitle(e._mimeType)}).map(function(e){var n=t.toSubtitleTrack(e,"application","text");return n.id||(i++,n.id="sub_".concat(i)),n}):[]},e.prototype.getClosedCaptionLabels=function(e){return(e=this.KE(e))?this.DE(e).filter(function(e){return e.ClosedCaptionLabels}).flatMap(function(e){return Object.keys(e.ClosedCaptionLabels).map(function(t){var i=e.ClosedCaptionLabels[t];return{id:t,kind:"captions",lang:i.lang||"unknown",label:i.label||"Captions (".concat(t,")")}})}):[]},e.prototype.getAvailableAudio=function(e,t){var i=this;void 0===t&&(t=!0);var n=this.KE(e);if(!n)return[];var o=this.DE(n),a=0,s=o.filter(function(e){return l.MimeTypeHelper.isAudio(e._mimeType)}).map(function(e){var t=i.getLangObjectFromAdaptationSet(e,r.MediaType.Audio);return t&&"off"!==t.label?(t.id||(t.id="audio_"+a,a++),t):null});if(t){var c=o.find(function(e){return l.MimeTypeHelper.isVideo(e._mimeType)});if(c&&c.ContentComponent){var u=c.ContentComponent.filter(function(e){return e._contentType===r.MediaType.Audio}).map(function(e){return{id:e._id,lang:e._lang,label:e._id,adaptationSetId:c._internalId}});s=s.concat(u)}}return s.filter(function(e){return e})},e.prototype.getAvailableVideo=function(e){var t=this.KE(e);if(!t)return[];var i=this.DE(t).find(function(e){return l.MimeTypeHelper.isVideo(e._mimeType)});return i?[this.getLangObjectFromAdaptationSet(i,r.MediaType.Video)]:[]},e.getContentProtectionForManifestElement=function(e){var t;return null!=(t=null==e?void 0:e.ContentProtection)&&t.length&&d.ModuleManager.has(h.ModuleName.DRM)?d.ModuleManager.get(h.ModuleName.DRM).ContentProtectionHelper.parseContentProtectionDescriptors(e.ContentProtection):[]},e.getContentProtectionForAdaptationSet=function(t){for(var i=[],n=0;n<t.Representation.length;n++)i=i.concat(e.getContentProtectionForManifestElement(t.Representation[n]));return i.concat(e.getContentProtectionForManifestElement(t))},e.prototype.getTimeShiftBufferDepthSeconds=function(){if(this.isLive()){var e=this.BE()._timeShiftBufferDepth,t=(0,c.toSeconds)(Date.now()-this.getAvailabilityStartTime());return e===-1/0?-t:Math.max(e,-t)}return 0},e.getCurrentAndSuccessorPeriod=function(e,t){for(var i=[null,0,null],n=i[0],r=i[1],o=i[2];r<e.length;r++)if(e[r]._id===t){n=e[r],o=e[r+1]||null;break}return[n,o]},e.prototype.getPeriodDuration=function(t,i){i=i??this.CE();var n,r=e.getCurrentAndSuccessorPeriod(i,t),o=r[0],a=r[1];if(o&&o._duration)return s.DurationConverter.getDurationInSec(o._duration);if(o&&o.start&&a&&a.start)return a.start-o.start;if(null!=(n=this.BE())&&n._mediaPresentationDuration){var l=s.DurationConverter.getDurationInSec(this.BE()._mediaPresentationDuration);if(!isNaN(l))return l}return 1/0},e.prototype.getDRMCapabilitiesForPeriod=function(e){if(!(e=this.KE(e)))return[[],[]];var t=this.CE().find(function(t){return t._id===e});return this.getDRMCapabilitiesFromPeriod(t)},e.prototype.getDRMCapabilitiesFromPeriod=function(t){for(var i=[],n=[],r=0,o=t.AdaptationSet;r<o.length;r++){var a=o[r],s=a._mimeType,c=e.getMimeTypeCodecStringForAdaptationSet(a);l.MimeTypeHelper.isVideo(s)?_(n,c):l.MimeTypeHelper.isAudio(s)&&_(i,c)}return[i,n]},e.prototype.dispose=function(){this.xE=null},e.getMimeTypeCodecStringForAdaptationSet=function(t){for(var i=[],n=0,r=t.Representation;n<r.length;n++){var o=r[n],a=e.getAttributeFromRepresentationOrAdaptationSet("_codecs",o,t),s=t._mimeType;if(t._mimeType&&a){var l=S(s,a);i.push({contentType:l})}}return i},e.getAttributeFromRepresentationOrAdaptationSet=function(e,t,i){return t.hasOwnProperty(e)&&t[e]?t[e]:i.hasOwnProperty(e)&&i[e]?i[e]:null},e.prototype.KE=function(e){var t=this.CE();if(0===t.length)return this.vE.logger.warn("No periods available in the manifest"),null;if(t.find(function(t){return t._id===e}))return e;var i=t[t.length-1]._id;return this.vE.logger.debug("Period "+e+" not available - return last period ("+i+")"),i},e.prototype.getEventStreamEvents=function(e){var t=this;return e&&e.EventStream?e.EventStream.filter(function(e){return e.Event}).flatMap(function(i){var n,r=Number(null!=(n=i._timescale)?n:1);return t.LE(e.start,i,r)}):[]},e.prototype.LE=function(e,t,i){var n=this;return t.Event.map(function(r){var o={};if(o.startTime=(r._presentationTime||0)/i+e,r._duration){var a=r._duration/i;o.endTime=o.startTime+a}else o.endTime=o.startTime;return o.data=n.ME(r,t._schemeIdUri),o})},e.prototype.ME=function(e,t){var i=/<event[^>]*>(.*)(<\/event>|\/>)/g.exec(e.rawXmlRepresentation),n=void 0;i&&i.length>1&&(n=i[1]);var r={};return Object.getOwnPropertyNames(e).filter(function(e){return!["_presentationTime","_duration","__text"].some(function(t){return t===e})&&0===e.lastIndexOf("_",0)}).forEach(function(t){r[t.substring(1,t.length)]=e[t]}),{properties:r,content:n,schemeIdUri:t}},e}()},67580:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestCachingService=void 0;var n=i(58313);function r(e,t){t[e]||(t[e]={})}t.ManifestCachingService=function(){function e(){this.jb={}}return e.prototype.set=function(e,t,i){var o=n.URLHelper.toFullUrl(e);r(o,this.jb),this.jb[o][t]=i},e.prototype.uc=function(e,t){var i=n.URLHelper.toFullUrl(e);r(i,this.jb),this.jb[i].expire=t},e.prototype.get=function(e,t){var i=n.URLHelper.toFullUrl(t),r=this.jb[i];if(r&&function(e){return e>=Date.now()}(r.expire))return r[e];delete this.jb[i]},e.prototype.cacheHttpResponse=function(e,t,i){void 0===i&&(i=1/0),this.set(t,"httpResponse",e),this.uc(t,i)},e.prototype.cacheParsedManifest=function(e,t,i){void 0===i&&(i=1/0),this.set(t,"parsedManifest",e),this.uc(t,i)},e.prototype.cacheSegmentList=function(e,t,i){void 0===i&&(i=1/0),this.set(t,"segmentList",e),this.uc(t,i)},e.prototype.getHttpResponse=function(e){return this.get("httpResponse",e)},e.prototype.getParsedManifest=function(e){return this.get("parsedManifest",e)},e.prototype.getSegmentList=function(e){return this.get("segmentList",e)},e.prototype.clear=function(){this.jb={}},e.prototype.dispose=function(){this.jb={}},e}()},23901:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createManifestLoadingService=c,t.initializeManifestLoadingService=function(e,t,i){var n=e.serviceManager,r=t.sourceIdentifier;if(!n.has(o.ServiceName.ManifestLoadingService,r)){var a=c(i,e,t);n.set(o.ServiceName.ManifestLoadingService,a,r)}};var n=i(40306),r=i(3336),o=i(80813),a=i(44468),s=i(88052),l=i(62756);function c(e,t,i){switch(e.type){case a.StreamType.Dash:return new(s.ModuleManager.get(l.ModuleName.DASH)).MPDLoader(t,i);case a.StreamType.Hls:return new(s.ModuleManager.get(l.ModuleName.HLS)).M3u8Loader(t,i);case a.StreamType.Smooth:return new(s.ModuleManager.get(l.ModuleName.Smooth)).SmoothStreamingLoader(t,i);default:throw new r.PlayerError(n.ErrorCode.SOURCE_INVALID,{given:e.type,supported:"dash, hls, smooth"},"The provided stream type is not supported by the player.",i.sourceIdentifier)}}},13422:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
14Object.defineProperty(t,"__esModule",{value:!0}),t.orderAdaptationSetsByCodec=function(e,t){return(e=n({},e)).Period=e.Period.map(function(e){if(!e.AdaptationSet)return n({},e);var i=function(e){return e.reduce(function(e,t){var i=l(t);return r.MimeTypeHelper.isVideo(i)?e.videoSets.push(t):r.MimeTypeHelper.isAudio(i)?e.audioSets.push(t):e.otherSets.push(t),e},{videoSets:[],audioSets:[],otherSets:[]})}(e.AdaptationSet),o=i.videoSets,s=i.audioSets,c=i.otherSets,u=a(o,t.video),d={};return s.forEach(function(e){var t=e._lang||"none";d[t]=d[t]||[],d[t].push(e)}),Object.keys(d).forEach(function(e){u=u.concat(a(d[e],t.audio))}),n(n({},e),{AdaptationSet:u.concat(c)})}),e},t.sortAdaptationSetsByBestCodec=a,t.getCodecsFromAdaptationSet=s,t.getMimeTypeForAdaptationSet=l,t.removeRepresentations=function(e,t){if(!(e.Period&&e.Period.length>0)||0===t.length)return e;var i=e.Period.map(function(e){return function(e,t){var i=e.AdaptationSet.map(function(e){return function(e,t,i){var r=t.Representation.filter(function(t){return!i.some(function(i){return i.equals(new o.RepresentationId(e,t._id))})});return n(n({},t),{Representation:r})}(e._internalId,e,t)}).filter(function(e){return e.Representation.length>0});return n(n({},e),{AdaptationSet:i})}(e,t)}).filter(function(e){return e.AdaptationSet.length>0});return n(n({},e),{Period:i})};var r=i(85434),o=i(79505);function a(e,t){var i=function(e){for(var i=0;i<t.length;i++)if(0===e.indexOf(t[i]))return i;return t.length+1};return e.sort(function(e,t){return i(s(e))-i(s(t))})}function s(e){var t;if((null==(t=null==e?void 0:e._codecs)?void 0:t.length)>0)return e._codecs;if(e.Representation&&e.Representation.length>0){var i=e.Representation[e.Representation.length-1];if(i._codecs)return i._codecs}return""}function l(e){if(e._mimeType)return e._mimeType;if(Array.isArray(e.Representation)){var t=e.Representation.find(function(e){return e._mimeType});if(t)return t._mimeType}return""}},96533:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestService=void 0,t.initializeInternalIds=F,t.addDrmKidsToRepresentations=B,t.iterateAdaptationSets=V,t.getNearestPeriodForTime=j,t.findLowestPossibleBandwidthFromRepresentations=function(e,t){return void 0===t&&(t=-1/0),e.reduce(function(e,i){return i._bandwidth>=t?Math.min(e,i._bandwidth):e},1/0)},t.getMatchingRepresentationsByBandwidth=z,t.getMatchingRepresentationByBandwidth=H,t.getCodecPriorities=q,t.getCodecOfAdaptationSetMimeType=W,t.getManifestService=function(e,t){var i,n=t??(null==(i=e.sourceContext)?void 0:i.sourceIdentifier);if(n)return e.serviceManager.get(l.ServiceName.ManifestService,n)},t.initializeManifestService=function(e,t){var i,n=e.serviceManager,r=t.sourceIdentifier;if(n.has(l.ServiceName.ManifestService,r))null==(i=n.get(l.ServiceName.ManifestService,r))||i.restore();else{var o=new U(e,t);n.set(l.ServiceName.ManifestService,o,r)}};var a=i(40306),s=i(3336),l=i(80813),c=i(56481),u=i(3714),d=i(90408),h=i(25811),p=i(48488),f=i(30012),m=i(20649),g=i(88847),v=i(94685),y=i(74853),b=i(34047),S=i(52424),_=i(85434),E=i(15014),T=i(89927),w=i(23068),A=i(88052),P=i(62756),I=i(59707),C=i(62198),M=i(90919),R=i(87222),k=i(471
1451),x=i(13422),O=i(23940),D=i(16197),L=i(79505),N="Outdated",U=function(e){function t(t,i){var n=e.call(this,{onRestore:function(){return n.lD()}})||this;n.context=t,n.dD=0,n.kD=function(e){var t=n.getAdaptationSet(e._internalId);if(t){var i=function(t){n.context.eventHandler.dispatchEvent(t,{quality:{id:e._id,bitrate:e._bandwidth}})};_.MimeTypeHelper.isAudio(t._mimeType)?i(u.PlayerEvent.AudioQualityRemoved):_.MimeTypeHelper.isVideo(t._mimeType)&&i(u.PlayerEvent.VideoQualityRemoved)}},n.qD=function(e){(e.Representation||[]).forEach(function(t){e._codecs&&!t._codecs&&(t._codecs=e._codecs),e._width&&!t._width&&(t._width=e._width),e._height&&!t._height&&(t._height=e._height)}),delete e.SegmentTemplate},n.VD=i,n.UD=t.settings,n.ZD=[];var r=n.VD.sourceIdentifier;return n.aD=t.serviceManager.get(l.ServiceName.SynchronizedTimeService,r),n.WD=t.serviceManager.get(l.ServiceName.SourceStoreService,r),n}return n(t,e),Object.defineProperty(t.prototype,"eD",{get:function(){return this.YD||(this.YD=new O.MPDExtractor(this.context,this.VD)),this.YD},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fD",{get:function(){var e;return(0,C.getManifest)(null==(e=this.WD)?void 0:e.getState())},enumerable:!1,configurable:!0}),t.prototype.gD=function(e){this.WD.dispatch((0,I.setManifestAction)(this.preProcessManifest(e)))},t.prototype.updateManifest=function(e){var t=this;this.dD++;var i=this.dD;return this.DD(e).then(function(){return t.hD(i),t.iD(e)}).then(function(){t.hD(i),t.jD(e)}).catch(function(e){if(e!==N)throw e;t.context.logger.debug("Skipping manifest update, since a newer manifest is available")})},t.prototype.hD=function(e){if(e!==this.dD)throw N},t.prototype.iD=function(e){var t,i,n=this,r=null==(t=this.context.serviceManager)?void 0:t.get(l.ServiceName.DrmService),o=null==(i=this.context.serviceManager)?void 0:i.get(l.ServiceName.DrmDetectorService);return r&&o&&null!=e&&e.Period?r.getUsedOrEarlyResolvedKeySystemUid().then(function(t){if(t){var i=function(e,t){var i=[],n=[];return e.Period.forEach(function(e){var r=t.getDRMCapabilitiesFromPeriod(e);i=i.concat(r[0]),n=n.concat(r[1])}),{audioCapabilities:i,videoCapabilities:n}}(e,n.eD),r=i.audioCapabilities,a=i.videoCapabilities;return o.getSupportedCapabilities(t,r,a).then(function(t){return function(e,t,i){e.Period.forEach(function(e){e.AdaptationSet=e.AdaptationSet.filter(function(n){return n.Representation=n.Representation.filter(function(r){var o=e.ContentProtection||n.ContentProtection,a=(null==o?void 0:o.length)>0,s=(0,O.getContentTypeFromMimeTypeAndCodecs)(r._mimeType,r._codecs),l=function(e,t,i){return _.MimeTypeHelper.isAudio(e)?!!t.find(function(t){return t.contentType===e}):!_.MimeTypeHelper.isVideo(e)||!!i.find(function(t){return t.contentType===e})}(s,t.audioCapabilities,t.videoCapabilities);return a&&!l&&i.debug("Representation not supported by MediaKeySystem (".concat(s,")")),!a||l}),!_.MimeTypeHelper.isAV(n._mimeType)||n.Representation.length>0})})}(e,t,n.context.logger)})}}):Promise.resolve()},t.prototype.jD=function(e){if((0,v.isContextAvailable)(this.context)&&this.context.serviceManager){if(this.BD(),e.isInitialized=!1,this.gD(e),this.isLive()){var t=this.getFirstPeriod(),i=this.isHlsManifest()&&t?t.start:(0,T.toSeconds)(this.getAvailabilityStartTime());this.WD.dispatch((0,f.setStartTimeOffset)(i))}this.eD.adjustPeriodStartTimes();var n=this.yD();(0,d.maybeFireDurationChangedEvent)(this.XD,n,this.context.eventHandler),this.XD=n,this.uD(!0),this.context.serviceManager.maybeCall(l.ServiceName.HeartbeatService,function(e){return e.beat()},void 0,this.VD.sourceIdentifier)}},t.prototype.excludeRepresentations=function(e){var t=this,i=e.map(function(e){return t.getRepresentationById(e)}).filter(function(e){return!!e});this.uD(!1);
vendor: 5,276 bytes, line 14
14var n=Y(this.getAllPeriods());this.ZD=y.ArrayHelper.union(this.ZD,e),this.WD.dispatch((0,I.removeRepresentationsAction)(this.ZD));var r=Y(this.getAllPeriods());return Object.keys(n).every(function(e){return null!=r[e]&&n[e].length===r[e].length})?(this.BD(),i.forEach(this.kD),this.uD(!0),!0):(this.context.eventHandler.fireError(new s.PlayerError(a.ErrorCode.SOURCE_ERROR,void 0,"No playable track left",this.VD.sourceIdentifier)),!1)},t.prototype.isRepresentationExcluded=function(e){return this.ZD.some(function(t){return t.equals(e)})},t.prototype.resetExcludedRepresentations=function(){this.ZD=[]},t.prototype.lD=function(){this.vD(this.getManifest()),this.WD.dispatch((0,I.setManifestAction)(F(this.getManifest())))},t.getAdaptationSetSwitchingSupplementalProperties=function(e){return!e.SupplementalProperty||e.SupplementalProperty.length<=0?null:e.SupplementalProperty.filter(function(e){return"urn:mpeg:dash:adaptation-set-switching:2016"===e._schemeIdUri})},t.prototype.mD=function(e,t,i){var n=i&&i.length>0;if(!n&&!this.UD.ADAPTATION_SET_SWITCHING_WITHOUT_SUPPLEMENTAL_PROPERTY)return null;var r=[],o=e._group,a=W(e);return n&&i.forEach(function(e){e._value&&r.push.apply(r,e._value.split(","))}),this.UD.ADAPTATION_SET_SWITCHING_WITHOUT_SUPPLEMENTAL_PROPERTY&&t.forEach(function(e){r.includes(e._id)||r.push(e._id)}),t.filter(function(t){if(!r.includes(t._id)||t._id===e._id)return!1;var i=t._group===o,n=t._mimeType===e._mimeType,s=W(t)===a,l=t._lang===e._lang;return n&&s&&i&&l})},t.prototype.nD=function(e){var i=this;return e.AdaptationSet?e.AdaptationSet.reduce(function(n,r){var a=t.getAdaptationSetSwitchingSupplementalProperties(r),s=i.mD(r,e.AdaptationSet,a);return s&&0!==s.length?y.ArrayHelper.addAndMergeIntersects(n,o([r],s,!0)):n},[]):[]},t.mergeAdaptationSetProperties=function(e,t,i){var n=e.hasOwnProperty(i),r=t.hasOwnProperty(i);(n||r)&&(n?r||(t[i]=[]):e[i]=[],e[i]=e[i].concat(t[i]))},t.prototype.oD=function(e,t){return e.filter(function(e){return e.hasOwnProperty(t)}).map(function(e){return e[t]})},t.prototype.pD=function(e,t){var i=[e].concat(t),n=this.oD(i,"_minWidth"),r=this.oD(i,"_maxWidth"),o=this.oD(i,"_minHeight"),a=this.oD(i,"_maxHeight"),s=this.oD(i,"_minBandwidth"),l=this.oD(i,"_maxBandwidth");n.length>0&&(e._minWidth=Math.min.apply(null,n)),r.length>0&&(e._maxWidth=Math.max.apply(null,r)),o.length>0&&(e._minHeight=Math.min.apply(null,o)),a.length>0&&(e._maxHeight=Math.max.apply(null,a)),s.length>0&&(e._minBandwidth=Math.min.apply(null,s)),l.length>0&&(e._maxBandwidth=Math.max.apply(null,l))},t.prototype.rD=function(e,i){i.forEach(this.qD);var n=i.shift();i.forEach(function(e){["Representation","ContentComponent","ContentProtection","SupplementalProperty"].forEach(function(i){return t.mergeAdaptationSetProperties(n,e,i)})}),this.pD(n,i),e.AdaptationSet=e.AdaptationSet.filter(function(e){return!i.includes(e)})},t.prototype.sD=function(e){var t;null==(t=null==e?void 0:e.AdaptationSet)||t.forEach(function(e){var t;null==(t=null==e?void 0:e.Representation)||t.sort(function(e,t){return e._bandwidth-t._bandwidth})})},t.prototype.tD=function(e){var t=this;return e.Period.forEach(function(e){t.nD(e).forEach(function(i){t.rD(e,i)}),t.sD(e)}),e},t.prototype.setRepresentationDrmKid=function(e,t){this.WD.dispatch((0,I.setRepresentationDrmKidAction)(e,t))},t.prototype.getRepresentationDrmKid=function(e){var t;return null==(t=this.getRepresentationById(e))?void 0:t.associatedKid},t.prototype.uD=function(e){this.WD.dispatch((0,I.setManifestInitializedAction)(e))},t.prototype.vD=function(e){var t=this.VD.source.drm,i=function(e){return null==e.Period?[]:e.Period.filter(function(e){return e.AdaptationSet&&e.AdaptationSet.length>0}).reduce(function(e,t){return e.concat(t.AdaptationSet)},[]).filter(function(e){return e.ContentProtection&&e.ContentProtection.length>0}).flatMap(function(e){return e.ContentProtection}).filter(function(e){return null!=e.laurl&&e.laurl.length>0}).flatMap(function(e){return e.laurl.map(function(t){return r(r({},t),{drmType:h.DRMSchemeIDURIs[e._schemeIdUri]})})}).filter(function(e){return null!=e.drmType}).map(function(e){var t;return(t={})[e.drmType]={LA_URL:e._licenseUrl},t})}(e),n={};i.length>0&&(n=r({},i[0])),null!=t&&Object.keys(t).length>0&&Object.keys(t).forEach(function(e){n[e]=null!=n[e]?r(r({},n[e]),t[e]):t[e]}),this.wD(n);var o=Object.keys(n).length>0?(0,p.setManifestDrm)(n):(0,p.resetManifestDrm)();this.WD.dispatch(o)},t.prototype.wD=function(e){if(A.ModuleManager.has(P.ModuleName.DRM)&&Object.keys(e).length>0&&!this.context.serviceManager.has(l.ServiceName.DrmService)){var t=A.ModuleManager.get(P.ModuleName.DRM).DrmService;this.context.serviceManager.set(l.ServiceName.DrmService,new t(this.context))}this.context.serviceManager.maybeCall(l.ServiceName.DrmService,function(t){t.isDrmConfigSet()||t.setDrmConfig(e)})},t.prototype.xD=function(){var e=new Map;return this.getAllRepresentations().filter(function(e){return e._internalId&&e.associatedKid}).forEach(function(t){return e.set(t._internalId.key(),t.associatedKid)}),e},t.prototype.preProcessManifest=function(e){var t=this.xD();return e.Period&&e.Period.length>0?(B(e=(0,x.orderAdaptationSetsByCodec)(e,q(this.context.config,this.VD.source))),e=this.tD(e),A.ModuleManager.has(P.ModuleName.Envivio)&&
14(e=A.ModuleManager.get(P.ModuleName.Envivio).fixSegmentTimelineLiveStream(e)),this.isSuspended()||this.vD(e),e=F(e),function(e,t){e.Period.flatMap(function(e){var t;return null!=(t=null==e?void 0:e.AdaptationSet)?t:[]}).flatMap(function(e){var t;return null!=(t=null==e?void 0:e.Representation)?t:[]}).forEach(function(e){t.has(e._internalId.key())&&(e.associatedKid=t.get(e._internalId.key()))})}(e=(0,x.removeRepresentations)(e,this.ZD),t),e):(this.context.eventHandler.fireError(new s.PlayerError(a.ErrorCode.SOURCE_ERROR,void 0,"No playable track left",this.VD.sourceIdentifier)),null)},t.prototype.yD=function(){if(this.eD){var e=NaN,t=this.eD.getDuration();return t&&(this.bD&&this.bD===t?e=this.cD:(e=S.DurationConverter.getDurationInSec(t),this.bD=t,this.cD=e)),isNaN(e)&&this.isLive()?1/0:e}return 0},t.prototype.getDuration=function(){return this.XD},t.prototype.isLive=function(){return!!this.fD&&this.eD.isLive()},t.prototype.getAvailabilityStartTime=function(){return this.eD.getAvailabilityStartTime()},t.prototype.getAvailabilityEndTime=function(){return this.eD.getAvailabilityEndTime()},t.prototype.isAvailabilityEndTimeExceeded=function(){var e=this.getAvailabilityEndTime();return e&&Date.now()>e.getTime()},t.prototype.findPeriod=function(e){return(0,E.findPeriod)(this.fD,e)},t.prototype.getAllPeriods=function(){var e,t;return null!=(t=null==(e=this.fD)?void 0:e.Period)?t:[]},t.prototype.getPeriod=function(e){return e?this.findPeriod(e.periodId):null},t.prototype.isLanguageAvailable=function(e,t,i){var n=(0,E.findPeriod)(this.fD,e)||this.getFirstPeriod();return(0,R.findAdaptationSetsForMimeType)(n,t).some(function(e){var t=e._lang&&i.lang&&e._lang===i.lang,n=i.adaptationSetId&&e._internalId.equals(i.adaptationSetId);return t||n})},t.prototype.findAdaptationSet=function(e,t,i,n){void 0===n&&(n=!1);var r=(0,E.findPeriod)(this.fD,e)||this.getFirstPeriod();if(void 0!==r){var o=this.WD.getState(),a=(0,R.findAdaptationSetOfMimeType)(t,r,{sourceState:o,langObj:i,periodSwitched:n,playbackConfig:this.context.config.playback});return a||this.context.logger.debug("No AdaptationSet found to match mime type "+t),a}},t.prototype.getManifest=function(){return this.fD},t.prototype.getAvailableAudio=function(e,t){return this.eD.getAvailableAudio(e,t)},t.prototype.getAvailableVideo=function(e){return this.eD.getAvailableVideo(e)},t.prototype.getAvailableSubtitles=function(e){return this.eD.getAvailableSubtitles(e)},t.prototype.getClosedCaptionLabels=function(e){return this.eD.getClosedCaptionLabels(e)},t.prototype.getVideoRepresentations=function(e){return this.eD.getVideoQualities(e)},t.prototype.getAudioRepresentations=function(e){return this.eD.getAudioQualities(e)},t.prototype.getPeriodDuration=function(e,t){var i;return this.eD.getPeriodDuration(e,t??(null==(i=this.getManifest())?void 0:i.Period))},t.prototype.zD=function(e){var t,i;return this.isLastPeriod(e._id)?null!=(i=function(e){var t,i,n,r,o,a,s,l,c,u,d,h,p;return null!=e&&e.SegmentTemplate?null==(n=null==(i=null==(t=e.SegmentTemplate[0])?void 0:t.SegmentTimeline)?void 0:i[0])?void 0:n.totalDuration:null!=e&&e.SegmentList?null==(r=e.SegmentList[0])?void 0:r.totalDuration:null!=e&&e.Representation?null!=(u=null==(c=null==(l=null==(s=null==(a=null==(o=e.Representation[0])?void 0:o.SegmentTemplate)?void 0:a[0])?void 0:s.SegmentTimeline)?void 0:l[0])?void 0:c.totalDuration)?u:null==(p=null==(h=null==(d=e.Representation[0])?void 0:d.SegmentList)?void 0:h[0])?void 0:p.totalDuration:void 0}(e.AdaptationSet[0]))?i:1/0:null!=(t=e.duration)?t:this.getPeriodDuration(e._id)},t.prototype.hasMultiplePeriods=function(){return this.getAllPerio
14ds().length>1},t.prototype.hasSinglePeriod=function(){return 1===this.getAllPeriods().length},t.prototype.AD=function(){var e=this;return this.getAllPeriods().reduce(function(t,i){return t+e.zD(i)},0)},t.prototype.getTimeShiftBufferDepthSeconds=function(){var e=this.eD.getTimeShiftBufferDepthSeconds();return this.isHlsManifest()?e:Math.max(e,-this.AD())},t.prototype.getRequestTimestamp=function(){return this.eD.getRequestTimestamp()},t.prototype.getMediaPresentationDuration=function(){var e,t=S.DurationConverter.getDurationInSec(null==(e=this.fD)?void 0:e._mediaPresentationDuration);return isNaN(t)?0:t},t.prototype.calculateCumulativePeriodDuration=function(e){for(var t,i,n=0,r=0,o=null!=(i=null==(t=this.fD)?void 0:t.Period)?i:[];r<o.length;r++){var a=o[r];if(a._id===e)break;n+=this.getPeriodDuration(a._id)}return this.isLive()?(0,T.toSeconds)(Date.now()-this.getAvailabilityStartTime())-n:n},t.prototype.getMinimumUpdatePeriod=function(){return(0,O.getMinimumUpdatePeriodInSeconds)(this.fD)},t.prototype.getContentProtectionForAdaptationSet=function(e){return O.MPDExtractor.getContentProtectionForAdaptationSet(e)},t.prototype.getLangObjectFromAdaptationSet=function(e,t){return this.eD.getLangObjectFromAdaptationSet(e,t)},t.prototype.toSubtitleTrack=function(e,t){return this.eD.toSubtitleTrack(e,t)},t.prototype.getDRMCapabilitiesForPeriod=function(e){return this.eD.getDRMCapabilitiesForPeriod(e)},t.prototype.hasManifestTypeChanged=function(e){return!(!this.fD||this.fD._type===e||(this.context.logger.log("Manifest has just changed from "+this.fD._type+" to "+e),0))},t.prototype.getPeriodIdForTime=function(e){var t,i=this.getAllPerio
14ds();return 1===i.length?i[0]._id:null==(t=j(i,e))?void 0:t._id},t.prototype.dispose=function(){this.BD(),e.prototype.dispose.call(this)},t.prototype.BD=function(){this.YD=(0,c.dispose)(this.YD)},t.prototype.CD=function(){var e=this.getFirstPeriod();if(this.cD&&e&&e.start)return e.start+this.cD},t.prototype.getTotalDuration=function(){if(this.isLive())return this.CD()||1/0;var e=this.getLastPeriod();return e?(e.start||e._start&&S.DurationConverter.getDurationInSec(e._start)||0)+this.eD.getPeriodDuration(e._id):0},t.prototype.getFirstPeriod=function(){return this.getAllPeriods()[0]},t.prototype.getLastPeriod=function(){var e=this.getAllPeriods();if(e.length>0)return e[e.length-1]},t.prototype.isLastPeriod=function(e){var t=this.getLastPeriod();return!!t&&e===t._id},t.prototype.isManifestFinalized=function(){return!this.isLive()},t.prototype.isFirstPeriod=function(e){var t=this.getFirstPeriod();return!!t&&t._id===e},t.prototype.isHlsManifest=function(){var e,t;return null!=(t=null==(e=this.getManifest())?void 0:e._isHls)&&t},t.prototype.isDashManifest=function(){return!this.isHlsManifest()&&!this.isSmoothManifest()},t.prototype.isSmoothManifest=function(){var e,t;return(null==(t=null==(e=this.fD)?void 0:e.originalFormat)?void 0:t.format)==="smooth"},t.prototype.getHlsTags=function(){if(!this.isHlsManifest())return null;var e=A.ModuleManager.get(P.ModuleName.HLS).selectors,t=e.getHlsState;return(0,e.getCustomTags)(t(this.WD.getState()))},t.prototype.isMimeTypePartOfPeriod=function(e,t){var i=this.getPeriod(new D.PeriodId(t));return(i?i.AdaptationSet:[]).some(function(t){return t._mimeType===e})},t.prototype.getNextPeriod=function(e){var t;if(null!=(t=this.fD)&&t.Period)for(var i=this.findPeriod(e),n=this.fD.Period.indexOf(i)+1;n<this.fD.Period.length;n++){var r=this.fD.Period[n];if(r)return r}return null},t.prototype.getEventStreamEvents=function(e){return this.eD.getEventStreamEvents(e)},t.prototype.hasAdaptationSets=function(e){var t=this.fD;if(t&&t.Period){var i=t.Period.find(function(t){return t._id===e});return!!(i&&i.AdaptationSet)}return!1},t.prototype.DD=function(e){if(this.aD){var t=this.aD.getSynchronizationPromise();if(t)return t;if(e.UTCTiming&&e.UTCTiming.length>0)return this.aD.synchronizeWithServer(e.UTCTiming,e._downloadTime)}return Promise.resolve()},t.prototype.getAdaptationSet=function(e){if(e&&this.fD)return(0,E.findAdaptationSet)(this.fD,e)},t.prototype.getRepresentationById=function(e){if(e&&this.fD)return(0,E.findRepresentation)(this.fD,e)},t.prototype.representationExists=function(e){return!!this.getRepresentationById(e)},t.prototype.getMatchingRepresentationsByBandwidth=function(e,t,i){void 0===i&&(i=function(){return!0});var n=this.getAdaptationSet(e);return n?z(n.Representation,t,i):[]},t.prototype.getMatchingRepresentationByBandwidth=function(e,t,i){void 0===i&&(i=function(){return!0});var n=this.getAdaptationSet(e);return n?H(n.Representation,t,i):null},t.prototype.getAllRepresentations=function(){return this.getAllPerio
14ds().flatMap(function(e){var t;return(null==(t=e.AdaptationSet)?void 0:t.flatMap(function(e){return e.Representation}))||[]})},t.prototype.getRepresentation=function(e,t){return this.getRepresentationById(new L.RepresentationId(e,t))},t.prototype.getAllAdaptationSets=function(){return this.getAllPeriods().flatMap(function(e){return e.AdaptationSet})},t.prototype.getAllImageAdaptationSets=function(){return this.getAllAdaptationSets().filter(function(e){return e._mimeType.includes("image")&&"image"===e._contentType})},t.prototype.getAllDashThumbnailSources=function(){var e=this;return this.getAllImageAdaptationSets().map(function(t){var i=e.findPeriod(t._internalId.periodId);return{adaptationSet:t,timing:{startTime:i.start,duration:i.duration}}})},t.prototype.getAdaptationSetIndex=function(e){var t=this.findPeriod(e.periodId);return t&&t.AdaptationSet&&0!==t.AdaptationSet.length?t.AdaptationSet.findIndex(function(t){return t._internalId.equals(e)}):-1},t.prototype.getAvailableBaseURLsForRepresentation=function(e){var t=this.getAdaptationSet(e);if(void 0===e||!t)return[];for(var i=[],n=t.Representation,r=0;r<n.length;r++)if(n[r]._internalId.equals(e)&&n[r].BaseURL&&n[r].BaseURL.length>0){i=n[r].BaseURL;break}var o=[];for(r=0;r<i.length;r++)o.push((0,m.forceReallocation)(i[r].url));return o},t.prototype.findDownloadedHlsRepresentation=function(e){var t=this.getAdaptationSet(e);return t?t.Representation.find(function(e){return e._hls&&!!e._hls.requestTimestamp}):null},t.prototype.isManifestFetchRequired=function(e){if(!this.isHlsManifest())return!1;var t=Date.now(),i=this.getRepresentationById(e),n=!!i.SegmentList&&i.SegmentList.length>0&&!!i.SegmentList[0].SegmentURL,r=n?i.SegmentList[0].SegmentURL.length:0,o=!n||r>0,a=t-(i._requestTimestamp||t),s=this.isLive()&&a>=this.getMinimumUpdatePeriod();return!o||s},t.prototype.hasSelfInitialisingSegments=function(){return this.getAllPerio
14ds().map(function(e){return e.AdaptationSet}).reduce(function(e,t){return e.concat(t)},[]).map(function(e){return e.Representation}).reduce(function(e,t){return e.concat(t)},[]).some(function(e){var t=e.SegmentList&&e.SegmentList.length>0?e.SegmentList:[],i=!!e.SegmentBase&&e.SegmentBase.length>0,n=e.SegmentTemplate&&e.SegmentTemplate.length>0?e.SegmentTemplate:[];return!(e.init||i||t.some(function(e){return!!e.init})||n.some(function(e){return!!e._initialization}))})},t.prototype.isSegmentInfoLoaded=function(e){var t=this.getRepresentationById(e);return!(!t||!t.segmentIndex&&!t.segmentIndexParsingError)},t.prototype.isPrecedingPeriod=function(e,t){if(!(e&&t&&this.fD&&this.fD.Period))return!1;var i=this.fD.Period.findIndex(function(t){return t._id===e}),n=this.fD.Period.findIndex(function(e){return e._id===t});return i>=0&&n>=0&&n<i},t.prototype.getMaxSegmentDuration=function(){var e=S.DurationConverter.getDurationInSec(this.fD._maxSegmentDuration);return isNaN(e)?0:e},t.prototype.getDesiredDistanceToLiveEdge=function(){var e,t=null==(e=this.context.serviceManager.get(l.ServiceName.LiveLatencyService))?void 0:e.getTargetLatency();return(0,w.isDefined)(t)?t:this.context.bufferSettings.getForwardTargetLevel()+this.UD.LIVE_EDGE_DISTANCE},t.prototype.hasSuggestedStartPosition=function(){var e,t;return null!=(t=null==(e=this.fD)?void 0:e.hasOwnProperty("_startOffset"))&&t},t.prototype.getVodStartOffset=function(){return Math.max(0,Math.min(this.fD._startOffset,this.getDuration()-this.UD.SEEK_TO_END_OFFSET))},t.prototype.getLiveStartOffset=function(e){void 0===e&&(e=!0);var t=this.fD._startOffset;return t-=Math.abs(this.getTimeShiftBufferDepthSeconds()),e&&(t+=this.getDesiredDistanceToLiveEdge(),t=Math.min(0,t)),t},t.prototype.initSegmentStartTimesFromReferenceSegment=function(e){this.WD.dispatch((0,I.initPlaybackTimesFromReferenceSegment)(e))},t.prototype.initializeSegmentStartTimesFromStart=function(e){var t,i,n=this.getRepresentationById(e),r=null==(i=null==(t=null==n?void 0:n.SegmentList)?void 0:t[0])?void 0:i.SegmentURL;if(n&&null!=r&&r.length){var o=r.length-1,a=(0,T.toSeconds)(n._requestTimestamp)-r[o]._duration;this.context.logger.debug("Initializing segment start times with start time of last segment ".concat(a),e),this.WD.dispatch((0,I.initPlaybackTimesFromIndex)(e,o,a))}else this.context.logger.debug("Failed to initialize segment start times, no segments found",e)},t.prototype.hasSegmentStartTimeForHlsRepresentation=function(e){var t,i,n,r=this.getRepresentationById(e);return(null==(n=null==(i=null==(t=null==r?void 0:r.SegmentList)?void 0:t[0])?void 0:i.SegmentURL[0])?void 0:n._playbackTime)!==void 0},t.prototype.getStartTimeForHlsSegment=function(e,t){var i,n,r,o,a,s=this.getRepresentationById(e),l=null!=(r=null==(n=null==(i=null==s?void 0:s.SegmentList)?void 0:i[0])?void 0:n.SegmentURL)?r:[],c=(0,M.findSegmentUrlIndexWithinSegmentList)(t,l);return -1!==c&&void 0!==l[c]._playbackTime?l[c]._playbackTime:null!=(a=null==(o=this.getFirstPeriod())?void 0:o.start)?a:void 0},t.prototype.isTimeNearPeriodEnd=function(e,t,i){var n=this.findPeriod(t),r=null==n?void 0:n.start;if(void 0===r)return!1;
vendor: 8,642 bytes, line 14
14var o=r+this.getPeriodDuration(n._id,this.getAllPeriods());return e>=r&&e<=o&&o-e<=i},t}(g.Suspendable);function F(e){var t;return(e=r({},e)).Period=null==(t=e.Period)?void 0:t.map(function(e){var t;return r(r({},e),{AdaptationSet:null==(t=e.AdaptationSet)?void 0:t.map(function(t,i){var n,o=(0,k.createAdaptationSetIdFromMimeTypeAndIndex)(e._id,t._mimeType,i);return r(r({},t),{_internalId:o,_periodId:e._id,Representation:null==(n=t.Representation)?void 0:n.map(function(e){return r(r({},e),{_internalId:new L.RepresentationId(o,e._id)})})})})})}),e}function B(e){if(A.ModuleManager.has(P.ModuleName.DRM)){var t=A.ModuleManager.get(P.ModuleName.DRM).ContentProtectionHelper.getFirstKeyId;V(e,function(e){for(var i=t(e.ContentProtection),n=0;e.Representation&&n<e.Representation.length;n++){var r=e.Representation[n];(i||r.ContentProtection)&&(r.associatedKid=r.ContentProtection&&t(r.ContentProtection)||i)}})}}function V(e,t){for(var i=0;e.Period&&i<e.Period.length;i++)for(var n=e.Period[i],r=0;n.AdaptationSet&&r<n.AdaptationSet.length;r++)t(n.AdaptationSet[r])}function j(e,t){if(e&&e.length){if(t<e[0].start)return e[0];var i=e[e.length-1];return t>=i.start?i:function(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i].start+e[i].duration;if(t>=e[i].start&&t<n)return e[i];if(t>=n&&t<e[i+1].start)return e[i+1]}}(e,t)||i}}function z(e,t,i){void 0===i&&(i=function(){return!0});var n=e.filter(i),r=n.filter(function(e){return e._bandwidth===t});return r.length>0?r:function(e,t){var i=e.map(function(e){return e._bandwidth}).reduce(function(e,i){return Math.abs(i-t)<Math.abs(e-t)?i:e});return e.filter(function(e){return e._bandwidth===i})}(n,t)}function H(e,t,i){void 0===e&&(e=[]),void 0===i&&(i=function(){return!0});var n=e.filter(i),r=null,o=-1/0;return n.forEach(function(e){e._bandwidth>o&&e._bandwidth<=t&&(o=e._bandwidth,r=e)}),r||n[0]}function G(e,t,i){var n=i?"videoCodecPriority":"audioCodecPriority";return null!=t&&t.options&&t.options[n]?t.options[n]:e.playback&&e.playback[n]?e.playback&&e.playback[n]:[]}function q(e,t){return{video:G(e,t,!0),audio:G(e,t,!1)}}function W(e){var t=(0,x.getCodecsFromAdaptationSet)(e);if(!t||0===t.length)return null;var i=b.CodecStringHelper.getExtractedCodecStrings(t),n=e._mimeType.split("/")[0];return i[n]?b.CodecStringHelper.extractCodec(i[n]):null}function Y(e){return e.reduce(function(e,t){return e[t._id]=function(e){return e.AdaptationSet.map(function(e){return e._mimeType}).filter(function(e,t,i){return _.MimeTypeHelper.isAV(e)&&i.indexOf(e)===t})}(t),e},{})}t.ManifestService=U},38568:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var m in n)f[m]="access"===m?{}:n[m];for(var m in n.access)f.access[m]=n.access[m];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,i[p])("accessor"===l?{get:d.get,set:d.set}:d[c],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&r.unshift(s)}else(s=a(g))&&("field"===l?r.unshift(s):d[c]=s)}u&&Object.defineProperty(u,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestUpdateScheduler=void 0,t.initializeManifestUpdateSchedulingService=function(e,t){var i,n=e.serviceManager,r=t.sourceIdentifier;if(n.has(s.ServiceName.ManifestUpdateSchedulingService,r))null==(i=n.get(s.ServiceName.ManifestUpdateSchedulingService,r))||i.restore();else{var o=new y(e,t);n.set(s.ServiceName.ManifestUpdateSchedulingService,o,r)}},t.isRepresentationUpToDate=b;var a=i(3336),s=i(80813),l=i(77401),c=i(69957),u=i(85648),d=i(93204),h=i(88847),p=i(85434),f=i(89927),m=i(59707),g=i(22059),v=i(63147),y=function(){var e,t=h.Suspendable,i=[];return e=function(e){function t(t,n){var o=e.call(this,{onSuspend:function(){return o.tE()},onRestore:function(){return o.uE()}})||this;o.OE=r(o,i),o.WE=!1,o.XE={},o.cE=function(e){return null==e?void 0:e.activeTracks},o.dE=function(e){e&&o.QE.isHlsManifest()&&o.eE(e)},o.iE=function(e){return e.player&&e.player.playbackState},o.jE=function(e){e&&(e===u.PlaybackState.Paused?o.rE():e===u.PlaybackState.Playing&&o.sE())},o.mE=function(e){o.oE(e),o.QE.updateManifest(o.QE.getManifest()).catch(function(){o.VE.debug("Updating the manifest failed")})},o.nE=function(e,t){if(o.VE.debug("Rejection while updating the representation",e),e===l.RequestError.Failed||e===l.RequestError.TimedOut||e instanceof a.PlayerError){var i=e instanceof a.PlayerError?e.name:e;o.TE.dispatch((0,m.updateRepresentationFailedDownloadAction)(t._internalId,i)),o.QE.updateManifest(o.QE.getManifest()).catch(function(e){o.VE.debug("Error while updating the manifest after the representation failed to load",e)})}},o.pE=function(){o.VE.debug("Error while loading manifest")},o.OE=t,o.PE=n;var c=o.PE.sourceIdentifier;return o.QE=t.serviceManager.get(s.ServiceName.ManifestService,c),o.RE=t.serviceManager.get(s.ServiceName.ManifestLoadingService,c),o.SE=t.store,o.TE=t.serviceManager.get(s.ServiceName.SourceStoreService,c),o.UE=t.eventHandler,o.VE=t.logger,o.ZE=o.bE(),o.aE=o.hE(t),o}return n(t,e),t.prototype.bE=function(){var e=this;return(0,d.subscribe)(this.TE)(function(t){return e.cE(t)},this.dE)},t.prototype.eE=function(e){this.fE(e),this.gE(e)},t.prototype.fE=function(e){var t=this;Object.keys(e).filter(function(t){return e[t].selectedRepresentationId}).forEach(function(i){t.kE(e[i].selectedRepresentationId)})},t.prototype.gE=function(e){var t=this;Object.keys(this.XE).filter(function(t){return!Object.keys(e).includes(t)}).forEach(function(e){t.XE[e].stop(),delete t.XE[e]})},t.prototype.hE=function(e){return(0,d.subscribe)(this.SE)(this.iE,this.jE,function(){return e.settings.STOP_DOWNLOAD_ON_PAUSE})},t.prototype.kE=function(e){var t=this.QE.getRepresentationById(e),i=e.adaptationSetId;t?this.XE[i]?this.XE[i].getRepresentation()._internalId.equals(e)||this.XE[i].setRepresentation(t):this.XE[t._internalId.adaptationSetId]=this.lE(t):this.VE.debug("[ManifestUpdateScheduler] Representation not found for update: ".concat(e.representationId," (adaptationSet: ").concat(i,", periodId: ").concat(e.periodId,")"))},t.prototype.stopRepresentationUpdates=function(e){var t,i=this.XE[e._internalId.adaptationSetId];return null!=(t=null==i?void 0:i.stopRepresentationUpdate(e))?t:Promise.resolve()},t.prototype.scheduleRepresentationUpdate=function(e){var t=this.XE[e._internalId.adaptationSetId];null==t||t.setRepresentation(e),null==t||t.start()},t.prototype.lE=function(e){var t=this,i=new v.RepresentationUpdater(this.OE,e,this.RE,{success:this.mE,error:function(e){return t.nE(e,i.getRepresentation())}});return p.MimeTypeHelper.isAV(e._mimeType)||i.setRepresentation(e),i.start(),i},t.prototype.oE=function(e){this.TE.dispatch((0,m.updateRepresentationAction)(e))},t.prototype.init=function(e){var t=this;return this.RE.load(e).then(function(e){return t.QE.updateManifest(e).then(function(){t.WE=!0,t.QE.isLive()&&!t.QE.isHlsManifest()&&t.qE(e)})}).catch(function(e){return e instanceof a.PlayerError||e instanceof Error?Promise.reject(e):Promise.reject(Error("The loading of the manifest has failed or was cancelled"))})},t.prototype.qE=function(e){var t=this;this.YE=new g.ManifestUpdater(this.OE,this.RE,e,{minAllowedUpdatePeriod:this.OE.settings.MINIMUM_ALLOWED_UPDATE_PERIOD,maxAllowedUpdatePeriod:this.OE.settings.MAXIMUM_ALLOWED_UPDATE_PERIOD},{success:function(e){return t.QE.updateManifest(e)},error:this.pE}),this.YE.start()},t.prototype.waitForRepUpdate=function(e){return 0===Object.keys(this.XE).length||b(this.QE.getRepresentationById(e))?Promise.resolve():this.XE[e.adaptationSetId].updateRepresentation().then(function(){})}
14,t.prototype.rE=function(){Object.values(this.XE).forEach(function(e){return e.stop()}),this.YE&&this.YE.stop()},t.prototype.sE=function(){Object.values(this.XE).filter(function(e){return e.isStopped}).forEach(function(e){e.start()}),this.YE&&this.YE.isStopped&&this.YE.start()},t.prototype.tE=function(){this.aE()},t.prototype.uE=function(){this.aE=this.hE(this.OE)},t.prototype.isInitiated=function(){return this.WE},t.prototype.dispose=function(){var t;this.ZE(),this.aE(),this.rE(),null==(t=this.YE)||t.dispose(),Object.values(this.XE).forEach(function(e){e.dispose()}),this.YE=null,this.XE=null,e.prototype.dispose.call(this)},t}(t),function(){var n,r="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(n=t[Symbol.metadata])?n:null):void 0;o(e,null,[(0,c.trackPerformance)("ManifestUpdateScheduler.init",!0)],{kind:"method",name:"init",static:!1,private:!1,access:{has:function(e){return"init"in e},get:function(e){return e.init}},metadata:r},null,i),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})}(),e}();function b(e){var t;return!!e._requestTimestamp&&e._requestTimestamp+(0,f.toMilliSeconds)(null!=(t=e._updateInterval)?t:1/0)>Date.now()}t.ManifestUpdateScheduler=y},22059:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestUpdater=void 0;var r=i(14302),o=i(23940);t.ManifestUpdater=function(e){function t(t,i,n,r,o){var a=e.call(this,t,o)||this;return a.context=t,a.manifestLoader=i,a.manifest=n,a.settings=r,a}return n(t,e),t.prototype.getUpdatedManifest=function(){return this.getPayload()},t.prototype.update=function(){var e=this;return this.manifestLoader.load(this.manifest._currentLoadingUrl).then(function(t){return e.manifest=t,t})},t.prototype.getReloadIntervalInSeconds=function(){var e=(0,o.getMinimumUpdatePeriodInSeconds)(this.manifest);return isNaN(e)?this.settings.minAllowedUpdatePeriod:Math.min(this.settings.maxAllowedUpdatePeriod,Math.max(this.settings.minAllowedUpdatePeriod,e))},t.prototype.getLastReloadTimestamp=function(){return this.manifest._requestTimestamp},t}(r.AbstractUpdater)},90087:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MediaPlayerManifestApiFactory=void 0;var n=i(80813),r=i(3714),o=i(16197);t.MediaPlayerManifestApiFactory=function(){function e(){}return e.create=function(t,i){var r=i.serviceManager.get(n.ServiceName.ManifestService,i.sourceContext.sourceIdentifier);return new(function(){return function(){r.isHlsManifest()?this.hls=e.createHlsApi(r):r.isSmoothManifest()||(this.dash=e.createDashApi(t,r))}}())},e.createDashApi=function(t,i){return new(function(){function n(){}return n.prototype.getPeriod=function(){var n=i.getPeriodIdForTime(t.getCurrentTime()),r=i.getPeriod(new o.PeriodId(n));return r?e.createPeriodApi(i,r):null}
vendor: 4,080 bytes, line 14
14,n.prototype.listPeriods=function(){return i.getAllPeriods().map(function(t){return e.createPeriodApi(i,t)})},n}())},e.createHlsApi=function(t){return new(function(){function i(){this.properties=t.getHlsTags()}return i.prototype.getVideoTracks=function(){return e.getVideoTracks(t,t.getFirstPeriod()._id)},i.prototype.getAudioTracks=function(){return e.getAudioTracks(t,t.getFirstPeriod()._id)},i.prototype.getTextTracks=function(){return e.getTextTracks(t,t.getFirstPeriod()._id)},i}())},e.createPeriodApi=function(t,i){return new(function(){function n(){this.id=i._id,this.properties={},i._id&&(this.properties.id=i._id),i._start&&(this.properties.start=i._start),i._duration&&(this.properties.duration=i._duration)}return n.prototype.getVideoTracks=function(){return e.getVideoTracks(t,this.id)},n.prototype.getAudioTracks=function(){return e.getAudioTracks(t,this.id)},n.prototype.getTextTracks=function(){return e.getTextTracks(t,this.id)},n.prototype.getMetadata=function(){return e.getMetadata(t,this.id)},n}())},e.getAudioTracks=function(t,i){return t.getAvailableAudio(i,!1).map(function(n){var r={id:n.id,label:n.label,lang:n.lang,getQualities:function(){return e.getAudioQualities(t,i,n.id)}};return n.role&&(r.role=n.role),n.metadata&&(r.metadata=n.metadata),r})},e.getVideoTracks=function(t,i){return t.getAvailableVideo(i).map(function(n){var r={id:n.id,label:n.label,getQualities:function(){return e.getVideoQualities(t,i)}};return n.role&&(r.role=n.role),n.metadata&&(r.metadata=n.metadata),r})},e.getTextTracks=function(e,t){return e.getAvailableSubtitles(t)},e.getMetadata=function(e,t){return e.getEventStreamEvents(e.findPeriod(t)).map(function(e){return{type:r.MetadataType.EVENT_STREAM,payload:e.data,start:e.startTime,end:e.endTime}})},e.getAudioQualities=function(e,t,i){return e.getAudioRepresentations(t)[i]||[]},e.getVideoQualities=function(e,t){return e.getVideoRepresentations(t)},e}()},16197:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PeriodId=void 0,t.PeriodId=function(){function e(e){this.ZJ=e}return Object.defineProperty(e.prototype,"periodId",{get:function(){return this.ZJ},enumerable:!1,configurable:!0}),e.prototype.equals=function(e){return null!=e&&this.periodId===e.periodId},e.prototype.key=function(){return this.periodId},e}()},79505:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.RepresentationId=void 0;var r=i(47151);t.RepresentationId=function(e){function t(t,i){var n=e.call(this,t.periodId,t.adaptationSetId)||this;return n.vc=i,n}return n(t,e),Object.defineProperty(t.prototype,"representationId",{get:function(){return this.vc},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.representationId===(null==t?void 0:t.representationId)},t.prototype.key=function(){return e.prototype.key.call(this)+"-"+this.representationId},t.from=function(e){return e._representationId&&e._adaptationSetId&&e._periodId?new t(new r.AdaptationSetId(e._periodId,e._adaptationSetId),e._representationId):null},t}(r.AdaptationSetId)},63147:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();
14Object.defineProperty(t,"__esModule",{value:!0}),t.RepresentationUpdater=void 0;var r=i(88052),o=i(62756),a=i(60729),s=i(14302);t.RepresentationUpdater=function(e){function t(t,i,n,r){var o=e.call(this,t,r)||this;return o.context=t,o.representation=i,o.manifestLoader=n,o}return n(t,e),t.prototype.getRepresentation=function(){return this.representation},t.prototype.setRepresentation=function(e){this.representation._internalId.equals(e._internalId)||this.cancel(),this.representation=e,this.scheduleUpdate(!0)},t.prototype.updateRepresentation=function(){return this.getPayload()},t.prototype.stopRepresentationUpdate=function(t){return e.prototype.stop.call(this),this.manifestLoader.stopRepresentationUpdate(t)},t.prototype.update=function(){var e=this;return this.manifestLoader.updateRepresentation(this.representation).then(function(t){if(e.representation._id!==t._id)throw s.REPRESENTATION_UPDATE_CANCEL;return e.representation=t,t})},t.prototype.getReloadIntervalInSeconds=function(){var e,t;return this.representation._requestTimestamp?(0,a.isPlayingLowLatencyHls)(this.context)&&null!=(e=r.ModuleManager.get(o.ModuleName.HLS))&&e.canMakeBlockingPlaylistReload(this.representation,this.context.settings)?0:null!=(t=this.representation._updateInterval)?t:1/0:0},t.prototype.getLastReloadTimestamp=function(){return this.representation._requestTimestamp?this.representation._requestTimestamp:0},t}(s.AbstractUpdater)},99257:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdRestorationOptimizationService=void 0;var n=i(3714),r=i(91678),o=i(46151),a=i(94685),s=i(13422),l=i(80813),c=i(81524);t.AdRestorationOptimizationService=function(){function e(){var e=this;this.Gc=function(){(0,a.isContextAvailable)(e.xc)&&e.xc.eventHandler.off(n.PlayerEvent.AdStarted,e.Gc),e.Hc(e.Bc),e.Bc=[]}}return e.prototype.updatePlayerContext=function(e){this.wc=[],this.xc=e,this.yc=e.segmentInfoService,this.zc=e.segmentPrefetchingService,this.Ac=e.segmentCacheService,this.Dc()},e.prototype.Dc=function(){var e;null!=(e=this.xc)&&e.sourceContext&&!this.xc.sourceContext.isAd&&(this.Cc=this.xc.sourceContext)},e.prototype.optimizeRestorationAfterUpcomingAdBreak=function(){var e,t,i=this,r=null==(t=null==(e=this.Ec())?void 0:e.getState())?void 0:t.playback;if(!(0,a.isContextAvailable)(this.xc)||!this.yc||!r)return Promise.reject("Could not get playback state and/or SegmentInfoService");this.Dc();var o=(0,c.getPlaybackPosition)(r);return isNaN(o)?Promise.reject("Could not get playback position"):this.yc.getSegmentInfos(o,this.xc.settings.AD_RESTORATION_SEGMENT_PREFETCHING_DURATION).then(function(e){i.Fc(e),i.Bc=e,(0,a.isContextAvailable)(i.xc)&&i.xc.eventHandler&&i.xc.eventHandler.on(n.PlayerEvent.AdStarted,i.Gc)})},e.prototype.Ec=function(){return(0,a.isContextAvailable)(this.xc)?this.xc.serviceManager.get(l.ServiceName.SourceStoreService,this.xc.sourceContext.sourceIdentifier):void 0},e.prototype.Fc=function(e){var t=(0,a.isContextAvailable)(this.xc)?this.xc.sourceContext.sourceIdentifier:void 0,i=t?this.xc.serviceManager.get(l.ServiceName.ManifestService,t):void 0;i&&e.forEach(function(e){var t=i.getAdaptationSet(e.internalRepresentationId);t&&(e.codecs=(0,s.getCodecsFromAdaptationSet)(t))})},e.prototype.Hc=function(e){var t;this.wc=e.reduce(function(e,t){return t.mimeType&&!e.includes(t.mimeType)&&e.push(t.mimeType),e},[]),this.Ic(),this.Cc&&(null==(t=this.zc)||t.fetchAll(e,this.Cc))},e.prototype.hasPrefetchedSegment=function(e,t){var i,n;return(!(0,a.isContextAvailable)(this.xc)||!this.xc.sourceContext.isAd)&&!!this.Cc&&null!=(n=null==(i=this.Ac)?void 0:i.hasPrefetchedSegment(e,t,this.Cc))&&n},e.prototype.getPrefetchedSegment=function(e,t){var i,n;return this.Cc&&null!=(n=null==(i=this.Ac)?void 0:i.getPrefetchedSegment(e,t,this.Cc))?n:null},e.prototype.getRepresentationForPrefetchedSegment=function(e){var t;if(this.Cc)return null==(t=this.Ac)?void 0:t.getRepresentationForPrefetchedSegment(e,this.Cc)},e.prototype.Ic=function(){var e=this;if((0,a.isContextAvailable)(this.xc)){var t=this.xc.store.getState();if(0!==this.wc.length&&t){var i=(0,o.getMetricsState)(t);this.wc.forEach(function(t){i[t]||e.xc.store.dispatch((0,r.initializeMetricsForMimeType)(t,e.xc.settings))})}}},e.prototype.reset=function(){(0,a.isContextAvailable)(this.xc)&&this.xc.eventHandler.off(n.PlayerEvent.AdStarted,this.Gc),this.wc=[],this.Bc=[]},e.prototype.dispose=function(){this.reset(),this.yc=void 0,this.zc=void 0,this.Ac=void 0},e}()}
vendor: 18,716 bytes, line 14
14,17382:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDownloadRates=function(e){return e.map(function(e){return(0,n.bytesToBits)(e.bytes)/e.downloadDuration}).filter(function(e){return e<1/0})},t.filterValuesExceedingAverageByMargin=function(e){var t=1.1*r(e);return e.filter(function(e){return e<=t})},t.calcAverage=r,t.bpsToMbps=function(e){return e/1024/1024};var n=i(33004);function r(e){return e.reduce(function(e,t){return e+t},0)/e.length}},49440:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveContainerFormat=function(e,t,i){return i?function(e,t){var i,s=r.ModuleManager.has(o.ModuleName.ContainerMP4),c=null==(i=r.ModuleManager.get(o.ModuleName.ContainerMP4,!1))?void 0:i.isValidMp4;return s&&c(t)?{source:a.ContainerFormat.MP4,target:a.ContainerFormat.MP4}:n.MimeTypeHelper.isSubtitle(e)?l(e):{source:a.ContainerFormat.TS,target:a.ContainerFormat.MP4}}(e,t):l(e)};var n=i(85434),r=i(88052),o=i(62756),a=i(34795),s=i(14443);function l(e){var t=(0,s.extractContainerFormat)(e);return t?{source:t,target:t}:void 0}},23133:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.addEncryptionKeyToStore=function(e,t,i){return(0,a.getEncryptionKey)(i.getState(),e)?i.dispatch((0,o.updateEncryptionKey)({uri:e,key:void 0,loadState:s.KeyLoadState.Loading})):i.dispatch((0,o.addEncryptionKey)({uri:e,key:void 0,loadState:s.KeyLoadState.Loading})),t.load(e).then(function(t){return null==i||i.dispatch((0,o.updateEncryptionKey)({uri:e,key:r.FormatHelper.bytesToHex(t),loadState:s.KeyLoadState.Loaded})),function(e){var t=(0,a.getAllEncryptionKeys)(e.getState());t&&t.length>l&&e.dispatch((0,o.removeEncryptionKey)(t[0].uri))}(i),t}).catch(function(t){return null==i||i.dispatch((0,o.updateEncryptionKey)({uri:e,key:void 0,loadState:s.KeyLoadState.Cancel})),Promise.reject(t)})},t.waitForKeyToBeLoaded=function(e,t){return new Promise(function(i,o){var l=(0,n.subscribe)(e)(function(e){return(0,a.getEncryptionKey)(e,t)},function(e){return e.loadState===s.KeyLoadState.Cancel?(l(),o(Error("Encryption key load cancelled!"))):e.loadState===s.KeyLoadState.Loaded&&e.key?(l(),i(r.FormatHelper.hexToBytes(e.key).buffer)):void 0})})};var n=i(93204),r=i(70233),o=i(51386),a=i(66628),s=i(92096),l=20},88618:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FetchController=void 0;var r,o=i(77401),a=i(43446),s=i(29669),l=i(34841),c=i(88844),u=i(97587);function d(e){return![s.HttpRequestMethod.GET,s.HttpRequestMethod.HEAD].includes(e)}!function(e){e.User="user",e.Timeout="timeout"}(r||(r={})),t.FetchController=function(){function e(e,t,i,r){var o=this;this.useStreamResponse=r,this.setProgressListener=function(e){o.Sc=e},this.bc=function(e){o.Sc&&(o.Rc.progressTimestamp=a.TimingUtil.getHiResTimestamp(),o.Tc.loadedBytes=e,o.Sc(n({},o.Tc)))},this.cc=function(){(0,c.clearTimeoutIfDefined)(o.Oc)},this.Jc=e.logger,this.Kc=i,this.Mc=t,this.Nc=new l.Deferred,this.Qc=0,this.Rc={sendTimestamp:-1,openedTimestamp:-1,headersReceivedTimestamp:-1,progressTimestamp:-1,doneTimestamp:-1},this.Lc=new AbortController,this.Tc={loadedBytes:0,url:t.url,responseTiming:this.Rc,chunks:[],elapsedTime:0}}return e.prototype.getResponse=function(){return this.Uc(this.Mc),this.Nc.promise},e.prototype.cancel=function(e){void 0===e&&(e=r.User),(0,c.clearTimeoutIfDefined)(this.Oc),this.Pc=e,this.Lc.abort()},e.prototype.Uc=function(e){var t,i=this,s={method:e.method,headers:new Headers(e.headers),credentials:e.credentials,signal:this.Lc?this.Lc.signal:void 0,body:d(e.method)?e.body:void 0};this.Rc.sendTimestamp=a.TimingUtil.getHiResTimestamp(),fetch(e.url,s).then(function(e){var t;if(i.Rc.headersReceivedTimestamp=a.TimingUtil.getHiResTimestamp(),null==(t=i.Sc)||t.call(i,n({},i.Tc)),e.ok){var r=i.Wc(e);i.Yc(e).then(function(e){r.body=e,r.length=i.Qc,r.timeToFirstByte=i.Rc.headersReceivedTimestamp-i.Rc.sendTimestamp,i.Rc.doneTimestamp>0&&(r.elapsedTime=i.Rc.doneTimestamp-i.Rc.sendTimestamp),i.Nc.resolve(r)}).catch(function(t){i.dc({error:t.message,response:i.Wc(e)})})}else i.dc({error:o.RequestError.Failed,response:i.Wc(e)})}).catch(function(e){i.dc({error:i.Xc(e)})}),this.Rc.openedTimestamp=a.TimingUtil.getHiResTimestamp(),null==(t=this.Sc)||t.call(this,n({},this.Tc)),this.Oc=window.setTimeout(function(){return i.cancel(r.Timeout)},this.Kc)},e.prototype.Vc=function(e){var t={};return e.headers.forEach(function(e,i){return t[i]=e}),t},e.prototype.Wc=function(e){return{request:this.Mc,url:e.url,headers:this.Vc(e),status:e.status,statusText:e.statusText}},e.prototype.Xc=function(e){return this.Jc.debug("fetch error",e),e instanceof Error&&"AbortError"===e.name?this.Pc===r.User?o.RequestError.Canceled:o.RequestError.TimedOut:o.RequestError.Failed},e.prototype.Yc=function(e){var t=this;if(e.body&&this.useStreamResponse){var i=new u.Stream,n=this.Rc.headersReceivedTimestamp;return this.Zc(e,function(e){var r=a.TimingUtil.getHiResTimestamp(),o=r-n;n=r,t.Tc.chunks.push({downloadDuration:o,bytes:e.byteLength});var s=e instanceof Uint8Array?e.buffer:e;i.add(s)}).then(function(){i.end(),t.cc()}).catch(function(e){t.Jc.debug("Error reading of fetch response:",e),i.abort(t.Xc(e))}),Promise.resolve(i)}var r=e.headers.get("Content-Length"),o=r?parseInt(r):0;return this.Tc.totalBytes=o,this.Zc(e.clone()).catch(function(e){t.Jc.debug("Error reading of fetch response:",e)}),this.ac(e).then(function(e){return t.Qc=o,t.Rc.doneTimestamp=a.TimingUtil.getHiResTimestamp(),t.cc(),e})},e.prototype.Zc=function(e,t){var i=this;if(!e.body)return Promise.reject(Error("response.body is null"));var n=e.body.getReader(),r=function(){return n.read().then(function(e){var n=e.done,o=e.value;return n?(i.Rc.doneTimestamp=a.TimingUtil.getHiResTimestamp(),void i.bc(i.Qc)):o?(null==t||t(o),i.Qc+=o.byteLength,i.bc(i.Qc),r()):void 0})};return r()},e.prototype.ac=function(e){switch(this.Mc.responseType){case s.HttpResponseType.ARRAYBUFFER:return e.arrayBuffer();case s.HttpResponseType.TEXT:return e.text();case s.HttpResponseType.JSON:return e.json();default:return Promise.reject(Error("Unsupported response type on fetch request"))}},e.prototype.dc=function(e){(0,c.clearTimeoutIfDefined)(this.Oc),this.Jc.debug("Error performing fetch: ".concat(e.error),e.response),this.Nc.reject(e)},e}()},94618:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.KeyLoader=void 0;var n=i(40306),r=i(3336),o=i(4129),a=i(77401),s=i(29669);t.KeyLoader=function(){function e(e){this.l5=e,this.m5=e.settings,this.o5=e.sourceContext.sourceIdentifier,this.n5=new o.DefaultContentLoader(this.l5,{maxRetries:this.m5.MAX_RETRIES,retryDelay:this.m5.RETRY_DELAY,requestType:s.HttpRequestType.KEY_HLS_AES})}return e.prototype.p5=function(){var e=this.l5.sourceContext.source&&this.l5.sourceContext.source.hasOwnProperty("options")&&this.l5.sourceContext.source.options,t=e&&e.hasOwnProperty("withCredentials")&&e.withCredentials,i=e&&e.hasOwnProperty("hlsWithCredentials")&&e.hlsWithCredentials;return!!t||!!i},e.prototype.load=function(e){var t=this;return this.n5?this.n5.load(e,s.HttpRequestMethod.GET,s.HttpResponseType.ARRAYBUFFER,void 0,void 0,this.p5()).then(function(e){return e.body}).catch(function(i){if(i.message===a.RequestError.Canceled)return Promise.reject(i);var o=new r.PlayerError(n.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{statusCode:i.status,statusText:i.statusText,keyUrl:e},"Failed to load the DRM key: ".concat(i.status," ").concat(i.statusText,"."),t.o5);return t.l5.eventHandler.fireError(o),Promise.reject(o)}):Promise.reject("Could not load: No loader.")},e.prototype.isLoading=function(){return!!this.n5&&this.n5.isLoading()},e.prototype.dispose=function(){this.n5&&"function"==typeof this.n5.dispose&&this.n5.dispose(),this.n5=void 0,this.m5=void 0},e}()},689:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getLoaderConfig=function(e,t){var i;return null!=(i=e.config.tweaks)&&i.segmentLoaderArgs?e.config.tweaks.segmentLoaderArgs:{maxRetries:e.settings.MAX_CDN_RETRIES,requestType:a(t),disableDownloadTimeout:!0,resetRetriesWhenOffline:!0}},t.getLoader=function(e,t){var i,r=null==(i=e.config.tweaks)?void 0:i.segmentLoader;return r&&"function"==typeof r?new r(t):new n.DefaultContentLoader(e,t)};var n=i(4129),r=i(29669),o=i(85434);function a(e){return o.MimeTypeHelper.isVideo(e)?r.HttpRequestType.MEDIA_VIDEO:o.MimeTypeHelper.isAudio(e)?r.HttpRequestType.MEDIA_AUDIO:o.MimeTypeHelper.isSubtitle(e)?r.HttpRequestType.MEDIA_SUBTITLES:o.MimeTypeHelper.isUnknown(e)?r.HttpRequestType.INTERNAL:r.HttpRequestType.UNKNOWN}},54053:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoError=void 0,function(e){e.END_OF_STREAM_REACHED="END_OF_STREAM_REACHED",e.PERIOD_COMPLETE="PERIOD_COMPLETE",e.SEGMENT_EXCEEDING_PERIOD_DURATION="SEGMENT_EXCEEDING_PERIOD_DURATION"}(i||(t.SegmentInfoError=i={}))},86219:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MPDHandlerFactory=void 0;var n=i(80813),r=i(79721),o=i(88052),a=i(62756),s=i(63066);t.MPDHandlerFactory=function(){function e(){}return e.createInstance=function(e,t,i,l,c){void 0===l&&(l=r.DEFAULT_PERIOD_ID);var u=e.serviceManager.get(n.ServiceName.ManifestService,t.sourceIdentifier);if(!(null!=u&&u.hasAdaptationSets(l)))return null;var d=u.findAdaptationSet(l,i,c);if(!d)return e.logger.debug("Did not find adaptation set for mime type [".concat(i,"] in period ").concat(l)),null;var h=d.Representation&&d.Representation[0],p=h&&h.SegmentTemplate?h.SegmentTemplate:d.SegmentTemplate;if(u.isSmoothManifest()){var f=e.serviceManager.get(n.ServiceName.ManifestLoadingService,t.sourceIdentifier);return f?function(e,t,i,n,r){return r?new(o.ModuleManager.get(a.ModuleName.Smooth).createSmoothSegmentTemplateMPDHandler())(e,t,i,n):null}(e,t,i,f,p):null}return u.isHlsManifest()?function(e,t,i){return i.SegmentList?new s.SegmentListMPDHandler(e,t):null}(e,t,h):function(e,t,i,n){var r=o.ModuleManager.get(a.ModuleName.DASH);return i&&i[0].SegmentTimeline?new r.SegmentTimelineMPDHandler(e,t):i?new r.SegmentTemplateMPDHandler(e,t):n.SegmentList?new s.SegmentListMPDHandler(e,t):n.SegmentBase?new r.SegmentBaseMPDHandler(e,t):null}(e,t,p,h)},e}()},34810:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.throwPlaylistDownloadError=function(e,t,i,s){if(e.logger.debug(t),s instanceof r.PlayerError)e.eventHandler.fireError(s);else if(function(e){return!!e&&Object.keys(n.ErrorCode).includes(e)}(s)){var l=n.ErrorCode[s];e.eventHandler.fireError(new r.PlayerError(l,a(i),t,e.sourceContext.sourceIdentifier))}else s!==o.RequestError.TimedOut?e.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,a(i),t,e.sourceContext.sourceIdentifier)):e.eventHandler.fireError(new r.PlayerError(n.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,a(i),"Failed to load the segment: the request timed out.",e.sourceContext.sourceIdentifier))};var n=i(40306),r=i(3336),o=i(77401);function a(e){return{url:null==e?void 0:e.Uri,mimeType:null==e?void 0:e._mimeType,codecs:null==e?void 0:e._codecs,bitrate:null==e?void 0:e._bandwidth}}},37641:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentCache=void 0,t.areSegmentsIdentical=o;var n=i(74853),r=i(19541);function o(e,t){return(e.isInitSegment?["url","periodId","byteRange","representationId"]:["url","periodId","byteRange","discontinuitySequenceNumber"]).every(function(i){return"object"==typeof e[i]?(0,r.compareValues)(e[i],t[i]):e[i]===t[i]})}t.SegmentCache=function(){function e(e){this.iJ=Math.max(0,e),this.jJ=[]}return e.prototype.contains=function(e){return this.jJ.some(function(t){return o(e.getSegmentInfo(),t.getSegmentInfo())})},e.prototype.kJ=function(e){this.jJ=0!==e?this.jJ.slice(-e):[]},e.prototype.add=function(e){this.contains(e)||(this.jJ.push(e),this.kJ(this.iJ))},e.prototype.get=function(e){return this.jJ.find(function(t){return o(e,t.getSegmentInfo())})},e.prototype.clear=function(){this.kJ(0)},e.prototype.remove=function(e){this.jJ=this.jJ.filter((0,n.invert)(e))},e.prototype.getCapacity=function(){return this.iJ},e.prototype.getCachedCount=function(){return this.jJ.length},e.prototype.getCachedSegments=function(){return this.jJ.slice(0)},e}()},48514:function(e,t){function i(e,t){var i=[];return e.forEach(function(e){return i.push(t(e))}),i}Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentCacheService=void 0,t.SegmentCacheService=function(){function e(){}return e.prototype.updatePlayerContext=function(e){this.ec=e.segmentPrefetchingService},e.prototype.hasPrefetchedSegment=function(e,t,i){var n=e;return"string"==typeof e&&(n=this.fc(e,t,i)),!(!n||"string"==typeof n||!this.ec)&&!!this.ec.getPrefetchedSegment(n,i)},e.prototype.getPrefetchedSegment=function(e,t,i){var n=this;if(!this.ec||!e.mimeType)return null;var r=this.ec.getPrefetchedSegment(e,i);return this.ec.clearPrefetchingQueue(e.mimeType,i),r&&(this.ec.removePrefetchedSegment(e,i),this.ec.setShouldDownloadBeCancelledCallback(e.mimeType,t,i),r.catch(function(){}).finally(function(){n.ec&&e.mimeType&&n.ec.removeShouldDownloadBeCancelledCallback(e.mimeType,i)})),r},e.prototype.getRepresentationForPrefetchedSegment=function(e,t){var n,r,o=null==(r=null==(n=this.ec)?void 0:n.getPrefetchedSegments(t))?void 0:r.get(e);if(o)return i(o,function(e){return e.segmentInfo.internalRepresentationId}).find(Boolean)},e.prototype.fc=function(e,t,n){var r,o,a=null==(o=null==(r=this.ec)?void 0:r.getPrefetchedSegments(n))?void 0:o.get(e);if(a)return i(a,function(e){return e.segmentInfo}).find(function(e){if((null==t?void 0:t.segmentNumber)==null||(null==t?void 0:t.startTime)==null||(null==t?void 0:t.duration)==null)return!0;var i=t.segmentNumber+1,n=Math.round(t.startTime+t.duration),r=e.segmentNumber===i,o=null!=e.startTime&&Math.round(e.startTime)===n;return r||o})},e.prototype.dispose=function(){this.ec=void 0},e}()},14443:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentController=void 0,t.getSegmentManager=ei,t.extractContainerFormat=en;var o=i(66790),a=i(40306),s=i(3336),l=i(25926),c=i(4224),u=i(80813),d=i(56481),h=i(3714),p=i(13531),f=i(77401),m=i(98714),g=i(49859),v=i(91678),y=i(46151),b=i(33436),S=i(15971),_=i(93204),E=i(94685),T=i(34047),w=i(85434),A=i(15014),P=i(89927),I=i(23068),C=i(58313),M=i(88052),R=i(62756),k=i(95880),x=i(34795),O=i(13422),D=i(23940),L=i(84696),N=i(3095),U=i(19627),F=i(36193),B=i(44115),V=i(59707),j=i(88935),z=i(39523),H=i(99529),G=i(60729),q=i(49440),W=i(73794),Y=i(86219),K=i(34810),X=i(37641),Q=i(50429),Z=i(65439),J=i(65244),$=i(98892),ee=i(25902);function et(e,t){var i=(0,Z.getSegmentInfoTimeRange)(e),n=(0,H.getTrackIdentifier)(e);i&&(null==t||t.dispatch((0,z.removeStreamTimeRange)(n,i,H.StreamTimeRangeType.Loading)))}function ei(e,t,i,n,r,o){var a=e.serviceManager.get(u.ServiceName.AdaptationService),s=e.serviceManager.get(u.ServiceName.ManifestService,t.sourceIdentifier),l=function(t,n){var o=!!(null!=a&&a.shouldDownloadBeCancelled(i,t,n));return null!=s&&s.isHlsManifest()&&r.possiblyDependentSegments&&o?(e.logger.debug("Download should be cancelled, but this is disabled for segments not starting with key frames"),!1):o};return e.serviceManager.maybeCall(u.ServiceName.SegmentService,function(e){return e.add({mimeType:i,shouldDownloadBeCancelledCallback:l},n,o)})}function en(e){var t=e.split("/")[1].toLowerCase();return Object.values(x.ContainerFormat).find(function(e){return e===t})}function er(e,t,i){if(e&&(0,E.isContextAvailable)(t))return t.serviceManager.maybeCall(u.ServiceName.ManifestService,function(t){return t.getRepresentationById(e)},void 0,i.sourceIdentifier)}t.SegmentController=function(){function e(e,t,i,n,r,a,s,l){var c=this;if(this.context=e,this.onDataAvailableCallback=t,this.mimeType=i,this.manifestLoader=a,this.gc=M.ModuleManager.get(R.ModuleName.HLS,!1),this.mc={},this.nc=[],this.hasDownloadError=!1,this.tc=!1,this.Id=!1,this.Jd=!1,this.Sd=[],this.jd=function(e){if((0,E.isContextAvailable)(c.context)){var t="Error obtaining ".concat(c.mimeType," segment info");c.pc&&c.pc===e?c.Td.insane(t,e):c.Se(t,e),c.pc=e}},this.qd=function(e){c.Se("Error in cancelLoading of segmentLoaderPool ",e)},this.getNext=function(e,t){var i,n=!(null!=(i=c.Wd)&&i.canLoad())||c.Fd||c.hasActiveTransmuxingJobs()||c.Jd||c.Ye();if(c.kc&&!n){c.Se("Getting next segment for time ".concat(e));var r={periodId:c.sc,recommendedRepresentationId:t,time:e};c.fd(r).then(function(e){return c.Qe(e)}).catch(c.jd)}},this.Ad=function(e){c.hasDownloadError=!1,c.wd(e);var t=c.xd(e);if(t!==o.SegmentVerificationResult.Drop){if(t!==o.SegmentVerificationResult.Park)if(c.isTransmuxerRequired()){var i=e.getSegmentInfo();i.presentationTimeOffset&&isNaN(i.presentationTimeOffset)&&(c.jc.setTimestampOffset(0),i.presentationTimeOffset=0),c.vd(e)}else{var n=!1;c.kc&&c.Wd&&(n=c.qc.onSegmentAvailable(e,{id3:[],closedCaptions:[]},c.kc,c.Wd)),n||et(e.getSegmentInfo(),c.Rd),e.getMimeType().indexOf("mp4")>-1&&!c.qe()&&(c.oc=e.isLastSegment())}}else et(e.getSegmentInfo(),c.Rd)},this.je=function(e,t){var i,n=!!(null!=(i=c.Od)&&i.shouldDownloadBeCancelled(c.mimeType,e,t));return c.qe()&&c.Nd.possiblyDependentSegments&&n?(c.Se("Download should be cancelled, but this is disabled for segments not starting with key frames"),!1):n},this.Qd=e.sourceContext,this.sc=s,this.Rd=l,this.hc=e.serviceManager.get(u.ServiceName.ManifestUpdateSchedulingService,this.Qd.sourceIdentifier),this.Gd=new U.SegmentUnavailabilityHandler(this.context),this.Od=this.context.serviceManager.get(u.ServiceName.AdaptationService),this.Pd=this.context.serviceManager.get(u.ServiceName.StreamTimeService),this.Nd={isTransmuxingRequired:r&&!this.Xd,transmuxer:void 0,possiblyDependentSegments:!1,isAvMuxedTogether:(0,T.isAVMuxedTogether)(n),discardNextSegment:!1,muxedAudioTrackIndex:0},this.Pe()){var d=this.Oe();this.Nd.isTransmuxingRequired=d.source!==d.target}this.ne()}return Object.defineProperty(e.prototype,"Td",{get:function(){return this.context.logger},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Ud",{get:function(){return this.context.settings}
14,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Vd",{get:function(){return this.context.eventHandler},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Wd",{get:function(){return ei(this.context,this.Qd,this.mimeType,this.ic,this.Nd,this.Kd)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Xd",{get:function(){return w.MimeTypeHelper.isSubtitle(this.mimeType)},enumerable:!1,configurable:!0}),e.prototype.Yd=function(e){var t,i=this.Zd();if(i){var n=null==(t=this.Od)?void 0:t.getUserSelectedRepresentation(this.mimeType,this.kc,e);return n?(this.Vd.dispatchEvent(i,{representationID:n._internalId.representationId}),n._internalId):void this.Vd.dispatchEvent(i,{representationID:e.representationId})}},e.prototype.Zd=function(){return w.MimeTypeHelper.isAudio(this.mimeType)?h.PlayerEvent.AudioAdaptation:w.MimeTypeHelper.isVideo(this.mimeType)?h.PlayerEvent.VideoAdaptation:null},e.prototype.ad=function(){var e;if(null!=(e=this.context.segmentCacheService)&&e.hasPrefetchedSegment(this.mimeType,this.Ed,this.Qd))return this.context.segmentCacheService.getRepresentationForPrefetchedSegment(this.mimeType,this.Qd)},e.prototype.bd=function(e){if(!this.jc.canSwitchRepresentation(e.time)&&this.lc)return this.lc;var t=this.ad();if(t)return t;var i=this.Rd.getState(),n=!!i&&!!(0,g.getPreferredBitrate)((0,g.getAdaptationState)(i),this.mimeType),r=this.cd(),o=e.recommendedRepresentationId,a=(null==o?void 0:o.periodId)===this.getCurrentPeriodId();o&&a&&!n&&(r=o);var s=r?this.Yd(r):void 0;return s?(this.Id=!0,s):r},e.prototype.cd=function(){var e,t,i={hlsDependentSegments:this.Nd.possiblyDependentSegments,segmentDuration:this.jc.getSegmentDuration()};return null==(e=this.Od)?void 0:e.selectRepresentation(this.mimeType,i,null==(t=this.getCurrentAdaptationSet())?void 0:t.Representation)},e.prototype.dd=function(e){var t=this.lc?this.lc.representationId:null;this.Se("switching representation from ".concat(t," to ").concat(e.representationId)),this.jc.setRepresentationId(e),this.lc=e},e.prototype.invalidateOngoingRequests=function(){this.tc=!0},e.prototype.ed=function(e,t){var i,n=er(e,this.context,this.Qd),r=er(t,this.context,this.Qd),o=n?(0,D.representationToQuality)(n,this.mimeType):void 0,a=r?(0,D.representationToQuality)(r,this.mimeType):void 0;if(a){var s={targetQuality:a,targetQualityId:a.id,sourceQuality:o,sourceQualityId:null!=(i=null==o?void 0:o.id)?i:null};w.MimeTypeHelper.isVideo(this.mimeType)?this.context.eventHandler.dispatchEvent(h.PlayerEvent.VideoDownloadQualityChange,s):w.MimeTypeHelper.isAudio(this.mimeType)&&this.context.eventHandler.dispatchEvent(h.PlayerEvent.AudioDownloadQualityChange,s)}},e.prototype.fd=function(e){var t,i=this,r=(null==(t=this.Ed)?void 0:t.segmentNumber)!==void 0?this.Ed.segmentNumber+1:0,o=this.bd(e),l=!o.equals(this.lc);return l&&w.MimeTypeHelper.isAV(this.mimeType)&&this.ed(this.lc,o),this.tc=!1,this.Fd=this.od(o).then(function(){return i.kc&&i.jc.setAdaptationSetId(i.kc,o),l&&i.dd(o),i.jc.getNextSegmentInfo(e.time)}).then(function(e){var t,a=null!=(t=i.lc)?t:o;if(i.kd(e,r,a),i.gd(e))throw(0,E.isContextAvailable)(i.context)&&i.Se("invalidating ongoing SegmentInfo request for",n({}
14,e)),"ongoing segment info request was invalidated";return i.Ed=e,e}).catch(function(t){var r,l;if(i.Fd=void 0,function(e){return e instanceof s.PlayerError?[a.ErrorCode.SOURCE_MANIFEST_INVALID,a.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST].includes(e.code):e===f.RequestError.Failed||e===f.RequestError.TimedOut}(t)){var c=null!=(l=null!=(r=null==t?void 0:t.name)?r:null==t?void 0:t.message)?l:t;i.Se("HLS playlist loading failed for representation ".concat(o.representationId," (").concat(c,")"));var u=i.de(o);if(u)return i.Se("Trying with lower quality representation ".concat(u.representationId)),i.fd(n(n({},e),{recommendedRepresentationId:u}));i.ee(o,t)}throw t}).finally(function(){i.Hd=void 0}),this.Fd},e.prototype.gd=function(e){return this.tc&&e&&!e.isInitSegment&&!this.hd(e)},e.prototype.hd=function(e){return void 0!==this.Hd&&(0,I.isNumber)(e.startTime)&&(0,I.isNumber)(e.duration)&&this.Hd>=e.startTime&&this.Hd<=e.startTime+e.duration},e.prototype.getDataSegmentInfo=function(e){var t={periodId:this.sc,time:e};return this.lc&&this.lc.periodId===this.getCurrentPeriodId()?this.fd(n(n({},t),{recommendedRepresentationId:this.lc})):this.fd(t)},e.prototype.kd=function(e,t,i){e&&(this.ld(e,i),this.md(e),this.nd(i,e),e.duration||e.isInitSegment||(e.duration=this.jc.getSegmentDuration()),(void 0===e.segmentNumber||isNaN(e.segmentNumber))&&(e.segmentNumber=t),e.discardData=this.Nd.discardNextSegment,this.Nd.discardNextSegment=!1,this.Id&&(e.preventDownloadCanceling=!0,this.Id=!1))},e.prototype.ld=function(e,t){var i=er(t,this.context,this.Qd);i&&(e.representationId=t.representationId,e.internalRepresentationId=t,e.mimeType=this.mimeType,e.bitrate=i._bandwidth,e.periodId=t.periodId,e.codecs=this.getCodecs(),w.MimeTypeHelper.isAudio(this.mimeType)?(e.sampleRate=i._audioSamplingRate,e.width=void 0,e.height=void 0):w.MimeTypeHelper.isVideo(this.mimeType)&&(e.width=i._width,e.height=i._height,e.frameRate=i._frameRate))},e.prototype.md=function(e){if(w.MimeTypeHelper.isVideo(this.mimeType)&&!e.dateTime&&this.Ud.AKAMAI_DATETIME_PARSING&&this.gc){var t=null!=e.duration?this.gc.PlaylistUtils.getProgramDateTimeFromSegmentUrl(e.url,e.duration):void 0;t&&(e.dateTime=t)}},e.prototype.nd=function(e,t){var i=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(t){return t.getAvailableBaseURLsForRepresentation(e)},void 0,this.Qd.sourceIdentifier);t.availableBaseURLs=i,t.firstUsedBaseURLIndex=0,this.Ed&&this.Ed.lastUsedBaseURLIndex&&(t.firstUsedBaseURLIndex=this.Ed.lastUsedBaseURLIndex),t.lastUsedBaseURLIndex=t.firstUsedBaseURLIndex,this.qe()?(t.baseURL="",t.mediaURL||(t.mediaURL=t.url)):(t.baseURL=i[t.firstUsedBaseURLIndex],t.mediaURL=t.mediaURL||t.url,delete t.url),t.url=C.URLHelper.concatBaseUrlWithPartial(t.baseURL,t.mediaURL)},e.prototype.od=function(e){var t,i,n,r,o=this,a=null!=(i=null==(t=this.kc)?void 0:t.adaptationSetId)?i:"",s=null==(n=this.Rd.getState().activeTracks)?void 0:n[a],l=!(null!=(r=null==s?void 0:s.selectedRepresentationId)&&r.equals(e));return this.Rd.dispatch((0,F.setRepresentationIdAction)(e)),l?this.hc?this.hc.waitForRepUpdate(e).then(function(){return o.jc.updateRepresentation(e)}):Promise.reject("ManifestUpdateScheduler does not exist."):Promise.resolve()},e.prototype.pd=function(){var e;return this.isTransmuxerRequired()&&!!(null!=(e=this.Nd.transmuxer)&&e.isTransmuxing())},e.prototype.hasActiveTransmuxingJobs=function(){var e;return!!this.isTransmuxerRequired()&&(this.hasDelayedSegmentsInTransmuxer()||!!(null!=(e=this.Nd.transmuxer)&&e.hasActiveJobs()))},e.prototype.hasDelayedSegmentsInTransmuxer=function(){var e;return w.MimeTypeHelper.isAudio(this.mimeType)&&this.isTransmuxerRequired()&&!!(null!=(e=this.Nd.transmuxer)&&e.hasDelayedAudioSegments())},e.prototype.rd=function(){var e,t,i=this;(null!=(t=null==(e=this.Nd.transmuxer)?void 0:e.discardCurrentJobs(this.mimeType))?t:[]).forEach(function(e){return et(e.mp2tsSegment.getSegmentInfo(),i.Rd)})},e.prototype.cancelLoading=function(){var e;this.tc=!0,null==(e=this.Wd)||e.cancel().catch(this.qd)},e.prototype.seekTo=function(e){var t=this;null!==e&&this.kc&&(this.cancelLoading(),this.rd(),this.nc=[],this.hasDownloadError=!1,this.oc=!1,this.Md&&this.Md.reset(),this.isTransmuxerRequired()&&this.Nd.transmuxer&&this.Nd.transmuxer.resetCaptionParser(),e>=0&&(this.Hd=e,this.jc.seekTo(e),this.context.serviceManager.maybeCall(u.ServiceName.TimedMetadataService,function(e){return e.clearSegmentBoundMetadata(t.mimeType)})))},e.prototype.sd=function(e){var t,i=this,n=this.te(this.sc),r=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.getMediaPresentationDuration()},0,this.Qd.sourceIdentifier);if(n&&n.hasOwnProperty("_duration"))t=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.getPeriodDuration(i.sc)},void 0,this.Qd.sourceIdentifier);else{if(0===r)return!1;t=r}return this.jc.hasNext(t)},e.prototype.td=function(e){var t=this;if(this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.isAvailabilityEndTimeExceeded()},!1,this.Qd.sourceIdentifier))return this.Td.log("Stream (".concat(this.mimeType,") availability end time reached, stopping download of further segments.")),this.oc=!0,!1;this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.isLastPerio
vendor: 8,567 bytes, line 14
14d(t.sc)},!1,this.Qd.sourceIdentifier)&&this.jc.resolvePendingSegmentInfoRequests();var i=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.getPeriodDuration(t.sc)},void 0,this.Qd.sourceIdentifier);return this.jc.hasNext(i)},e.prototype.hasNext=function(e){var t=this,i=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.isLastPeriod(t.sc)},!1,this.Qd.sourceIdentifier);return!(this.oc&&i||!this.kc||!this.jc)&&(this.se()?this.td(e):this.sd(e))},e.prototype.ud=function(e){var t=this;if(e.transmuxedSegments.every(function(e){return null!==e.getCodec()})){!this.Nd.possiblyDependentSegments&&function(e){return e.transmuxedSegments.some(function(e){return w.MimeTypeHelper.isAV(e.getMimeType())&&!e.isIndependentlyDecodable()})}(e)&&(this.Se("Encountered HLS segment not starting with a key frame"),this.Nd.possiblyDependentSegments=!0);var i=e.transmuxedSegments.find(function(e){return"video/mp4"===e.getMimeType()}),n=e.transmuxedSegments.filter(function(e){return"audio/mp4"===e.getMimeType()}),r=[i,n[this.Nd.muxedAudioTrackIndex]||n[0]].filter(function(e){return!!e});r.forEach(function(e){return t.rc.maybeAdjustTimestampOffsetAtDiscontinuityChange(e,t.jc)}),this.Wd&&this.kc&&this.qc.onMuxedSegmentAvailable(e,r,this.kc,this.Wd);var o=r[r.length-1];o&&o.getMimeType().indexOf("mp4")>-1&&(this.oc=o.isLastSegment()),this.Se("Transmuxing done",e.originalSegment.getUrl())}else{var a=e.originalSegment.getUrl();this.Se("Discarding muxing because codecs were not available in the segment: ".concat(a))}},e.prototype.hasPendingSegments=function(e){var t,i,n,r,o,a;return e?(o=this.isTransmuxerRequired()&&!!this.Nd.transmuxer&&this.Nd.transmuxer.isTransmuxingSegmentsForPeriod(e),a=null!=(i=null==(t=this.Wd)?void 0:t.isLoading(e))&&i):(o=this.pd(),a=null!=(r=null==(n=this.Wd)?void 0:n.isLoading())&&r),a||o||this.Jd||!!this.Fd},e.prototype.vd=function(e){var t=this;if(this.Nd.transmuxer){var i=e.getSegmentInfo();this.Nd.transmuxer.isSetupForDiscontinuity(i.discontinuitySequenceNumber)||(void 0===i.startTime&&(this.Se("resetting segment playback times for new initialization"),this.Rd.dispatch((0,V.resetSegmentPlaybackTimes)())),(0,W.initializeHlsSegmentStartTimes)(e,this.context,this.jc));var n=Date.now();this.Nd.transmuxer.transmuxSegment(e).then(function(e){var r,o=(0,P.toSeconds)(Date.now()-n),a={time:o,representationId:i.internalRepresentationId};return t.context.store.dispatch((0,v.addMetricsValue)(t.mimeType,b.MetricType.TransmuxingTime,a)),t.context.logger.debug("Transmuxed ".concat(t.mimeType," segment in: ").concat(null==o?void 0:o.toFixed(2),", quality: ").concat(null!=(r=i.representationId)?r:"")),t.ud(e)}).catch(function(i){et(e.getSegmentInfo(),t.Rd),i!==o.TransmuxingRejectionReason.TRANSMUXING_ABORTED?t.Dd(e,"Transmuxing failed: ".concat(i)):t.Se(i,e.getUrl())})}},e.prototype.wd=function(e){var t;if(!this.Pe()||this.Bd(e)){var i=(0,q.resolveContainerFormat)(this.mimeType,e,this.qe());this.Se("Container format is ".concat(null==i?void 0:i.source)),i&&this.Rd.dispatch((0,F.setContainerFormatAction)(e.getRepresentationId(),i)),this.Nd.isTransmuxingRequired=!!(i&&i.source!==i.target),!this.Nd.isTransmuxingRequired&&w.MimeTypeHelper.isAV(this.mimeType)&&(null==(t=this.Nd.transmuxer)||t.dispose(),this.context.serviceManager.maybeCall(u.ServiceName.SubtitleService,function(e){e.setTransmuxer(void 0)},void 0,this.Qd.sourceIdentifier))}},e.prototype.xd=function(e){if(this.Bd(e))return this.Se("Warning: Loaded segment has size 0 bytes, skipping further processing! May cause gap!",e.getUrl()),null==(t=this.Md)||t.reset(),o.SegmentVerificationResult.Drop;if(this.isTransmuxerRequired()){if(!M.ModuleManager.has(R.ModuleName.ContainerTS))return this.context.eventHandler.fireError(new k.PlayerModuleMissingError(R.ModuleName.ContainerTS)),o.SegmentVerificationResult.Drop}else if(!this.re()&&this.Cd(e)){if(this.context.settings.DROP_INVALID_SEGMENTS)return this.Dd(e,"The loaded MP4 segment is invalid, skipping further processing! May cause gap!"),o.SegmentVerificationResult.Drop;this.Dd(e,"The loaded MP4 segment is invalid. This may cause playback issues!")}var t,i=M.ModuleManager.get(R.ModuleName.LowLatency,!1),n=this.context.serviceManager.get(u.ServiceName.ManifestService,this.Qd.sourceIdentifier);if((0,G.isPlayingLowLatencyHls)(this.context)&&i&&n){var r=i.verifyLlHlsSegment(e,n);if(r===o.SegmentVerificationResult.Drop)return this.Se("LL-HLS Segment Verification: Dropping (partial) segment as it disappeared from playlist",e.getUrl()),o.SegmentVerificationResult.Drop;if(r===o.SegmentVerificationResult.Park)return this.yd(e),o.SegmentVerificationResult.Park}return o.SegmentVerificationResult.Publish},e.prototype.yd=function(e){var t=this,i=(0,_.subscribe)(this.Rd)(function(t){var i;if(t.manifest)return null==(i=(0,A.findRepresentation)(t.manifest,e.getRepresentationId()))?void 0:i._requestTimestamp},function(){i(),t.zd(i),t.Ad(e)},function(e,t){return e!==t});this.Sd.push(i)},e.prototype.zd=function(e){var t=this.Sd.findIndex(function(t){return t===e});t>-1&&this.Sd.splice(t,1)},e.prototype.Bd=function(e){var t=e.getData();return!!(t&&t.byteLength<1)},e.prototype.Cd=function(e){if(!M.ModuleManager.has(R.ModuleName.ContainerMP4)||!w.MimeTypeHelper.isAV(this.mimeType))return!1;var t=M.ModuleManager.get(R.ModuleName.ContainerMP4,!1),i=t.isValidMp4,n=t.MP4Parser;return this.ic instanceof n&&!i(e)},e.prototype.Dd=function(e,t){this.Vd.dispatchEvent(h.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.PLAYBACK_INVALID_DATA_SEGMENT_ENCOUNTERED,t,{mimeType:e.getMimeType(),segmentUrl:e.getUrl()}))},e.prototype.Oe=function(){var e=this.Rd.getState();return e&&(0,B.getContainerFormat)(e,w.MimeTypeHelper.getMediaType(this.mimeType))},e.prototype.Pe=function(){return!!this.Oe()},e.prototype.Qe=function(e){var t=this;return this.Fd=void 0,this.Jd=!0,e?(this.nc.push(e),this.pc=void 0,this.Re(e),this.Te(e).catch(function(i){return t.We(i,e)}).finally(function(){return t.Jd=!1})):Promise.resolve()},e.prototype.Re=function(e){var t=this.getInitSegmentInfoForDataSegmentInfo(e);t&&(e.init=t)},e.prototype.Se=function(e){for(var t,i,n,o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];null!=(i=this.Td)&&i.isLevelEnabled(p.LogLevel.DEBUG)&&(t=this.Td).debug.apply(t,r(["[".concat(this.mimeType,"][").concat(null==(n=this.lc)?void 0:n.representationId,"] SegmentController: ").concat(e)],o,!1))},e.prototype.Te=function(e){var t;return null!=(t=this.Td)&&t.isLevelEnabled(p.LogLevel.DEBUG)&&this.Se("Loading ".concat(JSON.stringify(e))),this.Ue(e)},e.prototype.getInitSegmentInfoForDataSegmentInfo=function(e){var t;return(t=e.init?n(n({},e.init),{isInitSegment:!0,internalRepresentationId:e.internalRepresentationId}):this.jc.getInitSegmentInfo(e.internalRepresentationId))&&this.kd(t,void 0,e.internalRepresentationId),t},e.prototype.Ue=function(e){var t=this;return this.Wd?this.Wd.getSegment(e).then(function(e){return t.Ve(e)}):Promise.reject()},e.prototype.Ve=function(e){var t=this;return new Promise(function(i,n){e.transform(function(e){(function(e,t){var i=t.findIndex(function(t){return(0,X.areSegmentsIdentical)(t,e)});i>-1&&t.splice(i,1)})(e.getSegmentInfo(),t.nc),t.Ad(e)},function(){return i()},function(e){var i=e.message,r={reason:i};return n(r),r.reason!==J.SegmentLoadingErrorReason.CANCEL&&t.Se("Error loading segment",i),i})})},e.prototype.We=function(e,t){null==(i=(0,S.getSourceStore)(this.context))||i.dispatch((0,m.clearPreferredBitrateForMimeTypeAction)(this.mimeType)),et(t,this.Rd);var i,n=null!=e&&e.info?e.info.response.status:0;switch(null==e?void 0:e.reason){case J.SegmentLoadingErrorReason.CANCEL:this.Se("Download was cancelled as the segment is probably outdated");break;case J.SegmentLoadingErrorReason.ERROR_DECRYPTING:this.Se("Could not decrypt segment",t.url),this.Vd.dispatchEvent(h.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.DRM_COULD_NOT_DECRYPT_SEGMENT));break;case J.SegmentLoadingErrorReason.ERROR_LOADING:this.ae(n,t,J.SegmentLoadingErrorReason.ERROR_LOADING);break;case J.SegmentLoadingErrorReason.TIMEOUT:this.ae(n,t,J.SegmentLoadingErrorReason.TIMEOUT);break;case J.SegmentLoadingErrorReason.ABR_TIMEOUT:this.ie(t);break;default:this.Se("Unexpected error while loading the segment",{url:t.url,error:e})}},e.prototype.Xe=function(e,t){var i=this;return this.gc&&this.manifestLoader instanceof this.gc.M3u8Loader?this.manifestLoader.switchToBackupStream(e,t).then(function(e){return e.length>0}).catch(function(e){return i.Se("Could not switch to HLS backup stream
14: ".concat(e)),Promise.resolve(!1)}):Promise.resolve(!1)},e.prototype.Ye=function(){return!!(this.gc&&this.manifestLoader instanceof this.gc.M3u8Loader)&&this.manifestLoader.isSwitchingToBackupStreams()},e.prototype.Ze=function(){var e=this.Ud.CHUNKED_CMAF_STREAMING?1:this.nc.length;return this.jc.getIndex()-e},e.prototype.ae=function(e,t,i){null!=t&&t.isPreloadHint?this.Se("Ignoring download error of preload hint segment.",t.url):(this.Se("Failed to load segment (code: ".concat(e,") ").concat(t.url)),this.Gd.shouldTryAlternatives(e)?this.be(t,e,i):(this.ge(t),this.hasDownloadError=!0))},e.prototype.be=function(e,t,i){var n=this;if(this.lc&&this.lc.equals(e.internalRepresentationId)){var r=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return n.kc&&e.getRepresentation(n.kc,n.lc.representationId)},null,this.Qd.sourceIdentifier);if(r){var o=!1;this.Xe(r,e).then(function(e){return o=e}).then(function(){var e;return null==(e=n.Wd)?void 0:e.cancel()}).then(function(){return n.ce(o,e,t,i)})}}else this.Se("Ignoring download error of previous representation.")},e.prototype.ce=function(e,t,i,n){var r,o=this.Ze();if(this.nc=[],e)this.jc.setIndex(Math.max(0,o));else if(r=this.Gd.switchBaseURL(t))this.context.logger.debug("Switching ".concat(this.mimeType," segment location to ").concat(r.baseURL)),this.Qe(r);else{var a=this.de(this.lc);if(a){if(this.Pd){this.jc.setIndex(Math.max(0,o)),this.Se("Trying with lower quality segment ".concat(a.representationId));var s=this.Pd.getTimeForNextSegment((0,H.getTrackIdentifier)(t)),l=this.jc.getLatestTimeForPossibleSwitch(s);this.getNext(l,a)}}else this.hasDownloadError=!0,this.fe(t,i,n)}},e.prototype.de=function(e){var t,i,n;if(e&&null!=(t=this.Od)&&t.isAuto(this.mimeType)){var r=null!=(n=null==(i=this.ue(this.kc))?void 0:i.Representation)?n:[];return this.Gd.switchQuality(r,e)}},e.prototype.ee=function(e,t){var i;if(this.se()&&this.Ud.INFINITE_RETRIES_FOR_LIVE){this.Se("Could not load any segment of any quality from any CDN: restart retries."),this.Gd.downloadSuccess(!1);var n=er(this.lc,this.context,this.Qd);n&&(this.Rd.dispatch((0,V.updateRepresentationFailedDownloadAction)(n._internalId,null)),null==(i=this.hc)||i.scheduleRepresentationUpdate(n))}else{var r=er(e,this.context,this.Qd);(0,K.throwPlaylistDownloadError)(this.context,"Could not load segments of any quality from any CDN",r,t)}},e.prototype.fe=function(e,t,i){this.ge(e),this.se()&&this.Ud.INFINITE_RETRIES_FOR_LIVE?(this.Se("Could not load current segment of any quality from any CDN (all retries failed), skipping it..."),this.he(e)):(0,Q.throwDownloadError)(this.context,"Segment not available at any quality or location",t,e,i)},e.prototype.ge=function(e){var t,i=(0,Z.getSegmentInfoTimeRange)(e);if(i&&(0,E.isContextAvailable)(this.context)&&e.mimeType){var n=(0,H.getTrackIdentifier)(e);null==(t=(0,S.getSourceStore)(this.context))||t.dispatch((0,z.addStreamTimeRange)(n,i,H.StreamTimeRangeType.Failed))}},e.prototype.he=function(e){if(this.Gd.downloadSuccess(!1),e.hasDownloadFailed=!0,null!=e.startTime&&null!=e.duration){var t=e.startTime+e.duration,i=this.jc.adjustTimeToNextSegmentStart(t);this.getNext(i)}},e.prototype.ie=function(e){var t,i=this;(0,E.isContextAvailable)(this.context)&&(this.Se("Download took too long, cancelled it",e.url),!e.isInitSegment&&this.jc&&(null==(t=this.Wd)||t.cancel().then(function(){if(i.jc){var e=i.Ze();i.nc=[],i.Se("Trying to get the same segment with a lower bitrate."),i.jc.setIndex(Math.max(0,e))}})))},e.prototype.ke=function(e,t,i){var n=this;if(void 0===i&&(i=!1),this.Xd&&!(null!=t&&t.id))return this.Kd=t,void(this.Wd&&this.cancelLoading());var r=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(r){return r.findAdaptationSet(e,n.mimeType,t,i)},null,this.Qd.sourceIdentifier);return r?(this.Kd=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.getLangObjectFromAdaptationSet(r,n.mimeType)},void 0,this.Qd.sourceIdentifier),r._internalId):void 0},e.prototype.getCurrentAdaptationSet=function(){return this.ue(this.kc)}
vendor: 15,258 bytes, line 14
14,e.prototype.getAdaptationSetForPeriodId=function(e){return this.ue(this.mc[e])||this.getCurrentAdaptationSet()},e.prototype.updateMpd=function(){this.Se("Caught a manifest update event");var e,t=!this.te(this.sc);for(var i in this.kc=this.ke(this.sc,this.Kd,!1),!t&&this.kc&&(this.mc[this.sc]=this.kc,null==(e=this.Od)||e.setAdaptationSetId(this.mimeType,this.kc),this.jc.setAdaptationSetId(this.kc,this.lc,{isPeriodSwitch:!1,isManifestUpdate:!0})),this.mc)this.te(i)||delete this.mc[i]},e.prototype.activateSubtitleSegmentController=function(e){var t;this.Xd&&(this.kc&&(this.jc.setAdaptationSetId(this.kc),null==(t=this.Od)||t.setAdaptationSetId(this.mimeType,this.kc)),isNaN(this.jc.getTimestampOffset())&&this.jc.setTimestampOffset(0),this.seekTo(e))},e.prototype.setCurrentLangObj=function(e){var t;if(this.Nd.isAvMuxedTogether&&w.MimeTypeHelper.isVideo(this.mimeType)){var i=this.ue(this.kc);if(null!=i&&i.ContentComponent){var n=i.ContentComponent.find(function(t){return"audio"===t._contentType&&t._id===e.id});if(n)return this.Nd.muxedAudioTrackIndex=i.ContentComponent.filter(function(e){return"audio"===e._contentType}).indexOf(n),void(this.Kd=e)}}e.id!==(null==(t=this.Kd)?void 0:t.id)&&this.le(e)},e.prototype.le=function(e){var t=this.kc;if(this.kc&&this.Rd.dispatch((0,F.removeActiveTrackAction)(this.kc)),this.kc=this.ke(this.sc,e),this.kc){var i=this.ue(this.kc);i&&this.Rd.dispatch((0,F.setMediaTypeAction)(i._internalId,(0,L.resolveMediaTypes)(i))),this.mc[this.sc]=this.kc,t&&!this.kc.equals(t)&&this.me(e)}},e.prototype.me=function(e){var t,i;this.Kd=e,this.Ld=e,this.Se("Trying to set language to ID ".concat(this.Kd.id)+" (lang: ".concat(this.Kd.lang,") for mpd handler and adaption handler")),this.kc&&(this.jc.setAdaptationSetId(this.kc),null==(t=this.Od)||t.setAdaptationSetId(this.mimeType,this.kc),null==(i=this.Od)||i.selectRepresentation(this.mimeType))},e.prototype.getCurrentLangObj=function(){return this.Kd},e.prototype.stop=function(){var e,t;this.cancelLoading(),null==(e=this.Wd)||e.clearCache(),null==(t=this.Od)||t.shutdown(this.mimeType)},e.prototype.ne=function(){var e,t=this,i=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.getFirstPeriod()},void 0,this.Qd.sourceIdentifier);!this.sc&&i&&(this.sc=i._id);var n=Y.MPDHandlerFactory.createInstance(this.context,this.Qd,this.mimeType,this.sc);if(n){this.jc=n;var r,o=en(this.mimeType);o&&(r=(0,N.createSegmentParser)(this.context,o)),r?this.ic=r:this.Se("Could not create segment parser for mime type"),this.rc=new ee.TimestampOffsetService(this.context,this.mimeType),this.qc=new $.SegmentPreProcessor(this.context,this.mimeType,this.onDataAvailableCallback,this.Nd,this.Gd,this.rc,this.ic),this.qc.setMpdHandler(this.jc),this.hasDownloadError=!1,this.kc=this.ke(this.sc,this.Kd),this.kc&&(this.mc[this.sc]=this.kc),this.context.serviceManager.maybeCall(u.ServiceName.SegmentService,function(e){return e.add({mimeType:t.mimeType,shouldDownloadBeCancelledCallback:t.je},t.ic,t.Kd)}),this.qe()&&(this.Md=new this.gc.HlsTimelineTracker(this.context,this.Ud.GAP_TOLERANCE),this.qc.setHlsTimelineTracker(this.Md)),w.MimeTypeHelper.isMP4(this.mimeType)&&this.context.serviceManager.maybeCall(u.ServiceName.SubtitleService,function(e){e.setupCea608CaptionExtractor(t.context.logger)},void 0,this.Qd.sourceIdentifier),this.kc&&(null==(e=this.Od)||e.setAdaptationSetId(this.mimeType,this.kc),this.jc.setAdaptationSetId(this.kc,void 0,{isPeriodSwitch:!0}),this.se()&&!this.Ud.ENABLE_SEEK_FOR_LIVE&&this.jc.timeShift(0,this.sc)),this.oc=!1}else this.Vd.fireError(new s.PlayerError(a.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"Could not create an MPD handler for the given source.",this.Qd.sourceIdentifier))},e.prototype.getSegmentInfos=function(){var e,t=this,i=null==(e=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.getAvailableBaseURLsForRepresentation(t.lc)},null,this.Qd.sourceIdentifier))?void 0:e[0];return this.jc.getSegmentInfos(i)},e.prototype.getCurrentPeriodId=function(){return this.sc},e.prototype.oe=function(e){var t=this;return this.Ld&&this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(i){return i.isLanguageAvailable(e,t.mimeType,t.Ld)},!1,this.Qd.sourceIdentifier)?this.Ld:this.Kd},e.prototype.switchPeriod=function(e){var t,i,n,r=this,o=this.oe(e);if(this.Se("switching period from ".concat(this.sc," to ").concat(e)),this.cancelLoading(),null==(t=this.Wd)||t.clearCache(),this.pe(),this.sc=e,this.lc=void 0,this.kc=this.ke(e,o,!0),this.kc&&(this.mc[e]=this.kc),this.kc){null==(i=this.Od)||i.setAdaptationSetId(this.mimeType,this.kc);var l=this.jc.getPendingSegmentInfoRequest(),c=Y.MPDHandlerFactory.createInstance(this.context,this.Qd,this.mimeType,e,o);c?(this.jc.dispose(),this.jc=c):this.Vd.fireError(new s.PlayerError(a.ErrorCode.SOURCE_MANIFEST_INVALID)),this.qc.setMpdHandler(this.jc),this.jc.setPendingSegmentInfoRequest(l),this.jc.setAdaptationSetId(this.kc,void 0,{isPeriodSwitch:!0})}if(this.isTransmuxerRequired()){var d=this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return r.kc&&e.findDownloadedHlsRepresentation(r.kc)},null,this.Qd.sourceIdentifier);d&&this.jc.setRepresentationId(d._internalId),this.Md&&this.Md.reset(),null==(n=this.Wd)||n.clearCache(!1)}this.hasDownloadError=!1,this.oc=!1},e.prototype.getMPDHandler=function(){return this.jc},e.prototype.getIndex=function(){return this.jc&&this.jc.getIndex()||0},e.prototype.getSourceBufferTypes=function(){var e=[];return this.isTransmuxerRequired()&&this.Nd.isAvMuxedTogether?(e.push("video/mp4"),e.push("audio/mp4")):e.push(this.mimeType),e},e.prototype.getCodecs=function(){var e,t=this.getCurrentAdaptationSet();return null!=(e=t&&(0,O.getCodecsFromAdaptationSet)(t))?e:void 0},e.prototype.getLiveEdgeTime=function(){return this.se()?this.jc.getLiveEdgeTime():-1},e.prototype.setAdaptionLogicStartupPhase=function(){var e;null==(e=this.Od)||e.setStartupPhase(this.mimeType)},e.prototype.getMimeType=function(){return this.mimeType},e.prototype.pe=function(){var e=this,t=this.context.store.getState(),i=t?(0,y.getMetricsState)(t):void 0;if(this.Wd&&i){var n=this.Rd.getState(),r=n?(0,j.getPlayingPeriodId)(n):void 0;this.Wd.removeCachedInitSegments(function(t){return e.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.isPrecedingPeriod(r,t.getPeriodId())},!1,e.Qd.sourceIdentifier)}),((0,y.getMetricsHistory)(i,this.mimeType,b.MetricType.CachedInitSegments)||[]).filter(function(t){var i=t.value.internalRepId.periodId;return e.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.isPrecedingPeriod(r,i)},!1,e.Qd.sourceIdentifier)}).forEach(function(t){return e.context.store.dispatch((0,v.removeMetricsValue)(e.mimeType,b.MetricType.CachedInitSegments,t))})}},e.prototype.canLoad=function(){var e;return!!(null!=(e=this.Wd)&&e.canLoad())},e.prototype.isTransmuxerRequired=function(){return this.Nd.isTransmuxingRequired},e.prototype.setTransmuxer=function(e){this.Nd.transmuxer=e},e.prototype.getTransmuxer=function(){return this.Nd.transmuxer},e.prototype.resetTransmuxer=function(){this.Nd.transmuxer&&this.Nd.transmuxer.reset()},e.prototype.qe=function(){return this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.isHlsManifest()},!1,this.Qd.sourceIdentifier)},e.prototype.re=function(){return this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.isSmoothManifest()},!1,this.Qd.sourceIdentifier)},e.prototype.se=function(){return this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(e){return e.isLive()},!1,this.Qd.sourceIdentifier)},e.prototype.te=function(e){return this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(t){return t.findPeriod(e)},null,this.Qd.sourceIdentifier)},e.prototype.ue=function(e){return this.context.serviceManager.maybeCall(u.ServiceName.ManifestService,function(t){return t.getAdaptationSet(e)},null,this.Qd.sourceIdentifier)},e.prototype.dispose=function(){var e,t;(0,d.dispose)(this.jc),(0,d.dispose)(this.rc),(0,d.dispose)(this.qc),null==(e=this.Od)||e.release(this.mimeType),this.Md&&this.Md.dispose(),(0,E.isContextAvailable)(this.context)&&(null==(t=this.context.serviceManager.get(u.ServiceName.SegmentService))||t.disposeOfType(this.mimeType,this.Kd)),this.Sd.forEach(function(e){return e()})},e}()},50429:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.throwDownloadError=function(e,t,i,u,d){e.eventHandler.dispatchEvent(s.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.PLAYBACK_DECODE_RETRIES_EXCEEDED)),e.eventHandler.fireError(function(e,t,i,o,a){var s=e.sourceContext.sourceIdentifier;if(0===i)return t&&t===l.RequestError.TimedOut||a===c.SegmentLoadingErrorReason.TIMEOUT?new r.PlayerError(n.ErrorCode.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT,{segmentUrl:o.url,mimeType:o.mimeType},"Failed to load the segment: the request timed out.",s):new r.PlayerError(n.ErrorCode.NETWORK_ERROR,{url:o.url,statusCode:i},t,s);e.logger.debug(t);var u={message:t};return o.url&&(u.segment=function(e){return{url:e.url,mimeType:e.mimeType,codecs:e.codecs}}(o)),a===c.SegmentLoadingErrorReason.TIMEOUT?new r.PlayerError(n.ErrorCode.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT,u,t,s):new r.PlayerError(n.ErrorCode.NETWORK_ERROR,u,t,s)}(e,t,i,u,d))};var n=i(40306),r=i(3336),o=i(25926),a=i(4224),s=i(3714),l=i(77401),c=i(65244)},77286:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoProvider=void 0;var n=i(58313),r=i(90919);t.SegmentInfoProvider=function(){function e(){}return e.findSegmentInfoOfRepresentation=function(t,i){if(i.SegmentList){var n=i.SegmentList[0].SegmentURL,r=t.getUrl(),o=n.find(function(t){return e.getSegmentInfoUrl(t,i)===r});if(o)return o}return null},e.findHlsRepresentationForSegment=function(e,t){var i,n,o=t.Representation.find(function(t){return e.getRepresentationId().representationId===t._internalId.representationId});if(o){var a=(0,r.findSegmentUrlIndexWithinSegmentList)(e.getSegmentInfo(),null!=(n=null==(i=o.SegmentList)?void 0:i[0].SegmentURL)?n:[]);if(-1!==a)return{representation:o,index:a}}},e.getSegmentInfoUrl=function(e,t){var i=e._media;return n.URLHelper.isUrlAbsolute(i)||(i=n.URLHelper.concatUrlParts(t.BaseURL[0],i)),i},e}()},25248:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoService=void 0,t.getSegmentInfoId=function(e){return e.url+(e.byteRange?","+JSON.stringify(e.byteRange):"")};var r=i(80813),o=i(94685);function a(e,t,i){void 0===i&&(i=[]);var n=i[i.length-1],r=n?n.startTime+n.duration:0;return t<=0||!e.hasNext(r)?Promise.resolve(i):e.getDataSegmentInfo(r).then(function(n){return n.duration&&(t-=n.duration),i.push(n),a(e,t,i)})}t.SegmentInfoService=function(){function e(){this.we=[]}return e.prototype.updatePlayerContext=function(e){this.ve=e},e.prototype.setSegmentControllers=function(e){this.we=e},e.prototype.getSegmentControllerMimeTypes=function(){return this.we.map(function(e){return e.getMimeType()})},e.prototype.getSegmentInfos=function(e,t){if(!(0,o.isContextAvailable)(this.ve))return Promise.resolve([]);var i=this.ve.serviceManager.get(r.ServiceName.ManifestService,this.ve.sourceContext.sourceIdentifier).getPeriodIdForTime(e);return Promise.all(this.we.map(function(r){return function(e,t){return e.getCurrentPeriodId()!==t.targetPeriodId&&e.switchPeriod(t.targetPeriodId),e.seekTo(t.startTime),e.getCurrentAdaptationSet()?function(e,t){return a(e,t.duration).then(function(t){if(t.length>0){var i=e.getInitSegmentInfoForDataSegmentInfo(t[0]);if(i)return n([i],t,!0)}return t})}(e,t):Promise.resolve([])}(r,{startTime:e,duration:t,targetPeriodId:i})})).then(function(e){return e.flatMap(function(e){return e})})},e.prototype.dispose=function(){this.we=[]},e}()},65439:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isSegmentTiming=function(e){return"startTime"in e&&(0,n.isNumber)(e.startTime)&&"duration"in e&&(0,n.isNumber)(e.duration)},t.findSegmentIndexForTime=function(e,t,i){var n=!e||!e.length,o=t<e[0].startTime+e[0].duration;if(n||o)return 0;var a=e.length-1;if(t>=e[a].startTime)return a;var s=Math.min(Math.floor(Math.max(t-e[0].startTime,0)/i),e.length-1);return r(e[0])&&r(e[s])?function(e,t,i){for(;e[i]&&e[i].startTime>t;)i--;for(;e[i]&&e[i].startTime+e[i].duration<=t;)i++;return Math.min(i=Math.max(i,0),e.length-1)}(e,t,s):null},t.createInitSegmentInfoBase=function(e){var t=e._internalId;return{internalRepresentationId:t,representationId:t.representationId,periodId:t.periodId,mimeType:e._mimeType,isInitSegment:!0}},t.getSegmentInfoTimeRange=function(e){if(null!=e&&e.duration&&(null==e?void 0:e.startTime)!==void 0)return{start:e.startTime,end:e.startTime+e.duration}};var n=i(23068);function r(e){return e&&(0,n.isNumber)(e.startTime)}},63066:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentListMPDHandler=t.PHANTOM_SEGMENT_URL=void 0,t.assignSegmentStartTimesFromHlsRepresentation=S,t.copyPropValues=T,t.getMatchingPart=w;var r=i(66790),o=i(80813),a=i(77179),s=i(20649),l=i(74853),c=i(52424),u=i(89927),d=i(23068),h=i(88052),p=i(62756),f=i(50827),m=i(72498),g=i(60729),v=i(54053),y=i(65439);function b(e,t){var i=e[String(t)];return i&&i.startTime>0?i.startTime:(i=e[String(t-1)])&&i.endTime>0?i.endTime:null}function S(e,t,i){var n;e.length&&i.hasSegmentStartTimeForHlsRepresentation(t)&&(null!=e[0].startTime?n=(0,l.findIndexFromEnd)(e,function(e){return null!=e.startTime})+1:(e[0].startTime=i.getStartTimeForHlsSegment(t,e[0]),n=1),(0,l.forEachFromIndex)(e,n,function(e,t){return t.startTime=e.startTime+e.duration}))}function _(e){return e.url.endsWith(t.PHANTOM_SEGMENT_URL)}function E(e,i){var n=i.duration-e.duration;return T(i,e,["url","mediaURL","duration","parts","init","key","discontinuitySequenceNumber","isDiscontinuityStart"]),e.url.endsWith(t.PHANTOM_SEGMENT_URL)||(e.url=(0,s.forceReallocation)(e.url)),n}function T(e,t,i){i.forEach(function(i){return t[i]=e[i]})}function w(e,t,i){var n,r=null==(n=e.parts)?void 0:n.every(y.isSegmentTiming);if(e.parts&&r){var o=e.parts,a=o.reduce(function(e,t){return e+t.duration},0)/o.length,s=(0,y.findSegmentIndexForTime)(o,t,a);if(null!=s)return i?e.parts[0]:(s=A(t,s,o),e.parts[s])}}function A(e,t,i){var n=i[t],r=n.startTime+n.duration;return Math.abs(e-n.startTime)<=Math.abs(e-r)?t:t+1}t.PHANTOM_SEGMENT_URL="PHANTOM-SEGMENT",t.SegmentListMPDHandler=function(){function e(e,t){this.xe=e,this.ye=t,this.Ae=e.settings,this.ze=e.logger,this.Ge=e.serviceManager.get(o.ServiceName.ManifestService,this.ye.sourceIdentifier),this.Fe=0,this.Ie={},this.He=NaN}return Object.defineProperty(e.prototype,"Je",{get:function(){return this.xe.serviceManager.get(o.ServiceName.PlayerStateService)}
14,enumerable:!1,configurable:!0}),e.prototype.Ke=function(e,t){if(!e)return null;var i,o={isInitSegment:!1,url:e._media,duration:e._duration,internalRepresentationId:t,periodId:t.periodId};if(e._key&&e._key.method!==r.HlsEncryptionMethod.NONE&&(o.key=e._key),void 0!==e._playbackTime&&(o.startTime=e._playbackTime),e._dateTime&&(o.dateTime=e._dateTime),e._metadata&&(o.metadata=e._metadata),e._byteRange&&(o.byteRange=e._byteRange),e._init&&(o.init=e._init,(null==(i=e._init.key)?void 0:i.method)===r.HlsEncryptionMethod.NONE&&(o.init=n({},o.init),delete o.init.key)),void 0!==e._mediaSequence&&(o.mediaSequence=e._mediaSequence),void 0!==e._discontinuitySequenceNumber&&(o.discontinuitySequenceNumber=e._discontinuitySequenceNumber),e._parts){var a=o.dateTime;o.parts=e._parts.map(function(e){var t=function(e,t){var i={url:e.uri,duration:e.duration,isInitSegment:!1,internalRepresentationId:t.internalRepresentationId,isPreloadHint:!!e.isPreloadHint,isIndependent:!!e.independent};return e.byteRange&&(i.byteRange=e.byteRange),t.key&&(i.key=t.key),t.init&&(i.init=t.init),(0,d.isDefined)(t.mediaSequence)&&(i.mediaSequence=t.mediaSequence),(0,d.isDefined)(t.discontinuitySequenceNumber)&&(i.discontinuitySequenceNumber=t.discontinuitySequenceNumber),i}(e,o);return a&&(t.dateTime=a,t.startTime=(0,u.toSeconds)(a.getTime()),a=new Date(a.getTime()+(0,u.toMilliSeconds)(e.duration))),t})}return o},e.prototype.Le=function(e,t,i){if(t.SegmentURL.length<1)return e.entries=[],e.totalDuration=0,e.entries.length;for(var n=this.Ke(t.SegmentURL[0],i),r=0,o=0,a=0;a<e.entries.length;a++){var s=e.entries[a];if((0,f.isIdenticalSegmentInfo)(s,n))break;r+=s.duration,e.entries.splice(a,1),a--,o++,this.Ce.equals(i)&&this.rewindOneSegment()}return e.totalDuration-=r,o},e.prototype.Me=function(e,t,i,n){for(var r=[],o=e.entries[e.entries.length-1],a=0,s=n?function(e){var t,i=[];return null==(t=e.S)||t.forEach(function(e){i.push(e);for(var t=e._r?parseInt(e._r):0;t>0;)i.push({_d:e._d}),t--}),i}(n):void 0,l=this.Mf(i),c=t.SegmentURL.length-1;c>=0;c--){var u=this.Ke(t.SegmentURL[c],i);if(o&&(0,f.isIdenticalSegmentInfo)(o,u)){if(_(o)){var d=E(o,u);e.totalDuration+=d}break}o&&(0,f.isIdenticalInitSegmentInfo)(o.init,u.init)&&(u.init=o.init),null!=s&&s[c]&&this.Ne(u,s[c],e,l),isNaN(u.duration)&&(u.duration=e.maximumSegmentDuration),u.duration/=e.timescale,a+=u.duration,r.push(u)}return e.totalDuration+=a,r.reverse(),e.entries=e.entries.concat(r),r.length},e.prototype.Ne=function(e,t,i,n){var r,o;if(e.duration=parseInt(t._d),void 0!==t._t){var a=null!=(r=i.timescale)?r:1,s=null!=(o=i.presentationTimeOffset)?o:0;e.startTime=n+(parseInt(t._t)-s)/a}},e.prototype.Yf=function(e,t){var i,n,r,o=t.SegmentList,a=t._internalId.representationId,s=null==(i=this.Ce)?void 0:i.equals(t._internalId),l=null==(n=null==o?void 0:o[0])?void 0:n.SegmentURL.length;if(!s||l){e.Uri&&e.Uri!==t.Uri&&this.Zf(e,null==o?void 0:o[0],s),e.Uri=t.Uri,e.timescale=1,e.maximumSegmentDuration=1,e.startNumber=1;for(var c=function(i){var n=o[i];if(n.hasOwnProperty("_duration")&&(e.maximumSegmentDuration=Number(n._duration)),["_timescale","_startNumber","_presentationTimeOffset"].filter(function(e){return n.hasOwnProperty(e)}).forEach(function(t){return e[t.substr(1)]=n[t]}),u.af(e,n,t),n.hasOwnProperty("SegmentURL")){var s=u.Le(e,n,t._internalId),l=u.Me(e,n,t._internalId,null==(r=n.SegmentTimeline)?void 0:r[0]);u.bf(t._mimeType,a,s,l),u.Ge.isHlsManifest()?S(e.entries,t._internalId,u.Ge):u.cf(e,t._internalId)}},u=this,d=0;d<o.length;d++)c(d)}},e.prototype.Zf=function(e,t,i){var n,r,o,a,s,c;if(this.Ge.isLive()&&i){var u=null!=(o=null==(r=null==(n=e.entries)?void 0:n[0])?void 0:r.mediaSequence)?o:1/0,d=(null!=(s=null==(a=null==t?void 0:t.SegmentURL[0])?void 0:a._mediaSequence)?s:0)-u,h=function(e){var t,i;return Math.ceil(24/(e.totalDuration/(null!=(i=null==(t=e.entries)?void 0:t.length)?i:1)))}(e);!isNaN(d)&&d>0&&d<h&&this.Ef(d)}(0,l.clearArray)(null!=(c=e.entries)?c:[]),e.totalDuration=0},e.prototype.af=function(e,t,i){var n,r=null==(n=h.ModuleManager.get(p.ModuleName.DASH,!1))?void 0:n.initSegmentInfoSourceDetectors.isInitializationNode;null!=r&&r(t)?e.init=h.ModuleManager.get(p.ModuleName.DASH,!1).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty(t,i):delete e.init},e.prototype.bf=function(e,t,i,n){(i>0||n>0)&&this.ze.debug("[".concat(e,"][").concat(t,"] Updated segment list, removed ").concat(i," segments and added ").concat(n," segments"))},e.prototype.cf=function(e,t){var i=this.Mf(t);
14e.entries.forEach(function(e){var t,n;null!=(t=e.startTime)||(e.startTime=i),i=e.startTime+(null!=(n=e.duration)?n:0)})},e.prototype.extrapolateStartTimesFromDiscontinuityStarts=function(e){var t,i,n,r,o=null==(i=null==(t=this.df())?void 0:t.getState())?void 0:i.hls;if(o){var a=e.getRepresentationId().representationId,s=this.getSegmentListEntries(this.Ce),l=h.ModuleManager.get(p.ModuleName.HLS).selectors,c=l.getDiscoSequenceTimings,u=l.getMergedDiscontinuityTimings,d=function(e,t){for(var i=e[0].discontinuitySequenceNumber,n=1;n<e.length;n++){var r=e[n].discontinuitySequenceNumber;if(r!==i){var o=b(t,r);if(null!=o)return{index:n,discontinuityStartTime:o}}}return null}(s,null!=(n=c(o,e.getMimeType()))?n:u(o));if(!d){var f=null==(r=this.Ff())?void 0:r.start;if(void 0===f)return;d={index:0,discontinuityStartTime:f},this.ze.debug("Could not find discontinuity boundary with start time, using period start time ".concat(f))}this.ze.debug("Assigning segment start times for rep ".concat(a," from discontinuity at index ").concat(d.index," with time ").concat(d.discontinuityStartTime)),s[d.index].startTime=d.discontinuityStartTime;for(var m=d.index-1;m>=0;m--)s[m].startTime=s[m+1].startTime-s[m+1].duration;for(m=d.index+1;m<s.length;m++)s[m].startTime=s[m-1].startTime+s[m-1].duration}},e.prototype.df=function(){return this.xe.serviceManager.get(o.ServiceName.SourceStoreService,this.ye.sourceIdentifier)},e.prototype.ef=function(e,t){for(var i=-1,n=this.getSegmentListEntries(t),r=n.length-1;r>=0;r--)if((0,f.isIdenticalSegmentInfo)(n[r],e)){i=r;break}return i},e.prototype.ff=function(e){var t,i=this,n=null==(t=this.Ge)?void 0:t.getAdaptationSet(e);n&&n.Representation.forEach(function(e){var t=i.Ie[e._internalId.key()];if(t||(t=i.kf(e._internalId.key())),e.hasOwnProperty("SegmentList")&&(i.Yf(t,e),h.ModuleManager.has(p.ModuleName.DASH))){var n=h.ModuleManager.get(p.ModuleName.DASH).initSegmentInfoSourceDetectors.isInitializationNode;if(!t.hasOwnProperty("init")&&e.hasOwnProperty("SegmentBase")&&e.SegmentBase&&n(e.SegmentBase[0])){var r=h.ModuleManager.get(p.ModuleName.DASH).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty;t.init=r(e.SegmentBase[0],e)}}})},e.prototype.gf=function(){var e,t,i=this,n=null==(e=this.xe.serviceManager.get(o.ServiceName.SourceStoreService,this.ye.sourceIdentifier).getState().activeTracks)?void 0:e[this.De.adaptationSetId];if((null==(t=null==n?void 0:n.selectedRepresentationId)?void 0:t.periodId)===this.De.periodId)return n.selectedRepresentationId;if(this.Ce){var r=this.Ge.getRepresentation(this.De,this.Ce.representationId);if(r)return r._internalId}return(this.hf(function(e){return i.isSegmentInfoLoaded(e._internalId)})||this.hf())._internalId},e.prototype.hf=function(e){return this.Ge.getMatchingRepresentationByBandwidth(this.De,this.lf(),e)},e.prototype.jf=function(){var e=this.De.equals(this.Ce),t=!this.Ce||!!this.Ge.getRepresentationById(this.Ce);return!this.Ce||!e||!t},e.prototype.setAdaptationSetId=function(e){this.De=e,this.ff(this.De);var t,i=this.Ge.isLive(),n=0;this.jf()&&(this.Ce=this.gf());var r=this.Ie[this.Ce.key()];if(r||(r=this.kf(this.Ce.key())),r&&i&&r.entries&&r.entries.length>0){var o=r.entries.length-1;this.Be>o&&(n=this.Be-o),this.Be=Math.min(o,this.Be||0),this.Be=Math.max(0,this.Be),t=r.entries[this.Be]}if(this.Be=this.Be||0,i&&(this.Fe=this.getSegmentDuration()*this.Ae.LIVE_SEGMENT_LIST_START_INDEX_OFFSET),i){if(t&&r){var a=this.ef(t,this.Ce);a>=0?this.Be=a+n:this.nf()}else this.nf();var s=this.mf();s?this.Af(s):this.resolvePendingSegmentInfoRequests()}else this.resolvePendingSegmentInfoRequests()},e.prototype.kf=function(e){var t={totalDuration:0,entries:[],SegmentURL:[],startNumber:0,init:null,maximumSegmentDuration:1,timescale:1};return this.Ie[e]=t,t},e.prototype.lf=function(){var e=0,t=this.Hf();return t&&(e=t._bandwidth),e},e.prototype.mf=function(){var e;if(this.Ge.isHlsManifest()){var t=this.Ge.getRepresentationById(this.Ce);if(null!=(e=null==t?void 0:t._hls)&&e.loadFailureReason)return t._hls.loadFailureReason}
vendor: 4,539 bytes, line 14
14return this.hasNext()||this.Ge.isLastPeriod(this.Ce.periodId)?null:v.SegmentInfoError.PERIOD_COMPLETE},e.prototype.nf=function(){this.Ae.ENABLE_SEEK_FOR_LIVE?this.Be=0:this.timeShift(0)},e.prototype.pf=function(e,t){var i,n,r=this.Ge.getRepresentationById(e),o=this.Ge.getRepresentationById(t),a=(0,d.isNumber)(null==(i=null==o?void 0:o._hls)?void 0:i.mediaSequence)&&(0,d.isNumber)(null==(n=null==r?void 0:r._hls)?void 0:n.mediaSequence);if(r&&o&&a){var s=o._hls.mediaSequence-r._hls.mediaSequence,c=this.getSegmentListEntries(e),u=this.getSegmentListEntries(t);s>=c.length||(u[0].startTime=c[s].startTime,(0,l.forEachFromIndex)(u,1,function(e,t){(0,d.isNumber)(e.startTime)&&(0,d.isNumber)(e.duration)&&(t.startTime=e.startTime+e.duration)}))}},e.prototype.setRepresentationId=function(e){var t=this.Ge.getRepresentationById(e),i=this.getSegmentListEntries(this.Ce)[this.Be];if(t){var n=void 0===this.Ce,r=this.Ce;if(this.Ce=e,this.Ge.isLive()&&t._hls){if(this.Ae.HLS_SYNC_SEGMENT_PLAYBACK_TIME_VIA_MEDIA_SEQUENCE&&this.pf(r,this.Ce),n)this.nf();else if(this.Ae.HLS_SYNC_VIA_MEDIA_SEQUENCE){var o=this.Ge.getRepresentationById(r)._hls.mediaSequence+this.Be;this.Be=o-t._hls.mediaSequence,this.Be=Math.max(this.Be,0)}else if((null==i?void 0:i.startTime)!=null&&!isNaN(i.startTime)){var a=this.Lf(i.startTime);null===a||isNaN(a)||(this.Be=this.qf(a,i.startTime))}}return!0}return!1},e.prototype.qf=function(e,t){var i=this.getSegmentListEntries(this.Ce),n=[i[e],i[e+1]];if(e===i.length-1||n.some(function(e){return!e.startTime}))return e;var r=n.map(function(e){return Math.abs(e.startTime-t)}),o=Math.min.apply(this,r);return e+r.indexOf(o)},e.prototype.getInitSegmentInfo=function(){var e=this.If(this.Ce);if(null!=e&&e.init)return e.init.presentationTimeOffset=this.getTimestampOffset(),e.init;var t=this.getSegmentListEntries(this.Ce);if(this.xf(t)&&this.Be>-1){var i=n({},t[this.Be]);if(i.init){var r=i.init;return r.isInitSegment=!0,r}}return null},e.prototype.rf=function(e){var t;if(!(this.getSegmentListEntries(this.Ce).length<1||this.Be<0)){var i=this.sf(e);return i&&this.ze.debug("".concat(null==(t=this.De)?void 0:t.adaptationSetId," given time ").concat(e," matches seek time, performing precise segment/part search"),e),(0,g.isPlayingLowLatencyHls)(this.xe)&&this.tf(e,i),this.uf(e,i)}},e.prototype.sf=function(e){var t;return e===(null==(t=this.Je)?void 0:t.targetPlaybackTime)},e.prototype.tf=function(e,t){var i;if(0!==e){if(this.Be=this.Lf(e),!t){var n=this.getSegmentListEntries(this.Ce),r=n[this.Be];if(!(r.parts&&r.parts.length>0)){var o=this.Be;this.Be=A(e,this.Be,n),this.Be!==o&&this.ze.debug("Snapped segment index for time ".concat(e," to next segment boundary at ").concat(null==(i=n[this.Be])?void 0:i.startTime))}}}else this.xe.logger.debug("Ignoring target time of 0 for LL-HLS")},e.prototype.uf=function(e,t){var i=this.getSegmentListEntries(this.Ce);if(this.xf(i)){var n=i[this.Be];if(!(n.parts&&n.parts.length>0))return this.wf();if(_(n))return w(n,e,t);var r=w(n,e,t);return r?n.parts.indexOf(r)>0?r:this.wf():(this.Be++,this.uf(e,t))}},e.prototype.getNextSegmentInfo=function(e){var t=this.rf(e);return t?(this.vf(t),Promise.resolve(t)):this.zf({time:e})},e.prototype.vf=function(e){return e.presentationTimeOffset=this.getTimestampOffset(),e.startTime&&(e.wallClockTime=(0,u.toMilliSeconds)(e.startTime)),e},e.prototype.wf=function(){return this.getSegmentListEntries(this.Ce)[this.Be++]},e.prototype.getSegmentInfos=function(){var e=this,t={},i=this.Ge.getAdaptationSet(this.De);return i&&i.Representation.forEach(function(i){var n=e.getSegmentListEntries(i._internalId);t[i._id]=n.map(function(e){return{url:e.url,duration:e.duration,startTime:e.startTime}})}),t},e.prototype.getSubtitleUrl=function(){return this.Ge.getAvailableSubtitles(this.De.periodId)[0].url},e.prototype.getStartNumber=function(){var e=this.If(this.Ce);return e?e.startNumber:1},e.prototype.getSegmentDuration=function(){var e=this,t=this.If(this.Ce),i=this.getSegmentListEntries(this.Ce);if(t)return i.length>0&&(0,d.isNumber)(t.totalDuration)?t.totalDuration/i.length:t.maximumSegmentDuration;if(this.Ge.getAdaptationSet(this.De)){var n=Object.keys(this.Ie).map(function(t){return e.Ie[t]}).find(function(e){return null!==e});if(n)return n.maximumSegmentDuration}return 1},e.prototype.seekTo=function(e){e>-1&&(this.Be=this.Lf(e))},e.prototype.xf=function(e){return this.Be<e.length},e.prototype.hasNext=function(){var e=this.getSegmentListEntries(this.Ce);return!this.Ce||!e.length||(this.Ge.isLive()?this.yf(e):this.xf(e))}
14,e.prototype.yf=function(e){return!!this.Ge.isLastPeriod(this.Ce.periodId)||this.xf(e)},e.prototype.setTimestampOffset=function(e,t){void 0===t&&(t=1),this.He=e/t},e.prototype.getTimestampOffset=function(){if(!isNaN(this.He))return this.He;var e=this.Ff(),t=0;if(this.Ce){var i=this.If(this.Ce);i&&!isNaN(i.presentationTimeOffset)&&(t=i.presentationTimeOffset/i.timescale)}return e&&!this.Ge.isHlsManifest()&&(t-=e.start),t},e.prototype.getIndex=function(){return this.Be},e.prototype.setIndex=function(e){"number"==typeof e?e<0?(this.ze.debug("Tried to set index at MPDHandler to value smaller 0. Setting to 0."),this.Be=0):this.Be=e:this.ze.debug("Tried to set index at MPDHandler with parameter not being a number!")},e.prototype.zf=function(e){var t,i=this;if(this.Ee)return Promise.reject("fail");var r=this.Ge.getRepresentationById(this.Ce);return null!=(t=null==r?void 0:r._hls)&&t.loadFailureReason?Promise.reject(r._hls.loadFailureReason):(this.ze.debug("No segment info was found for the target time. Waiting for representation update."),new Promise(function(t,r){i.Ee=n(n({},e),{resolve:t,reject:r})}))},e.prototype.resolvePendingSegmentInfoRequests=function(){if(this.Ee){var e=this.rf(this.Ee.time);e?(this.vf(e),this.Ee.resolve(e),this.Ee=null):this.Ge.isLive()||this.hasNext()||this.Ee.reject(v.SegmentInfoError.END_OF_STREAM_REACHED)}},e.prototype.Af=function(e){this.Ee&&(this.Ee.reject(e),this.Ee=null)},e.prototype.Bf=function(){var e=this.getSegmentListEntries(this.Ce);return e.length>0?e.length-1:0},e.prototype.Cf=function(e){for(var t,i=Math.abs(e),n=this.getSegmentDuration(),r=this.getSegmentListEntries(this.Ce),o=this.Bf(),a=0,s=r.length-1;s>=0&&!((a+=null!=(t=r[s].duration)?t:n)>=i);s--)o--;return Math.max(0,o)},e.prototype.timeShift=function(e,t,i){if(this.Ge.isLive()){var n=this.Be;this.Be=i&&this.Df()?this.Lf(i):this.Cf(e),this.ze.debug("timeShift changes index from ".concat(n," to ").concat(this.Be,", based on")+" offset ".concat(e," and target time ").concat(i))}},e.prototype.Df=function(){var e,t=null==(e=this.getSegmentListEntries(this.Ce)[0])?void 0:e.startTime;return(0,d.isNumber)(t)&&t>=0},e.prototype.updateRepresentation=function(e){return Promise.resolve(e)},e.prototype.isSegmentInfoLoaded=function(e){if(void 0===e&&(e=this.Ce),!e)return!1;var t=this.getSegmentListEntries(e),i=this.Ge.getRepresentationById(e);return!(!t.length||!i)},e.prototype.Ef=function(e){this.ze.debug("Rewinding segment list index by ".concat(e," segments")),this.Be-=e,this.Be<0&&(this.ze.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.Be=0)},e.prototype.rewindOneSegment=function(){return this.Be--,!(this.Be<0&&(this.ze.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.Be=0,1))},e.prototype.Ff=function(){return this.Ge.getPeriod(this.Ce)},e.prototype.Gf=function(e){var t=this.Ff().start;return(this.Ge.hasSinglePeriod()?this.getSeekableRange().start:t)+this.getSegmentListEntries(this.Ce).slice(0,e).reduce(function(e,t){return e+t.duration},0)},e.prototype.Hf=function(){return this.Ge.getRepresentationById(this.Ce)},e.prototype.If=function(e){if(e)return this.Ie[e.key()]},e.prototype.getSegmentListEntries=function(e){var t,i;return e?this.Ae.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE&&this.Ge.isHlsManifest()?this.Jf(e):null!=(i=null==(t=this.If(e))?void 0:t.entries)?i:[]:[]},e.prototype.Jf=function(e){var t,i=null==(t=this.df())?void 0:t.getState();return(0,m.getSegmentInfos)(i,e.key())},e.prototype.Kf=function(e,t){var i,n;if(!this.De)return 0;for(var r=this.Ge.getPeriod(this.De),o=null!=(i=null==r?void 0:r.start)?i:0,a=this.getSegmentListEntries(this.Ce),s=0,l=o;l<=t&&s<a.length;s++)l+=null!=(n=a[s].duration)?n:0;return Math.max(s-1,0)},e.prototype.Lf=function(e){var t,i,n=this.If(this.Ce),r=this.getSegmentListEntries(this.Ce);if(!n||0===r.length||!(0,d.isNumber)(n.totalDuration))return 0;var o=this.Mf(),a=Math.max(null!=(t=this.Ge)&&t.isFirstPeriod(null==(i=this.Ce)?void 0:i.periodId)?o+this.Fe:o,e),s=n.totalDuration/r.length,l=(0,y.findSegmentIndexForTime)(r,a,s);return null!==l?l:this.Kf(n,a)},e.prototype.Mf=function(e){void 0===e&&(e=this.Ce);var t,i,n=null==(i=null==(t=this.Ge)?void 0:t.getPeriod(e))?void 0:i.start;return void 0!==n?n:(this.ze.debug("Unexpected period start of undefined for period ".concat(e.periodId,", falling back to 0")),0)},e.prototype.getLiveEdgeTime=function(){var e,t,i,n=null==(e=this.Ge)?void 0:e.getLastPerio
14d();if((null==n?void 0:n.start)===void 0)return 1/0;var r=null!=(t=this.Nf())?t:c.DurationConverter.getDurationInSec(null!=(i=n._duration)?i:"");return n.start+r},e.prototype.Nf=function(){var e;return null==(e=this.If(this.Ce))?void 0:e.totalDuration},e.prototype.getActualTimeShiftBufferDepth=function(){return this.Ge.getTimeShiftBufferDepthSeconds()},e.prototype.getSeekableRange=function(){var e={start:0,end:0},t=this.Ge.getTotalDuration();if(!this.Ge.isLive())return e.start=(0,a.getStartTimeOffset)(this.df().getState()),e.end=t,e;var i=this.Ge.getTimeShiftBufferDepthSeconds(),n=(0,u.toSeconds)(this.Ge.getRequestTimestamp()-this.Ge.getAvailabilityStartTime());if(e.start=Math.max(n+i,0),e.end=Math.max(n,0),h.ModuleManager.has(p.ModuleName.HLS)&&this.Ge.isHlsManifest()){var r=h.ModuleManager.get(p.ModuleName.HLS).selectors,o=r.getHlsState;"EVENT"===(0,r.getPlaylistType)(o(this.df().getState()))?(e.start=0,e.end=t):e.start+=this.Fe}return e.end-=this.Ge.getDesiredDistanceToLiveEdge(),e},e.prototype.getPendingSegmentInfoRequest=function(){return this.Ee},e.prototype.setPendingSegmentInfoRequest=function(e){this.Ee=e},e.prototype.canSwitchRepresentation=function(e){var t,i=this.getSegmentListEntries(this.Ce)[this.Be];if(!i)return!0;var n=function(e,t,i){return void 0!==t.startTime&&void 0!==t.duration&&Math.abs(e-(t.startTime+t.duration))<i}(e,i,this.Ae.LL_HLS_SEGMENT_END_TIME_MATCHING_TOLERANCE);if(!_(i)&&n)return!0;var r=this.sf(e);return!(null!=(t=null==i?void 0:i.parts)&&t.length&&w(i,e,r)!==i.parts[0])},e.prototype.getLatestTimeForPossibleSwitch=function(e){var t,i=this.Of(e),n=i.isLoadingCurrentSegmentsParts,r=i.currentSegment;return r&&n&&null!=(t=r.startTime)?t:e},e.prototype.adjustTimeToNextSegmentStart=function(e){var t=this.Of(e),i=t.isLoadingCurrentSegmentsParts,n=t.currentSegment;return i&&null!=n&&n.startTime&&null!=n&&n.duration?n.startTime+n.duration:e},e.prototype.Of=function(e){var t,i=function(e,t){var i,n,r;if(t&&!(t.length<1)&&null!=(i=t[0])&&i.duration){var o=(0,y.findSegmentIndexForTime)(t,e,t[0].duration),a=null===o,s=e<(null!=(r=null==(n=t[0])?void 0:n.startTime)?r:1/0),l=t[t.length-1];if(void 0!==l.startTime&&void 0!==l.duration){var c=e>l.startTime+l.duration;if(!(a||s||c))return t[o]}}}(e,this.getSegmentListEntries(this.Ce)),n=null==(t=null==i?void 0:i.parts)?void 0:t[0],r=this.sf(e),o=!1;if(n&&i){var a=w(i,e,r);o=void 0!==a&&a!==n}return{currentSegment:i,isLoadingCurrentSegmentsParts:o}},e.prototype.dispose=function(){this.Ae=null,this.Ge=null,this.De=null,this.Ce=null,this.Ge=null,this.Ee=null,this.Ie=null},e}()},65244:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentLoader=t.State=t.SegmentLoadingErrorReason=void 0;var r,o,a=i(66790),s=i(40306),l=i(3336),c=i(80813),u=i(3714),d=i(77401),h=i(4131),p=i(43446),f=i(91523),m=i(57456),g=i(29669),v=i(91678),y=i(46151),b=i(33436),S=i(70233),_=i(85434),E=i(89927),T=i(88844),w=i(23068),A=i(88052),P=i(62756),I=i(95880),C=i(34795),M=i(87187),R=i(44115),k=i(66628),x=i(92096),O=i(33004),D=i(17382),L=i(23133),N=i(94618),U=i(689),F=i(97587);function B(e){switch(e){case o.ABR_TIMEOUT:return r.ABR_TIMEOUT;case o.TIMEOUT:return r.TIMEOUT;default:return r.CANCEL}}(function(e){e.CANCEL="CANCEL",e.ERROR_LOADING="ERROR_LOADING",e.ERROR_DECRYPTING="ERROR_DECRYPTING",e.BUSY="BUSY",e.UNKNOWN="UNKNOWN",e.TIMEOUT="TIMEOUT",e.ABR_TIMEOUT="ABR_TIMEOUT"})(r||(t.SegmentLoadingErrorReason=r={})),function(e){e[e.IDLE=1]="IDLE",e[e.LOADING=2]="LOADING",e[e.CANCELLING=3]="CANCELLING",e[e.TERMINATED=4]="TERMINATED",e[e.TIMEOUT=5]="TIMEOUT",e[e.ABR_TIMEOUT=6]="ABR_TIMEOUT"}(o||(t.State=o={})),t.SegmentLoader=function(){function e(e,t,i,r,a){void 0===a&&(a=!1);var s=this;if(this.context=e,this.cancelLoading=function(e){var t,i,n,r,a,l,c;if(void 0===e&&(e=o.CANCELLING),(0,T.clearTimeoutIfDefined)(s.oJ),s.oJ=void 0,(0,T.clearIntervalIfDefined)(s.pJ),s.pJ=void 0,s.isLoading()){var u=s.yJ[s.BJ];if(delete s.yJ[s.BJ],s.FJ=e,s.qJ.cancel(),void 0!==s.zJ){var d=null!=(i=null==(t=s.zJ.responseTiming)?void 0:t.headersReceivedTimestamp)?i:-1,p=null!=(r=null==(n=s.zJ.responseTiming)?void 0:n.openedT
14imestamp)?r:-1,f=null!=(a=s.zJ.elapsedTime)?a:-1,m=d-p;f>=0&&m>=0&&f>m&&s.context.store.dispatch((0,v.addMetricsValue)(s.nJ,b.MetricType.DownloadInformation,{bytes:s.zJ.loadedBytes,time:f,timeToFirstByte:m})),null!=(l=s.zJ)&&l.chunks&&u&&s.WK(u),s.HJ={success:!1,httpStatus:408,url:s.BJ,downloadTime:f,size:s.zJ.loadedBytes,duration:null!=(c=s.AJ)?c:0,isInit:s.DJ,mimeType:s.nJ,uid:void 0,timeToFirstByte:(0,h.hasLoadedData)(s.zJ)?m:-1}}s.zJ=void 0}},this.dK=function(){var e,t,i,r=null!=(i=null==(t=null==(e=s.zJ)?void 0:e.responseTiming)?void 0:t.sendTimestamp)?i:-1;void 0===s.zJ||r<0||s.eK(n(n({},s.zJ),{elapsedTime:p.TimingUtil.getHiResTimestamp()-r}))},this.eK=function(e){var t,i=null!=(t=e.elapsedTime)?t:-1,r=s.yJ[s.BJ];s.zJ=n(n({},e),{segmentDuration:s.AJ,url:s.BJ,representationBitrate:r.bitrate}),s.DJ||i<=.5||s.FJ!==o.LOADING||s.rJ(s.zJ,r.internalRepresentationId)&&s.cancelLoading(o.ABR_TIMEOUT)},this.fK=function(e,t,i){var n,r,o,a,l,c,d=s.context.store.getState(),h=d?(0,y.getMetricsState)(d):void 0;if(s.context.logger.debug("Downloaded ".concat(s.nJ," ").concat(s.DJ?"init":"data"," segment in: ").concat(null==(n=e.elapsedTime)?void 0:n.toFixed(2),", TTFB: ").concat(null==(r=e.timeToFirstByte)?void 0:r.toFixed(2),", quality: ").concat(null!=(a=null==(o=s.yJ[s.BJ])?void 0:o.representationId)?a:"")),!s.DJ&&h&&s.nJ in h&&(s.context.store.dispatch((0,v.addMetricsValue)(s.nJ,b.MetricType.DownloadTime,t)),s.context.store.dispatch((0,v.addMetricsValue)(s.nJ,b.MetricType.DownloadSuccess,!0)),(0,m.isDownloadTimeInformationValid)(e)&&s.context.store.dispatch((0,v.addMetricsValue)(s.nJ,b.MetricType.DownloadInformation,{bytes:e.length,time:e.elapsedTime,timeToFirstByte:e.timeToFirstByte})),null==(l=s.zJ)?void 0:l.chunks)){s.lJ.debug("[SegmentLoader] ",s.zJ.chunks);var p=(0,D.calculateDownloadRates)(s.zJ.chunks),f=(0,D.calcAverage)((0,D.filterValuesExceedingAverageByMargin)(p)),g=s.zJ.loadedBytes,S=s.yJ[s.BJ],_=S.duration,E=void 0!==_?(0,O.bytesToBits)(g)/_:void 0,w=S.bitrate;s.lJ.debug("[SegmentLoader] DL rate (AVG-based filter): ".concat((0,D.bpsToMbps)(f),", segmentBitrate: ").concat(E)),s.context.store.dispatch((0,v.addMetricsValue)(s.nJ,b.MetricType.ChunkedDownloadInformation,{downloadRate:f,segmentBitrate:E,representationBitrate:w}))}(0,T.clearTimeoutIfDefined)(s.oJ),s.oJ=void 0,(0,T.clearIntervalIfDefined)(s.pJ),s.pJ=void 0;var A={success:!0,httpStatus:e.status,url:e.url,downloadTime:e.elapsedTime,size:e.length,duration:s.AJ,isInit:s.DJ,mimeType:s.nJ,uid:s.CJ,timeToFirstByte:null!=(c=e.timeToFirstByte)?c:-1};s.mJ.dispatchEvent(u.PlayerEvent.SegmentRequestFinished,A)},this.LJ=r,this.lJ=e.logger,this.mJ=e.eventHandler,this.tJ=e.config.tweaks.segmentLoaderArgs||null,this.sJ=e.config.tweaks.segmentLoader||null,this.AJ=1,this.FJ=o.IDLE,this.nJ=t,this.rJ=i,this.xJ=null,this.yJ={},this.HJ=null,this.KJ=a,A.ModuleManager.has(P.ModuleName.ContainerMP4)){var l=A.ModuleManager.get(P.ModuleName.ContainerMP4);this.JJ=new l.CmafChunkParser(this.context)}this.oK()}return e.prototype.WK=function(e){var t,i,n,r,o,a,s,l,c=(null!=(n=null==(i=null==(t=this.zJ)?void 0:t.responseTiming)?void 0:i.progressTimestamp)?n:p.TimingUtil.getHiResTimestamp())-(null!=(a=null==(o=null==(r=this.zJ)?void 0:r.responseTiming)?void 0:o.headersReceivedTimestamp)?a:0),u=(0,O.bytesToBits)(null!=(l=null==(s=this.zJ)?void 0:s.loadedBytes)?l:0)/c,d=void 0===e.duration?1:Math.max(1-c/e.duration,.1);this.context.store.dispatch((0,v.addMetricsValue)(this.nJ,b.MetricType.ChunkedDownloadInformation,{downloadRate:u*d,segmentBitrate:void 0,representationBitrate:e.bitrate}))},e.prototype.isLoading=function(){var e=!!(this.uJ&&this.uJ.isLoading());return this.FJ===o.LOADING||this.FJ===o.CANCELLING||this.qJ&&this.qJ.isLoading()||e},e.prototype.isRetrying=function(){return this.qJ&&this.qJ.isRetrying()},e.prototype.load=function(e){var t=this;if(this.isLoading())return this.lJ.debug("Error loading segment, loader is busy!"+this.BJ),Promise.reject({reason:r.BUSY});this.qJ&&this.qJ.dispose();var i=this.XK(e);return this.HJ=null,this.zJ=void 0,this.qJ=(0,U.getLoader)(this.context,i),this.FJ=o.LOADING,this.BJ=e.url,this.CJ=btoa(this.BJ),this.yJ[this.BJ]=e,this.DJ=e.isInitSegment,this.AJ=e.duration,this.xJ=this.YK(e).then(function(){return t.gK(e)}).catch(function(e){throw t.FJ=o.IDLE,t.xJ=null,e}),this.xJ},e.prototype.XK=function(e){var t=n({},this.GJ);return e.isPreloadHint&&(t.maxRetries=0),(e.isInitSegment||e.preventDownloadCanceling||function(e,t){var i,n=null==(i=null==e?void 0:e.serviceManager)?void 0:i.get(c.ServiceName.AdaptationService);if(!n||!t.mimeType||!t.representationId)return!1;
14var r=n.getLowestRepresentationId(t.mimeType);return t.representationId===r}(this.context,e))&&(t.disableDownloadTimeout=!1,e.preventDownloadCanceling=!0),t},e.prototype.YK=function(e){var t,i=this;this.EJ=e.key;var n=!!(null!=(t=this.EJ)&&t.buffer);if(!this.EJ||n)return Promise.resolve();switch(this.EJ.method){case a.HlsEncryptionMethod.AES_128:return this.aK(e).then(function(e){e&&(i.EJ.buffer=e)});case a.HlsEncryptionMethod.SAMPLE_AES:return this.EJ.keyformat===a.APPLE_KEYFORMAT_DELIVERY?Promise.resolve():(this.mJ.fireError(new l.PlayerError(s.ErrorCode.SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED,{"encryption-method":this.EJ.method,supported:a.HlsEncryptionMethod.AES_128},"The ".concat(a.HlsEncryptionMethod.SAMPLE_AES," encryption method is not supported."),this.LJ.sourceIdentifier)),Promise.reject({reason:r.ERROR_DECRYPTING}));case a.HlsEncryptionMethod.SAMPLE_AES_CTR:return Promise.resolve();default:return Promise.reject({reason:r.ERROR_DECRYPTING})}},e.prototype.getCurrentLoadPromise=function(){return this.xJ},e.prototype.ZK=function(){var e;return null==(e=this.context.serviceManager)?void 0:e.get(c.ServiceName.SourceStoreService,this.LJ.sourceIdentifier)},e.prototype.aK=function(e){var t,i,n=null==(t=e.key)?void 0:t.uri,r=this.ZK();if(!r||!n)return Promise.reject(Error("Source store not available."));var o=r.getState(),a=(0,k.getEncryptionKey)(o,n);return null!=a&&a.uri&&a.loadState!==x.KeyLoadState.Cancel?a.key?Promise.resolve(S.FormatHelper.hexToBytes(a.key).buffer):(0,L.waitForKeyToBeLoaded)(r,n):(null!=(i=this.uJ)||(this.uJ=new N.KeyLoader(this.context)),(0,L.addEncryptionKeyToStore)(n,this.uJ,r))},e.prototype.bK=function(e,t){var i;return this.KJ||!(null!=(i=this.context.adRestorationOptimizationService)&&i.hasPrefetchedSegment(t))?null:(this.yJ[e]&&(this.yJ[e].wasPrefetched=!0),this.context.adRestorationOptimizationService.getPrefetchedSegment(t,this.rJ))},e.prototype.cK=function(){(0,T.clearIntervalIfDefined)(this.pJ);var e=(0,E.toMilliSeconds)(this.context.settings.SEGMENT_LOADING_PROGRESS_CHECK_INTERVAL);this.pJ=e<=0?void 0:window.setInterval(this.dK,e)},e.prototype.gK=function(e){var t,i=this,n={};e.byteRange&&(n.Range="bytes="+e.byteRange.start+"-"+e.byteRange.end);var r=this.LJ.source,a=null!=r&&r.options?!!r.options.withCredentials:void 0;(0,T.clearTimeoutIfDefined)(this.oJ),this.oJ=void 0,(0,T.clearIntervalIfDefined)(this.pJ),this.pJ=void 0,e.preventDownloadCanceling||(this.oJ=window.setTimeout(function(){return i.cancelLoading(o.TIMEOUT)},(0,f.getRequestTimeout)(this.context,this.GJ.requestType)));var s=this.bK(this.BJ,e);if(s)return this.context.logger.debug("return prefetched segment for",this.BJ),s.then(function(e){var t=new F.Stream;return i.nK(),t.add(e),e.getSegmentInfo().wasPrefetched=!0,t.end(),t}).catch(function(e){throw e});var l=null==(t=this.ZK())?void 0:t.getState(),c=l&&(0,R.getContainerFormat)(l,_.MimeTypeHelper.getMediaType(this.nJ)),u=(null==c?void 0:c.source)===C.ContainerFormat.MP4,d=!!this.EJ||!!this.wJ,h=this.context.settings.CHUNKED_CMAF_STREAMING&&this.JJ&&u&&!e.isInitSegment&&!d;return this.cK(),this.qJ.load(this.BJ,g.HttpRequestMethod.GET,g.HttpResponseType.ARRAYBUFFER,null,n,a,this.nJ,h).then(function(e){return i.mK(e.body)}).catch(function(e){throw i.hK(e)})},e.prototype.hK=function(e){var t,i;return[o.CANCELLING,o.TIMEOUT,o.ABR_TIMEOUT].includes(this.FJ)?(this.lJ.debug("Cancelled ".concat(this.nJ," download [").concat(this.BJ,"]")),this.HJ&&(null==(t=this.mJ)||t.dispatchEvent(u.PlayerEvent.SegmentRequestFinished,this.HJ)),i={reason:B(this.FJ)}):this.FJ===o.LOADING&&(i={reason:r.ERROR_LOADING,info:{response:e,isInit:this.DJ}}),i},e.prototype.getAllLoadingPeriodIds=function(){var e=this;return Object.keys(this.yJ).map(function(t){var i;return null==(i=e.yJ[t])?void 0:i.periodId}).filter(w.isDefined)},e.prototype.getCurrentLoadingSegmentInfo=function(){return this.isLoading()&&this.BJ&&this.yJ[this.BJ]?this.yJ[this.BJ]:null},e.prototype.attachDecrypter=function(e){this.wJ=this.wJ||e},e.prototype.attachClearKeyLoader=function(e){this.vJ=this.vJ||e},e.prototype.terminate=function(){var e,t=this;this.isLoading()?(null==(e=this.xJ)||e.catch(function(){t.FJ=o.TERMINATED}),this.cancelLoading()):this.FJ=o.TERMINATED},e.prototype.iK=function(e){var t,i=this.DJ?M.SegmentInitType.INIT:M.SegmentInitType.NONE,n=this.yJ[this.BJ],r=new M.Segment(e,this.nJ,null!=(t=n.codecs)?t:null,n.periodId,this.AJ,i,!0,e.byteLength,n.internalRepresentationId,n.startTime);return r.setUrl(this.BJ),r.setSegmentInfo(n),r},e.prototype.jK=function(e,t){return this.EJ&&this.EJ.method===a.HlsEncryptionMethod.AES_128&&!t?this.kK(e):this.wJ?this.lK(e):Promise.resolve(e)},e.prototype.kK=function(e){var t,i;return A.ModuleManager.has(P.ModuleName.Crypto)?null!=(t=this.EJ)&&t.buffer&&null!=(i=this.EJ)&&i.iv?(this.lJ.debug("Decrypting AES-128-encrypted segment ".concat(this.BJ,", ")+"KEY: 0x".concat(S.FormatHelper.bytesToHex(this.EJ.buffer),", ")+"IV: 0x".concat(this.EJ.iv)),new(A.ModuleManager.get(P.ModuleName.Crypto)).CryptoApi(this.context,"AES-CBC",this.EJ.buffer,this.EJ.iv,this.nJ).decrypt(e).then(function(e){if(!e||0===e.byteLength)throw{reason:r.ERROR_DECRYPTING};return e}).catch(function(){throw{reason:r.ERROR_DECRYPTING}})):(this.lJ.debug("Error decrypting AES-128-encrypted segment, missing key or IV"),Promise.reject({reason:r.ERROR_DECRYPTING})):(this.context.eventHandler.fireError(new I.PlayerModuleMissingError(P.ModuleName.Crypto)),Promise.reject({reason:r.ERROR_DECRYPTING}))},e.prototype.lK=function(e){var t=this,i=Promise.resolve(e);if(this.DJ)i=this.wJ.parseInitSegment(e),this.vJ&&(i=i.then(function(e){return t.vJ.load(t.wJ.getKeyIds()).then(function(i){return t.wJ.addKeys(i),Promise.resolve(e)})}));else if(this.wJ.isEncrypted()){var n=S.FormatHelper.bytesToHex(this.wJ.getKey());
vendor: 10,796 bytes, line 14
14this.lJ.debug("Decrypting SAMPLE-AES-encrypted segment ".concat(this.BJ,", KEY: 0x").concat(n)),i=this.wJ.decryptDataSegment(e)}return i.catch(function(){throw{reason:r.ERROR_DECRYPTING}})},e.prototype.mK=function(e,t){var i=this;if(void 0===t&&(t=!1),e instanceof ArrayBuffer){this.IJ=new F.Stream;var n=Date.now();this.jK(e,t).then(function(t){i.FJ===o.TERMINATED||i.FJ===o.CANCELLING?i.IJ.abort(r.CANCEL):(i.IJ.add(i.iK(t)),i.IJ.end());var a,s=i.yJ[i.BJ];if(e!==t&&s){var l=(0,E.toSeconds)(Date.now()-n),c=s.internalRepresentationId,u={time:l,representationId:c};i.context.store.dispatch((0,v.addMetricsValue)(i.nJ,b.MetricType.DecryptionTime,u)),i.context.logger.debug("Decrypted ".concat(i.nJ," segment in: ").concat(null==l?void 0:l.toFixed(2),", quality: ").concat(null!=(a=null==c?void 0:c.representationId)?a:""))}}).catch(function(){return i.IJ.abort(r.ERROR_DECRYPTING)}).finally(function(){return i.nK()})}else this.IJ=e.transform(function(e){return i.JJ.appendData(e),i.JJ.getCompleteChunks()},function(){},function(e){return e.message}).transform(function(e){return i.iK(e)},function(){return i.nK()},function(e){i.lJ.debug("Error handling fetch segment request",e);var t=r.ERROR_LOADING;return e.message===d.RequestError.Canceled&&(t=B(i.FJ)),i.nK(),t});return Promise.resolve(this.IJ)},e.prototype.nK=function(){this.FJ=o.IDLE,this.xJ=null,this.JJ&&this.JJ.reset(),this.yJ&&delete this.yJ[this.BJ]},e.prototype.dispose=function(){this.terminate(),(0,T.clearTimeoutIfDefined)(this.oJ),(0,T.clearIntervalIfDefined)(this.pJ),this.qJ&&this.qJ.dispose&&this.qJ.dispose(),this.uJ&&this.uJ.dispose(),A.ModuleManager.has(P.ModuleName.Crypto)&&A.ModuleManager.get(P.ModuleName.Crypto).WebWorkerCrypto.dispose(),this.qJ=null,this.sJ=null,this.tJ=null,this.uJ=null,this.BJ=null,this.CJ=null,this.EJ=null,this.yJ={},this.zJ=void 0,this.wJ=null,this.mJ=null},e.prototype.oK=function(){var e=this;this.GJ=n(n({},(0,U.getLoaderConfig)(this.context,this.nJ)),{onSuccess:this.fK,onProgress:this.eK,onFailure:function(t,i){var n,r;e.context.store.dispatch((0,v.addMetricsValue)(e.nJ,b.MetricType.DownloadSuccess,!1)),(null==i?void 0:i.name)===d.RequestError.TimedOut&&(e.FJ=o.TIMEOUT),(0,T.clearTimeoutIfDefined)(e.oJ),e.oJ=void 0,(0,T.clearIntervalIfDefined)(e.pJ),e.pJ=void 0,delete e.yJ[e.BJ],e.mJ.dispatchEvent(u.PlayerEvent.SegmentRequestFinished,{success:!1,httpStatus:t&&t.status||0,url:null!=(n=null==t?void 0:t.url)?n:e.BJ,downloadTime:-1,size:-1,duration:e.AJ,isInit:e.DJ,mimeType:e.nJ,uid:void 0,timeToFirstByte:null!=(r=null==t?void 0:t.timeToFirstByte)?r:-1})}})},e}()},71018:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentLoaderPool=void 0,t.getLoaderPoolSize=v;var n=i(91678),r=i(46151),o=i(33436),a=i(15971),s=i(94685),l=i(85434),c=i(23068),u=i(88052),d=i(62756),h=i(39523),p=i(99529),f=i(65439),m=i(65244),g=1;function v(e,t){var i=l.MimeTypeHelper.extractContentType(e);return t&&(0,c.isNumber)(t[i])?Math.max(g,t[i]):g}function y(e){return!!(null!=e&&e.LA_URL)}function b(e){return(null==e?void 0:e.length)>0}t.SegmentLoaderPool=function(){function e(e,t){this.context=e,this.z1=e.sourceContext,this.w1=t.mimeType,this.x1=[],this.y1=t.shouldDownloadBeCancelledCallback,this.addLoaders(v(this.w1,e.settings.SEGMENT_LOADER_POOL_SIZE)),this.C1()}return e.prototype.addLoaders=function(e){for(var t=0;t<e;t++)this.x1.push(new m.SegmentLoader(this.context,this.w1,this.y1,this.z1))},e.prototype.A1=function(e){if(this.context.segmentPrefetchingService&&this.context.segmentPrefetchingService.hasMp4Decrypter(this.w1,this.z1))return this.context.segmentPrefetchingService.getDecrypter(this.w1,this.z1);var t=u.ModuleManager.get(d.ModuleName.Crypto).createDecrypter,i=b(e.drm.clearkey)?e.drm.clearkey:[];return t(this.context,this.w1,i)},e.prototype.B1=function(e){return new(u.ModuleManager.get(d.ModuleName.Crypto)).ClearKeyLoader(this.context,e)},e.prototype.C1=function(){var e=this.z1.source,t=!function(e){var t,i;return b(null==(t=null==e?void 0:e.drm)?void 0:t.clearkey)||y(null==(i=null==e?void 0:e.drm)?void 0:i.clearkey)}(e)?null:this.A1(e);if(t&&(this.x1.forEach(function(e){return e.attachDecrypter(t)}),this.context.segmentPrefetchingService&&this.context.segmentPrefetchingService.setDecrypter(t,this.w1,this.z1),y(e.drm.clearkey))){var i=this.B1(e.drm.clearkey);this.x1.forEach(function(e){return e.attachClearKeyLoader(i)})}},e.prototype.isLoading=function(){return this.x1.some(function(e){return e.isLoading()})},e.prototype.isFreeLoaderAvailable=function(){return this.x1.some(function(e){return!e.isLoading()})},e.prototype.D1=function(e){var t=(0,r.getMetricsHistoryFromInstanceState)(this.context.store.getState(),"default",o.MetricType.RequestedRepresentations);(t?t.map(function(e){return e.value}):[]).includes(e)||this.context.store.dispatch((0,n.addMetricsValue)("default",o.MetricType.RequestedRepresentations,e))},e.prototype.load=function(e){var t=this.x1.find(function(e){return!e.isLoading()});if(!t)return this.context.logger.debug("Failed to load segment. No free loader!",e.url),Promise.reject(null);this.D1(e.internalRepresentationId),this.context.logger.debug("[SegmentLoader ".concat(this.x1.indexOf(t),"][").concat(e.mimeType,"][").concat(e.representationId,"] Loading ").concat(e.startTime," ").concat(e.url));var i=(0,f.getSegmentInfoTimeRange)(e),n=(0,p.getTrackIdentifier)(e),r=(0,a.getSourceStore)(this.context);return i&&(null==r||r.dispatch((0,h.addStreamTimeRange)(n,i,p.StreamTimeRangeType.Loading))),t.load(e).catch(function(e){throw i&&(null==r||r.dispatch((0,h.removeStreamTimeRange)(n,i,p.StreamTimeRangeType.Loading))),e})},e.prototype.cancelLoading=function(){var e=this;return Promise.all(this.x1.map(function(e){return e.isLoading()&&e.cancelLoading(),Promise.resolve(e.getCurrentLoadPromise())})).then(function(){}).catch(function(t){(null==t?void 0:t.reason)!==m.SegmentLoadingErrorReason.CANCEL&&(0,s.isContextAvailable)(e.context)&&e.context.logger.debug("Error while loading a segment ",t)})},e.prototype.getLoadingPeriodIds=function(){return this.x1.flatMap(function(e){return e.getAllLoadingPeriodIds()})},e.prototype.dispose=function(){this.cancelLoading(),this.x1.forEach(function(e){return e.dispose()}),this.x1=null},e}()},98892:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentPreProcessor=void 0;var n=i(80813),r=i(3714),o=i(91678),a=i(33436),s=i(15971),l=i(85434),c=i(66502),u=i(88052),d=i(62756),h=i(23940),p=i(39523),f=i(99529),m=i(60729),g=i(73794),v=i(37641),y=i(77286),b=i(65439),S=i(63066);function _(e,t){return!t.isAvMuxedTogether||l.MimeTypeHelper.isVideo(e.getMimeType())}function E(e){return l.MimeTypeHelper.isSubtitle(e.getMimeType())}t.SegmentPreProcessor=function(){function e(e,t,i,r,o,a,s){this.context=e,this.mimeType=t,this.onDataAvailableCallback=i,this.hls=r,this.segmentUnavailabilityHandler=o,this.timestampOffsetService=a,this.segmentParser=s,this.rK=!1,this.sK=null;var l=e.sourceContext.sourceIdentifier;this.pK=this.context.serviceManager.get(n.ServiceName.ManifestService,l)}return Object.defineProperty(e.prototype,"uK",{get:function(){return this.context.logger},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vK",{get:function(){return this.context.eventHandler},enumerable:!1,configurable:!0}),e.prototype.setHlsTimelineTracker=function(e){this.qK=e},e.prototype.setMpdHandler=function(e){this.tK=e},e.prototype.onMuxedSegmentAvailable=function(e,t,i,n){var r=this,o=t.find(function(e){return _(e,r.hls)});if(o){var a=!o.getRepresentationId().equals(this.sK),l=this.BK(o,i,a),c=l.shouldMakeSegmentAvailable,u=l.shouldCacheSegment;c?t.forEach(function(t){var o=e.metadata[e.transmuxedSegments.indexOf(t)];r.onSegmentAvailable(t,o,i,n)||n.cacheSegment(e.originalSegment)}):(u&&n.cacheSegment(e.originalSegment),function(e,t){var i=(0,s.getSourceStore)(t),n=e.getSegmentInfo(),r=(0,b.getSegmentInfoTimeRange)(n),o=(0,f.getTrackIdentifier)(n);i&&r&&i.dispatch((0,p.removeStreamTimeRange)(o,r,f.StreamTimeRangeType.Loading))}(e.originalSegment,this.context))}},e.prototype.onSegmentAvailable=function(e,t,i,n){var r,o,a;return this.uK.debug("onSegmentAvailable ".concat(e.getMimeType()).concat(e.isInit()?" init":""," segment [").concat(e.getUrl(),"]")),this.segmentUnavailabilityHandler.downloadSuccess(e.isInit()),null==(o=(r=this.tK).generateSmoothInitSegment)||o.call(r,e,this.segmentParser),this.hls.isTransmuxingRequired||c.TextSegmentAnalyzer.isPlainTextPayload(e.getData())||null==(a=this.segmentParser)||a.parseSegment(e),!!e.isInit()||this.wK(e,t,i,n)},e.prototype.wK=function(e,t,i,r){var o,a,l,u,d=this,h=!e.getRepresentationId().equals(this.sK);_(e,this.hls)&&h&&this.yK(e,this.sK);var m=this.hls.isTransmuxingRequired,v=!0;if(this.pK.isHlsManifest()){if(this.xK(e),!m&&!c.TextSegmentAnalyzer.isPlainTextPayload(e.getData())){(isNaN(this.tK.getTimestampOffset())||0===this.tK.getTimestampOffset())&&(0,g.initializeHlsSegmentStartTimes)(e,this.context,this.tK),this.timestampOffsetService.maybeAdjustTimestampOffsetAtDiscontinuityChange(e,this.tK)&&(null==(o=this.segmentParser)||o.parseSegment(e));var y=this.BK(e,i,h),S=y.shouldMakeSegmentAvailable,T=y.shouldCacheSegment;if(!S)return T&&r.cacheSegment(e),!1}E(e)&&this.timestampOffsetService.maybeAdjustTimestampOffsetAtDiscontinuityChange(e,this.tK),this.pK.initSegmentStartTimesFromReferenceSegment(e)}if(m&&this.hls.possiblyDependentSegments&&h&&_(e,this.hls)&&!this.rK){this.uK.debug("Just switched playlists, isIndependentlyDecodable=".concat(e.isIndependentlyDecodable(),", (").concat(e.getMimeType(),", ").concat(e.getUrl(),")"));var w=this.tK.getIndex()>1;!e.isIndependentlyDecodable()&&w&&(this.uK.debug("Started keyframe recovery"),this.tK.setIndex(this.tK.getIndex()-2),v=!1,this.hls.discardNextSegment=!0,this.rK=!0)}if(!v)return!1;(function(e,t){var i=(0,s.getSourceStore)(t),n=e.getSegmentInfo(),r=(0,b.getSegmentInfoTimeRange)(n),o=e.getPlaybackTimeRange(),a=(0,f.getTrackIdentifier)(n);i&&r&&o&&(i.dispatch((0,p.removeStreamTimeRange)(a,r,f.StreamTimeRangeType.Loading)),i.dispatch((0,p.addStreamTimeRange)(a,o,f.StreamTimeRangeType.Loading)))})(e,this.context),this.context.serviceManager.get(n.ServiceName.TimedMetadataService).onSegmentAvailable({segment:e,extractedMetadata:t,isSegmentOfMainStream:_(e,this.hls),presentationTimeOffset:this.tK.getTimestampOffset()}),this.context.serviceManager.maybeCall(n.ServiceName.SubtitleService,function(i){i.handleClosedCaptions(d.tK,e,null==t?void 0:t.closedCaptions,m)},void 0,null==(a=this.context.sourceContext)?void 0:a.sourceIdentifier);var A=e.getPlaybackTime(),P=null==(l=e.getSegmentInfo())?void 0:l.startTime,I=P?Math.abs(A-P):void 0;return this.uK.debug("[".concat("SegmentPreProcessor","][").concat(e.getMimeType(),"]: playbackTimeForSegment=").concat(A," expected=").concat(P," 
14(diff=").concat(null==I?void 0:I.toFixed(3),") ").concat(e.getUrl())),_(e,this.hls)&&(null==(u=this.qK)||u.trackPlaybackTime(e),this.rK=!1),this.onDataAvailableCallback(e),v},e.prototype.xK=function(e){var t=u.ModuleManager.get(d.ModuleName.LowLatency,!1);(0,m.isPlayingLowLatencyHls)(this.context)&&t&&t.applyUpdatedSegmentInfoProps(e,this.pK)},e.prototype.yK=function(e,t){this.zK(e.getMimeType(),t,e.getRepresentationId());var i=e.getSegmentInfo(),n={id:i.representationId,bitrate:i.bitrate,width:i.width,height:i.height};this.context.store.dispatch((0,o.addMetricsValue)(this.mimeType,a.MetricType.DownloadedRepresentation,n)),this.sK=e.getRepresentationId()},e.prototype.zK=function(e,t,i){if(l.MimeTypeHelper.isVideo(e))n=r.PlayerEvent.VideoDownloadQualityChanged;else{if(!l.MimeTypeHelper.isAudio(e))return;n=r.PlayerEvent.AudioDownloadQualityChanged}var n,o=(0,h.representationToQuality)(this.pK.getRepresentationById(t),e),a=(0,h.representationToQuality)(this.pK.getRepresentationById(i),e);this.vK.dispatchEvent(n,{targetQuality:a,targetQualityId:a.id,sourceQuality:o,sourceQualityId:o?o.id:null})},e.prototype.AK=function(e,t){var i={hasGap:!1};if(e&&this.pK.isHlsManifest()&&!E(e)&&_(e,this.hls)&&this.qK){var n=y.SegmentInfoProvider.findHlsRepresentationForSegment(e,this.pK.getAdaptationSet(t));if(n&&(i=this.qK.checkForTimelineGap(e,n.representation,n.index)).hasGap&&void 0!==i.correctedIndex){this.uK.debug("Encountered timeline gap (".concat(i.gapSizeSec,"), just loaded ").concat(e.getUrl()));var r=n.representation._internalId,o=this.tK instanceof S.SegmentListMPDHandler&&this.tK.getSegmentListEntries(r)&&this.tK.getSegmentListEntries(r)[i.correctedIndex];if(o&&(0,v.areSegmentsIdentical)(e.getSegmentInfo(),o))return this.uK.debug("Gap handling: Segment is identical to the one we just loaded, not rewinding"),i.hasGap=!1,i;o&&o.hasDownloadFailed?(this.uK.debug("Gap handling: Could not handle gap, segment has failed to download"),i.couldHandle=!1):(this.uK.debug("Gap handling: Correcting index from ".concat(this.tK.getIndex()," to ").concat(i.correctedIndex)),this.tK.setIndex(i.correctedIndex))}}return i},e.prototype.BK=function(e,t,i){if(!(this.qK.isGapVerificationNeeded()||this.qK.isSeekTargetVerificationNeeded()||i))return{shouldMakeSegmentAvailable:!0,shouldCacheSegment:!1};var n=this.AK(e,t);return n.hasGap?n.couldHandle?!function(e){var t;return(null!=(t=e.gapSizeSec)?t:0)>0}(n)?{shouldMakeSegmentAvailable:!1,shouldCacheSegment:!1}:{shouldMakeSegmentAvailable:!1,shouldCacheSegment:!0}:(this.qK.reset(),{shouldMakeSegmentAvailable:!0,shouldCacheSegment:!1}):{shouldMakeSegmentAvailable:!0,shouldCacheSegment:!1}},e.prototype.dispose=function(){this.sK=null,this.qK=null,this.pK=null,this.onDataAvailableCallback=null,this.hls=null,this.segmentUnavailabilityHandler=null,this.timestampOffsetService=null,this.segmentParser=null,this.tK=null},e}()},11991:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentPrefetcher=void 0;var n=i(94685),r=i(19483),o=i(65244);t.SegmentPrefetcher=function(){function e(e){var t=this;this.TK=function(e){var i=t.NK.get(e);i&&0!==i.length&&t.UK(i.shift()).then(function(){return t.TK(e)})},this.NK=new r.ArrayMap,this.PK=new Map,this.OK=new Map,this.QK=new Map,this.RK=e,this.SK=new Map}return e.prototype.updateContext=function(e,t){this.LK=e,this.MK=t??e.sourceContext},e.prototype.setShouldDownloadBeCancelledCallback=function(e,t){this.SK.set(e,t)},e.prototype.removeShouldDownloadBeCancelledCallback=function(e){this.SK.delete(e)},e.prototype.setDecrypter=function(e,t){this.OK.set(t,e),this.QK.has(t)&&this.QK.get(t).attachDecrypter(e)},e.prototype.removeDecrypter=function(e){this.OK.delete(e)},e.prototype.getDecrypter=function(e){return this.OK.get(e)},e.prototype.prefetchSegment=function(e){return this.UK(e)},e.prototype.prefetchSegments=function(e){var t=this;e.forEach(function(e){return t.NK.add(e.mimeType,e)}),this.NK.keys.forEach(function(e){return t.TK(e)})},e.prototype.UK=function(e){var t=this,i=this.gL(e.mimeType).then(function(){return t.VK(e)}).then(function(){}).catch(function(){});
vendor: 8,380 bytes, line 14
14return this.PK.set(e.mimeType,i),i},e.prototype.VK=function(e){var t=this;if(!(0,n.isContextAvailable)(this.LK))return Promise.reject("PlayerContext not available");var i=this.hL(e).load(e).then(function(e){return e.read()}).then(function(e){return e.value});return this.RK.onPrefetch({segmentInfo:e,loadingPromise:i}),i.catch(function(i){(0,n.isContextAvailable)(t.LK)&&t.LK.logger.debug("segment prefetching failed for",e,"with",i)}),i},e.prototype.gL=function(e){return this.PK.has(e)||this.PK.set(e,Promise.resolve()),this.PK.get(e)},e.prototype.hL=function(e){return this.QK.has(e.mimeType)||this.QK.set(e.mimeType,this.iL(e)),this.QK.get(e.mimeType)},e.prototype.iL=function(e){this.PK.set(e.mimeType,Promise.resolve());var t=new o.SegmentLoader(this.LK,e.mimeType,this.jL(e),this.MK,!0);return t.attachDecrypter(this.OK.get(e.mimeType)),t},e.prototype.jL=function(e){var t=this;return function(i){var n=e.mimeType,r=t.QK.get(n),o=r?r.getCurrentLoadingSegmentInfo():null,a=void 0!==n?t.SK.get(n):void 0,s=o?o.internalRepresentationId:e.internalRepresentationId;return void 0!==a&&a(i,s)}},e.prototype.clearPrefetchingQueue=function(e){this.NK.delete(e)},e.prototype.reset=function(){this.NK.clear(),this.QK.forEach(function(e){return e.dispose()}),this.SK.clear(),this.QK.clear(),this.OK.clear()},e.prototype.dispose=function(){this.reset(),this.QK=null,this.SK=null},e}()},54015:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentPrefetchingService=void 0;var n=i(25248),r=i(11991);t.SegmentPrefetchingService=function(){function e(){this.Qf=new Map,this.Rf=new Map}return e.prototype.updatePlayerContext=function(e){this.Pf=e;var t,i,n=null==(t=e.sourceContext)?void 0:t.sourceIdentifier;n&&(null==(i=this.Qf.get(n))||i.updateContext(e))},e.prototype.setDecrypter=function(e,t,i){this.Tf(i).setDecrypter(e,t)},e.prototype.removeDecrypter=function(e,t){this.Tf(t).removeDecrypter(e)},e.prototype.getDecrypter=function(e,t){return this.Tf(t).getDecrypter(e)},e.prototype.hasMp4Decrypter=function(e,t){return!!this.getDecrypter(e,t)},e.prototype.setShouldDownloadBeCancelledCallback=function(e,t,i){this.Tf(i).setShouldDownloadBeCancelledCallback(e,t)},e.prototype.removeShouldDownloadBeCancelledCallback=function(e,t){this.Tf(t).removeShouldDownloadBeCancelledCallback(e)},e.prototype.fetch=function(e,t){var i=this,r=t.sourceIdentifier;return this.Tf(t).prefetchSegment(e).then(function(){var t,o,a=e.mimeType?null==(o=null==(t=i.Vf(r))?void 0:t.get(e.mimeType))?void 0:o.get((0,n.getSegmentInfoId)(e)):void 0;return a?Promise.resolve(a.loadingPromise):Promise.reject()})},e.prototype.fetchAll=function(e,t){this.Tf(t).prefetchSegments(e)},e.prototype.hasPrefetchedSegment=function(e,t){return!!this.Sf(e,t)},e.prototype.getPrefetchedSegment=function(e,t){var i=this.Sf(e,t);return i?i.loadingPromise:null},e.prototype.Sf=function(e,t){var i,r,o=t.sourceIdentifier,a=this.Vf(o);return e.mimeType&&null!=a&&a.has(e.mimeType)&&null!=(r=null==(i=a.get(e.mimeType))?void 0:i.get((0,n.getSegmentInfoId)(e)))?r:null},e.prototype.getPrefetchedSegments=function(e){return this.Vf(e.sourceIdentifier)},e.prototype.removePrefetchedSegment=function(e,t){var i=t.sourceIdentifier,r=this.Vf(i);e.mimeType&&null!=r&&r.has(e.mimeType)&&r.get(e.mimeType).delete((0,n.getSegmentInfoId)(e))},e.prototype.clearPrefetchingQueue=function(e,t){var i=t.sourceIdentifier,n=this.Qf.get(i);null==n||n.clearPrefetchingQueue(e)},e.prototype.reset=function(){this.Qf.forEach(function(e){return e.reset()}),this.Qf.clear(),this.Rf.clear()},e.prototype.dispose=function(){this.Qf.forEach(function(e){return e.dispose()}),this.Qf.clear(),this.Rf=null},e.prototype.Tf=function(e){var t=this,i=e.sourceIdentifier;if(!this.Qf.has(i)){var n={onPrefetch:function(e){return t.Uf(i,e)}},o=new r.SegmentPrefetcher(n);o.updateContext(this.Pf,e),this.Qf.set(i,o)}return this.Qf.get(i)},e.prototype.Uf=function(e,t){var i,r=t.segmentInfo.mimeType;if(void 0!==r){var o=this.Wf(e);o.has(r)||o.set(r,new Map),null==(i=o.get(r))||i.set((0,n.getSegmentInfoId)(t.segmentInfo),t)}},e.prototype.Vf=function(e){return this.Rf.get(e)},e.prototype.Wf=function(e){return this.Rf.has(e)||this.Rf.set(e,new Map),this.Vf(e)},e}()},44552:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentManager=t.SegmentService=void 0;var n=i(56481),r=i(85434),o=i(15487),a=i(37641),s=i(71018),l=i(97587),c=i(88401);t.SegmentService=function(){function e(e){var t=this;this.context=e,this.ZF=function(e){t.NE.has(e)&&(t.NE.get(e).dispose(),t.NE.delete(e))},this.NE=new Map}return e.prototype.YF=function(e,t){var i=void 0===t?{}:t,n=i.id,o=i.lang;return r.MimeTypeHelper.isSubtitle(e)?[e,n,o].filter(Boolean).join("-"):e},e.prototype.add=function(e,t,i){var n=this.get(e.mimeType,i);return n||(n=this.createSegmentManager(e,t),this.NE.set(this.YF(e.mimeType,i),n)),n},e.prototype.createSegmentManager=function(e,t){return new u(this.context,e,t)},e.prototype.get=function(e,t){return this.NE.get(this.YF(e,t))},e.prototype.disposeOfType=function(e,t){this.ZF(this.YF(e,t))},e.prototype.dispose=function(){this.NE.forEach(function(e){return e.dispose()}),this.NE.clear()},e}();var u=function(){function e(e,t,i){this.context=e,this.segmentParser=i,this.eF=!1,this.cF=new s.SegmentLoaderPool(e,t),this.bF=new c.UrlInitSegmentProvider(e,t.mimeType),this.aF=new a.SegmentCache(e.settings.MAX_NUM_CACHED_SEGMENTS),this.dF=Promise.resolve(null)}return e.prototype.getSegment=function(e){var t=e.isInitSegment?this.fF(e).then(function(e){return d(e)}):this.gF(e);return this.dF=this.dF.catch(function(){}).then(function(){return t}),this.dF},e.prototype.fF=function(e){var t=this;return this.bF.getSegment(e).then(function(e){var i;return null==(i=t.segmentParser)||i.parseSegment(e),e}).catch(function(e){return t.context.logger.debug("Error during loading an init segment",e),Promise.reject(e)})},e.prototype.gF=function(e){var t,i=this;null!=(t=e.key)&&t.method&&(this.eF=!0);var n=this.hF(e);return(this.iF()?this.jF(n,e):this.kF(n,e)).then(function(e){var t=e[0],n=e[1];return t.transform(function(e){return i.mF(e,n),e},function(){},function(e){return i.context.logger.debug("Loading failed",e),e.message})})},e.prototype.hF=function(e){var t=Promise.resolve();if(e.init){var i=this.bF.getCachedSegment(e);t=i?Promise.resolve(i):this.fF(e.init)}return t},e.prototype.iF=function(){var e;return this.context.settings.DISABLE_PARALLEL_SEGMENT_LOADING||!!(null!=(e=this.context.sourceContext.source.drm)&&e.clearkey)||this.eF||(0,o.isTizen2016)()},e.prototype.jF=function(e,t){var i=this;return e.then(function(e){return i.lF(t).then(function(t){return[t,e]})})},e.prototype.kF=function(e,t){return Promise.all([this.lF(t),e])},e.prototype.lF=function(e){var t=this.getCachedSegment(e);return null!=t?(this.context.logger.debug("Returning segment from cache for URL: ".concat(e.url)),Promise.resolve(d(t))):this.cF.load(e)},e.prototype.mF=function(e,t){t&&e.setInitSegment(t)},e.prototype.isLoading=function(e){return e?this.cF.getLoadingPeriodIds().includes(e):this.cF.getLoadingPeriodIds().length>0},e.prototype.canLoad=function(){var e=this.cF.isFreeLoaderAvailable();return this.iF()?e&&!this.bF.isLoading():e},e.prototype.cacheSegment=function(e){this.aF.add(e)},e.prototype.hasCachedSegment=function(e){return!!this.getCachedSegment(e)},e.prototype.getCachedSegment=function(e){return e.isInitSegment?this.bF.getCachedSegment(e):this.aF.get(e)},e.prototype.removeCachedInitSegments=function(e){this.bF.removeCachedSegments(e)},e.prototype.clearCache=function(e){void 0===e&&(e=!0),e&&this.bF.removeCachedSegments(function(){return!0}),this.aF.clear()},e.prototype.cancel=function(){return this.cF.cancelLoading()},e.prototype.dispose=function(){this.cancel(),this.clearCache(!1),this.cF=(0,n.dispose)(this.cF),this.segmentParser=void 0,(0,n.dispose)(this.bF)},e}();function d(e){var t=new l.Stream;return t.add(e),t.end(),t}t.SegmentManager=u},25902:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimestampOffsetService=void 0;var n=i(80813),r=i(85434),o=i(66502),a=i(88052),s=i(62756);t.TimestampOffsetService=function(){function e(e,t){this.context=e,this.mimeType=t,this.CK=new Map;var i=e.sourceContext.sourceIdentifier;this.DK=e.serviceManager.get(n.ServiceName.SourceStoreService,i)}return Object.defineProperty(e.prototype,"EK",{get:function(){return this.context.logger}
14,enumerable:!1,configurable:!0}),e.prototype.maybeAdjustTimestampOffsetAtDiscontinuityChange=function(e,t){var i=e.getSegmentInfo().discontinuitySequenceNumber;if(null==i||e.isInit())return!1;var n=this.CK.get(e.getMimeType())!==i,r=isNaN(t.getTimestampOffset());if(n||r)this.FK(e,i,t);else if(e.getSegmentInfo().wasPrefetched){var o=this.GK(e,i);this.HK(e,o)}return this.CK.set(e.getMimeType(),i),!0},e.prototype.FK=function(e,t,i){var n=this.GK(e,t);this.IK(e,t,i),this.EK.debug("[".concat(this.mimeType,"] Initialized PTO for new discontinuity ").concat(t," to ").concat(n," on segment ").concat(e.getUrl())),i.setTimestampOffset(n),this.HK(e,n)},e.prototype.GK=function(e,t){var i,n,r=this.KK(e).encodedPlaybackTime,o=a.ModuleManager.get(s.ModuleName.HLS),l=null!=(i=null==o?void 0:o.selectors)?i:{},c=l.getHlsState,u=l.getPresentationTimeOffset,d=null==c?void 0:c(this.DK.getState());return d&&null!=(n=u(d,String(t)))?n:this.JK(e,r,t)},e.prototype.HK=function(e,t){var i=this.KK(e),n=i.encodedPlaybackTime,r=i.shouldUpdatePlaybackTime;e.getSegmentInfo().presentationTimeOffset=t,e.setPresentationTimeOffset(t),r&&e.setPlaybackTime(n-t)},e.prototype.IK=function(e,t,i){null==e.getSegmentInfo().startTime&&"extrapolateStartTimesFromDiscontinuityStarts"in i&&(this.EK.debug("[".concat(e.getMimeType(),"] Missing segment startTime when trying to calculate PTO for discontinuity ").concat(t)),i.extrapolateStartTimesFromDiscontinuityStarts(e))},e.prototype.JK=function(e,t,i){var n=t-e.getSegmentInfo().startTime,l=a.ModuleManager.get(s.ModuleName.HLS);return r.MimeTypeHelper.isSubtitle(e.getMimeType())&&o.TextSegmentAnalyzer.isPlainTextPayload(e.getData())||(this.DK.dispatch(l.actions.setPresentationTimeOffset(String(i),n)),this.EK.debug("[".concat(e.getMimeType(),"] Setting PTO for discontinuity ").concat(i," to ").concat(n))),n},e.prototype.KK=function(e){var t,i=a.ModuleManager.get(s.ModuleName.ContainerMP4,!1),n=!0,r=i?i.parsePlaybackTime(e,this.EK):e.getBaseMediaDecodeTime()/e.getTimescale();return isNaN(r)&&(r=null!=(t=e.getPlaybackTime())?t:e.getSegmentInfo().startTime,n=!1),{encodedPlaybackTime:r,shouldUpdatePlaybackTime:n}},e.prototype.dispose=function(){this.CK=null,this.DK=null},e}()},88401:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.UrlInitSegmentProvider=void 0;var n=i(91678),r=i(33436),o=i(37641),a=i(71018);t.UrlInitSegmentProvider=function(){function e(e,t){this.H1={},this.E1=e,this.F1=new a.SegmentLoaderPool(e,{mimeType:t,shouldDownloadBeCancelledCallback:function(){return!1}}),this.G1=new o.SegmentCache(1/0)}return e.prototype.getSegment=function(e){var t=this,i=this.G1.get(e);return i?Promise.resolve(i):null!=this.H1[e.url]?this.H1[e.url]:this.I1(e).then(function(e){return t.J1(e),e})},e.prototype.isLoading=function(){return this.F1.isLoading()},e.prototype.I1=function(e){var t=this;this.F1.isFreeLoaderAvailable()||this.F1.addLoaders(1),this.E1.logger.debug("Loading init segment",e.url);var i=this.F1.load(e).then(function(e){return e.read()}).then(function(t){if(!t.value)throw Error("SegmentStream error ".concat(e.url));return t.value}).finally(function(){delete t.H1[e.url]});return this.H1[e.url]=i,i},e.prototype.J1=function(e){this.G1.add(e),this.E1.store.dispatch((0,n.addMetricsValue)(e.getMimeType(),r.MetricType.CachedInitSegments,{internalRepId:e.getSegmentInfo().internalRepresentationId}))},e.prototype.getCachedSegment=function(e){return this.G1.get(e)},e.prototype.removeCachedSegments=function(e){this.G1.remove(e)},e.prototype.dispose=function(){this.G1.clear(),this.F1.dispose()},e}()},71809:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.collectInitialAdSegmentInfos=function(e,t){var i,n,l,c=(0,o.getManifestService)(e,t.sourceIdentifier),u=null==(i=(0,r.getSourceState)(e,t))?void 0:i.activeTracks,d=null==(l=null==(n=null==c?void 0:c.getManifest())?void 0:n.Period)?void 0:l[0];if(!d||!u)return Promise.resolve([]);var h=[];return Promise.all(Object.entries(u).map(function(i){var n=function(e,t,i){var n,r,o=i.selectedRepresentationId;if(o){var a=(null!=(n=e.AdaptationSet)?n:[]).find(function(e){return e._internalId.adaptationSetId===t});if(a){var s=(null!=(r=a.Representation)?r:[]).find(function(e){return e._internalId.representationId===o.representationId});if(s)return{adaptationSet:a,representation:s}}}}(d,i[0],i[1]);if(!n)return Promise.resolve();var r=n.adaptationSet,o=n.representation,l=r._mimeType;if(!l)return Promise.resolve();var c=a.MPDHandlerFactory.createInstance(e,t,l,d._id);return c?Promise.resolve().then(function(){c.setAdaptationSetId(r._internalId,o._internalId);var e=c.getInitSegmentInfo(o._internalId);return e&&h.push(s(e,l,o)),c.getNextSegmentInfo(0)}).then(function(e){e&&h.push(s(e,l,o))}).finally(function(){return c.dispose()}):Promise.resolve()})).then(function(){return h})};var r=i(15971),o=i(96533),a=i(86219);function s(e,t,i){var r,o,a,s;return n(n({},e),{mimeType:null!=(r=e.mimeType)?r:t,internalRepresentationId:null!=(o=e.internalRepresentationId)?o:i._internalId,codecs:null!=(a=e.codecs)?a:i._codecs,periodId:null!=(s=e.periodId)?s:i._internalId.periodId})}}
vendor: 15,216 bytes, line 14
14,73794:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.initializeHlsSegmentStartTimes=function(e,t,i){var o=t.sourceContext.sourceIdentifier,a=t.serviceManager.get(n.ServiceName.ManifestService,o);if(a&&!a.getAllAdaptationSets().some(function(e){return e.Representation.some(function(e){var t,i;return(null==(i=null==(t=e.SegmentList)?void 0:t[0].SegmentURL[0])?void 0:i._playbackTime)!==void 0})})){var s=e.getRepresentationId();a.initializeSegmentStartTimesFromStart(s),(0,r.assignSegmentStartTimesFromHlsRepresentation)(i.getSegmentListEntries(e.getRepresentationId()),s,a)}};var n=i(80813),r=i(63066)},97587:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Stream=void 0;var n=i(34841),r=i(24389),o=i(78006);t.Stream=function(){function e(){var e=this;this.lg=function(){e.jg&&!e.isEmpty()&&(e.jg.resolve({done:!1,value:e.ig.shift()}),e.jg=null)},this.Xf=o.StreamState.Open,this.ig=[],this.kg=new n.Deferred,this.kg.promise.catch(function(){})}return e.prototype.add=function(e){this.Xf===o.StreamState.Open&&(this.ig.push(e),this.lg())},e.prototype.read=function(){if(this.jg)return Promise.reject({name:r.StreamReadError.ParallelRead});if(this.Xf===o.StreamState.Ended&&this.isEmpty())return Promise.resolve({done:!0});if(this.Xf===o.StreamState.Aborted)return Promise.reject({name:r.StreamReadError.Aborted,message:this.getError()});this.jg=new n.Deferred;var e=this.jg.promise;return this.lg(),e},e.prototype.end=function(){this.Xf===o.StreamState.Open&&(this.Xf=o.StreamState.Ended,this.jg&&this.isEmpty()&&(this.jg.resolve({done:!0}),this.jg=null),this.kg.resolve())},e.prototype.abort=function(e){var t;if(this.Xf===o.StreamState.Open){this.Xf=o.StreamState.Aborted,this.error=e;var i={name:o.StreamState.Aborted,message:null!=(t=this.getError())?t:""};this.jg&&(this.jg.reject(i),this.jg=null),this.kg.reject(i)}},e.prototype.transform=function(t,i,n){var r=this,o=new e,a=function(){r.read().then(function(e){var n=e.done,r=e.value;if(n)i&&i(),o.end();else{var s=null!=r&&t(r);s&&o.add(s),a()}}).catch(function(e){n?o.abort(n(e)):o.abort(e)})};return a(),o},e.prototype.isEmpty=function(){return 0===this.ig.length},e.prototype.getError=function(){return this.error||null},e}()},24389:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamReadError=void 0,function(e){e.Aborted="aborted",e.ParallelRead="parallelread"}(i||(t.StreamReadError=i={}))},78006:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamState=void 0,function(e){e.Open="open",e.Ended="ended",e.Aborted="aborted"}(i||(t.StreamState=i={}))},61800:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscontinuityMonitor=void 0;var n=i(3714);t.DiscontinuityMonitor=function(){function e(e){var t=this;this.context=e,this.X1=function(){t.U1=!0},this.Y1=function(){var e=t.context.internalPlayer.getCurrentTime();Object.values(t.V1).forEach(function(i){e>=i.playbackTime&&i.playbackTime+i.duration>=e&&t.maybeFirePeriodSwitchEvents(i)}),t.V1={},t.U1=!1},this.T1={},this.V1={},this.U1=!1,this.W1=[],this.context.eventHandler.on(n.PlayerEvent.Seek,this.X1,!0),this.context.eventHandler.on(n.PlayerEvent.Seeked,this.Y1,!0)}return e.prototype.trackIncomingDiscontinuity=function(e,t,i,n){this.T1[t]?this.U1&&(this.V1[t]={mimeType:t,discontinuitySequenceNumber:e,playbackTime:i,duration:n}):this.T1[t]={discontinuitySequenceNumber:e,startTime:i||0},this.W1.includes(e)||this.W1.push(e)},e.prototype.isDiscontinuityExpected=function(e){return this.W1.includes(e)},e.prototype.reset=function(){this.W1=[]},e.prototype.maybeFirePeriodSwitchEvents=function(e){var t=e.mimeType,i=e.discontinuitySequenceNumber,r=e.playbackTime;if(null!=i&&this.T1[t]){var o=this.T1[t].discontinuitySequenceNumber;o!==i&&(this.Z1(t,i,r)&&(this.context.eventHandler.dispatchEvent(n.PlayerEvent.PeriodSwitch),this.context.eventHandler.dispatchEvent(n.PlayerEvent.PeriodSwitched,{sourcePeriod:{periodId:String(o)},targetPeriod:{periodId:String(i)}})),this.T1[t]={discontinuitySequenceNumber:i,startTime:r})}},e.prototype.Z1=function(e,t,i){var n=this,r=Object.keys(this.T1).filter(function(t){return t!==e}),o=!0;return r.forEach(function(e){var r=n.T1[e];r.discontinuitySequenceNumber===t&&1>Math.abs(i-r.startTime)&&(o=!1)}),o},e.prototype.dispose=function(){this.context.eventHandler.off(n.PlayerEvent.Seek,this.X1),this.context.eventHandler.off(n.PlayerEvent.Seeked,this.Y1)},e}()},86163:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PeriodSwitchMonitor=void 0;var n=i(15971),r=i(42208),o=i(88935);t.PeriodSwitchMonitor=function(){function e(e){this.context=e,this.S1=[]}return e.prototype.isPeriodExpected=function(e){return this.S1.includes(e)},e.prototype.trackIncomingPeriod=function(e){this.S1.includes(e)||this.S1.push(e)},e.prototype.maybeHandlePeriodSwitch=function(e){var t=(0,n.getSourceStore)(this.context),i=null==t?void 0:t.getState();if(t&&i){var a=e.periodId,s=(0,o.getPlayingPeriodId)(i);a&&a!==s&&this.S1.includes(a)&&(t.dispatch((0,r.periodSwitchStarted)(a)),t.dispatch((0,r.periodSwitchFinished)(a)))}},e.prototype.reset=function(){this.S1=[]},e.prototype.dispose=function(){this.S1=[]},e}()},87187:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInitType=t.Segment=void 0;var r,o=i(74853),a=i(85434),s=i(65439);t.Segment=function(){function e(e,t,i,n,a,s,l,c,u,d){void 0===s&&(s=r.NONE),this.eP=[],this.data=e,this.ZP=t,this.aP=i,this.YP=n,this.bP=a,this.cP=s,this.dP=l,this.gP=!1,this.GO={subtitles:[]},this.hP=c,this.iP=u,this.JO=d,this.jP=!1,this.mP=null,e instanceof ArrayBuffer||"string"==typeof e&&(this.data=o.ArrayHelper.stringToArrayWithoutEncoding(e).buffer)}return e.prototype.setDrmKid=function(e){this.oP=e},e.prototype.hasDrmKid=function(){return!!this.getDrmKid()},e.prototype.getDrmKid=function(){var e,t,i;return null!=(i=null!=(e=this.oP)?e:null==(t=this.nP)?void 0:t.getDrmKid())?i:void 0},e.prototype.setDrmInitData=function(e){this.mP=e},e.prototype.hasDrmInitData=function(){var e;return(null==(e=this.mP)?void 0:e.length)>0},e.prototype.getDrmInitData=function(){return this.hasDrmInitData()?this.mP:[]},e.prototype.getMimeType=function(){return this.ZP},e.prototype.isInit=function(){return this.cP===r.INIT},e.prototype.isSelfInit=function(){return this.cP===r.SELF_INIT},e.prototype.isEncrypted=function(){return this.gP},e.prototype.setEncrypted=function(e){this.gP=e},e.prototype.setUrl=function(e){this.HO=e},e.prototype.getUrl=function(){return this.HO},e.prototype.getData=function(){return this.data},e.prototype.setData=function(e){this.data=e},e.prototype.getMetadata=function(){return this.GO},e.prototype.setMetadata=function(e){this.GO=e},e.prototype.getPlaybackTime=function(){return this.JO},e.prototype.setPlaybackTime=function(e){this.JO=e},e.prototype.getPlaybackEndTime=function(){return this.JO+this.bP},e.prototype.getPlaybackTimeRange=function(){return this.bP?{start:this.getPlaybackTime(),end:this.getPlaybackEndTime()}:(0,s.getSegmentInfoTimeRange)(this.getSegmentInfo())},e.prototype.getBaseMediaDecodeTime=function(){return this.VP},e.prototype.setBaseMediaDecodeTime=function(e){this.VP=e},e.prototype.getPresentationTimeOffset=function(){return this.WP},e.prototype.setPresentationTimeOffset=function(e){this.WP=e},e.prototype.getTFDTBoxOffsets=function(){return this.UP},e.prototype.setTFDTBoxOffsets=function(e){this.UP=e},e.prototype.pP=function(e){var t;return this.getParserMetadata()&&this.getParserMetadata()[e]?this.getParserMetadata()[e]:null!=(t=this.getInitSegment())&&t.getParserMetadata()?this.getInitSegment().getParserMetadata()[e]:void 0},e.prototype.getTimescale=function(){return this.pP("timescale")},e.prototype.getIvSize=function(){return this.pP("ivSize")},e.prototype.getDefaultSampleDuration=function(){return this.pP("defaultSampleDuration")},e.prototype.getDefaultSampleSize=function(){return this.pP("defaultSampleSize")},e.prototype.setTimescale=function(e){this.updateParserMetadata({timescale:e})},e.prototype.getPeriodId=function(){return this.YP},e.prototype.getCodec=function(){return this.aP},e.prototype.setCodec=function(e){this.aP=e},e.prototype.getDuration=function(){return this.bP},e.prototype.setDuration=function(e){this.bP=e},e.prototype.getNetworkRequestSize=function(){return this.hP},e.prototype.getRepresentationId=function(){return this.iP},e.prototype.getParsedData=function(){return this.IO},e.prototype.setParsedData=function(e){this.IO=e},e.prototype.getSegmentInfo=function(){return this.XP},e.prototype.isIndependentlyDecodable=function(){return this.dP},e.prototype.setSegmentInfo=function(e){this.XP=e},e.prototype.getMediaInfo=function(){var e={};return this.XP&&this.XP.bitrate&&(e.bitrate=this.XP.bitrate),a.MimeTypeHelper.isAudio(this.ZP)?this.XP&&this.XP.sampleRate&&(e.sampleRate=this.XP.sampleRate):a.MimeTypeHelper.isVideo(this.ZP)&&(this.XP&&this.XP.width&&(e.width=this.XP.width),this.XP&&this.XP.height&&(e.height=this.XP.height),this.XP&&this.XP.frameRate&&(e.frameRate=this.XP.frameRate)),e},e.prototype.isDirty=function(){return this.jP},e.prototype.setDirty=function(e){this.jP=e},e.prototype.setInbandEvents=function(e){this.eP=e},e.prototype.getInbandEvents=function(){return this.eP},e.prototype.setLastSegment=function(e){this.fP=e},e.prototype.isLastSegment=function(){return this.fP},e.prototype.wasLoadedFrom=function(e){return this.getUrl().includes(e)},e.prototype.getParserMetadata=function(){return this.kP},e.prototype.setParserMetadata=function(e){this.kP=e},e.prototype.updateParserMetadata=function(e){this.kP=n(n({},this.kP),e)},e.prototype.setBufferBlockId=function(e){this.lP=e},e.prototype.getBufferBlockId=function(){return this.lP},e.prototype.setInitSegment=function(e){this.nP=e},e.prototype.getInitSegment=function(){return this.nP},e}(),function(e){e[e.NONE=0]="NONE",e[e.INIT=1]="INIT",e[e.SELF_INIT=2]="SELF_INIT"}(r||(t.SegmentInitType=r={}))},50827:function(e,t){function i(e){return[e.url,e.mediaURL].filter(Boolean)}function n(e,t){return null==e?null==t:null!=t&&e.start===t.start&&e.end===t.end}Object.defineProperty(t,"__esModule",{value:!0}),t.isIdenticalSegmentInfo=function(e,t){if(void 0!==e.mediaSequence&&void 0!==t.mediaSequence)return e.mediaSequence===t.mediaSequence;var r=function(e,t){var n=i(e),r=i(t);return n.some(function(e){return r.includes(e)})}(e,t),o=n(e.byteRange,t.byteRange),a=e.discontinuitySequenceNumber===t.discontinuitySequenceNumber;return r&&o&&a},t.isIdenticalInitSegmentInfo=function(e,t){var i=(null==e?void 0:e.url)===(null==t?void 0:t.url),r=n(null==e?void 0:e.byteRange,null==t?void 0:t.byteRange);return i&&r}},19627:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentUnavailabilityHandler=void 0;var n=i(3714),r=i(58313);t.SegmentUnavailabilityHandler=function(){function e(e){this.fJ={},this.gJ=!1,this.eJ=e}return e.prototype.downloadSuccess=function(e){this.gJ&&e?this.gJ=!1:this.fJ={}},e.prototype.hJ=function(e,t){for(var i=[],n=0;n<e.length&&!e[n]._internalId.equals(t);n++)this.fJ[e[n]._id]||i.push(e[n]);return i.length>0?i[i.length-1]._internalId:null},e.prototype.switchQuality=function(e,t){this.fJ[t.representationId]=!0;var i=this.hJ(e,t);return i?(this.gJ=!0,i):(this.eJ.logger.log("no quality left, all tried"),null)},e.prototype.switchBaseURL=function(e){var t=e.availableBaseURLs,i=e.lastUsedBaseURLIndex+1;if((i%=t.length)===e.firstUsedBaseURLIndex)return this.eJ.logger.log("no base url left, all tried"),null;var o=e.baseURL;return e.lastUsedBaseURLIndex=i,e.baseURL=t[i],e.url=r.URLHelper.concatBaseUrlWithPartial(e.baseURL,e.mediaURL),this.eJ.eventHandler.dispatchEvent(n.PlayerEvent.ContentLocationChanged,{sourceLocationId:o??"",targetLocationId:e.baseURL,reason:n.ContentLocationChangedReason.Failover}),e},e.prototype.shouldTryAlternatives=function(e){return e>=400&&e<=599||0===e},e}()},15761:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.TimedMetadataService=void 0;var r=i(80813),o=i(56481),a=i(3714),s=i(59225),l=i(32485),c=i(91678),u=i(46151),d=i(33436),h=i(85434),p=i(79505),f=i(61800),m=i(86163);function g(e){var t=e.getSegmentInfo();return{uid:btoa(e.getUrl()),url:e.getUrl(),mimeType:e.getMimeType(),playbackTime:e.getPlaybackTime(),presentationTimestamp:e.getBaseMediaDecodeTime()/e.getTimescale(),duration:e.getDuration(),mediaInfo:e.getMediaInfo(),wallClockTime:t.wallClockTime,discontinuitySequenceNumber:t.discontinuitySequenceNumber,periodId:void 0===t.discontinuitySequenceNumber?t.periodId:void 0}}t.TimedMetadataService=function(){function e(e){var t,i=this;this.context=e,this.LH=function(e){if(e.hasOwnProperty("metadata")){var t={metadataType:e.metadataType.toUpperCase(),metadata:e.metadata};(e.start||0===e.start)&&(t.start=e.start),e.end&&(t.end=e.end),i.context.eventHandler.dispatchEvent(a.PlayerEvent.Metadata,t)}},this.NH=function(e){e&&e.hasOwnProperty("metadataType")&&i.context.eventHandler.dispatchEvent(a.PlayerEvent.Metadata,{metadataType:e.metadataType,metadata:e.metadata})},this.OH=function(e){var t=e.metadata.event;return!(void 0!==t.periodId&&!i.JH.isPeriodExpected(t.periodId))&&!(void 0!==t.discontinuitySequenceNumber&&!i.IH.isDiscontinuityExpected(t.discontinuitySequenceNumber))&&(i.FH[t.mimeType]=t,i.EH[t.mimeType]=p.RepresentationId.from(e.metadata.representationId),i.IH.maybeFirePeriodSwitchEvents(t),i.JH.maybeHandlePeriodSwitch(t),i.DH[t.mimeType]&&i.DH[t.mimeType].id===t.representationId||i.PH(t),void i.context.eventHandler.dispatchEvent(a.PlayerEvent.SegmentPlayback,t))},this.DH={},this.EH={},this.FH={},this.HH=this.context.serviceManager.get(r.ServiceName.ManifestService,e.sourceContext.sourceIdentifier);var n=((t={})[l.TimedMetadataType.InBand]=this.NH,t[l.TimedMetadataType.SegmentPlayback]=this.OH,t[l.TimedMetadataType.Manifest]=this.LH,t[l.TimedMetadataType.EventStream]=this.LH,t[l.TimedMetadataType.DateRange]=this.LH,t[l.TimedMetadataType.CustomTag]=this.LH,t);this.GH=new s.MetadataService(e,n),this.IH=new f.DiscontinuityMonitor(e),this.JH=new m.PeriodSwitchMonitor(e)}return e.prototype.clearSegmentBoundMetadata=function(e){this.GH.removeMatchingCues(l.TimedMetadataType.SegmentPlayback,function(t){return t.content.metadata.mimeType===e})},e.prototype.onSegmentAvailable=function(e){var t,i=this,n=e.segment,r=e.extractedMetadata,o=e.isSegmentOfMainStream,s=e.presentationTimeOffset;if(o){t=function(e){var t=g(e),i=e.getSegmentInfo();return i.dateTime&&(t.dateTime=i.dateTime),i.representationId&&(t.representationId=i.representationId),t}(n);var l=n.getSegmentInfo();l.metadata&&l.metadata.forEach(function(e){i.VH(e,t,n.getPeriodId())}),function(e){return e.metadata&&e.metadata.length>0&&e.metadata[0].type===a.MetadataType.CUSTOM}(l)&&this.TH(l),this.RH(r,s,n.getPeriodId())}else t=g(n);
vendor: 4,925 bytes, line 14
14this.KH(n,t),n.getInbandEvents().forEach(function(e){i.UH(e,n.getPeriodId())})},e.prototype.KH=function(e,t){if(!e.isInit()){var i=e.getSegmentInfo(),n=e.getMimeType(),r={metadata:{event:t,representationId:{_periodId:i.internalRepresentationId.periodId,_adaptationSetId:i.internalRepresentationId.adaptationSetId,_representationId:i.internalRepresentationId.representationId},mimeType:n}};this.GH.addToTimeline(l.TimedMetadataType.SegmentPlayback,t.playbackTime,r),(0,u.getMetricsState)(this.context.store.getState())[n]||this.context.store.dispatch((0,c.initializeMetricsForMimeType)(n,this.context.settings)),this.context.store.dispatch((0,c.addMetricsValue)(n,d.MetricType.SegmentInformation,{bitrate:8*e.getNetworkRequestSize()/e.getDuration(),duration:e.getDuration(),playbackTime:i.startTime||e.getPlaybackTime(),representationId:e.getRepresentationId()}))}},e.prototype.parseEventStream=function(){var e=this;this.HH.getAllPeriods().forEach(function(t){e.HH.getEventStreamEvents(t).forEach(function(i){e.MH(i,t)})})},e.prototype.MH=function(e,t){var i={metadataType:a.MetadataType.EVENT_STREAM,metadata:e.data,start:e.startTime,end:e.endTime};this.GH.addToMetadataParsedService(e.startTime,n(n({},i),{data:e.data}),t._id),this.GH.addToTimeline(l.TimedMetadataType.EventStream,e.startTime,i)},e.prototype.getPlaybackRepresentation=function(e){var t=this.context.serviceManager.get(r.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier),i=null==t?void 0:t.getRepresentationById(this.EH[e]);if(i)return i=n({},i),this.FH[e]&&(i.uid=this.FH[e].uid),i},e.prototype.trackContentBoundary=function(e){var t=e.getPeriodId();this.JH.trackIncomingPeriod(t);var i=e.getSegmentInfo().discontinuitySequenceNumber;if(void 0!==i){var n=e.getSegmentInfo().startTime,r=e.getSegmentInfo().duration,o=e.getMimeType();this.IH.trackIncomingDiscontinuity(i,o,n,r)}},e.prototype.resetContentBoundaryTracking=function(){this.JH.reset(),this.IH.reset()},e.prototype.PH=function(e){var t,i;h.MimeTypeHelper.isAudio(e.mimeType)?(t=a.PlayerEvent.AudioPlaybackQualityChanged,i={id:e.representationId,bitrate:parseFloat(e.mediaInfo.bitrate)}):h.MimeTypeHelper.isVideo(e.mimeType)&&(t=a.PlayerEvent.VideoPlaybackQualityChanged,i={id:e.representationId,bitrate:parseFloat(e.mediaInfo.bitrate),width:parseFloat(e.mediaInfo.width),height:parseFloat(e.mediaInfo.height)}),t&&this.context.eventHandler.dispatchEvent(t,{targetQuality:i,sourceQuality:this.DH[e.mimeType]||null}),this.DH[e.mimeType]=i},e.prototype.processDateRangeEvent=function(e,t){var i={metadataType:a.MetadataType.DATERANGE,metadata:e.data,start:e.startTime,end:e.endTime};this.GH.addToMetadataParsedService(e.startTime,n(n({},i),{data:e.data}),t),this.GH.addToTimeline(l.TimedMetadataType.DateRange,e.startTime,i)},e.prototype.QH=function(e,t){var i=this;e.forEach(function(e){if(e._metadata&&e._metadata.length>0&&e._playbackTime){var n={metadataType:a.MetadataType.CUSTOM,metadata:e._metadata,data:e._metadata,start:e._playbackTime,end:e._playbackTime+e._duration};i.GH.addToMetadataParsedService(e._playbackTime,n,t)}})},e.prototype.RH=function(e,t,i){var n=this;e&&Array.isArray(e.id3)&&e.id3.length>0&&e.id3.forEach(function(e){n.SH(e,t,i)})},e.prototype.SH=function(e,t,i){var r=e.presentationTime-t,o={metadataType:a.MetadataType.ID3,metadata:e.data,start:r};this.GH.addToMetadataParsedService(r,n(n({},o),{data:e.data}),i),this.GH.addToTimeline(l.TimedMetadataType.InBand,r,o)},e.prototype.TH=function(e){var t=this,i=this.HH.getRepresentationById(e.internalRepresentationId);i.SegmentList[0].SegmentURL.forEach(function(n,r){n._media===e.url&&(n._playbackTime||function(e,t,i){for(var n=t,r=i;n>=0;)e[n]._playbackTime=r,r-=e[n]._duration,n--;for(n=t+1,r=i+e[t]._duration;n<e.length;)e[n]._playbackTime=r,r+=e[n]._duration,n++}(i.SegmentList[0].SegmentURL,r,e.startTime),t.GH.addToTimeline(l.TimedMetadataType.CustomTag,e.startTime,{metadataType:a.MetadataType.CUSTOM,metadata:n._metadata,start:e.startTime,end:e.startTime+e.duration}))}),this.QH(i.SegmentList[0].SegmentURL,e.periodId)},e.prototype.UH=function(e,t){var i=e.presentationTime,r={metadataType:a.MetadataType.EMSG,metadata:e,start:i};this.GH.addToMetadataParsedService(i,n(n({},r),{data:e}),t),this.GH.addToTimeline(l.TimedMetadataType.InBand,i,r)},e.prototype.VH=function(e,t,i){var r=e.type;if(r===a.MetadataType.CUSTOM)t.EXPERIMENTAL=t.EXPERIMENTAL||{},t.EXPERIMENTAL.hlsAttributes=t.EXPERIMENTAL.hlsAttributes||[],t.EXPERIMENTAL.hlsAttributes=t.EXPERIMENTAL.hlsAttributes.concat(e.attributes);else{var o={metadataType:/^CUE-(IN|OUT(-CONT)?)$/.test(r)?a.MetadataType.CUETAG:a.MetadataType[e.type],metadata:e,start:t.playbackTime};this.GH.addToMetadataParsedService(o.start,n(n({},o),{data:e}),i),this.GH.addToTimeline(l.TimedMetadataType.Manifest,o.start,o)}},e.prototype.dispose=function(){this.GH=(0,o.dispose)(this.GH),this.HH=null,this.IH=(0,o.dispose)(this.IH),this.JH.dispose()},e}()}
vendor: 6,360 bytes, line 14
14,36193:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setRepresentationIdAction=function(e){return(0,n.createAction)(o.ActiveTracksActionType.SetSelectedRepresentationId,{selectedRepresentationId:e})},t.setMediaTypeAction=function(e,t){var i=(0,r.forceArray)(t);return(0,n.createAction)(o.ActiveTracksActionType.SetMediaType,{trackId:e,mediaTypes:i})},t.setContainerFormatAction=function(e,t){return(0,n.createAction)(o.ActiveTracksActionType.SetContainerFormat,{trackId:e,containerFormat:t})},t.removeActiveTrackAction=function(e){return(0,n.createAction)(o.ActiveTracksActionType.RemoveActiveTrack,{adaptationSetId:e})},t.clearActiveTracksAction=function(){return(0,n.createAction)(o.ActiveTracksActionType.ClearActiveTracks)};var n=i(35267),r=i(74853),o=i(7511)},7511:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveTracksActionType=void 0,function(e){e.SetSelectedRepresentationId="@instance/sources/@source/activetracks/setselectedrepresentationid",e.SetMediaType="@instance/sources/@source/activetracks/setmediatype",e.SetContainerFormat="@instance/sources/@source/activetracks/setcontainerformat",e.RemoveActiveTrack="@instance/sources/@source/activetracks/remove",e.ClearActiveTracks="@instance/sources/@source/activetracks/clear"}(i||(t.ActiveTracksActionType=i={}))},44115:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveTracksReducer=void 0,t.getContainerFormat=function(e,t){var i;if(e.activeTracks)return null==(i=Object.values(e.activeTracks).find(function(e){var i;return null==(i=e.mediaTypes)?void 0:i.includes(t)}))?void 0:i.containerFormat},t.getMediaTypes=function(e,t){var i;return e.activeTracks&&(null==(i=e.activeTracks[t.adaptationSetId])?void 0:i.mediaTypes)||[]};var a=i(3793),s=i(7511),l={};t.ActiveTracksReducer=(0,a.default)({},((n={})[s.ActiveTracksActionType.SetSelectedRepresentationId]=function(e,t){return function(e,t){var i,n=t.selectedRepresentationId,o=e[n.adaptationSetId];return r(r({},e),((i={})[n.adaptationSetId]=r(r({},o),{selectedRepresentationId:n}),i))}(e,t.payload)},n[s.ActiveTracksActionType.SetMediaType]=function(e,t){return function(e,t){var i,n=t.trackId,o=t.mediaTypes,a=e[n.adaptationSetId];return r(r({},e),((i={})[n.adaptationSetId]=r(r({},a),{mediaTypes:o}),i))}(e,t.payload)},n[s.ActiveTracksActionType.SetContainerFormat]=function(e,t){return function(e,t){var i,n=t.trackId,o=t.containerFormat,a=e[n.adaptationSetId];return r(r({},e),((i={})[n.adaptationSetId]=r(r({},a),{containerFormat:o}),i))}(e,t.payload)},n[s.ActiveTracksActionType.RemoveActiveTrack]=function(e,t){return function(e,t){var i=e,n=t.adaptationSetId.adaptationSetId,a=(i[n],o(i,["symbol"==typeof n?n:n+""]));return r({},a)}(e,t.payload)},n[s.ActiveTracksActionType.ClearActiveTracks]=function(){return l},n))},51386:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.removeEncryptionKey=t.updateEncryptionKey=t.addEncryptionKey=void 0;var n=i(35267),r=i(92096);t.addEncryptionKey=function(e){return(0,n.createAction)(r.EncryptionKeyActionKey.AddEncryptionKey,e)},t.updateEncryptionKey=function(e){return(0,n.createAction)(r.EncryptionKeyActionKey.UpdateEncryptionKey,e)},t.removeEncryptionKey=function(e){return(0,n.createAction)(r.EncryptionKeyActionKey.RemoveEncryptionKey,{keyUri:e})}},20477:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptionKeyReducer=void 0;var a=i(3793),s=i(92096);t.EncryptionKeyReducer=(0,a.default)([],((n={})[s.EncryptionKeyActionKey.AddEncryptionKey]=function(e,t){var i=t.payload;return o(o([],e,!0),[r({},i)],!1)},n[s.EncryptionKeyActionKey.UpdateEncryptionKey]=function(e,t){var i=t.payload,n=e.findIndex(function(e){return e.uri===i.uri});if(-1===n)return e;var a=e[n],s=o([],e,!0);return s.splice(n,1,r(r({},a),i)),s},n[s.EncryptionKeyActionKey.RemoveEncryptionKey]=function(e,t){var i=t.payload;return o([],e,!0).filter(function(e){return e.uri!==i.keyUri})},n))},66628:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getEncryptionKey=t.getAllEncryptionKeys=void 0,t.getAllEncryptionKeys=function(e){return null==e?void 0:e.encryptionKeys},t.getEncryptionKey=function(e,t){var i;return null==(i=null==e?void 0:e.encryptionKeys)?void 0:i.find(function(e){return e.uri===t})}},92096:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptionKeyActionKey=t.KeyLoadState=void 0,function(e){e.Loading="loading",e.Loaded="loaded",e.Cancel="cancel"}(i||(t.KeyLoadState=i={})),function(e){e.AddEncryptionKey="@instance/sources/@source/encryptionkey/addEncryptionKey",e.UpdateEncryptionKey="@instance/sources/@source/encryptionkey/updateEncryptionKey",e.RemoveEncryptionKey="@instance/sources/@source/encryptionkey/removeEncryptionKey"}(n||(t.EncryptionKeyActionKey=n={}))},52447:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.engineBitmovinSourceReducers=void 0;var n=i(44115),r=i(20477),o=i(79872),a=i(88935),s=i(63184),l=i(95236),c=i(73861),u=i(41710),d=i(14808);t.engineBitmovinSourceReducers={manifest:o.ManifestReducer,activeTracks:n.ActiveTracksReducer,playingTracks:a.PlayingTracksReducer,encryptionKeys:r.EncryptionKeyReducer,buffer:c.BufferReducer,renderer:u.RendererReducer,streamTimeline:d.StreamTimelineReducer,segmentInfoMap:l.SegmentInfoMapReducer,relativeCurrentTimeOff
14set:s.RelativeCurrentTimeOffsetReducer}},42208:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.periodSwitchStarted=t.periodSwitchFinished=t.setPlayingPeriodId=void 0;var n=i(35267),r=i(84362);t.setPlayingPeriodId=function(e){return(0,n.createAction)(r.PlayingTracksActionKey.SetPlayingPeriodId,e)},t.periodSwitchFinished=function(e){return(0,n.createAction)(r.PlayingTracksActionKey.FinishedPeriodSwitch,e)},t.periodSwitchStarted=function(e){return(0,n.createAction)(r.PlayingTracksActionKey.StartedPeriodSwitch,e)}},88935:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayingTracksReducer=t.isSwitchingPeriods=t.wasSwitchingToPeriodIdReset=t.getPlayingTracksState=t.getPlayingPeriodId=void 0;var o=i(3793),a=i(84362);t.getPlayingPeriodId=function(e){var t;return null==(t=e.playingTracks)?void 0:t.playingPeriodId},t.getPlayingTracksState=function(e){return e.playingTracks},t.wasSwitchingToPeriodIdReset=function(e,t){return(null==t?void 0:t.switchingToPeriodId)!==void 0&&(null==e?void 0:e.switchingToPeriodId)===void 0},t.isSwitchingPeriods=function(e,t){return(null==t?void 0:t.switchingToPeriodId)===void 0&&(null==e?void 0:e.switchingToPeriodId)!==void 0},t.PlayingTracksReducer=(0,o.default)({},((n={})[a.PlayingTracksActionKey.SetPlayingPeriodId]=function(e,t){var i=t.payload;return r(r({},e),{playingPeriodId:i})},n[a.PlayingTracksActionKey.FinishedPeriodSwitch]=function(e,t){var i=t.payload;return r(r({},e),{switchingToPeriodId:e.switchingToPeriodId===i?void 0:e.switchingToPeriodId})},n[a.PlayingTracksActionKey.StartedPeriodSwitch]=function(e,t){var i=t.payload;return r(r({},e),{switchingToPeriodId:i})},n))},84362:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayingTracksActionKey=void 0,function(e){e.SetPlayingPeriodId="@instance/sources/@source/playingTracks/setPlayingPeriodId",e.FinishedPeriodSwitch="@instance/sources/@source/playingTracks/periodSwitchFinished",e.StartedPeriodSwitch="@instance/sources/@source/playingTracks/periodSwitchStarted"}(i||(t.PlayingTracksActionKey=i={}))},27531:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}
vendor: 17,781 bytes, line 14
14),t.RelativeCurrentTimeOffsetActionType=void 0,t.setRelativeCurrentTimeOffset=function(e){return(0,r.createAction)(n.SetRelativeCurrentTimeOffset,e)};var n,r=i(35267);!function(e){e.SetRelativeCurrentTimeOffset="@instance/source/setrelativecurrenttimeoffset"}(n||(t.RelativeCurrentTimeOffsetActionType=n={}))},63184:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RelativeCurrentTimeOffsetReducer=void 0;var n,r=i(3793),o=i(27531);t.RelativeCurrentTimeOffsetReducer=(0,r.default)(null,((n={})[o.RelativeCurrentTimeOffsetActionType.SetRelativeCurrentTimeOffset]=function(e,t){return t.payload},n))},33903:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRelativeCurrentTimeOffset=void 0,t.getRelativeCurrentTimeOffset=function(e){var t;return null!=(t=null==e?void 0:e.relativeCurrentTimeOffset)?t:null}},10333:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sourceIdentifiersSelector=t.hasASourceStoreIdentifierChanged=void 0,t.hasASourceStoreIdentifierChanged=function(e,t){return e.length!==t.length||e.some(function(e){return!t.includes(e)})},t.sourceIdentifiersSelector=function(e){var t;return Object.keys(null!=(t=e.sources)?t:{})}},59707:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setManifestAction=function(e){return(0,n.createAction)(r.ManifestActionType.SetManifest,{manifest:e})},t.setManifestInitializedAction=function(e){return(0,n.createAction)(r.ManifestActionType.SetManifestInitialized,{isInitialized:e})},t.removeRepresentationsAction=function(e){return(0,n.createAction)(r.ManifestActionType.RemoveRepresentations,{representationIds:e})},t.updateManifestAction=function(e){return(0,n.createAction)(r.ManifestActionType.UpdateManifest,e)},t.updateAdaptationSetAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.UpdateAdaptationSet,{adaptationSetId:e,updates:t})},t.updateRepresentationAction=function(e){return(0,n.createAction)(r.ManifestActionType.UpdateRepresentation,e)},t.updatePeriodTimingAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.UpdatePeriodTiming,{periodId:e,timing:t})},t.adjustPeriodStartTimes=function(e){return(0,n.createAction)(r.ManifestActionType.AdjustPeriodStartTimes,{offset:e})},t.setRepresentationDrmKidAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.SetRepresentationDrmKid,{representationId:e,associatedKid:t})},t.updateRepresentationFailedDownloadAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.UpdateRepresentationFailedDownload,{representationId:e,loadFailureReason:t})},t.setRepresentationSegmentIndexAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.SetRepresentationSegmentIndex,{representationId:e,segmentIndex:t})},t.setRepresentationIsLoadingAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.SetRepresentationIsLoading,{representationId:e,isLoading:t})},t.setRepresentationSegmentIndexParsingErrorAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.SetRepresentationSegmentIndexParsingError,{representationId:e,segmentIndexParsingError:t})},t.setRepresentationAnchorPointAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.SetRepresentationAnchorPoint,{representationId:e,anchorPoint:t})},t.initPlaybackTimesFromIndex=function(e,t,i){return(0,n.createAction)(r.ManifestActionType.InitPlaybackTimesFromIndex,{representationId:e,index:t,playbackTimeForIndex:i})},t.initPlaybackTimesFromReferenceSegment=function(e){return(0,n.createAction)(r.ManifestActionType.InitPlaybackTimesFromReferenceSegment,{representationId:e.getRepresentationId(),segmentUrl:e.getUrl(),segmentPlaybackTime:e.getPlaybackTime(),discontinuitySequenceNumber:e.getSegmentInfo().discontinuitySequenceNumber})},t.resetSegmentPlaybackTimes=function(){return(0,n.createAction)(r.ManifestActionType.ResetSegmentPlaybackTimes)};var n=i(35267),r=i(71050)},79872:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestReducer=void 0;var a=i(3793),s=i(15014),l=i(13422),c=i(71050);function u(e,t,i){var n,o;return r(r({},e),{Period:null!=(o=null==(n=e.Period)?void 0:n.map(function(e){var n;return r(r({},e),{AdaptationSet:null==(n=e.AdaptationSet)?void 0:n.map(function(e){var n;return r(r({},e),{Representation:null==(n=e.Representation)?void 0:n.map(function(e){return e._internalId.equals(t)?r(r({},e),i):e})})})})}))?o:[]})}function d(e,t,i){var n=o([],e,!0);return n[t]=r({},n[t]),n[t]._playbackTime=i,function(e,t){for(var i=t-1;i>=0;i--)e[i]=r({},e[i]),e[i]._playbackTime=e[i+1]._playbackTime-e[i]._duration}(n,t),function(e,t){for(var i=t+1;i<e.length;i++)e[i]=r({},e[i]),e[i]._playbackTime=e[i-1]._playbackTime+e[i-1]._duration}(n,t),n}function h(e){return r(r({},e),{SegmentURL:e.SegmentURL.map(function(e){var t=r({},e);return delete t._playbackTime,t})})}t.ManifestReducer=(0,a.default)({},((n={})[c.ManifestActionType.SetManifest]=function(e,t){return t.payload.manifest||e},n[c.ManifestActionType.SetManifestInitialized]=function(e,t){return r(r({},e),{isInitialized:t.payload.isInitialized})},n[c.ManifestActionType.RemoveRepresentations]=function(e,t){return 0===t.payload.representationIds.length?e:(0,l.removeRepresentations)(e,t.payload.representationIds)},n[c.ManifestActionType.UpdateManifest]=function(e,t){return function(e,t){return r(r({},e),t)}(e,t.payload)},n[c.ManifestActionType.UpdateAdaptationSet]=function(e,t){return function(e,t){var i,n=t.adaptationSetId,a=t.updates,s=e.Period.findIndex(function(e){return e._id===n.periodId});if(s<0)return e;var l=null==(i=e.Period[s])?void 0:i.AdaptationSet.findIndex(function(e){return e._internalId.equals(n)});if(l<0)return e;var c=r({},e);c.Period=o([],c.Period,!0),c.Period[s]=r({},c.Period[s]);var u=c.Period[s];return u.AdaptationSet=o([],u.AdaptationSet,!0),u.AdaptationSet[l]=r(r({},u.AdaptationSet[l]),a),c}(e,t.payload)},n[c.ManifestActionType.UpdateRepresentation]=function(e,t){return function(e,t){var i,n,a,s=t,l=s._internalId;if(!e.Period)return e;var c=e.Period.findIndex(function(e){return e._id===l.periodId}),u=null==(i=e.Period[c])?void 0:i.AdaptationSet.findIndex(function(e){return e._internalId.equals(l)}),d=null==(a=null==(n=e.Period[c])?void 0:n.AdaptationSet[u])?void 0:a.Representation.findIndex(function(e){return e._internalId.equals(l)}),h=r({},e);h.Period=o([],h.Period,!0),h.Period[c]=r({},h.Period[c]);var p=h.Period[c];p.AdaptationSet=o([],p.AdaptationSet,!0),p.AdaptationSet[u]=r({},p.AdaptationSet[u]);var f=p.AdaptationSet[u];return f.Representation=o([],f.Representation,!0),f.Representation[d]=s,h}(e,t.payload)},n[c.ManifestActionType.UpdateRepresentationFailedDownload]=function(e,t){var i,n,o=t.payload,a=o.representationId,s=o.loadFailureReason,l=function(e){var t;return e._internalId.equals(a)?s:null==(t=e._hls)?void 0:t.loadFailureReason};return r(r({},e),{Period:null!=(n=null==(i=e.Period)?void 0:i.map(function(e){var t;return r(r({},e),{AdaptationSet:null==(t=e.AdaptationSet)?void 0:t.map(function(e){var t;return r(r({},e),{Representation:null==(t=e.Representation)?void 0:t.map(function(e){return r(r({},e),{_hls:r(r({},e._hls),{loadFailureReason:l(e)})})})})})})}))?n:[]})},n[c.ManifestActionType.AdjustPeriodStartTimes]=function(e,t){return t.payload.offset?r(r({},e),{Period:e.Period.map(function(e){return r(r({},e),{start:e.start+t.payload.offset})})}):e},n[c.ManifestActionType.UpdatePeriodTiming]=function(e,t){return function(e,t){if(!e.Period)return e;var i=t.periodId,n=t.timing,a=e.Period.findIndex(function(e){return e._id===i});if(a<0)return e;var s=o([],e.Period,!0);return s[a]=r(r({},s[a]),n),r(r({},e),{Period:s})}(e,t.payload)},n[c.ManifestActionType.SetRepresentationDrmKid]=function(e,t){var i=t.payload;return u(e,i.representationId,{associatedKid:i.associatedKid})},n[c.ManifestActionType.SetRepresentationIsLoading]=function(e,t){var i=t.payload;return u(e,i.representationId,{isLoading:i.isLoading})},n[c.ManifestActionType.SetRepresentationSegmentIndex]=function(e,t){var i=t.payload;return u(e,i.representationId,{segmentIndex:i.segmentIndex})},n[c.ManifestActionType.SetRepresentationSegmentIndexParsingError]=function(e,t){var i=t.payload;return u(e,i.representationId,{segmentIndexParsingError:i.segmentIndexParsingError})},n[c.ManifestActionType.SetRepresentationAnchorPoint]=function(e,t){var i=t.payload;return u(e,i.representationId,{anchorPoint:i.anchorPoint})},n[c.ManifestActionType.InitPlaybackTimesFromIndex]=function(e,t){var i,n=t.payload,o=n.representationId,a=n.index,l=n.playbackTimeForIndex,c=(0,s.findRepresentation)(e,o);return c?u(e,o,r(r({},c),{SegmentList:null==(i=c.SegmentList)?void 0:i.map(function(e){return r(r({},e),{SegmentURL:d(e.SegmentURL,a,l)})})})):e},n[c.ManifestActionType.InitPlaybackTimesFromReferenceSegment]=function(e,t){var i,n=t.payload,o=n.representationId,a=n.segmentUrl,l=n.segmentPlaybackTime,c=n.discontinuitySequenceNumber,h=(0,s.findRepresentation)(e,o);if(!(null!=h&&h.SegmentList)||0===h.SegmentList.length||(null==(i=h.SegmentList[0].SegmentURL[0])?void 0:i._playbackTime)!==void 0||void 0===l)return e;var p=h.SegmentList[0].SegmentURL.findIndex(function(e){return e._media===a&&e._discontinuitySequenceNumber===c});return -1===p?e:u(e,o,r(r({},h),{SegmentList:h.SegmentList.map(function(e){return r(r({},e),{SegmentURL:d(e.SegmentURL,p,l)})})}))},n[c.ManifestActionType.ResetSegmentPlaybackTimes]=function(e){return r(r({},e),{Period:e.Period.map(function(e){return r(r({},e),{AdaptationSet:e.AdaptationSet.map(function(e){return r(r({},e),{Representation:e.Representation.map(function(e){var t;return r(r({},e),{SegmentList:null==(t=e.SegmentList)?void 0:t.map(h)})})})})})})})},n))},62198:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getManifest=void 0,t.getManifest=function(e){return null==e?void 0:e.manifest}},71050:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestActionType=void 0,function(e){e.SetManifest="@instance/manifest/setmanifest",e.SetManifestInitialized="@instance/manifest/setmanifestinitialized",e.RemoveRepresentations="@instance/manifest/removerepresentations",e.UpdateManifest="@instance/manifest/updatemanifest",e.UpdateAdaptationSet="@instance/manifest/updateadaptationset",e.UpdateRepresentation="@instance/manifest/updaterepresentation",e.UpdatePeriodTiming="@instance/manifest/updateperiodtiming",e.AdjustPeriodStartTimes="@instance/manifest/adjustperiodstarttimes",e.SetRepresentationDrmKid="@instance/manifest/setrepresentationdrmkid",e.UpdateRepresentationFailedDownload="@instance/manifest/setrepresentationfaileddownload",e.SetRepresentationSegmentIndex="@instance/manifest/setrepresentationsegmentindex",e.SetRepresentationIsLoading="@instance/manifest/setrepresentationisloading",e.SetRepresentationSegmentIndexParsingError="@instance/manifest/setrepresentationsegmentindexparsingerror",e.SetRepresentationAnchorPoint="@instance/manifest/setrepresentationacnhorpoint",e.InitPlaybackTimesFromIndex="@instance/manifest/initplaybacktimesfromindex",e.InitPlaybackTimesFromReferenceSegment="@instance/manifest/initplaybacktimesfromreferencesegment",e.ResetSegmentPlaybackTimes="@instance/manifest/resetsegmentplaybacktimes"}(i||(t.ManifestActionType=i={}))},95236:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoMapReducer=void 0;var a=i(3793),s=i(37641),l=i(49713);function c(e,t,i){var n;return r(r({},e),((n={})[t]=i,n))}t.SegmentInfoMapReducer=(0,a.default)({},((n={})[l.SegmentInfoMapActionType.SetSegmentInfos]=function(e,t){return c(e,t.payload.qualityPath,t.payload.updatedEntry)},n[l.SegmentInfoMapActionType.UpdateSegmentInfos]=function(e,t){return function(e,t,i){if(!e[t]||0===i.segmentInfos.length)return c(e,t,i);var n=e[t].segmentInfos,a=n.findIndex(function(e){return(0,s.areSegmentsIdentical)(e,i.segmentInfos[0])});if(-1===a)return c(e,t,i);var l,u,d=n.length-a,h=i.segmentInfos.length-d;if(0!==a||0!==h){var p=h>0?i.segmentInfos.slice(-h):[];u=o(o([],n.slice(a),!0),p,!0)}else u=n;var f=r(r(r({},e[t]),i),{segmentInfos:u});return r(r({},e),((l={})[t]=f,l))}(e,t.payload.qualityPath,t.payload.updatedEntry)},n))},72498:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMostRecentlyRefreshedQuality=t.getSegmentInfos=t.getSegmentMapEntry=void 0,t.getSegmentMapEntry=function(e,t){return null==e?void 0:e.segmentInfoMap[t]},t.getSegmentInfos=function(e,i){var n,r;return null!=(r=null==(n=(0,t.getSegmentMapEntry)(e,i))?void 0:n.segmentInfos)?r:[]},t.getMostRecentlyRefreshedQuality=function(e){if(e)return Object.values(e.segmentInfoMap).filter(function(e){return null!=e.qualityInfo.lastUpdateTimestamp}).sort(function(e,t){var i=e.qualityInfo.lastUpdateTimestamp;return t.qualityInfo.lastUpdateTimestamp-i})[0]}},49713:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoMapActionType=void 0,function(e){e.SetSegmentInfos="@instance/sources/@source/playback/setSegmentInfos",e.UpdateSegmentInfos="@instance/sources/@source/playback/updateSegmentInfos"}(i||(t.SegmentInfoMapActionType=i={}))},59604:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.mergeBufferBlockTimeRanges=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=a(e);return Object.keys(i).flatMap(function(e){return n.BufferRangeHelper.mergeRanges(i[e],r)})},t.excludeBufferBlockTimeRange=function(e,t){var i=t.bufferBlockId,s=a(e.map(function(e){return o(e.start,e.end,e.bufferBlockId)})),l=s[i];if(!(null!=l&&l.length))return e;var c=function(e,t){var i=[];return e.forEach(function(e){(0,n.areDisjoint)(e,t)?i.push(e):(0,n.isSurrounding)(e,t)?i.push.apply(i,function(e,t){return[o(e.start,t.start,e.bufferBlockId),o(t.end,e.end,e.bufferBlockId)]}(e,t)):(0,n.isFullyIncluded)(e,t)||i.push(function(e,t){return o(e.start>=t.start?t.end:e.start,e.end>t.end?e.end:t.start,e.bufferBlockId)}(e,t))}),i.filter(function(e){return e.end-e.start>=r})}(l,t);return s[i]=n.BufferRangeHelper.mergeRanges(c,r),Object.keys(s).flatMap(function(e){return s[e]})},t.segmentToBufferBlockTimeRange=function(e){var t,i=null!=(t=e.getBufferBlockId())?t:1/0,n=e.getPlaybackTime();return o(n,n+e.getDuration(),i)};var n=i(4524),r=.1;function o(e,t,i){return{start:(0,n.rangeFixedValue)(e),end:(0,n.rangeFixedValue)(t),bufferBlockId:i}}function a(e){var t={};return e.forEach(function(e){t[e.bufferBlockId]||(t[e.bufferBlockId]=[]),t[e.bufferBlockId].push(e)}),t}},73861:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferReducer=void 0;var a=i(4524),s=i(3793),l=i(70118),c=i(59604);function u(){return{isLoadingRangeFinished:!1,isBufferBlockSwitchOngoing:!1,isTimestampRollingOver:!1,bufferStateMap:{}}}t.BufferReducer=(0,s.default)(u(),((n={})[l.BufferActionType.SetBufferMaxSize]=function(e,t){var i,n=t.payload;return r(r({},e),{bufferStateMap:r(r({},e.bufferStateMap),((i={})[n.mimeType]=r(r({},e.bufferStateMap[n.mimeType]),{maxBufferSize:n.maxBufferSize}),i))})},n[l.BufferActionType.SetRendererRanges]=function(e,t){var i,n=t.payload;return r(r({},e),{bufferStateMap:r(r({},e.bufferStateMap),((i={})[n.mimeType]=r(r({},e.bufferStateMap[n.mimeType]),{rendererRanges:n.ranges}),i))})},n[l.BufferActionType.SetBufferBlockSwitchOngoing]=function(e,t){var i=t.payload;return r(r({},e),{isBufferBlockSwitchOngoing:i.isOngoing})},n[l.BufferActionType.SetTimestampRollingOver]=function(e,t){var i=t.payload;return r(r({},e),{isTimestampRollingOver:i.isRollingOver})},n[l.BufferActionType.AddLoadedRange]=function(e,t){var i,n,s,l=t.payload,u=l.mimeType,d=l.range;if(!u)return e;var h=null!=(s=null==(n=e.bufferStateMap[u])?void 0:n.loadedRanges)?s:[];return h.some(function(e){return(0,a.isFullyIncluded)(d,e)})?e:r(r({},e),{bufferStateMap:r(r({},e.bufferStateMap),((i={})[u]=r(r({},e.bufferStateMap[u]),{loadedRanges:c.mergeBufferBlockTimeRanges.apply(void 0,o(o([],h,!1),[d],!1))}),i))})},n[l.BufferActionType.RemoveLoadedRange]=function(e,t){var i,n,o,s=t.payload,l=s.mimeType,u=s.range;if(!l)return e;var d=null!=(o=null==(n=e.bufferStateMap[l])?void 0:n.loadedRanges)?o:[];return d.every(function(e){return!(0,a.isOverlapping)(u,e)})?e:r(r({},e),{bufferStateMap:r(r({},e.bufferStateMap),((i={})[l]=r(r({},e.bufferStateMap[l]),{loadedRanges:(0,c.excludeBufferBlockTimeRange)(d,u)}),i))})},n[l.BufferActionType.ResetLoadedRanges]=function(e,t){var i,n,o,a=t.payload.mimeType;if(void 0===a){if(void 0===e)return u();var s=r(r({},e),{bufferStateMap:r({},e.bufferStateMap)});
14return Object.keys(s.bufferStateMap).forEach(function(e){s.bufferStateMap[e]=r(r({},s.bufferStateMap[e]),{loadedRanges:[]})}),s}return(null!=(o=null==(n=e.bufferStateMap[a])?void 0:n.loadedRanges)?o:[]).length>0?r(r({},e),{bufferStateMap:r(r({},e.bufferStateMap),((i={})[a]=r(r({},e.bufferStateMap[a]),{loadedRanges:[]}),i))}):e},n[l.BufferActionType.SetLoadingRangeFinished]=function(e,t){var i=t.payload.isFinished;return i!==e.isLoadingRangeFinished?r(r({},e),{isLoadingRangeFinished:i}):e},n))},13114:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getDrmUsedKeySystem=t.getDrmKeyIdsWithErrors=t.getDrmState=void 0,t.getDrmState=function(e){return null==e?void 0:e.drm},t.getDrmKeyIdsWithErrors=function(e){var t,i;return null!=(i=null==(t=e.drm)?void 0:t.keyIdsWithErrors)?i:[]},t.getDrmUsedKeySystem=function(e){var i;return(null==(i=(0,t.getDrmState)(e))?void 0:i.usedKeySystem)||{kind:null,uid:null}}},41710:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.RendererReducer=void 0;var o=i(3793),a=i(39564);t.RendererReducer=(0,o.default)(function(){return{mseObjectUrl:""}}(),((n={})[a.RendererActionType.SetMseObjectUrl]=function(e,t){var i=t.payload;return r(r({},e),{mseObjectUrl:i.url})},n))},39523:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.addStreamTimeRange=function(e,t,i){var o={start:t.start,end:t.end,type:i};return(0,n.createAction)(r.StreamTimelineActionType.StreamTimeRangeAdd,{mimeType:e,streamTimeRange:o})},t.removeStreamTimeRange=function(e,t,i){return(0,n.createAction)(r.StreamTimelineActionType.StreamTimeRangeRemove,{mimeType:e,range:t,type:i})},t.resetStreamTimeline=function(e){return(0,n.createAction)(r.StreamTimelineActionType.StreamTimelineReset,e)};var n=i(35267),r=i(80965)},14808:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getStreamTimeline=t.StreamTimelineReducer=void 0;var a=i(4524),s=i(3793),l=i(99529),c=i(80965),u={};t.StreamTimelineReducer=(0,s.default)(u,((n={})[c.StreamTimelineActionType.StreamTimeRangeAdd]=function(e,t){return function(e,t,i){var n,a=e[t]?o([],e[t],!0):[];return r(r({},e),((n={})[t]=(0,l.addStreamTimeRangeToTimeline)(a,i),n))}(e,t.payload.mimeType,t.payload.streamTimeRange)},n[c.StreamTimelineActionType.StreamTimeRangeRemove]=function(e,t){return function(e,t,i,n){if(!e[t])return e;var s,c=o([],e[t],!0);if(n){var u=r(r({},i),{type:n});c=(0,l.removeStreamTimeRangeFromTimeline)(c,u)}else c=a.BufferRangeHelper.excludeTimeRange(c,i);return r(r({},e),((s={})[t]=c,s))}(e,t.payload.mimeType,t.payload.range,t.payload.type)},n[c.StreamTimelineActionType.StreamTimelineReset]=function(e,t){return function(e,t){var i;return t?r(r({},e),((i={})[t]=[],i)):u}(e,t.payload)},n)),t.getStreamTimeline=function(e){var t;return null!=(t=null==e?void 0:e.streamTimeline)?t:{}}},80965:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTimelineActionType=void 0,function(e){e.StreamTimelineReset="@instance/source/stream/streamtimelinereset",e.StreamTimeRangeRemove="@instance/source/stream/streamtimerangeremove",e.StreamTimeRangeAdd="@instance/source/stream/streamtimerangeadd"}(i||(t.StreamTimelineActionType=i={}))},99529:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTimeRangeType=void 0,t.addStreamTimeRangeToTimeline=function(e,t){var i=e.filter(function(e){return e.type===t.type}).concat(t),n=r.BufferRangeHelper.mergeRanges(i,o.DefaultSettings.GAP_TOLERANCE);return e=e.filter(function(e){return e.type!==t.type}
vendor: 47,551 bytes, lines 14-19
14),n.forEach(function(t){e=a.ArrayHelper.insertInSortedArray(e,t,function(e){return e.start>t.start})}),e},t.removeStreamTimeRangeFromTimeline=function(e,t){var i=e.filter(function(e){return e.type===t.type}),n=r.BufferRangeHelper.excludeTimeRange(i,t);return e=e.filter(function(e){return e.type!==t.type}),n.forEach(function(t){t.end-t.start>o.DefaultSettings.GAP_TOLERANCE&&(e=a.ArrayHelper.insertInSortedArray(e,t,function(e){return e.start>t.start}))}),e},t.getTrackIdentifier=function(e){var t=e.mimeType,i=e.internalRepresentationId;return s.MimeTypeHelper.isSubtitle(t)?"".concat(t,"/").concat(i.adaptationSetId):t};var n,r=i(4524),o=i(70962),a=i(74853),s=i(85434);!function(e){e.Loading="loading",e.Failed="failed"}(n||(t.StreamTimeRangeType=n={}))},16870:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SynchronizedTimeService=void 0,t.initializeSynchronizedTimeService=function(e,t){var i=e.serviceManager,r=t.sourceIdentifier;if(!i.has(n.ServiceName.SynchronizedTimeService,r)){var o=new l(e,t);i.set(n.ServiceName.SynchronizedTimeService,o,r)}};var n=i(80813),r=i(89927),o=i(55938),a=i(58747),s=i(58486),l=function(){function e(e,t){this.MI=e,this.NI=t,this.OI=0;var i=new s.HttpHeadTimeProvider(this.MI,new a.ISO8601TimeDecoder),n=new s.HttpGetTimeProvider(this.MI,new a.XSDateTimeDecoder),r=new s.HttpGetTimeProvider(this.MI,new a.ISO8601TimeDecoder),o=new s.StringTimeProvider(new a.XSDateTimeDecoder);this.PI={"urn:mpeg:dash:utc:http-head:2012":i,"urn:mpeg:dash:utc:http-head:2014":i,"urn:mpeg:dash:utc:http-xsdate:2012":n,"urn:mpeg:dash:utc:http-xsdate:2014":n,"urn:mpeg:dash:utc:http-iso:2012":r,"urn:mpeg:dash:utc:http-iso:2014":r,"urn:mpeg:dash:utc:direct:2012":o,"urn:mpeg:dash:utc:direct:2014":o},this.SI()}return e.prototype.SI=function(){var e=(0,o.getUtcTimingSources)(this.MI.config,this.NI.source);e.length>0&&this.synchronizeWithServer(e)},e.prototype.getTimeDifference=function(){return this.OI},e.prototype.TI=function(e){var t=this,i=e.shift();if(!i)return Promise.reject(Error("No time source left to try"));if(!this.PI[i.schemeIdUri])return this.MI.logger.debug("UTCTiming scheme ".concat(i.schemeIdUri," is not supported.")),this.TI(e);this.QI=this.PI[i.schemeIdUri];var n=Date.now();return this.QI.requestTime(i.value).then(function(e){return e+(Date.now()-n)/2}).catch(function(){return t.MI.logger.debug("UTCTiming scheme ".concat(i.schemeIdUri," resulted in an error")),t.TI(e)})},e.prototype.synchronizeWithServer=function(e,t){var i=this;return void 0===t&&(t=0),this.RI||(this.RI=this.TI(e).then(function(e){i.QI=void 0,i.OI=e+(0,r.toMilliSeconds)(t)-Date.now(),i.MI.logger.debug("Synchronized client time with time server - drift: ".concat((0,r.toSeconds)(i.OI),"s"))}).catch(function(){i.MI.logger.debug("Synchronizing client time with time server unsuccessful")})),this.RI},e.prototype.getSynchronizationPromise=function(){return this.RI},e.prototype.reset=function(){this.OI=0,this.RI=void 0,this.QI&&(this.QI.cancelRequest(),this.QI=void 0)},e.prototype.dispose=function(){this.reset()},e}();t.SynchronizedTimeService=l},58747:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XSDateTimeDecoder=t.ISO8601TimeDecoder=void 0,t.ISO8601TimeDecoder=function(){function e(){}return e.prototype.decode=function(e){return Date.parse(e)},e}(),t.XSDateTimeDecoder=function(){function e(){}return e.prototype.decode=function(t){var i=Date.parse(t);if(isNaN(i)){var n=e.DATETIME_REGEX.exec(t);if(!n)return NaN;var r=Date.UTC(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),parseInt(n[4],10),parseInt(n[5],10),n[6]&&parseInt(n[6],10)||0,n[7]&&1e3*parseFloat(n[7])||0);if(n[9]&&n[10]){var o=60*parseInt(n[9],10)+parseInt(n[10],10);r+=("+"===n[8]?-1:1)*o*6e4}return new Date(r).getTime()}return i},e.DATETIME_REGEX=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d*)(\.\d*)?)?(?:([+-])(\d{2}):(\d{2}))?/,e}()},58486:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.StringTimeProvider=t.HttpHeadTimeProvider=t.HttpGetTimeProvider=t.HttpTimeProvider=t.ServerTimeProvider=void 0;var r=i(4129),o=i(29669),a=function(){return function(e){this.timeDecoder=e}}();t.ServerTimeProvider=a;var s=function(e){function t(t,i){var n=e.call(this,i)||this;return n.d5=t,n}return n(t,e),t.prototype.f5=function(e){var t=this,i=e.shift();return i?(this.e5=new r.DefaultContentLoader(this.d5,{requestType:o.HttpRequestType.TIME_SYNC,maxRetries:1}),this.e5.load(i,this.requestMethod).then(function(e){var i=t.timeDecoder.decode(t.processResponse(e));return t.e5=void 0,isNaN(i)?Promise.reject(Error("Failed to decode time")):Promise.resolve(i)}).catch(function(i){return t.d5.logger.debug("could not load UTC time url",i),t.f5(e)})):Promise.reject(Error("No time source left to try"))},t.prototype.requestTime=function(e){var t=this,i=e.match(/\S+/g);return i?this.f5(i).then(function(e){return t.e5=void 0,e}):Promise.reject(Error("No time source left to try"))},t.prototype.cancelRequest=function(){this.e5&&this.e5.cancel()},t}(a);t.HttpTimeProvider=s;var l=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.requestMethod=o.HttpRequestMethod.GET,n}return n(t,e),t.prototype.processResponse=function(e){return e.body},t}(s);t.HttpGetTimeProvider=l,t.HttpHeadTimeProvider=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.requestMethod=o.HttpRequestMethod.HEAD,n}return n(t,e),t.prototype.processResponse=function(e){var t=Object.keys(e.headers).find(function(e){return"date"===e.toLocaleLowerCase()});return t&&e.headers[t]||""},t}(l),t.StringTimeProvider=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.requestTime=function(e){var t=this.timeDecoder.decode(e);return isNaN(t)?Promise.reject(Error("Failed to decode time")):Promise.resolve(t)},t.prototype.cancelRequest=function(){},t}(a)},55938:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getUtcTimingSources=function(e,t){var i=[];return(function(e,t){var i,r,o=(null==(i=e.live)?void 0:i.synchronization)||[],a=(null==(r=t.live)?void 0:r.synchronization)||[];return n(n([],o,!0),a.filter(function(e){return!o.some(function(t){return t.method===e.method})}),!0)})(e,t).forEach(function(e){var t=function(e){switch(e){case r.LiveSynchronizationMethod.HttpHead:return"urn:mpeg:dash:utc:http-head:2014";case r.LiveSynchronizationMethod.HttpXsDate:return"urn:mpeg:dash:utc:http-xsdate:2014";case r.LiveSynchronizationMethod.HttpIso:return"urn:mpeg:dash:utc:http-iso:2014";default:return}}(e.method);t&&i.push({schemeIdUri:t,value:e.serverUrl})}),i};var r=i(21281)},69102:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.areAudioMimeCodecsCompatible=function(e,t){return e.mimeType===t.mimeType&&n.CodecStringHelper.canSwitchBetweenAudioCodecs(e.codec,t.codec)},t.hasContentProtection=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),0===e.length&&0===t.length||e.length>0&&t.length>0};var n=i(34047)},90919:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.findSegmentUrlIndexWithinSegmentList=function(e,t){return t.findIndex(function(t){var i=e.discontinuitySequenceNumber===t._discontinuitySequenceNumber,o=r(e.url,t._media),a=(0,n.compareValues)(e.byteRange,t._byteRange);return i&&o&&a})},t.matchesMediaUrl=r;var n=i(19541);function r(e,t){return e.endsWith(t)||e.split("?")[0].endsWith(t)}},48954:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=function(e){var t=[];return e.forEach(function(e){t.push(e)}),t},t.getKeys=function(e){var t=[];return e.forEach(function(e,i){t.push(i)}),t}},33004:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bytesToBits=function(e){return 8*e}},68981:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.adjustTargetTimeToPeriodStart=function(e,t,i,n){var r,o=i.getPeriodIdForTime(e);if(!o)return e;var a=i.isTimeNearPeriodEnd(e,o,t),s=i.getNextPeriod(o);return a&&s?(n.debug("Target time ".concat(e," too close to end of period ").concat(o,", adjusting to next period start ").concat(s.start)),null!=(r=s.start)?r:e):e}},50962:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isLowLatencyConfigured=function(e){var t=e.serviceManager.get(n.ServiceName.LiveLatencyService);return(null==t?void 0:t.isConfigured())||!1};var n=i(80813)},60729:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlayingLowLatencyHls=function(e){if(!(0,a.isLowLatencyConfigured)(e)||!e.settings.LL_HLS)return!1;var t,i=(0,n.getSourceState)(e);if(!i)return!1;var s=r.ModuleManager.get(o.ModuleName.HLS,!1);if(!s)return!1;var l=s.selectors,c=l.getHlsState,u=l.getIsLowLatencyPlaylist,d=c(i);return!!d&&null!=(t=u(d))&&t};var n=i(15971),r=i(88052),o=i(62756),a=i(50962)}},function(e){return function(){return e(e.s=52570)}()}])})}()}(bitmovinplayerEngineBitmovin);var bitmovinplayerEngineBitmovinExports=bitmovinplayerEngineBitmovin.exports;let BitmovinEngineModule=getDefaultExportFromCjs$1(bitmovinplayerEngineBitmovinExports);var bitmovinplayerEngineNative={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[855],{48297:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractHlsManifestController=void 0;var n,r=i(80813),o=i(3714),a=i(32703),s=i(59225),l=i(32485),c=i(79721),u=i(89927),d=i(70850),h=i(88052),p=i(62756);!function(e){e.CueTag="cueTag",e.Scte35="scte35",e.DateRange="dateRange",e.CustomTags="customTags"}(n||(n={})),t.AbstractHlsManifestController=function(){function e(e){var t,i=this;this.context=e,this.d7=function(e){if(e.hasOwnProperty("metadata")){var t={metadataType:e.metadataType.toUpperCase(),metadata:e.metadata};(e.start||0===e.start)&&(t.start=e.start),e.end&&(t.end=e.end),i.context.eventHandler.dispatchEvent(o.PlayerEvent.Metadata,t)}},this.e7=function(e){var t=i.segmentTimelineController.getPlayingSegment(e.relativeTime||e.time);t&&!t.consumed&&(t.consumed=!0,i.g7(t),i.f7(t))},this.h7=function(){i.segmentTimelineController.reset()},this.i7=function(){i.segmentTimelineController.reset()},this.settings=e.settings,this.b7=e.eventHandler,this.b7.on(o.PlayerEvent.TimeChanged,this.e7),this.b7.on(o.PlayerEvent.TimeShifted,this.h7),this.b7.on(o.PlayerEvent.Seeked,this.i7),this.c7=new s.MetadataService(this.context,((t={})[l.TimedMetadataType.Manifest]=this.d7,t[l.TimedMetadataType.DateRange]=this.d7,t))}return e.prototype.f7=function(e){var t={url:e.uri,uid:null,mimeType:"video/mp4",playbackTime:e.playbackTime,duration:e.duration,mediaInfo:{},dateTime:null};e.dateTime&&(t.dateTime=e.dateTime.toISOString()),e.customTags&&e.customTags.length>0&&(t.EXPERIMENTAL=t.EXPERIMENTAL||{},t.EXPERIMENTAL.hlsAttributes=e.customTags.map(function(e){return e.attributes})),this.context.eventHandler.dispatchEvent(o.PlayerEvent.SegmentPlayback,t)},e.prototype.g7=function(e){var t=this,i=e.dateTime?(0,u.toSeconds)(e.dateTime.getTime()):e.playbackTime,n=i+e.duration;e.metadata&&e.metadata.forEach(function(e){!function(e){return e.type.includes("CUE")}(e)?t.context.eventHandler.dispatchEvent(o.PlayerEvent.Metadata,{metadataType:e.type,metadata:e}):t.context.eventHandler.dispatchEvent(o.PlayerEvent.Metadata,{metadataType:o.MetadataType.CUETAG,metadata:e})}),e.customTags&&this.context.eventHandler.dispatchEvent(o.PlayerEvent.Metadata,{metadataType:o.MetadataType.CUSTOM,metadata:e.customTags,start:i,end:n})},e.prototype.isValidMasterPlaylist=function(e){return h.ModuleManager.get(p.ModuleName.HLS).NativeHlsManifestParserUtils.isValidMasterPlaylist(e)},e.prototype.j7=function(e){return h.ModuleManager.get(p.ModuleName.HLS).NativeHlsManifestParserUtils.parsePlaylist(e)},e.prototype.dispatchDateRangeToParsedService=function(e){var t,i={metadataType:o.MetadataType.DATERANGE,metadata:e.data,data:e.data,start:e.startTime,end:e.endTime};null==(t=this.context.serviceManager.get(r.ServiceName.MetadataParsedService))||t.addMetadata(c.DEFAULT_PERIOD_ID,i)},e.prototype.k7=function(e){return{metadataType:e.metadataType,metadata:e.metadata,data:e.metadata,start:e.start,end:e.end}},e.prototype.l7=function(e){var t=e.metadataType===o.MetadataType.DATERANGE?l.TimedMetadataType.DateRange:l.TimedMetadataType.Manifest;this.c7.addToMetadataParsedService(e.start,this.k7(e),c.DEFAULT_PERIOD_ID),e.metadataType!==o.MetadataType.CUSTOM&&this.c7.addToTimeline(t,e.start,e)},e.prototype.onPlaylistUpdated=function(e){var t,i,n=this,s=e.playlist,c=e.variant,u=e.segments;this.segmentTimelineController.switchTimeline(c.id);var h=this.segmentTimelineController.updateTimeline(c.id,u),p=this.context.serviceManager.get(r.ServiceName.MetadataParsedService);p&&(p.expirationTimeInSeconds=h);var f=null==(t=u[0])?void 0:t.dateTime;f&&this.c7.removeUntil(d.Util.timeInSeconds(f)),(0,a.extractDateRangeMetadata)(null!=(i=s.dateRange)?i:[],s.endList?s.programDateTime:void 0,function(e){var t={metadataType:o.MetadataType.DATERANGE,metadata:e.data,start:e.startTime,end:e.endTime};n.c7.addToTimeline(l.TimedMetadataType.DateRange,e.startTime,t)});var m=this.segmentTimelineController.getCurrentTimeline();this.extractMetadataFromTimeline(m,!s.endList)},e.prototype.extractMetadataFromTimeline=function(e,t){var i=this;e.forEach(function(e){Object.values(n).forEach(function(r){e.hasOwnProperty(r)&&(function(e,t,i){var r=i&&t.dateTime?(0,u.toSeconds)(t.dateTime.getTime()):t.playbackTime;switch(e){case n.CueTag:return[{metadataType:o.MetadataType.CUETAG,metadata:t[n.CueTag],start:r}];case n.Scte35:return[{metadataType:o.MetadataType.SCTE,metadata:t[n.Scte35],start:r}];case n.CustomTags:return[{metadataType:o.MetadataType.CUSTOM,metadata:t[n.CustomTags],start:r,end:r+t.duration}];default:return[]}})(r,e,t).forEach(function(e){return i.l7(e)})})})},e.prototype.parseTimelineEntries=function(e){var t=this.j7(e);return h.ModuleManager.get(p.ModuleName.HLS).NativeHlsManifestParserUtils.isValidVariantPlaylist(t)?t.segments.map(function(e){var t;return{uri:e.uri,duration:e.duration,discontinuity:null!=(t=e.discontinuity)&&t,dateTime:null,metadata:[],consumed:!1,playbackTime:-1,keys:[]}}):[]},e.prototype.getPlaybackTimeOfFirstSegmentInTimeline=function(e){for(var t=0;t<e.length;t++)for(var i=e[t],n=0,r=0;r<i.timeline.length;r++){for(var o=i.timeline[r],a=this.segmentTimelineController.getCurrentTimeline(),s=0;s<a.length;s++){var l=a[s];if(l.uri===o.uri)return l.playbackTime-n}n+=o.duration}return -1},e.prototype.m7=function(){this.b7&&(this.b7.off(o.PlayerEvent.TimeChanged,this.e7),this.b7.off(o.PlayerEvent.TimeShifted,this.h7),this.b7.off(o.PlayerEvent.Seeked,this.i7))},e.prototype.dispose=function(){this.m7(),this.segmentTimelineController&&(this.segmentTimelineController.dispose(),this.segmentTimelineController=null),this.c7&&(this.c7.dispose(),this.c7=null),this.settings=null,this.b7=null},e}()},32418:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AppleAirplayService=t.isAirplaySupported=void 0;var n,r=i(3714),o=i(19274);(function(e){e.Available="available",e.NotAvailable="not-available"})(n||(n={})),t.isAirplaySupported=function(){return!!window.WebKitPlaybackTargetAvailabilityEvent},t.AppleAirplayService=function(){function e(e,t){var i=this;this.videoElement=e,this.eventHandler=t,this.RO=!1,this.SO=function(e){switch(e.availability){case n.Available:i.RO=!0,i.eventHandler.dispatchEvent(r.PlayerEvent.AirplayAvailable);break;case n.NotAvailable:i.RO=!1}},this.TO=function(){i.eventHandler.dispatchEvent(r.PlayerEvent.AirplayChanged,{airplayEnabled:i.isAirplayActive(),time:i.videoElement.currentTime})},this.initAirplay()}return e.prototype.initAirplay=function(){this.videoElement.setAttribute("x-webkit-airplay","allow"),this.videoElement.addEventListener(o.MediaElementEvent.webkitplaybacktargetavailabilitychanged,this.SO),this.videoElement.addEventListener(o.MediaElementEvent.webkitcurrentplaybacktargetiswirelesschanged,this.TO)},e.prototype.isAirplayAvailable=function(){return this.RO},e.prototype.isAirplayActive=function(){return this.videoElement.isAirplayActive()},e.prototype.showAirplayTargetPicker=function(){this.isAirplayAvailable()&&(this.videoElement.webkitShowPlaybackTargetPicker(),this.eventHandler.dispatchEvent(r.PlayerEvent.ShowAirplayTargetPicker))},e.prototype.dispose=function(){this.videoElement.removeEventListener(o.MediaElementEvent.webkitplaybacktargetavailabilitychanged,this.SO),this.videoElement.removeEventListener(o.MediaElementEvent.webkitcurrentplaybacktargetiswirelesschanged,this.TO)},e}()},99373:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AssetAvailabilityChecker=void 0;var n=i(4129),r=i(29669),o=i(89927),a=i(88844),s=i(19274);t.AssetAvailabilityChecker=function(){function e(e,t,i){var a=this;this.context=e,this.source=t,this.mediaElement=i,this.nN=function(){a.mediaElement.removeEventListener(s.MediaElementEvent.loadstart,a.nN);var e=(0,o.toMilliSeconds)(a.context.settings.XHR_TIMEOUT)/2;a.lN=window.setTimeout(function(){a.context.logger.debug("Asset loading has not resolved after ".concat((0,o.toSeconds)(e),"s. Checking accessibility."));var t=!1;a.mN=new n.DefaultContentLoader(a.context,{onProgress:function(e){var i;e.loadedBytes>0&&(t=!0,null==(i=a.mN)||i.cancel())},requestType:r.HttpRequestType.INTERNAL}),a.mN.load(a.source.src).catch(function(e){if(!t){a.context.logger.debug("Forcing error event as the asset was not accessible.",e);var i=new Event(s.MediaElementEvent.error,{bubbles:!1,cancelable:!1});a.source.dispatchEvent(i)}})},e)},i.addEventListener(s.MediaElementEvent.loadstart,this.nN)}return e.prototype.dispose=function(){(0,a.clearTimeoutIfDefined)(this.lN),this.mediaElement.removeEventListener(s.MediaElementEvent.loadstart,this.nN),this.mN&&(this.mN.cancel(),this.mN.dispose())},e}()},95945:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackHlsManifestController=void 0;var r,o=i(25926),a=i(4224),s=i(3714),l=i(29669),c=i(88052),u=i(62756),d=i(48297),h=i(56191),p=i(59043),f=i(77374);t.FallbackHlsManifestController=function(e){function t(t,i){var n=e.call(this,t)||this;return n.R7=function(e){n.onPlaylistUpdated(e)},n.Y7=function(e){return n.context.logger.debug("Error while loading the playlist ",e),null},r=c.ModuleManager.get(u.ModuleName.HLS).PlaylistUtils,n.P7=i,n.Q7=new p.HlsDownloadService(n.context),n.segmentTimelineController=new h.FallbackSegmentTimelineController(t.videoElement),n.context.logger.debug("Initializing controller for native HLS parsing"),n.P7.setOnPlaylistUpdated(n.R7),n}return n(t,e),t.prototype.init=function(){return Promise.resolve()},t.prototype.getDownloadedVideoData=function(){return{id:"not available",bitrate:0,height:0,width:0,isAuto:!0}},t.prototype.getPlayingVideoData=function(){return null},t.prototype.resolveMasterManifest=function(e){var t=this;return this.P7.resolveMasterManifest(e).then(function(e){var i=e.masterManifest,n=e.firstVariantPlaylist,r=e.resolvedMasterUrl;return t.overrideManifestUrl(i,r,n)})},t.prototype.getParsedManifest=function(){return this.P7.getParsedManifest()},t.prototype.getManifest=function(){return this.P7.getManifest()},t.prototype.overrideManifestUrl=function(e,t,i){return"createObjectURL"in window.URL?this.S7(e,i):(this.context.eventHandler.dispatchEvent(s.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.SETUP_CREATE_OBJECT_URL_MISSING)),Promise.resolve(t))},t.prototype.S7=function(e,t){var i=this;return r.isLive(t)?Promise.resolve(this.X7(e)):Promise.all(this.T7(e)).then(function(t){return t.filter(function(e){return!!e}).forEach(function(t){e=e.replace(t.mediaUrl,t.blobUrl)}),i.X7(e)})},t.prototype.T7=function(e){var t=this;return e.split(`
15`).map(function(e){return f.parseUrlFromLine(e)}).filter(function(e){return null!==e}).map(function(e){return t.U7(e)})},t.prototype.U7=function(e){var t=this;return this.Q7.downloadPlaylist(e,l.HttpRequestType.MANIFEST_HLS_VARIANT).then(function(i){var n=f.replaceManifestUrls(e,i.body,t.settings.QUERY_PARAMETERS);return{blobUrl:t.W7(n),mediaUrl:e}}).catch(this.Y7)},t.prototype.V7=function(e){var t=this;return this.Q7.downloadPlaylist(e.uri,l.HttpRequestType.MANIFEST_HLS_VARIANT).then(function(i){return{width:e.width,height:e.height,timeline:t.parseTimelineEntries(i.body)}}).catch(this.Y7)},t.prototype.W7=function(e){var t=new Blob([e],{type:"application/x-mpegURL"});return window.URL.createObjectURL(t)},t.prototype.X7=function(e){return"data:application/x-mpegURL,"+encodeURIComponent(e)},t.prototype.Z7=function(){var e=this.P7.getParsedManifest();return e?e.playlists.map(function(e){return{uri:e.uri,width:e.attributes&&e.attributes.RESOLUTION?e.attributes.RESOLUTION.width:-1,height:e.attributes&&e.attributes.RESOLUTION?e.attributes.RESOLUTION.height:-1}}):[]},t.prototype.a7=function(){var e=this,t=this.Z7();return t.reverse(),Promise.all(t.map(function(t){return e.V7(t)})).then(function(t){var i=e.getPlaybackTimeOfFirstSegmentInTimeline(t);return i>=0&&t.forEach(function(e){e.timeline.reduce(function(e,t){return t.playbackTime=e,e+t.duration},i)}),t})},t.prototype.getCurrentSegments=function(e,t,i,n){return void 0===n&&(n=1),this.a7().then(function(r){var o=r.find(function(e){return e.width===t&&e.height===i});return function(e,t,i){for(var n,r=[],o=0;o<e.length;o++){var a=e[o];n=0;for(var s=0;s<a.timeline.length;s++){var l=a.timeline[s];if(l.playbackTime+l.duration>=i&&(r.push(l.uri),n++),n>t)break}}return r}(o?[o]:r,n,e)})},t.prototype.dispose=function(){var t;null==(t=this.P7)||t.setOnPlaylistUpdated(void 0),e.prototype.dispose.call(this)},t}(d.AbstractHlsManifestController)},56191:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackSegmentTimelineController=void 0;var n=i(25541);t.FallbackSegmentTimelineController=function(){function e(e){this.deb=e,this.eeb=!0,this.beb={}}return e.prototype.feb=function(){return this.deb.duration===1/0},e.prototype.switchTimeline=function(e){this.beb[e]||(this.ceb=e,this.beb[e]=[])},e.prototype.updateTimeline=function(e,t){var i=this,r=this.beb[e],o=n.updateTimeline(r,t),a=o.findIndex(function(e){return e.hasOwnProperty("playbackTime")});-1!==a&&n.populateCurrentTimelineWithPlaybackTime(o,a,o[a].playbackTime),this.beb[e]=o;var s=o.reduce(function(e,t){return i.feb()&&!i.eeb||(t.playbackTime=e),e+t.duration},0);return this.eeb&&(this.eeb=!1),s},e.prototype.getPlayingSegment=function(e){for(var t=this.getCurrentTimeline(),i=0;i<t.length;i++){var n=t[i];if(e>=n.playbackTime&&e<=n.playbackTime+n.duration)return t[i]}return null},e.prototype.addDownloadedSegments=function(e){},e.prototype.getCurrentTimeline=function(){return this.beb[this.ceb]},e.prototype.getAllTimelines=function(){return this.beb},e.prototype.reset=function(){this.beb[this.ceb].forEach(function(e){return e.consumed=!1})},e.prototype.dispose=function(){this.beb={},this.deb=null},e}()},30712:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsDownloadErrorHandler=void 0;var n=i(40306),r=i(3336),o=i(4129),a=i(43446),s=i(29669),l=i(21513),c=i(88844),u=i(19274);t.HlsDownloadErrorHandler=function(){function e(e,t){var i=this;this.zN=function(){for(var e=i.pN.buffered,t="",n=0;n<e.length;n++)t+="".concat(e.start(n)," - ").concat(e.end(n),", ");t===i.wN?i.xN++:i.xN=0,i.xN>=10&&i.LO(),i.wN=t},this.KO=function(){var e=a.TimingUtil.getHiResTimestamp(),t=!i.pN.paused&&!i.pN.seeking&&!i.pN.ended;e-i.yN>5&&t&&i.NO()},this.LO=function(){i.uN=a.TimingUtil.getHiResTimestamp(),i.PO()},this.MO=function(){i.uN=-1/0,(0,c.clearTimeoutIfDefined)(i.tN)},this.NO=function(){i.sN=a.TimingUtil.getHiResTimestamp(),i.PO()},this.OO=function(){i.sN=-1/0,i.yN=a.TimingUtil.getHiResTimestamp(),(0,c.clearTimeoutIfDefined)(i.tN)},this.QO=function(){if(0!==i.pN.buffered.length){var e=i.pN.currentTime,t=i.pN.buffered.end(i.pN.buffered.length-1),a=e<=t&&e+.5>t,l=i.pN.paused,c=i.pN.networkState===HTMLMediaElement.NETWORK_LOADING,u=i.pN.videoWidth,d=i.pN.videoHeight;!l&&a&&c&&i.qN.getCurrentSegments(t,u,d,2).then(function(e){var t=new o.DefaultContentLoader(i.oN),a=function(i,n){return void 0===i&&(i=!0),e.length>0&&i?t.load(e.pop(),s.HttpRequestMethod.HEAD).then(function(e){return a(e.status>=200&&e.status<300,e)}):i?Promise.resolve():Promise.reject(n)};a().catch(function(e){var t=e.url,o=e.status,a=e.statusText;i.oN.eventHandler.fireError(new r.PlayerError(n.ErrorCode.NETWORK_ERROR,{url:t,statusCode:o,statusText:a},"Failed to load segment ".concat(t,", statusCode: ").concat(o,", statusText: ").concat(a),i.oN.sourceContext.sourceIdentifier))})})}},this.oN=e,this.pN=e.videoElement,this.qN=t,this.rN=!1,this.uN=-1/0,this.sN=-1/0,this.tN=-1,this.wN="",this.xN=0,this.yN=-1/0,this.pN.addEventListener(u.MediaElementEvent.waiting,this.NO),this.pN.addEventListener(u.MediaElementEvent.stalled,this.LO),this.pN.addEventListener(u.MediaElementEvent.progress,this.MO),this.pN.addEventListener(u.MediaElementEvent.timeupdate,this.OO),(0,l.getCapabilities)().isIOS&&(this.vN=window.setInterval(function(){i.zN(),i.KO()},500))}return e.prototype.PO=function(){var e=Math.abs(this.sN-this.uN);(0,c.clearTimeoutIfDefined)(this.tN),isFinite(e)&&(this.tN=window.setTimeout(this.QO,1e3*(5-Math.min(5,e))))},e.prototype.dispose=function(){(0,c.clearTimeoutIfDefined)(this.vN),(0,c.clearTimeoutIfDefined)(this.tN),this.pN.removeEventListener(u.MediaElementEvent.waiting,this.NO),this.pN.removeEventListener(u.MediaElementEvent.stalled,this.LO),this.pN.removeEventListener(u.MediaElementEvent.progress,this.MO),this.pN.removeEventListener(u.MediaElementEvent.timeupdate,this.OO),this.pN=null,this.qN=null},e}()},59043:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsDownloadService=void 0;var n=i(25926),r=i(4224),o=i(3714),a=i(4129),s=i(29669);t.HlsDownloadService=function(){function e(e){var t=this;this.ieb=!1,this.oeb=function(e){t.geb.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new n.PlayerWarning(r.WarningCode.NETWORK_COULD_NOT_LOAD_MANIFEST)),t.geb.logger.debug("Could not load manifest, got HTTP status code "+e.status)},this.geb=e,this.jeb()}return e.prototype.jeb=function(){this.keb(),this.leb()},e.prototype.keb=function(){this.heb={}},e.prototype.leb=function(){var e=this.geb.sourceContext.source&&this.geb.sourceContext.source.options||{};this.ieb="boolean"==typeof e.hlsManifestWithCredentials?e.hlsManifestWithCredentials:!0===e.manifestWithCredentials},e.prototype.downloadPlaylist=function(e,t,i){return void 0===i&&(i=!0),i&&this.heb.hasOwnProperty(e)?Promise.resolve(this.heb[e]):this.meb(t,e)},e.prototype.meb=function(e,t){var i=this,n=this.neb(e);return n.load(t,s.HttpRequestMethod.GET,s.HttpResponseType.TEXT,null,{},this.ieb).then(function(e){return n.dispose(),i.heb[t]=e,e}).catch(function(e){return n.dispose(),Promise.reject(e)})},e.prototype.neb=function(e){return new a.DefaultContentLoader(this.geb,{onFailure:this.oeb,maxRetries:this.geb.settings.MAX_MPD_RETRIES,requestType:e})},e.prototype.dispose=function(){},e}()},81152:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsLiveNativeTimeTracker=void 0;var n=i(75375),r=i(89927),o=i(88844),a=i(70850),s=i(19274);t.HlsLiveNativeTimeTracker=function(){function e(e,t){this.nativePlayer=e,this.context=t,this.UO=0,this.VO=null,this.WO=null}return e.prototype.onUnload=function(e){e===n.ADVERTISING_ISSUER_NAME&&this.context.settings.RESUME_LIVE_CONTENT_AT_PREVIOUS_POSITION_AFTER_AD_BREAK&&null==this.VO&&(this.nativePlayer.isLive()?(this.VO=Date.now(),this.UO=this.nativePlayer.getSeekableRange().start,this.WO=this.nativePlayer.getStartDate()):this.XO())},e.prototype.XO=function(){this.VO=null,this.UO=0,this.WO=null},e.prototype.adjustTargetTime=function(e,t){var i=this;return t!==n.ADVERTISING_RESTORE_ISSUER_NAME||null==this.VO?(this.context.logger.debug("No adjustments are made",this.VO),Promise.resolve(e)):(null!=this.WO?this.YO():Promise.resolve(null)).then(function(t){if(null!=t){i.context.logger.debug("StartDate progressed from ".concat(i.WO," to: ").concat(t," during the ad"));var n=a.Util.timeInSeconds(t)-a.Util.timeInSeconds(i.WO);i.UO=n}else{i.context.logger.debug("Adjusting time based on seekable range");var o=(0,r.toSeconds)(Date.now()-i.VO);i.UO+=o}var s=e-i.UO;return i.context.logger.debug("Adjusting target time from ".concat(e," by ").concat(i.UO," to ").concat(s)),i.XO(),s})},e.prototype.YO=function(){var e=this,t=this.ZO();return t?Promise.resolve(t):new Promise(function(t){var i=void 0,n=function(){t(e.ZO()),e.context.videoElement.removeEventListener(s.MediaElementEvent.loadeddata,n),(0,o.clearTimeoutIfDefined)(i)};e.context.logger.debug("Waiting for video.startDate to be valid"),e.context.videoElement.addEventListener(s.MediaElementEvent.loadeddata,n),i=window.setTimeout(n,2e3)})},e.prototype.ZO=function(){var e=this.nativePlayer.getStartDate();return e&&!isNaN(e.getTime())?e:null},e}()},81929:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createHlsManifestController=function(e){if(c(e)){var t=new(r.ModuleManager.get(o.ModuleName.ServiceWorkerClient).createServiceWorkerHlsManifestController(a.AbstractHlsManifestController))(e);return t.init().then(function(){return t}).catch(function(){return u(e)})}return u(e)},t.shouldUseServiceWorker=c;var n=i(80813),r=i(88052),o=i(62756),a=i(48297),s=i(95945),l=i(690);function c(e){var t=e.config.location&&e.config.location.serviceworker;return"serviceWorker"in navigator&&t&&r.ModuleManager.has(o.ModuleName.ServiceWorkerClient)}function u(e){var t=function(e){var t=e.sourceContext.sourceIdentifier,i=e.serviceManager.get(n.ServiceName.NativeManifestService,t);if(i)return i.isSuspended()&&i.restore(),i;var r=new l.NativeManifestService(e);return e.serviceManager.set(n.ServiceName.NativeManifestService,r,t),r}(e),i=new s.FallbackHlsManifestController(e,t);return i.init().then(function(){return i})}},77374:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.replaceManifestUrls=function(e,t,i){var n=t.split(/\r?\n/);return n.forEach(function(t,s){var l=o(t);if(l&&t.match(r)){var c=a(e,l,i);n[s]=t.replace(r,function(){return'URI="'.concat(c,'"')})}else l&&(n[s]=a(e,l,i))}),n.join(`
16`)},t.parseUrlFromLine=o,t.replaceUrlAndAddUriParams=a;var n=i(58313),r=/URI="([^"]+)"/;function o(e){if("#"!==e[0]&&e.trim().length>0)return e;if(e.indexOf("URI")>-1){var t=e.match(r);if(t&&0>t[1].indexOf("skd://")&&0>t[1].indexOf("skds://"))return t[1]}return null}function a(e,t,i){var r=n.URLHelper.concatBaseUrlWithPartial(e,t);return n.URLHelper.appendQueryParametersToUrl(r,i)}},27530:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.NativeModuleDefinition=void 0;var n=i(62756),r=i(925),o=i(49706);t.NativeModuleDefinition={name:n.ModuleName.EngineNative,module:{NativePlayer:r.NativePlayer,technologyChecker:new o.TechnologyChecker}},t.default=t.NativeModuleDefinition},690:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.NativeManifestService=void 0;var r,o=i(80813),a=i(3714),s=i(32703),l=i(29669),c=i(88847),u=i(79721),d=i(89927),h=i(88844),p=i(70850),f=i(88052),m=i(62756),g=i(59043),v=i(77374);t.NativeManifestService=function(e){function t(t){var i=e.call(this)||this;return i.r7=null,i.C8=null,i.D8=null,i.E8=null,i.G8=[],r=f.ModuleManager.get(m.ModuleName.HLS).PlaylistUtils,i.n7=t,i.o7=t.settings,i.p7=t.config,i.q7=new g.HlsDownloadService(t),i}return n(t,e),t.prototype.resolveMasterManifest=function(e){var t=this;return this.r7&&this.D8&&this.J8?Promise.resolve({masterManifest:this.D8,firstVariantPlaylist:this.J8.playlist,resolvedMasterUrl:this.E8}):this.q7.downloadPlaylist(e,l.HttpRequestType.MANIFEST_HLS_MASTER).then(function(e){t.E8=e.url;var i,n,r,o=t.K8(e,e.url);if(!t.r7)throw Error("Manifest parsing failed");t.D8=o;var a=f.ModuleManager.get(m.ModuleName.HLS).NativeHlsManifestParserUtils.isVideoVariant,s=null!=(n=null==(i=t.r7.playlists.find(function(e){return a(e,t.r7)}))?void 0:i.uri)?n:null==(r=t.r7.playlists[0])?void 0:r.uri;return t.F8=s,t.Q8(s,!0).then(function(t){return{masterManifest:o,firstVariantPlaylist:t,resolvedMasterUrl:e.url}})})},t.prototype.getParsedManifest=function(){return this.r7},t.prototype.getManifest=function(){return this.C8},t.prototype.getVariantUrl=function(){return this.F8},t.prototype.getLastPlaylistData=function(){return this.J8},t.prototype.setOnPlaylistUpdated=function(e){this.I8=e,this.M8()},t.prototype.restore=function(){e.prototype.restore.call(this),this.M8()},t.prototype.dispose=function(){(0,h.clearTimeoutIfDefined)(this.H8),this.H8=void 0,this.q7.dispose(),this.r7=null,this.C8=null,this.D8=null,this.E8=null,this.F8=void 0,this.G8=[],this.I8=void 0,this.J8=void 0,this.p7=null,e.prototype.dispose.call(this)},t.prototype.K8=function(e,t){var i,n,r=f.ModuleManager.get(m.ModuleName.HLS).NativeHlsManifestParserUtils;this.C8=null!=(i=e.body)?i:null;var o=(0,v.replaceManifestUrls)(t,null!=(n=e.body)?n:"",this.o7.QUERY_PARAMETERS);if(this.r7=r.parsePlaylist(o),r.isValidMasterPlaylist(this.r7))return o;if(r.isValidVariantPlaylist(this.r7)){var a=`#EXTM3U
17#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=100000
18$VARIANT$
19`.replace("$VARIANT$",t);o=(0,v.replaceManifestUrls)(t,a,this.o7.QUERY_PARAMETERS),this.C8=a,this.r7=r.parsePlaylist(o)}else this.r7=null;return o},t.prototype.L8=function(e){var t,i=this,n=f.ModuleManager.get(m.ModuleName.HLS).NativeHlsManifestParserUtils.parseAndPrepareVariantPlaylist(this.r7,e,this.G8,this.p7),r=n.playlist,o=n.variant,a=n.segments,l=n.discontinuitySequences;this.G8=l;var c=null==(t=a[0])?void 0:t.dateTime;return c&&(r.programDateTime=p.Util.timeInSeconds(c)),(0,s.extractDateRangeMetadata)(r.dateRange,r.endList?r.programDateTime:void 0,function(e){return i.N8(e)}),this.J8={playlist:r,variant:o,segments:a},this.M8(),r},t.prototype.M8=function(){this.J8&&this.I8&&!this.isSuspended()&&this.I8(this.J8)},t.prototype.N8=function(e){var t,i={metadataType:a.MetadataType.DATERANGE,metadata:e.data,data:e.data,start:e.startTime,end:e.endTime};null==(t=this.n7.serviceManager.get(o.ServiceName.MetadataParsedService))||t.addMetadata(u.DEFAULT_PERIOD_ID,i)},t.prototype.O8=function(e,t){var i=this;(0,h.clearTimeoutIfDefined)(this.H8),this.H8=setTimeout(function(){return i.P8(t)},(0,d.toMilliSeconds)(e.targetDuration))},t.prototype.P8=function(e){var t=this;this.Q8(e,!1).catch(function(e){t.n7.logger.debug("Error while reloading the playlist ",e)})},t.prototype.Q8=function(e,t){var i=this;return this.q7.downloadPlaylist(e,l.HttpRequestType.MANIFEST_HLS_VARIANT,t).then(function(t){var n=i.L8(t);return r.isLive(n)&&i.O8(n,e),n})},t}(c.Suspendable)},925:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var m in n)f[m]="access"===m?{}:n[m];for(var m in n.access)f.access[m]=n.access[m];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,i[p])("accessor"===l?{get:d.get,set:d.set}:d[c],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&r.unshift(s)}else(s=a(g))&&("field"===l?r.unshift(s):d[c]=s)}u&&Object.defineProperty(u,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.NativePlayer=void 0;var a,s=i(4524),l=i(40306),c=i(3336),u=i(25926),d=i(4224),h=i(48143),p=i(80813),f=i(56481),m=i(3714),g=i(90408),v=i(75375),y=i(4129),b=i(69957),S=i(44468),_=i(23690),E=i(87827),T=i(21513),w=i(93204),A=i(74853),P=i(34841),I=i(85434),C=i(15487),M=i(89927),R=i(88844),k=i(23068),x=i(58313),O=i(70850),D=i(41138),L=i(19274),N=i(88052),U=i(62756),F=i(29669),B=i(32418),V=i(99373),j=i(30712),z=i(81152),H=i(81929),G=i(56678);!function(e){e.None="none",e.Metadata="metadata",e.Auto="auto"}(a||(a={}));var q="not available",W=.75;function Y(e,t){return(e<t.start||e>t.end)&&(e=Math.min(e=Math.max(e,t.start),t.end)),e}function K(e){return e.length>0&&e.end(e.length-1)!==1/0}t.NativePlayer=function(){var e,t,i=[];return e=function(){function t(e){var t=this;this.Yj=r(this,i),this.ej=0,this.jj=!1,this.kj=null,this.lj=!1,this.mj=!1,this.nj=!0,this.oj=-1,this.pj=!1,this.qj=!1,this.rj=!1,this.sj=0,this.vj=-1,this.yj=-1,this.zj=null,this.Aj="api",this.Bj="api",this.Cj="api",this.Ej=0,this.Gj=-1,this.Hj=0,this.Ij=!1,this.bk=0,this.ck=[],this.fk=!0,this.gk=!1,this.hk=!1,this.jk=[],this.kk=!1,this.lk=!1,this.nk={},this.rk=!1,this.vk=!1,this.wk=!1,this.xk=function(e){if(t.Vl()){var i=e.track;t.Hk(m.PlayerEvent.AudioAdded,{track:t.Wl(i)}),i.enabled&&t.jj&&t.tl(null,i)}},this.yk=function(e){t.Vl()&&t.Hk(m.PlayerEvent.AudioRemoved,{track:t.Wl(e.track)})},this.zk=function(){var e,i,n=t.aj.getViewModeFromPresentationMode();n===S.ViewMode.PictureInPicture||n===S.ViewMode.Fullscreen&&(0,T.getCapabilities)().isIOS?null==(e=t.zj)||e.enableNative():null==(i=t.zj)||i.disableNative(),t.Yj.store.dispatch((0,_.setPlayerViewMode)(n))},this.Ak=function(){(0,g.maybeFireDurationChangedEvent)(t.ak,t.getDuration(),t.cj),t.ak=t.getDuration(),t.hk&&t.Fk()},this.Bk=function(){t.Fj.stallExit(),t.Ij&&t.kj&&t.Mk(),t.lj=!1,t.Fj.transitionToPlayState(!0,t.Aj)},this.Ck=function(){t.Fj.isStalled?(t.Fj.stallExit(),t.Fj.transitionToPlayingState(t.Aj)):t.Fj.isStopped()?t.Pk():t.Fj.isPlaying()||(t.Fj.transitionToPlayState(!0,t.Aj),t.Fj.transitionToPlayingState(t.Aj))},this.Gk=function(){var e;(0,R.clearTimeoutIfDefined)(t.Yk),null==(e=t.Zk)||e.dispose(),t.gk||(0,R.clearTimeoutIfDefined)(t.Xk),t.gk=!0,t.rk=!1,t.fk=!0,t.hk=!0,t.Fk()},this.Hk=function(e,i,n,r){void 0===i&&(i={}),void 0===n&&(n=!1),void 0===r&&(r=!1),t.cj&&(t.fk||n)&&t.cj.dispatchEvent(e,i,r)},this.Ik=function(e){var i=t.Lk(),n=i.currentTime;(-1!==t.Gj||n!==t.Gj)&&!t.qj&&(t.Kk(n)?(Promise.resolve(t.aj.play()).catch(function(e){t.Zj.insane("Play promise rejected:",e)}),t.rj=!0,i.currentTime=t.Hj):t.Jk(i,n),t.pj=!1,t.dk&&(t.dk.width=t.aj.videoWidth,t.dk.height=t.aj.videoHeight))},this.Pk=function(){t.isPlaying()||(t.lj=!1,t.vl(),t.Fj.transitionToPlayingState(t.Aj))},this.Qk=function(){t.lj=!0},this.getCurrentTime=function(e){void 0===e&&(e=S.TimeMode.AbsoluteTime);var i=t.getStartDate();return e===S.TimeMode.AbsoluteTime&&i?O.Util.timeInSeconds(i)+t.Lk().currentTime:t.Lk().currentTime},this.getAudioQuality=this.getPlaybackAudioData,this.getVideoQuality=this.getPlaybackVideoData,this.fl=function(){var e,i=t.Lk(),n=Math.abs(i.currentTime-t.Hj),r=t.dj.GLOBAL_DISABLE_SEEKING,o=null!=(e=t.tj)?e:i.duration;r&&(n>W||i.currentTime<o-W)?(Promise.resolve(t.aj.play()).catch(function(e){t.Zj.insane("Play promise rejected:"+e)}),t.rj=!0,t.aj.currentTime=t.Hj):(t.Hj=0,t.Fj.isPlaying()&&t.Fj.transitionToPausedState(!0,t.Bj),t.Fj.transitionToStoppedState())},this.um=function(){t.qm(),t.sj=0,!t.dj.GLOBAL_DISABLE_SEEKING||t.kk||t.mk?(t.Gj=t.Lk().currentTime,t.mk=!1,t.Fj.isSeeking()&&(t.zj&&t.zj.seek(),t.tm())):t.qj=!1,t.vm()},this.wm=function(){if(t.dj.GLOBAL_DISABLE_SEEKING&&!t.mk)t.qj=!t.kk,t.sj++,t.sj>1&&(t.rj=!1);else if(!t.Fj.isTimeShifting()){var e=t.Lk().currentTime;t.Fj.isSeeking()?(0,T.getCapabilities)().isIOS&&t.wk&&(t.Fj.transitionToSeekingIOSState(e,v.INTERNAL_ISSUER_NAME,!0,t.Hj),t.Gj=e):t.Fj.transitionToSeekingIOSState(e,v.INTERNAL_ISSUER_NAME)}},this.Am=function(){void 0===t.uj&&(t.uj=t.Lk().currentTime)},this.Bm=function(){t.ej++,t.ej<t.dj.IOS_MIN_TIMEUPDATES_AFTER_AD||(t.cj.off(m.PlayerEvent.TimeChanged,t.Bm),t.kk=!0,t.Vk({time:t.fj,issuer:"api",force:!0}))},this.Yj=e,this.wj=!1,this.Zj=e.logger,this.aj=e.videoElement,this.bj=e.config,this.cj=e.eventHandler,this.dj=e.settings,this.pk=[],this.Wk=null,this.ij=this.aj.volume,this.sk=this.aj.getAttribute("crossOrigin"),this.xj=-1/0,(0,B.isAirplaySupported)()&&(this.Jj=new B.AppleAirplayService(this.aj,this.cj)),this.tk=new z.HlsLiveNativeTimeTracker(this,e),this.qk=[{event:L.MediaElementEvent.pause,handler:function(){t.qm(),t.lj||t.Fj.transitionToPausedState(!0,t.Bj,!0)}},{event:L.MediaElementEvent.ended,handler:function(){t.fl()}},{event:L.MediaElementEvent.play,handler:this.Bk},{event:L.MediaElementEvent.canplay,handler:function(){t.Fj.stallExit()}},{event:L.MediaElementEvent.seeking,handler:function(){t.pj=!0,t.wm(),t.getCurrentTime()>=t.getDuration()&&(t.um(),t.fl())}},{event:L.MediaElementEvent.seeked,handler:function(){t.um(),t.Ij&&t.kj&&t.Mk()}},{event:L.MediaElementEvent.durationchange,handler:this.Ak},{event:L.MediaElementEvent.loadeddata,handler:this.Gk},{event:L.MediaElementEvent.loadedmetadata,handler:function(){t.Yk=window.setTimeout(t.Gk,200)}},{event:L.MediaElementEvent.playing,handler:this.Ck},{event:L.MediaElementEvent.waiting,handler:function(){t.qm(),t.Fj.stallEnter()}},{event:L.MediaElementEvent.timeupdate,handler:this.Ik},{event:L.MediaElementEvent.error,handler:function(e){var i;t.gk||1!==t.ck.length||t.type!==S.StreamType.Progressive?(t.ik.reject(),t.mj?(t.Zj.debug("Ignoring video element error",e.errorObject),t.mj=!1):(t.Zj.debug("video element has thrown an error",e.errorObject),(0,R.clearTimeoutIfDefined)(t.Xk),null==(i=t.cj)||i.fireError((0,g.createPlayerErrorFromMediaError)(e,t.Yj.sourceContext.sourceIdentifier,!0)))):t.Jl(l.ErrorCode.SOURCE_PROGRESSIVE_STREAM_ERROR,t.aj.getWrappedElement().src,e)}},{event:L.MediaElementEvent.webkitpresentationmodechanged,handler:this.zk},{elementSelector:function(e){return e.audioTracks},event:"addtrack",handler:this.xk},{elementSelector:function(e){return e.audioTracks},event:"removetrack",handler:this.yk}]}return t.prototype.Dk=function(){var e,t;return!((0,C.isWebOS)()||(0,C.isTizen2023)()||(0,C.isTizen2024)()||(0,C.isEdgeAndroid)()||null!=(t=null==(e=this.bj)?void 0:e.tweaks)&&t.prevent_video_element_preloading||this.getDuration())},t.prototype.Ek=function(){if(!this.al()||null!=(t=null==(e=this.bj)?void 0:e.tweaks)&&t.prevent_video_element_preloading||(0,C.isWebOS)()||this.vk)return!1;var e,t,i=this.aj.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA;return!K(this.Lk().seekable)&&!i},t.prototype.Fk=function(){this.Dk()||this.Ek()?this.Zj.debug("Cannot resolve deferred loading yet, waiting for required data to be loaded ",{duration:String(this.getDuration()),seekableRangeAvailable:K(this.Lk().seekable),videoElementReadyState:this.Lk().readyState}):this.ik.resolve()},t.prototype.Jk=function(e,t){(this.rj=!1,this.tj=e.duration,t>this.tj+2)?(this.Yj.logger.debug("CurrentTime ".concat(t," exceeds video duration (").concat(this.tj,"), reverting current time")),e.currentTime=this.tj-.1):(this.Fj.isSeeking()?this.Zj.debug("Detected timeupdate during seeking. Time: ".concat(t)):this.Hj=t,this.Fj.stallExit(),this.Fj.isSeeking()||this.Fj.isTimeShifting()||!this.isPlaying()||(null!=this.getStartDate()?this.Hk(m.PlayerEvent.TimeChanged,{time:this.getCurrentTime(),relativeTime:t}):this.Hk(m.PlayerEvent.TimeChanged,{time:this.getCurrentTime()})))},t.prototype.Kk=function(e){if(!this.dj.GLOBAL_DISABLE_SEEKING||!this.pj)return!1;var t=-1!==this.Gj&&e>this.Gj+W,i=Math.abs(e-this.Hj);return(!this.rj||t)&&i>W},t.prototype.Lk=function(){return this.Ij&&this.kj?this.kj:this.aj},t.prototype.Mk=function(){var e=Date.now();(0,M.toSeconds)(e-this.bk)>=1/30&&(this.aj.currentTime=this.kj.currentTime,this.bk=e),this.isPlaying()&&window.requestAnimationFrame(this.Mk)},t.prototype.Nk=function(){if(this.isLive()&&!this.Uk()){var e=this.Dm();e.end>=0&&this.Sk(e.end,v.STARTUP_ISSUER_NAME)}},t.prototype.Ok=function(){void 0!==this.uk&&(this.rl(),this.seek(this.uk,"api-play"))},t.prototype.play=function(e){return this.nj?(this.Aj=e,this.Ok(),this.Nk(),this.Lk().play()):Promise.reject("Play control not permitted")},t.prototype.getStartDate=function(){if(!this.isLive())return null;var e=this.Lk().getWrappedElement(),t="function"==typeof e.getStartDate?e.getStartDate():null;return t&&!isNaN(t.getTime())?t:null},t.prototype.preload=function(){this.Lk().preload=this.xl()},t.prototype.pause=function(e){this.Bj=e;var t=this.Lk();this.nj&&this.jj&&(this.Fj.transitionToPausedState(!1,this.Bj),t.pause())},t.prototype.mute=function(e){this.Lk().muted||(this.Lk().muted=!0,this.Hk(m.PlayerEvent.Muted,{issuer:e||"api"}))},t.prototype.unmute=function(e){this.Lk().muted&&(this.Lk().muted=!1,this.Hk(m.PlayerEvent.Unmuted,{issuer:e||"api"}))},t.prototype.Rk=function(e){var t=this.getStartDate();return t?e-(0,M.toSeconds)(t.getTime()):e},t.prototype.seek=function(e,t){var i=this;return!(!this.Tk(e)||this.getCurrentTime()===e)&&(this.tk.adjustTargetTime(e,t).then(function(e){i.Cj=t,i.ml(e,t);var n=i.Rk(e);return i.Vk({time:n,issuer:t})}),this.hk&&this.getDuration()>0)},t.prototype.Sk=function(e,t){this.vj=this.getCurrentTime(),this.Cj=t,this.nl(e,t),this.gl({time:e,issuer:t})},t.prototype.Tk=function(e){this.mk=this.lk&&this.ll(e);var t=!this.dj.GLOBAL_DISABLE_SEEKING&&this.kl();return(this.mk||t)&&this.nj},t.prototype.Uk=function(){var e=!(this.bj.playback&&this.bj.playback.hasOwnProperty("timeShift"))||!!this.bj.playback.timeShift;return this.isLive()&&e},t.prototype.Vk=function(e){return!this.hl(e)&&(this.Fj.transitionToSeekingState(e.time,e.issuer,!1),this.il(e),!0)},t.prototype.gl=function(e){this.hl(e,!0)||(this.Fj.transitionToTimeShiftingState(this.getCurrentTime(),e.time,e.issuer,!1),e.time<0&&(e.time=this.Dm().end+e.time,this.qm()),this.il(e))},t.prototype.hl=function(e,t){return void 0===t&&(t=!1),this.Fj.isSeeking()&&"api-
19play"!==e.issuer?(this.Zj.debug("Seeking already in progress, delaying seek for time",e.time),this.sl(e,t,[L.MediaElementEvent.seeked]),!0):this.hk?0===this.getDuration()?(this.Zj.debug("Delaying the seek until stream duration is known"),this.sl(e,t,[L.MediaElementEvent.durationchange]),!0):this.aj.seekable.length<1&&(this.Zj.debug("Delaying the seek as the seekable range is not yet known"),this.sl(e,t,[L.MediaElementEvent.timeupdate,L.MediaElementEvent.canplay]),!0):(this.Zj.debug("Delaying the seek until data is loaded"),this.sl(e,t,[L.MediaElementEvent.loadeddata]),!0)},t.prototype.il=function(e){var t=e.issuer===v.ADVERTISING_ISSUER_NAME,i=this.Dm();this.Zj.debug("Seek to ".concat(e.time,", seekable range:"),i);var n=this.jl(e.time,i,t);this.lk=!1,this.rj=this.rj||this.mk||e.force;var r=parseFloat(n.toFixed(2));this.yj=r,this.Zj.debug("Setting time on video element from ".concat(this.Lk().currentTime," to ").concat(r)),this.Lk().currentTime=r},t.prototype.jl=function(e,t,i){void 0===i&&(i=!1);var n=Y(e,t);return i?e>=t.end&&(n=t.end-.1):n=Math.min(n,t.end-this.dj.SEEK_TO_END_OFFSET),n!==e&&this.Zj.debug("Adjusted seek target from ".concat(e," to ").concat(n)),n},t.prototype.kl=function(){var e=this.bj&&this.bj.hasOwnProperty("playback")?this.bj.playback:{};return!e.hasOwnProperty("seeking")||e.seeking},t.prototype.ll=function(e){var t=this.Yj.sourceContext.source?this.Yj.sourceContext.source:{};return t.hasOwnProperty("options")&&t.options.hasOwnProperty("startTime")&&e===t.options.startTime},t.prototype.ml=function(e,t){t!==v.STARTUP_ISSUER_NAME&&this.Hk(m.PlayerEvent.Seek,{position:this.getCurrentTime(),seekTarget:e,issuer:t||"api"})},t.prototype.nl=function(e,t){t!==v.STARTUP_ISSUER_NAME&&this.Hk(m.PlayerEvent.TimeShift,{target:e<0?this.vj+e:e,position:this.vj,issuer:t||"api"})},t.prototype.ol=function(e){var t=this;return new Promise(function(i){var n=function(){e.removeEventListener(L.MediaElementEvent.seeked,n),i()};t.pk.push({el:e,ev:L.MediaElementEvent.seeked,fn:n}),e.addEventListener(L.MediaElementEvent.seeked,n)})},t.prototype.pl=function(e,t){var i=this;return new Promise(function(n,r){var o=0,a=function(){var s=e.buffered,l=s.length>0?s.end(s.length-1):-1/0;(o+=+!!isFinite(l))>i.dj.SAFARI_NUM_PROGRESS_EVENTS_AFTER_SEEK_GLITCH&&l<t?(e.removeEventListener(L.MediaElementEvent.progress,a),r(null)):l>=t&&(e.removeEventListener(L.MediaElementEvent.progress,a),n())};i.pk.push({el:e,ev:L.MediaElementEvent.progress,fn:a}),e.addEventListener(L.MediaElementEvent.progress,a)})},t.prototype.ql=function(e,t){var i=this;return this.type!==S.StreamType.Hls?Promise.resolve():this.ol(e).then(function(){return i.pl(e,t)}).catch(function(){throw i.Zj.debug("seek to target time (".concat(t,") failed - trying to recover by seeking to ").concat(t+1)),null})},t.prototype.rl=function(){var e=this;Object.keys(this.nk).forEach(function(t){e.Lk().removeEventListener(t,e.nk[t])}),this.nk={}},t.prototype.sl=function(e,t,i){var n=this,r=this.Lk();this.rl(),this.uk=e.time;var o=function(i){n.rl();var a={time:(0,k.isNumber)(i)?i:e.time,issuer:e.issuer,force:e.force};n.ql(r,e.time).catch(function(){return o(e.time+1)}),n.uk=void 0,t?n.gl(a):n.Vk(a)};i.forEach(function(e){r.addEventListener(e,o),n.nk[e]=o})},t.prototype.setAudio=function(e){var t=A.ArrayHelper.toArray(this.aj.audioTracks).find(function(t){return t.id===e});t&&this.ul(t)},t.prototype.tl=function(e,t){this.Hk(m.PlayerEvent.AudioChanged,{targetAudio:{id:t.id,label:t.label,lang:t.language},sourceAudio:e,time:this.aj.currentTime})},t.prototype.ul=function(e){if(!e.enabled){var t=A.ArrayHelper.toArray(this.aj.audioTracks).find(function(e){return e.enabled}),i=null;t&&(t.enabled=!1,i=this.Wl(t)),e.enabled=!0,this.tl(i,e)}},t.prototype.setVolume=function(e,t){var i=this.Lk(),n=this.ij,r=Math.min(e/100,1);n!==r&&(this.ij=r,i.volume=r,this.Hk(m.PlayerEvent.VolumeChanged,{targetVolume:100*r,sourceVolume:100*n,issuer:t||"api"}))},t.prototype.vl=function(){var e=this;(0,R.clearTimeoutIfDefined)(this.Xk),this.gk||(this.Xk=window.setTimeout(function(){e.Xk=void 0,!e.gk&&e.cj&&(e.type===S.StreamType.Hls?e.cj.fireError(new c.PlayerError(l.ErrorCode.NETWORK_MANIFEST_DOW
vendor: 24,764 bytes, line 19
19NLOAD_TIMEOUT,{sourceUrl:e.ek.url},"Failed to load the HLS playlist: the request timed out.",e.Yj.sourceContext.sourceIdentifier)):e.type===S.StreamType.Progressive&&e.cj.fireError(new c.PlayerError(l.ErrorCode.NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT,{sourceUrl:e.ek.url},"Failed to load the progressive source: the request timed out.",e.Yj.sourceContext.sourceIdentifier)))},(0,M.toMilliSeconds)(this.dj.XHR_TIMEOUT/2)))},t.getContentDomain=function(e){var t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t.hostname},t.prototype.wl=function(e){var t;(0,C.isTizen)()&&(null==(t=this.Zk)||t.dispose(),this.Zk=new V.AssetAvailabilityChecker(this.Yj,e,this.aj))},t.prototype.prepareLoad=function(){return Promise.resolve()},t.prototype.prepareSource=function(e,t){return Promise.resolve()},t.prototype.xl=function(){var e,t,i,n;return null!=(t=null==(e=this.bj)?void 0:e.tweaks)&&t.prevent_video_element_preloading?a.None:(null==(n=null==(i=this.bj)?void 0:i.adaptation)?void 0:n.preload)===!1?a.Metadata:a.Auto},t.prototype.load=function(t,i,n){var r,o=this,s=null!=(r=null==i?void 0:i.seeking)&&r;this.Fj=this.Yj.serviceManager.get(p.ServiceName.PlayerStateService),this.Fj.transitionToSeekedState(!1);var l=this.xl();l!==a.Auto&&this.aj.setAttribute("preload",l),this.type=this.Yj.sourceContext.technology.streaming,this.ek=t,t.type&&(this.type=t.type),!0===this.jj&&this.unload().catch(function(){}),this.gk=!1,this.hk=!1,this.Lk().nativeMediaEventListener.reset(),this.lk=!0,this.mj=!1,this.Ej=0,this.uk=void 0,this.vk=!1,t.hasOwnProperty("vr")&&t.vr&&t.vr.restrictedInlinePlayback?(this.Ij=!0,this.kj=O.Util.getVRAudioElement(),this.xm(this.kj)):(this.kj=null,this.Ij=!1,this.xm(this.aj)),this.cj.on(m.PlayerEvent.TimeChanged,this.Am),this.ok=(0,w.subscribe)(this.Yj.store)(function(e){return(0,E.getIsStopped)((0,E.getPlayerState)(e))},this.Qk,function(e){return!0===e}),this.dj.GLOBAL_DISABLE_SEEKING=s||!1,this.oj>-1&&((0,R.clearTimeoutIfDefined)(this.oj),this.oj=-1);var c="";t&&t.url&&("string"==typeof t.url?c=t.url:t.url.length>0&&(c=t.url[0].url));var u=window.location.hostname===e.getContentDomain(c);t.hasOwnProperty("vr")&&t.vr&&!u&&(this.sk=this.aj.getAttribute("crossOrigin"),this.aj.setAttribute("crossOrigin","anonymous")),this.aj.eventHandler.reset(),this.rk||(this.zj=this.zm()),this.ik=new P.Deferred;var d=this.zl(t,n);return this.ik.promise.then(function(){o.Yj.sourceContext.source=t.config}).then(function(){return d}).then(function(){return o.Al(t)})},t.prototype.yl=function(e){var t=this;(0,C.isSafari17orIOS17)()&&fetch(e.url,{method:F.HttpRequestMethod.GET,headers:{Range:"bytes=0-0"}}).then(function(e){e.redirected&&(t.Zj.debug("Detected source redirection."),t.hk&&t.ik.resolve(),t.vk=!0)}).catch(function(){})},t.prototype.zl=function(e,t){var i=this;return this.type===S.StreamType.Hls?(this.yl(e),this.Gl(e)):this.type===S.StreamType.Progressive?this.Hl(e,t).then(function(){return i.Bl()}):Promise.resolve()},t.prototype.Al=function(e){this.Dj=e,this.jj=!0,this.Hj=0,this.rj=!1},t.prototype.Bl=function(){var e,t;null!=(t=null==(e=this.bj)?void 0:e.tweaks)&&t.prevent_video_element_preloading?this.Fk():this.aj.load()},t.prototype.Cl=function(t,i){var n=this;if(t.config.drm&&t.config.drm.fairplay){var r=N.ModuleManager.get(U.ModuleName.DRM).FairplayHandler;this.Kj=new r(this.Yj,this.aj,t.config.drm.fairplay)}var o=e.createSourceElement(i,null);this.Ml(o,"0",t),this.wl(o);var a={element:o,handler:function(e){return n.Jl(l.ErrorCode.SOURCE_HLS_STREAM_ERROR,o.src,e)}};this.jk.push(a),a.element.addEventListener(L.MediaElementEvent.error,a.handler)},t.prototype.Dl=function(e,t){this.Cl(e,t),this.Bl()},t.prototype.El=function(e,t){var i=this,n=x.URLHelper.appendQueryParametersToUrl(t,{"bitmovin-player-id":this.Yj.internalPlayerID});return this.Dl(e,n),this.Lj.resolveMasterManifest(e.url).then(function(){}).catch(function(e){i.Zj.debug("Couldn't access master playlist with ServiceWorker: ".concat(e))})},t.prototype.Fl=function(e,t){var i=this;return H.createHlsManifestController(this.Yj).then(function(n){return i.Lj=n,i.dj.NATIVE_HLS_DOWNLOAD_ERROR_HANDLING&&(i.Wk=new j.HlsDownloadErrorHandler(i.Yj,n)),H.shouldUseServiceWorker(i.Yj)?i.El(e,t):i.Lj.resolveMasterManifest(e.url).then(function(t){0!==t.indexOf("data")&&0!==t.indexOf("blob")||i.Dl(e,t)}).catch(function(e){i.Zj.debug("Couldn't access master playlist for native HLS parsing: ".concat(e))})})},t.prototype.Gl=function(e){if("string"!=typeof e.url){var t,i=new c.PlayerError(l.ErrorCode.SOURCE_INVALID,{given:e.url},"Cannot load the HLS playlist: the source URL should be a string.",this.Yj.sourceContext.sourceIdentifier);return null==(t=this.cj)||t.fireError(i),this.ik.reject(i),Promise.resolve()}var n=this.adjustToFullUrlWithQueryParams(e.url);return this.dj.NATIVE_HLS_PARSING?this.Fl(e,n):(this.Dl(e,n),Promise.resolve())},t.prototype.Hl=function(e,t){if(this.ck=[],Array.isArray(e.url))this.Il(e.url,t);else{var i={url:e.url,bitrate:0};this.aj.src=this.adjustToFullUrlWithQueryParams(i.url),this.Ol("0",i),this.Pl("0",i),this.wl(this.aj.getWrappedElement())}return Promise.resolve()},t.prototype.Il=function(e,t){var i=this;t=t||function(e){var t=e.findIndex(function(e){return!0===e.preferred});return t>-1?String(t):"0"}(e);var n=this.Kl(e,t,!0);if(n){var r={element:n,handler:function(e){return i.Jl(l.ErrorCode.SOURCE_PROGRESSIVE_STREAM_ERROR,n.src,e)}};this.jk.push(r),r.element.addEventListener(L.MediaElementEvent.error,r.handler),this.Ij&&this.kj&&this.kj.load(),this.wl(n)}},t.prototype.Jl=function(e,t,i){var n,r=this;(0,R.clearTimeoutIfDefined)(this.Xk),null==(n=this.Zk)||n.dispose(),this.jj=!0,this.Zj.debug("Caught a stream error event (".concat(e,", ").concat(t,")"),i),new y.DefaultContentLoader(this.Yj).load(t).then(function(e){return{status:e.status,statusText:e.statusText,error:void 0}}).catch(function(e){return{error:e,status:(null==e?void 0:e.status)||0,statusText:(null==e?void 0:e.statusText)||""}}).then(function(n){var o,a=n.error,s=n.status,l=n.statusText,u=(null==i?void 0:i.message)||i,d=function(e,t){r.ik.reject(new c.PlayerError(e,t,"The video element has thrown an error while loading the stream.",r.Yj.sourceContext.sourceIdentifier))};200!==s?(o={event:i,error:a,status:s,statusText:l,src:t,extraMessage:u},r.Zj.debug("last/only source has thrown an error ".concat(s," - ").concat(l),o),d(e,o)):(o={event:i,error:a,src:t,extraMessage:u},r.Zj.debug("last/only source has thrown an error, but we are able to download the asset during the error handling.",o),r.ek&&r.Ej<r.dj.MAX_RETRIES?(r.Ej++,r.Zj.debug("Reloading the source: attempt ".concat(r.Ej," of ").concat(r.dj.MAX_RETRIES,".")),r.zl(r.ek).catch(function(){return d(e,o)})):d(e,o))})},t.prototype.Kl=function(t,i,n){for(var r,o=[],a=-1,s=null,l=null,c=0;c<t.length;c++){var u=t[c];if(!this.Ll(u,l,n)){if(r=e.createSourceElement(this.adjustToFullUrlWithQueryParams(u.url),u.type),l=l||u.type,this.Ol(String(c),u),n){if(o.indexOf(u.type)>-1){this.Zj.debug("Stream of mime type ".concat(u.type," already added.. continuing"));continue}i===String(c)?(s=r,a=u.bitrate,this.Ml(r,String(c),u),o.push(u.type)):a===u.bitrate&&(s=r,this.Nl(r),o.push(u.type))}else s=r,this.Ml(r,String(c),u);this.Ij&&this.kj&&(this.kj.innerHTML=this.aj.innerHTML)}}return s},t.prototype.Ll=function(t,i,n){return!e.isValidProgressiveSourceObject(t)||!!n&&(!this.Ql(t.type)||!!i&&i!==t.type)},t.isValidProgressiveSourceObject=function(e){return"object"==typeof e&&e&&e.url&&""!==e.url},t.prototype.Ml=function(e,t,i){this.aj.appendChild(e),this.Pl(t,i)},t.prototype.Nl=function(e){this.aj.appendChild(e)},t.prototype.Ol=function(e,t){var i={id:e};t.bitrate&&(i.bitrate=t.bitrate),i.label=String(t.label||t.bitrate||"unknown"),this.ck.push(i)},t.prototype.Pl=function(e,t){this.dk={id:e},t.bitrate&&(this.dk.bitrate=t.bitrate),this.dk.label=""+(t.label||t.bitrate||"unknown")},t.prototype.Ql=function(e){return!(this.aj.canPlayType(e).length<=0&&(this.Zj.debug("Mime type"+e+" not supported.. continuing"),1))},t.createSourceElement=function(e,t){var i=document.createElement("source");return i.src=e,t&&(0>t.indexOf("/")&&(t="video/"+t),i.type=t),i},t.prototype.unload=function(e,t){var i,n;return void 0===e&&(e="api"),void 0===t&&(t=!1),this.tk.onUnload(e),this.rl(),this.ik&&!t&&this.ik.reject(),(0,R.clearTimeoutIfDefined)(this.Yk),(0,R.clearTimeoutIfDefined)(this.Xk),null==(i=this.Zk)||i.dispose(),this.lj=!1,this.Kj=(0,f.dispose)(this.Kj),this.Wk=(0,f.dispose)(this.Wk),this.Lj=(0,f.dispose)(this.Lj),this.Rl(e),this.pk.forEach(function(e){return e.el.removeEventListener(e.ev,e.fn)}),this.pk=[],this.rk||(null==(n=this.zj)||n.signalSourceChange(),this.zj=(0,f.dispose)(this.zj)),this.Ul(),this.Sl(),this.pause(),this.mj=!0,this.Tl(),this.ok&&this.ok(),this.fk&&(this.dk=null),this.jj&&(this.jj=!1,t||(this.Hk(m.PlayerEvent.SourceUnloaded,{oldSource:this.Dj}),this.ak=null)),Promise.resolve()},t.prototype.Rl=function(e){var t,i,n,r=null==(t=this.Yj.sourceContext)?void 0:t.sourceIdentifier;if(r){var o=this.Yj.serviceManager,a=!(null!=(i=this.Yj.sourceContext)&&i.isAd);e===v.ADVERTISING_ISSUER_NAME&&a?null==(n=o.get(p.ServiceName.NativeManifestService,r))||n.suspend():(0,h.disposeService)(o,p.ServiceName.NativeManifestService,r)}},t.prototype.Sl=function(){if(this.Ij&&this.kj){for(this.kj.removeAttribute("src");this.kj.firstChild;)this.kj.removeChild(this.kj.firstChild);this.kj.load()}},t.prototype.Tl=function(){var e=this;this.Ij?this.kj&&this.ym(this.kj):this.ym(this.aj),this.rl(),this.cj.off(m.PlayerEvent.TimeChanged,this.Am),this.cj.off(m.PlayerEvent.TimeChanged,this.Bm),this.jk.forEach(function(t){try{t.element.removeEventListener(L.MediaElementEvent.error,t.handler)}catch(t){e.Zj.debug("Error while removing event listener",t)}})},t.prototype.Ul=function(){D.VideoElementUtil.removeSource(this.aj),null!=this.sk?this.aj.setAttribute("crossOrigin",this.sk):this.aj.removeAttribute("crossOrigin"),this.aj.load()},t.prototype.Vl=function(){return this.Ij&&this.kj&&"readyState"in this.kj?this.kj.readyState!==HTMLMediaElement.HAVE_NOTHING:!("readyState"in this.aj)||this.aj.readyState!==HTMLMediaElement.HAVE_NOTHING},t.prototype.isLive=function(){return this.Lk().duration===1/0},t.prototype.isPlaying=function(){return this.Fj.isPlaying()},t.prototype.isPaused=function(){return this.Fj.isPaused()},t.prototype.hasEnded=function(){return this.lj},t.prototype.isMuted=function(){return this.Lk().muted},t.prototype.isStalled=function(){return this.Fj.isStalled},t.prototype.getVolume=function(){return 100*this.Lk().volume},t.prototype.getDuration=function(){return this.Lk().duration},t.prototype.Wl=function(e){var t={id:e.id||String(A.ArrayHelper.toArray(this.aj.audioTracks).indexOf(e)),label:e.label,lang:e.language,getQualities:null},i=this.Xl(t);return i&&"string"==typeof i&&(t.label=i),t},t.prototype.getAudio=function(){var e=A.ArrayHelper.toArray(this.aj.audioTracks).find(function(e){return e.enabled});return e?this.Wl(e):null},t.prototype.getAvailableAudio=function(){var e=this;return A.ArrayHelper.toArray(this.aj.audioTracks).map(function(t){return e.Wl(t)})},t.prototype.Xl=function(e){var t={id:e.id,lang:e.lang,mimeType:I.MimeType.AudioMp4};return this.Yl()(t)},t.prototype.Yl=function(){var t=this.Yj.sourceContext,i=t&&t.source&&t.source.labeling;return i&&i[this.type]&&i[this.type].tracks?"function"!=typeof i[this.type].tracks?e.getDefaultLabelForAudio:i[this.type].tracks:e.getDefaultLabelForAudio},t.getDefaultLabelForAudio=function(){return null},t.prototype.getDownloadedVideoData=function(){return this.type===S.StreamType.Progressive?this.dk:this.Lj?this.Lj.getDownloadedVideoData():{id:q,bitrate:0,height:0,width:0,isAuto:!0}},t.prototype.getDownloadedAudioData=function(){return{id:q,bitrate:0,isAuto:this.type===S.StreamType.Progressive}},t.prototype.Zl=function(e){var t={};return t.id=e.id,t.label=e.label,e.width>1?t.width=e.width:this.dk&&this.dk.id===e.id&&(this.dk.width>1?t.width=this.dk.width:!isNaN(this.aj.videoWidth)&&this.aj.videoWidth>1&&(t.width=this.aj.videoWidth)),e.height>1?t.height=e.height:this.dk&&this.dk.id===e.id&&(this.dk.height>1?t.height=this.dk.height:!isNaN(this.aj.videoHeight)&&this.aj.videoHeight>1&&(t.height=this.aj.videoHeight)),void 0!==e.bitrate&&"unknown"!==e.bitrate&&(t.bitrate=e.bitrate),t},t.prototype.getPlaybackVideoData=function(){if(this.Lj){var e=this.Lj.getPlayingVideoData();if(e)return e}if(this.dk){var t=this.Zl(this.dk);return"progressive"!==this.type&&(t.id=q),t}return{id:q,bitrate:0,height:this.aj.videoHeight,width:this.aj.videoWidth}},t.prototype.getPlaybackAudioData=function(){return{id:q,bitrate:0}},t.prototype.getMaxTimeShift=function(){if(!this.Uk())return 0;var e=this.Dm();return this.al()&&e.start>=0?e.start-e.end:0},t.prototype.al=function(){return this.type===S.StreamType.Hls&&this.isLive()},t.prototype.timeShift=function(e,t){if(this.Uk()&&this.bl(e,t))if(0===e){var i=this.Dm();i.end>=0&&this.Sk(i.end)}else this.Sk(e,t)},t.prototype.bl=function(e,t){if(t===v.STARTUP_ISSUER_NAME&&!function(e){return(null==e?void 0:e.startTime)!=null||(null==e?void 0:e.startOffset)!=null}(this.Yj.sourceContext.source.options))return!1;var i=Math.abs(Math.abs(e)-Math.abs(this.getTimeShift())),n=this.rm(e);return i>.25&&!(this.wj&&n)},t.prototype.getTimeShift=function(){if(this.cl())return 0;var e=this.Dm();if(e.start>=0&&this.el()){var t=Y(this.Lk().currentTime-e.end,this.Cm());this.wj=this.rm(t)&&!this.dl(),this.xj=this.wj?0:t}return isFinite(this.xj)?this.xj:0},t.prototype.cl=function(){return!this.isLive()||!this.Fj.hasBeenPlaying&&!this.Fj.seekedOrTimeshifted||this.wj},t.prototype.dl=function(){return this.isStalled()||this.isPaused()},t.prototype.el=function(){return!isFinite(this.xj)||this.dl()},t.prototype.getManifest=function(){return this.Lj?this.Lj.getManifest():null},t.prototype.getSnapshot=function(e,t){if(this.isPlaying()||this.isPaused()){var i=this.aj.videoWidth,n=this.aj.videoHeight;if(this.gj||(this.gj=document.createElement("canvas"),this.gj.id="snapshotHiddenCanvas"),this.gj&&this.gj.getContext&&this.gj.getContext("2d")){this.gj.height=n,this.gj.width=i,this.hj=this.gj.getContext("2d"),this.hj.drawImage(this.aj.getWrappedElement(),0,0,i,n);var r=void 0;try{("image/jpeg"===e||"image/webp"===e)&&(Number(t)===t?(t<0||t>1)&&(t=1):t=1),r=this.gj.toDataURL(e,t)}catch(e){return void(e&&e.message?this.Zj.debug("Snapshot acquisition failed: "+e.message):this.Zj.debug("Snapshot acquisition failed"))}return{height:n,width:i,data:r}}}},t.prototype.setPlaybackSpeed=function(e){this.Lk().playbackRate=e},t.prototype.getPlaybackSpeed=function(){return this.Lk().playbackRate},t.prototype.permitControl=function(e){this.nj=e},t.prototype.qm=function(){this.xj=-1/0,this.Uk()&&(this.wj=!1)},t.prototype.rm=function(e){return Math.abs(e)<2*this.dj.SEEK_TO_END_OFFSET},t.prototype.sm=function(){return this.yj!==this.Gj&&this.Cj===v.STARTUP_ISSUER_NAME},t.prototype.tm=function(){this.sm()&&(this.Yj.logger.debug("Seek target changed during startup..."),this.ml(this.yj),this.Cj="api",this.yj=-1)},t.prototype.vm=function(){this.Fj.isSeeking()&&(this.Fj.transitionToSeekedState(this.Cj!==v.STARTUP_ISSUER_NAME),this.Cj="api"),this.Fj.isTimeShifting()&&this.Fj.transitionToTimeShiftedState(this.Cj!==v.STARTUP_ISSUER_NAME)},t.prototype.xm=function(e){for(var t=0;t<this.qk.length;t++){var i=this.qk[t].elementSelector?this.qk[t].elementSelector(e):e;i&&i.addEventListener(this.qk[t].event,this.qk[t].handler)}},t.prototype.ym=function(e){for(var t=0;t<this.qk.length;t++){var i=this.qk[t].elementSelector?this.qk[t].elementSelector(e):e;i&&i.removeEventListener&&i.removeEventListener(this.qk[t].event,this.qk[t].handler)}},t.prototype.getBufferLevel=function(e){var t={level:null,targetLevel:null,type:e,media:S.MediaType.Video},i=this.Lk();if(!i.buffered||i.buffered.length<1)return t;var n=function(n){for(var r=0;r<i.buffered.length;r++){var o=i.buffered.start(r),a=i.buffered.end(r);o>n||a<=n||(t.level=a-n,e===S.BufferType.BackwardDuration&&(t.level=n-o))}},r=i.currentTime;if(n(r),null==t.level){var o=function(e,t){for(var i=e.buffered.start(0),n=Math.abs(i-t),r=1;r<e.buffered.length;r++){var o=Math.abs(e.buffered.start(r)-t);o<n&&(n=o,i=e.buffered.start(r))}return{distanceToCurrentTime:n,closestBufferStart:i}}(i,r),a=o.distanceToCurrentTime,s=o.closestBufferStart;a<1&&(this.Yj.logger.debug("Adjusting buffer level to closest buffer range ",s),n(s))}return t},t.prototype.zm=function(){if(N.ModuleManager.has(U.ModuleName.SubtitlesNative))return new(N.ModuleManager.get(U.ModuleName.SubtitlesNative)).TextTrackController(this.Yj,this.aj,this.bj,this.type);this.Zj.log("Unable to create native SubtitleController because the ".concat(U.ModuleName.SubtitlesNative," module is missing"))},t.prototype.removeSubtitle=function(e){e&&this.zj&&this.zj.removeSubtitle(e)},t.prototype.addSubtitle=function(e){return this.zj?(this.removeSubtitle(e.id),e.kind="subtitles",this.zj.addSubtitle(e)):Promise.reject()},t.prototype.listSubtitles=function(){return this.zj?this.zj.getAvailableSubtitles():[]},t.prototype.enableSubtitle=function(e){return this.zj?this.zj.enableSubtitle(e):Promise.resolve(!1)},t.prototype.disableSubtitle=function(e){return this.zj?Promise.resolve(this.zj.disableSubtitle(e)):Promise.resolve(!1)},t.prototype.adjustToFullUrlWithQueryParams=function(e){var t=x.URLHelper.toFullUrl(e);return x.URLHelper.appendQueryParametersToUrl(t,this.dj.QUERY_PARAMETERS)},t.prototype.onFullscreenEnter=function(){this.wk=this.aj.webkitDisplayingFullscreen,this.zj&&this.wk&&this.zj.enableNative()},t.prototype.onFullscreenExit=function(){this.zj&&this.wk&&this.zj.disableNative(),this.wk=!1},t.prototype.getAvailableVideoQualities=function(){var e=this;return"progressive"!==this.type?[]:this.ck.map(function(t){return e.Zl(t)})},t.prototype.getBufferedRanges=function(){var e=this;return(0,s.getBufferedRanges)(this.Lk()).map(function(t){return(0,s.convertRangeToTimeMode)(t,e.getStartDate(),S.TimeMode.AbsoluteTime)})},t.prototype.setVideoQuality=function(e){var t,i=this,r=this.getPlaybackSpeed(),o=this.ck.find(function(t){return t.id===e});if("progressive"===this.type&&o&&(!this.dk||this.dk.id!==e)){this.rk=!0,this.fj=this.getCurrentTime(),this.ck=[],this.fk=!1;var a=this.Fj.isPlaying()||this.Fj.isPlay();this.Fj.stallEnter(),this.unload("api",!0).catch(function(){});var s=this.Zl(o),l={sourceQuality:this.dk,sourceQualityId:this.dk?this.dk.id:null,targetQuality:s,targetQualityId:s.id};this.cj.one(m.PlayerEvent.StallEnded,function(){i.fk=!0,(0,T.getCapabilities)().isIOS||(0,T.getCapabilities)().isSafari?(i.ej=0,i.cj.on(m.PlayerEvent.TimeChanged,i.Bm)):(i.ej=1/0,i.Bm()),a&&(i.play(v.INTERNAL_ISSUER_NAME).catch(function(){i.Hk(m.PlayerEvent.Warning,new u.PlayerWarning(d.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED))}),i.Fj.transitionToPlayingState(v.INTERNAL_ISSUER_NAME,!1))}),this.Hk(m.PlayerEvent.VideoQualityChanged,n({},l),!0),null==(t=this.Jj)||t.initAirplay(),this.load(this.ek,{seeking:this.dj.GLOBAL_DISABLE_SEEKING},e).then(function(){i.setPlaybackSpeed(r),i.Hk(m.PlayerEvent.VideoDownloadQualityChange,n({},l),!0),i.Hk(m.PlayerEvent.VideoDownloadQualityChanged,n({},l),!0),i.Hk(m.PlayerEvent.VideoPlaybackQualityChanged,{sourceQuality:l.sourceQuality,targetQuality:l.targetQuality},!0)})}},t.prototype.isAirplayAvailable=function(){var e,t;return null!=(t=null==(e=this.Jj)?void 0:e.isAirplayAvailable())&&t},t.prototype.isAirplayActive=function(){var e,t;return null!=(t=null==(e=this.Jj)?void 0:e.isAirplayActive())&&t},t.prototype.showAirplayTargetPicker=function(){var e;null==(e=this.Jj)||e.showAirplayTargetPicker()},t.prototype.Cm=function(){return this.isLive()?{start:this.getMaxTimeShift(),end:0}:{start:-1,end:-1}},t.prototype.Dm=function(){var e=this.aj.seekable;if(e.length>0){var t={start:e.start(0),end:e.end(0)};return t.start=Math.max(0,t.start),t}return{start:-1,end:-1}},t.prototype.getSeekableRange=function(){if(!this.isLive()||this.dj.ENABLE_SEEK_FOR_LIVE){var e=this.getStartDate(),t=this.Dm();return e?(0,s.convertRangeToTimeMode)(t,e,S.TimeMode.AbsoluteTime):t}return{start:-1,end:-1}},t.prototype.createManifestApi=function(){return this.Lj?G.NativePlayerManifestApiFactory.create(this.Lj):null},t.prototype.release=function(){var e,t=this,i=this.unload("api").catch(function(){});return(0,R.clearTimeoutIfDefined)(this.Xk),i=i.then(function(){t.type=null,t.bj=null,t.cj=null,t.dj=null,t.fj=null,t.gj=null,t.hj=null,t.kj=null,t.aj=null,t.Aj=null,t.Bj=null,t.Cj=null,t.Dj=null,t.ek=null,t.dk=null,t.ck=null,t.jk=null,t.uk=void 0}),null==(e=this.Jj)||e.dispose(),this.zj&&this.zj.dispose(),this.zj=null,this.Kj&&this.Kj.dispose(),this.Kj=null,this.Wk&&this.Wk.dispose(),this.Wk=null,this.Lj&&this.Lj.dispose(),this.Lj=null,i},t.prototype.setQueryParameters=function(e){this.dj.QUERY_PARAMETERS=e},t.prototype.clearQueryParameters=function(){this.dj.QUERY_PARAMETERS=void 0},t.prototype.setAudioQuality=function(e){},t.prototype.setTargetBufferLevel=function(){},t.prototype.getAvailableAudioQualities=function(){return[]},t.prototype.getDroppedVideoFrames=function(){return 0},t.prototype.getTotalStalledTime=function(){return 0},t.prototype.updateCallback=function(e){},t.prototype.getAvailableSegments=function(){return{}},t.prototype.getLatency=function(){var e=this.aj.getWrappedElement();if(!e.getStartDate)return 1/0;var t=e.getStartDate().getTime();if(isNaN(t))return 1/0;var i=new Date().getTime();return(0,M.toSeconds)(i-t)-this.aj.currentTime},t.prototype.setTargetLatency=function(e){},t.prototype.getTargetLatency=function(){},t.prototype.setCatchupConfig=function(e){},t.prototype.getCatchupConfig=function(){},t.prototype.setFallbackConfig=function(e){},t.prototype.getFallbackConfig=function(){},t}(),function(){var n="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[(0,b.trackPerformance)("NativePlayer.load",!0)],o(e,null,t,{kind:"method",name:"load",static:!1,private:!1,access:{has:function(e){return"load"in e},get:function(e){return e.load}},metadata:n},null,i),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})}(),e}()},56678:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.NativePlayerManifestApiFactory=void 0;var n=i(34047);t.NativePlayerManifestApiFactory=function(){function e(){}return e.create=function(t){var i=t.getParsedManifest();return t.isValidMasterPlaylist(i)?new(function(){return function(){this.hls=e.createHlsApi(t)}}()):null},e.createHlsApi=function(t){var i=t.getParsedManifest(),n=i.media.filter(function(e){return"AUDIO"===e.attributes.TYPE}),r=i.media.filter(function(e){return"SUBTITLES"===e.attributes.TYPE||"CLOSED-CAPTIONS"===e.attributes.TYPE});return new(function(){function o(){this.properties=t.getParsedManifest().tags}return o.prototype.getVideoTracks=function(){return e.getVideoTracks(i.playlists)},o.prototype.getAudioTracks=function(){return e.getAudioTracks(n,i.playlists)},o.prototype.getTextTracks=function(){return e.getTextTracks(r)},o}())},e.getAudioTracks=function(e,t){var i=e.reduce(function(e,t){return e[t.attributes.LANGUAGE]||(e[t.attributes.LANGUAGE]=t.attributes.NAME),e},{}),r=Object.keys(i).map(function(t,n){return{id:"audio-".concat(n),label:i[t],lang:t,getQualities:function(){return e.filter(function(e){return e.attributes.LANGUAGE===t}).map(function(e,t){return{id:t+"",bitrate:0,label:e.attributes.NAME}})}}}),o=function(e){return e.attributes.CODECS&&n.CodecStringHelper.getMimeTypeForCodecString(e.attributes.CODECS).includes("audio")};return t.some(o)&&r.push({id:"audio-".concat(r.length),label:"und",lang:"",getQualities:function(){return t.filter(o).map(function(e,t){return{id:t+"",bitrate:e.attributes.BANDWIDTH,codec:n.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS).audio}})}}),r},e.getVideoTracks=function(t){var i=t.filter(function(e){return!e.attributes.CODECS||n.CodecStringHelper.getMimeTypeForCodecString(e.attributes.CODECS).includes("video")});return[{id:"video-0",label:"und",getQualities:function(){return e.getVideoQualities(i)}}]},e.getTextTracks=function(e){return e.map(function(e,t){return{id:"text-".concat(t),label:e.attributes.NAME,lang:e.attributes.LANGUAGE,isFragmented:!0,kind:"CLOSED-CAPTIONS"===e.attributes.TYPE?"caption":"subtitle",url:e.attributes.URI}})},e.getVideoQualities=function(e){return e.map(function(e){var t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,r={id:i?"".concat(i,"_").concat(e.attributes.BANDWIDTH):"".concat(e.attributes.BANDWIDTH),bitrate:e.attributes.BANDWIDTH,width:t||0,height:i||0};if(e.attributes.CODECS){var o=n.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS);o.video&&(r.codec=o.video)}return r})},e}()}
19,49706:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TechnologyChecker=void 0;var n=i(44468);t.TechnologyChecker=function(){function e(){}return e.prototype.getSupportedTechnologies=function(){return[{player:n.PlayerType.Native,streaming:n.StreamType.Progressive},{player:n.PlayerType.Native,streaming:n.StreamType.Hls},{player:n.PlayerType.Native,streaming:n.StreamType.Dash}]},e}()}},function(e){return function(){return e(e.s=27530)}()}])})}()}(bitmovinplayerEngineNative);var bitmovinplayerEngineNativeExports=bitmovinplayerEngineNative.exports;let EngineNative=getDefaultExportFromCjs$1(bitmovinplayerEngineNativeExports);var bitmovinplayerHls={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[458],{62903:function(e,t,i){e.exports=function(){return i(90040)('!function(){"use strict";var e={1829:function(e,t,n){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function r(e,t,n){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}n.r(t),n.d(t,{__DO_NOT_USE__ActionTypes:function(){return d},applyMiddleware:function(){return h},bindActionCreators:function(){return g},combineReducers:function(){return p},compose:function(){return v},createStore:function(){return c},legacy_createStore:function(){return f}});var u=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}(),l=function(){return Math.random().toString(36).substring(7).split("").join(".")},d={INIT:"@@redux/INIT"+l(),REPLACE:"@@redux/REPLACE"+l(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+l()}};function c(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(s(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(s(1));return n(c)(e,t)}if("function"!=typeof e)throw new Error(s(2));var r=e,o=t,a=[],l=a,f=!1;function p(){l===a&&(l=a.slice())}function S(){if(f)throw new Error(s(3));return o}function g(e){if("function"!=typeof e)throw new Error(s(4));if(f)throw new Error(s(5));var t=!0;return p(),l.push(e),function(){if(t){if(f)throw new Error(s(6));t=!1,p();var n=l.indexOf(e);l.splice(n,1),a=null}}}function v(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(s(7));if(void 0===e.type)throw new Error(s(8));if(f)throw new Error(s(9));try{f=!0,o=r(o,e)}finally{f=!1}for(var t=a=l,n=0;n<t.length;n++)(0,t[n])();return e}return v({type:d.INIT}),(i={dispatch:v,subscribe:g,getState:S,replaceReducer:function(e){if("function"!=typeof e)throw new Error(s(10));r=e,v({type:d.REPLACE})}})[u]=function(){var e,t=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(s(11));function n(){e.next&&e.next(S())}return n(),{unsubscribe:t(n)}}})[u]=function(){return this},e},i}var f=c;function p(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}var o,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:d.INIT}))throw new Error(s(12));if(void 0===n(void 0,{type:d.PROBE_UNKNOWN_ACTION()}))throw new Error(s(13))}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var i=!1,r={},u=0;u<a.length;u++){var l=a[u],d=n[l],c=e[l],f=d(c,t);if(void 0===f)throw t&&t.type,new Error(s(14));r[l]=f,i=i||f!==c}return(i=i||a.length!==Object.keys(e).length)?r:e}}function S(e,t){return function(){return t(e.apply(this,arguments))}}function g(e,t){if("function"==typeof e)return S(e,t);if("object"!=typeof e||null===e)throw new Error(s(16));var n={};for(var i in e){var r=e[i];"function"==typeof r&&(n[i]=S(r,t))}return n}function v(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),i=function(){throw new Error(s(15))},r={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},o=t.map((function(e){return e(r)}));return i=v.apply(void 0,o)(n.dispatch),a(a({},n),{},{dispatch:i})}}}}
19,4499:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayIncludesPolyfill=void 0,t.ArrayIncludesPolyfill=function(){return{polyfill:function(){Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError(\'"this" is null or not defined\');var n=Object(this),i=n.length>>>0;if(0===i)return!1;var r=0|t,o=Math.max(r>=0?r:i-Math.abs(r),0);function a(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}for(;o<i;){if(a(n[o],e))return!0;o++}return!1}})}}}()},3878:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringEndsWithPolyfill=void 0,t.StringEndsWithPolyfill=function(){return{polyfill:function(){String.prototype.endsWith=function(e,t){if(null==e)return!1;var n=this.length;return null!=t&&(n=Math.min(t,this.length)),this.substring(n-e.length,n)===e}}}}()},4205:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringIncludesPolyfill=void 0,t.StringIncludesPolyfill=function(){return{polyfill:function(){String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}}}}()},829:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringStartsWithPolyfill=void 0,t.StringStartsWithPolyfill=function(){return{polyfill:function(){String.prototype.startsWith=function(e,t){var n=t>0?0|t:0;return this.substring(n,n+e.length)===e}}}}()},8052:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleManager=void 0;var i=n(306),r=n(3336),o=n(5880),a=function(){function e(){}return e.initialize=function(){this.modules||(this.modules={})},e.add=function(e){if(this.initialize(),!e)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no module definition was provided to the API.");if(!e.name)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `name` property was provided to the module definition.");if(!e.module)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `module` property was provided to the module definition.");if(e.dependencies){for(var t=0,n=e.dependencies;t<n.length;t++){var a=n[t];if(!this.has(a))throw new o.PlayerModuleMissingError(e.name,a)}if("function"!=typeof e.module)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION_DEPENDENCY,{name:e.name},"Cannot add the module: modules with dependencies must pass a deferred loading function to the `ModuleDefinition.module` property.")}var s=e.module;"function"==typeof s&&(s=s()),this.modules[e.name]={moduleDefinition:e,module:s},e.hooks&&e.hooks.add&&e.hooks.add(e.module)},e.remove=function(e){var t;if(this.modules){if(!this.modules[e])throw new o.PlayerModuleMissingError(e);var n=this.modules[e].moduleDefinition;(null===(t=n.hooks)||void 0===t?void 0:t.remove)&&n.hooks.remove(n.module),delete this.modules[e]}},e.get=function(e,t){void 0===t&&(t=!0),this.initialize();var n=this.modules[e];if(n&&n.module)return n.module;if(t)throw new o.PlayerModuleMissingError(e)},e.has=function(e){return void 0!==this.get(e,!1)},e.getModuleNames=function(){return Object.getOwnPropertyNames(this.modules)},e.getModuleDefinitions=function(){var e=this;return this.getModuleNames().map((function(t){return e.modules[t]}))},e.callSetupHooks=function(e){this.getModuleDefinitions().filter((function(e){return e.moduleDefinition.hooks&&e.moduleDefinition.hooks.setup})).forEach((function(t){return t.moduleDefinition.hooks.setup(t.module,e)}))},e.callDestroyHooks=function(e){var t=this.getModuleDefinitions().filter((function(e){return e.moduleDefinition.hooks&&e.moduleDefinition.hooks.destroy})).map((function(t){return t.moduleDefinition.hooks.destroy(t.module,e)}));return Promise.all(t).then((function(){}))},e}();t.ModuleManager=a},2756:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleName=void 0,function(e){e.VR="VR",e.XML="XML",e.Smooth="Smooth",e.AdvertisingCore="AdvertisingCore",e.Advert
vendor: 15,565 bytes, line 19
19ising="Advertising",e.AdvertisingIma="Advertising",e.AdvertisingBitmovin="Advertising",e.AdvertisingOmSdk="AdvertisingOmSdk",e.SGAI="SGAI",e.Polyfill="Polyfill",e.Patch="Patch",e.RemoteControl="RemoteControl",e.RendererMse="RendererMSE",e.EngineNative="EngineNative",e.EngineBitmovin="EngineBitmovin",e.ABR="ABR",e.Crypto="Crypto",e.HLS="HLS",e.DRM="DRM",e.DASH="DASH",e.ContainerTS="ContainerTS",e.ContainerMP4="ContainerMP4",e.ContainerWebM="ContainerWebM",e.Subtitles="Subtitles",e.SubtitlesTTML="SubtitlesTTML",e.SubtitlesWebVTT="SubtitlesWebVTT",e.SubtitlesCEA608="SubtitlesCEA608",e.SubtitlesNative="SubtitlesNative",e.Style="Style",e.Thumbnail="Thumbnail",e.ThumbnailImp="Thumbnail",e.UI="UI",e.Tizen="Tizen",e.Webos="webos",e.Vidaa="vidaa",e.Wpe="wpe",e.LowLatency="LowLatency",e.ServiceWorkerClient="ServiceWorkerClient",e.Envivio="Envivio",e.PlayStation5="PlayStation5",e.PlayStation4="PlayStation4",e.EngineWebRtc="EngineWebRtc",e.ReactNative="ReactNative"}(n||(t.ModuleName=n={}))},5880:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModuleMissingError=void 0;var r=n(306),o=function(e){function t(t,n){return n?e.call(this,r.ErrorCode.MODULE_DEPENDENCY_MISSING,{name:t,dependency:n},"The ".concat(t," module requires the ").concat(n," module to be included as well."))||this:e.call(this,r.ErrorCode.MODULE_MISSING,{name:t},"The ".concat(t," module is required to play this stream."))||this}return i(t,e),t}(n(3336).PlayerError);t.PlayerModuleMissingError=o},6790:function(e,t){var n,i,r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.DrmSetupError=t.TransmuxingRejectionReason=t.SegmentVerificationResult=t.APPLE_KEYFORMAT_DELIVERY=t.HlsEncryptionMethods=t.HlsEncryptionMethod=t.SOURCE_BUFFER_APPEND_STATUS=t.RepresentationType=void 0,function(e){e[e.AUDIO=1]="AUDIO",e[e.VIDEO=2]="VIDEO",e[e.SUBTITLE=3]="SUBTITLE"}(n||(t.RepresentationType=n={})),function(e){e[e.FAILURE=0]="FAILURE",e[e.QUOTA_EXCEEDED=1]="QUOTA_EXCEEDED",e[e.SUSPENDED=2]="SUSPENDED"}(i||(t.SOURCE_BUFFER_APPEND_STATUS=i={})),function(e){e.NONE="NONE",e.AES_128="AES-128",e.SAMPLE_AES="SAMPLE-AES",e.SAMPLE_AES_CTR="SAMPLE-AES-CTR"}(r||(t.HlsEncryptionMethod=r={})),t.HlsEncryptionMethods=Object.keys(r).map((function(e){return r[e]})),t.APPLE_KEYFORMAT_DELIVERY="com.apple.streamingkeydelivery",function(e){e.Publish="publish",e.Drop="drop",e.Park="park"}(o||(t.SegmentVerificationResult=o={})),function(e){e.INVALID_TS_SEGMENT="Invalid TS segment, could not extract segment information",e.TRANSMUXING_ABORTED="Transmuxing was aborted as it is no longer needed"}(a||(t.TransmuxingRejectionReason=a={})),function(e){e.CANCELLED="Loading was cancelled for the DRM source",e.MISSING_CONFIGURATION="DRM is not configured"}(s||(t.DrmSetupError=s={}))},3714:function(e,t){var n,i,r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.ContentLocationChangedReason=t.LatencyMode=t.AdInteractionType=t.AdQuartile=t.MetadataType=t.PlayerEvent=void 0,function(e){e.Ready="ready",e.Play="play",e.Playing="playing",e.Paused="paused",e.Seek="seek",e.Seeked="seeked",e.TimeShift="timeshift",e.TimeShifted="timeshifted",e.VolumeChanged="volumechanged",e.Muted="muted",e.Unmuted="unmuted",e.PlayerResized="playerresized",e.PlaybackFinished="playbackfinished",e.Error="error",e.Warning="warning",e.StallStarted="stallstarted",e.StallEnded="stallended",e.AudioChanged="audiochanged",e.AudioAdded="audioadded",e.AudioRemoved="audioremoved",e.VideoQualityChanged="videoqualitychanged",e.AudioQualityChanged="audioqualitychanged",e.VideoDownloadQualityChange="videodownloadqualitychange",e.AudioDownloadQualityChange="audiodownloadqualitychange",e.VideoDownloadQualityChanged="videodownloadqualitychanged",e.AudioDownloadQualityChanged="audiodownloadqualitychanged",e.VideoPlaybackQualityChanged="videoplaybackqualitychanged",e.AudioPlaybackQualityChanged="audioplaybackqualitychanged",e.TimeChanged="timechanged",e.CueParsed="cueparsed",e.CueEnter="cueenter",e.CueUpdate="cueupdate",e.CueExit="cueexit",e.SegmentPlayback="segmentplayback",e.Metadata="metadata",e.MetadataParsed="metadataparsed",e.MetadataChanged="metadatachanged",e.VideoAdaptation="videoadaptation",e.AudioAdaptation="audioadaptation",e.DownloadFinished="downloadfinished",e.SegmentRequestFinished="segmentrequestfinished",e.AdManifestLoaded="admanifestloaded",e.AdStarted="adstarted",e.OverlayAdStarted="overlayadstarted",e.AdQuartile="adquartile",e.AdSkipped="adskipped",e.AdClicked="adclicked",e.AdInteraction="adinteraction",e.AdLinearityChanged="adlinearitychanged",e.AdBreakStarted="adbreakstarted",e.AdBreakFinished="adbreakfinished",e.RestoringContent="restoringcontent",e.AdFinished="adfinished",e.AdError="aderror",e.VRViewingDirectionChange="vrviewingdirectionchange",e.VRViewingDirectionChanged="vrviewingdirectionchanged",e.VRStereoChanged="vrstereochanged",e.CastAvailable="castavailable",e.CastStopped="caststopped",e.CastStart="caststart",e.CastStarted="caststarted",e.CastWaitingForDevice="castwaitingfordevice",e.SourceLoaded="sourceloaded",e.SourceUnloaded="sourceunloaded",e.PeriodSwitch="periodswitch",e.PeriodSwitched="periodswitched",e.DVRWindowExceeded="dvrwindowexceeded",e.SubtitleAdded="subtitleadded",e.SubtitleRemoved="subtitleremoved",e.ShowAirplayTargetPicker="showairplaytargetpicker",e.AirplayAvailable="airplayavailable",e.AirplayChanged="airplaychanged",e.Destroy="destroy",e.PlaybackSpeedChanged="playbackspeedchanged",e.DurationChanged="durationchanged",e.ViewModeChanged="viewmodechanged",e.ModuleReady="moduleready",e.SubtitleEnable="subtitleenable",e.SubtitleEnabled="subtitleenabled",e.SubtitleDisable="subtitledisable",e.SubtitleDisabled="subtitledisabled",e.VideoQualityAdded="videoqualityadded",e.VideoQualityRemoved="videoqualityremoved",e.AudioQualityAdded="audioqualityadded",e.AudioQualityRemoved="audioqualityremoved",e.TargetLatencyChanged="targetlatencychanged",e.LatencyModeChanged="latencymodechanged",e.LicenseValidated="licensevalidated",e.DrmLicenseAdded="drmlicenseadded",e.AspectRatioChanged="aspectratiochanged",e.VisibilityChanged="visibilitychanged",e.ContentLocationChanged="contentlocationchanged"}(n||(t.PlayerEvent=n={})),function(e){e.CUETAG="CUETAG",e.DATERANGE="DATERANGE",e.EVENT_STREAM="EVENT-STREAM",e.CUSTOM="CUSTOM",e.SCTE="SCTE",e.ID3="ID3",e.EMSG="EMSG",e.CAST="CAST"}(i||(t.MetadataType=i={})),function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(r||(t.AdQuartile=r={})),function(e){e.Vpaid="vpaid"}(o||(t.AdInteractionType=o={})),function(e){e.Idle="idle",e.Catchup="catchup",e.Fallback="fallback",e.Suspended="suspended"}(a||(t.LatencyMode=a={})),function(e){e.Failover="failover",e.ContentSteering="contentsteering"}(s||(t.ContentLocationChangedReason=s={}))},4468:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TimeMode=t.SupportedTechnologyMode=t.ViewMode=t.PlayerAPINotAvailableError=t.LogLevel=t.BufferType=t.MediaType=t.StreamType=t.PlayerType=void 0;var r=n(306),o=n(3336),a=n(2886);Object.defineProperty(t,"PlayerType",{enumerable:!0,get:function(){return a.PlayerType}});var s,u,l,d=n(5623);Object.defineProperty(t,"StreamType",{enumerable:!0,get:function(){return d.StreamType}}),function(e){e.Audio="audio",e.Video="video",e.Subtitles="subtitles",e.Thumbnails="thumbnails"}(s||(t.MediaType=s={})),function(e){e.ForwardDuration="forwardduration",e.BackwardDuration="backwardduration"}(u||(t.BufferType=u={})),function(e){e.DEBUG="debug",e.LOG="log",e.WARN="warn",e.ERROR="error",e.OFF="off"}(l||(t.LogLevel=l={}));var c,f,p,S=function(e){function t(t){return e.call(this,r.ErrorCode.API_NOT_AVAILABLE,void 0,"Cannot use the `player.".concat(t,"` API: the player has already been destroyed."))||this}return i(t,e),t}(o.PlayerError);t.PlayerAPINotAvailableError=S,function(e){e.Inline="inline",e.Fullscreen="fullscreen",e.PictureInPicture="pictureinpicture"}(c||(t.ViewMode=c={})),function(e){e.Platform="platform",e.Modules="modules",e.PlatformAndModules="platformandmodules"}(f||(t.SupportedTechnologyMode=f={})),function(e){e.RelativeTime="relativetime",e.AbsoluteTime="absolutetime"}(p||(t.TimeMode=p={}))},2886:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerType=void 0,function(e){e.Html5="html5",e.Native="native",e.WebRtc="webrtc",e.Unknown="unknown"}(n||(t.PlayerType=n={}))},5623:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamType=void 0,function(e){e.Progressive="progressive",e.Dash="dash",e.Hls="hls",e.Smooth="smooth",e.Whep="whep",e.Unknown="unknown"}(n||(t.StreamType=n={}))},649:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.kebabCaseToCamelCase=function(e){return e.split("-").map((function(e,t){return 0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()})).join("")},t.forceReallocation=function(e){return e?(0,i.isFirefox)()?JSON.parse(JSON.stringify(e)):(" "+e).slice(1):""};var i=n(5487)},4685:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e},t.isContextAvailable=function(e){return void 0!==e&&!e.isDisposed}},306:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0,function(e){e[e.UNKNOWN=1e3]="UNKNOWN",e[e.API_NOT_AVAILABLE=1001]="API_NOT_AVAILABLE",e[e.SETUP_ERROR=1100]="SETUP_ERROR",e[e.SETUP_NO_HTML_ELEMENT=1101]="SETUP_NO_HTML_ELEMENT",e[e.SETUP_MISSING_CONFIGURATION=1102]="SETUP_MISSING_CONFIGURATION",e[e.SETUP_LICENSE_ERROR=1103]="SETUP_LICENSE_ERROR",e[e.SETUP_MISSING_DOMAIN_LICENSE_WHITELIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_WHITELIST",e[e.SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST",e[e.SETUP_MISSING_LICENSE_WHITELIST=1105]="SETUP_MISSING_LICENSE_WHITELIST",e[e.SETUP_MISSING_LICENSE_ALLOWLIST=1105]="SETUP_MISSING_LICENSE_ALLOWLIST",e[e.SETUP_INVALID_LICENSE_SERVER=1106]="SETUP_INVALID_LICENSE_SERVER",e[e.SETUP_INVALID_IMPRESSION_SERVER=1107]="SETUP_INVALID_IMPRESSION_SERVER",e[e.SETUP_NO_RENDERING_ENGINE=1108]="SETUP_NO_RENDERING_ENGINE",e[e.SETUP_UNSUPPORTED_PROTOCOL=1113]="SETUP_UNSUPPORTED_PROTOCOL",e[e.SOURCE_ERROR=1200]="SOURCE_ERROR",e[e.SOURCE_INVALID=1201]="SOURCE_INVALID",e[e.SOURCE_MANIFEST_INVALID=1202]="SOURCE_MANIFEST_INVALID",e[e.SOURCE_NO_SUPPORTED_TECHNOLOGY=1203]="SOURCE_NO_SUPPORTED_TECHNOLOGY",e[e.SOURCE_STREAM_TYPE_NOT_SUPPORTED=1204]="SOURCE_STREAM_TYPE_NOT_SUPPORTED",e[e.SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED=1205]="SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED",e[e.SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY=1206]="SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY",e[e.SOURCE_EMPTY_SEGMENT=1207]="SOURCE_EMPTY_SEGMENT",e[e.SOURCE_COULD_NOT_LOAD_MANIFEST=1208]="SOURCE_COULD_NOT_LOAD_MANIFEST",e[e.SOURCE_PROGRESSIVE_STREAM_ERROR=1209]="SOURCE_PROGRESSIVE_STREAM_ERROR",e[e.SOURCE_HLS_STREAM_ERROR=1210]="SOURCE_HLS_STREAM_ERROR",e[e.SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED=1211]="SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED",e[e.SOURCE_INVALID_H264_CODEC=7043]="SOURCE_INVALID_H264_CODEC",e[e.PLAYBACK_ERROR=1300]="PLAYBACK_ERROR",e[e.PLAYBACK_VIDEO_DECODING_ERROR=1301]="PLAYBACK_VIDEO_DECODING_ERROR",e[e.PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER=1304]="PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER",e[e.NETWORK_ERROR=1400]="NETWORK_ERROR",e[e.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT=1401]="NETWORK_MANIFEST_DOWNLOAD_TIMEOUT",e[e.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT=1402]="NETWORK_SEGMENT_DOWNLOAD_TIMEOUT",e[e.NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT=1403]="NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT",e[e.NETWORK_FAILED_CERTIFICATE_REQUEST=1404]="NETWORK_FAILED_CERTIFICATE_REQUEST",e[e.DRM_ERROR=2e3]="DRM_ERROR",e[e.DRM_MISSING_CONFIGURATION=2001]="DRM_MISSING_CONFIGURATION",e[e.DRM_NO_LICENSE_SERVER_URL_PROVIDED=2002]="DRM_NO_LICENSE_SERVER_URL_PROVIDED",e[e.DRM_FAILED_LICENSE_REQUEST=2003]="DRM_FAILED_LICENSE_REQUEST",e[e.DRM_KEY_SIZE_NOT_SUPPORTED=2005]="DRM_KEY_SIZE_NOT_SUPPORTED",e[e.DRM_NO_KEY_SYSTEM=2006]="DRM_NO_KEY_SYSTEM",e[e.DRM_KEY_SESSION_INITIALIZATION_FAILED=2007]="DRM_KEY_SESSION_INITIALIZATION_FAILED",e[e.DRM_MEDIA_KEY_INITIALIZATION_FAILED=2008]="DRM_MEDIA_KEY_INITIALIZATION_FAILED",e[e.DRM_KEY_ERROR=2009]="DRM_KEY_ERROR",e[e.DRM_KEY_SYSTEM_NOT_SUPPORTED=2010]="DRM_KEY_SYSTEM_NOT_SUPPORTED",e[e.DRM_CERTIFICATE_ERROR=2011]="DRM_CERTIFICATE_ERROR",e[e.DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR=2012]="DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR",e[e.DRM_RESTRICTED_OUTPUT=2013]="DRM_RESTRICTED_OUTPUT",e[e.DRM_INIT_DATA_MISSING=2015]="DRM_INIT_DATA_MISSING",e[e.VR_ERROR=2100]="VR_ERROR",e[e.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY=2101]="VR_INCOMPATIBLE_PLAYER_TECHNOLOGY",e[e.MODULE_ERROR=3e3]="MODULE_ERROR",e[e.MODULE_INVALID_DEFINITION=3001]="MODULE_INVALID_DEFINITION",e[e.MODULE_INVALID_DEFINITION_DEPENDENCY=3002]="MODULE_INVALID_DEFINITION_DEPENDENCY",e[e.MODULE_MISSING=3003]="MODULE_MISSING",e[e.MODULE_DEPENDENCY_MISSING=3004]="MODULE_DEPENDENCY_MISSING",e[e.MODULE_REMOVED=3005]="MODULE_REMOVED",e[e.MODULE_ADVERTISING_ERROR=3100]="MODULE_ADVERTISING_ERROR",e[e.SEGMENT_PSSH_DATA_MISSING=4e3]="SEGMENT_PSSH_DATA_MISSING"}(n||(t.ErrorCode=n={}))},3336:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerError=void 0;var i=n(306),r=function(){return function(e,t,n,r){this.code=e,this.name=i.ErrorCode[e],this.sourceIdentifier=r,this.message=null!=n?n:"".concat(this.name),this.data=t,"captureStackTrace"in Error&&"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(this.message).stack}}();t.PlayerError=r},813:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceName=void 0,function(e){e.AdaptationService="AdaptationService",e.DrmDetectorService="DrmDetectorService",e.DrmService="DrmService",e.HeartbeatService="HeartbeatService",e.LiveLatencyService="LiveLatencyService",e.ManifestCachingService="ManifestCachingService",e.ManifestLoadingService="ManifestLoadingService",e.ManifestService="ManifestService",e.ManifestUpdateSchedulingService="ManifestUpdateSchedulingService",e.MetadataParsedService="MetadataParsedService",e.NativeManifestService="NativeManifestService",e.PlayerStateService="PlayerStateService",e.RecoveryService="RecoveryService",e.SegmentService="SegmentService",e.SourceStoreService="SourceStoreService",e.StallTimeTrackerService="StallTimeTrackerService",e.StartOffsetService="StartOffsetService",e.StreamTimeService="StreamTimeService",e.SubtitleService="SubtitleService",e.SynchronizedTimeService="SynchronizedTimeService",e.ThumbnailService="Thumbn
19ailService",e.TimedMetadataService="TimedMetadataService",e.SgaiService="SgaiService"}(n||(t.ServiceName=n={}))},5625:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestMimeType=void 0,function(e){e.Dash="application/dash+xml",e.Hls="application/x-mpegurl",e.Smooth="application/vnd.ms-sstr+xml"}(n||(t.ManifestMimeType=n={}))},5267:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createAction=function(e,t){return{type:e,meta:{},payload:t}}},8774:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.devToolsExtension=void 0;var i=n(4081);t.devToolsExtension=i.default.__REDUX_DEVTOOLS_EXTENSION__},9541:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ReducerTree=void 0,t.isReducer=o,t.isReducerTree=function(e){return Boolean(e)&&e instanceof r};var i=n(1829),r=function(){function e(){this.wb={}}return e.prototype.has=function(e){return Boolean(this.wb[e])},e.prototype.set=function(e,t){return this.wb[e]=t,this},e.prototype.get=function(e){return this.wb[e]},e.prototype.delete=function(e){delete this.wb[e]},e.prototype.keys=function(){return Object.keys(this.wb)},e.prototype.xb=function(e){var t=this,n={};return this.keys().forEach((function(i){var r=t.get(i),a=e.concat(String(i));n[i]=o(r)?r:r.xb(a)})),0===Object.keys(n).length?function(e){return{}}:(0,i.combineReducers)(n)},e.prototype.buildReducer=function(){return this.xb([])},e}();function o(e){return Boolean(e)&&"function"==typeof e}t.ReducerTree=r},1674:function(e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.addStoreServiceDecoration=void 0,t.addStoreServiceDecoration=function(e){return function(t){return function(){var i=function(){return e.buildReducer()},r=t(i()),o=function(){return r.replaceReducer(i())};return o(),n(n({},r),{addReducer:function(t,n){e.set(t,n),o()},getReducer:function(t){return e.get(t)},removeReducer:function(t){e.delete(t),o()},hasReducer:function(t){return e.has(t)}})}}}},1513:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c,t.getCapabilities=function(){return function(e){return e.capabilities}(c().getState())},t.getReachableDomains=function(){return function(e){return e.reachableDomains}(c().getState())};var i,r=n(1829),o=n(4638),a=(n(8774),n(1683),n(430)),s=n(9541),u=n(1674),l=new s.ReducerTree;l.set("capabilities",o.CapabilityReducer).set("reachableDomains",a.ReachableDomainsReducer);var d=function(){var e=[(0,u.addStoreServiceDecoration)(l)];return(0,r.createStore)((function(){return{}}),r.compose.apply(void 0,e))};function c(){return i||(i=d()),i}},4638:function(e,t,n){var i,r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CapabilityReducer=void 0;var o=n(3793),a=n(7387);t.CapabilityReducer=(0,o.default)({},((i={})[a.CapabilityActionType.InitCapabilities]=function(e,t){return function(e){return e}(t.payload)},i[a.CapabilityActionType.SetCapability]=function(e,t){return function(e,t){var n,i=t.key,o=t.value;return r(r({},e),((n={})[i]=o,n))}(e,t.payload)},i))},7387:function(e,t){var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.CapabilityKey=t.CapabilityActionType=void 0,function(e){e.InitCapabilities="initcapabilities",e.SetCapability="setcapability"}(n||(t.CapabilityActionType=n={})),function(e){e.isPlayStation5="isPlayStation5",e.isPlayStation4="isPlayStation4",e.isMobile="isMobile",e.isTizen="isTizen",e.isSafari="isSafari",e.isChrome="isChrome",e.isChromium="isChromium",e.isFirefox="isFirefox",e.isFirefoxIOS="isFirefoxIOS",e.isWebOS="isWebOS",e.isVidaa="isVidaa",e.isVizio="isVizio",e.isIOS="isIOS",e.isSafariIOS="isSafariIOS",e.isEdge="isEdge",e.isLegacyEdge="isLegacyEdge",e.isEdgeChromium="isEdgeChromium",e.isReactNative="isReactNative",e.isWpeWebKit="isWpeWebKit",e.MSESafari="MSESafari",e.isLocalStorageAvailable="isLocalStorageAvailable",e.isInlinePlaybackRestricted="isInlinePlaybackRestricted",e.IOSVersion="IOSVersion",e.edgeVersion="edgeVersion",e.safariVersion="safariVersion",e.webOSChromiumVersion="webOSChromiumVersion",e.techSupportedByModules="techSupportedByModules",e.techSupportedByPlatform="techSupportedByPlatform",e.techSupportedByModulesOnPlatform="techSupportedByModulesOnPlatform"}(i||(t.CapabilityKey=i={}))},3793:function(e,t){var n;
vendor: 18,301 bytes, line 19
19Object.defineProperty(t,"__esModule",{value:!0}),t.StaticActionTypes=void 0,function(e){e.Default="default"}(n||(t.StaticActionTypes=n={})),t.default=function(e,t){return function(i,r){return void 0===i&&(i=e),t[r.type]?t[r.type](i,r):t[n.Default]?t[n.Default](i,r):i}}},5971:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceStore=o,t.getSourceState=function(e,t){var n;return void 0===t&&(t=e.sourceContext),null===(n=o(e,t))||void 0===n?void 0:n.getState()};var i=n(813),r=n(4685);function o(e,t){var n;return void 0===t&&(t=e.sourceContext),(0,r.isContextAvailable)(e)?null===(n=e.serviceManager)||void 0===n?void 0:n.get(i.ServiceName.SourceStoreService,null==t?void 0:t.sourceIdentifier):void 0}},12:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initialStartOptions=void 0,t.initializeStartTimeOffset=function(){return o(t.initialStartOptions.startTimeOffset)},t.setStartTimeOffset=o;var i=n(5267),r=n(5934);function o(e){return(0,i.createAction)(r.StartOptionsActionKey.SetStartTimeOffset,{startTimeOffset:e})}t.initialStartOptions={startTimeOffset:0}},7179:function(e,t,n){var i,r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.StartOptionsReducer=void 0,t.getStartTimeOffset=function(e){return e.startOptions.startTimeOffset};var o=n(3793),a=n(12),s=n(5934),u=a.initialStartOptions,l=function(e,t){var n=t.payload;return r(r({},e),n)};t.StartOptionsReducer=(0,o.default)(u,((i={})[s.StartOptionsActionKey.InitStartTimeOffset]=l,i[s.StartOptionsActionKey.SetStartTimeOffset]=l,i))},5934:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StartOptionsActionKey=void 0,function(e){e.InitStartTimeOffset="@instance/sources/@source/startOptions/initStartTimeOffset",e.SetStartTimeOffset="@instance/sources/@source/startOptions/setStartTimeOffset"}(n||(t.StartOptionsActionKey=n={}))},1683:function(e,t){function n(e){Object.freeze(e);var t="function"==typeof e,i=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(e).forEach((function(r){!i.call(e,r)||t&&("caller"===r||"callee"===r||"arguments"===r)||null===e[r]||"object"!=typeof e[r]&&"function"!=typeof e[r]||Object.isFrozen(e[r])||n(e[r])})),e}Object.defineProperty(t,"__esModule",{value:!0}),t.freeze=void 0,t.deepFreeze=n;var i=function(e){var t=e.getState();(function(e){return null!==e&&"object"==typeof e})(t)&&n(t)};t.freeze=function(e){return i(e),function(t){return function(n){i(e);try{return t(n)}finally{i(e)}}}}},430:function(e,t,n){var i,r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ReachableDomainsReducer=void 0;var a=n(3793),s=n(2027);t.ReachableDomainsReducer=(0,a.default)({domains:[]},((i={})[s.ReachableDomainsActionType.AddDomain]=function(e,t){return function(e,t){return r(r({},e),{domains:e.domains.includes(t)?e.domains:o(o([],e.domains,!0),[t],!1)})}(e,t.payload)},i))},2027:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReachableDomainsActionType=void 0,function(e){e.AddDomain="adddomain"}(n||(t.ReachableDomainsActionType=n={}))},4853:function(e,t,n){var i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayHelper=void 0,t.invert=function(e){return function(t,n,i){return!e(t,n,i)}},t.findIndexFromEnd=a,t.findIndexWithin=function(e,t,n,i){for(var r=t;r<n;r++)if(i(e[r]))return r;return-1},t.findFromEnd=function(e,t){return e[a(e,t)]},t.forEachFromIndex=function(e,t,n){for(;t<e.length;t++)n(e[t-1],e[t])},t.forceArray=function(e){return Array.isArray(e)?e:[e]},t.contains=function(e,t,n){return void 0===n&&(n=s),null!=e.find((function(e){return n(t,e)}))},t.shallowObjectMatcher=s,t.clearArray=function(e){e.splice(0,e.length)},t.removeEntriesFromStart=function(e,t){return t<1?[]:e.splice(0,t)};var r=n(233),o=function(){function e(){}return e.comparePrimitiveArrays=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},e.stringToArrayWithoutEncoding=function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},e.convertBufferSourceToUTF8=function(t,n){return void 0===n&&(n="utf-8"),t instanceof ArrayBuffer?t=new Uint8Array(t):t instanceof DataView&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),e.convertUint8ArrayToUtf8(t,n)},e.convertUint8ArrayToUtf8=function(e,t){if("undefined"!=typeof TextDecoder)return new TextDecoder(t).decode(e);for(var n=0,i="";n<e.length;){var r=e[n++];if(r>127)if(r>191&&r<224){if(n>=e.length||64&e[n]){i+="�";continue}r=(31&r)<<6|63&e[n++]}else if(r>223&&r<240){if(n+1>=e.length||64&e[n]||64&e[n+1]){i+="�";continue}r=(15&r)<<12|(63&e[n++])<<6|63&e[n++]}else{if(!(r>239&&r<248)){i+="�";continue}if(n+2>=e.length||64&e[n]||64&e[n+1]||64&e[n+2]){i+="�";continue}r=(7&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++]}r<=65535?i+=String.fromCharCode(r):r<=1114111?(r-=65536,i+=String.fromCharCode(r>>10|55296),i+=String.fromCharCode(1023&r|56320)):i+="�"}return i},e.sort=function(e,t,n){if("string"==typeof t&&"[object Array]"===Object.prototype.toString.call(e)){var i;if(n||(n="asc"),"asc"===n)i=-1;else{if("desc"!==n)return;i=1}return e.length<2?e:e.sort((function(e,n){return e[t]<n[t]?i:e[t]>n[t]?-1*i:0}))}},e.append=function(t,n){var i=e.getTypedArrayType(t),r=e.getTypedArrayType(n);if(!i&&!r||i!==r)return null;var o=new i((t.byteLength+n.byteLength)/i.BYTES_PER_ELEMENT);return o.set(new i(t),0),o.set(new i(n),t.byteLength/i.BYTES_PER_ELEMENT),o},e.concatBuffers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!(e=e.filter((function(e){return e}))).length)return null;var n=e.reduce((function(e,t){return e+t.byteLength}),0),i=new Uint8Array(n);return e.reduce((function(e,t){return i.set(new Uint8Array(t),e),e+t.byteLength}),0),i.buffer},e.getTypedArrayType=function(e){return e instanceof Uint8Array?Uint8Array:e instanceof Uint16Array?Uint16Array:e instanceof Uint32Array?Uint32Array:null},e.getArray=function(t){return e.getTypedArrayType(t)?[].slice.call(t):Array.isArray(t)?t:null},e.union=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[];return e.filter((function(e){return Boolean(e)})).forEach((function(e){return e.forEach((function(e){n.includes(e)||n.push(e)}))})),n},e.isArrayBuffer=function(e){return Boolean(e)&&e instanceof ArrayBuffer&&void 0!==e.byteLength},e.arrayBufferToAsciiString=function(t,n){return void 0===n&&(n=!0),e.sparseArrayBufferToAsciiString(t,1,0,n)},e.arrayBufferToBase64=function(e){for(var t="",n=new Uint8Array(e),i=0;i<n.length;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)},e.sparseArrayBufferToAsciiString=function(e,t,n,i){void 0===t&&(t=2),void 0===n&&(n=0),void 0===i&&(i=!0);for(var r="",o=i?new Uint8Array(e):new Uint16Array(e),a=n;a<o.length;a+=t)r+=String.fromCharCode(o[a]);return r},e.intersect=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=[],r=t.filter((function(e){return Boolean(e)}));return e.union.apply(e,t).forEach((function(e){r.every((function(t){return t.includes(e)}))&&i.push(e)})),i},e.addAndMergeIntersects=function(t,n){var r=t.filter((function(t){return e.intersect(t,n).length>0})),o=t.filter((function(e){return!r.includes(e)}));return 0===r.length?i(i([],t,!0),[n],!1):i([e.union.apply(e,i(i([],r,!1),[n],!1))],o,!0)},e.extractAsciiString=function(e,t,n){for(var i=t+n,r="";t<i;t++)r+=String.fromCharCode(e.getUint8(t));return r},e.extractHexString=function(e,t,n){for(var i=t+n,o="";t<i;t++)o+=r.FormatHelper.intToHex(e.getUint8(t));return o},e.insertInSortedArray=function(e,t,n){var i=e.findIndex(n);return i<0?e.push(t):e.splice(i,0,t),e},e.removeUntilInSortedArray=function(e,t){var n=e.findIndex(t),i=-1===n?e.length:n;return 0===i?[]:e.splice(0,i)},e.toArray=function(e){try{if(!e||!e.length)return[];for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e[n];return t}catch(e){return[]}},e}();function a(e,t){var n;for(n=e.length-1;n>=0&&!t(e[n]);n--);return n}function s(e,t){return Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every((function(n){return e[n]===t[n]}))}t.ArrayHelper=o},7993:function(e,t,n){var i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MSESafari=t.getBestTech=t.getTechSupportedByModules=t.getTechSupportedByPlatform=t.getTechSupportedByModulesOnPlatform=t.isLocalStorageAvailable=t.isInlinePlaybackRestricted=t.isFairPlayDrmSupported=t.supports=t.checkPlatformSupports=t.hasMediaSourceSupport=t.FairplayKeySystems=void 0,t.isUsingFileProtocol=function(){return"file:"===l.default.location.protocol},t.isFetchSupported=function(){return"function"==typeof l.default.fetch&&"function"==typeof l.default.AbortController};var r,o=n(8052),a=n(2756),s=n(4468),u=n(1513),l=n(4081),d=n(5434),c=n(5487);!function(e){e.FPS_1="com.apple.fps.1_0",e.FPS_2="com.apple.fps.2_0"}(r||(t.FairplayKeySystems=r={}));var f=[{player:s.PlayerType.Html5,streaming:s.StreamType.Dash},{player:s.PlayerType.Html5,streaming:s.StreamType.Hls},{player:s.PlayerType.Html5,streaming:s.StreamType.Smooth},{player:s.PlayerType.WebRtc,streaming:s.StreamType.Whep},{player:s.PlayerType.Native,streaming:s.StreamType.Hls},{player:s.PlayerType.Native,streaming:s.StreamType.Progressive}],p=Boolean(l.default.ArrayBuffer&&l.default.Uint8Array&&l.default.Uint16Array);t.hasMediaSourceSupport=function(){var e,t,n,i="MediaSource"in l.default&&"function"==typeof(null===(e=l.default.MediaSource)||void 0===e?void 0:e.isTypeSupported),r="WebKitMediaSource"in l.default&&"function"==typeof(null===(t=l.default.WebKitMediaSource)||void 0===t?void 0:t.isTypeSupported),o="ManagedMediaSource"in l.default&&"function"==typeof(null===(n=l.default.ManagedMediaSource)||void 0===n?void 0:n.isTypeSupported);return i||r||o};t.checkPlatformSupports=function(){var e=[];if(p?e=f.filter((function(e){return(0,t.supports)(e.player,e.streaming)})):e.push({player:s.PlayerType.Native,streaming:s.StreamType.Progressive}),(0,c.isSafari)())for(var n=1;n<e.length;n++)if(e[n].player===s.PlayerType.Native&&e[n].streaming===s.StreamType.Hls){e=e.splice(n,1).concat(e);break}return e},t.supports=function(e,n){var i=(0,t.hasMediaSourceSupport)()?[s.StreamType.Dash,s.StreamType.Hls,s.StreamType.Smooth]:[],r=function(){var e=l.default.RTCPeerConnection,t=Boolean(e)&&"function"==typeof e.prototype.addTransceiver;return function(){var e,t,n,i,r;return Boolean(null!==(r=null!==(i=null!==(n=null!==(t=null===(e=navigator.mediaDevices)||void 0===e?void 0:e.getUserMedia)&&void 0!==t?t:navigator.getUserMedia)&&void 0!==n?n:navigator.webkitGetUserMedia)&&void 0!==i?i:navigator.mozGetUserMedia)&&void 0!==r?r:navigator.msGetUserMedia)}()&&t}()?[s.StreamType.Whep]:[],o=function(e){return e.some((function(e){return e===n}))};switch(e){case s.PlayerType.Html5:return o(i);case s.PlayerType.WebRtc:return o(r);case s.PlayerType.Native:return o(function(){var e=[];return function(){var e=document.createElement("video");return e&&"function"==typeof e.canPlayType&&("maybe"===e.canPlayType("application/vnd.apple.mpegURL")||"maybe"===e.canPlayType("application/x-mpegURL")||"maybe"===e.canPlayType("audio/mpegurl")||"maybe"===e.canPlayType("audio/x-mpegurl"))}()&&!(0,c.isEdge)()&&e.push(s.StreamType.Hls),function(){return"function"==typeof document.createElement("video").canPlayType}()&&e.push(s.StreamType.Progressive),e}());default:return!1}},t.isFairPlayDrmSupported=function(){return Object.values(r).some((function(e){var t;return null===(t=l.default.WebKitMediaKeys)||void 0===t?void 0:t.isTypeSupported(e,d.MimeType.VideoMp4)}))},t.isInlinePlaybackRestricted=function(){var e=(0,c.getIOSVersion)(),t=e<c.IOS_9&&/iPad/i.test(navigator.userAgent),n=e<c.IOS_10&&/iP(hone|od)/i.test(navigator.userAgent);return c.isSafariIOS&&(t||n)},t.isLocalStorageAvailable=function(){try{return l.default.localStorage&&"function"==typeof localStorage.getItem&&"function"==typeof localStorage.setItem}catch(e){return!1}},t.getTechSupportedByModulesOnPlatform=function(){var e=(0,t.getTechSupportedByModules)();return(0,t.getTechSupportedByPlatform)().filter((function(t){return e.filter((function(e){return function(e,t){return e.player===t.player&&e.streaming===t.streaming}(e,t)})).length>0}))},t.getTechSupportedByPlatform=function(){return(0,t.checkPlatformSupports)()},t.getTechSupportedByModules=function(){var e=o.ModuleManager.has(a.ModuleName.EngineBitmovin)?o.ModuleManager.get(a.ModuleName.EngineBitmovin).technologyChecker.getSupportedTechnologies():[],t=o.ModuleManager.has(a.ModuleName.EngineNative)?o.ModuleManager.get(a.ModuleName.EngineNative).technologyChecker.getSupportedTechnologies():[],n=o.ModuleManager.has(a.ModuleName.EngineWebRtc)?o.ModuleManager.get(a.ModuleName.EngineWebRtc).technologyChecker.getSupportedTechnologies():[];return i(i(i([],e,!0),t,!0),n,!0)},t.getBestTech=function(e,t,n){void 0===e&&(e=[]),void 0===t&&(t={});var r=(0,u.getCapabilities)(),o=function(e){var t=(0,u.getCapabilities)(),n=i([],t.techSupportedByPlatform,!0);if(!e||0===e.length)return n;var r=e.filter((function(e){return n.some((function(t,i){var r,o=e.player===t.player&&e.streaming===t.streaming,a=null!==(r=e.exclude)&&void 0!==r&&r;return o&&n.splice(i,1),o&&!a}))})).map((function(e){return{player:e.player,streaming:e.streaming}}));return i(i([],r,!0),n,!0)}(e),a=r.techSupportedByPlatform;return n&&(o=a.filter((function(e){return e.player===n.player&&e.streaming===n.streaming}))),(t.vr&&((0,c.isSafariIOS)()||(0,c.isSafari)())?o.filter((function(e){var t=e.streaming===s.StreamType.Progressive&&e.player===s.PlayerType.Native,n=e.streaming===s.StreamType.Hls&&e.player===s.PlayerType.Native;return t||n&&(!(0,c.isSafariIOS)()||(0,c.getIOSVersion)()>c.IOS_9)})):o).find((function(e){return Boolean(t[e.streaming])}))},t.MSESafari=function(){return(0,c.isSafari)()&&(0,t.hasMediaSourceSupport)()}},2424:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DurationConverter=void 0;var n=function(){function e(){}return e.getDurationInSec=function(e){if("string"!=typeof e)return NaN;var t=/^([-])?P(([\\d.]*)Y)?(([\\d.]*)M)?(([\\d.]*)D)?(T)?(([\\d.]*)H)?(([\\d.]*)M)?(([\\d.]*|Infinity)S)?/.exec(e);if(t){var n=Boolean(t[1]),i=12*parseFloat(t[2]||"0")*30*24*60*60,r=30*parseFloat(t[4]||"0")*24*60*60,o=24*parseFloat(t[6]||"0")*60*60,a=60*parseFloat(t[9]||"0")*60,s=60*parseFloat(t[11]||"0"),u=parseFloat(t[13]||"0");if("T"===t[8]&&void 0===(t[9]||t[11]||t[13]))return NaN;var l=i+r+o+a+s+u;return n&&(l=-l),l}return NaN},e}();t.DurationConverter=n},233:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FormatHelper=void 0;var n=function(){function e(){}return e.hexToBytes=function(e){var t=e.length;1&t&&(e="0"+e,t++);for(var n=new Uint8Array(t>>1),i=0;i<t;i+=2)n[i>>1]=parseInt(e.substring(i,i+2),16);return n},e.bytesToHex=function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));for(var t="",n=0;n<e.byteLength;n++){var i=(255&e[n]).toString(16);i.length<2&&(t+="0"),t+=i}return t},e.bytesToUUID=function(e){return this.beautifyUUID(this.bytesToHex(e))},e.beautifyUUID=function(e){return e.slice(0,8)+"-"+e.slice(8,12)+"-"+e.slice(12,16)+"-"+e.slice(16,20)+"-"+e.slice(20)},e.intToHex=function(e){return("00"+e.toString(16)).slice(-2)},e.base64UrlEncode=function(e){return window.btoa(e).replace(/\\+/g,"-").replace(/\\//g,"_").replace(/=/g,"")},e.base64UrlDecode=function(e){return window.atob((e+"===".slice((e.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/"))},e}();t.FormatHelper=n},6599:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n=function(){return function(e,t){this.runsInWebWorker=e,this.postMessageFunction=t}}();t.MessageHandler=n},5434:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MimeTypeHelper=t.MimeType=void 0,t.isMediaTypeContained=function(e,t){return Object.keys(e).map((function(e){return a.getMediaType(e)})).includes(a.getMediaType(t))};var i,r=n(5625),o=n(4468);!function(e){e.VideoMp4="video/mp4",e.VideoTs="video/mp2t",e.AudioMp4="audio/mp4",e.AudioTs="audio/mp2t"}(i||(t.MimeType=i={}));var a=function(){function e(){}return e.isSubtitle=function(e){return this.isApplication(e)||this.isText(e)},e.isText=function(e){return e.toLowerCase().includes("text")},e.isTtmlXml=function(e){return e.toLowerCase().includes("ttml+xml")},e.isApplication=function(e){return e.toLowerCase().includes("application")},e.isAV=function(e){return this.isVideo(e)||this.isAudio(e)},e.isVideo=function(e){return e.toLowerCase().includes("video")},e.isUnknown=function(e){return e.toLowerCase().includes("unknown")},e.isAudio=function(e){return e.toLowerCase().includes("audio")},e.isImage=function(e){return e.toLowerCase().includes("image")},e.isDash=function(e){return e.toLowerCase().includes(r.ManifestMimeType.Dash)},e.isHls=function(e){var t=e.toLowerCase();return t.includes(r.ManifestMimeType.Hls)||t.includes("vnd.apple.mpegurl")},e.isMP4=function(e){return e.toLowerCase().includes("mp4")},e.getMediaType=function(e){return this.isVideo(e)?o.MediaType.Video:this.isAudio(e)?o.MediaType.Audio:this.isSubtitle(e)?o.MediaType.Subtitles:this.isImage(e)?o.MediaType.Thumbnails:void 0},e.extractContentType=function(e){return e.split("/")[0]},e.extractContainerType=function(e){var t=e.split("/");return t.length>1?t[1]:null},e}();t.MimeTypeHelper=a}
19,5487:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getVidaaVersion=t.isVidaa=t.getTizenVersion=t.isTizen2024=t.isTizen2023=t.isTizen2022=t.isTizen2020=t.isTizen2016=t.isTizen2017=t.isTizen2018=t.isTizen2019=t.isTizen=t.getEdgeVersion=t.isEdge=t.getSafariVersion=t.isSafari=t.isFirefoxIOS=t.isFirefox=t.isChromium=t.isChrome=t.WEBOS_2022_CHROMIUM_VERSION=t.WEBOS_2021_CHROMIUM_VERSION=t.WEBOS_2020_CHROMIUM_VERSION=t.WEBOS_2018_2019_CHROMIUM_VERSION=t.WEBOS_2016_2017_CHROMIUM_VERSION=t.TIZEN_2024_MINOR_VERSION=t.TIZEN_2024_MAJOR_VERSION=t.TIZEN_2023_MINOR_VERSION=t.TIZEN_2023_MAJOR_VERSION=t.TIZEN_2022_MINOR_VERSION=t.TIZEN_2022_MAJOR_VERSION=t.TIZEN_2020_MINOR_VERSION=t.TIZEN_2020_MAJOR_VERSION=t.TIZEN_2019_MINOR_VERSION=t.TIZEN_2019_MAJOR_VERSION=t.TIZEN_2018_MINOR_VERSION=t.TIZEN_2018_MAJOR_VERSION=t.TIZEN_2017_MINOR_VERSION=t.TIZEN_2017_MAJOR_VERSION=t.TIZEN_2016_MINOR_VERSION=t.TIZEN_2016_MAJOR_VERSION=t.SAFARI_18_MAJOR_VERSION=t.SAFARI_17_MAJOR_VERSION=t.SAFARI_15_MAJOR_VERSION=t.IOS_18=t.IOS_17=t.IOS_15=t.IOS_10=t.IOS_9=t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=void 0,t.resetPlatformDetectorCache=t.isSafariPlatform18orNewer=t.isSafari17orIOS17=t.isSafari15orIOS15=t.getIOSVersion=t.isSafariIOS=t.isIOS=t.isMobile=t.isEdgeAndroid=t.isAndroid=t.isWebOs2022OrNewer=t.isWebOs2020=t.isWebOs2017=t.isWebOs2016=t.isWebOs2019OrOlder=t.getWebOsChromiumVersion=t.isWebOS=t.isWpeWebKit=t.isVizio=void 0,t.isLegacyEdge=r,t.isEdgeChromium=function(){return(0,t.isEdge)()&&(0,t.getEdgeVersion)().major>=t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION},t.isPlayStation5=o,t.isPlayStation4=a,t.isReactNative=function(){return"ReactNative"===window.navigator.product};var i=n(7993);function r(){return(0,t.isEdge)()&&(0,t.getEdgeVersion)().major<t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION}function o(){return/PlayStation 5/i.test(navigator.userAgent)}function a(){return/PlayStation 4/i.test(navigator.userAgent)}t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=79,t.IOS_9=9,t.IOS_10=10,t.IOS_15=15,t.IOS_17=17,t.IOS_18=18,t.SAFARI_15_MAJOR_VERSION=15,t.SAFARI_17_MAJOR_VERSION=17,t.SAFARI_18_MAJOR_VERSION=18,t.TIZEN_2016_MAJOR_VERSION=2,t.TIZEN_2016_MINOR_VERSION=4,t.TIZEN_2017_MAJOR_VERSION=3,t.TIZEN_2017_MINOR_VERSION=0,t.TIZEN_2018_MAJOR_VERSION=4,t.TIZEN_2018_MINOR_VERSION=0,t.TIZEN_2019_MAJOR_VERSION=5,t.TIZEN_2019_MINOR_VERSION=0,t.TIZEN_2020_MAJOR_VERSION=5,t.TIZEN_2020_MINOR_VERSION=5,t.TIZEN_2022_MAJOR_VERSION=6,t.TIZEN_2022_MINOR_VERSION=5,t.TIZEN_2023_MAJOR_VERSION=7,t.TIZEN_2023_MINOR_VERSION=0,t.TIZEN_2024_MAJOR_VERSION=8,t.TIZEN_2024_MINOR_VERSION=0,t.WEBOS_2016_2017_CHROMIUM_VERSION=38,t.WEBOS_2018_2019_CHROMIUM_VERSION=53,t.WEBOS_2020_CHROMIUM_VERSION=68,t.WEBOS_2021_CHROMIUM_VERSION=79,t.WEBOS_2022_CHROMIUM_VERSION=87,t.isChrome=function(){return navigator.userAgent.includes("Chrome")&&!(0,t.isEdge)()},t.isChromium=function(){return(0,t.isChrome)()||(0,t.isEdge)()&&!r()},t.isFirefox=function(){return navigator.userAgent.includes("Firefox")},t.isFirefoxIOS=function(){return navigator.userAgent.includes("FxiOS")&&(0,t.isIOS)()},t.isSafari=function(){return navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")&&!navigator.userAgent.includes("IEMobile")&&!navigator.userAgent.includes("Edge")&&!(0,t.isTizen)()&&!o()&&!a()&&!(0,t.isWpeWebKit)()||(0,i.isFairPlayDrmSupported)()},t.getSafariVersion=function(){var e=/Version\\/(\\d+)\\.?(\\d+)?\\.?(\\d+)?/.exec(navigator.userAgent)||null;if(!e)return{};var t=e[1],n=e[2],i=e[3],r=function(e){return parseInt(e)};return{major:r(t),minor:r(n),patch:r(i)}},t.isEdge=function(){return/Edge\\/\\d+/i.test(navigator.userAgent)||/Edg\\/\\d+/i.test(navigator.userAgent)||/EdgA\\/\\d+/i.test(navigator.userAgent)||/EdgiOS\\/\\d+/i.test(navigator.userAgent)},t.getEdgeVersion=function(){var e=/Edge\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent)||/Edg\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent)||/EdgA\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent)||/EdgiOS\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent);if(!e||0===e.length)return{major:0,minor:0};var t={};return e[1]&&(t.major=parseInt(e[1])),e[1]&&(t.minor=parseInt(e[2])),t};var s,u,l,d,c=function(e,n){var i=(0,t.getTizenVersion)();return i.major===e&&i.minor===n};t.isTizen=function(){return null!=s||(s=navigator.userAgent.includes("Tizen")),s},t.isTizen2019=function(){return c(t.TIZEN_2019_MAJOR_VERSION,t.TIZEN_2019_MINOR_VERSION)},t.isTizen2018=function(){return c(t.TIZEN_2018_MAJOR_VERSION,t.TIZEN_2018_MINOR_VERSION)},t.isTizen2017=function(){return c(t.TIZEN_2017_MAJOR_VERSION,t.TIZEN_2017_MINOR_VERSION)},t.isTizen2016=function(){return c(t.TIZEN_2016_MAJOR_VERSION,t.TIZEN_2016_MINOR_VERSION)},t.isTizen2020=function(){return c(t.TIZEN_2020_MAJOR_VERSION,t.TIZEN_2020_MINOR_VERSION)},t.isTizen2022=function(){return c(t.TIZEN_2022_MAJOR_VERSION,t.TIZEN_2022_MINOR_VERSION)},t.isTizen2023=function(){return c(t.TIZEN_2023_MAJOR_VERSION,t.TIZEN_2023_MINOR_VERSION)},t.isTizen2024=function(){return c(t.TIZEN_2024_MAJOR_VERSION,t.TIZEN_2024_MINOR_VERSION)},t.getTizenVersion=function(){if(void 0===u){var e=/Tizen (\\d).(\\d)/.exec(navigator.userAgent);u=(null==e?void 0:e[1])?{major:Number(e[1]),minor:Number(e[2]||0)}:{}}return u},t.isVidaa=function(){return navigator.userAgent.includes("VIDAA")},t.getVidaaVersion=function(){var e=new RegExp(/VIDAA\\/(\\d+)\\.?(\\d+)/).exec(navigator.userAgent);return(null==e?void 0:e[1])?{major:Number(e[1]),minor:Number(e[2])}:{}}
19,t.isVizio=function(){return navigator.userAgent.includes("VIZIO")},t.isWpeWebKit=function(){return navigator.userAgent.includes("WPE")||navigator.userAgent.includes("Astro")},t.isWebOS=function(){return null!=l||(l=navigator.userAgent.includes("Web0S")||navigator.userAgent.includes("NetCast")),l},t.getWebOsChromiumVersion=function(){var e;if(void 0===d){var t=new RegExp(/Chrome\\/(\\d+)\\.?(\\d+)/).exec(navigator.userAgent);if(!(null==t?void 0:t[1]))return{};d={major:Number(t[1]),minor:Number(null!==(e=t[2])&&void 0!==e?e:0)}}return d},t.isWebOs2019OrOlder=function(){var e=(0,t.getWebOsChromiumVersion)();return(0,t.isWebOS)()&&void 0!==(null==e?void 0:e.major)&&e.major<=t.WEBOS_2018_2019_CHROMIUM_VERSION},t.isWebOs2016=function(){return(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2016_2017_CHROMIUM_VERSION&&!("requestMediaKeySystemAccess"in navigator)},t.isWebOs2017=function(){return(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2016_2017_CHROMIUM_VERSION&&"requestMediaKeySystemAccess"in navigator},t.isWebOs2020=function(){return(0,t.isWebOS)()&&(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2020_CHROMIUM_VERSION},t.isWebOs2022OrNewer=function(){var e=(0,t.getWebOsChromiumVersion)();return(0,t.isWebOS)()&&void 0!==(null==e?void 0:e.major)&&e.major>=t.WEBOS_2022_CHROMIUM_VERSION},t.isAndroid=function(){return/Android/i.test(navigator.userAgent)},t.isEdgeAndroid=function(){return(0,t.isEdge)()&&(0,t.isAndroid)()},t.isMobile=function(){return/Android/i.test(navigator.userAgent)||/IEMobile/i.test(navigator.userAgent)||/Windows Phone 10.0/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)},t.isIOS=function(){return/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)&&!/Android/i.test(navigator.userAgent)&&!/Windows Phone 10.0/i.test(navigator.userAgent)},t.isSafariIOS=function(){return/Safari/i.test(navigator.userAgent)&&/iP(hone|od|ad)/i.test(navigator.userAgent)},t.getIOSVersion=function(){var e=/OS (\\d+)(_\\d+)*/.exec(navigator.userAgent);return e&&e.length>0&&parseInt(e[1],10)||0},t.isSafari15orIOS15=function(){return function(){return(0,t.isSafari)()&&(0,t.getSafariVersion)().major===t.SAFARI_15_MAJOR_VERSION}()||function(){return(0,t.isIOS)()&&(0,t.getIOSVersion)()===t.IOS_15}()},t.isSafari17orIOS17=function(){return function(){return(0,t.isSafari)()&&(0,t.getSafariVersion)().major===t.SAFARI_17_MAJOR_VERSION}()||function(){return(0,t.isIOS)()&&(0,t.getIOSVersion)()===t.IOS_17}()},t.isSafariPlatform18orNewer=function(){var e;return!!((0,t.isSafari)()&&(null!==(e=(0,t.getSafariVersion)().major)&&void 0!==e?e:0)>=t.SAFARI_18_MAJOR_VERSION)||!!((0,t.isIOS)()&&(0,t.getIOSVersion)()>=t.IOS_18)},t.resetPlatformDetectorCache=function(){s=void 0,u=void 0,l=void 0,d=void 0}},9927:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.toSeconds=function(e){return e/n},t.toMilliSeconds=function(e){return e*n};var n=1e3},3068:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isBoolean=t.isNumber=void 0,t.isDefined=function(e){return null!=e},t.isVideoRepresentation=function(e){return null!=e._height&&null!=e._width},t.isNumber=function(e){return"number"==typeof e},t.isBoolean=function(e){return"boolean"==typeof e}},6741:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorkerContext=void 0;var i=n(8041),r=function(){return function(e){var t=this;this.b="undefined"==typeof window,this.onmessage=null,this.c=function(e,n){t.b?postMessage(e,n):"function"==typeof t.onmessage&&setTimeout((function(){t.onmessage({data:e})}),0)},this.postMessage=function(e){setTimeout((function(){t.onMessageCallback({data:e})}),0)},this.terminate=function(){},this.onMessageCallback=function(e){e.data.action&&e.data&&t.a[e.data.action]&&t.a[e.data.action](e.data)},this.b&&(0,i.installWorkerPolyfills)(),this.a=new e(this.b,this.c)}}();t.WebWorkerContext=r},4081:function(e,t){var n;function i(e){return"Math"in e&&e.Math===Math}Object.defineProperty(t,"__esModule",{value:!0});var r=null!==(n=function(){return"object"==typeof window&&window&&i(window)?window:void 0}())&&void 0!==n?n:function(){return"object"==typeof self&&self&&i(self)?self:void 0}();t.default=r},6110:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();
vendor: 40,444 bytes, line 19
19Object.defineProperty(t,"__esModule",{value:!0}),t.HlsParserWebworkerMessageHandler=void 0,t.getContext=function(){return s||u()};var r=n(6599),o=n(6741),a=n(7432),s=null;function u(){var e=new o.WebWorkerContext(l);return onmessage=e.onMessageCallback,e}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parseHlsPlaylist=function(e){var t=e.payload;try{var n=(0,a.parsePlaylist)(t.data,t.options);this.postMessageFunction({action:"parsedPlaylist",data:n})}catch(e){this.postMessageFunction({action:"error",data:e.message})}},t}(r.MessageHandler);t.HlsParserWebworkerMessageHandler=l,"undefined"==typeof window&&(s=u())},5707:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.generateRendition=function(e){var t,n,r;return{name:e.name,attributes:i(i({},e.attributes),{TYPE:null===(t=e.attributes)||void 0===t?void 0:t.TYPE,"GROUP-ID":null===(n=e.attributes)||void 0===n?void 0:n["GROUP-ID"],NAME:null===(r=e.attributes)||void 0===r?void 0:r.NAME})}},t.generateStartAttributes=function(e){var t,n;return(null===(t=e.attributes)||void 0===t?void 0:t.hasOwnProperty("TIME-OFFSET"))&&(n={timeOffset:Number(e.attributes["TIME-OFFSET"]),precise:"YES"===e.attributes.PRECISE}),e.attributes&&n&&n.hasOwnProperty("timeOffset")&&(e.attributes["TIME-OFFSET"]=n.timeOffset,e.attributes.PRECISE=n.precise),n},t.generatePartInfoTag=function(e){return{targetDuration:parseFloat(e["PART-TARGET"])}},t.generateServerControlTag=function(e){var t={canBlockReload:!1};return e.attributes?(e.attributes["CAN-SKIP-UNTIL"]&&(t.canSkipUntil=parseFloat(e.attributes["CAN-SKIP-UNTIL"])),void 0!==t.canSkipUntil&&e.attributes["CAN-SKIP-DATERANGES"]&&(t.canSkipDateRanges="YES"===e.attributes["CAN-SKIP-DATERANGES"]),e.attributes["HOLD-BACK"]&&(t.holdBack=parseFloat(e.attributes["HOLD-BACK"])),e.attributes["PART-HOLD-BACK"]&&(t.partHoldBack=parseFloat(e.attributes["PART-HOLD-BACK"])),e.attributes["CAN-BLOCK-RELOAD"]&&(t.canBlockReload="YES"===e.attributes["CAN-BLOCK-RELOAD"]),t):t},t.generateSkipTag=function(e){var t={skippedSegments:0,recentlyRemovedDateranges:[]};return e.attributes?(e.attributes["SKIPPED-SEGMENTS"]&&(t.skippedSegments=parseInt(e.attributes["SKIPPED-SEGMENTS"])),e.attributes["RECENTLY-REMOVED-DATERANGES"]&&(t.recentlyRemovedDateranges=e.attributes["RECENTLY-REMOVED-DATERANGES"].split("\\t")),t):t},t.generatePartTag=function(e,t){var n={uri:(0,s.forceReallocation)(e.URI),duration:parseFloat(e.DURATION)};if("YES"===e.INDEPENDENT&&(n.independent=!0),e.BYTERANGE){var i=e.BYTERANGE.split("@"),r=parseInt(i[0]),o=parseInt(i[1]);isNaN(o)&&(o=(null==t?void 0:t.byteRange)?t.byteRange.end+1:0),n.byteRange={start:o,end:o+r-1}}return"YES"===e.GAP&&(n.gap=!0),n},t.generatePreloadHintTag=function(e,t){if("PART"===e.TYPE){var n={uri:(0,s.forceReallocation)(e.URI),duration:t,isPreloadHint:!0};return(i=u(e))&&(n.byteRange=i),{part:n}}if("MAP"===e.TYPE){var i,r={url:(0,s.forceReallocation)(e.URI)};return(i=u(e))&&(r.byteRange=i),{init:r}}return{}},t.generateStreamInfTag=function(e,t){var n,r,o,a,s,u={name:e.name,uri:t,attributes:i(i({},e.attributes),{BANDWIDTH:null===(n=e.attributes)||void 0===n?void 0:n.BANDWIDTH})};return(null===(r=e.attributes)||void 0===r?void 0:r.RESOLUTION)&&(u.attributes.RESOLUTION=f(e)),(null===(o=e.attributes)||void 0===o?void 0:o.BANDWIDTH)&&(u.attributes.BANDWIDTH=parseInt(e.attributes.BANDWIDTH)),(null===(a=e.attributes)||void 0===a?void 0:a["AVERAGE-BANDWIDTH"])&&(u.attributes["AVERAGE-BANDWIDTH"]=parseInt(e.attributes["AVERAGE-BANDWIDTH"])),(null===(s=e.attributes)||void 0===s?void 0:s["PROGRAM-ID"])&&(u.attributes["PROGRAM-ID"]=parseInt(e.attributes["PROGRAM-ID"])),u.id=l(u.attributes),u},t.generateVariantPlaylistId=l,t.generateSessionKeyTag=function(e){c(e)},t.generateIFrameStreamInfTag=function(e){var t,n,i;(null===(t=e.attributes)||void 0===t?void 0:t.BANDWIDTH)&&(e.attributes.BANDWIDTH=parseInt(e.attributes.BANDWIDTH)),(null===(n=e.attributes)||void 0===n?void 0:n["AVERAGE-BANDWIDTH"])&&(e.attributes["AVERAGE-BANDWIDTH"]=parseInt(e.attributes["AVERAGE-BANDWIDTH"],10)),(null===(i=e.attributes)||void 0===i?void 0:i.RESOLUTION)&&(e.attributes.RESOLUTION=f(e))},t.generateSegmentEntrySkeleton=function(){return{uri:"",duration:0,mediaSequence:0}},t.generateCueTag=function(e,t){var n={type:t};if(e.attributes){var i=[];for(var r in e.attributes)if(e.attributes.hasOwnProperty(r)){var o=e.attributes[r]?"".concat(r,"=").concat(e.attributes[r]):r;i.push(o)}n.attributes=i}return n},t.generateDateRange=function(e){var t={type:a.MetadataType.DATERANGE};if(e.attributes){t.clientAttributes={};var n=e.attributes;for(var i in n)if(n.hasOwnProperty(i)){var r=d(i,n[i]);i.startsWith("X-")?t.clientAttributes[(0,s.kebabCaseToCamelCase)(i.substring(2))]=r:t[(0,s.kebabCaseToCamelCase)(i)]=r}}return t.duration&&(t.duration=Number(t.duration)),t.plannedDuration&&(t.plannedDuration=Number(t.plannedDuration)),t.endOnNext&&(t.endOnNext=!0),t},t.generateKeyTag=function(e){var t;if(c(e),e.attributes&&"NONE"!==e.attributes.METHOD&&e.attributes.URI){var n={method:null!==(t=o.HlsEncryptionMethods.find((function(t){return t===e.attributes.METHOD})))&&void 0!==t?t:o.HlsEncryptionMethod.AES_128,uri:(0,s.forceReallocation)(e.attributes.URI)};return void 0!==e.attributes.IV&&(n.iv=e.attributes.IV),e.attributes.KEYFORMAT&&(n.keyformat=(0,s.forceReallocation)(e.attributes.KEYFORMAT)),e.attributes.KEYFORMATVERSIONS&&(n.keyformatversions=(0,s.forceReallocation)(e.attributes.KEYFORMATVERSIONS)),e.attributes.KEYID&&(n.keyid=(0,s.forceReallocation)(e.attributes.KEYID)),n}},t.generateByteRangeTag=function(e,t){var n;if(e.value){var i=e.value.split("@"),r=i[0],o=i[1],a={length:parseInt(r||"0")};if(o)a.offset=parseInt(o);else{var s=t[t.length-1];(null==s?void 0:s.byterange)&&(a.offset=(null!==(n=s.byterange.offset)&&void 0!==n?n:0)+s.byterange.length)}return a}},t.generateMapTag=function(e,t){var n,i;if(null===(n=e.attributes)||void 0===n?void 0:n.URI){var o={url:(0,s.forceReallocation)(e.attributes.URI)};if(null===(i=e.attributes)||void 0===i?void 0:i.BYTERANGE){var a=e.attributes.BYTERANGE.split("@"),u=a[0],l=a[1];o.byteRange={start:parseInt(l),end:parseInt(l)+parseInt(u)-1}}return t.keys.length>0&&(o.keys=r([],t.keys,!0),t.keyInUse=!0),o}},t.generateCustomTag=function(e){try{e=(0,s.forceReallocation)(e);var t=/^#([^:=]*)([:=])?(.*)$/.exec(e);if(!(null==t?void 0:t[1]))return;var n={name:t[1]},i="";if("="===t[2]&&t[3])i=t[3];else if(":"===t[2]&&t[3]){var r=h.exec(t[3]);r&&"="===r[2]&&r[3]?n.attributes=function(e){for(var t=e.split(p),n=t.length,i={};n--;)if(""!==t[n]){var r=S.exec(t[n]);if(r){var o=r.slice(1),a=o[0],s=o[1];i[a.trim()]=s.trim().replace(g,"$1")}}return i}(t[3]):i=t[3]}return i&&(n.value=i.replace(v,"$1")),n}catch(e){return}};var o=n(6790),a=n(3714),s=n(649);function u(e){var t=parseInt(e["BYTERANGE-START"]),n=parseInt(e["BYTERANGE-END"]);if(!isNaN(t)||!isNaN(n))return{start:isNaN(t)?0:t,end:isNaN(n)?Math.pow(2,53)-1:n}}function l(e){var t="";return e.RESOLUTION&&(t+=e.RESOLUTION.height+"_"),t+e.BANDWIDTH}function d(e,t){var n=(0,s.forceReallocation)(t);return function(e){return["X-RESUME-OFFSET","X-PLAYOUT-LIMIT"].includes(e)}(e)?Number(n):function(e){return["X-SNAP","X-RESTRICT"].includes(e)}(e)?n.split(","):n}function c(e){var t;if(null===(t=e.attributes)||void 0===t?void 0:t.IV){var n=e.attributes.IV;(n.startsWith("0x")||n.startsWith("0X"))&&(e.attributes.IV=n.substring(2))}}function f(e){var t,n={width:0,height:0},i=null===(t=e.attributes)||void 0===t?void 0:t.RESOLUTION.split("x");return i[0]&&(n.width=parseInt(i[0])),i[1]&&(n.height=parseInt(i[1])),n}var p=/(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))/,S=/([^=]*)=(.*)/,g=/^[\'"](.*)[\'"]$/,v=/^[\'"](.*)[\'"]$/g,h=/^([^:="]*)([:=])?(.*)$/},9297:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;var n=/[ \\t]+/gm,i=function(){function e(e){this.data=e,this.tb=0}return e.prototype.ub=function(){return this.tb===this.data.length},e.prototype.skipWhitespace=function(){this.readRegex(n)},e.prototype.readRegex=function(e){var t=this.vb(e);if(!this.ub()&&void 0!==t&&t.position===this.tb)return this.tb+=t.length,t.results},e.prototype.vb=function(e){e.lastIndex=this.tb;var t=e.exec(this.data);if(null!==t)return{position:t.index,length:t[0].length,results:t}},e}();t.TextParser=i},7432:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parsePlaylist=function(e,t){void 0===t&&(t={});var n=-1===e.indexOf("#EXTINF")?i.Master:i.Media,c=e.replace(u,"\\n").trim().split(/\\n+/m),f=(0,r.removeTrailingWhitespaces)(c[0]);if(!l.test(f))throw new Error("Playlist parsing failed: missing #EXTM3U tag");if(n===i.Media)return(0,a.parseVariant)(c,t);for(var p,S=[],g=[],v=[],h=1,E=!0,m=!1,y=!0,T=0;T<c.length;T++){var _=(0,r.removeTrailingWhitespaces)(c[T]),O=c[T+1];if((0,r.isCustomTag)(_))d(S,_);else if(y)y=!1;else{var I=(0,o.parseTag)(_);switch(I.name){case"EXT-X-STREAM-INF":v.push((0,s.generateStreamInfTag)(I,(0,r.removeTrailingWhitespaces)(O))),y=!0;break;case"EXT-X-MEDIA":var R=(0,s.generateRendition)(I);g.push(R),S.push(R);break;case"EXT-X-VERSION":h=Number(I.value);break;case"EXT-X-START":p=(0,s.generateStartAttributes)(I),S.push(I);break;case"EXT-X-ALLOW-CACHE":E="YES"===I.value||void 0===I.value;break;case"EXT-X-INDEPENDENT-SEGMENTS":m=!0,S.push(I);break;case"EXT-X-I-FRAME-STREAM-INF":(0,s.generateIFrameStreamInfTag)(I),S.push(I);break;case"EXT-X-SESSION-DATA":default:S.push(I);break;case"EXT-X-SESSION-KEY":(0,s.generateSessionKeyTag)(I),S.push(I)}}}var b={version:h,allowCache:E,independentSegments:m,hasM3u:!0,media:g,playlists:v,tags:S=S.concat(v)};return p&&(b.start=p),b};var i,r=n(3577),o=n(1908),a=n(1945),s=n(5707),u=/\\r\\n|\\r(?=[^\\n]|$)/gm,l=/^#EXTM3U($|[ \\t\\n])/m;function d(e,t){var n=(0,s.generateCustomTag)(t);n&&e.push(n)}!function(e){e.Master="master",e.Media="media"}(i||(i={}))},3577:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseSegments=function(e,t,n,c){void 0===c&&(c={});for(var g,v=[],h=0,E=(0,d.generateSegmentEntrySkeleton)(),m=r([],t,!0),y=0,T=n.mediaSequence,_={keys:[],keyInUse:!1},O=function(e){!function(e,t,n,i,o,a,s){e.duration=t,e.uri=n,e.mediaSequence=s,i&&(e.init=i),a.length>0&&(e.customTags=a),o.keys.length>0&&(e.keys=r([],o.keys,!0),o.keyInUse=!0)}(E,y,e,g,_,m,T),v.push(E),h+=y,T++,function(){E=(0,d.generateSegmentEntrySkeleton)(),m=[],y=0}()},I=function(e){var t,s,f=(0,u.parseTag)(e);switch(f.name){case"EXTINF":y=parseFloat(f.value);break;case"EXT-X-BYTERANGE":E.byterange=(0,d.generateByteRangeTag)(f,v);break;case"EXT-X-DISCONTINUITY":E.discontinuity=!0;break;case"EXT-X-PROGRAM-DATE-TIME":!function(e,t){t.value&&(e.dateTime=new Date(t.value))}(E,f);break;case"EXT-X-KEY":if("NONE"===(null===(t=f.attributes)||void 0===t?void 0:t.METHOD)){_.keys=[{method:o.HlsEncryptionMethod.NONE}];break}!function(e,t){t.keyInUse&&(t.keys=[],t.keyInUse=!1);var n=(0,d.generateKeyTag)(e);void 0!==n&&t.keys.push(n)}(f,_);break;case"EXT-X-MAP":g=(0,d.generateMapTag)(f,_);break;case"EXT-X-DATERANGE":n.dateRange.push((0,d.generateDateRange)(f));break;case"EXT-X-CUE-OUT-CONT":E.cueTag=(0,d.generateCueTag)(f,"CUE-OUT-CONT");break;case"EXT-X-CUE-OUT":E.cueTag=(0,d.generateCueTag)(f,"CUE-OUT");break;case"EXT-X-CUE-IN":E.cueTag=(0,d.generateCueTag)(f,"CUE-IN");break;case"EXT-X-SCTE35":!function(e,t){var n;void 0===e.scte35&&(e.scte35=[]),e.scte35.push({type:a.MetadataType.SCTE,attributes:i({CUE:null===(n=t.attributes)||void 0===n?void 0:n.CUE},t.attributes)})}(E,f);break;case"EXT-X-PART":!function(e,t,n){var i;if(n.parsePartTags){t.parts=null!==(i=t.parts)&&void 0!==i?i:[];var r=t.parts[t.parts.length-1];t.parts.push((0,d.generatePartTag)(e.attributes,r))}}(f,E,c);break;case"EXT-X-PRELOAD-HINT":var p=function(e,t,n){return n.parsePartTags&&t?(0,d.generatePreloadHintTag)(e.attributes,t.targetDuration):{}}(f,n.partInfo,c);p.init&&(g=p.init,_.keys.length>0&&(g.keys=r([],_.keys,!0),_.keyInUse=!0)),p.part&&(E.parts=null!==(s=E.parts)&&void 0!==s?s:[],E.parts.push(p.part));break;case"EXT-X-SKIP":var S=(0,d.generateSkipTag)(f);n.skippedSegmentsCount=S.skippedSegments,T+=S.skippedSegments;break;case"EXT-X-ENDLIST":n.endList=!0;break;case"EXT-X-MEDIA-SEQUENCE":(0,l.resolvePlaylistTag)(n,f,m),T=n.mediaSequence,n.skippedSegmentsCount&&(T+=n.skippedSegmentsCount);break;default:(0,l.resolvePlaylistTag)(n,f,m)}},R=0,b=e;R<b.length;R++){var N=p(b[R]);""!==N&&(N.startsWith("#")?S(N)?f(n,m,N):I(N):O(N))}E.parts&&E.parts.length>0&&(y=E.parts.reduce((function(e,t){return e+t.duration}),0),O(s.PHANTOM_SEGMENT_URL)),n.segments=v,n.totalDuration=h},t.addCustomTagToPlaylistTagList=c,t.handleCustomTag=f,t.removeTrailingWhitespaces=p,t.isCustomTag=S;var o=n(6790),a=n(3714),s=n(3066),u=n(1908),l=n(1945),d=n(5707);function c(e,t){void 0===e.tags&&(e.tags=[]),t&&e.tags.push(t)}function f(e,t,n){t.push({type:a.MetadataType.CUSTOM,attributes:n}),c(e,(0,d.generateCustomTag)(n))}function p(e){return e.replace(/^[ \\t]+/g,"")}function S(e){return/^#(?!EXT)/m.test(e)}},1908:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseTag=function(e){var t,n=r.exec(e);if(!n)throw new Error("Invalid tag "+e);var s,u=n[1],l=n[2],d={};if(l){var c=new i.TextParser(l),f=void 0,p=c.readRegex(o);for(p&&(s=null!==(t=p[1])&&void 0!==t?t:p[2]);f=c.readRegex(a);){var S=f[1],g=f[2]||f[3];if(S.includes(",")){var v=S.split(","),h=v[0];S=v[1].trim(),d[h]=void 0}d[S]=g,c.skipWhitespace()}}return{name:u,attributes:d,value:s}};var i=n(9297),r=/^#(EXT[^:]*)(?::(.*))?$/,o=/^(?:"([^"]*)"|([^,=]+))(?:,|$)/g,a=/([^=]+)=*(?:"([^"]*)"|([^",]*))(?:,|$)/g},1945:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SEGMENT_TAGS=void 0,t.parseVariant=function(e,n){void 0===n&&(n={});for(var i={version:1,allowCache:!0,hasM3u:!0,endList:!1,segments:[],dateRange:[],skippedSegmentsCount:0,targetDuration:0,totalDuration:0,mediaSequence:0},r=[],s=0;s<e.length;s++){var d=(0,o.removeTrailingWhitespaces)(e[s]);if(""!==d)if((0,o.isCustomTag)(d))(0,o.handleCustomTag)(i,r,d);else{var c=(0,a.parseTag)(d);if(t.SEGMENT_TAGS.includes(c.name))return(0,o.parseSegments)(e.slice(s),r,i,n),u(i),i;l(i,c,r)}}return u(i),i},t.resolvePlaylistTag=l;var r=n(3714),o=n(3577),a=n(1908),s=n(5707);function u(e){var t;"EVENT"===e.playlistType&&(e.discontinuitySequence=null!==(t=e.discontinuitySequence)&&void 0!==t?t:0)}function l(e,t,n){switch(t.name){case"EXT-X-VERSION":e.version=Number(t.value);break;case"EXT-X-START":e.start=(0,s.generateStartAttributes)(t);break;case"EXT-X-INDEPENDENT-SEGMENTS":e.independentSegments=!0;break;case"EXT-X-TARGETDURATION":t.value&&(e.targetDuration=parseInt(t.value));break;case"EXT-X-MEDIA-SEQUENCE":t.value&&(e.mediaSequence=parseInt(t.value));break;case"EXT-X-DISCONTINUITY-SEQUENCE":t.value&&(e.discontinuitySequence=parseInt(t.value));break;case"EXT-X-PLAYLIST-TYPE":e.playlistType="EVENT"===t.value?"EVENT":"VOD";break;case"EXT-X-PART-INF":e.partInfo=(0,s.generatePartInfoTag)(t.attributes);break;case"EXT-X-ALLOW-CACHE":e.allowCache="NO"!==t.value;break;case"EXT-X-SERVER-CONTROL":e.serverControl=(0,s.generateServerControlTag)(t);break;case"EXT-X-DATERANGE":e.dateRange.push((0,s.generateDateRange)(t));break;case"EXT-X-ENDLIST":e.endList=!0;break;case"EXTM3U":break;default:n.push(i({type:r.MetadataType.CUSTOM},t)),(0,o.addCustomTagToPlaylistTagList)(e,t)}}t.SEGMENT_TAGS=["EXTINF","EXT-X-BYTERANGE","EXT-X-DISCONTINUITY","EXT-X-PROGRAM-DATE-TIME","EXT-X-KEY","EXT-X-GAP","EXT-X-BITRATE","EXT-X-PART","EXT-X-MAP","EXT-X-CUE-OUT-CONT","EXT-X-CUE-OUT","EXT-X-CUE-IN","EXT-X-SCTE35","EXT-X-SKIP"]},4053:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoError=void 0,function(e){e.END_OF_STREAM_REACHED="END_OF_STREAM_REACHED",e.PERIOD_COMPLETE="PERIOD_COMPLETE",e.SEGMENT_EXCEEDING_PERIOD_DURATION="SEGMENT_EXCEEDING_PERIOD_DURATION"}(n||(t.SegmentInfoError=n={}))},5439:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isSegmentTiming=function(e){return"startTime"in e&&(0,i.isNumber)(e.startTime)&&"duration"in e&&(0,i.isNumber)(e.duration)},t.findSegmentIndexForTime=function(e,t,n){var i=!e||!e.length,o=t<e[0].startTime+e[0].duration;if(i||o)return 0;var a=e.length-1;if(t>=e[a].startTime)return a;var s=Math.max(t-e[0].startTime,0),u=Math.min(Math.floor(s/n),e.length-1);return r(e[0])&&r(e[u])?function(e,t,n){for(;e[n]&&e[n].startTime>t;)n--;for(;e[n]&&e[n].startTime+e[n].duration<=t;)n++;return n=Math.max(n,0),n=Math.min(n,e.length-1)}(e,t,u):null},t.createInitSegmentInfoBase=function(e){var t=e._internalId;return{internalRepresentationId:t,representationId:t.representationId,periodId:t.periodId,mimeType:e._mimeType,isInitSegment:!0}},t.getSegmentInfoTimeRange=function(e){if((null==e?void 0:e.duration)&&void 0!==(null==e?void 0:e.startTime))return{start:e.startTime,end:e.startTime+e.duration}};var i=n(3068);function r(e){return e&&(0,i.isNumber)(e.startTime)}},3066:function(e,t,n){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentListMPDHandler=t.PHANTOM_SEGMENT_URL=void 0,t.assignSegmentStartTimesFromHlsRepresentation=T,t.copyPropValues=I,t.getMatchingPart=R;var r=n(6790),o=n(813),a=n(7179),s=n(649),u=n(4853),l=n(2424),d=n(9927),c=n(3068),f=n(8052),p=n(2756),S=n(827),g=n(2498),v=n(729),h=n(4053),E=n(5439);t.PHANTOM_SEGMENT_URL="PHANTOM-SEGMENT";var m=function(){function e(e,t){this.d=e,this.e=t,this.g=e.settings,this.f=e.logger,this.m=e.serviceManager.get(o.ServiceName.ManifestService,this.e.sourceIdentifier),this.l=0,this.o={},this.n=NaN}return Object.defineProperty(e.prototype,"p",{get:function(){return this.d.serviceManager.get(o.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),e.prototype.q=function(e,t){var n;if(!e)return null;var o={isInitSegment:!1,url:e._media,duration:e._duration,internalRepresentationId:t,periodId:t.periodId};if(e._key&&e._key.method!==r.HlsEncryptionMethod.NONE&&(o.key=e._key),void 0!==e._playbackTime&&(o.startTime=e._playbackTime),e._dateTime&&(o.dateTime=e._dateTime),e._metadata&&(o.metadata=e._metadata),e._byteRange&&(o.byteRange=e._byteRange),e._init&&(o.init=e._init,(null===(n=e._init.key)||void 0===n?void 0:n.method)===r.HlsEncryptionMethod.NONE&&(o.init=i({},o.init),delete o.init.key)),void 0!==e._mediaSequence&&(o.mediaSequence=e._mediaSequence),void 0!==e._discontinuitySequenceNumber&&(o.discontinuitySequenceNumber=e._discontinuitySequenceNumber),e._parts){var a=o.dateTime;o.parts=e._parts.map((function(e){var t=function(e,t){var n={url:e.uri,duration:e.duration,isInitSegment:!1,internalRepresentationId:t.internalRepresentationId,isPreloadHint:Boolean(e.isPreloadHint),isIndependent:Boolean(e.independent)};return e.byteRange&&(n.byteRange=e.byteRange),t.key&&(n.key=t.key),t.init&&(n.init=t.init),(0,c.isDefined)(t.mediaSequence)&&(n.mediaSequence=t.mediaSequence),(0,c.isDefined)(t.discontinuitySequenceNumber)&&(n.discontinuitySequenceNumber=t.discontinuitySequenceNumber),n}(e,o);return a&&(t.dateTime=a,t.startTime=(0,d.toSeconds)(a.getTime()),a=new Date(a.getTime()+(0,d.toMilliSeconds)(e.duration))),t}))}return o},e.prototype.r=function(e,t,n){if(t.SegmentURL.length<1)return e.entries=[],e.totalDuration=0,e.entries.length;for(var i=this.q(t.SegmentURL[0],n),r=0,o=0,a=0;a<e.entries.length;a++){var s=e.entries[a];if((0,S.isIdenticalSegmentInfo)(s,i))break;r+=s.duration,e.entries.splice(a,1),a--,o++,this.i.equals(n)&&this.rewindOneSegment()}return e.totalDuration-=r,o},e.prototype.s=function(e,t,n,i){for(var r=[],o=e.entries[e.entries.length-1],a=0,s=i?function(e){var t,n=[];return null===(t=e.S)||void 0===t||t.forEach((function(e){n.push(e);for(var t=e._r?parseInt(e._r):0;t>0;)n.push({_d:e._d}),t--})),n}(i):void 0,u=this.qb(n),l=t.SegmentURL.length-1;l>=0;l--){var d=this.q(t.SegmentURL[l],n);if(o&&(0,S.isIdenticalSegmentInfo)(o,d)){if(_(o)){var c=O(o,d);e.totalDuration+=c}break}o&&(0,S.isIdenticalInitSegmentInfo)(o.init,d.init)&&(d.init=o.init),(null==s?void 0:s[l])&&this.t(d,s[l],e,u),isNaN(d.duration)&&(d.duration=e.maximumSegmentDuration),d.duration/=e.timescale,a+=d.duration,r.push(d)}return e.totalDuration+=a,r.reverse(),e.entries=e.entries.concat(r),r.length},e.prototype.t=function(e,t,n,i){var r,o;if(e.duration=parseInt(t._d),void 0!==t._t){var a=null!==(r=n.timescale)&&void 0!==r?r:1,s=null!==(o=n.presentationTimeOffset)&&void 0!==o?o:0;e.startTime=i+(parseInt(t._t)-s)/a}},e.prototype.u=function(e,t){var n,i,r,o=t.SegmentList,a=t._internalId.representationId,s=null===(n=this.i)||void 0===n?void 0:n.equals(t._internalId),u=null===(i=null==o?void 0:o[0])||void 0===i?void 0:i.SegmentURL.length;if(!s||u){e.Uri&&e.Uri!==t.Uri&&this.v(e,null==o?void 0:o[0],s),e.Uri=t.Uri,e.timescale=1,e.maximumSegmentDuration=1,e.startNumber=1;for(var l=function(n){var i=o[n];if(i.hasOwnProperty("_duration")&&(e.maximumSegmentDuration=Number(i._duration)),["_timescale","_startNumber","_presentationTimeOffset"].filter((function(e){return i.hasOwnProperty(e)})).forEach((function(t){return e[t.substr(1)]=i[t]})),d.w(e,i,t),i.hasOwnProperty("SegmentURL")){var s=d.r(e,i,t._internalId),u=d.s(e,i,t._internalId,null===(r=i.SegmentTimeline)||void 0===r?void 0:r[0]);d.x(t._mimeType,a,s,u),d.m.isHlsManifest()?T(e.entries,t._internalId,d.m):d.y(e,t._internalId)}},d=this,c=0;c<o.length;c++)l(c)}},e.prototype.v=function(e,t,n){var i,r,o,a,s,l;if(this.m.isLive()&&n){var d=null!==(o=null===(r=null===(i=e.entries)||void 0===i?void 0:i[0])||void 0===r?void 0:r.mediaSequence)&&void 0!==o?o:1/0,c=(null!==(s=null===(a=null==t?void 0:t.SegmentURL[0])||void 0===a?void 0:a._mediaSequence)&&void 0!==s?s:0)-d,f=function(e){var t,n,i=e.totalDuration/(null!==(n=null===(t=e.entries)||void 0===t?void 0:t.length)&&void 0!==n?n:1);return Math.ceil(24/i)}(e);!isNaN(c)&&c>0&&c<f&&this.Y(c)}(0,u.clearArray)(null!==(l=e.entries)&&void 0!==l?l:[]),e.totalDuration=0},e.prototype.w=function(e,t,n){var i,r=null===(i=f.ModuleManager.get(p.ModuleName.DASH,!1))||void 0===i?void 0:i.initSegmentInfoSourceDetectors.isInitializationNode;(null==r?void 0:r(t))?e.init=f.ModuleManager.get(p.ModuleName.DASH,!1).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty(t,n):delete e.init},e.prototype.x=function(e,t,n,i){(n>0||i>0)&&this.f.debug("[".concat(e,"][").concat(t,"] Updated segment list, removed ").concat(n," segments and added ").concat(i," segments"))},e.prototype.y=function(e,t){var n=this.qb(t);e.entries.forEach((function(e){var t,i;null!==(t=e.startTime)&&void 0!==t||(e.startTime=n),n=e.startTime+(null!==(i=e.duration)&&void 0!==i?i:0)}))},e.prototype.extrapolateStartTimesFromDiscontinuityStarts=function(e){var t,n,i,r,o=null===(n=null===(t=this.z())||void 0===t?void 0:t.getState())||void 0===n?void 0:n.hls;if(o){var a=e.getRepresentationId().representationId,s=this.getSegmentListEntries(this.i),u=f.ModuleManager.get(p.ModuleName.HLS).selectors,l=u.getDiscoSequenceTimings,d=u.getMergedDiscontinuityTimings,c=function(e,t){for(var n=e[0].discontinuitySequenceNumber,i=1;i<e.length;i++){var r=e[i].discontinuitySequenceNumber;if(r!==n){var o=y(t,r);if(null!=o)return{index:i,discontinuityStartTime:o}}}return null}(s,null!==(i=l(o,e.getMimeType()))&&void 0!==i?i:d(o));if(!c){var S=null===(r=this.Z())||void 0===r?void 0:r.start;if(void 0===S)return;c={index:0,discontinuityStartTime:S},this.f.debug("Could not find discontinuity boundary with start time, using period start time ".concat(S))}this.f.debug("Assigning segment start times for rep ".concat(a," from discontinuity at index ").concat(c.index," with time ").concat(c.discontinuityStartTime)),s[c.index].startTime=c.discontinuityStartTime;for(var g=c.index-1;g>=0;g--)s[g].startTime=s[g+1].startTime-s[g+1].duration;for(g=c.index+1;g<s.length;g++)s[g].startTime=s[g-1].startTime+s[g-1].duration}},e.prototype.z=function(){return this.d.serviceManager.get(o.ServiceName.SourceStoreService,this.e.sourceIdentifier)},e.prototype.A=function(e,t){for(var n=-1,i=this.getSegmentListEntries(t),r=i.length-1;r>=0;r--)if((0,S.isIdenticalSegmentInfo)(i[r],e)){n=r;break}return n},e.prototype.B=function(e){var t,n=this,i=null===(t=this.m)||void 0===t?void 0:t.getAdaptationSet(e);i&&i.Representation.forEach((function(e){var t=n.o[e._internalId.key()];if(t||(t=n.F(e._internalId.key())),e.hasOwnProperty("SegmentList")&&(n.u(t,e),f.ModuleManager.has(p.ModuleName.DASH))){var i=f.ModuleManager.get(p.ModuleName.DASH).initSegmentInfoSourceDetectors.isInitializationNode;if(!t.hasOwnProperty("init")&&e.hasOwnProperty("SegmentBase")&&e.SegmentBase&&i(e.SegmentBase[0])){var r=f.ModuleManager.get(p.ModuleName.DASH).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty;t.init=r(e.SegmentBase[0],e)}}}))},e.prototype.C=function(){var e,t,n=this,i=null===(e=this.d.serviceManager.get(o.ServiceName.SourceStoreService,this.e.sourceIdentifier).getState().activeTracks)||void 0===e?void 0:e[this.j.adaptationSetId];if((null===(t=null==i?void 0:i.selectedRepresentationId)||void 0===t?void 0:t.periodId)===this.j.periodId)return i.selectedRepresentationId;if(this.i){var r=this.m.getRepresentation(this.j,this.i.representationId);if(r)return r._internalId}return(this.D((function(e){return n.isSegmentInfoLoaded(e._internalId)}))||this.D())._internalId},e.prototype.D=function(e){return this.m.getMatchingRepresentationByBandwidth(this.j,this.G(),e)},e.prototype.E=function(){var e=this.j.equals(this.i),t=!this.i||Boolean(this.m.getRepresentationById(this.i));return!this.i||!e||!t},e.prototype.setAdaptationSetId=function(e){this.j=e,this.B(this.j);var t,n=this.m.isLive(),i=0;this.E()&&(this.i=this.C());var r=this.o[this.i.key()];if(r||(r=this.F(this.i.key())),r&&n&&r.entries&&r.entries.length>0){var o=r.entries.length-1;this.h>o&&(i=this.h-o),this.h=Math.min(o,this.h||0),this.h=Math.max(0,this.h),t=r.entries[this.h]}if(this.h=this.h||0,n&&(this.l=this.getSegmentDuration()*this.g.LIVE_SEGMENT_LIST_START_INDEX_OFFSET),n){if(t&&r){var a=this.A(t,this.i);a>=0?this.h=a+i:this.I()}else this.I();var s=this.H();s?this.U(s):this.resolvePendingSegmentInfoRequests()}else this.resolvePendingSegmentInfoRequests()},e.prototype.F=function(e){var t={totalDuration:0,entries:[],SegmentURL:[],startNumber:0,init:null,maximumSegmentDuration:1,timescale:1};return this.o[e]=t,t},e.prototype.G=function(){var e=0,t=this.lb();return t&&(e=t._bandwidth),e},e.prototype.H=function(){var e;if(this.m.isHlsManifest()){var t=this.m.getRepresentationById(this.i);if(null===(e=null==t?void 0:t._hls)||void 0===e?void 0:e.loadFailureReason)return t._hls.loadFailureReason}return this.hasNext()||this.m.isLastPeriod(this.i.periodId)?null:h.SegmentInfoError.PERIOD_COMPLETE},e.prototype.I=function(){this.g.ENABLE_SEEK_FOR_LIVE?this.h=0:this.timeShift(0)},e.prototype.J=function(e,t){var n,i,r=this.m.getRepresentationById(e),o=this.m.getRepresentationById(t),a=(0,c.isNumber)(null===(n=null==o?void 0:o._hls)||void 0===n?void 0:n.mediaSequence)&&(0,c.isNumber)(null===(i=null==r?void 0:r._hls)||void 0===i?void 0:i.mediaSequence);if(r&&o&&a){var s=o._hls.mediaSequence-r._hls.mediaSequence,l=this.getSegmentListEntries(e),d=this.getSegmentListEntries(t);s>=l.length||(d[0].startTime=l[s].startTime,(0,u.forEachFromIndex)(d,1,(function(e,t){(0,c.isNumber)(e.startTime)&&(0,c.isNumber)(e.duration)&&(t.startTime=e.startTime+e.duration)})))}},e.prototype.setRepresentationId=function(e){var t=this.m.getRepresentationById(e),n=this.getSegmentListEntries(this.i)[this.h];if(t){var i=void 0===this.i,r=this.i;if(this.i=e,this.m.isLive()&&t._hls)if(this.g.HLS_SYNC_SEGMENT_PLAYBACK_TIME_VIA_MEDIA_SEQUENCE&&this.J(r,this.i),i)this.I();else if(this.g.HLS_SYNC_VIA_MEDIA_SEQUENCE){var o=this.m.getRepresentationById(r)._hls.mediaSequence+this.h;this.h=o-t._hls.mediaSequence,this.h=Math.max(this.h,0)}else if(null!=(null==n?void 0:n.startTime)&&!isNaN(n.startTime)){var a=this.pb(n.startTime);null===a||isNaN(a)||(this.h=this.K(a,n.startTime))}return!0}return!1},e.prototype.K=function(e,t){var n=this.getSegmentListEntries(this.i),i=[n[e],n[e+1]];if(e===n.length-1||i.some((function(e){return!e.startTime})))return e;var r=i.map((function(e){return Math.abs(e.startTime-t)})),o=Math.min.apply(this,r);return e+r.indexOf(o)},e.prototype.getInitSegmentInfo=function(){var e=this.mb(this.i);if(null==e?void 0:e.init)return e.init.presentationTimeOffset=this.getTimestampOffset(),e.init;var t=this.getSegmentListEntries(this.i);if(this.R(t)&&this.h>-1){var n=i({},t[this.h]);if(n.init){var r=n.init;return r.isInitSegment=!0,r}}return null},e.prototype.L=function(e){var t;if(!(this.getSegmentListEntries(this.i).length<1||this.h<0)){var n=this.M(e);return n&&this.f.debug("".concat(null===(t=this.j)||void 0===t?void 0:t.adaptationSetId," given time ").concat(e," matches seek time, performing precise segment/part search"),e),(0,v.isPlayingLowLatencyHls)(this.d)&&this.N(e,n),this.O(e,n)}},e.prototype.M=function(e){var t;return e===(null===(t=this.p)||void 0===t?void 0:t.targetPlaybackTime)||!1},e.prototype.N=function(e,t){var n;if(0!==e){if(this.h=this.pb(e),!t){var i=this.getSegmentListEntries(this.i),r=i[this.h];if(!(r.parts&&r.parts.length>0)){var o=this.h;this.h=b(e,this.h,i),this.h!==o&&this.f.debug("Snapped segment index for time ".concat(e," to next segment boundary at ").concat(null===(n=i[this.h])||void 0===n?void 0:n.startTime))}}}else this.d.logger.debug("Ignoring target time of 0 for LL-HLS")},e.prototype.O=function(e,t){var n=this.getSegmentListEntries(this.i);if(this.R(n)){var i=n[this.h];if(!(i.parts&&i.parts.length>0))return this.Q();if(_(i))return R(i,e,t);var r=R(i,e,t);return r?i.parts.indexOf(r)>0?r:this.Q():(this.h++,this.O(e,t))}},e.prototype.getNextSegmentInfo=function(e){var t=this.L(e);return t?(this.P(t),Promise.resolve(t)):this.T({time:e})},e.prototype.P=function(e){return e.presentationTimeOffset=this.getTimestampOffset(),e.startTime&&(e.wallClockTime=(0,d.toMilliSeconds)(e.startTime)),e},e.prototype.Q=function(){return this.getSegmentListEntries(this.i)[this.h++]},e.prototype.getSegmentInfos=function(){var e=this,t={},n=this.m.getAdaptationSet(this.j);return n&&n.Representation.forEach((function(n){var i=e.getSegmentListEntries(n._internalId);t[n._id]=i.map((function(e){return{url:e.url,duration:e.duration,startTime:e.startTime}}))})),t},e.prototype.getSubtitleUrl=function(){return this.m.getAvailableSubtitles(this.j.periodId)[0].url},e.prototype.getStartNumber=function(){var e=this.mb(this.i);return e?e.startNumber:1},e.prototype.getSegmentDuration=function(){var e=this,t=this.mb(this.i),n=this.getSegmentListEntries(this.i);if(t)return n.length>0&&(0,c.isNumber)(t.totalDuration)?t.totalDuration/n.length:t.maximumSegmentDuration;if(this.m.getAdaptationSet(this.j)){var i=Object.keys(this.o).map((function(t){return e.o[t]})).find((function(e){return null!==e}));if(i)return i.maximumSegmentDuration}return 1},e.prototype.seekTo=function(e){e>-1&&(this.h=this.pb(e))},e.prototype.R=function(e){return this.h<e.length},e.prototype.hasNext=function(){var e=this.getSegmentListEntries(this.i);return!this.i||!e.length||(this.m.isLive()?this.S(e):this.R(e))},e.prototype.S=function(e){return!!this.m.isLastPeriod(this.i.periodId)||this.R(e)},e.prototype.setTimestampOffset=function(e,t){void 0===t&&(t=1),this.n=e/t},e.prototype.getTimestampOffset=function(){if(!isNaN(this.n))return this.n;var e=this.Z(),t=0;if(this.i){var n=this.mb(this.i);n&&!isNaN(n.presentationTimeOffset)&&(t=n.presentationTimeOffset/n.timescale)}return e&&!this.m.isHlsManifest()&&(t-=e.start),t},e.prototype.getIndex=function(){return this.h},e.prototype.setIndex=function(e){if("number"==typeof e)return e<0?(this.f.debug("Tried to set index at MPDHandler to value smaller 0. Setting to 0."),void(this.h=0)):void(this.h=e);this.f.debug("Tried to set index at MPDHandler with parameter not being a number!")},e.prototype.T=function(e){var t,n=this;if(this.k)return Promise.reject("fail");var r=this.m.getRepresentationById(this.i);return(null===(t=null==r?void 0:r._hls)||void 0===t?void 0:t.loadFailureReason)?Promise.reject(r._hls.loadFailureReason):(this.f.debug("No segment info was found for the target time. Waiting for representation update."),new Promise((function(t,r){n.k=i(i({},e),{resolve:t,reject:r})})))},e.prototype.resolvePendingSegmentInfoRequests=function(){if(this.k){var e=this.L(this.k.time);e?(this.P(e),this.k.resolve(e),this.k=null):this.m.isLive()||this.hasNext()||this.k.reject(h.SegmentInfoError.END_OF_STREAM_REACHED)}},e.prototype.U=function(e){this.k&&(this.k.reject(e),this.k=null)},e.prototype.V=function(){var e=this.getSegmentListEntries(this.i);return e.length>0?e.length-1:0},e.prototype.W=function(e){for(var t,n=Math.abs(e),i=this.getSegmentDuration(),r=this.getSegmentListEntries(this.i),o=this.V(),a=0,s=r.length-1;s>=0&&!((a+=null!==(t=r[s].duration)&&void 0!==t?t:i)>=n);s--)o--;return Math.max(0,o)},e.prototype.timeShift=function(e,t,n){if(this.m.isLive()){var i=this.h;this.h=n&&this.X()?this.pb(n):this.W(e),this.f.debug("timeShift changes index from ".concat(i," to ").concat(this.h,", based on")+" offset ".concat(e," and target time ").concat(n))}},e.prototype.X=function(){var e,t=null===(e=this.getSegmentListEntries(this.i)[0])||void 0===e?void 0:e.startTime;return(0,c.isNumber)(t)&&t>=0},e.prototype.updateRepresentation=function(e){return Promise.resolve(e)},e.prototype.isSegmentInfoLoaded=function(e){if(void 0===e&&(e=this.i),!e)return!1;var t=this.getSegmentListEntries(e),n=this.m.getRepresentationById(e);return!(!t.length||!n)},e.prototype.Y=function(e){this.f.debug("Rewinding segment list index by ".concat(e," segments")),this.h-=e,this.h<0&&(this.f.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.h=0)},e.prototype.rewindOneSegment=function(){return this.h--,!(this.h<0&&(this.f.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.h=0,1))},e.prototype.Z=function(){return this.m.getPeriod(this.i)},e.prototype.kb=function(e){var t=this.Z().start;return(this.m.hasSinglePeriod()?this.getSeekableRange().start:t)+this.getSegmentListEntries(this.i).slice(0,e).reduce((function(e,t){return e+t.duration}),0)},e.prototype.lb=function(){return this.m.getRepresentationById(this.i)},e.prototype.mb=function(e){if(e)return this.o[e.key()]},e.prototype.getSegmentListEntries=function(e){var t,n;return e?this.g.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE&&this.m.isHlsManifest()?this.nb(e):null!==(n=null===(t=this.mb(e))||void 0===t?void 0:t.entries)&&void 0!==n?n:[]:[]},e.prototype.nb=function(e){var t,n=null===(t=this.z())||void 0===t?void 0:t.getState();return(0,g.getSegmentInfos)(n,e.key())},e.prototype.ob=function(e,t){var n,i;if(!this.j)return 0;for(var r=this.m.getPeriod(this.j),o=null!==(n=null==r?void 0:r.start)&&void 0!==n?n:0,a=this.getSegmentListEntries(this.i),s=0,u=o;u<=t&&s<a.length;s++)u+=null!==(i=a[s].duration)&&void 0!==i?i:0;return Math.max(s-1,0)},e.prototype.pb=function(e){var t,n,i=this.mb(this.i),r=this.getSegmentListEntries(this.i);if(!i||0===r.length||!(0,c.isNumber)(i.totalDuration))return 0;var o=this.qb(),a=(null===(t=this.m)||void 0===t?void 0:t.isFirstPeriod(null===(n=this.i)||void 0===n?void 0:n.periodId))?o+this.l:o,s=Math.max(a,e),u=i.totalDuration/r.length,l=(0,E.findSegmentIndexForTime)(r,s,u);return null!==l?l:this.ob(i,s)},e.prototype.qb=function(e){var t,n;void 0===e&&(e=this.i);var i=null===(n=null===(t=this.m)||void 0===t?void 0:t.getPeriod(e))||void 0===n?void 0:n.start;return void 0!==i?i:(this.f.debug("Unexpected period start of undefined for period ".concat(e.periodId,", falling back to 0")),0)},e.prototype.getLiveEdgeTime=function(){var e,t,n,i=null===(e=this.m)||void 0===e?void 0:e.getLastPeriod();if(void 0===(null==i?void 0:i.start))return 1/0;var r=null!==(t=this.rb())&&void 0!==t?t:l.DurationConverter.getDurationInSec(null!==(n=i._duration)&&void 0!==n?n:"");return i.start+r},e.prototype.rb=function(){var e;return null===(e=this.mb(this.i))||void 0===e?void 0:e.totalDuration},e.prototype.getActualTimeShiftBufferDepth=function(){return this.m.getTimeShiftBufferDepthSeconds()},e.prototype.getSeekableRange=function(){var e={start:0,end:0},t=this.m.getTotalDuration();if(!this.m.isLive())return e.start=(0,a.getStartTimeOffset)(this.z().getState()),e.end=t,e;var n=this.m.getTimeShiftBufferDepthSeconds(),i=(0,d.toSeconds)(this.m.getRequestTimestamp()-this.m.getAvailabilityStartTime());if(e.start=Math.max(i+n,0),e.end=Math.max(i,0),f.ModuleManager.has(p.ModuleName.HLS)&&this.m.isHlsManifest()){var r=f.ModuleManager.get(p.ModuleName.HLS).selectors,o=r.getHlsState;"EVENT"===(0,r.getPlaylistType)(o(this.z().getState()))?(e.start=0,e.end=t):e.start+=this.l}return e.end-=this.m.getDesiredDistanceToLiveEdge(),e},e.prototype.getPendingSegmentInfoRequest=function(){return this.k},e.prototype.setPendingSegmentInfoRequest=function(e){this.k=e},e.prototype.canSwitchRepresentation=function(e){var t,n=this.getSegmentListEntries(this.i)[this.h];if(!n)return!0;var i=function(e,t,n){return void 0!==t.startTime&&void 0!==t.duration&&Math.abs(e-(t.startTime+t.duration))<n}(e,n,this.g.LL_HLS_SEGMENT_END_TIME_MATCHING_TOLERANCE);if(!_(n)&&i)return!0;var r=this.M(e);return!((null===(t=null==n?void 0:n.parts)||void 0===t?void 0:t.length)&&R(n,e,r)!==n.parts[0])},e.prototype.getLatestTimeForPossibleSwitch=function(e){var t,n=this.sb(e),i=n.isLoadingCurrentSegmentsParts,r=n.currentSegment;return r&&i&&null!==(t=r.startTime)&&void 0!==t?t:e},e.prototype.adjustTimeToNextSegmentStart=function(e){var t=this.sb(e),n=t.isLoadingCurrentSegmentsParts,i=t.currentSegment;return n&&(null==i?void 0:i.startTime)&&(null==i?void 0:i.duration)?i.startTime+i.duration:e},e.prototype.sb=function(e){var t,n=function(e,t){var n,i,r;if(t&&!(t.length<1)&&(null===(n=t[0])||void 0===n?void 0:n.duration)){var o=(0,E.findSegmentIndexForTime)(t,e,t[0].duration),a=null===o,s=e<(null!==(r=null===(i=t[0])||void 0===i?void 0:i.startTime)&&void 0!==r?r:1/0),u=t[t.length-1];if(void 0!==u.startTime&&void 0!==u.duration){var l=e>u.startTime+u.duration;if(!(a||s||l))return t[o]}}}(e,this.getSegmentListEntries(this.i)),i=null===(t=null==n?void 0:n.parts)||void 0===t?void 0:t[0],r=this.M(e),o=!1;if(i&&n){var a=R(n,e,r);o=void 0!==a&&a!==i}return{currentSegment:n,isLoadingCurrentSegmentsParts:o}},e.prototype.dispose=function(){this.g=null,this.m=null,this.j=null,this.i=null,this.m=null,this.k=null,this.o=null},e}();function y(e,t){var n=e[String(t)];return n&&n.startTime>0?n.startTime:(n=e[String(t-1)])&&n.endTime>0?n.endTime:null}function T(e,t,n){var i;e.length&&n.hasSegmentStartTimeForHlsRepresentation(t)&&(null!=e[0].startTime?i=(0,u.findIndexFromEnd)(e,(function(e){return null!=e.startTime}))+1:(e[0].startTime=n.getStartTimeForHlsSegment(t,e[0]),i=1),(0,u.forEachFromIndex)(e,i,(function(e,t){return t.startTime=e.startTime+e.duration})))}function _(e){return e.url.endsWith(t.PHANTOM_SEGMENT_URL)}function O(e,n){var i=n.duration-e.duration;return I(n,e,["url","mediaURL","duration","parts","init","key","discontinuitySequenceNumber","isDiscontinuityStart"]),!e.url.endsWith(t.PHANTOM_SEGMENT_URL)&&(e.url=(0,s.forceReallocation)(e.url)),i}
19function I(e,t,n){n.forEach((function(n){return t[n]=e[n]}))}function R(e,t,n){var i,r=null===(i=e.parts)||void 0===i?void 0:i.every(E.isSegmentTiming);if(e.parts&&r){var o=e.parts,a=o.reduce((function(e,t){return e+t.duration}),0)/o.length,s=(0,E.findSegmentIndexForTime)(o,t,a);if(null!=s)return n?e.parts[0]:(s=b(t,s,o),e.parts[s])}}function b(e,t,n){var i=n[t],r=i.startTime+i.duration;return Math.abs(e-i.startTime)<=Math.abs(e-r)?t:t+1}t.SegmentListMPDHandler=m},827:function(e,t){function n(e){return[e.url,e.mediaURL].filter(Boolean)}function i(e,t){return null==e?null==t:null!=t&&e.start===t.start&&e.end===t.end}Object.defineProperty(t,"__esModule",{value:!0}),t.isIdenticalSegmentInfo=function(e,t){if(void 0!==e.mediaSequence&&void 0!==t.mediaSequence)return e.mediaSequence===t.mediaSequence;var r=function(e,t){var i=n(e),r=n(t);return i.some((function(e){return r.includes(e)}))}(e,t),o=i(e.byteRange,t.byteRange),a=e.discontinuitySequenceNumber===t.discontinuitySequenceNumber;return r&&o&&a},t.isIdenticalInitSegmentInfo=function(e,t){var n=(null==e?void 0:e.url)===(null==t?void 0:t.url),r=i(null==e?void 0:e.byteRange,null==t?void 0:t.byteRange);return n&&r}},2498:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMostRecentlyRefreshedQuality=t.getSegmentInfos=t.getSegmentMapEntry=void 0,t.getSegmentMapEntry=function(e,t){return null==e?void 0:e.segmentInfoMap[t]},t.getSegmentInfos=function(e,n){var i,r;return null!==(r=null===(i=(0,t.getSegmentMapEntry)(e,n))||void 0===i?void 0:i.segmentInfos)&&void 0!==r?r:[]},t.getMostRecentlyRefreshedQuality=function(e){if(e)return Object.values(e.segmentInfoMap).filter((function(e){return null!=e.qualityInfo.lastUpdateTimestamp})).sort((function(e,t){var n=e.qualityInfo.lastUpdateTimestamp;return t.qualityInfo.lastUpdateTimestamp-n}))[0]}},962:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isLowLatencyConfigured=function(e){var t=e.serviceManager.get(i.ServiceName.LiveLatencyService);return(null==t?void 0:t.isConfigured())||!1};var i=n(813)},729:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlayingLowLatencyHls=function(e){var t;if(!(0,a.isLowLatencyConfigured)(e)||!e.settings.LL_HLS)return!1;var n=(0,i.getSourceState)(e);if(!n)return!1;var s=r.ModuleManager.get(o.ModuleName.HLS,!1);if(!s)return!1;var u=s.selectors,l=u.getHlsState,d=u.getIsLowLatencyPlaylist,c=l(n);return!!c&&null!==(t=d(c))&&void 0!==t&&t};var i=n(5971),r=n(8052),o=n(2756),a=n(962)},8041:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.installWorkerPolyfills=function(){Array.prototype.includes||i.ArrayIncludesPolyfill.polyfill(),String.prototype.includes||o.StringIncludesPolyfill.polyfill(),String.prototype.startsWith||a.StringStartsWithPolyfill.polyfill(),String.prototype.endsWith||r.StringEndsWithPolyfill.polyfill()};var i=n(4499),r=n(3878),o=n(4205),a=n(829)}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}!function(){n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),n(6110)}();',i.p+"ac3121a55122bc6ac206.worker.js")}},16661:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CodecDetector=void 0,t.extractCodecFromTsSegment=h,t.extractCodecFromMp4Segment=p,t.mergeSegmentCodecs=f,t.isFmp4Segment=m;var n=i(66790),r=i(3336),o=i(4129),a=i(74853),s=i(58313),l=i(88052),c=i(62756),u=i(95880),d=i(18146);function h(e,t){if(!l.ModuleManager.has(c.ModuleName.ContainerTS))return Promise.reject(new u.PlayerModuleMissingError(c.ModuleName.ContainerTS));var i=function(e){return new(l.ModuleManager.get(c.ModuleName.ContainerTS)).WebWorkerTransmuxer(e,!1)}(t);return i.transmuxSegment(e).then(function(t){var i=f(t.transmuxedSegments);if(!i)throw"couldn't detect codec for ".concat(e.getMimeType());return i}).finally(function(){i.dispose()})}function p(e){if(!l.ModuleManager.has(c.ModuleName.ContainerMP4))return Promise.reject(new u.PlayerModuleMissingError(c.ModuleName.ContainerMP4));var t=l.ModuleManager.get(c.ModuleName.ContainerMP4).getCodecFromSegment(e);
19return t?Promise.resolve(t):Promise.reject("couldn't detect codec for ".concat(e.getMimeType()))}function f(e){for(var t="",i=0,n=e;i<n.length;i++){var r=n[i];if(!r.getCodec())return null;t+=(""===t?"":",")+r.getCodec()}return t}function m(e){for(var t=e.getData(),i=new DataView(t,0,t.byteLength),n=[],r=0;r+8<i.byteLength;){var o=i.getUint32(r);if(0===o)break;var s=a.ArrayHelper.extractAsciiString(i,r+4,4);n.push(s),r+=o}return e.isInit()?["ftyp","moov"].every(function(e){return n.includes(e)}):["moof","mdat"].every(function(e){return n.includes(e)})}t.CodecDetector=function(){function e(e,t){this.qP=e,this.rP=t,this.sP=new o.DefaultContentLoader(this.qP)}return e.prototype.tP=function(e){var t;return this.qP.segmentPrefetchingService?null!=(t=this.qP.segmentPrefetchingService.getPrefetchedSegment(e,this.rP))?t:this.qP.segmentPrefetchingService.fetch(e,this.rP):Promise.reject()},e.prototype.probeCodecs=function(e,t,i,o,a){var l=this;void 0===a&&(a=t?e.length-1:0);var c=e.slice(),u=t?c.pop():c.shift();if(!u)return Promise.reject(Error("Could not load any segment"));var h,p=u.init,f=void 0!==p,m=(0,s.extractOrigin)(i),g=s.URLHelper.buildAbsoluteUrl(i,m,f?p.url:u.uri),v=function(e,t,i,n){for(var r,o=0,a=e;o<a.length;o++){var s=a[o];r=(0,d.generateSegmentEncryptionInfo)(s,t,i,n)}return r}((f?p.keys:u.keys)??[],i,m,o+a);(null==v?void 0:v.method)===n.HlsEncryptionMethod.AES_128&&(h=v);var y=function(e,t,i){return{url:e,key:i,byteRange:(0,d.parseSegmentByteRange)(t.byterange),mimeType:"unknown/mp4",internalRepresentationId:null,isInitSegment:!!t.init,preventDownloadCanceling:!0}}(g,u,h);return this.tP(y).then(function(e){return l.uP(e)}).catch(function(e){if(e instanceof r.PlayerError)return Promise.reject(e);l.qP.logger.debug("Codec probing from segment failed",e);var n=t?a-1:a+1;return l.probeCodecs(c,t,i,o,n)}).then(function(e){return l.qP.logger.debug("Probed codec is",e),e})},e.prototype.uP=function(e){return m(e)?p(e):h(e,this.qP)},e}()},8251:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscontinuitySequenceNumberTracker=void 0,t.DiscontinuitySequenceNumberTracker=function(){function e(e){this.Kn=e,this.Mn=[],this.reset()}return e.prototype.Nn=function(e){var t=this;this.Mn.forEach(function(i){return i(t.Ln,e)})},e.prototype.trackSegment=function(e){if(this.Kn(e.getMimeType())&&!e.isInit()){var t=e.getSegmentInfo(),i=null==t?void 0:t.discontinuitySequenceNumber,n=isFinite(this.Ln),r=this.Ln!==i;n&&r&&this.Nn(i),this.Ln=i}},e.prototype.subscribe=function(e){this.Mn.push(e)},e.prototype.unsubscribe=function(e){var t=this.Mn.indexOf(e);t<0||this.Mn.splice(t,1)},e.prototype.reset=function(){this.Ln=-1/0},e.prototype.dispose=function(){this.reset(),this.Mn=[]},e}()},15617:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsBackupStreamsHandler=t.BackupStreamErrors=void 0,t.getLocationIdForRep=y;var r,o=i(80813),a=i(3714),s=i(43446),l=i(15971),c=i(85434),u=i(15014),d=i(14302),h=i(59707),p=i(62198),f=i(90919),m=i(18146),g=i(73315);function v(e,t){var i,n,r,o,a=t&&null!=(o=null==(r=null==(n=null==(i=(0,p.getManifest)(t))?void 0:i.BaseURL)?void 0:n[0])?void 0:r.url)?o:"";return m.PlaylistUtils.getBaseUrl(a,e)}function y(e,t){var i,n;if(e)return b(null!=(n=null==(i=t[e._mimeType])?void 0:i[e._id])?n:{},e.Uri)}function b(e,t){return Object.keys(e).find(function(i){return Object.values(e[i]).includes(t)})}function S(e,t){var i={},n=[];for(var r in e){var o=e[r][t];n.includes(o)||(n.push(o),i[r]=e[r])}return i}!function(e){e.ALL_PENALIZED="ALL_PENALIZED",e.LOADING_FAILED="LOADING_FAILED",e.NO_BACKUP_STREAMS="NO_BACKUP_STREAMS"}(r||(t.BackupStreamErrors=r={})),t.HlsBackupStreamsHandler=function(){function e(e,t,i){this.context=e,this.backupStreamInfo=t,this.updateRepresentation=i,this.backupStreamsMap={}
19,this.penalizedStreams={},this.vP=!1,this.wP=!1,this.xP=e.serviceManager.get(o.ServiceName.ManifestService,e.sourceContext.sourceIdentifier),this.yP=this.context.serviceManager.get(o.ServiceName.ManifestUpdateSchedulingService,this.context.sourceContext.sourceIdentifier)}return e.prototype.populateBackupStreamsMap=function(e){this.backupStreamsMap=function(e,t){var i,n=((i={})[c.MimeType.AudioMp4]={},i[c.MimeType.VideoMp4]={},i);return t.forEach(function(t){var i,r=t._mimeType===c.MimeType.AudioMp4?null!=(i=t._name)?i:c.MimeType.AudioMp4:c.MimeType.VideoMp4,o=e.find(function(e){return Object.values(e).find(function(e){return e[r]===t.Uri})});o&&(n[t._mimeType][t._id]=S(o,r))}),n}(this.backupStreamInfo,e);var t,i,n=y(null!=(t=e.find(function(e){return c.MimeTypeHelper.isVideo(e._mimeType)}))?t:e[0],this.backupStreamsMap);void 0!==n&&(this.context.logger.debug("Setting initial content location ID to ".concat(n)),null==(i=(0,l.getSourceStore)(this.context))||i.dispatch((0,g.setContentLocationId)(n)))},e.prototype.isCurrentlySwitchingToBackupStreams=function(){return this.wP},e.prototype.signalLoadingFinished=function(){this.vP=!0},e.prototype.switchToBackupStream=function(e,t){var i,n,o=this,s=null!=(n=null==(i=this.backupStreamsMap[e._mimeType])?void 0:i[e._id])?n:{};if(Object.keys(s).length<=1)return Promise.reject(r.NO_BACKUP_STREAMS);var c=this.getCurrentRepresentation(e._mimeType),u=(null==c?void 0:c._id)===e._id&&(null==c?void 0:c.Uri)!==e.Uri,h=function(e,t){if(!t)return!0;var i,n,r=null==(n=null==(i=e.SegmentList)?void 0:i[0])?void 0:n.SegmentURL;return!!r&&-1!==(0,f.findSegmentUrlIndexWithinSegmentList)(t,r)}(e,t);if(u||!h)return this.context.logger.debug("Ignoring outdated failover request for ".concat(e._mimeType," rep ").concat(e._id),{hasPlaylistUriChanged:u,isSegmentInPlaylist:h}),Promise.resolve([c]);var p=b(s,e.Uri);if(void 0===p)return this.context.logger.debug("Could not find the failing rep in the current list of backup streams.",{id:e._id,uri:e.Uri,backupStreams:s}),Promise.reject(r.NO_BACKUP_STREAMS);this.AP(p),this.depenalizeExpiredStreams();var m=this.getNextLocationId(Object.keys(s),p);if(void 0===m)return this.context.logger.debug("No other backup stream is available: all penalized."),Promise.reject(r.ALL_PENALIZED);this.context.logger.debug("Starting failover from stream ".concat(p," to ").concat(m));var v=this.zP(e);return this.triggerPlaylistRotation(v,p,m).then(function(e){var t,i,n,r=b(s,null!=(i=null==(t=e[0])?void 0:t.Uri)?i:"");return o.context.logger.debug("Successfully completed failover to stream index ".concat(r)),void 0!==r&&r!==p&&(null==(n=(0,l.getSourceStore)(o.context))||n.dispatch((0,g.setContentLocationId)(String(r))),o.context.eventHandler.dispatchEvent(a.PlayerEvent.ContentLocationChanged,{sourceLocationId:p,targetLocationId:r,reason:a.ContentLocationChangedReason.Failover})),e}).catch(function(e){return e===d.REPRESENTATION_UPDATE_CANCEL?Promise.reject(e):(o.context.logger.debug("Failover from stream ".concat(p," to ").concat(m," failed")),Promise.reject(r.LOADING_FAILED))})},e.prototype.zP=function(e){var t=[e],i=e._mimeType===c.MimeType.AudioMp4?this.getCurrentRepresentation(c.MimeType.VideoMp4):this.getCurrentRepresentation(c.MimeType.AudioMp4);return i&&this.vP&&t.push(i),t},e.prototype.AP=function(e){this.context.logger.debug("Penalizing stream ".concat(e," for ").concat(this.context.settings.HLS_BACKUP_STREAM_PENALTY_DURATION,"s")),this.penalizedStream
19s[e]=s.TimingUtil.getHiResTimestamp()},e.prototype.depenalizeExpiredStreams=function(){var e=this,t=s.TimingUtil.getHiResTimestamp();Object.keys(this.penalizedStreams).forEach(function(i){t-e.penalizedStreams[i]>=e.context.settings.HLS_BACKUP_STREAM_PENALTY_DURATION&&(e.context.logger.debug("Depenalizing stream ".concat(i)),delete e.penalizedStreams[i])})},e.prototype.triggerPlaylistRotation=function(e,t,i){var n=this,r=e.map(function(e){return n.BP(e,i).catch(function(i){var r;return i!==d.REPRESENTATION_UPDATE_CANCEL&&(n.context.logger.debug("Failed to rotate URL for rep ".concat(e._id,": ").concat(null!=(r=null==i?void 0:i.message)?r:i)),n.CP(e,t)),Promise.reject(i)})});return this.wP=!0,Promise.all(r).finally(function(){return n.wP=!1})},e.prototype.BP=function(e,t){var i=this,n=(0,l.getSourceStore)(this.context);if(!n)return Promise.resolve(e);this.FP(e,t,n);var r=(0,p.getManifest)(n.getState());if(!r)return Promise.resolve(e);var o=e._internalId,a=(0,u.findRepresentation)(r,o);return e.Uri===(null==a?void 0:a.Uri)?(this.context.logger.debug("Current ".concat(e._mimeType," rep ").concat(e._id," does not need update")),Promise.resolve(e)):(this.context.logger.debug("Rotating URL for rep ".concat(e._id," from ").concat(e.Uri," to ").concat(a.Uri)),this.DP(e).then(function(){return i.updateRepresentation(a)}).then(function(e){return i.EP(e),e}))},e.prototype.CP=function(e,t){var i=(0,l.getSourceStore)(this.context);i&&(this.FP(e,t,i),this.context.logger.debug("Restoring URL for rep ".concat(e._id," to ").concat(e.Uri)),this.EP(e))},e.prototype.DP=function(e){var t;return null!=(t=this.xP)&&t.isLive()&&this.yP?this.yP.stopRepresentationUpdates(e):Promise.resolve()},e.prototype.EP=function(e){var t,i;null!=(t=this.xP)&&t.isLive()&&(null==(i=this.yP)||i.scheduleRepresentationUpdate(e))},e.prototype.FP=function(e,t,i){var r,o=this;null==(r=this.xP)||r.getAllRepresentations().filter(function(t){return t._mimeType===e._mimeType}).forEach(function(r){var a,s,l,c,u=null!=(s=null==(a=o.backupStreamsMap[r._mimeType])?void 0:a[r._id])?s:{},d=null!=(l=r._name)?l:r._mimeType,p=null==(c=u[t])?void 0:c[d];if(p&&r.Uri!==p){var f=n(n({},r),{Uri:p,BaseURL:[{url:v(p,i.getState())}],SegmentList:r.SegmentList?[n(n({},r.SegmentList[0]),{SegmentURL:[]})]:r.SegmentList,_requestTimestamp:r._id!==e._id?0:r._requestTimestamp});i.dispatch((0,h.updateRepresentationAction)(f))}})},e.prototype.getNextLocationId=function(e,t){for(var i=Number(t)||0,n=1;n<=e.length;n++){var r=(i+n)%e.length;
19if(void 0===this.penalizedStreams[r])return String(r)}},e.prototype.getCurrentRepresentation=function(e){var t,i,n=this.context.serviceManager.get(o.ServiceName.AdaptationService),r=null!=(t=null==n?void 0:n.getCurrentRepresentationId(e))?t:void 0;return null==(i=this.xP)?void 0:i.getRepresentationById(r)},e.prototype.getNextBackupUriForCodecProbing=function(e){var t,i,n,r,o,a=function(t){return Object.keys(t).find(function(i){return t[i]===e})},s=null!=(t=this.backupStreamInfo.find(function(e){return Object.values(e).some(a)}))?t:{},l=null!=(i=Object.keys(s).find(function(e){return a(s[e])}))?i:"",c=null!=(n=s[l])?n:{},u=null!=(r=Object.keys(c).find(function(t){return c[t]===e}))?r:"",d=S(s,u),h=Object.keys(d),p=h.indexOf(l);return null==(o=d[h[p+1]])?void 0:o[u]},e.prototype.dispose=function(){this.penalizedStreams={}},e}()},40870:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.HlsContentSteeringHandler=void 0;var r=i(40306),o=i(3336),a=i(3714),s=i(4129),l=i(77401),c=i(29669),u=i(15971),d=i(85434),h=i(89927),p=i(88844),f=i(58313),m=i(15617),g=i(23483),v=i(73315),y=i(61895);t.HlsContentSteeringHandler=function(e){function t(t,i,n,a){var u,d=e.call(this,t,i,n)||this;if(d.context=t,d.backupStreamInfo=i,d.updateRepresentation=n,d.defaultContentSteeringInfo=a,d.qQ=function(){var e,t=null==(e=d.context.sourceContext.source.options)?void 0:e.manifestWithCredentials;d.oQ.load(d.mQ,c.HttpRequestMethod.GET,void 0,void 0,void 0,t).then(function(e){return d.rQ(e)}).catch(function(e){var t;(null==e?void 0:e.message)===l.RequestError.Canceled||d.context.isDisposed||(d.context.logger.debug("Loading of the steering manifest failed",null!=(t=null==e?void 0:e.message)?t:e),d.pQ())})},d.mQ=null==(u=d.defaultContentSteeringInfo.attributes)?void 0:u["SERVER-URI"],!d.mQ)throw new o.PlayerError(r.ErrorCode.SOURCE_MANIFEST_INVALID,{message:"The EXT-X-CONTENT-STEERING tag is missing the required SERVER-URI attribute."},"Invalid HLS manifest: missing required content steering SERVER-URI attribute.",d.context.sourceContext.sourceIdentifier);return d.oQ=new s.DefaultContentLoader(d.context,{maxRetries:d.context.settings.MAX_MPD_RETRIES,requestType:c.HttpRequestType.MANIFEST_STEERING,resetRetriesWhenOffline:!0}),d.lQ=2e3,d}return n(t,e),t.prototype.populateBackupStreamsMap=function(t){e.prototype.populateBackupStreamsMap.call(this,t),this.pQ()},t.prototype.pQ=function(){(0,p.clearTimeoutIfDefined)(this.kQ),this.kQ=window.setTimeout(this.qQ,this.lQ)},t.prototype.rQ=function(e){if(!this.context.isDisposed){var t=(0,g.parseSteeringManifest)(e.body);if(!t)return this.context.logger.debug("Ignoring invalid steering manifest"),void this.pQ();this.nQ=t["PATHWAY-PRIORITY"],this.sQ();var i=t["RELOAD-URI"];i&&(this.mQ=f.URLHelper.getAbsoluteUrl(i,e.url)),this.lQ=(0,h.toMilliSeconds)(t.TTL),this.pQ()}},t.prototype.sQ=function(){var e=this;if(this.isCurrentlySwitchingToBackupStreams())this.context.logger.debug("Cannot run content steering as HLS playlist rotation is already in progress");else{this.depenalizeExpiredStreams();var t=this.getNextLocationId([],void 0);if(t){var i=this.tQ();if(i)if(t!==i){this.context.logger.debug("Starting content steering from ".concat(i," to ").concat(t));var n=this.getCurrentRepresentation(d.MimeType.AudioMp4),r=[this.getCurrentRepresentation(d.MimeType.VideoMp4),n].filter(Boolean);0!==r.length?this.triggerPlaylistRotation(r,i,t).then(function(t){var n,r=(0,m.getLocationIdForRep)(t[0],e.backupStreamsMap);e.context.logger.debug("Successfully completed content steering to stream ".concat(r)),void 0!==r&&r!==i&&(null==(n=(0,u.getSourceStore)(e.context))||n.dispatch((0,v.setContentLocationId)(r)),e.context.eventHandler.dispatchEvent(a.PlayerEvent.ContentLocationChanged,{sourceLocationId:i,targetL
vendor: 53,392 bytes, lines 19-20
19ocationId:r,reason:a.ContentLocationChangedReason.ContentSteering}))}).catch(function(t){e.context.logger.debug("Content steering failed",t)}):this.context.logger.debug("Cannot run content steering as no active HLS representations are available")}else this.context.logger.debug("Content steering not needed as we are on the optimal pathway already");else this.context.logger.debug("Cannot run content steering as previous pathway has not been determined yet")}else this.context.logger.debug("Cannot run content steering as all streams are currently penalized")}},t.prototype.tQ=function(){var e,t=null==(e=(0,u.getSourceStore)(this.context))?void 0:e.getState(),i=t?(0,y.getHlsState)(t):void 0;return i?(0,y.getContentLocationId)(i):void 0},t.prototype.getNextLocationId=function(e,t){var i,n,r=this;return(null!=(n=null!=(i=this.nQ)?i:e)?n:[]).find(function(e){return!r.penalizedStreams[e]&&e!==t})},t.prototype.dispose=function(){(0,p.clearTimeoutIfDefined)(this.kQ),this.kQ=void 0,this.oQ.dispose(),e.prototype.dispose.call(this)},t}(m.HlsBackupStreamsHandler)},23483:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseSteeringManifest=function(e){if(e)try{var t=JSON.parse(e);return!function(e){if("object"!=typeof e||null===e)return!1;var t=e,i=t.VERSION,n="number"==typeof i&&Number.isInteger(i)&&i>0,r=t["PATHWAY-PRIORITY"],o=Array.isArray(r)&&r.length>0&&r.every(function(e){return"string"==typeof e}),a=t.TTL,s="number"==typeof a&&a>0,l=t["RELOAD-URI"],c=void 0===l||"string"==typeof l&&l.length>0;return n&&o&&s&&c}(t)?void 0:t}catch{return}}},30234:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isValidHlsPlaylist=function(e){return(0,c.isMasterPlaylist)(e)&&function(e){return e.playlists.length>0}(e)||(0,c.isMediaPlaylist)(e)&&function(e){return e.segments.length>0}(e)},t.getPeriod=function(e){return(0,a.getManifest)(e.getState()).Period[0]},t.parseHlsManifest=d,t.ensureMasterPlaylist=function(e,t,i){return(0,c.isMasterPlaylist)(t)?Promise.resolve(t):(e.logger.debug("HLS manifest is not a master playlist but a variant. Using master playlist template!"),d(e,["#EXTM3U","#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=0",i].join(`
20`)).then(function(e){if(!(0,c.isMasterPlaylist)(e))throw Error("Template is not of type HLS MasterPlaylist");return e}))},t.parsePlaylistInWorker=h,t.createDiscontinuitySequences=function(e,t){var i=c.PlaylistUtils.createDiscontinuitySequences(e,t);return i.forEach(function(e,t){c.PlaylistUtils.extrapolateProgramDateTime(e.segments),e.indexOfFirstSegment=0===t?0:i[t-1].indexOfLastSegment+1,e.indexOfLastSegment=e.indexOfFirstSegment+e.segments.length-1}),i},t.getTracksWithUnknownCodecs=function(e){return{audioTracksWithoutCodecs:e.media.filter(function(t){var i,n=t.attributes;if("AUDIO"!==n.TYPE||void 0===n.URI||void 0!==n.CODECS)return!1;var o=e.playlists.find(function(e){return e.attributes.AUDIO===n["GROUP-ID"]});if(void 0===o||o.uri===n.URI)return!1;var a=null==(i=o.attributes.CODECS)?void 0:i.split(",");return void 0===a||a.every(function(e){return!r.CodecStringHelper.isAudioCodec(e)})}),videoTracksWithoutCodecs:e.playlists.filter(function(e){return void 0===e.attributes.CODECS})}},t.updateMissingCodecsForPlaylists=function(e,t,i){!function(e,t){t.forEach(function(t){return t.attributes.CODECS=function(e,t){var i=Object.keys(r.CodecStringHelper.getExtractedCodecStrings(e)),n=r.CodecStringHelper.getExtractedCodecStrings(t),o=Object.keys(n).filter(function(e){return!i.includes(e)}).map(function(e){return n[e]}).join(",");return o&&0!==o.length?function(e,t){return"string"!=typeof e||0===e.length?t:e+","+t}(e,o):e}(t.attributes.CODECS,e)})}(e,p(t,i))},t.findAllOrMatchingVariants=p;var n=i(69957),r=i(34047),o=i(58313),a=i(62198),s=i(50962),l=i(37432),c=i(18146),u=i(97123);function d(e,t){var i={parsePartTags:(0,s.isLowLatencyConfigured)(e)&&e.settings.LL_HLS};return(e.settings.HLS_PARSE_MANIFEST_IN_WORKER?h(t,e.logger,i):function(e,t){try{(0,n.trackPerformanceStart)("HlsPlaylist.parsePlaylist");var i=(0,l.parsePlaylist)(e,t);return(0,n.trackPerformanceEnd)("HlsPlaylist.parsePlaylist"),Promise.resolve(i)}catch(e){return Promise.reject(e)}}(t,i)).then(function(t){if("playlists"in t){var i=t.playlists.filter(function(t){return t.attributes.BANDWIDTH>=e.settings.HLS_AUDIO_ONLY_THRESHOLD_BITRATE});t.playlists=i.length?i:t.playlists}return t})}function h(e,t,i){return u.WebWorkerParser.getInstance(t).parsePlaylist(e,i)}function p(e,t){var i,n=function(e){return e.playlists||[]}(e),r=n.some(function(e){return o.URLHelper.isSubUrl(t,e.uri)}),a=function(e,t){return(function(e){return e.media||[]})(e).find(function(e){var i;return o.URLHelper.isSubUrl(t,null==(i=e.attributes)?void 0:i.URI)})}(e,t);if(!r&&a){var s=null==(i=a.attributes)?void 0:i["GROUP-ID"];if(s)return n.filter(function(e){var t,i;return(null==(t=e.attributes)?void 0:t.AUDIO)===s||(null==(i=e.attributes)?void 0:i.VIDEO)===s})}return n}},56727:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsTimelineTracker=void 0;var n=i(80813),r=i(87827),o=i(15971),a=i(93204),s=i(90919),l=i(61895);function c(e,t,i,n){return{hasGap:e,gapSizeSec:t,couldHandle:i,correctedIndex:n}}function u(e){return e>=0&&isFinite(e)}function d(e,t,i){for(;e>.001;){if(i<=0)return -1;e-=t[i-1]._duration,i--}return i}function h(e,t,i){for(;e<-.001;)if(e+=t[i]._duration,++i>=t.length)return 1/0;return i}t.HlsTimelineTracker=function(){function e(e,t){var i=this;this.Vn=!1,this.On=e,this.Tn=-1,this.Pn=t,this.Qn=this.On.serviceManager.get(n.ServiceName.PlayerStateService),this.Rn=(0,a.subscribe)(this.On.store)(function(e){return(0,r.getTargetPlaybackTime)((0,r.getPlayerState)(e))},function(){return i.Un=!0},function(e){return -1!==e});var s=(0,o.getSourceStore)(this.On);s&&(this.Sn=(0,a.subscribe)(s)(function(e){return e&&(0,l.getContentLocationId)((0,l.getHlsState)(e))},function(){return i.Vn=!0},function(e,t){return e!==t}))}return e.prototype.reset=function(){this.Tn=-1,this.Vn=!1},e.prototype.isGapVerificationNeeded=function(){return this.Vn&&-1!==this.Tn},e.prototype.isSeekTargetVerificationNeeded=function(){return this.Un&&-1===this.Tn},e.prototype.trackPlaybackTime=function(e){var t,i=null==(t=e.getSegmentInfo())?void 0:t.duration,n=e.getDuration();this.Tn=e.getPlaybackTime()+Math.max(n,i??n)},e.prototype.checkForTimelineGap=function(e,t,i){if(this.Tn>=0)return this.Vn=!1,this.Wn(e,t,i);var n,r=null!=(n=this.Qn)&&n.seekingOrTimeshifting?this.Qn.targetPlaybackTime:-1;return this.Un&&r>-1?(this.Un=!1,this.Xn(r,e,t,i)):{hasGap:!1}},e.prototype.Wn=function(e,t,i){var n,r=function(e,t){var i,n=null==(i=e.getSegmentInfo())?void 0:i.startTime,r=e.getPlaybackTime();return void 0===n||Math.abs(r-n)>e.getDuration()+t?r:Math.min(r,n)}(e,this.Pn);if(function(e,t,i){return e>=t&&e<=i}(this.Tn,r-this.Pn,r+e.getDuration()))return{hasGap:!1};var o={hasGap:!1},a=e.getPlaybackTime()-this.Tn,l=t.SegmentList?t.SegmentList[0].SegmentURL:[],p=(0,s.findSegmentUrlIndexWithinSegmentList)(e.getSegmentInfo(),l),f=p>=0?p:i,m=f;return a>0?((n=u(m=d(a,l,f)))||(this.On.logger.debug("Could not handle gap on playlist switch, reached lower boundary of segment list"),m=0),o=c(!0,a,n,m)):a<0&&((n=u(m=h(a,l,f)))||(this.On.logger.debug("Could not handle gap on playlist switch, reached upper boundary of segment list"),m=l.length),o=c(!0,a,n,m)),m===f&&o.hasGap&&(this.On.logger.debug("Ignoring gap as calculated new segment index did not change"),o.hasGap=!1),o},e.prototype.Xn=function(e,t,i,n){var r=i.SegmentList?i.SegmentList[0].SegmentURL:[],o=t.getPlaybackTime(),a=t.getPlaybackTime()+t.getDuration();this.On.logger.debug("HLS seek target verification",{seekTarget:e,segmentStartTime:o,segmentEndTime:a});var l,p,f,m=(0,s.findSegmentUrlIndexWithinSegmentList)(t.getSegmentInfo(),r);return m=m>=0?m:n,e<o?((f=u(l=d(p=o-e,r,m)))||(l=0),this.On.logger.debug("Target segment starts too late, corrected segment index from ".concat(m," to ").concat(l)),c(!0,p,f,l)):e>a?((f=u(l=h(p=a-e,r,m)))||(l=r.length),this.On.logger.debug("Target segment ends too early, corrected segment index from ".concat(m," to ").concat(l)),c(!0,p,f,l)):{hasGap:!1}},e.prototype.dispose=function(){var e;null==(e=this.Sn)||e.call(this),this.Rn(),this.Vn=!1,this.Un=!1,this.Tn=-1},e}()},67113:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.M3u8DashManifest=void 0;var o=i(56481),a=i(32703),s=i(77179),l=i(74853),c=i(79721),u=i(89927),d=i(58313),h=i(70850),p=i(13422),f=i(96533),m=i(59707),g=i(62198),v=i(5671),y=i(80813),b=i(85434),S=i(52610),_=i(42594),E=i(57778),T=i(18146),w=i(47596),A=i(73315),P=i(61895);t.M3u8DashManifest=function(){function e(e,t){this.LP=-1/0,this.GP=e,this.HP=t,this.IP=new E.M3u8Translator(e,t),this.JP=1/0,this.KP=e.serviceManager.get(y.ServiceName.SourceStoreService,t.sourceIdentifier)}return e.prototype.updateBaseUrl=function(e){this.IP.updateBaseUrl(e)},e.prototype.getBaseUrl=function(){return this.IP.getBaseUrl()},e.prototype.MP=function(){return(0,P.getHlsState)(this.KP.getState())},e.prototype.findAdaptationSet=function(e){return this.getManifest().Period[0].AdaptationSet.find(function(t){var i;return t._internalId.adaptationSetId===e||(null==(i=t.ContentComponent)?void 0:i.some(function(t){return t._id===e}))})},e.prototype.createDashManifestSkeleton=function(e){var t=this.IP.createDashManifestSkeleton(e);return t=(0,p.orderAdaptationSetsByCodec)(t,(0,f.getCodecPriorities)(this.GP.config,this.HP.source)),(0,f.initializeInternalIds)(t)},e.prototype.extractBackupStreams=function(e){return this.IP.extractBackupStreams(e)},e.prototype.onMasterPlaylistAvailable=function(e){var t=this.createDashManifestSkeleton(e);this.KP.dispatch((0,m.setManifestAction)(t)),this.KP.dispatch((0,A.setDefaultLanguages)(e)),this.KP.dispatch((0,A.setCustomTags)(e)),this.KP.dispatch((0,A.setMasterPlaylistString)(e.rawString))},e.prototype.getManifest=function(){return(0,g.getManifest)(this.KP.getState())},e.prototype.getAllVariantRepresentions=function(){return this.getManifest().Period[0].AdaptationSet.filter(function(e){return b.MimeTypeHelper.isAV(e._mimeType)||b.MimeTypeHelper.isSubtitle(e._mimeType)||b.MimeTypeHelper.isImage(e._mimeType)}).flatMap(function(e){return e.Representation})},e.prototype.onMediaLoaded=function(e,t,i){var n=this;this.KP.dispatch((0,A.setMasterPlaylistString)(e)),this.KP.dispatch((0,A.setEndlist)(!!i.endList)),i.playlistType&&!(0,P.getPlaylistType)(this.MP())&&this.KP.dispatch((0,A.setPlaylistType)(i.playlistType)),void 0===(0,P.getIsLowLatencyPlaylist)(this.MP())&&this.KP.dispatch((0,A.setIsLowLatencyPlaylist)(void 0!==i.partInfo)),this.iQ(i),this.jQ(i);var r=this.getManifest().Period[0],o=this.eQ(t.Uri,r).map(function(e){return n.fQ(e,i)});return b.MimeTypeHelper.isAV(t._mimeType)&&(this.SP(i,o),this.TP(i)),o.forEach(function(e){var t=n.QP(e,i);n.RP(r,t,!i.endList),n.NP(e),n.GP.settings.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE&&n.OP(i,e)}),this.GP.serviceManager.maybeCall(y.ServiceName.TimedMetadataService,function(e){return(0,a.extractDateRangeMetadata)(i.dateRange,i.endList?i.programDateTime:void 0,function(t){e.processDateRangeEvent(t,c.DEFAULT_PERIOD_ID)})}),o.find(function(e){return e._id===t._id})},e.prototype.NP=function(e){var t,i=null==(t=e.ContentProtection)?void 0:t.map(function(e){return{_schemeIdUri:e._schemeIdUri,pssh:[],pro:[]}}),n=this.findAdaptationSet(e._internalId.adaptationSetId);if(n&&i&&i.some(function(e){var t;return!(null!=(t=n.ContentProtection)&&t.some(function(t){return t._schemeIdUri===e._schemeIdUri}))})){var o=n.ContentProtection?(0,h.removeDuplicates)(r(r([],n.ContentProtection,!0),i,!0)):i;this.KP.dispatch((0,m.updateAdaptationSetAction)(e._internalId,{ContentProtection:o}))}},e.prototype.OP=function(e,t){var i,n,r=t._internalId.key(),o=null==(i=this.KP.getState())?void 0:i.segmentInfoMap[r];o&&(n=(0,_.updateMapEntry)(o,e,t))||(n=(0,_.createNewMapEntry)(e,t),this.PP(n,e)),this.KP.dispatch((0,v.setSegmentInfos)(r,n))},e.prototype.PP=function(e,t){var i=this.KP.getState();if(i){var n=(0,w.getStartTimeExtrapolationReferencePoint)(e,t,i);(0,w.extrapolateStartTime)(e.segmentInfos,n)}},e.prototype.QP=function(e,t){var i,n,r,o=null!=(r=null==(n=null==(i=e.SegmentList)?void 0:i[0])?void 0:n.SegmentURL)?r:[];return o.length>0&&null!=o[0]._playbackTime?(0,P.getFirstDiscoSequenceTiming)(this.MP()).startTime:t.startTime},e.prototype.RP=function(e,t,i){var n=0===e.duration?this.JP:Math.min(e.duration,this.JP),r=i?1/0:n,o={start:t,_start:"PT".concat(t,"S"),duration:r,_duration:"PT".concat(n,"S")};this.KP.dispatch((0,m.updatePeriodTimingAction)(c.DEFAULT_PERIOD_ID,o))},e.prototype.SP=function(e,t){var i,n,r,o,a,s=e.totalDuration,l=null!=(i=t.find(function(t){return t.Uri===e.uri}))?i:t[0],c=null==(r=null==(n=null==l?void 0:l.SegmentList)?void 0:n[0])?void 0:r.SegmentURL,u=(null!=(o=null==c?void 0:c.length)?o:0)>0&&(null==(a=null==c?void 0:c[0])?void 0:a._playbackTime)!==void 0;if(c&&u){var d=(0,S.getTimingInfoFromSegmentList)(c);s=d.totalDuration,this.KP.dispatch((0,A.setDiscoTimings)(l._mimeType,d.discoTimings))}this.JP=e.endList?Math.min(this.JP,s):s},e.prototype.TP=function(e){var t,i=!e.endList,n=(0,g.getManifest)(this.KP.getState()),r={_requestTimestamp:e.requestTimestamp,_type:i?"dynamic":"static",_mediaPresentationDuration:i?1/0:"PT".concat(this.JP,"S"),_maxSegmentDuration:"PT".concat(e.targetDuration,"S"),_hasIndependentSegments:n._hasIndependentSegments||e.independentSegments};e.start&&(e.start.timeOffset=T.PlaylistUtils.getStartOffsetCloseToPlaylistEnd(e,this.LP),this.LP=e.start.timeOffset,r._startOffset=T.PlaylistUtils.getStartOffset(e)),i&&(r._minimumUpdatePeriod="PT".concat(e.targetDuration,"S"),r._timeShiftBufferDepth=-this.JP,r._availabilityStartTime=null!=(t=n._availabilityStartTime)?t:new Date(e.requestTimestamp-(0,u.toMilliSeconds)(this.JP)).toISOString()),this.KP.dispatch((0,m.updateManifestAction)(r))},e.prototype.eQ=function(e,t){return t.AdaptationSet.flatMap(function(t){return t.Representation.filter(function(t){return d.URLHelper.isSubUrl(e,t.Uri)})})},e.prototype.fQ=function(e,t){var i=n({},e);return i._requestTimestamp=t.requestTimestamp,i._updateInterval=(0,T.calculateUpdateIntervalInSeconds)(this.GP,t),i._hls=n(n({},i._hls),{requestTimestamp:t.requestTimestamp,mediaSequence:t.mediaSequence,serverControl:t.serverControl,loadFailureReason:null}),t.partInfo&&(i._hls.partTargetDuration=t.partInfo.targetDuration),i.SegmentList=[n({},i.SegmentList[0])],i.SegmentList[0].SegmentURL=r([],i.SegmentList[0].SegmentURL,!0),this.gQ(i,t),this.KP.dispatch((0,m.updateRepresentationAction)(i)),i},e.prototype.gQ=function(t,i){var n;if(0!==i.segments.length){if(t.SegmentList){this.GP.logger.debug("Updating segment list for playlist ".concat(t._id));var o=this.hQ(t,i);if(o.contentProtectionInfos.length>0){var a=e.contentProtectionToXmlJson(o.contentProtectionInfos);if((0,T.isDeltaPlaylist)(i)){var s=null!=(n=t.ContentProtection)?n:[];t.ContentProtection=(0,h.removeDuplicates)(r(r([],s,!0),a,!0))}else t.ContentProtection=a}var c=t.SegmentList[0].SegmentURL,u=o.entries,d=(0,T.calcNumberOfSegmentsToDrop)(c,u,i.skippedSegmentsCount);(0,l.removeEntriesFromStart)(c,d),(0,T.addNewSegments)(c,u),t.SegmentList[0]._duration=i.targetDuration,t.SegmentList[0]._timescale=1}}else this.GP.logger.debug("No segments for representation ".concat(t._id," in loaded playlist"))},e.prototype.hQ=function(e,t){if(T.PlaylistUtils.isLive(t))return this.IP.translateSegmentList(e,t);var i=this.GP.serviceManager.maybeCall(y.ServiceName.ManifestCachingService,function(t){return t.getSegmentList(e.Uri)});if(i)return i;var n=this.IP.translateSegmentList(e,t);return this.GP.serviceManager.maybeCall(y.ServiceName.ManifestCachingService,function(t){return t.cacheSegmentList(n,e.Uri)}),n},e.prototype.iQ=function(e){var t=e.segments[0];null!=t&&t.dateTime&&(e.programDateTime=(0,u.toSeconds)(t.dateTime.getTime()))},e.prototype.jQ=function(e){var t=e.segments[0];e.endList?(e.startTime=(0,s.getStartTimeOffset)(this.KP.getState()),e.segments[0].startTime=e.startTime):t&&t.dateTime?(e.startTime=(0,u.toSeconds)(t.dateTime.getTime()),e.segments[0].startTime=e.startTime):e.startTime=(0,u.toSeconds)(e.requestTimestamp)-e.totalDuration},e.contentProtectionToXmlJson=function(e){return e.map(function(e){var t={_schemeIdUri:e.schemeIdUri};return e.defaultKid&&(t["_cenc:default_KID"]=e.defaultKid),e.pssh&&(t.pssh=[{__text:e.pssh}]),t})},e.prototype.dispose=function(){this.IP=(0,o.dispose)(this.IP)},e}()},14447:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.M3u8Loader=t.HlsQueryParamNames=void 0,t.getParsedManifest=x;var r,o=i(40306),a=i(3336),s=i(80813),l=i(56481),c=i(3714),u=i(4129),d=i(77401),h=i(57456),p=i(29669),f=i(98714),m=i(91678),g=i(33436),v=i(85434),y=i(89927),b=i(58313),S=i(14302),_=i(87222),E=i(36193),T=i(59707),w=i(60729),A=i(16661),P=i(15617),I=i(40870),C=i(30234),M=i(67113),R=i(95212),k=i(18146);function x(e,t,i){var n=i.url,r=i.manifestText,o=e.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(e){return e.getParsedManifest(n)});return o?Promise.resolve(o):(0,C.parseHlsManifest)(e,r)}function O(e){return{url:e.url,statusCode:e.status,statusText:e.statusText}}!function(e){e.MediaSequenceNumber="_HLS_msn",e.PartIndex="_HLS_part",e.Skip="_HLS_skip"}(r||(t.HlsQueryParamNames=r={})),t.M3u8Loader=function(){function e(e,t){var i=this;this.dn={},this.updateRepresentation=function(e){var t=i.No(e,e.Uri);i.Yn.logger.debug("M3u8Loader: updateRepresentation (".concat(t,")"));var n=i.dn[e._id];return i.Po(n,t).then(function(t){return i.Ko(t,e)}).then(function(e){var t,r,o=i.Ro(),a=(null==(r=null==(t=i.Yn)?void 0:t.settings)?void 0:r.INFINITE_RETRIES_FOR_LIVE)===!0;return o&&a&&n.setResetRetriesWhenOffline(!0),e}).catch(function(t){return i.Oo(t,e)})},this.Qo=function(e,t){i.en||(i.fn=t.name,i.Yn.logger.debug("Failed to load playlist: ".concat(e.url," - ").concat(t.name)))},this.Yn=e,this.Zn=t,this.gn=[],this.hn=[],this.bn={},this.en=!1,this.kn=new M.M3u8DashManifest(e,t),this.cn=this.So(p.HttpRequestType.MANIFEST_HLS_MASTER),this.ln=e.serviceManager.get(s.ServiceName.SourceStoreService,t.sourceIdentifier)}return e.prototype.load=function(e){var t=this;return this.en=!1,this.fn=null,this.Po(this.cn,e).then(function(e){return t.mn(e)}).then(function(e){return t.kn.updateBaseUrl(e.url),t.nn(e),t.sn(e)}).then(function(e){return t.zn(e),t.on()}).then(function(){return t.kn.getManifest()}).catch(function(e){var i=e instanceof Error?e.message:void 0;return t.en||i===d.RequestError.Canceled?Promise.reject():e instanceof a.PlayerError||e instanceof Error?Promise.reject(e):Promise.reject(t.To(e))}).finally(function(){var e;return null==(e=t.jn)?void 0:e.signalLoadingFinished()})},e.prototype.mn=function(e){var t=this;if(this.en)return Promise.reject(Error("The loading of the HLS source was cancelled."));var i=e.body;if(void 0===i)return Promise.reject(Error("Cannot parse the playlist: content is empty."));var r={manifestText:i,url:e.url};return x(this.Yn,this.Zn,r).then(function(i){return(0,C.isValidHlsPlaylist)(i)?(t.rn(e,i),(0,C.ensureMasterPlaylist)(t.Yn,i,e.url)):Promise.reject(Error("Cannot parse master playlist: invalid format."))}).then(function(t){return n(n({},t),{rawString:i,url:e.url})}).catch(function(e){return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_MANIFEST_INVALID,{errorMessage:e.message},"HLS manifest is not a valid M3U playlist",t.Zn.sourceIdentifier))})},e.prototype.nn=function(e){var t=this.kn.extractBackupStreams(e);if(!t.every(function(e){return Object.keys(e).length<=1})){var i=e.tags.find(function(e){return"EXT-X-CONTENT-STEERING"===e.name});this.jn=i&&this.Yn.settings.ENABLE_HLS_CONTENT_STEERING?new I.HlsContentSteeringHandler(this.Yn,t,this.updateRepresentation,i):new P.HlsBackupStreamsHandler(this.Yn,t,this.updateRepresentation)}},e.prototype.on=function(){var e=this,t=this.ln.getState(),i=this.kn.getManifest().Period[0],n=(0,_.findAdaptationSetOfMimeType)(v.MimeType.VideoMp4,i,{sourceState:t}),r=(0,_.findAdaptationSetOfMimeType)(v.MimeType.AudioMp4,i,{sourceState:t,playbackConfig:this.Yn.config.playback}),s=[];return n&&s.push(this.pn(n)),r&&s.push(this.pn(r)),Promise.all(s).catch(function(t){return t instanceof a.PlayerError?Promise.reject(t):e.fn===d.RequestError.TimedOut||t===d.RequestError.TimedOut?Promise.reject(new a.PlayerError(o.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,{error:t},"Failed to load the HLS variant playlists: the request timed out.",e.Zn.sourceIdentifier)):Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_HLS_STREAM_ERROR,{error:t},"There was an error while retrieving the variant playlists.",e.Zn.sourceIdentifier))})},e.prototype.pn=function(e){var t=this,i=this.qn(e);if(!i){var n="No ".concat(e._mimeType," variants/renditions available");return this.Yn.logger.log(n),Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_MANIFEST_INVALID,{reason:n},n,this.Zn.sourceIdentifier))}return this.updateRepresentation(i).then(function(e){return t.ln.dispatch((0,f.setPreferredBitrateForMimeTypeAction)(i._mimeType,i._bandwidth)),t.ln.dispatch((0,E.setRepresentationIdAction)(i._internalId)),e}).catch(function(n){var r,o;return t.Yn.logger.debug("Representation ".concat(i._id," failed, dropping it"),null!=(r=null==n?void 0:n.message)?r:n),e.Representation=e.Representation.filter(function(e){return e!==i}),e.Representation.length>0?t.pn(e):(t.Yn.logger.log("All ".concat(e._mimeType," variants/renditions failed"),null!=(o=null==n?void 0:n.message)?o:n),Promise.reject(n))})},e.prototype.qn=function(e){return this.Yn.serviceManager.maybeCall(s.ServiceName.AdaptationService,function(t){var i,n=e.Representation.map(function(e){return{rep:e,bitrate:e._bandwidth,width:e._width,height:e._height}});return null==(i=t.selectQualityBasedOnBitrateMeasurement(n,e._mimeType))?void 0:i.rep})},e.prototype.updateAdaptationSet=function(e){var t=this,i=this.kn.findAdaptationSet(e);return i?Promise.all(i.Representation.map(function(e){var i=t.So(p.HttpRequestType.MANIFEST_HLS_VARIANT);return t.Po(i,e.Uri).then(function(i){return t.Ko(i,e)}).then(function(e){t.ln.dispatch((0,T.updateRepresentationAction)(e))})})):Promise.reject("Could not find data")},e.prototype.rn=function(e,t){this.Yn.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(i){i.cacheHttpResponse(e,e.url),i.cacheParsedManifest(t,e.url)})},e.prototype.sn=function(e){var t=this,i=(0,C.getTracksWithUnknownCodecs)(e),n=i.audioTracksWithoutCodecs,r=i.videoTracksWithoutCodecs;return 0===n.length&&0===r.length?Promise.resolve(e):(this.Yn.logger.debug("Codecs are missing in master playlist - probing them from segments now"),this.xn(e,n).then(function(){return t.yn(e,r)}).then(function(){return e}).catch(function(e){if(e instanceof a.PlayerError)return Promise.reject(e);var i,n="Codec verification failed",r=null!=(i=null==e?void 0:e.message)?i:e;t.Yn.logger.debug(n,e);var s=t.fn===d.RequestError.TimedOut?o.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT:o.ErrorCode.SOURCE_MANIFEST_INVALID;return Promise.reject(new a.PlayerError(s,{reason:r},n,t.Zn.sourceIdentifier))}))},e.prototype.tn=function(e,t){var i=this,n=e.url,r=e.body;if(void 0===r)return Promise.reject("Cannot parse codec, empty manifest response");var o={url:t,manifestText:r};return x(this.Yn,this.Zn,o).then(function(r){var o=(0,k.calculateUpdateIntervalInSeconds)(i.Yn,r),a=Date.now()+(0,y.toMilliSeconds)(o);i.Yn.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(t){t.cacheHttpResponse(e,n,a),t.cacheParsedManifest(r,n,a)});var l=r.segments,c=k.PlaylistUtils.isLive(r),u=r.mediaSequence,d=k.PlaylistUtils.getBaseUrl(i.kn.getBaseUrl(),t);return new A.CodecDetector(i.Yn,i.Zn).probeCodecs(l,c,d,u)})},e.prototype.un=function(e){return this.Yn.serviceManager.maybeCall(s.ServiceName.AdaptationService,function(t){var i=e.map(function(e,t){var i,n;return{bitrate:e.attributes.BANDWIDTH,width:null==(i=e.attributes.RESOLUTION)?void 0:i.width,height:null==(n=e.attributes.RESOLUTION)?void 0:n.height,id:t}});return e[t.selectQualityBasedOnBitrateMeasurement(i).id]})},e.prototype.vn=function(e,t){var i=this,n=new u.DefaultContentLoader(this.Yn,{requestType:p.HttpRequestType.MANIFEST_HLS_VARIANT,onFailure:this.Qo});return this.wn(n,e).then(function(t){return i.tn(t,e)}).then(function(i){return(0,C.updateMissingCodecsForPlaylists)(i,t,e)})},e.prototype.wn=function(e,t){var i=this;return this.Po(e,t).catch(function(n){i.Yn.logger.debug("Representation failed to load during codec probing ".concat(t));var r,o=null==(r=i.jn)?void 0:r.getNextBackupUriForCodecProbing(t);return o?(i.Yn.logger.debug("Attempting to continue codec probing using backup stream ".concat(o)),i.wn(e,o)):Promise.reject(n)})},e.prototype.xn=function(e,t){var i=this,n=t.shift();if(!(null!=n&&n.attributes.URI))return Promise.resolve();var r=b.URLHelper.getAbsoluteUrl(n.attributes.URI,this.kn.getBaseUrl());return this.vn(r,e).then(function(){return i.xn(e,t)})},e.prototype.yn=function(e,t){if(0===t.length)return Promise.resolve();var i=this.un(t),n=b.URLHelper.getAbsoluteUrl(i.uri,this.kn.getBaseUrl());return this.vn(n,e)},e.prototype.zn=function(e){var t,i=this;void 0===this.an&&(this.an=e),this.kn.onMasterPlaylistAvailable(e);var n=this.kn.getAllVariantRepresentions();n.forEach(function(e){i.dn[e._id]=i.So(p.HttpRequestType.MANIFEST_HLS_VARIANT)}),null==(t=this.jn)||t.populateBackupStreamsMap(n)},e.prototype.Ko=function(e,t){var i=this;if(this.en)return Promise.reject(S.REPRESENTATION_UPDATE_CANCEL);var n=e.url,l=e.body;if(!l)return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"Cannot parse the playlist: the body of the response is empty.",this.Zn.sourceIdentifier));var c=Date.now(),u={url:n,manifestText:l};return x(this.Yn,this.Zn,u).then(function(u){u.uri=(0,b.removeQueryParameters)(n,Object.values(r)),u.requestTimestamp=c;var d,h,p=R.M3u8Validator.checkForError(u);if(p)return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_MANIFEST_INVALID,{M3u8ValidatorError:p},"The parsed media playlist is invalid: ".concat(p),i.Zn.sourceIdentifier));u.start=null!=(d=u.start)?d:i.an.start;var f=t._mimeType;i.bn[f]=(0,C.createDiscontinuitySequences)(u,null!=(h=i.bn[f])?h:[]);var v=i.Lo(i.bn[f],!k.PlaylistUtils.isLive(u));u.segments=v.flatMap(function(e){return e.segments});var S=i.kn.onMediaLoaded(l,t,u);k.PlaylistUtils.isLive(u)||i.Yn.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(t){t.cacheHttpResponse(e,n),t.cacheParsedManifest(u,n)});var _=(0,y.toSeconds)(Date.now()-c);return i.Yn.store.dispatch((0,m.addMetricsValue)("default",g.MetricType.ProcessingTime,_)),i.Yn.logger.insane("Parsed playlist in: ".concat(null==_?void 0:_.toFixed(2))),S}).catch(function(e){if(e instanceof a.PlayerError)return Promise.reject(e);var t="Failed to parse the media playlist",n=e instanceof Error?e.message:t;return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_MANIFEST_INVALID,{errorMessage:n},t,i.Zn.sourceIdentifier))})},e.prototype.Lo=function(e,t){return e.filter(function(i,n){var r=!t&&n===e.length-1,o=i.segments.reduce(function(e,t){return e+t.duration},0);return!!(0===n&&o>0||r)||o>0})},e.prototype.stop=function(){var e=this;this.gn.forEach(function(t){return e.Yn.eventHandler.off(c.PlayerEvent.Play,t)}),this.hn.forEach(function(t){return e.Yn.eventHandler.off(c.PlayerEvent.Paused,t)}),this.gn=[],this.hn=[],this.Mo(),this.en=!0},e.prototype.Mo=function(){var e=this;this.cn.cancel(),Object.keys(this.dn).forEach(function(t){e.dn[t].dispose(),delete e.dn[t]})},e.prototype.stopRepresentationUpdate=function(e){var t,i=this.dn[e._id];return null!=i&&i.isLoading()?(this.Yn.logger.debug("M3u8Loader: stopping ongoing representation update (".concat(e.Uri,")")),i.cancel(),(null!=(t=i.getResponse())?t:Promise.resolve()).catch(function(){}).then(function(){})):Promise.resolve()},e.prototype.No=function(e,t){var i,n={},o=(0,k.getLastMediaSequenceAndPartIndex)(e);return(0,w.isPlayingLowLatencyHls)(this.Yn)&&(0,k.canMakeBlockingPlaylistReload)(e,this.Yn.settings)&&o&&(n[r.MediaSequenceNumber]=String(o.mediaSequence),n[r.PartIndex]=String(o.partIndex+1)),null!=(i=this.Yn.config.live)&&i.incrementalManifestUpdates&&(0,k.canPerformDeltaUpdate)(e)&&(n[r.Skip]=(0,k.isDeltaUpdateV2Supported)(e)?"v2":"YES"),b.URLHelper.appendQueryParametersToUrl(t,n)},e.prototype.Oo=function(e,t){var i,n=this;return this.en||(null==e?void 0:e.message)===d.RequestError.Canceled?Promise.reject(S.REPRESENTATION_UPDATE_CANCEL):(this.Yn.logger.debug("M3u8Loader: updateRepresentation failed (".concat(t.Uri,")"),null!=(i=null==e?void 0:e.message)?i:e),this.switchToBackupStream(t).then(function(e){var t;return e[0]||Promise.reject(null!=(t=n.fn)?t:d.RequestError.Failed)}).catch(function(t){return n.fn===d.RequestError.TimedOut?Promise.reject(d.RequestError.TimedOut):Object.values(P.BackupStreamErrors).includes(t)&&e instanceof a.PlayerError?Promise.reject(e):Promise.reject(t===S.REPRESENTATION_UPDATE_CANCEL?t:d.RequestError.Failed)}))},e.prototype.switchToBackupStream=function(e,t){return this.jn?this.jn.switchToBackupStream(e,t):Promise.reject(P.BackupStreamErrors.NO_BACKUP_STREAMS)},e.prototype.isSwitchingToBackupStreams=function(){var e,t;return null!=(t=null==(e=this.jn)?void 0:e.isCurrentlySwitchingToBackupStreams())&&t},e.prototype.Po=function(e,t){if(!t){var i,n=new a.PlayerError(o.ErrorCode.SOURCE_INVALID,void 0,"Cannot load the playlist: no URL was provided.",this.Zn.sourceIdentifier);return this.Yn.eventHandler.fireError(n),Promise.reject(n)}var r=this.Yn.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(e){return e.getHttpResponse(t)});if(r)return Promise.resolve(r);var l=null==(i=this.Zn.source.options)?void 0:i.manifestWithCredentials;return e.load(t,p.HttpRequestMethod.GET,null,null,null,l)},e.prototype.Ro=function(){return this.Yn.serviceManager.maybeCall(s.ServiceName.ManifestService,function(e){return e.isLive()},!1,this.Zn.sourceIdentifier)},e.prototype.So=function(e){var t,i,n=this,r=(null==(i=null==(t=this.Yn)?void 0:t.settings)?void 0:i.INFINITE_RETRIES_FOR_LIVE)===!0,o=this.Ro();return new u.DefaultContentLoader(this.Yn,{onSuccess:function(e,t){var i,r;n.fn=null,(0,h.isDownloadTimeInformationValid)(e)&&(n.Yn.logger.debug("Downloaded playlist in: ".concat(null==(i=e.elapsedTime)?void 0:i.toFixed(2),", TTFB: ").concat(null==(r=e.timeToFirstByte)?void 0:r.toFixed(2))),n.Yn.store.dispatch((0,m.addMetricsValue)("default",g.MetricType.DownloadInformation,{bytes:e.length,time:e.elapsedTime,timeToFirstByte:e.timeToFirstByte})))},onFailure:this.Qo,maxRetries:this.Yn.settings.MAX_MPD_RETRIES,requestType:e,resetRetriesWhenOffline:o&&r})},e.prototype.To=function(e){if(this.fn===d.RequestError.TimedOut)return new a.PlayerError(o.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,O(e),"Failed to load HLS playlist: the request timed out.",this.Zn.sourceIdentifier);var t=(null==e?void 0:e.status)===XMLHttpRequest.UNSENT?"Failed to load the HLS playlist due to CORS restrictions or because the client is offline.":"Failed to load HLS playlist: ".concat(null==e?void 0:e.status," ").concat(null==e?void 0:e.statusText,".");return new a.PlayerError(o.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,O(e),t,this.Zn.sourceIdentifier)},e.prototype.dispose=function(){var e,t=this;this.stop(),this.kn=(0,l.dispose)(this.kn),this.an=null,this.fn=null,this.cn.dispose(),null==(e=this.jn)||e.dispose(),Object.keys(this.dn).forEach(function(e){return t.dn[e].dispose()}),this.dn=null},e}()},36848:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueRenditions=function(e){var t=[];return e.forEach(function(e){var i=t.findIndex(function(t){return(0,n.compareValues)(e,t,["GROUP-ID","NAME","TYPE"])});if(-1!==i){var r=t[i];"YES"===e.DEFAULT&&"YES"!==r.DEFAULT&&(t[i]=e)}else t.push(e)}),t};var n=i(19541)},17051:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.M3u8RepresentationFactory=void 0;var n=i(66790),r=i(44468),o=i(34047),a=i(68922),s=i(58313),l=i(92778),c=i(18146);t.M3u8RepresentationFactory=function(){function e(e,t){this.seb=e,this.teb=t}return e.prototype.create=function(e,t,i,r,o){if(void 0===o&&(o=!0),!e)return null;var a=this.ueb(e,r);if(t===n.RepresentationType.AUDIO)a=this.web(e,a,i,r);else if(t===n.RepresentationType.VIDEO)a=this.veb(e,a,i,r,o);else{if(t!==n.RepresentationType.SUBTITLE)return null;a=this.xeb(e,a,i,r)}var s=this.yeb(a);return s&&(a._label=s),a},e.prototype.ueb=function(e,t){var i=e.uri||e.URI;i&&!s.URLHelper.isUrlAbsolute(i)&&(i=s.URLHelper.concatBaseUrlWithPartial(t,i));var n={_id:"",_mimeType:"",_bandwidth:0,_codecs:"",_hls:{requestTimestamp:0},BaseURL:null,SegmentList:[{SegmentURL:[],entries:[],totalDuration:0}],Uri:i};return e.NAME&&(n._label=e.NAME),n},e.prototype.veb=function(e,t,i,n,r){var a=t;if(a._mimeType="video/"+i,a._width=0,a._height=0,a.BaseURL=[{url:c.PlaylistUtils.getBaseUrl(n,e.uri)}],a._bandwidth=e.attributes["AVERAGE-BANDWIDTH"]||e.attributes.BANDWIDTH,a._bandwidth||(a._bandwidth=this.seb.settings.MIN_SELECTABLE_VIDEO_BITRATE),a._bandwidth=Number(a._bandwidth),e.attributes.CODECS){var s=o.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS);o.CodecStringHelper.hasOldAvc1CodecFormat(s.video)&&(s.video=o.CodecStringHelper.convertAvc1ToAvcotiCodecFormat(s.video)),r?s.video&&s.audio?a._codecs=s.video+","+s.audio:s.video&&!s.audio?a._codecs=s.video:!s.video&&s.audio&&(a._codecs=s.audio):a._codecs=s.video}return e.attributes["FRAME-RATE"]&&(a._frameRate=parseFloat(e.attributes["FRAME-RATE"])),e.attributes.RESOLUTION&&(a._width=e.attributes.RESOLUTION.width,a._height=e.attributes.RESOLUTION.height,a._id+=e.attributes.RESOLUTION.height+"_"),a._id+=e.attributes.BANDWIDTH,a},e.prototype.web=function(e,t,i,n){var r,o,a,s=t;if(s._id=e.NAME+" "+e["GROUP-ID"]||"",s._mimeType="audio/"+i,s._codecs=e.CODECS||(null==(r=e.attributes)?void 0:r.CODECS),s._name=e.NAME||"",s._groupId=e["GROUP-ID"]||"",s._label=s._name+" "+s._groupId,s._bandwidth=null!=(a=null!=(o=e["AVERAGE-BANDWIDTH"])?o:e.BANDWIDTH)?a:0,s.BaseURL=[{url:c.PlaylistUtils.getBaseUrl(n,e.URI||e.uri)}],e.CHANNELS){var u=e.CHANNELS.split("/")[0];s.AudioChannelConfiguration=[{_schemeIdUri:l.DashSchemeUri.AudioChannelConfig,_value:u}]}return s},e.prototype.xeb=function(e,t,i,n){var r=t;return r._id=e.NAME,r._mimeType="application/"+i,r._codecs="wvtt",r._name=e.NAME||"",r.BaseURL=[{url:c.PlaylistUtils.getBaseUrl(n,e.URI)}],r._hls.isForced="YES"===e.FORCED,r},e.prototype.yeb=function(e){var t={id:e._id,mimeType:e._mimeType,width:e._width,height:e._height,bitrate:e._bandwidth};return(0,a.applyLabeling)({source:this.teb.source,context:this.seb,streamType:r.StreamType.Hls,labelingType:a.LabelingType.Qualities},t)},e}()},42594:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.createNewMapEntry=s,t.updateMapEntry=function(e,t,i){var o=e.segmentInfos,c=o.findIndex(function(e){return function(e,t){var i=e.url===t.uri,n=e.discontinuitySequenceNumber===t.discontinuitySequenceNumber,r=!e.byteRange&&!t.byterange,o=e.byteRange&&t.byterange&&e.byteRange.start===t.byterange.offset&&e.byteRange.end===t.byterange.offset+t.byterange.length;return i&&n&&(o||r)}(e,t.segments[0])});if(-1===c)return s(t,i);var u=o.length-c,d=t.segments.length-u;if(0!==c||0!==d){var h=t.segments.slice(-d).map(function(e){return l(e,i)}),p=function(e){var t=e[e.length-1];if(void 0!==t.startTime&&void 0!==t.duration)return t.startTime+t.duration}(o);return null!=p&&(0,a.forwardExtrapolateSegmentStartTime)(h,{index:0,startTime:p}),{qualityInfo:n(n({},e.qualityInfo),{lastUpdateTimestamp:Date.now()}),segmentInfos:r(r([],o.slice(c),!0),h,!0)}}return e};var o=i(23068),a=i(47596);function s(e,t){var i=e.segments.map(function(e){return l(e,t)});return{qualityInfo:{lastUpdateTimestamp:Date.now()},segmentInfos:i}}function l(e,t){var i,n={url:e.uri,isInitSegment:!1,internalRepresentationId:t._internalId,isDiscontinuityStart:e.discontinuity,discontinuitySequenceNumber:e.discontinuitySequenceNumber,duration:e.duration,startTime:e.startTime,periodId:t._internalId.periodId,key:e.key,metadata:null!=(i=e.metadata)?i:[],mimeType:t._mimeType,bitrate:t._bandwidth,codecs:t._codecs};return e.byterange&&(n.byteRange={start:e.byterange.offset,end:e.byterange.offset+e.byterange.length}),e.init&&(n.init=e.init),e.dateTime&&(n.dateTime=e.dateTime),(0,o.isVideoRepresentation)(t)&&(n.height=t._height,n.width=t._width,n.frameRate=t._frameRate),n}},57778:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsParsing=t.M3u8Translator=void 0;var r,o=i(66790),a=i(34047),s=i(79721),l=i(84568),c=i(85434),u=i(89927),d=i(58313),h=i(70850),p=i(88052),f=i(62756),m=i(34795),g=i(47151),v=i(36848),y=i(17051),b=i(18146),S=new RegExp(/^data:text\/plain.*;base64.*,(.+)/);function _(e){return"AUDIO"===e.TYPE}function E(e,t){var i,n,r,o,a=e.attributes.BANDWIDTH===t.attributes.BANDWIDTH,s=(null==(i=e.attributes.RESOLUTION)?void 0:i.height)===(null==(n=t.attributes.RESOLUTION)?void 0:n.height)&&(null==(r=e.attributes.RESOLUTION)?void 0:r.width)===(null==(o=t.attributes.RESOLUTION)?void 0:o.width),l=e.attributes.CODECS===t.attributes.CODECS;return a&&s&&l}function T(e,t,i,n){t&&i&&t!==i&&(e[n?t:i]=!0)}function w(e,t,i){var n,r;return i&&null!=(r=null==(n=null==e?void 0:e.attributes)?void 0:n["PATHWAY-ID"])?r:String(Object.keys(t).length)}function A(e,t,i){void 0!==i&&(e[t]=i)}t.M3u8Translator=function(){function e(e,t){this.a8=0,this.b8=!1,this.A8=(0,l.memoize)(function(e){var t=S.exec(e);return null!==t&&2===t.length?t[1]:null}),this.X8=e,this.Y8=t,this.Z8=new y.M3u8RepresentationFactory(e,t)}return e.prototype.updateBaseUrl=function(e){this.c8=d.URLHelper.removeLastPathPart(e)},e.prototype.getBaseUrl=function(){var e;return null!=(e=this.c8)?e:""},e.prototype.d8=function(e,t){for(var i={},n={_schemeIdUri:"urn:scte:dash:cc:cea-"+t+":2015",_value:""},r=0;r<e.length;r++){var o=e[r]["INSTREAM-ID"];i[o]={lang:e[r].LANGUAGE||e[r].NAME||o,label:e[r].NAME||e[r].LANGUAGE||o},n._value.length>0&&(n._value+=";"),n._value+="708"===t?o.substring(7)+"=lang:":o+"=",n._value+=e[r].LANGUAGE}return{closedCaptionLabel:i,accessibility:n}},e.prototype.e8=function(e){if(!e)return{closedCaptionLabel:null,accessibility:[]};var t=this.d8(e.cea608,"608"),i=this.d8(e.cea708,"708"),n=[],r=null;return t.accessibility._value&&(n.push(t.accessibility),r=t.closedCaptionLabel),i.accessibility._value&&n.push(i.accessibility),{closedCaptionLabel:r,accessibility:n}},e.prototype.f8=function(e,t,i,n,r){for(var a=[],s=1/0,l=0,c=1/0,u=0,d=1/0,h=0,p="video/"+n,f=0,m=e;f<m.length;f++){var v=m[f];if(v.uri){var y=this.Z8.create(v,o.RepresentationType.VIDEO,n,this.c8,this.b8);a.push(y),s=Math.min(s,y._height),l=Math.max(l,y._height),c=Math.min(c,y._width),u=Math.max(u,y._width),d=Math.min(d,y._bandwidth),h=Math.max(h,y._bandwidth)}}a.sort(function(e,t){return e._bandwidth-t._bandwidth});var b={Representation:a,ContentComponent:[{_id:"video",_contentType:"video"}],_id:String(this.a8),_group:null,_mimeType:p,_internalId:new g.AdaptationSetId(i,String(this.a8++)),_minBandwidth:d,_maxBandwidth:h,_minHeight:s,_maxHeight:l,_minWidth:c,_maxWidth:u,isTransmuxingRequired:!0};r&&Object.keys(r).forEach(function(e){r[e].entries.filter(function(e){return!e.URI}).forEach(function(e){b.ContentComponent.push({_id:e.NAME,_contentType:"audio",_lang:e.LANGUAGE})})});var S=this.e8(t);S.closedCaptionLabel&&(b.ClosedCaptionLabels=S.closedCaptionLabel),S.accessibility.length>0&&(b.Accessibility=S.accessibility);var _=this.j8(b);return _&&"string"==typeof _&&(b._label=_),b},e.prototype.g8=function(e,t,i,n){for(var r=[],a=0,s=e;a<s.length;a++){var l=s[a];if(l.uri){var c=this.Z8.create(l,o.RepresentationType.AUDIO,n,this.c8,this.b8);r.push(c)}}r.sort(function(e,t){return e._bandwidth-t._bandwidth});var u={Representation:r,_id:String(this.a8),_group:null,_mimeType:"audio/"+n,_internalId:new g.AdaptationSetId(i,String(this.a8++)),_minBandwidth:1/0,_maxBandwidth:0,isTransmuxingRequired:!0},d=this.e8(t);d.closedCaptionLabel&&(u.ClosedCaptionLabels=d.closedCaptionLabel),d.accessibility.length>0&&(u.Accessibility=d.accessibility);var h=this.j8(u);return h&&"string"==typeof h&&(u._label=h),u},e.prototype.h8=function(e,t,i){var n=this,r=this.X8.settings.IGNORE_HLS_AUDIO_GROUPS,a=0,s=[],l=function(t){return{Representation:[],_id:String(n.a8),_internalId:new g.AdaptationSetId(e,String(n.a8++)),_mimeType:"audio/"+i,_minBandwidth:1/0,_maxBandwidth:-1,_lang:t,_group:String(a++),isTransmuxingRequired:!0}};return Object.keys(t).forEach(function(e){var a,c,u,d=t[e],h=d.entries.find(function(e){return e.LANGUAGE&&"und"!==e.LANGUAGE});h&&(c=h.LANGUAGE),r||(u=l(c));for(var p=(0,v.uniqueRenditions)(d.entries.filter(function(e){return e.URI})),f=0,m=p;f<m.length;f++){var g=m[f];r&&(u=l(c));var y=n.Z8.create(g,o.RepresentationType.AUDIO,i,n.c8,n.b8);u.Representation.push(y),u._minBandwidth=Math.min(u._minBandwidth,y._bandwidth),u._maxBandwidth=Math.max(u._maxBandwidth,y._bandwidth);var b=g.CHARACTERISTICS;if(b&&0===b.indexOf(n.X8.settings.HLS_VR_CHARACTERISTICS_UTI)&&(u.Role=[{_schemeIdUri:n.X8.settings.VR_SCHEME_ID_URI,_value:b.substring(n.X8.settings.HLS_VR_CHARACTERISTICS_UTI.length)}]),!u._label){var S=n.j8(u);S&&"string"==typeof S?u._label=S:y._name?u._label=y._name:u._label=e}r&&u.Representation.length>0&&s.push(u),u.Representation.sort(function(e,t){return e._bandwidth-t._bandwidth})}(function(e){e.forEach(function(e,t){e._bandwidth=128e3+32e3*t})})(null!=(a=null==u?void 0:u.Representation)?a:[]),!r&&u.Representation.length>0&&s.push(u)}),s},e.prototype.i8=function(e,t,i){var n=this,r=0;return Object.values(t).filter(function(e){return e.URI}).map(function(t){var a={Representation:[],_id:String(n.a8),_internalId:new g.AdaptationSetId(e,String(n.a8++)),_mimeType:"application/mp4",_lang:t.LANGUAGE,_group:""+r++,_isFragmented:!0},s=n.Z8.create(t,o.RepresentationType.SUBTITLE,i,n.c8,n.b8);a.Representation.push(s);var l=n.j8(a);return l&&"string"==typeof l?a._label=l:s._name?a._label=s._name:a._label=t.LANGUAGE,a})},e.prototype.j8=function(e){var t={mimeType:e._mimeType,lang:e._lang};return e._label&&(t.label=e._label),this.k8()(t)},e.prototype.k8=function(){var e,t,i,n,r=this,o=null==(n=null==(i=null==(t=null==(e=this.Y8)?void 0:e.source)?void 0:t.labeling)?void 0:i.hls)?void 0:n.tracks;return"function"!=typeof o?this.l8:function(e){var t;return null!=(t=(0,h.safeUserCallback)(function(){return o(e)},r.X8.logger))?t:null}},e.prototype.l8=function(){return null},e.prototype.extractBackupStreams=function(e){for(var t,i=[],n=null!=(t=this.c8)?t:"",r=e.playlists,o={},a=this.X8.settings.ENABLE_HLS_CONTENT_STEERING,s=w(e.tags.find(function(e){return"EXT-X-CONTENT-STEERING"===e.name}),{},a),l=0;l<r.length;l++){var c={},u=r[l],d=w(u,c,a);this.m8(c,u,e.media,n,d);for(var h=l+1;h<r.length;h++){var p=r[h];if(E(u,p)){var f=w(p,c,a);this.m8(c,p,e.media,n,f);var m=f===s;m&&r.splice(l,1,p),T(o,u.attributes.AUDIO,p.attributes.AUDIO,m),r.splice(h,1),h--}}i.push(c)}return this.X8.settings.IGNORE_HLS_AUDIO_GROUPS||(e.media=e.media.filter(function(e){return!o[e.attributes["GROUP-ID"]]})),i},e.prototype.m8=function(e,t,i,n,r){this.X8.settings.DISABLE_HLS_BACKUP_STREAM_FAILOVER||(e[r]=function(e,t,i){var n={};return n[c.MimeType.VideoMp4]=d.URLHelper.getAbsoluteUrl(e.uri,i),e.attributes.AUDIO&&(function(e,t,i){return e.filter(function(e){return _(e.attributes)&&e.attributes["GROUP-ID"]===t&&e.attributes.URI}).map(function(e){var t;return{id:e.attributes.NAME,url:d.URLHelper.getAbsoluteUrl(null!=(t=e.attributes.URI)?t:"",i)}})})(t,e.attributes.AUDIO,i).forEach(function(e){n[e.id]=e.url}),n}(t,i,n))},e.prototype.createDashManifestSkeleton=function(e){var t=e;return this.n8(t),this.q8(t),this.b8=this.x8(t),{BaseURL:[{url:this.c8}],Period:[this.w8(t,s.DEFAULT_PERIOD_ID)],_hasIndependentSegments:e.independentSegments,_isHls:!0,isInitialized:!1}},e.prototype.n8=function(e){var t=this;e.playlists.forEach(function(e){if(e.attributes.CODECS){var i=a.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS);if(!i.video&&i.unknown&&(e.attributes.RESOLUTION||e.attributes["FRAME-RATE"])){var n=a.CodecStringHelper.extractCodec(i.unknown);t.X8.logger.debug("Assuming unknown codec ".concat(n," is video")),a.CodecStringHelper.addCodec("video",n)}}})},e.prototype.o8=function(e,t){return a.CodecStringHelper.getMimeTypeForCodecString(e.attributes.CODECS)===t},e.prototype.p8=function(e){var t=this,i=e.playlists.some(function(e){return t.o8(e,"video")}),n=e.playlists.some(function(e){return t.o8(e,"audio")});i&&n&&(e.playlists=e.playlists.filter(function(e){return t.o8(e,"video")}))},e.prototype.q8=function(e){this.p8(e)},e.prototype.r8=function(e,t){void 0===t&&(t=!1);var i=a.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS);return i.video?(a.CodecStringHelper.hasOldAvc1CodecFormat(i.video)&&(i.video=a.CodecStringHelper.convertAvc1ToAvcotiCodecFormat(i.video)),t?i.video:i.video.split(".")[0]):null},e.prototype.s8=function(e,t){void 0===t&&(t=!1);var i=a.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS);return i.audio?t?i.audio:i.audio.split(".")[0]:null},e.prototype.t8=function(e){var t=this;return e.map(function(e){return t.r8(e)}).filter(function(e,t,i){return e&&i.indexOf(e)===t})},e.prototype.u8=function(e){var t=this;return e.map(function(e){return t.s8(e)}).filter(function(e,t,i){return e&&i.indexOf(e)===t})},e.prototype.v8=function(e){var t=this.t8(e),i=this.u8(e);if(0===t.length&&0===i.length)return{unknown:e};if(0===t.length){var n={};return i.forEach(function(t){n[t]=e.filter(function(e){var i;return null==(i=e.attributes.CODECS)?void 0:i.includes(t)})}),n}var r={};return t.forEach(function(t){r[t]=e.filter(function(e){var i;return null==(i=e.attributes.CODECS)?void 0:i.includes(t)})}),r},e.prototype.w8=function(t,i){var n=this,o={_id:i,_duration:"PT0S",duration:0,AdaptationSet:[]},s=r.extractMediaRenditions(t,this.X8.settings.IGNORE_HLS_AUDIO_GROUPS,function(e){if(null!=e.attributes.CODECS){var t=function(e){return e.split(",").map(function(e){return a.CodecStringHelper.hasOldAvc1CodecFormat(e)?a.CodecStringHelper.convertAvc1ToAvcotiCodecFormat(e):e}).join(",")}(e.attributes.CODECS),i=a.CodecStringHelper.getExtractedCodecStrings(t).video;return!!i&&n.X8.renderer.isMediaTypeSupported("video/mp4",i)}return!0}),l=this.v8(t.playlists),c=Object.keys(l),u=c.filter(function(e){return a.CodecStringHelper.isVideoCodec(e)}).map(function(e){return n.f8(l[e],s.captions,o._id,m.ContainerFormat.MP4,s.audio)}).filter(function(t){return t.Representation=t.Representation.reduce(function(t,i){var r=e.isRepresentationSupported(i,n.X8.renderer),o=!!t.find(function(e){return e.Uri===i.Uri});return r&&!o&&t.push(i),t},[]),t.Representation.length>0}),d=this.h8(o._id,s.audio,m.ContainerFormat.MP4).filter(function(t){return t.Representation=t.Representation.filter(function(t){return e.isRepresentationSupported(t,n.X8.renderer)}),t.Representation.length>0}).concat(c.filter(function(e){return a.CodecStringHelper.isAudioCodec(e)}).map(function(e){return n.g8(l[e],s.captions,o._id,m.ContainerFormat.MP4)})),h=this.i8(o._id,s.subtitles,m.ContainerFormat.MP4);return o.AdaptationSet=[].concat(u,d,h),p.ModuleManager.has(f.ModuleName.Thumbnail)&&(o.AdaptationSet=p.ModuleManager.get(f.ModuleName.Thumbnail).extendAdaptationSets(o.AdaptationSet,t,this.c8)),o},e.isRepresentationSupported=function(e,t){var i=!e._mimeType.includes("audio")&&!e._mimeType.includes("video");if(!e._codecs||i)return!0;var n=a.CodecStringHelper.getExtractedCodecStrings(e._codecs);return Object.keys(n).every(function(e){return a.CodecStringHelper.isSupportedByRenderer(t,e+"/mp4",n[e])})},e.prototype.x8=function(e){var t=e.media.filter(function(e){return _(e.attributes)});return!t.length||t.some(function(e){return!e.attributes.URI})},e.prototype.y8=function(e,t,i,n,r){for(var o,a=function(e){null!==s.A8(e.uri)?(void 0!==t.find(function(t){return!Object.keys(e).some(function(i){return e[i]!==t[i]})})||t.push(e),t.length>0&&(o=void 0)):o=(0,b.generateSegmentEncryptionInfo)(e,i,n,r)},s=this,l=0,c=e??[];l<c.length;l++)a(c[l]);return o},e.prototype.translateSegmentList=function(e,t){var i,r,o,a=t.segments,s=[],l=[],c=null!=(o=null==(r=null==(i=e.BaseURL)?void 0:i[0])?void 0:r.url)?o:"",h="";c&&(h=(0,d.extractOrigin)(c)),this.A8.invalidate();for(var p=0,f=function(e){c&&(e.uri=d.URLHelper.buildAbsoluteUrl(c,h,e.uri));var i=m.y8(e.keys,l,c,h,e.mediaSequence);e.init&&(e.init.url=d.URLHelper.buildAbsoluteUrl(c,h,e.init.url),e.init.key=m.y8(e.init.keys,l,c,h,e.mediaSequence));var r={_media:e.uri,_duration:e.duration,_mediaSequence:e.mediaSequence,_discontinuitySequenceNumber:e.discontinuitySequenceNumber,_metadata:[]};A(r,"_discontinuity",e.discontinuity),A(r,"_key",i),A(r,"_init",e.init),A(r,"_dateTime",e.dateTime),A(r,"_byteRange",(0,b.parseSegmentByteRange)(e.byterange)),A(r,"_playbackTime",function(e,t,i){var n;return e.endList?(null!=(n=e.startTime)?n:0)+t:i?(0,u.toSeconds)(i.getTime()):void 0}(t,p,e.dateTime)),["cueTag","scte35","customTags"].filter(function(t){return e.hasOwnProperty(t)}).forEach(function(t){return r._metadata=r._metadata.concat(e[t])}),e.parts&&(r._parts=e.parts.map(function(e){return n(n({},e),{uri:d.URLHelper.buildAbsoluteUrl(c,h,e.uri)})})),s.push(r),p+=e.duration},m=this,g=0,v=a;g<v.length;g++)f(v[g]);return{entries:s,contentProtectionInfos:this.z8(l)}},e.prototype.z8=function(e){var t=this,i=[];return e.forEach(function(e){var n=function(e,t){return p.ModuleManager.has(f.ModuleName.DRM)?p.ModuleManager.get(f.ModuleName.DRM).ContentProtectionHelper.parseContentProtection(e,t):null}(e,t.A8(e.uri));n?i.push(n):t.X8.logger.debug("Encountered unknown/unsupported DRM scheme:",e.keyformat)}),i},e.prototype.dispose=function(){this.c8=null,this.A8.invalidate()},e}(),function(e){function t(e,t){var i={};return e.forEach(function(e){var n=t[e["GROUP-ID"]]||t[Object.keys(t)[0]];e["AVERAGE-BANDWIDTH"]=n[0]["AVERAGE-BANDWIDTH"],e.BANDWIDTH=n[0].BANDWIDTH,e.CODECS=n[0].CODECS;var r=e["AVERAGE-BANDWIDTH"]||e.BANDWIDTH,o=Object.keys(i).find(function(t){var n,r,o=i[t].entries[0];return(null==o?void 0:o.NAME)===e.NAME&&a.CodecStringHelper.canSwitchBetweenAudioCodecs(null!=(n=null==o?void 0:o.CODECS)?n:"",null!=(r=e.CODECS)?r:"")});if(o&&i[o]){var s=i[o];s.entries.push(e),s.MIN_BANDWIDTH=Math.min(s.MIN_BANDWIDTH,r),s.MAX_BANDWIDTH=Math.max(s.MAX_BANDWIDTH,r)}else i[e.CODECS?"".concat(e.NAME," (").concat(e.CODECS,")"):e.NAME]={entries:[e],MIN_BANDWIDTH:r,MAX_BANDWIDTH:r}}),i}function i(e){var t={};return e.forEach(function(e){return t[e.NAME]=e}),t}function n(e){var t={cea608:[],cea708:[]};return e.forEach(function(e){e["INSTREAM-ID"]&&0===e["INSTREAM-ID"].indexOf("CC")?t.cea608.push(e):e["INSTREAM-ID"]&&0===e["INSTREAM-ID"].indexOf("SERVICE")&&t.cea708.push(e)}),t}function r(e){var t=function(e){var t={};return e.forEach(function(e){var i=e.attributes.AUDIO;t[i]||(t[i]=[]);var n={"AVERAGE-BANDWIDTH":e.attributes["AVERAGE-BANDWIDTH"],BANDWIDTH:e.attributes.BANDWIDTH,CODECS:void 0};e.attributes.CODECS&&e.attributes.CODECS.indexOf(",")>-1&&(n.CODECS=function(e){return e.attributes.CODECS.split(",").find(function(e){return a.CodecStringHelper.isAudioCodec(e)})}(e)),t[i].push(n)}),t}(e);return function(e){Object.values(e).forEach(function(e){e.sort(function(e,t){return e.BANDWIDTH-t.BANDWIDTH})})}(t),t}e.extractMediaRenditions=function(e,o,a){var s=e.playlists.filter(a),l=e.media.map(function(e){return e.attributes}),c=r(s),u=l.filter(function(e){var t=c[e["GROUP-ID"]];return _(e)&&(o||t)}),d=l.filter(function(e){return"SUBTITLES"===e.TYPE}),h=l.filter(function(e){return"CLOSED-CAPTIONS"===e.TYPE});return{audio:t(u,c),subtitles:i(d),captions:n(h)}},e.getPropertiesForAudioGroups=r}(r||(t.HlsParsing=r={}))},95212:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.M3u8Validator=t.M3u8ValidatorError=void 0,function(e){e.EmptyPlaylist="EmptyPlaylist"}(i||(t.M3u8ValidatorError=i={})),t.M3u8Validator=function(){function e(){}return e.checkForError=function(t){for(var i=0,n=e.mediaPlaylistRules;i<n.length;i++){var r=n[i];
20if(!r.fn(t))return r.err}return null},e.mediaPlaylistRules=[{fn:function(e){var t;return(null==(t=e.segments)?void 0:t.length)>0},err:i.EmptyPlaylist}],e}()},81232:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HLSModuleDefinition=void 0;var n=i(62756),r=i(8251),o=i(56727),a=i(14447),s=i(31474),l=i(37432),c=i(18146),u=i(73315),d=i(23512),h=i(61895),p={setPresentationTimeOffset:u.setPresentationTimeOffset,setTimestampRolloverPositions:u.setTimestampRolloverPositions},f={areDiscontinuitiesMisaligned:h.areDiscontinuitiesMisaligned,getPresentationTimeOffset:h.getPresentationTimeOffset,getHlsState:h.getHlsState,getPlaylistType:h.getPlaylistType,getIsLowLatencyPlaylist:h.getIsLowLatencyPlaylist,getEndlist:h.getEndlist,getDefaultLanguages:h.getDefaultLanguages,getCustomTags:h.getCustomTags,getDiscoSequenceTiming:h.getDiscoSequenceTiming,getDiscoSequenceTimings:h.getDiscoSequenceTimings,getFirstDiscoSequenceTiming:h.getFirstDiscoSequenceTiming,getMergedDiscontinuityTimings:h.getMergedDiscontinuityTimings};t.HLSModuleDefinition={name:n.ModuleName.HLS,module:function(){return{HlsTimelineTracker:o.HlsTimelineTracker,M3u8Loader:a.M3u8Loader,NativeHlsManifestParserUtils:s,parsePlaylist:l.parsePlaylist,PlaylistUtils:c.PlaylistUtils,DiscontinuitySequenceNumberTracker:r.DiscontinuitySequenceNumberTracker,HlsReducer:d.HlsReducer,actions:p,selectors:f,canMakeBlockingPlaylistReload:c.canMakeBlockingPlaylistReload}},dependencies:[n.ModuleName.EngineBitmovin]},t.default=t.HLSModuleDefinition},31474:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isMediaElement=a,t.isVideoVariant=s,t.parsePlaylist=l,t.isValidMasterPlaylist=function(e){return null!=e&&"playlists"in e&&e.playlists.length>0},t.isValidVariantPlaylist=c,t.parseAndPrepareVariantPlaylist=function(e,t,i,r){if(!e)throw Error("No master manifest available, cannot process variant playlist.");var d,h=l(null!=(d=t.body)?d:"");if(!c(h))throw Error("Variant playlist is not valid.");var p=e.playlists.find(function(e){var i=n.URLHelper.removeDotSegments(e.uri);return n.URLHelper.removeDotSegments(t.url).includes(i)});if(!p)throw Error("Variant playlist was not found in master manifest.");if(!p.id)throw Error("Variant playlist has no id.");var f=p,m=e.playlists.every(function(t){return a(t.uri,e)});if(!s(f,e)&&!m)throw Error("Variant playlist is not a video variant");o.PlaylistUtils.extrapolateProgramDateTime(h.segments);var g=o.PlaylistUtils.createDiscontinuitySequences(h,i);return{playlist:h,variant:f,segments:u(h,f.id,r),discontinuitySequences:g}},t.extractAndPrepareSegmentsFromVariantPlaylist=u;var n=i(58313),r=i(37432),o=i(18146);function a(e,t){var i,n;return null!=(n=null==(i=t.media)?void 0:i.some(function(t){var i;return null==(i=t.attributes.URI)?void 0:i.includes(e)}))&&n}function s(e,t){var i,n;return null!=(n=null==(i=t.playlists)?void 0:i.some(function(i){return e.uri.includes(i.uri)&&!a(e.uri,t)}))&&n}function l(e){try{return(0,r.parsePlaylist)(e)}catch{return null}}function c(e){return null!=e&&"segments"in e&&e.segments.length>0}function u(e,t,i){for(var n,r=e.segments,a=r.some(function(e){return void 0!==e.dateTime}),s=0;s<r.length;s++){var l=r[s];if(l.variantPlaylistId=t,l.mediaSequenceNumber=e.mediaSequence+s,!a&&(null==(n=null==i?void 0:i.tweaks)?void 0:n.akamai_datetime_parsing)){var c=o.PlaylistUtils.getProgramDateTimeFromSegmentUrl(l.uri,l.duration);c&&(l.dateTime=c)}}return r}},18146:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlaylistUtils=t.isMediaPlaylist=t.isMasterPlaylist=void 0,t.calculateUpdateIntervalInSeconds=function(e,t){if(!d.isLive(t))return 1/0;var i=t.segments[t.segments.length-1];if(void 0!==i){if((0,c.isPlayingLowLatencyHls)(e)){var n=function(e,t){var i,n,r=t.parts;return r&&r.length>0?r[r.length-1].duration:null!=(n=null==(i=e.partInfo)?void 0:i.targetDuration)?n:void 0}(t,i);if(void 0!==n)return n}return Math.max(e.settings.MINIMUM_ALLOWED_UPDATE_PERIOD,i.duration)}return e.settings.MINIMUM_ALLOWED_UPDATE_PERIOD},t.parseSegmentByteRange=function(e){var t,i;if(e)return{start:null!=(t=e.offset)?t:0,end:(null!=(i=e.offset)?i:0)+e.length-1}},t.generateSegmentEncryptionInfo=function(e,t,i,a){if(e.method===r.HlsEncryptionMethod.NONE)return e;var s=n(n({},e),{uri:l.URLHelper.buildAbsoluteUrl(t,i,e.uri)});return s.iv=s.iv?(0,o.forceReallocation)(s.iv):function(e){var t=e.length;return t>=32?e:"00000000000000000000000000000000".substring(0,32-t)+e}(a.toString(16)),s},t.getLastMediaSequenceAndPartIndex=f,t.canMakeBlockingPlaylistReload=function(e,t){var i,n,r=!!(null!=(n=null==(i=e._hls)?void 0:i.serverControl)&&n.canBlockReload),o=f(e),a=p(e)<=function(e,t){var i,n=null==(i=e._hls)?void 0:i.partTargetDuration;return n?n*t.LL_HLS_MAX_PLAYLIST_AGE_FOR_BLOCKING_REQUEST_IN_PART_TARGET_MULTIPLES:-1}(e,t);return r&&void 0!==o&&a},t.canPerformDeltaUpdate=function(e){var t,i,n=null==(i=null==(t=e._hls)?void 0:t.serverControl)?void 0:i.canSkipUntil;return void 0!==n&&!(p(e)>n/2)},t.isDeltaUpdateV2Supported=function(e){var t,i;return(null==(i=null==(t=e._hls)?void 0:t.serverControl)?void 0:i.canSkipUntil)!==void 0&&!0===e._hls.serverControl.canSkipDateRanges},t.calcNumberOfSegmentsToDrop=function(e,t,i){return 0===e.length?0:0===t.length?e.length:t[0]._mediaSequence-e[0]._mediaSequence-i},t.addNewSegments=function(e,t){if(0!==t.length)if(0!==e.length){var i=e[e.length-1],r=t[t.length-1]._mediaSequence-i._mediaSequence,o=(0,a.findFromEnd)(t,function(e){return e._mediaSequence===i._mediaSequence}),s=n(n({},i),o);if(m(s),e[e.length-1]=s,0!==r){var l=t.slice(-r);
vendor: 26,944 bytes, lines 20-21
20l.forEach(m),function(e,t,i){t.forEach(function(t){i.forEach(function(i){return function(e,t,i){t[e]&&!i[e]&&(i[e]=t[e])}(i,e,t)})})}(s,l,["_init","_key"]),void 0!==i._playbackTime&&function(e,t){var i=t;e.forEach(function(e){void 0===e._playbackTime&&(e._playbackTime=i),i=e._playbackTime+e._duration})}(l,i._playbackTime+i._duration),e.push.apply(e,l)}}else e.push.apply(e,t)},t.isDeltaPlaylist=function(e){return e.skippedSegmentsCount>0};var r=i(66790),o=i(20649),a=i(74853),s=i(89927),l=i(58313),c=i(60729),u=i(93187);t.isMasterPlaylist=function(e){return"playlists"in e},t.isMediaPlaylist=function(e){return!(0,t.isMasterPlaylist)(e)};var d=function(){function e(){}return e.createDiscontinuitySequences=function(e,t){var i=e.segments.filter(function(e){return e.duration>0}),n=this.getStartingDiscontinuity(e,i,t),r={id:n,segments:[],duration:0},o=[r];return i.forEach(function(e,t){void 0!==e.discontinuity&&(n++,0===t?r.id=n:(r={id:n,duration:0,segments:[]},o.push(r))),e.discontinuitySequenceNumber=n,r.segments.push(e),r.duration+=e.duration}),o},e.getStartingDiscontinuity=function(t,i,n){var r=t.discontinuitySequence;return null==r&&(r=0!==n.length&&e.isLive(t)?this.findCurrentDiscontinuitySequenceNumber(i,n):0),r},e.findCurrentDiscontinuitySequenceNumber=function(e,t){for(var i=[],n=0,r=0;r<t.length-1;r++)n+=t[r].segments.length,i.push(n);var o=[];return e.forEach(function(e,t){void 0!==e.discontinuity&&o.push(t)}),0===i.length?t[0]?t[0].id:0:0===o.length?t[t.length-1].id:o.length!==i.length?o.length>i.length?t[0].id:t[1].id:this.findFirstPeriodByIndexTracking(i,o,t)},e.findFirstPeriodByIndexTracking=function(e,t,i){if(e[0]>t[0])return i[0].id;if(e[0]<t[0]){for(var n=e[0]-t[0],r=0,o=0;o<e.length;o++)e[o]+n<t[0]&&r++;return i[r].id}var a=function(){return e.every(function(e,i){return e===t[i]})};if(a())return i[0].id;for(var s=1;e.length>0;){for(e.shift(),o=0;o<e.length;o++)e[o]--;if(a())break;s++}return i[s].id},e.extrapolateProgramDateTime=function(e){var t,i=null;if(e.find(function(e,t){return e.dateTime&&(i=t),void 0!==e.dateTime}),null!==i){for(t=i-1;t>=0;t--){var n=e[t+1].dateTime,r=Math.ceil((0,s.toMilliSeconds)(e[t].duration));e[t].dateTime=new Date(n.getTime()-r)}for(t=i+1;t<e.length;t++){var o=e[t-1].dateTime,a=Math.ceil((0,s.toMilliSeconds)(e[t-1].duration));e[t].dateTime=new Date(o.getTime()+a)}}},e.isLive=function(e){return!0!==e.endList},e.getProgramDateTimeFromSegmentUrl=function(e,t){if(e.indexOf("akamaihd.net")>-1){var i=e.match(/segment(\d{9})/);if(i&&2===i.length)return new Date(parseInt(i[1])*Math.round((0,s.toMilliSeconds)(t)))}return null},e.correctStartOffsetToBounds=function(e,t){return e>0&&e>t?t:e<0&&Math.abs(e)>t?-t:e},e.getImpreciseStartOffsetFromStartOfPlaylist=function(e){for(var t=e.start.timeOffset,i=0,n=0;n<e.segments.length-1&&t-e.segments[n+1].duration>0;n++){var r=e.segments[n].duration;t-=r,i+=r}return i},e.getImpreciseStartOffsetFromEndOfPlaylist=function(e){for(var t=Math.abs(e.start.timeOffset),i=0,n=e.segments.length-1;n>=0&&h(t,1)>0;n--)t-=e.segments[n].duration,i+=h(e.segments[n].duration,2);return e.totalDuration-i},e.getImpreciseStartOffset=function(t){return t.start.timeOffset>=0?e.getImpreciseStartOffsetFromStartOfPlaylist(t):e.getImpreciseStartOffsetFromEndOfPlaylist(t)},e.getStartOffsetCloseToPlaylistEnd=function(t,i){var n=t.start.timeOffset;return Math.max(i,n=(n=e.correctStartOffsetToBounds(n,t.totalDuration))<0?-h(Math.abs(n),2):h(n,2))},e.getStartOffset=function(t){var i=t.start.timeOffset;return(i=e.correctStartOffsetToBounds(i,t.totalDuration))<0&&(i+=t.totalDuration),t.start.precise||(i=e.getImpreciseStartOffset(t)),Number(i.toFixed(2))},e.getBaseUrl=function(e,t){var i=e;return i=l.URLHelper.removeUrlParameters(i),!(t=l.URLHelper.removeLastPathPart(t))||0>t.indexOf("/")?e:l.URLHelper.concatUrlParts(i,t)},e}();function h(e,t){return Math.floor(e*Math.pow(10,t))/Math.pow(10,t)}function p(e){var t;return null!=(t=null==e?void 0:e._hls)&&t.requestTimestamp?(0,s.toSeconds)(Date.now()-e._hls.requestTimestamp):1/0}function f(e){var t,i,n=null==(t=e.SegmentList)?void 0:t[0].SegmentURL,r=null==n?void 0:n[n.length-1],o=null!=(i=null==r?void 0:r._parts)?i:[];if(r&&0!==o.length){if((o=o.filter(function(e){return!e.isPreloadHint})).length>0)return{mediaSequence:r._mediaSequence,partIndex:o.length-1};var a=null==n?void 0:n[n.length-2];if(null!=a&&a._parts&&0!==a._parts.length)return{mediaSequence:a._mediaSequence,partIndex:a._parts.length-1}}}function m(e){var t;e._media=(0,o.forceReallocation)(e._media),null==(t=e._metadata)||t.forEach(function(e){return(0,u.forceReallocateStringProps)(e)})}t.PlaylistUtils=d},47596:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StartTimeExtrapolationDirection=void 0,t.extrapolateStartTime=function(e,t,i){void 0===i&&(i=n.Bidirectional),i===n.Backward?c(e,t):(i===n.Forward||c(e,t),l(e,t))},t.forwardExtrapolateSegmentStartTime=l,t.backwardExtrapolateSegmentStartTime=c,t.getStartTimeExtrapolationReferencePoint=function(e,t,i){if(t.endList)return{index:0,startTime:(0,r.getStartTimeOffset)(i)};var n,o,l=e.segmentInfos[0];if(null!=l&&l.dateTime)return{index:0,startTime:(0,a.toSeconds)(l.dateTime.getTime())};var c=(0,s.getMostRecentlyRefreshedQuality)(i);if(c){var d=u(e,c);if(d)return d}return{index:0,startTime:null!=(o=null==(n=null==c?void 0:c.segmentInfos[0])?void 0:n.startTime)?o:(0,a.toSeconds)(t.requestTimestamp)-t.totalDuration}},t.getStartTimeViaDiscontinuityBoundaries=u,t.findDiscontinuityBoundary=d,t.hasDiscontinuityBoundary=h;var n,r=i(77179),o=i(74853),a=i(89927),s=i(72498);function l(e,t){var i=t.index,n=t.startTime;e[i].startTime=n;for(var r=i+1;r<e.length;r++)e[r].startTime=e[r-1].startTime+e[r-1].duration}function c(e,t){var i=t.index,n=t.startTime;e[i].startTime=n;for(var r=i-1;r>=0;r--)e[r].startTime=e[r+1].startTime-e[r].duration}function u(e,t){if(h(e.segmentInfos)&&h(t.segmentInfos)){var i=t.segmentInfos[t.segmentInfos.length-1],n=d(t.segmentInfos,i.discontinuitySequenceNumber),r=t.segmentInfos[n],o=d(e.segmentInfos,r.discontinuitySequenceNumber);if(null!=o)return{index:o,startTime:r.startTime}}}function d(e,t){return h(e)?(0,o.findIndexFromEnd)(e,function(e){return!!e.isDiscontinuityStart&&e.discontinuitySequenceNumber===t}):-1}function h(e){if(!e.length)return!1;if(e[0].isDiscontinuityStart)return!0;var t=e[0],i=e[e.length-1];return t.discontinuitySequenceNumber!==i.discontinuitySequenceNumber}!function(e){e.Backward="backward",e.Forward="forward",e.Bidirectional="Bidirectional"}(n||(t.StartTimeExtrapolationDirection=n={}))},97123:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorkerParser=void 0,t.WebWorkerParser=function(){function e(e){var t=this;this.U8=!1,this.V8=[],this.W8=function(e){var i=e.data;if(["parsedPlaylist","error"].includes(i.action)&&0!==t.V8.length){var n=t.V8.shift();if("error"===i.action&&(null==n||n.rejectFn(i.data)),"parsedPlaylist"===i.action&&(null==n||n.resolveFn(i.data)),t.V8.length>0){var r=t.V8[0];t.T8.postMessage(r.message)}else t.U8=!1}};try{var n=i(62903);this.T8=new n,this.T8.onmessage=this.W8}catch(t){e.warn("WebWorkerParser: Could not create web worker",t)}}return e.prototype.parsePlaylist=function(e,t){var i=this;return new Promise(function(n,r){var o={action:"parseHlsPlaylist",payload:{data:e,options:t}};i.V8.push({resolveFn:n,rejectFn:r,message:o}),i.U8||(i.U8=!0,i.T8.postMessage(o))})},e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.instance=null,e}()},93187:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.forceReallocateStringProps=function e(t){Object.keys(t).forEach(function(i){"string"==typeof t[i]&&(t[i]=(0,n.forceReallocation)(t[i])),"object"==typeof t[i]&&e(t[i])})};var n=i(20649)},52610:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getTimingInfoFromSegmentList=function(e){return e.reduce(function(e,t,i,n){var r=t._discontinuitySequenceNumber,o=t._playbackTime;if(void 0===e.discoTimings[r]){e.discoTimings[r]={startTime:o,endTime:1/0};var a=e.discoTimings[r-1];a&&(a.endTime=o)}return i===n.length-1&&(e.discoTimings[r].endTime=o+t._duration),e.totalDuration+=t._duration,e},{totalDuration:0,discoTimings:{}})}},5707:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.generateRendition=function(e){var t,i,r;return{name:e.name,attributes:n(n({},e.attributes),{TYPE:null==(t=e.attributes)?void 0:t.TYPE,"GROUP-ID":null==(i=e.attributes)?void 0:i["GROUP-ID"],NAME:null==(r=e.attributes)?void 0:r.NAME})}},t.generateStartAttributes=function(e){var t,i;return null!=(t=e.attributes)&&t.hasOwnProperty("TIME-OFFSET")&&(i={timeOffset:Number(e.attributes["TIME-OFFSET"]),precise:"YES"===e.attributes.PRECISE}),e.attributes&&i&&i.hasOwnProperty("timeOffset")&&(e.attributes["TIME-OFFSET"]=i.timeOffset,e.attributes.PRECISE=i.precise),i},t.generatePartInfoTag=function(e){return{targetDuration:parseFloat(e["PART-TARGET"])}},t.generateServerControlTag=function(e){var t={canBlockReload:!1};return e.attributes&&(e.attributes["CAN-SKIP-UNTIL"]&&(t.canSkipUntil=parseFloat(e.attributes["CAN-SKIP-UNTIL"])),void 0!==t.canSkipUntil&&e.attributes["CAN-SKIP-DATERANGES"]&&(t.canSkipDateRanges="YES"===e.attributes["CAN-SKIP-DATERANGES"]),e.attributes["HOLD-BACK"]&&(t.holdBack=parseFloat(e.attributes["HOLD-BACK"])),e.attributes["PART-HOLD-BACK"]&&(t.partHoldBack=parseFloat(e.attributes["PART-HOLD-BACK"])),e.attributes["CAN-BLOCK-RELOAD"]&&(t.canBlockReload="YES"===e.attributes["CAN-BLOCK-RELOAD"])),t},t.generateSkipTag=function(e){var t={skippedSegments:0,recentlyRemovedDateranges:[]};return e.attributes&&(e.attributes["SKIPPED-SEGMENTS"]&&(t.skippedSegments=parseInt(e.attributes["SKIPPED-SEGMENTS"])),e.attributes["RECENTLY-REMOVED-DATERANGES"]&&(t.recentlyRemovedDateranges=e.attributes["RECENTLY-REMOVED-DATERANGES"].split("	"))),t},t.generatePartTag=function(e,t){var i={uri:(0,s.forceReallocation)(e.URI),duration:parseFloat(e.DURATION)};if("YES"===e.INDEPENDENT&&(i.independent=!0),e.BYTERANGE){var n=e.BYTERANGE.split("@"),r=parseInt(n[0]),o=parseInt(n[1]);isNaN(o)&&(o=null!=t&&t.byteRange?t.byteRange.end+1:0),i.byteRange={start:o,end:o+r-1}}return"YES"===e.GAP&&(i.gap=!0),i},t.generatePreloadHintTag=function(e,t){if("PART"===e.TYPE){var i={uri:(0,s.forceReallocation)(e.URI),duration:t,isPreloadHint:!0};return(n=l(e))&&(i.byteRange=n),{part:i}}if("MAP"===e.TYPE){var n,r={url:(0,s.forceReallocation)(e.URI)};return(n=l(e))&&(r.byteRange=n),{init:r}}return{}},t.generateStreamInfTag=function(e,t){var i,r,o,a,s,l={name:e.name,uri:t,attributes:n(n({},e.attributes),{BANDWIDTH:null==(i=e.attributes)?void 0:i.BANDWIDTH})};return null!=(r=e.attributes)&&r.RESOLUTION&&(l.attributes.RESOLUTION=h(e)),null!=(o=e.attributes)&&o.BANDWIDTH&&(l.attributes.BANDWIDTH=parseInt(e.attributes.BANDWIDTH)),null!=(a=e.attributes)&&a["AVERAGE-BANDWIDTH"]&&(l.attributes["AVERAGE-BANDWIDTH"]=parseInt(e.attributes["AVERAGE-BANDWIDTH"])),null!=(s=e.attributes)&&s["PROGRAM-ID"]&&(l.attributes["PROGRAM-ID"]=parseInt(e.attributes["PROGRAM-ID"])),l.id=c(l.attributes),l},t.generateVariantPlaylistId=c,t.generateSessionKeyTag=function(e){d(e)},t.generateIFrameStreamInfTag=function(e){var t,i,n;null!=(t=e.attributes)&&t.BANDWIDTH&&(e.attributes.BANDWIDTH=parseInt(e.attributes.BANDWIDTH)),null!=(i=e.attributes)&&i["AVERAGE-BANDWIDTH"]&&(e.attributes["AVERAGE-BANDWIDTH"]=parseInt(e.attributes["AVERAGE-BANDWIDTH"],10)),null!=(n=e.attributes)&&n.RESOLUTION&&(e.attributes.RESOLUTION=h(e))},t.generateSegmentEntrySkeleton=function(){return{uri:"",duration:0,mediaSequence:0}},t.generateCueTag=function(e,t){var i={type:t};if(e.attributes){var n=[];for(var r in e.attributes)if(e.attributes.hasOwnProperty(r)){var o=e.attributes[r]?"".concat(r,"=").concat(e.attributes[r]):r;n.push(o)}i.attributes=n}return i},t.generateDateRange=function(e){var t={type:a.MetadataType.DATERANGE};if(e.attributes){t.clientAttributes={};var i=e.attributes;for(var n in i)if(i.hasOwnProperty(n)){var r=u(n,i[n]);n.startsWith("X-")?t.clientAttributes[(0,s.kebabCaseToCamelCase)(n.substring(2))]=r:t[(0,s.kebabCaseToCamelCase)(n)]=r}}return t.duration&&(t.duration=Number(t.duration)),t.plannedDuration&&(t.plannedDuration=Number(t.plannedDuration)),t.endOnNext&&(t.endOnNext=!0),t},t.generateKeyTag=function(e){var t;if(d(e),e.attributes&&"NONE"!==e.attributes.METHOD&&e.attributes.URI){var i={method:null!=(t=o.HlsEncryptionMethods.find(function(t){return t===e.attributes.METHOD}))?t:o.HlsEncryptionMethod.AES_128,uri:(0,s.forceReallocation)(e.attributes.URI)};return void 0!==e.attributes.IV&&(i.iv=e.attributes.IV),e.attributes.KEYFORMAT&&(i.keyformat=(0,s.forceReallocation)(e.attributes.KEYFORMAT)),e.attributes.KEYFORMATVERSIONS&&(i.keyformatversions=(0,s.forceReallocation)(e.attributes.KEYFORMATVERSIONS)),e.attributes.KEYID&&(i.keyid=(0,s.forceReallocation)(e.attributes.KEYID)),i}},t.generateByteRangeTag=function(e,t){var i;if(e.value){var n=e.value.split("@"),r=n[0],o=n[1],a={length:parseInt(r||"0")};if(o)a.offset=parseInt(o);else{var s=t[t.length-1];null!=s&&s.byterange&&(a.offset=(null!=(i=s.byterange.offset)?i:0)+s.byterange.length)}return a}},t.generateMapTag=function(e,t){var i,n;if(null!=(i=e.attributes)&&i.URI){var o={url:(0,s.forceReallocation)(e.attributes.URI)};if(null!=(n=e.attributes)&&n.BYTERANGE){var a=e.attributes.BYTERANGE.split("@"),l=a[0],c=a[1];o.byteRange={start:parseInt(c),end:parseInt(c)+parseInt(l)-1}}return t.keys.length>0&&(o.keys=r([],t.keys,!0),t.keyInUse=!0),o}},t.generateCustomTag=function(e){try{e=(0,s.forceReallocation)(e);var t=/^#([^:=]*)([:=])?(.*)$/.exec(e);if(!(null!=t&&t[1]))return;var i={name:t[1]},n="";if("="===t[2]&&t[3])n=t[3];else if(":"===t[2]&&t[3]){var r=v.exec(t[3]);r&&"="===r[2]&&r[3]?i.attributes=function(e){for(var t=e.split(p),i=t.length,n={};i--;)if(""!==t[i]){var r=f.exec(t[i]);if(r){var o=r.slice(1),a=o[0],s=o[1];n[a.trim()]=s.trim().replace(m,"$1")}}return n}(t[3]):n=t[3]}return n&&(i.value=n.replace(g,"$1")),i}catch{return}};var o=i(66790),a=i(3714),s=i(20649);function l(e){var t=parseInt(e["BYTERANGE-START"]),i=parseInt(e["BYTERANGE-END"]);if(!isNaN(t)||!isNaN(i))return{start:isNaN(t)?0:t,end:isNaN(i)?0x1fffffffffffff:i}}function c(e){var t="";return e.RESOLUTION&&(t+=e.RESOLUTION.height+"_"),t+e.BANDWIDTH}function u(e,t){var i=(0,s.forceReallocation)(t);return!function(e){return["X-RESUME-OFFSET","X-PLAYOUT-LIMIT"].includes(e)}(e)?!function(e){return["X-SNAP","X-RESTRICT"].includes(e)}(e)?i:i.split(","):Number(i)}function d(e){var t;if(null!=(t=e.attributes)&&t.IV){var i=e.attributes.IV;(i.startsWith("0x")||i.startsWith("0X"))&&(e.attributes.IV=i.substring(2))}}function h(e){var t,i={width:0,height:0},n=null==(t=e.attributes)?void 0:t.RESOLUTION.split("x");return n[0]&&(i.width=parseInt(n[0])),n[1]&&(i.height=parseInt(n[1])),i}var p=/(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))/,f=/([^=]*)=(.*)/,m=/^['"](.*)['"]$/,g=/^['"](.*)['"]$/g,v=/^([^:="]*)([:=])?(.*)$/},39297:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;var i=/[ \t]+/gm;t.TextParser=function(){function e(e){this.data=e,this.B8=0}return e.prototype.M9=function(){return this.B8===this.data.length},e.prototype.skipWhitespace=function(){this.readRegex(i)},e.prototype.readRegex=function(e){var t=this.N9(e);if(!this.M9()&&void 0!==t&&t.position===this.B8)return this.B8+=t.length,t.results},e.prototype.N9=function(e){e.lastIndex=this.B8;var t=e.exec(this.data);if(null!==t)return{position:t.index,length:t[0].length,results:t}},e}()},37432:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parsePlaylist=function(e,t){void 0===t&&(t={});var i=-1===e.indexOf("#EXTINF")?n.Master:n.Media,d=e.replace(l,`
21`).trim().split(/\n+/m);if(!c.test((0,r.removeTrailingWhitespaces)(d[0])))throw Error("Playlist parsing failed: missing #EXTM3U tag");if(i===n.Media)return(0,a.parseVariant)(d,t);for(var h,p=[],f=[],m=[],g=1,v=!0,y=!1,b=!0,S=0;S<d.length;S++){var _=(0,r.removeTrailingWhitespaces)(d[S]),E=d[S+1];if((0,r.isCustomTag)(_))u(p,_);else if(b)b=!1;else{var T=(0,o.parseTag)(_);switch(T.name){case"EXT-X-STREAM-INF":m.push((0,s.generateStreamInfTag)(T,(0,r.removeTrailingWhitespaces)(E))),b=!0;break;case"EXT-X-MEDIA":var w=(0,s.generateRendition)(T);f.push(w),p.push(w);break;case"EXT-X-VERSION":g=Number(T.value);break;case"EXT-X-START":h=(0,s.generateStartAttributes)(T),p.push(T);break;case"EXT-X-ALLOW-CACHE":v="YES"===T.value||void 0===T.value;break;case"EXT-X-INDEPENDENT-SEGMENTS":y=!0,p.push(T);break;case"EXT-X-I-FRAME-STREAM-INF":(0,s.generateIFrameStreamInfTag)(T),p.push(T);break;case"EXT-X-SESSION-DATA":default:p.push(T);break;case"EXT-X-SESSION-KEY":(0,s.generateSessionKeyTag)(T),p.push(T)}}}var A={version:g,allowCache:v,independentSegments:y,hasM3u:!0,media:f,playlists:m,tags:p=p.concat(m)};return h&&(A.start=h),A};var n,r=i(73577),o=i(41908),a=i(1945),s=i(5707),l=/\r\n|\r(?=[^\n]|$)/gm,c=/^#EXTM3U($|[ \t\n])/m;function u(e,t){var i=(0,s.generateCustomTag)(t);i&&e.push(i)}!function(e){e.Master="master",e.Media="media"}(n||(n={}))},73577:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseSegments=function(e,t,i,d){void 0===d&&(d={});for(var m,g=[],v=0,y=(0,u.generateSegmentEntrySkeleton)(),b=r([],t,!0),S=0,_=i.mediaSequence,E={keys:[],keyInUse:!1},T=function(e){(function(e,t,i,n,o,a,s){e.duration=t,e.uri=i,e.mediaSequence=s,n&&(e.init=n),a.length>0&&(e.customTags=a),o.keys.length>0&&(e.keys=r([],o.keys,!0),o.keyInUse=!0)})(y,S,e,m,E,b,_),g.push(y),v+=S,_++,function(){y=(0,u.generateSegmentEntrySkeleton)(),b=[],S=0}()},w=function(e){var t,s,h=(0,l.parseTag)(e);switch(h.name){case"EXTINF":S=parseFloat(h.value);break;case"EXT-X-BYTERANGE":y.byterange=(0,u.generateByteRangeTag)(h,g);break;case"EXT-X-DISCONTINUITY":y.discontinuity=!0;break;case"EXT-X-PROGRAM-DATE-TIME":!function(e,t){t.value&&(e.dateTime=new Date(t.value))}(y,h);break;case"EXT-X-KEY":if((null==(t=h.attributes)?void 0:t.METHOD)==="NONE"){E.keys=[{method:o.HlsEncryptionMethod.NONE}];break}!function(e,t){t.keyInUse&&(t.keys=[],t.keyInUse=!1);var i=(0,u.generateKeyTag)(e);void 0!==i&&t.keys.push(i)}(h,E);break;case"EXT-X-MAP":m=(0,u.generateMapTag)(h,E);break;case"EXT-X-DATERANGE":i.dateRange.push((0,u.generateDateRange)(h));break;case"EXT-X-CUE-OUT-CONT":y.cueTag=(0,u.generateCueTag)(h,"CUE-OUT-CONT");break;case"EXT-X-CUE-OUT":y.cueTag=(0,u.generateCueTag)(h,"CUE-OUT");break;case"EXT-X-CUE-IN":y.cueTag=(0,u.generateCueTag)(h,"CUE-IN");break;case"EXT-X-SCTE35":!function(e,t){var i;void 0===e.scte35&&(e.scte35=[]),e.scte35.push({type:a.MetadataType.SCTE,attributes:n({CUE:null==(i=t.attributes)?void 0:i.CUE},t.attributes)})}(y,h);break;case"EXT-X-PART":!function(e,t,i){var n;if(i.parsePartTags){t.parts=null!=(n=t.parts)?n:[];var r=t.parts[t.parts.length-1];t.parts.push((0,u.generatePartTag)(e.attributes,r))}}(h,y,d);break;case"EXT-X-PRELOAD-HINT":var p=function(e,t,i){return i.parsePartTags&&t?(0,u.generatePreloadHintTag)(e.attributes,t.targetDuration):{}}(h,i.partInfo,d);p.init&&(m=p.init,E.keys.length>0&&(m.keys=r([],E.keys,!0),E.keyInUse=!0)),p.part&&(y.parts=null!=(s=y.parts)?s:[],y.parts.push(p.part));break;case"EXT-X-SKIP":var f=(0,u.generateSkipTag)(h);i.skippedSegmentsCount=f.skippedSegments,_+=f.skippedSegments;break;case"EXT-X-ENDLIST":i.endList=!0;break;case"EXT-X-MEDIA-SEQUENCE":(0,c.resolvePlaylistTag)(i,h,b),_=i.mediaSequence,i.skippedSegmentsCount&&(_+=i.skippedSegmentsCount);break;default:(0,c.resolvePlaylistTag)(i,h,b)}},A=0,P=e;A<P.length;A++){var I=p(P[A]);""!==I&&(I.startsWith("#")?f(I)?h(i,b,I):w(I):T(I))}y.parts&&y.parts.length>0&&(S=y.parts.reduce(function(e,t){return e+t.duration},0),T(s.PHANTOM_SEGMENT_URL)),i.segments=g,i.totalDuration=v},t.addCustomTagToPlaylistTagList=d,t.handleCustomTag=h,t.removeTrailingWhitespaces=p,t.isCustomTag=f;var o=i(66790),a=i(3714),s=i(63066),l=i(41908),c=i(1945),u=i(5707);function d(e,t){void 0===e.tags&&(e.tags=[]),t&&e.tags.push(t)}function h(e,t,i){t.push({type:a.MetadataType.CUSTOM,attributes:i}),d(e,(0,u.generateCustomTag)(i))}function p(e){return e.replace(/^[ \t]+/g,"")}function f(e){return/^#(?!EXT)/m.test(e)}},41908:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseTag=function(e){var t,i=r.exec(e);if(!i)throw Error("Invalid tag "+e);var s,l=i[1],c=i[2],u={};if(c){var d=new n.TextParser(c),h=void 0,p=d.readRegex(o);for(p&&(s=null!=(t=p[1])?t:p[2]);h=d.readRegex(a);){var f=h[1],m=h[2]||h[3];if(f.includes(",")){var g=f.split(","),v=g[0];f=g[1].trim(),u[v]=void 0}u[f]=m,d.skipWhitespace()}}return{name:l,attributes:u,value:s}};var n=i(39297),r=/^#(EXT[^:]*)(?::(.*))?$/,o=/^(?:"([^"]*)"|([^,=]+))(?:,|$)/g,a=/([^=]+)=*(?:"([^"]*)"|([^",]*))(?:,|$)/g},1945:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SEGMENT_TAGS=void 0,t.parseVariant=function(e,i){void 0===i&&(i={});for(var n={version:1,allowCache:!0,hasM3u:!0,endList:!1,segments:[],dateRange:[],skippedSegmentsCount:0,targetDuration:0,totalDuration:0,mediaSequence:0},r=[],s=0;s<e.length;s++){var u=(0,o.removeTrailingWhitespaces)(e[s]);if(""!==u)if((0,o.isCustomTag)(u))(0,o.handleCustomTag)(n,r,u);else{var d=(0,a.parseTag)(u);if(t.SEGMENT_TAGS.includes(d.name))return(0,o.parseSegments)(e.slice(s),r,n,i),l(n),n;c(n,d,r)}}return l(n),n},t.resolvePlaylistTag=c;var r=i(3714),o=i(73577),a=i(41908),s=i(5707);function l(e){var t;"EVENT"===e.playlistType&&(e.discontinuitySequence=null!=(t=e.discontinuitySequence)?t:0)}function c(e,t,i){switch(t.name){case"EXT-X-VERSION":e.version=Number(t.value);break;case"EXT-X-START":e.start=(0,s.generateStartAttributes)(t);break;case"EXT-X-INDEPENDENT-SEGMENTS":e.independentSegments=!0;break;case"EXT-X-TARGETDURATION":t.value&&(e.targetDuration=parseInt(t.value));break;case"EXT-X-MEDIA-SEQUENCE":t.value&&(e.mediaSequence=parseInt(t.value));break;case"EXT-X-DISCONTINUITY-SEQUENCE":t.value&&(e.discontinuitySequence=parseInt(t.value));break;case"EXT-X-PLAYLIST-TYPE":e.playlistType="EVENT"===t.value?"EVENT":"VOD";break;case"EXT-X-PART-INF":e.partInfo=(0,s.generatePartInfoTag)(t.attributes);break;case"EXT-X-ALLOW-CACHE":e.allowCache="NO"!==t.value;break;case"EXT-X-SERVER-CONTROL":e.serverControl=(0,s.generateServerControlTag)(t);break;case"EXT-X-DATERANGE":e.dateRange.push((0,s.generateDateRange)(t));break;case"EXT-X-ENDLIST":e.endList=!0;break;case"EXTM3U":break;default:i.push(n({type:r.MetadataType.CUSTOM},t)),(0,o.addCustomTagToPlaylistTagList)(e,t)}}t.SEGMENT_TAGS=["EXTINF","EXT-X-BYTERANGE","EXT-X-DISCONTINUITY","EXT-X-PROGRAM-DATE-TIME","EXT-X-KEY","EXT-X-GAP","EXT-X-BITRATE","EXT-X-PART","EXT-X-MAP","EXT-X-CUE-OUT-CONT","EXT-X-CUE-OUT","EXT-X-CUE-IN","EXT-X-SCTE35","EXT-X-SKIP"]},73315:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setContentLocationId=t.setTimestampRolloverPositions=t.setPresentationTimeOffset=t.setDiscoTimings=t.setCustomTags=t.setDefaultLanguages=t.setEndlist=t.setIsLowLatencyPlaylist=t.setPlaylistType=t.setMasterPlaylistString=void 0;var n=i(35267),r=i(45861);t.setMasterPlaylistString=function(e){return(0,n.createAction)(r.HlsActionType.SetMasterPlaylistString,e)},t.setPlaylistType=function(e){return(0,n.createAction)(r.HlsActionType.SetPlaylistType,e)},t.setIsLowLatencyPlaylist=function(e){return(0,n.createAction)(r.HlsActionType.SetIsLowLatencyPlaylist,e)},t.setEndlist=function(e){return(0,n.createAction)(r.HlsActionType.SetEndlist,e)},t.setDefaultLanguages=function(e){return(0,n.createAction)(r.HlsActionType.SetDefaultLanguages,e)},t.setCustomTags=function(e){return(0,n.createAction)(r.HlsActionType.SetCustomTags,e)},t.setDiscoTimings=function(e,t){return(0,n.createAction)(r.HlsActionType.SetDiscoTimings,{mimeType:e,discoTimings:t})},t.setPresentationTimeOffset=function(e,t){return(0,n.createAction)(r.HlsActionType.SetPresentationTimeOffset,{discoSequenceNumber:e,presentationTimeOffset:t})},t.setTimestampRolloverPositions=function(e,t){return(0,n.createAction)(r.HlsActionType.SetTimestampRolloverPositions,{next:e,previous:t})},t.setContentLocationId=function(e){return(0,n.createAction)(r.HlsActionType.SetContentLocationId,{locationId:e})}},23512:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsReducer=void 0,t.extrapolateSegmentStartTime=function(e,t,i){var n=o([],e,!0);return n[t]=r({},n[t]),n[t].startTime=i,function(e,t){for(var i=t-1;i>=0;i--)e[i]=r({},e[i]),e[i].startTime=e[i+1].startTime-e[i].duration}(n,t),function(e,t){for(var i=t+1;i<e.length;i++)e[i]=r({},e[i]),e[i].startTime=e[i-1].startTime+e[i-1].duration}(n,t),n};var a=i(3793),s=i(45861);t.HlsReducer=(0,a.default)(function(){return{masterPlaylist:{string:""},defaultLanguages:{},discontinuitySequenceTiming:{},presentationTimeOffsets:{},timestampRolloverPositions:{previous:-1,next:-1}}}(),((n={})[s.HlsActionType.SetMasterPlaylistString]=function(e,t){return function(e,t){return e.masterPlaylist.string?e:r(r({},e),{masterPlaylist:{string:t}})}(e,t.payload)},n[s.HlsActionType.SetPlaylistType]=function(e,t){return function(e,t){return r(r({},e),{playlistType:t})}(e,t.payload)},n[s.HlsActionType.SetIsLowLatencyPlaylist]=function(e,t){return function(e,t){return r(r({},e),{isLowLatencyPlaylist:t})}(e,t.payload)},n[s.HlsActionType.SetEndlist]=function(e,t){return function(e,t){return r(r({},e),{endlist:t})}(e,t.payload)},n[s.HlsActionType.SetDefaultLanguages]=function(e,t){return function(e,t){var i={},n={};
21return t.media.forEach(function(e){var t=!!e.attributes;if(t){var r=e.attributes,o=r.TYPE,a=r.LANGUAGE;a&&null!=a&&(t&&"YES"===e.attributes.DEFAULT&&!i[o]&&(i[o]={name:e.attributes.NAME,language:a}),"YES"!==e.attributes.AUTOSELECT||n[o]||(n[o]={name:e.attributes.NAME,language:a}))}}),r(r({},e),{defaultLanguages:r(r({},n),i)})}(e,t.payload)},n[s.HlsActionType.SetCustomTags]=function(e,t){return function(e,t){var i=t;return r(r({},e),{customTags:i.tags})}(e,t.payload)},n[s.HlsActionType.SetDiscoTimings]=function(e,t){return function(e,t){var i,n=t.mimeType,o=t.discoTimings;return r(r({},e),{discontinuitySequenceTiming:r(r({},e.discontinuitySequenceTiming),((i={})[n]=o,i))})}(e,t.payload)},n[s.HlsActionType.SetPresentationTimeOffset]=function(e,t){return function(e,t){var i,n=t.discoSequenceNumber,o=t.presentationTimeOffset;return r(r({},e),{presentationTimeOffsets:r(r({},e.presentationTimeOffsets),((i={})[n]=o,i))})}(e,t.payload)},n[s.HlsActionType.SetTimestampRolloverPositions]=function(e,t){return function(e,t){return r(r({},e),{timestampRolloverPositions:t})}(e,t.payload)},n[s.HlsActionType.SetContentLocationId]=function(e,t){return function(e,t){return r(r({},e),{contentLocationId:t.locationId})}(e,t.payload)},n))},61895:function(e,t){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function n(e){var t={};return Object.keys(e).forEach(function(i){var n;Object.keys(null!=(n=e[i])?n:{}).forEach(function(n){t[n]=function(i,n){var r,o,a,s,l,c,u,d,h,p;return{startTime:Math.max(null!=(a=null==(o=null==(r=e[n])?void 0:r[i])?void 0:o.startTime)?a:-1/0,null!=(l=null==(s=t[i])?void 0:s.startTime)?l:-1/0),endTime:Math.min(null!=(d=null==(u=null==(c=e[n])?void 0:c[i])?void 0:u.endTime)?d:1/0,null!=(p=null==(h=t[i])?void 0:h.endTime)?p:1/0)}}(n,i)})}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.getContentLocationId=t.getPresentationTimeOffset=t.getMergedDiscontinuityTimings=t.getFirstDiscoSequenceTiming=t.getDiscoSequenceTimings=t.getDiscoSequenceTiming=t.getCustomTags=t.getDefaultLanguages=t.getEndlist=t.getIsLowLatencyPlaylist=t.getPlaylistType=void 0,t.getHlsState=function(e){return e.hls},t.computeMergedDiscontinuityTimings=n,t.areDiscontinuitiesMisaligned=function(e,t,i){if(void 0===i&&(i=2),t.length<=1||!e.discontinuitySequenceTiming)return!1;var r=function(e,t){return t.reduce(function(t,i){return i in e&&(t[i]=e[i]),t},{})}(e.discontinuitySequenceTiming,t),o=n(r);return 1!==Object.keys(o).length&&!Object.keys(o).every(function(e,n){var a=o[e];return t.every(function(t){var s,l=null==(s=r[t])?void 0:s[e];if(!l)return!0;var c=Math.abs(l.startTime-a.startTime),u=Math.abs(l.endTime-a.endTime);return 0===n?u<=i:n===Object.keys(o).length-1?c<=i:c<=i&&u<=i})})},t.getPlaylistType=function(e){return e.playlistType},t.getIsLowLatencyPlaylist=function(e){return e.isLowLatencyPlaylist},t.getEndlist=function(e){return e.endlist},t.getDefaultLanguages=function(e){return e.defaultLanguages},t.getCustomTags=function(e){return e.customTags},t.getDiscoSequenceTiming=function(e,t,n){var r,o;return null!=(o=null==(r=e.discontinuitySequenceTiming)?void 0:r[t])&&o[n]?i({},e.discontinuitySequenceTiming[t][n]):null},t.getDiscoSequenceTimings=function(e,t){var n;return null!=(n=e.discontinuitySequenceTiming)&&n[t]?i({},e.discontinuitySequenceTiming[t]):null},t.getFirstDiscoSequenceTiming=function(e){var i,n=(0,t.getMergedDiscontinuityTimings)(e);return null!=(i=n[Object.keys(n)[0]])?i:{startTime:0,endTime:0}},t.getMergedDiscontinuityTimings=function(e){var t;return n(null!=(t=e.discontinuitySequenceTiming)?t:{})},t.getPresentationTimeOffset=function(e,t){return e.presentationTimeOffsets[t]},t.getContentLocationId=function(e){return e.contentLocationId}},45861:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.HlsActionType=void 0,function(e){e.SetMasterPlaylistString="@instance/hls/setmasterplayliststring",e.SetPlaylistType="@instance/hls/setplaylisttype",e.SetIsLowLatencyPlaylist="@instance/hls/setislowlatencyplaylist",e.SetEndlist="@instance/hls/setendlist",e.SetDefaultLanguages="@instance/hls/setsefaultlanguages",e.SetCustomTags="@instance/hls/setsustomtags",e.SetDiscoTimings="@instance/hls/setdiscotimings",e.SetPresentationTimeOffset="@instance/hls/setpresentationtimeoffset",e.SetTimestampRolloverPositions="@instance/hls/settimestamprolloverpositions",e.SetContentLocationId="@instance/hls/setcontentlocationid"}(i||(t.HlsActionType=i={}))}
vendor: 15,817 bytes, line 21
21,5671:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setSegmentInfos=function(e,t){return(0,n.createAction)(r.SegmentInfoMapActionType.SetSegmentInfos,{qualityPath:e,updatedEntry:t})},t.updateSegmentInfos=function(e,t){return(0,n.createAction)(r.SegmentInfoMapActionType.UpdateSegmentInfos,{qualityPath:e,updatedEntry:t})};var n=i(35267),r=i(49713)}},function(e){return function(){return e(e.s=81232)}()}])})}()}(bitmovinplayerHls);var bitmovinplayerHlsExports=bitmovinplayerHls.exports;let HLSModule=getDefaultExportFromCjs$1(bitmovinplayerHlsExports);var bitmovinplayerMserenderer={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[737],{1765:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferMimeCodecMap=void 0;var n=i(77753),r=i(91678),o=i(46151),a=i(33436),s=i(94685),l=i(85434);t.BufferMimeCodecMap=function(){function e(e,t){this.AV={},this.BV=e,this.CV=t}return e.prototype.DV=function(e){var t,i,a=null==(t=this.BV)?void 0:t.getState();(0,n.isInstanceState)(a)&&c(this.CV)&&((0,o.getMetricsState)(a)[e]||null==(i=this.BV)||i.dispatch((0,r.initializeMetricsForMimeType)(e,this.CV)))},e.prototype.EV=function(e){var t;null==(t=this.BV)||t.dispatch((0,r.removeMetricsForMimeType)(e))},e.prototype.add=function(e,t){var i;this.AV[e]=t,this.DV(e),null==(i=this.BV)||i.dispatch((0,r.addMetricsValue)(e,a.MetricType.StalledSeconds,0))},e.prototype.remove=function(e){var t=this,i=l.MimeTypeHelper.getMediaType(e);Object.keys(this.AV).forEach(function(e){l.MimeTypeHelper.getMediaType(e)===i&&(t.EV(e),delete t.AV[e])})},e.prototype.has=function(e,t){var i=this,n=l.MimeTypeHelper.getMediaType(e),r=l.MimeTypeHelper.extractContainerType(e);return Object.keys(this.AV).some(function(o){var a=l.MimeTypeHelper.getMediaType(o),s=l.MimeTypeHelper.extractContainerType(o);return a===n&&s===r&&t===i.AV[e]})},e.prototype.update=function(e,t){this.remove(e),this.add(e,t)},e.prototype.forEach=function(e){var t=this;Object.keys(this.entries()).forEach(function(i){return e(i,t.entries()[i])})},e.prototype.entries=function(){return this.AV},e.prototype.dispose=function(){this.AV={},this.BV=void 0,this.CV=void 0},e}();var c=function(e){return(0,s.isObject)(e)}},98331:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GapHandler=void 0;var n=i(3714),r=i(77753),o=i(87827),a=i(86897),s=i(15971),l=i(21513),c=i(85434),u=i(15487),d=i(60877),h=i(88844),p=i(19274),f=i(80354),m=i(82889),g=[p.MediaElementEvent.seeking,p.MediaElementEvent.seeked,p.MediaElementEvent.pause,p.MediaElementEvent.playing,p.MediaElementEvent.error];function v(e,t){return e.find(function(e){return e.start-m.Ranges.TIME_FUDGE_FACTOR>=t})}t.GapHandler=function(){function e(e){var t,i,l=this;this.PV=!1,this.play=function(){l.QV=Date.now()},this.UV=function(){if(!l.FV.isDisposed&&void 0!==l.GV){var e=l.GV.paused,t=l.GV.seeking,i=l.vW(l.GV.currentTime),n=l.TV(),r=l.SV();e||t&&!i||n||(l.IV++,r||l.VV())}},this.VV=function(){var e,t=l.FV.store.getState();if((0,r.isInstanceState)(t)&&l.GV){var i=(0,o.getPlayerState)(t);((0,o.getIsSeeking)(i)||null!=(e=l.GV)&&e.seeking)&&!l.vW(l.GV.currentTime)||l.sW()}},this.WV=function(){var e=(0,s.getSourceState)(l.FV);e&&!(0,a.getIsTimestampRollingOver)(e)&&l.sW()},this.XV=function(){l.OV=void 0},this.bV=function(){if(l.LV=Date.now(),l.GV&&!l.GV.paused&&!l.GV.seeking){l.NV||(l.RV(),l.NV=!0);var e=l.FV.renderer.getCurrentTime(!0);if(l.YV(e))l.aV();else{var t=l.FV.renderer.getVideoElementBufferedRanges();if(t.length>1&&!l.OV){var i=l.FV.settings.MIN_SIZE_FOR_GAP_SKIPPING;l.OV=function(e,t,i){for(var n=0;n<e.length-1;n++){var r=e[n].end,o=e[n+1].start;if(r>t&&o>r&&o-r>=i)return{start:r,end:o}}}(t,e,i)}else l.ZV(e)?(l.HV++,l.VV()):e===l.JV?l.HV++:(l.HV=0,l.IV=0,l.JV=e)}}},this.mW=function(){l.HV=0,l.IV=0,(0,h.clearTimeoutIfDefined)(l.KV),l.KV=-1},this.nW=function(e){if(l.GV&&!l.PV){var t=l.FV.renderer.getVideoElementBufferedRanges().sort(function(e,t){return e.start-t.start}),i=l.FV.renderer.getCurrentTime(!0),n=v(t,i);if(l.HV=0,l.IV=0,l.KV=-1,void 0!==n&&i===e){var r=n.start;l.FV.logger.debug("Skipping gap from ".concat(i," to ").concat(r)),l.oW(i,r)}}},this.FV=e,this.GV=e.videoElement,this.LV=0,this.HV=0,this.IV=0,this.QV=0,this.NV=!1,this.OV=void 0,null==(t=this.GV)||t.addEventListener(p.MediaElementEvent.timeupdate,this.bV),null==(i=this.GV)||i.addEventListener(p.MediaElementEvent.play,this.play),this.FV.eventHandler.on(n.PlayerEvent.Seek,this.XV)}return e.prototype.RV=function(){var e,t,i;null==(e=this.GV)||e.addEventListener(p.MediaElementEvent.waiting,this.VV),null==(t=this.GV)||t.addEventListener(p.MediaElementEvent.stalled,this.WV);for(var n=0,r=g;n<r.length;n++){var o=r[n];null==(i=this.GV)||i.addEventListener(o,this.mW)}this.MV=window.setInterval(this.UV,250)},e.prototype.SV=function(){return Date.now()-this.QV<500},e.prototype.TV=function(){return Date.now()-this.LV<=1e3},e.prototype.YV=function(e){return!(!this.OV||this.PV)&&(function(e,t){return e>t.start&&e<t.end}(e,this.OV)||function(e,t,i){return!(e<=0)&&i.start>t&&i.start-e<=t}(this.FV.settings.PROACTIVE_GAP_SKIP_DISTANCE_SECONDS,e,this.OV)||function(e,t){return e>t.end&&(0,d.shouldResetCurrentTimeAfterBufferUnderrun)()}(e,this.OV))},e.prototype.ZV=function(e){return 5===this.HV&&e===this.JV},e.prototype.aV=function(){if(this.GV&&this.OV){var e=this.FV.renderer.getCurrentTime(!0),t=Math.max(e+.01,this.OV.end);this.FV.logger.debug("Skipping gap proactively from ".concat(e," to ").concat(t)),this.oW(e,t)}},e.prototype.oW=function(e,t){var i=this;this.PV=!0,this.OV=void 0,this.pW(e,t).then(function(){return i.FV.renderer.setCurrentTime(t+m.Ranges.TIME_FUDGE_FACTOR)}).then(function(t){return i.FV.logger.debug("Jumped buffer gap from ".concat(e," to ").concat(t))}).catch(function(n){return i.FV.logger.debug("Failed to skip buffer gap from ".concat(e," to ").concat(t),n)}).finally(function(){i.PV=!1,i.OV=void 0})},e.prototype.pW=function(e,t){if(!(0,l.getCapabilities)().isTizen)return Promise.resolve();var i=this.qW();if(void 0===i)return Promise.resolve();var n=v(this.FV.renderer.getBufferedRanges(i).sort(function(e,t){return e.start-t.start}),e);return t!==(null==n?void 0:n.start)?(this.FV.logger.debug("Clearing video data from ".concat(e," to ").concat(t," to ensure gap can be skipped")),this.FV.renderer.removeData(i,e,t)):Promise.resolve()},e.prototype.qW=function(){var e;return null==(e=this.FV.segmentInfoService)?void 0:e.getSegmentControllerMimeTypes().find(function(e){return c.MimeTypeHelper.isVideo(e)})},e.prototype.rW=function(e,t,i){for(var n=m.Ranges.findGaps(e,i),r=0;r<n.length;r++){var o=n.start(r),a=n.end(r);if(t-o<4&&t-o>2)return{start:o,end:a}}},e.prototype.sW=function(){if(!(this.KV>-1)&&this.NV&&this.GV){var e=this.GV.buffered,t=this.GV.currentTime,i=m.Ranges.findNextRange(e,t),n=this.FV.settings.MIN_SIZE_FOR_GAP_SKIPPING;if(0===i.length){var r=this.rW(e,t,n);if(r)return this.FV.logger.debug("Encountered a gap in video from ".concat(r.start," to ").concat(r.end,". Seeking to ").concat(t,"...")),this.IV=0,void this.wW(t);var o=(0,f.findNextRangeForGap)(t,e),a=o.isNearEndOfBufferedRange,s=o.nextRangeStart;return a&&isFinite(s)?(this.FV.logger.debug("Playback stalled because of a very small gap. Seeking to ".concat(s,"...")),this.IV=0,void this.wW(s)):void(this.IV>10&&(this.IV=0,this.tW(t,this.GV)))}if(!function(e,t,i){if(0===i)return!1;var n=m.Ranges.findNextRange(e,t);if(0===n.length)return!1;var r=m.Ranges.findRangeForTime(e,t),o=r.length?r.end(0):t;return n.start(0)-o<i}(e,t,n)){var l=i.start(0)-t;this.FV.logger.debug("setTimer: stopped at: ".concat(t,", setting timer for: ").concat(l,", seeking to: ").concat(i.start(0))),this.KV=window.setTimeout(this.nW.bind(this),l,this.FV.renderer.getCurrentTime(!0))}}},e.prototype.tW=function(e,t){this.FV.logger.debug("currentTime not advancing from ".concat(e," although the video element is neither paused nor seeking")),this.uW(e,t),t.eventHandler.triggerEvent(p.MediaElementEvent.currenttimenotadvancing)},e.prototype.uW=function(e,t){var i=(0,l.getCapabilities)(),n=i.isSafari,r=i.isTizen,o=i.isWpeWebKit;e>t.duration&&!n?this.wW(t.duration):this.FV.settings.QJY_BROWSER_WORKAROUND||r||(0,u.isWebOs2016)()||(0,u.isWebOs2022OrNewer)()||o?this.wW(e+.01):this.wW(e)},e.prototype.vW=function(e){if(!this.GV)return!1;for(var t=this.GV.buffered,i=0;i<t.length;i++)if(t.end(i)===e)return!0;return!1},e.prototype.shutdown=function(){var e,t,i,r,o;null==(e=this.GV)||e.removeEventListener(p.MediaElementEvent.waiting,this.VV),null==(t=this.GV)||t.removeEventListener(p.MediaElementEvent.stalled,this.WV),null==(i=this.GV)||i.removeEventListener(p.MediaElementEvent.timeupdate,this.bV),null==(r=this.GV)||r.removeEventListener(p.MediaElementEvent.play,this.play),this.FV.eventHandler.off(n.PlayerEvent.Seek,this.XV);for(var a=0,s=g;a<s.length;a++){var l=s[a];null==(o=this.GV)||o.removeEventListener(l,this.mW)}(0,h.clearIntervalIfDefined)(this.MV),this.mW()},e.prototype.wW=function(e){if(this.GV&&this.GV.currentTime!==e)try{this.GV.currentTime=e}catch(t){this.FV.logger.debug("GapHandler failed to set currentTime on video element to ".concat(e),t)}},e}()},80354:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.findNextRangeForGap=function(e,t){for(var i=!1,r=1/0,o=0;o<t.length;o++){var a=t.start(o),s=t.end(o),l=e+2*n.Ranges.TIME_FUDGE_FACTOR;if(i&&!isFinite(r)){r=a;break}a<e&&s>e&&l>s&&(i=!0)}return{isNearEndOfBufferedRange:i,nextRangeStart:r}};var n=i(82889)},79323:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MSERenderer=void 0;var n=i(4524),r=i(66790),o=i(40306),a=i(3336),s=i(80813),l=i(3714),c=i(44468),u=i(33468),d=i(7387),h=i(23690),p=i(15971),f=i(21513),m=i(93204),g=i(94685),v=i(34841),y=i(78877),b=i(87244),S=i(84568),_=i(85434),E=i(23068),T=i(19274),w=i(68925),A=i(86897),P=i(1765),I=i(98331),C=i(48873),M=i(65940),R=i(10344);t.MSERenderer=function(){function e(e){var t=this;this.context=e,this.yw=0,this.waitingForSeekedPromise=null,this.Hw=function(e){t.setCurrentTimeDelayedContext&&t.setCurrentTimeDelayedContext.time!==e.seekTarget&&Math.abs(t.setCurrentTimeDelayedContext.time-e.seekTarget)>=t.context.settings.GAP_TOLERANCE&&t.cancelSetCurrentTimeDelayed()},this.reOpenMse=function(){var e=t.segmentQueueMimeTypes;if(e.length<1)return Promise.resolve();var i=e.find(function(e){return t.zw.hasOwnProperty(e)});return i?t.setTimestampOffset(i,t.zw[i]):t.setTimestampOffset(e[0],0)},this.Iw=function(){if(t.video){var e=t.video.isPictureInPicture()?c.ViewMode.PictureInPicture:c.ViewMode.Inline;t.context.store.dispatch((0,h.setPlayerViewMode)(e))}},this.Jw=function(e){e.time&&e.time>0&&(t.yw=0)},this.postBufferRemoval=function(e,i,n){t.logger.debug("successfully removed buffer for ".concat(e," (from  ").concat(i," to ").concat(n,")"))},this.Nw=(0,S.memoize)(this.Ow.bind(this)),this.logger=e.logger,this.video=e.videoElement,this.settings=e.settings,this.sw=Promise.resolve(),this.eventHandler=void 0,this.zw={},this.tw=new P.BufferMimeCodecMap(e.store,e.settings),this.savedCurrentTime=0,this.playerEventHandler=e.eventHandler,this.shutdownPromise=Promise.resolve(),this.init(!0)}return e.prototype.createMSEWrapper=function(){return new C.MSEWrapper(this.context)},e.prototype.Ew=function(e){return e?this.Gw():this.Fw()},e.prototype.Fw=function(){var e=this;return function(){var t;return null==(t=e.mse)?void 0:t.createNewMSE()}},e.prototype.Gw=function(){var e,t=null==(e=this.mse)?void 0:e.createNewMSE();return function(){return t}},e.prototype.init=function(e){var t=this;this.Bw=Promise.resolve(),this.mse=this.createMSEWrapper(),this.sw=this.sw.catch(function(e){return t.context.logger.debug("Caught error during MSE recreation",e)}).then(this.Ew(e)),this.vw=!0,this.segmentQueues={},this.setCurrentTimeContext=void 0,this.setCurrentTimeDelayedContext=void 0,this.Cw=new Map,this.Dw=new Map,this.xw=new I.GapHandler(this.context),null==this.eventHandler&&this.video&&(this.eventHandler=new R.VideoEventHandler(this.video),this.eventHandler.on(T.MediaElementEvent.timeupdate,this.Jw)),this.on(T.MediaElementEvent.webkitpresentationmodechanged,this.Iw),this.playerEventHandler.on(l.PlayerEvent.Seek,this.Hw)},e.prototype.trackRendererError=function(e){this.yw++,this.yw>=this.settings.MAX_CONSECUTIVE_RENDERER_ERRORS&&this.context.eventHandler.fireError(new a.PlayerError(o.ErrorCode.PLAYBACK_VIDEO_DECODING_ERROR,{codec:e.getCodec(),mimeType:e.getMimeType(),segmentUrl:e.getUrl()},"Failed to append the segment to the buffer. The MSE has thrown an error.",this.context.sourceContext.sourceIdentifier))},e.prototype.hasSourceBuffers=function(){return this.segmentQueueMimeTypes.length>0},e.prototype.hasDataInSourceBuffers=function(){var e=this.mse;return!(!e||!this.hasSourceBuffers())&&this.segmentQueueMimeTypes.every(function(t){return e.getBufferedRanges(t).length>0})},e.prototype.updateRendererRangesInStore=function(e){var t;null==(t=(0,p.getSourceStore)(this.context))||t.dispatch((0,w.setRendererRanges)(e,this.getOverallBufferedRanges(e)))},e.prototype.addBuffer=function(e,t){var i,n=this;if(!this.mse)return!1;this.tw.add(e,t);var r=!!this.mse.addBuffer(e,t,function(){return n.updateRendererRangesInStore(e)});return r&&(this.mse.addUpdateEndCallback(e,function(){var t;return null==(t=n.setCurrentTimeDelayedContext)||t.reevaluateDataInBuffer(),n.Cw.set(e,!1)}),this.segmentQueues[e]=[],null==(i=(0,p.getSourceStore)(this.context))||i.dispatch((0,w.setRendererRanges)(e,[]))),r},e.prototype.addDrmInitData=function(e){if(null!=e&&e.length){var t=this.drmService;t?e.forEach(function(e){return t.addInitData(e)}):this.context.logger.debug("PSSH data found but DRM is not configured")}},e.prototype.storeDrmInitDataFromManifest=function(e){var t=this;e&&this.context.serviceManager.maybeCall(s.ServiceName.ManifestService,function(i){var n=i.getContentProtectionForAdaptationSet(e).flatMap(function(e){var i=u.KeySystemKind[e.name.toUpperCase()],n=e.schemeIdUri.replace("urn:uuid:","").replace(/-/g,"");return(e.pssh||[]).map(function(r,o){return t.logger.insane("adding pssh for ".concat(e.name," : ").concat(r)),{initData:e.psshData[o],initDataStr:r,systemID:e.schemeIdUri,systemIDraw:n,systemName:i,kid:[]}})});t.addDrmInitData(n)},void 0,this.context.sourceContext.sourceIdentifier)},e.prototype.appendData=function(e){var t=this;return this.addDrmInitData(e.getDrmInitData()),this.addSegmentToSegmentQueue(e),this.Bw=this.Bw.catch(function(){}).then(function(){return t.processSegmentQueues()}),this.Bw},e.prototype.addSegmentToSegmentQueue=function(e){var t=e.getMimeType();this.segmentQueues[t]?(this.segmentQueues[t].push(e),this.updateRendererRangesInStore(t)):this.logger.debug("Renderer missing segment queue for mimeType(".concat(t,") but trying to push segment.(url=").concat(e.getUrl(),")"))},e.prototype.getBufferedRanges=function(e){var t,i;return null!=(i=null==(t=this.mse)?void 0:t.getBufferedRanges(e))?i:[]},e.prototype.getVideoElementBufferedRanges=function(){return(0,n.getBufferedRanges)(this.video)},e.prototype.getOverallBufferedRanges=function(e){if(!this.mse||!this.segmentQueues.hasOwnProperty(e))return[];var t=n.BufferRangeHelper.getRangesFromQueue(this.segmentQueues[e],this.settings.GAP_TOLERANCE);return t=t.concat(this.getBufferedRanges(e)),n.BufferRangeHelper.mergeRanges(t,this.settings.GAP_TOLERANCE)},e.prototype.isDataBeingAppended=function(e){return!!this.mse&&(this.segmentQueues&&this.segmentQueues[e]&&this.segmentQueues[e].length>0||this.mse.isAnyBufferUpdating())},e.prototype.Kw=function(e){var t=(0,p.getSourceState)(this.context);if(!t)return[];var i=(0,A.getBufferStateMap)(t);return i?(0,A.getRendererBufferedRanges)(i,e):[]},e.prototype.getEndOfBufferTime=function(){var e=this,t=[];
21if(this.segmentQueueMimeTypes.forEach(function(i){var n=e.Kw(i);if(n.length>0){var r=n[n.length-1].end;t.push(r)}}),0!==t.length)return Math.min.apply(Math,t)},e.prototype.removeDataFromSegmentQueues=function(e,t,i){var n=this;void 0===t&&(t=-1/0),void 0===i&&(i=1/0),this.segmentQueues.hasOwnProperty(e)&&(this.segmentQueues[e]=this.segmentQueues[e].filter(function(r){var o=r.getDuration(),a=r.getPlaybackTime(),s=r.getRepresentationId().representationId,l=r.isInit()||a<t||a+o>i;return n.logger.debug("[MSERenderer][".concat(e,"][").concat(s,"] Removing segment from queue [").concat(!l,"]. ")+"Clearing from ".concat(t," to ").concat(i,". Segment: [playbackTime=").concat(r.getPlaybackTime(),", ")+"duration=".concat(r.getDuration(),", url=").concat(r.getUrl(),"]")),l}),this.updateRendererRangesInStore(e))},e.prototype.removeData=function(e,t,i){return this.mse?(void 0===t&&void 0===i&&this.saveCurrentTime(),this.removeDataFromSegmentQueues(e,t,i),this.mse.removeFromBuffer(e,t,i,this.postBufferRemoval)):Promise.reject()},e.prototype.getDroppedVideoFrames=function(){var e,t,i,n,r;return null!=(r=null!=(i=null==(t=null==(e=this.video)?void 0:e.getVideoPlaybackQuality())?void 0:t.droppedVideoFrames)?i:null==(n=this.video)?void 0:n.droppedVideoFrames)?r:0},e.prototype.setPlaybackSpeed=function(e){this.video&&!isNaN(e)&&e>0&&e!==this.video.playbackRate&&(this.video.playbackRate=e)},e.prototype.getPlaybackSpeed=function(){var e,t;return null!=(t=null==(e=this.video)?void 0:e.playbackRate)?t:1},e.prototype.setVolume=function(e){this.video&&!isNaN(e)&&(this.video.volume=Math.min(e/100,1))},e.prototype.getVolume=function(){var e,t;return 100*(null!=(t=null==(e=this.video)?void 0:e.volume)?t:1)},e.prototype.mute=function(){this.video&&(this.video.muted=!0)},e.prototype.unmute=function(){this.video&&(this.video.muted=!1)},e.prototype.isMuted=function(){var e,t;return null!=(t=null==(e=this.video)?void 0:e.muted)&&t},e.prototype.play=function(){var e=this;return this.video?this.video.play().catch(function(t){if((0,b.isSwitchingBufferBlocks)((0,p.getSourceStore)(e.context)))return e.ready();throw t}):Promise.resolve()},e.prototype.pause=function(){this.video&&this.video.pause()},e.prototype.end=function(){this.pause(),this.cancelSetCurrentTimeDelayed()},e.prototype.isPaused=function(){var e,t;return null==(t=null==(e=this.video)?void 0:e.paused)||t},e.prototype.setDuration=function(e){this.mse&&(e=Math.floor(1e4*e)/1e4,this.ww=e,this.mse.setDuration(e))},e.prototype.getDuration=function(){var e,t;return null!=(t=null==(e=this.video)?void 0:e.duration)?t:NaN},e.prototype.setCurrentTime=function(e){var t=this;if(!this.mse)return Promise.reject("MSE is not open");if(e=Math.ceil(100*e)/100,this.setCurrentTimeContext){if(this.setCurrentTimeContext.time===e)return this.setCurrentTimeContext.promise;this.cancelSetCurrentTimeDelayed()}var i=Promise.resolve();this.isMSEOpen()||this.Sw(e)||(this.logger.debug("reopen MSE on setCurrentTime"),i=this.reOpenMse());var n=i.then(function(){return t.setCurrentTimeInternal(e).catch(function(i){return t.logger.debug("could not set time ".concat(e," on video element"),i),t.getCurrentTime()}).finally(function(){return t.vw=!1})});return this.setCurrentTimeContext={time:e,isInitialSeek:this.vw,promise:n},n},e.prototype.getCurrentVideoTime=function(){var e,t;return null!=(t=null==(e=this.video)?void 0:e.currentTime)?t:0},e.prototype.getCurrentFallbackTime=function(){var e=this.setCurrentTimeContext;return e&&e.isInitialSeek&&-1!==e.time?e.time:0!==this.savedCurrentTime&&this.Lw()?this.savedCurrentTime:(this.savedCurrentTime=0,this.getCurrentVideoTime())},e.prototype.Lw=function(){var e;return!this.hasDataInSourceBuffers()&&!(null!=(e=this.mse)&&e.isBufferRemovalPending())||!(!(0,b.isSwitchingBufferBlocks)((0,p.getSourceStore)(this.context))&&this.Sw(this.getCurrentVideoTime()))},e.prototype.getCurrentTime=function(e){return void 0===e&&(e=!1),e?this.getCurrentVideoTime():this.getCurrentFallbackTime()},e.prototype.getSnapshotData=function(e,t){void 0===t&&(t=1);try{if(!this.video)return;var i=this.video.videoWidth,n=this.video.videoHeight;this.Aw||(this.Aw=document.createElement("canvas"),this.Aw.id="snapshotHiddenCanvas"),this.Aw.width=i,this.Aw.height=n;var r=this.Aw.getContext("2d");null==r||r.drawImage(this.video.getWrappedElement(),0,0,i,n);var o=void 0;return("image/jpeg"===e||"image/webp"===e)&&(t=Math.max(t,0),t=Math.min(t,1)),o=this.Aw.toDataURL(e,t),{height:n,width:i,data:o}}catch(e){return void(e&&e.message?this.logger.debug("Snapshot acquisition failed: "+e.message):this.logger.debug("Snapshot acquisition failed"))}},e.prototype.Mw=function(){return this.drmService?this.drmService.shutdownPromise:Promise.resolve()},e.prototype.ready=function(){var e=this;return this.shutdownPromise.then(function(){return e.Mw()}).then(function(){return e.mse||e.init(!1),e.sw})},e.prototype.setTimestampOffset=function(e,t){var i=this;return this.mse?this.mse.setTimestampOffset(e,t).then(function(){i.zw[e]=t}):Promise.resolve()},e.prototype.shutdown=function(e){var t,i=this;if(!this.mse)return this.shutdownPromise;
vendor: 28,753 bytes, line 21
21for(var n in this.waitingForSeekedPromise=null,e&&this.saveCurrentTime(),this.segmentQueues)this.segmentQueues.hasOwnProperty(n)&&(delete this.segmentQueues[n],null==(t=(0,p.getSourceStore)(this.context))||t.dispatch((0,w.setRendererRanges)(n,[])));var r=this.mse;return this.shutdownPromise=this.shutdownPromise.then(function(){return r.tearDownMediaSource()}).catch(function(e){i.logger.debug("Could not tear down media source",{err:e,message:e.message})}),this.mse=void 0,this.cancelSetCurrentTimeDelayed(),this.xw&&(this.xw.shutdown(),this.xw=void 0),this.eventHandler&&!e&&(this.eventHandler.dispose(),this.eventHandler=void 0),this.Cw.clear(),this.Dw.clear(),this.shutdownPromise},e.prototype.release=function(){var e;for(var t in this.segmentQueues)this.segmentQueues.hasOwnProperty(t)&&null!==this.mse&&(delete this.segmentQueues[t],null==(e=(0,p.getSourceStore)(this.context))||e.dispatch((0,w.setRendererRanges)(t,[])));return this.tw.dispose(),this.mse&&this.mse.dispose(),this.sw=Promise.resolve(),this.zw={},this.cancelSetCurrentTimeDelayed(),this.xw&&(this.xw.shutdown(),this.xw=void 0),this.off(T.MediaElementEvent.webkitpresentationmodechanged,this.Iw),this.eventHandler&&(this.eventHandler.off(T.MediaElementEvent.timeupdate,this.Jw),this.eventHandler.dispose(),this.eventHandler=void 0),this.waitingForSeekedPromise=null,this.playerEventHandler.off(l.PlayerEvent.Seek,this.Hw),this.Nw.invalidate(),this.Mw()},e.prototype.on=function(e,t){var i;null==(i=this.eventHandler)||i.on(e,t)},e.prototype.off=function(e,t){this.eventHandler&&this.eventHandler.off(e,t)},Object.defineProperty(e.prototype,"drmService",{get:function(){var e;return null==(e=this.context.serviceManager)?void 0:e.get(s.ServiceName.DrmService)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentQueueMimeTypes",{get:function(){return Object.keys(this.segmentQueues)},enumerable:!1,configurable:!0}),e.prototype.setDrmConfig=function(e,t){return this.drmService?this.drmService.updateDrmConfig(e,t):Promise.reject(r.DrmSetupError.MISSING_CONFIGURATION)},e.prototype.isMediaTypeSupported=function(e,t){return this.Nw("".concat(e,'; codecs="').concat(t,'"'))},e.prototype.Ow=function(e){return(0,M.shouldUseManagedMediaSource)(this.context.settings.PREFER_MANAGED_MEDIA_SOURCE)?window.ManagedMediaSource.isTypeSupported(e):"MediaSource"in window&&MediaSource.isTypeSupported(e)},e.prototype.Pw=function(){this.uw&&(this.uw.reject(Error("Cancelled pending end of stream.")),this.uw=void 0)},e.prototype.Qw=function(){var e=this;return this.uw=this.uw||new v.Deferred,this.uw.promise.then(function(){var t;return null==(t=e.mse)?void 0:t.endOfStream()}).catch(function(t){(0,g.isContextAvailable)(e.context)&&e.context.logger.debug(t)})},e.prototype.setEndOfStream=function(e){if(void 0===e&&(e=!0),!e)return this.Pw(),this.isMSEOpen()?Promise.resolve():this.reOpenMse();if(!this.hasSourceBuffers()||!this.mse)return this.logger.debug("Cannot signal EOS as no buffers have been added yet"),Promise.resolve();var t=this.getEndOfBufferTime();return this.setCurrentTimeDelayedContext&&this.setCurrentTimeDelayedContext.time>=this.ww&&t&&!isNaN(t)&&this.cancelSetCurrentTimeDelayed(),this.setCurrentTimeDelayedContext?this.Qw():this.mse.endOfStream()},e.prototype.Rw=function(e){var t=this.Uw();for(var i in t){var n=t[i];if(n.start<=e&&n.end>=e)return!0}return!1},e.prototype.Sw=function(e,t){if(void 0===t&&(t=0),this.Rw(e))return!1;var i=this.getRangesInSourceBuffers();return!!i&&Object.keys(i).every(function(r){return(0,n.isInTimeRanges)(i[r],e,t)})},e.prototype.Tw=function(e,t){var i,r=null!=(i=this.getRangesInSourceBuffers())?i:{},o=Object.keys(r),a=function(e,t){return Object.keys(e).map(function(i){return e[i].find(function(e){return(0,n.isInTimeRanges)([e],t)})}).filter(E.isDefined)}(r,e);if(0===o.length||a.length<o.length)return NaN;var s=Math.min.apply(Math,a.map(function(e){var t;return null!=(t=null==e?void 0:e.end)?t:1/0}))-e;return s>=t?e:e-(t-s)},e.prototype.adjustTimeToNextCommonBufferStart=function(e){var t,i,n,r=this,o=null==(t=(0,p.getSourceState)(this.context))?void 0:t.drm,a=(0,y.getBufferEndSafetyMargin)(o);if(this.Sw(e,a))return e;var s=this.Sw(e),l=this.getFutureBufferStarts(e).filter(function(t){return t>=e}),c=0===l.length,u=null==(n=null==(i=(0,p.getSourceState)(this.context))?void 0:i.buffer.isLoadingRangeFinished)||n;if(s&&c){var d=this.Tw(e,a);return d===e||u?!isNaN(d)&&this.Sw(d)?(this.logger.debug("Adjusting current time away from end of buffer: ".concat(d)),d):e:(this.logger.debug("Not adjusting seek target, because there will be future data"),NaN)}if(!s&&c)return NaN;var h=l.find(function(e){return r.Sw(e,a)}),f=h??Math.min.apply(Math,l);return h||u?(this.logger.debug("Adjusting current time to next safe buffer start: ".concat(f)),f):(this.logger.debug("Not adjusting seek target, as it is not safe across media types and there will be future data"),NaN)},e.prototype.getFutureBufferStarts=function(e){var t,i=this.getRangesInSourceBuffers();if(!i)return[];if(this.mse){var r=this.Uw();t=Object.keys(r).map(function(e){return r[e]})}else t=[];return n.BufferRangeHelper.getCommonBufferedRanges(i).filter(function(t){return t.getEnd()>=e&&!isNaN(t.getStart())}).filter(function(e){return t.every(function(t){return(0,n.areDisjoint)(t,{start:e.getStart(),end:e.getEnd()})})}).map(function(e){return e.getStart()})},e.prototype.getRangesInSourceBuffers=function(){if(!this.mse)return null;var e={};for(var t in this.segmentQueues)if(this.segmentQueues.hasOwnProperty(t)&&(e[t]=this.mse.getBufferedRanges(t),e[t].length<1))return null;return Object.keys(e).length?e:null},e.prototype.Uw=function(){if(!this.mse||!this.mse.isBufferRemovalPending())return{};var e={};for(var t in this.segmentQueues){var i=this.mse.getRangePendingRemoval(t);this.segmentQueues.hasOwnProperty(t)&&i&&(e[t]=i)}return e},e.prototype.processSegmentQueues=function(){var e=this,t=this.segmentQueueMimeTypes.filter(function(t){return e.segmentQueues[t].length>0}).map(function(t){return e.addSegmentFromQueueToMse(t)});return 0===t.length?Promise.resolve():Promise.all(t).then(function(){return e.processSegmentQueues()}).catch(function(e){if(e!==r.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED)throw e})},e.prototype.getHeadOfQueue=function(e){return this.segmentQueues[e][0]},e.prototype.isMSEOpen=function(){var e;return(null==(e=this.mse)?void 0:e.readyState)===C.MediaSourceReadyState.open},e.prototype.Vw=function(e){var t,i=null==(t=(0,p.getSourceState)(this.context))?void 0:t.drm;return this.context.serviceManager.maybeCall(s.ServiceName.DrmService,function(t){return t.maybeWaitForDrmLicense(e,i)},Promise.resolve())},e.prototype.addSegmentFromQueueToMse=function(e){var t=this;if(!this.mse)return Promise.resolve();var i=Promise.resolve();this.isMSEOpen()||(i=this.reOpenMse());var n=this.getHeadOfQueue(e);if(!n)return Promise.resolve();var o=n.getRepresentationId().representationId,a=n.getUrl();return this.context.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Scheduling appendage to buffer [url=").concat(a,"], DRM key ID (").concat(n.getDrmKid(),")")),i.then(function(){return t.Vw(n)}).then(function(){return t.mse?t.segmentQueues[e].includes(n)?t.mse.addToBuffer(n).then(function(){var i=t.getHeadOfQueue(e)!==n;if(t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Appended segment to buffer [url=").concat(a,"]")),i){var r=t.segmentQueues[e][0],s=r?r.getUrl():"none";t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Skipping removal of [url=").concat(a,"] ")+"from segment queue as the queue head has unexpectedly changed to [url=".concat(s,"]"))}else t.segmentQueues[e].shift();t.drmService&&t.hasDataInSourceBuffers()&&!(0,b.isSwitchingBufferBlocks)((0,p.getSourceStore)(t.context))&&t.drmService.signalInitDataShouldBeAvailable()}):(t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Segment ").concat(n.getUrl()," no longer part of the queue - skipping appendage")),Promise.resolve()):Promise.reject(r.SOURCE_BUFFER_APPEND_STATUS.FAILURE)}).catch(function(i){if(t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Adding segment from queue to buffer failed"),i),i===r.SOURCE_BUFFER_APPEND_STATUS.FAILURE&&t.trackRendererError(n),t.mse&&i===r.SOURCE_BUFFER_APPEND_STATUS.QUOTA_EXCEEDED){t.Cw.set(e,!0);var a=t.Dw.get(e);return a||(a=new v.Deferred,t.Dw.set(e,a)),t.mse.addOneUpdateEndCallback(e,a.resolve).then(function(){t.Dw.delete(e),t.context.logger.debug("Appending segment after quota has been exceeded...")}),a.promise.then(function(){return t.processSegmentQueues()})}return t.mse?t.mse.queueActionOnBuffer(e,function(){return t.processSegmentQueues()}):Promise.reject(i)})},e.prototype.cancelSetCurrentTimeDelayed=function(){this.setCurrentTimeDelayedContext&&(this.context.logger.debug("Cancelling delayed set currentTime to ".concat(this.setCurrentTimeDelayedContext.time)),this.setCurrentTimeDelayedContext.unsubscribeFromSourceStore(),this.setCurrentTimeDelayedContext.deferred.reject("cancelled seek"),this.setCurrentTimeDelayedContext=void 0)},e.prototype.Ww=function(e){var t=this;this.segmentQueueMimeTypes.forEach(function(i){t.segmentQueues[i]=t.segmentQueues[i].filter(function(t){return t.getPlaybackTime()+t.getDuration()>=e}),t.updateRendererRangesInStore(i),t.Cw.set(i,!1)}),this.Dw.forEach(function(e){return e.reject()}),this.Dw.clear()},e.prototype.resolvePendingEndOfStream=function(){this.uw&&(this.uw.resolve(),this.uw=void 0)},e.prototype.setCurrentTimeInternal=function(e){var t=this;if(!this.mse)return Promise.reject("Couldn't set current time, MSE is not open");(function(e){var t=!1;return e.forEach(function(e){return t=t||e}),t})(this.Cw)&&this.Ww(e);var i=this.mse.waitForBuffers().then(function(){return t.waitingForSeekedPromise}).then(function(){if(t.setCurrentTimeContext){if(t.setCurrentTimeContext.time!==e)return Promise.reject("A newer setting of change time has been scheduled.")}else t.setCurrentTimeContext={time:e,isInitialSeek:!1,promise:i};var n=t.adjustTimeToNextCommonBufferStart(e);return isNaN(n)?t.Xw(e):n}).then(function(e){var i,n,r,o,a=null!=(n=null==(i=t.video)?void 0:i.currentTime)?n:0,s=!t.isPaused();return null!=(r=t.setCurrentTimeContext)&&r.isInitialSeek&&s&&a>e?(t.logger.debug("Skip initial seek to ".concat(e," as playback has started and is already at ").concat(a)),o=Promise.resolve(a)):(t.logger.debug("set time on video element to ".concat(e)),o=t.seekOnVideoElement(e)),o.then(function(e){return t.resolvePendingEndOfStream(),e}).catch(function(i){return t.handleVideoSetCurrentTimeError(e,i)}).finally(function(){t.waitingForSeekedPromise=null,t.setCurrentTimeContext=void 0,t.savedCurrentTime=0})});return i},e.prototype.Xw=function(e){var t=this;this.context.logger.debug("Delaying seek, waiting for data in buffer for time ".concat(e));var i=(0,p.getSourceStore)(this.context);if(!i)return Promise.reject(Error("No source store available"));var n=new v.Deferred,r=(0,m.subscribe)(i)(function(e){return(0,A.getBufferState)(e)},function(){var e;null==(e=t.setCurrentTimeDelayedContext)||e.reevaluateDataInBuffer()},function(e,t){return!!(null!=e&&e.isLoadingRangeFinished&&!(null!=t&&t.isLoadingRangeFinished))});return this.setCurrentTimeDelayedContext={time:e,reevaluateDataInBuffer:function(){var i=t.adjustTimeToNextCommonBufferStart(e);isNaN(i)?t.context.logger.debug("Re-evaluated delayed seek to ".concat(e,": Cannot yet resolve, waiting for data in buffer"),{video:t.getBufferedRanges("video/mp4"),audio:t.getBufferedRanges("audio/mp4"),adjustedTime:i}):(r(),t.context.logger.debug("Re-evaluated delayed seek to ".concat(e,": Resolving with seek target ").concat(i)),t.setCurrentTimeDelayedContext=void 0,n.resolve(i))},deferred:n,unsubscribeFromSourceStore:r},n.promise},e.prototype.handleVideoSetCurrentTimeError=function(e,t){return this.logger.debug("failed to set current time",t),this.waitingForSeekedPromise=null,this.setCurrentTimeInternal(e)},e.prototype.seekOnVideoElement=function(e){var t=this;return this.waitingForSeekedPromise=new Promise(function(i,n){t.video?(t.video.currentTime=e,i(t.video.currentTime)):n("No video reference")}),this.waitingForSeekedPromise},e.prototype.saveCurrentTime=function(){this.setCurrentTimeContext?this.savedCurrentTime=this.setCurrentTimeContext.time:this.savedCurrentTime=this.getCurrentVideoTime()},e.prototype.Yw=function(e){var t=this;return void 0===e&&(e=this.getCurrentTime()),this.shutdown(!1).then(function(){return t.ready()}).then(function(){t.tw.forEach(function(e,i){t.addBuffer(e,i)||(t.context.logger.debug("Failed to create source buffer ".concat(e)),t.tw.remove(e))})}).then(function(){t.setCurrentTime(e).then(function(){var e,i;return null!=(i=null==(e=t.context.serviceManager)?void 0:e.get(s.ServiceName.PlayerStateService))&&i.isPlaying()?t.play():Promise.resolve()})})},e.prototype.Zw=function(e){var t,i=this,n=_.MimeTypeHelper.getMediaType(e);this.segmentQueueMimeTypes.forEach(function(e){var t;_.MimeTypeHelper.getMediaType(e)===n&&(delete i.segmentQueues[e],null==(t=(0,p.getSourceStore)(i.context))||t.dispatch((0,w.setRendererRanges)(e,[])))}),this.segmentQueues[e]=[],null==(t=(0,p.getSourceStore)(this.context))||t.dispatch((0,w.setRendererRanges)(e,[]))},e.prototype.changeBufferType=function(e,t,i){var n=this;if(this.tw.update(e,t),this.Zw(e),this.mse&&this.mse.isChangeTypeSupported()){var r=!(i&&(0,f.getCapabilities)()[d.CapabilityKey.isEdgeChromium]);return this.mse.changeBufferType(e,t,r).then(function(){var i;return(i={})[e]=t,i}).catch(function(i){return n.logger.debug("Failed to change buffer type to ".concat(e," ").concat(t,":"),i),n.Yw().then(function(){return n.tw.entries()})})}return this.Yw().then(function(){return n.tw.entries()})},e.prototype.shouldContinueBuffering=function(){var e,t;return null!=(t=null==(e=this.mse)?void 0:e.shouldContinueBuffering)&&t},e}()},48873:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.MSEWrapper=t.MediaSourceReadyState=void 0;var r,o=i(66790),a=i(40306),s=i(3336),l=i(25926),c=i(4224),u=i(80813),d=i(3714),h=i(13531),p=i(75108),f=i(7387),m=i(68925),g=i(63879),v=i(15971),y=i(21513),b=i(34841),S=i(85434),_=i(15487),E=i(23068),T=i(41138),w=i(76340),A=i(60321),P=i(65940);function I(e){for(var t=[],i=0;i<(null==e?void 0:e.length);i++){var n="[".concat(e.start(i)," - ").concat(e.end(i),"]");t.push(n)}return t.toString()}!function(e){e.closed="closed",e.open="open",e.ended="ended"}(r||(t.MediaSourceReadyState=r={})),t.MSEWrapper=function(){function e(e){var t=this;this.hw=function(e,i,n){t.logger.debug("successfully removed buffer for ".concat(e," (from  ").concat(i," to ").concat(n,")"))},this.waitForBuffer=function(e){return t.sourceBuffers.hasOwnProperty(e)?t.Dx().then(function(){return t.sourceBuffers[e].ready()}):Promise.reject("No SourceBuffer for '".concat(e,"' available"))},this.Ex=function(){t.logger.debug("[MSEWrapper][ManagedMediaSource] Start Streaming received, resuming loading"),t.ew=!0},this.Fx=function(){t.logger.debug("[MSEWrapper][ManagedMediaSource] Stop Streaming received, stopping loading"),t.ew=!1},this.Gx=function(e){t.logger.isLevelEnabled(h.LogLevel.DEBUG)&&t.logger.debug("Received bufferedChange event, Added Ranges: ".concat(I(e.addedRanges),", Removed Ranges: ").concat(I(e.removedRanges)))},e.videoElement&&(this.context=e,this.logger=e.logger,this.video=e.videoElement,this.sourceBuffers={},this.cw=!1,this.fw=Promise.resolve(),this.ew=!0)}return e.prototype.getBufferedRanges=function(e){return this.sourceBuffers.hasOwnProperty(e)?this.sourceBuffers[e].bufferedRanges:[]},e.prototype.printDetailedBufferRange=function(e,t){var i;try{i=e.buffered}catch{return void this.logger.debug("".concat(t," buffer range: Error accessing buffered ranges"))}if(0!==i.length)for(var n=0;n<i.length;n++)this.logger.debug("".concat(t," buffer range [").concat(n,"]: ").concat(i.start(n)," - ").concat(i.end(n)));else this.logger.debug("".concat(t," buffer range: empty"))},e.prototype.getBufferStartTime=function(){var e=this,t=Object.keys(this.sourceBuffers).map(function(t){return 0===e.sourceBuffers[t].bufferedRanges.length?0:e.sourceBuffers[t].bufferedRanges[0].start});return Math.max.apply(null,t)},e.prototype.addBuffer=function(e,t,i){var n=this;if(this.mediaSource){if(this.cw&&!this.sourceBuffers.hasOwnProperty(e))try{var r=this.mediaSource.addSourceBuffer(e+"; codecs="+t);this.sourceBuffers[e]=new A.SourceBufferWrapper(r,{mimeType:e,codec:t},function(t){i(t),n.context.logger.isLevelEnabled(h.LogLevel.DEBUG)&&n.printDetailedBufferRange(r,e)})}catch(i){return this.logger.debug("Could not add SourceBuffer for "+e+" with codecs "+t+":"+i),void this.context.eventHandler.dispatchEvent(d.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED))}return this.logger.debug("Added SourceBuffer for "+e+" with codecs "+t),isNaN(this.mediaSource.duration)||(this.sourceBuffers[e].appendWindowEnd=this.mediaSource.duration),this.sourceBuffers[e].buffer}},e.prototype.updateTimestampOffset=function(e,t){var i=this.sourceBuffers[e];i&&(this.logger.debug("setting new source buffer [".concat(e,"] offset from ").concat(i.buffer.timestampOffset," to ").concat(t)),i.buffer.timestampOffset=t)},e.prototype.setTimestampOffset=function(e,t){return this.sourceBuffers.hasOwnProperty(e)?((0,E.isDefined)(t)&&!isNaN(t)||(this.logger.debug("source buffer [".concat(e,"] offset is ").concat(t,", setting it to 0")),t=0),this.queueTimestampOffsetUpdate(e,t)):(this.logger.debug("no such source buffer found (mime type=".concat(e,")")),Promise.resolve())},e.prototype.queueTimestampOffsetUpdate=function(e,t){var i=this;return this.queueActionOnBuffer(e,function(){return i.updateTimestampOffset(e,t)}).catch(function(t){i.logger.debug("Failed to set timestamp offset for",e,":",t)})},e.prototype.getBufferRangeStart=function(e,t){return t||e.start(0)},e.prototype.getBufferRangeEnd=function(e,t){return t||e.end(e.length-1)},e.prototype.gw=function(e,t,i){var n=this.sourceBuffers[e].buffer.buffered;return{start:this.getBufferRangeStart(n,t),end:this.getBufferRangeEnd(n,i)}},e.prototype.preBufferRemoval=function(e,t,i){this.logger.debug("removing buffer for ".concat(e," (from ").concat(t," to ").concat(i,")"))},e.prototype.removeBufferRange=function(e,t,i){this.preBufferRemoval(e,t,i),this.sourceBuffers[e].buffer.remove(t,i)},e.prototype.removeFromBuffer=function(e,t,i,n){var o=this;return void 0===n&&(n=this.hw),this.queueActionOnBuffer(e,function(){var a,s,u;try{if(o.video&&o.video.currentTime>=0&&(null==(u=null==(s=null==(a=o.sourceBuffers[e])?void 0:a.buffer)?void 0:s.buffered)?void 0:u.length)>0){var h=o.gw(e,t,i),p=h.start,f=h.end;if(p>=0&&f>p){if(o.sourceBuffers[e].removalPending=!0,o.sourceBuffers[e].rangePendingRemoval={start:p,end:f},!o.mediaSource||o.mediaSource.readyState===r.open){var m=o.sourceBuffers[e].onUpdateEnded().then(function(){o.sourceBuffers[e]&&(o.sourceBuffers[e].rangePendingRemoval=null,o.sourceBuffers[e].removalPending=!1,n(e,p,f))});return o.removeBufferRange(e,p,f),m}o.logger.debug("cannot remove buffer for ".concat(e," (from ").concat(p," to ").concat(f,"): MediaSource is not open")),o.addOneSourceOpenCallback(function(){o.removeFromBuffer(e,p,f,n).catch(function(t){o.logger.debug("Couldn't remove buffer from ".concat(p," to ").concat(f," for ").concat(e),t)})})}else o.logger.debug("Ignoring buffer clearing request for ".concat(e,", as the passed-in range is not valid: ").concat(p," to ").concat(f))}else o.logger.debug("Ignoring buffer clearing request for ".concat(e,", as there are no buffered ranges."))}catch(t){var g="".concat(c.WarningCode[c.WarningCode.PLAYBACK_WARNING],": Buffer clearing failed for ").concat(e,". Exception: ").concat(JSON.stringify(t));o.context.eventHandler.dispatchEvent(d.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.PLAYBACK_WARNING,g))}return Promise.resolve()})},e.prototype.removeBuffer=function(e){var t=this,i=Promise.resolve(),r=this.sourceBuffers[e];if(!r||!this.mediaSource)return i;if(this.isMediaSourceOpen())try{null==r||r.buffer.abort()}catch(e){return this.logger.debug("Could not abort last action on buffer",n({},e)),Promise.resolve()}if(S.MimeTypeHelper.isSubtitle(e))i=i.then(function(){return t.removeFromBuffer(e).catch(function(e){t.logger.debug("Error removing buffer data",e)})});else try{this.mediaSource&&this.mediaSource.removeSourceBuffer(r.buffer)}catch(t){this.logger.debug("Error while trying to remove ".concat(e," source buffer."),t)}return this.iw(e),i},e.prototype.iw=function(e){this.sourceBuffers[e]?(this.sourceBuffers[e].dispose(),delete this.sourceBuffers[e],this.logger.debug("Removed SourceBuffer for ".concat(e))):this.logger.debug("No source buffer to remove for mimeType=".concat(e))},e.prototype.isMediaSourceOpen=function(){var e;return(null==(e=this.mediaSource)?void 0:e.readyState)===r.open},e.prototype.jw=function(){var e=this;if(!this.mediaSource)return this.logger.debug("Media source is removed. Can not reset buffers."),Promise.resolve();var t=[];for(var i in this.sourceBuffers)this.sourceBuffers.hasOwnProperty(i)&&t.push(this.removeBuffer(i));return Promise.all(t).then(function(){e.sourceBuffers={},e.logger.debug("Removed all SourceBuffers")})},e.prototype.tearDownMediaSource=function(){var e=this;return this.fw=this.fw.then(function(){return e.jw()}).then(function(){e.mediaSource?e.kw():e.logger.debug("Media source has already been removed.")}),this.fw},e.prototype.kw=function(){var e;if(this.video)if(null!==this.video.getWrappedElement()){var t=(0,w.getMseObjectUrl)((0,v.getSourceState)(this.context));if("function"==typeof(null==(e=null==window?void 0:window.URL)?void 0:e.revokeObjectURL)&&""!==t)try{window.URL.revokeObjectURL(t)}catch{this.logger.debug("Could not revoke MSE object URL")}this.mediaSource&&(this.mediaSource.removeEventListener("startstreaming",this.Ex),this.mediaSource.removeEventListener("endstreaming",this.Fx),this.mediaSource.removeEventListener("bufferedchange",this.Gx)),this.aw&&this.aw.reject("MediaSource is being destroyed."),this.aw=void 0,this.bw=void 0,t===this.video.src&&(T.VideoElementUtil.removeSource(this.video),this.video.load()),this.mediaSource=void 0,this.cw=!1,this.logger.debug("Detached video element and MSE")}else this.logger.debug("No video element to teardown.");else this.logger.debug("No video wrapper to teardown.")},e.prototype.removeUpdateEndCallback=function(e,t){this.sourceBuffers.hasOwnProperty(e)&&this.sourceBuffers[e].buffer.removeEventListener("updateend",t)},e.prototype.addUpdateEndCallback=function(e,t){this.sourceBuffers.hasOwnProperty(e)&&this.sourceBuffers[e].buffer.addEventListener("updateend",t)},e.prototype.addOneUpdateEndCallback=function(e,t){return this.sourceBuffers[e].onUpdateEnded().catch(function(){}).then(t)},e.prototype.addSourceOpenCallback=function(e){this.mediaSource&&this.mediaSource.addEventListener("sourceopen",e)},e.prototype.removeSourceOpenCallback=function(e){this.mediaSource&&this.mediaSource.removeEventListener("sourceopen",e)},e.prototype.addOneSourceOpenCallback=function(e){var t=this,i=function(n){t.removeSourceOpenCallback(i),e(n)};this.addSourceOpenCallback(i)},e.prototype.isAnyBufferUpdating=function(){var e=this;return 0!==Object.keys(this.sourceBuffers).filter(function(t){return e.sourceBuffers[t].buffer.updating}).length},e.prototype.setDuration=function(e){var t=this;this.queueActionOnBuffers(function(){if(t.mediaSource){var i=(0,E.isNumber)(e)&&e>0?e:1/0;i===1/0&&t.context.settings.MAX_SAFE_MSE_DURATION!==1/0&&(0,E.isNumber)(t.context.settings.MAX_SAFE_MSE_DURATION)&&t.context.settings.MAX_SAFE_MSE_DURATION>0&&(i=t.context.settings.MAX_SAFE_MSE_DURATION),t.mediaSource.duration!==i&&(t.isMediaSourceOpen()?(t.logger.debug("Setting video duration on MSE: ".concat(t.mediaSource.duration," -> ").concat(i)),t.mediaSource.duration=i):t.logger.debug("Skipping setDuration (".concat(t.mediaSource.duration," -> ").concat(i,"), MSE is not open")))}else t.logger.debug("Skipping setDuration (".concat(e,"), MSE is gone"))}).catch(function(e){t.logger.debug("Could not set the duration of the MSE!",e)})},e.prototype.getDuration=function(){return this.mediaSource&&!isNaN(this.mediaSource.duration)?this.mediaSource.duration:0},e.prototype.isInitialized=function(){return this.cw},Object.defineProperty(e.prototype,"readyState",{get:function(){return this.mediaSource?this.mediaSource.readyState:void 0},enumerable:!1,configurable:!0}),e.prototype.isBufferRemovalPending=function(){var e=this;return Object.keys(this.sourceBuffers).some(function(t){return e.sourceBuffers[t].removalPending})},e.prototype.getRangePendingRemoval=function(e){var t,i,n;return null!=(n=null==(i=null==(t=this.sourceBuffers)?void 0:t[e])?void 0:i.rangePendingRemoval)?n:void 0},e.prototype.lw=function(e){return this.getBufferedRanges(e).reduce(function(e,t){return e+(t.end-t.start)},0)},e.prototype.addToBuffer=function(e){var t=this,i=e.getMimeType();return this.queueActionOnBuffer(i,function(){return t.mediaSource?t.mediaSource.readyState!==r.open?(t.logger.warn("MediaSource is not open (readyState="+t.mediaSource.readyState+")"),Promise.reject(o.SOURCE_BUFFER_APPEND_STATUS.FAILURE)):t.sourceBuffers.hasOwnProperty(i)?t.wx(e,i):(t.logger.log("sourceBuffers has no entry for "+i),Promise.reject(o.SOURCE_BUFFER_APPEND_STATUS.FAILURE)):(t.logger.debug("Could not queue action on SourceBuffer: MediaSource has been destroyed"),Promise.reject(o.SOURCE_BUFFER_APPEND_STATUS.FAILURE))})},e.prototype.wx=function(e,t){var i=e.getRepresentationId().representationId;try{this.logger.debug("[MSEWrapper][".concat(t,"][").concat(i,"] Adding segment to SourceBuffer [").concat(e.getUrl(),"]"));var n=this.sourceBuffers[t];return n.buffer.appendBuffer(e.getData()),n.onUpdateEnded()}catch(n){return this.xx(n,e,t,i)}},e.prototype.xx=function(e,t,i,n){var r;return this.logger.debug("[MSEWrapper][".concat(i,"][").concat(n,"] appendBuffer() failed"),e),"QuotaExceededError"===e.name?this.yx(i):(null!=(r=this.video)&&r.error?this.zx(e,t,i,n):this.Bx(e,t,i,n),this.logger.debug("[MSEWrapper][".concat(i,"][").concat(n,"] Failed appending segment to SourceBuffer"),e),Promise.reject(o.SOURCE_BUFFER_APPEND_STATUS.FAILURE))},e.prototype.yx=function(e){return this.logger.debug("QuotaExceededError, trying to remove old data from buffers..."),this.context.store.dispatch((0,m.setBufferMaxSize)(e,this.lw(e))),Promise.reject(o.SOURCE_BUFFER_APPEND_STATUS.QUOTA_EXCEEDED)},e.prototype.zx=function(e,t,i,n){var r;if(null!=(r=this.video)&&r.error){var o={mediaError:this.video.error,appendBufferError:e,mimeType:i,segmentUrl:t.getUrl(),codec:t.getCodec(),networkState:this.video.networkState,readyState:this.video.readyState};if(this.logger.warn("[MSEWrapper][".concat(i,"][").concat(n,"] appendBuffer() failed due to HTMLMediaElement.error: ").concat(this.video.error.code," - ").concat(this.video.error.message),o),this.Ax(this.video.error.code)){var h=new s.PlayerError(a.ErrorCode.PLAYBACK_ERROR,o,"Fatal media error detected: ".concat(this.video.error.message,". Player reload may be required."),this.context.sourceContext.sourceIdentifier),p=this.context.serviceManager.get(u.ServiceName.RecoveryService);p?p.handleError(h):this.context.eventHandler.fireError(h)}else this.context.eventHandler.dispatchEvent(d.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.PLAYBACK_WARNING,"appendBuffer failed due to HTMLMediaElement.error: ".concat(this.video.error.code," - ").concat(this.video.error.message),o))}},e.prototype.Ax=function(e){return[p.MediaErrorCode.MEDIA_ERR_DECODE,p.MediaErrorCode.MEDIA_ERR_SRC_NOT_SUPPORTED].includes(e)},e.prototype.Bx=function(e,t,i,n){var r,o,a={appendBufferError:e,mimeType:i,segmentUrl:t.getUrl(),codec:t.getCodec(),networkState:null==(r=this.video)?void 0:r.networkState,readyState:null==(o=this.video)?void 0:o.readyState};this.logger.warn("[MSEWrapper][".concat(i,"][").concat(n,"] appendBuffer() failed without HTMLMediaElement.error - treating as non-fatal"),a),this.context.eventHandler.dispatchEvent(d.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.PLAYBACK_WARNING,"appendBuffer failed without HTMLMediaElement.error: ".concat(e.message||e.name||"Unknown error"),a))},e.prototype.endOfStream=function(){var e=this;return this.queueActionOnBuffers(function(){var t;e.isMediaSourceOpen()?(e.logger.debug("Signaled mse end of stream"),null==(t=e.mediaSource)||t.endOfStream()):e.logger.debug("Skipped signaling EOS as the mse is not open")}).catch(function(t){e.logger.debug("Unable to signal EOS on media s
21ource",t)})},e.prototype.waitForBuffers=function(){var e=Object.keys(this.sourceBuffers).map(this.waitForBuffer);return this.Dx().then(function(){return Promise.all(e).then(function(){})})},e.prototype.queueActionOnBuffers=function(e){var t=this,i=new Promise(function(e,n){Promise.all(Object.keys(t.sourceBuffers).map(function(e){var n=t.queueActionOnBuffer(e,function(){});return t.queueActionOnBuffer(e,function(){return i}).then().catch(),n})).then(function(){return e()},n)}).then(function(){return e()}).then(function(){return Promise.all(Object.keys(t.sourceBuffers).map(function(e){return t.sourceBuffers[e].ready()})).then(function(){})});return i},e.prototype.queueActionOnBuffer=function(e,t){return this.sourceBuffers.hasOwnProperty(e)?this.sourceBuffers[e].queueAction(t):Promise.reject("No SourceBuffer for '".concat(e,"' available"))},e.prototype.Cx=function(e){var t,i=this;return null==(t=this.aw)||t.reject(e),this.bw?this.bw.then(function(){i.aw=void 0}):Promise.reject(e)},e.prototype.Dx=function(){var e,t=this;if(this.bw)return this.bw;this.aw=new b.Deferred,this.bw=this.aw.promise;var i=function(e){var i;r(),null==(i=t.aw)||i.reject(e)},n=function(){var e;r(),t.cw=!0,t.dw||(t.ew=!0),null==(e=t.aw)||e.resolve()},r=function(){t.mediaSource&&(t.mediaSource.removeEventListener("error",i),t.mediaSource.removeEventListener("sourceopen",n),t.mediaSource.removeEventListener("webkitsourceopen",n))};if(!this.video)return this.Cx("Could not set source to video element");if(!this.mediaSource)return this.Cx("mediaSource must not be null or undefined");if(this.mediaSource.addEventListener("error",i),this.mediaSource.addEventListener("sourceopen",n,!1),this.mediaSource.addEventListener("webkitsourceopen",n,!1),this.dw&&(this.video.disableRemotePlayback=!0,this.mediaSource.addEventListener("startstreaming",this.Ex),this.mediaSource.addEventListener("endstreaming",this.Fx),this.mediaSource.addEventListener("bufferedchange",this.Gx)),window&&window.URL&&"function"==typeof window.URL.createObjectURL){var o=window.URL.createObjectURL(this.mediaSource);this.video.src=o,null==(e=(0,v.getSourceStore)(this.context))||e.dispatch((0,g.setMseObjectUrl)(o))}else this.logger.debug("Could not use window.URL.createObjectURL(mediaSource) as the browser claims the function does not exist."),this.aw.reject("Could not create Object URL");return this.bw.then(function(){t.aw=void 0})},Object.defineProperty(e.prototype,"shouldContinueBuffering",{get:function(){return this.ew},enumerable:!1,configurable:!0}),e.prototype.createNewMSE=function(){var e=this;return this.mediaSource?this.tearDownMediaSource().then(function(){return e.Hx()}):this.fw.then(function(){return e.Hx()})},e.prototype.Hx=function(){return this.dw=(0,P.shouldUseManagedMediaSource)(this.context.settings.PREFER_MANAGED_MEDIA_SOURCE),this.dw?(this.logger.debug("[MSEWrapper] Using ManagedMediaSource"),this.mediaSource=new window.ManagedMediaSource):(this.logger.debug("[MSEWrapper] Using MediaSource"),this.mediaSource=new window.MediaSource),this.Dx()},e.prototype.isChangeTypeSupported=function(){var e,t,i=(0,y.getCapabilities)(),n=i.isWebOS&&i[f.CapabilityKey.webOSChromiumVersion]>=_.WEBOS_2021_CHROMIUM_VERSION;return!!(null!=(t=null==(e=window.SourceBuffer)?void 0:e.prototype)&&t.changeType)&&!(0,y.getCapabilities)().isTizen&&!n},e.prototype.Ix=function(e){var t=this,i=S.MimeTypeHelper.getMediaType(e),n=Object.keys(this.sourceBuffers).find(function(n){var r=S.MimeTypeHelper.getMediaType(n);return t.sourceBuffers.hasOwnProperty(n)&&r===i&&n!==e});n&&(this.sourceBuffers[e]=this.sourceBuffers[n],delete this.sourceBuffers[n])},e.prototype.changeBufferType=function(e,t,i){var n=this;this.Ix(e);var r=this.sourceBuffers[e];return r?i&&r.getMimeType()===e&&r.getCodec()===t?(this.context.logger.debug("Skipping buffer type change for ".concat(e," - mimeType and codec unchanged: ").concat(t)),Promise.resolve()):this.queueActionOnBuffer(e,function(){r.changeType(e,t),n.context.logger.debug("Changed ".concat(e," SourceBuffer type with codec=").concat(t))}):(this.context.logger.error("SourceBuffer not found for ".concat(e)),Promise.reject(Error("SourceBuffer not found for ".concat(e))))},e.prototype.dispose=function(){var e=this;this.tearDownMediaSource().then(function(){e.video=void 0})},e}()}
vendor: 10,882 bytes, lines 21-23
21,21586:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MSERendererModuleDefinition=void 0;var n=i(62756),r=i(79323),o=i(48873),a=i(82889),s=i(44914);t.MSERendererModuleDefinition={name:n.ModuleName.RendererMse,module:{MSEWrapper:o.MSEWrapper,MSERenderer:r.MSERenderer,Ranges:a.Ranges,technologyChecker:new s.TechnologyChecker}},t.default=t.MSERendererModuleDefinition},69200:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedListQueue=void 0;var i=function(){return function(e){this.value=e}}();t.LinkedListQueue=function(){function e(){this.Jab=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this.Jab},enumerable:!1,configurable:!0}),e.prototype.dequeue=function(){if(0!==this.Jab){var e=this.Lab;return this.Lab=null==e?void 0:e.previous,e&&(e.previous=void 0,e.next=void 0),this.Jab--,null==e?void 0:e.value}},e.prototype.enqueue=function(e){if(0===this.Jab){var t=new i(e);this.Kab=t,this.Lab=t}else{var n=this.Kab;this.Kab=new i(e),this.Kab.next=n,n&&(n.previous=this.Kab)}this.Jab++},e.prototype.isEmpty=function(){return 0===this.length},e}()},82889:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Ranges=void 0,t.Ranges=function(){function e(){}return e.filterRanges=function(t,i){var n=[];if(t&&t.length)for(var r=0;r<t.length;r++)i(t.start(r),t.end(r))&&n.push([t.start(r),t.end(r)]);return e.createTimeRanges(n)},e.createTimeRangesObj=function(e){return void 0===e||0===e.length?{length:0,start:function(){return 0},end:function(){return 0}}:{length:e.length,start:function(t){return e[t][0]},end:function(t){return e[t][1]}}},e.createTimeRanges=function(t,i){return Array.isArray(t)?e.createTimeRangesObj(t):void 0===t||void 0===i?e.createTimeRangesObj():e.createTimeRangesObj([[t,i]])},e.findNextRange=function(t,i){return e.filterRanges(t,function(t,n){return t-e.TIME_FUDGE_FACTOR>=i&&n-t>e.MIN_RANGE_DURATION})},e.findGaps=function(t,i){if(t.length<2)return e.createTimeRanges();for(var n=[],r=1;r<t.length;r++){var o=t.end(r-1),a=t.start(r);a-o>i&&n.push([o,a])}return e.createTimeRanges(n)},e.findRangeForTime=function(t,i){return e.filterRanges(t,function(e,t){return e<=i&&t>=i})},e.TIME_FUDGE_FACTOR=1/30,e.MIN_RANGE_DURATION=.2,e}()},76340:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMseObjectUrl=void 0,t.getMseObjectUrl=function(e){var t,i;return null!=(i=null==(t=null==e?void 0:e.renderer)?void 0:t.mseObjectUrl)?i:""}},60321:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SourceBufferWrapper=void 0;var n=i(34841),r=i(69200);t.SourceBufferWrapper=function(){function e(e,t,i){var n=this;this.onBufferedRangesChanged=i,this.HW=function(){n.KW(),n.onBufferedRangesChanged(n.bufferedRanges),n.JW(function(e){return e.resolve()})},this.IW=function(e){n.JW(function(t){return t.reject(e)})},this.ready=function(){return n.buffer.updating?n.onUpdateEnded():Promise.resolve()},this.buffer=e,this.FW=t,this.bufferedRanges=[],this.queuePromise=Promise.resolve(),this.GW=new r.LinkedListQueue,["error","abort","sourceended","sourceclose"].forEach(function(e){n.buffer.addEventListener(e,n.IW)}),this.buffer.addEventListener("updateend",this.HW)}return e.prototype.JW=function(e){for(var t;null!=(t=this.GW.dequeue());)e(t)},e.prototype.KW=function(){try{this.bufferedRanges=function(e){for(var t=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t}(this.buffer.buffered)}catch{}},e.prototype.onUpdateEnded=function(){var e=new n.Deferred;return this.GW.enqueue(e),e.promise},e.prototype.queueAction=function(e){var t=this,i=this.queuePromise.then(function(){return t.ready()}).then(function(){return Promise.resolve(e()).then(function(){return t.ready()})});return this.queuePromise=i.catch(function(){}),i},e.prototype.changeType=function(e,t){this.buffer.changeType("".concat(e,"; codecs=").concat(t)),this.FW.mimeType=e,this.FW.codec=t},e.prototype.getCodec=function(){return this.FW.codec},e.prototype.getMimeType=function(){return this.FW.mimeType},e.prototype.dispose=function(){var e=this;["error","abort","sourceended","sourceclose"].forEach(function(t){e.buffer.removeEventListener(t,e.IW)}),this.JW(function(e){return e.reject("disposing source buffer")}),this.buffer.removeEventListener("updateend",this.HW)},e}()},44914:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TechnologyChecker=void 0;var n=i(44468);t.TechnologyChecker=function(){function e(){}return e.prototype.getSupportedTechnologies=function(){return[{player:n.PlayerType.Html5,streaming:n.StreamType.Dash},{player:n.PlayerType.Html5,streaming:n.StreamType.Hls},{player:n.PlayerType.Html5,streaming:n.StreamType.Smooth}]},e}()},10344:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VideoEventHandler=void 0,t.VideoEventHandler=function(){function e(e){var t=this;this.yW=function(e){return e.time=t.xW&&t.xW.currentTime||0,e},this.xW=e}return e.prototype.on=function(e,t){this.xW&&this.xW.addEventListener(e,t,this.yW)},e.prototype.off=function(e,t){this.xW&&this.xW.removeEventListener(e,t)},e.prototype.fire=function(e,t){this.xW&&this.xW.eventHandler.triggerEvent(e,t)},e.prototype.dispose=function(){},e}()},65940:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseManagedMediaSource=function(e){return"ManagedMediaSource"in window&&(e||!("MediaSource"in window))}}},function(e){return function(){return e(e.s=21586)}()}])})}()}(bitmovinplayerMserenderer);var bitmovinplayerMserendererExports=bitmovinplayerMserenderer.exports;let MSERendererModule=getDefaultExportFromCjs$1(bitmovinplayerMserendererExports);var bitmovinplayerSubtitles={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[482],{82657:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},37723:function(e,t){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function n(e,t){return Object.keys(t).find(function(i){var n=t[i].getSubtitle(),r=n.id,o=n.lang,a=n.isFragmented,s=n.kind,l=r===e.id,c=!e.isFragmented||a===e.isFragmented,u=o===e.lang;e.isPreferred&&e.lang&&(u=o.includes(e.lang)||e.lang.includes(o));var d=s===e.kind&&u&&c;return l||d})}Object.defineProperty(t,"__esModule",{value:!0}),t.EnabledSubtitlesTracker=void 0,t.EnabledSubtitlesTracker=function(){function e(){this.WS={},this.XS=0}return e.prototype.addSubtitle=function(e){this.removeSubtitle(e.id),this.WS[this.ZS()]=i({isFragmented:!1},e)},e.prototype.removeSubtitle=function(e){var t=this;Object.keys(this.WS).forEach(function(i){t.WS[i].id===e&&delete t.WS[i]})},e.prototype.shouldEnableSubtitle=function(e,t){var i=this;return!!Object.keys(this.WS).find(function(n){return i.YS(i.WS[n],t)===e.id})},e.prototype.YS=function(e,t){var i=e.id,r=e.kind,o=e.lang,a=e.isFragmented;return n({lang:o,kind:r,isFragmented:a,id:i},t)||n({lang:o,kind:r,isFragmented:a},t)||n({lang:o,kind:r},t)},e.prototype.ZS=function(){return this.XS++,this.XS},e.prototype.dispose=function(){this.WS={},this.XS=0},e}()},53396:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ForcedSubtitleController=void 0;var n=i(55552);t.ForcedSubtitleController=function(){function e(){this.aS={}}return e.prototype.addSubtitleHandler=function(e){this.aS[e.getSubtitle().id]=e},e.prototype.deactivate=function(){return this.cS()?Promise.all(Object.values(this.aS).map(function(e){return e.deactivate()})).then(function(){}):Promise.resolve()},e.prototype.activate=function(e){var t=this;return void 0===e&&(e=this.bS),this.cS()?(this.bS=e,this.deactivate().then(function(){var e=Object.values(t.aS).find(function(e){return(0,n.isEqualIsoLanguage)(e.getSubtitle().lang,t.bS)});if((e=e??Object.values(t.aS)[0])&&!e.isActive())return e.activate().catch(function(){})})):Promise.resolve()},e.prototype.onSeek=function(e,t){Object.values(this.aS).forEach(function(i){return i.onSeek(e,t)})},e.prototype.onSeeked=function(e,t){Object.values(this.aS).forEach(function(i){return i.onSeeked(e,t)})},e.prototype.dispose=function(){Object.values(this.aS).forEach(function(e){return e.dispose()}),this.aS=null},e.prototype.cS=function(){return Object.keys(this.aS).length>0},e.prototype.getForcedSubtitleHandler=function(e){if(this.aS)return Object.values(this.aS).find(function(t){return e(t)})},e}()},42009:function(e,t){function i(e){return e.replace(/<[^>]*>?/g,"")}function n(e){return e.replace(/<br\s*\/?>/g,`
22`)}Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToText=function(e){return i(n(e))},t.stripHtmlTags=i,t.prepareHtml=function(e){return e.replace(/(\r\n|\r|\n)/g,"<br />")},t.replaceHtmlBreakPointsWithNewLine=n,t.stripAwayHtmlBreakPoints=function(e){return e.replace(/<br\s*\/?>/g,"")}},55552:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isEqualIsoLanguage=function(e,t){var i;if(void 0===t)return!1;if(null!=(i=window.Intl)&&i.DisplayNames){var n=new window.Intl.DisplayNames(["en"],{type:"language"});try{return n.of(e.split("-")[0])===n.of(t.split("-")[0])}catch{}}return e===t}},86058:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseMP4WrappedSubtitles=function(e,t){var i=e.getTimescale();if(void 0===i||!a.ModuleManager.has(s.ModuleName.ContainerMP4))return[];var o=a.ModuleManager.get(s.ModuleName.ContainerMP4);return function(e,t,i){var o=0,a=[],s=0;return e.forEach(function(e){var u=r.CodecStringHelper.extractCodec(t.getCodec()),d=e.duration/i,h=t.getPlaybackTime()+o,p=h+d;if(o+=d,"wvtt"===u||"vtt"===u){var f=function(e,t,i,r){for(var o=e.data.buffer,a=e.data.byteOffset,s=0,l=[],u="",d="";s<e.data.byteLength;){var h=e.data.getUint32(s),p=a+s,f=n.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(o,p+4,4));if("vttc"===f){if(u){var m=c(t,i,r,d,u);l.push(m),r+=1,u="",d=""}s+=8}else"payl"===f?u=n.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(o,p+8,h-8)):"sttg"===f&&(d=n.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(o,p+8,h-8))),s+=h}return u&&(m=c(t,i,r,d,u),l.push(m)),l}(e,h,p,s);s+=f.length,f.forEach(function(e){a.push({start:h,end:p,text:e})})}else"stpp"===u&&a.push({start:h,end:p,text:l(e)})}),a}(o.getMp4Fragments(e).flatMap(function(i){return o.getTrackSamples(i.moof,i.mdat,e,t)}),e,i)};var n=i(74853),r=i(34047),o=i(66502),a=i(88052),s=i(62756);function l(e){var t=new Uint8Array(e.data.buffer,e.data.byteOffset,e.data.byteLength);return n.ArrayHelper.convertBufferSourceToUTF8(t,o.TextSegmentAnalyzer.detectEncoding(e.data))}function c(e,t,i,n,r){return["[EMBEDDEDWEBVTT]",e,t,i,n,r].join(`
23`)}},52112:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);
23r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleModuleDefinition=void 0;var o=i(62756),a=i(71340),s=i(42009),l=i(55552),c=i(78717),u=i(26438),d=i(606),h=i(85224);t.SubtitleModuleDefinition={name:o.ModuleName.Subtitles,module:function(){return{SubtitleService:d.SubtitleService,SubtitleParserFactory:u.SubtitleParserFactory,PlayerSubtitlesApiFactory:c.PlayerSubtitlesApiFactory,HtmlTransformer:s,LanguageComparer:l,hashCode:a.hashCode,createHtmlElement:h.createHtmlElement}},dependencies:[o.ModuleName.EngineBitmovin]},t.default=t.SubtitleModuleDefinition,r(i(82657),t)},15569:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parsePlainTextSubtitles=function(e){var t,i,o=r.TextSegmentAnalyzer.detectEncoding(e.getData()),a=n.ArrayHelper.convertBufferSourceToUTF8(e.getData(),o),s=null!=(t=e.getPlaybackTime())?t:0;return[{start:s,end:s+(null!=(i=e.getDuration())?i:0),text:a}]};var n=i(74853),r=i(66502)},78717:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerSubtitlesApiFactory=void 0;var r=i(3714);t.PlayerSubtitlesApiFactory=function(){function e(){}return e.build=function(e){return new(function(){function t(){}return t.prototype.add=function(t){e.addSubtitle(t)},t.prototype.remove=function(t){e.removeSubtitle(t)},t.prototype.list=function(){return e.listSubtitles()},t.prototype.enable=function(t,i){void 0===i&&(i=!0),e.enableSubtitle(t,i)},t.prototype.disable=function(t){e.disableSubtitle(t)},t.prototype.cueEnter=function(t){e.fireEvent(r.PlayerEvent.CueEnter,n(n({},t),{type:r.PlayerEvent.CueEnter}))},t.prototype.cueExit=function(t){e.fireEvent(r.PlayerEvent.CueExit,n(n({},t),{type:r.PlayerEvent.CueExit}))},t}())},e}()},26438:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleParserFactory=void 0;var n=i(3714),r=i(88052),o=i(62756),a=i(22374);t.SubtitleParserFactory=function(){function e(){}return e.createInstance=function(e,t){var i;return t.indexOf("<?")>-1||t.indexOf("<tt")>-1?r.ModuleManager.has(o.ModuleName.SubtitlesTTML)?i=new(r.ModuleManager.get(o.ModuleName.SubtitlesTTML)).TTMLParser(e):e.eventHandler.dispatchEvent(n.PlayerEvent.Warning,new a.PlayerModuleMissingWarning(o.ModuleName.SubtitlesTTML,"The ".concat(o.ModuleName.SubtitlesTTML," module is required to parse TTML subtitles."))):r.ModuleManager.has(o.ModuleName.SubtitlesWebVTT)?i=new(r.ModuleManager.get(o.ModuleName.SubtitlesWebVTT)).WebVttParser:e.eventHandler.dispatchEvent(n.PlayerEvent.Warning,new a.PlayerModuleMissingWarning(o.ModuleName.SubtitlesWebVTT,"The ".concat(o.ModuleName.SubtitlesWebVTT," module is required to parse WebVTT subtitles."))),i},e}()},606:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleService=void 0;var r=i(80813),o=i(56481),a=i(3714),s=i(91678),l=i(93204),c=i(34047),u=i(85434),d=i(70850),h=i(88052),p=i(62756),f=i(22374),m=i(37723),g=i(53396),v=i(39310),y=i(60672),b=i(88788),S=i(69363),_=i(74715);t.SubtitleService=function(){function e(e){var t=this;this.context=e,this.getTransmuxer=function(){return t.Rs},this.ks=function(){t.js()},this.qs=function(e){t.js(),t.Ws=e.position;var i,n=null!=(i=t.Ws)?i:0,r=function(e){return"seekTarget"in e?e.seekTarget:e.target}(e);Object.values(t.Os).forEach(function(e){return e.onSeek(n,r)}),t.Us.onSeek(n,r)}
vendor: 18,355 bytes, line 23
23,this.rs=function(){var e,i=null!=(e=t.Ws)?e:0,n=t.context.internalPlayer.getCurrentTime();Object.values(t.Os).forEach(function(e){return e.onSeeked(i,n)}),t.Us.onSeeked(i,n)},this.vs=function(e,i){t.context.logger.debug("Switching periods in subtitleService");var n=t.Qs.findPeriod(e);n?(t.us(e,i),t.setupControllersForNextPeriod(n),t.ws()):t.context.logger.log("Can not find period with id = ".concat(e," in Manifest. Skipping period update"))},this.It=function(){Object.keys(t.Os).forEach(function(e){return t.Os[e].dispose()}),t.Os={},t.Ps&&(t.Ps.dispose(),t.Ps=void 0),t.Vs&&t.Vs.reset()},this.Os={},this.Ss=e.eventHandler,this.Qs=e.serviceManager.get(r.ServiceName.ManifestService,e.sourceContext.sourceIdentifier),this.Ts=new m.EnabledSubtitlesTracker,this.Us=new g.ForcedSubtitleController,this.Ss.on(a.PlayerEvent.Seek,this.qs),this.Ss.on(a.PlayerEvent.TimeShift,this.qs),this.Ss.on(a.PlayerEvent.Seeked,this.rs),this.Ss.on(a.PlayerEvent.TimeShifted,this.rs),this.Ss.on(a.PlayerEvent.SourceUnloaded,this.It),this.Ys=h.ModuleManager.has(p.ModuleName.SubtitlesCEA608)?h.ModuleManager.get(p.ModuleName.SubtitlesCEA608):void 0,this.bs()}return e.prototype.Zs=function(e,t){var i=e!==t,n=this.Qs.isHlsManifest()&&!(t||!e);return i||n},e.prototype.bs=function(){var e=this,t=this.context.serviceManager.get(r.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier);this.Xs=(0,l.subscribe)(t)(h.ModuleManager.get(p.ModuleName.EngineBitmovin).selectors.getPlayingPeriodId,this.vs,function(t,i){return e.Zs(t,i)})},e.prototype.setupControllersForNextPeriod=function(e){var t=this,i=h.ModuleManager.get(p.ModuleName.EngineBitmovin).getMimeTypeForAdaptationSet;e.AdaptationSet.forEach(function(e){var n=i(e);(0,_.isSubtitleTrack)(n,t.Qs.isHlsManifest())&&t.cs(e,n)})},e.prototype.cs=function(e,t){(0,_.isFragmentedAdaptationSet)(e)?(this.context.store.dispatch((0,s.initializeMetricsForMimeType)(t,this.context.settings)),this.ds(e,t)):this.es(e,t)},e.prototype.ds=function(e,t){var i=this.context.sourceContext.sourceIdentifier,n=this.context.serviceManager.get(r.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier);if(n){var o={mimeType:t,codec:h.ModuleManager.get(p.ModuleName.EngineBitmovin).getCodecsFromAdaptationSet(e),isHls:this.Qs.isHlsManifest(),manifestLoader:this.context.serviceManager.get(r.ServiceName.ManifestLoadingService,i),periodId:e._internalId.periodId,sourceStore:n};this.addFragmentSubtitle(o,e)}},e.prototype.es=function(e,t){if(h.ModuleManager.has(p.ModuleName.DASH)){var i=new(h.ModuleManager.get(p.ModuleName.DASH)).SegmentTemplateMPDHandler(this.context,this.context.sourceContext),n=this.Qs.toSubtitleTrack(e,t);i.setAdaptationSetId(e._internalId),n.url=i.getSubtitleUrl().toString(),this.addExternalSubtitle(n,e)}},e.prototype.setTransmuxer=function(e){this.Rs=e},e.prototype.hasSubtitle=function(e){return!!this.Os[e]},e.prototype.enableSubtitle=function(e){var t=this,i=this.Os[e];return i&&!i.isActive()?i.activate().then(function(){i.refresh(),t.Us.deactivate()}).then(function(){return t.Ts.addSubtitle(i.getSubtitle()),!0}).catch(function(e){return t.context.logger.debug("Error during subtitle activation",e),!1}):Promise.resolve(!1)},e.prototype.addExternalSubtitle=function(e,t){if(void 0===t&&(t=null),e.id||(e.id=e.url),this.fs(e,t))return e;var i=new y.ExternalFileSubtitleHandler(this.context,e,t);return this.gs(i),e},e.prototype.fs=function(e,t){var i,n,r=this.Os[e.id],o=null!=(i=null==r?void 0:r.periodId)?i:null,a=null!=(n=null==t?void 0:t._internalId.periodId)?n:null;return r&&o===a?r:this.Us.getForcedSubtitleHandler(function(t){var i,n=t.getSubtitle().id===e.id,r=(null!=(i=t.periodId)?i:null)===a;return n&&r})},e.prototype.gs=function(e){var t=e.getSubtitle(),i=this.context.config.playback.isForcedSubtitle;if("function"==typeof i?(0,d.safeUserCallback)(function(){return i(t)},this.context.logger):t.forced)this.Us.addSubtitleHandler(e);else{var n=!1,r=t.id;this.Os[r]&&(n=this.Os[r].isActive(),this.xs(r)),this.hs(e),n&&e.activate()}},e.prototype.hs=function(e){var t=e.getSubtitle();this.is(t),this.Os[t.id]=e,this.ss(t)},e.prototype.is=function(e){var t,i,n=this.context.sourceContext.source.labeling,r=this.Qs.isHlsManifest()?null==(t=null==n?void 0:n.hls)?void 0:t.subtitles:null==(i=null==n?void 0:n.dash)?void 0:i.subtitles;"function"==typeof r&&(e.label=(0,d.safeUserCallback)(function(){return r(e)},this.context.logger))},e.prototype.addFragmentSubtitle=function(e,t){if(!h.ModuleManager.has(p.ModuleName.EngineBitmovin))return this.context.logger.warn("Unable to add fragmented subtitles because MSE Module is missing"),null;var i=this.Qs.toSubtitleTrack(t,e.mimeType);i.isFragmented=!0,i.url=null;var n=new b.FragmentedSubtitleHandler(this.context,e,i,this.getTransmuxer);return this.gs(n),i},e.prototype.setupCea608CaptionExtractor=function(e){if(!this.Ys)return this.Ss.dispatchEvent(a.PlayerEvent.Warning,new f.PlayerModuleMissingWarning(p.ModuleName.SubtitlesCEA608,"The ".concat(p.ModuleName.SubtitlesCEA608," module is required to parse CEA captions."))),this.context.logger.log("CEA Caption parsing is disabled, because the Cea680 module is not loaded"),null;if(!h.ModuleManager.has(p.ModuleName.ContainerMP4))return this.Ss.dispatchEvent(a.PlayerEvent.Warning,new f.PlayerModuleMissingWarning(p.ModuleName.ContainerMP4,"The ".concat(p.ModuleName.ContainerMP4," module is required to parse CEA captions."))),this.context.logger.log("CEA Caption parsing is disabled, because the ContainerMP4 module is not loaded"),null;this.Ps&&this.Ps.dispose();var t,i=h.ModuleManager.get(p.ModuleName.ContainerMP4),n=this.Ys.Cea608Extractor;return this.Ps=new n(e,i,null==(t=this.context.config.tweaks)?void 0:t.parse_cea_708_caption),this.Ps},e.prototype.js=function(){this.Ps&&(this.context.logger.debug("Resetting CEA caption extractor..."),this.Ps.reset())},e.prototype.ls=function(){var e=h.ModuleManager.get(p.ModuleName.HLS);this.Vs=new e.DiscontinuitySequenceNumberTracker(u.MimeTypeHelper.isVideo),this.Vs.subscribe(this.ks)},e.prototype.ms=function(e){this.Vs||this.ls(),this.Vs.trackSegment(e)},e.prototype.ns=function(){return this.Qs.getManifest()&&this.Qs.isHlsManifest()&&h.ModuleManager.has(p.ModuleName.HLS)},e.prototype.handleClosedCaptions=function(e,t,i,n){var r;return!n&&u.MimeTypeHelper.isVideo(t.getMimeType())&&null!=(r=this.Ys)&&r.CEA_EXTRACTOR_SUPPORTED_CODEC_TAGS.includes((0,c.getCodecTag)(t))?this.os(t,e.getTimestampOffset()):(this.ps(i,t.getPeriodId()),Promise.resolve())},e.prototype.os=function(e,t){var i=this;return this.Ps?(this.ns()&&this.ms(e),this.Ps.extract(e).then(function(n){(function(e,t){e.forEach(function(e){e.start-=t,e.end-=t})})(n,t),n.length>0&&(i.context.logger.insane("Extracted Closed Captions from fMP4: "+JSON.stringify(n)),i.ps(n,e.getPeriodId()))}).catch(function(e){var t;e instanceof f.PlayerModuleMissingWarning?(null==(t=i.Ps)||t.dispose(),i.Ps=void 0,i.Ss.dispatchEvent(a.PlayerEvent.Warning,e)):i.context.logger.debug("Error parsing CEA-608 Captions from fMP4: "+e)})):Promise.resolve()},e.prototype.ps=function(e,t){if(e&&Array.isArray(e)&&0!==e.length)for(var i=this.Qs.getClosedCaptionLabels(t),n=function(e){var n=e.channel;if(!r.Os[n]){var o=i.find(function(e){return e.id===n})||{id:n,kind:"captions",lang:"unknown",label:"Captions (".concat(e.channel,")")};r.hs(new v.Cea608Handler(r.context,o))}r.Os[n].addCaption(e,t)},r=this,o=0,a=e;o<a.length;o++)n(a[o])},e.prototype.ss=function(e){this.Ss.dispatchEvent(a.PlayerEvent.SubtitleAdded,{subtitle:n({},e)})},e.prototype.disableSubtitle=function(e){var t=this,i=this.Os[e];return i?i.deactivate().then(function(){return t.Ts.removeSubtitle(e),0===t.getActiveSubtitles().length&&t.Us.activate().catch(function(){}),!0}).catch(function(){return!1}):Promise.resolve(!1)},e.prototype.disableAllSubtitles=function(){var e=this;this.getActiveSubtitles().forEach(function(t){return e.disableSubtitle(t.id)})},e.prototype.removeSubtitle=function(e){this.xs(e),this.Ts.removeSubtitle(e)},e.prototype.getActiveSubtitles=function(){var e=this;return Object.keys(this.Os).filter(function(t){return e.Os[t].isActive()}).map(function(t){return e.Os[t].getSubtitle()})},e.prototype.hasSubtitles=function(){return Object.keys(this.Os).length>0},e.prototype.getAvailableSubtitles=function(e){return Object.values(this.Os).filter(function(t){var i=t.periodId;return!i||e===i}).map(function(e){return e.getSubtitle()})},e.prototype.enableForcedSubtitle=function(e){this.Us.activate(e).catch(function(){})},e.prototype.ts=function(e,t,i){var n=e.getSubtitleType()===S.SubtitleType.FRAGMENTED&&e.periodId===i,r=e.getSubtitleType()===S.SubtitleType.EXTERNAL_FILE&&e.periodId&&e.periodId!==t;return n||r},e.prototype.us=function(e,t){var i=this;Object.keys(this.Os).forEach(function(n){var r=i.Os[n];i.ts(r,e,t)&&i.xs(n)})},e.prototype.ws=function(){var e=this;Object.keys(this.Os).forEach(function(t){var i,n=e.Os[t];if(!n.isActive()&&e.Ts.shouldEnableSubtitle(n.getSubtitle(),e.Os)){var r={subtitle:n.getSubtitle()};null==(i=e.Ss)||i.dispatchEvent(a.PlayerEvent.SubtitleEnable,r),n.activate().then(function(){var t;null==(t=e.Ss)||t.dispatchEvent(a.PlayerEvent.SubtitleEnabled,r)})}})},e.prototype.xs=function(e){if(this.Os[e]){var t=this.Os[e].getSubtitle();this.Os[e].dispose(),delete this.Os[e],this.Ss&&this.Ss.dispatchEvent(a.PlayerEvent.SubtitleRemoved,{subtitle:t})}},e.prototype.clearBuffersUntil=function(e){var t=this;Object.keys(this.Os).forEach(function(i){return t.Os[i].clearBuffersUntil(e)})},e.prototype.dispose=function(){this.It(),this.Ts=(0,o.dispose)(this.Ts),this.Us=(0,o.dispose)(this.Us),this.Vs=(0,o.dispose)(this.Vs),this.Rs=void 0,this.Qs=null,this.Ss.off(a.PlayerEvent.Seek,this.qs),this.Ss.off(a.PlayerEvent.TimeShift,this.qs),this.Ss.off(a.PlayerEvent.Seeked,this.rs),this.Ss.off(a.PlayerEvent.TimeShifted,this.rs),this.Ss.off(a.PlayerEvent.SourceUnloaded,this.It),this.Xs(),this.Os={},this.Ss=null},e}()},74715:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isSubtitleTrack=function(e,t){return(n.MimeTypeHelper.isText(e)||n.MimeTypeHelper.isTtmlXml(e))&&!t||n.MimeTypeHelper.isApplication(e)},t.isFragmentedAdaptationSet=function(e){var t=[e];return e.Representation&&e.Representation.length>0&&t.push(e.Representation[0]),t.some(function(e){return e.SegmentList||e.SegmentTemplate||e.SegmentBase})};var n=i(85434)},74437:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var m in n)f[m]="access"===m?{}:n[m];for(var m in n.access)f.access[m]=n.access[m];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,i[p])("accessor"===l?{get:d.get,set:d.set}:d[c],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&r.unshift(s)}else(s=a(g))&&("field"===l?r.unshift(s):d[c]=s)}u&&Object.defineProperty(u,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractSubtitleHandler=void 0;var a=i(80813),s=i(3714),l=i(80438),c=i(69957),u=i(44468),d=i(88052),h=i(62756);function p(e,t){return n({subtitleId:t,start:e.start,end:e.end},e.content)}t.AbstractSubtitleHandler=function(){var e,t=[];return e=function(){function e(e,i,n){void 0===n&&(n=null);var o=this;this.timeline=r(this,t),this.onCueEnter=function(e){o.context.eventHandler.dispatchEvent(s.PlayerEvent.CueEnter,p(e,o.getSubtitle().id))},this.onCueExit=function(e){o.context.eventHandler&&o.context.eventHandler.dispatchEvent(s.PlayerEvent.CueExit,p(e,o.getSubtitle().id))},this.onCueUpdate=function(e){o.context.eventHandler.dispatchEvent(s.PlayerEvent.CueUpdate,p(e,o.getSubtitle().id))},this.context=e,this.H9=i,this.H9.enabled=this.H9.enabled||!1,this.timeline=new l.Timeline(e,{onCueEnter:this.onCueEnter,onCueExit:this.onCueExit,onCueUpdate:this.onCueUpdate}),this.timeline.stopListening(),this.periodId=n,this.I9=e.serviceManager.get(a.ServiceName.SourceStoreService,e.sourceContext.sourceIdentifier)}return e.prototype.fireOnCueParsedEvents=function(e,t){var i=this;e&&this.context.eventHandler&&e.forEach(function(e){i.context.eventHandler.dispatchEvent(s.PlayerEvent.CueParsed,n(n({subtitleId:i.getSubtitle().id},e),{periodId:t}))})},e.prototype.isActive=function(){return this.H9.enabled},e.prototype.activate=function(){return this.H9.enabled=!0,this.timeline.startListening(),this.timeline.show(),Promise.resolve()},e.prototype.deactivate=function(){return this.H9.enabled=!1,this.timeline.stopListening(),this.timeline.hide(),Promise.resolve()},e.prototype.refresh=function(){this.timeline.show()},e.prototype.getSubtitle=function(){return this.H9},e.prototype.clearBuffersUntil=function(e){this.timeline.removeCuesUntil(e)},e.prototype.dispose=function(){this.I9=null,this.deactivate(),this.timeline.dispose()},e.prototype.isTsContainer=function(){var e,t=d.ModuleManager.get(h.ModuleName.EngineBitmovin),i=t.selectors,n=t.mseModuleTypes;return(null==(e=i.getContainerFormat(this.I9.getState(),u.MediaType.Video))?void 0:e.source)===n.containerFormat.TS},e.prototype.applyVttOffset=function(e){return this.isTsContainer()?e.map(function(e){return null!=e.offset?n(n({},e),{start:e.start+e.offset,end:e.end+e.offset,updates:e.updates.map(function(t){return n(n({},t),{updateTime:t.updateTime+e.offset})})}):e}):e},e}(),function(){var i="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;o(e,null,[(0,c.trackPerformance)("SubtitleHandler.activate")],{kind:"method",name:"activate",static:!1,private:!1,access:{has:function(e){return"activate"in e},get:function(e){return e.activate}},metadata:i},null,t),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})}(),e}()},39310:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Cea608Handler=void 0;var r=i(74437),o=i(69363);t.Cea608Handler=function(e){function t(t,i,n){return void 0===n&&(n=null),e.call(this,t,i,n)||this}return n(t,e),t.prototype.onSeek=function(){},t.prototype.onSeeked=function(e,t){var i=t<e,n=this.context.settings.CLEAR_BUFFERS_ON_SEEKING_BACKWARDS;i&&n&&this.clearBuffersUntil(this.context.renderer.getDuration())},t.prototype.addCaption=function(e,t){e&&(this.fireOnCueParsedEvents([e],t),this.timeline.addCues([e],0))},t.prototype.getSubtitleType=function(){return o.SubtitleType.IN_STREAM},t}(r.AbstractSubtitleHandler)},60672:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalFileSubtitleHandler=void 0;var r=i(25926),o=i(4224),a=i(56481),s=i(3714),l=i(4129),c=i(29669),u=i(26438),d=i(74437),h=i(69363);t.ExternalFileSubtitleHandler=function(e){function t(i,n,r){var o=e.call(this,i,n,r&&r._internalId.periodId)||this;return o.hS=function(e){if(o.timeline.removeCues(),null==e?void 0:e.body){o.gS=!0;var t=o.iS(e.body.trim()),i=o.applyVttOffset(t);o.fireOnCueParsedEvents(i,null),o.timeline.addCues(i)}},r&&(n.id=r.Representation[0]._id),n.url?(o.fS=t.enforceHTTPSForSecureOrigins(n.url.trim()),o.gS=!1,o.dS=new l.DefaultContentLoader(o.context,{maxRetries:o.context.settings.MAX_RETRIES,retryDelay:o.context.settings.RETRY_DELAY,requestType:c.HttpRequestType.MEDIA_SUBTITLES})):(o.context.logger.log("No url was provided for an external subtitle, nothing will be loaded."),o.gS=!0,o.eS=Promise.resolve()),o}return n(t,e),t.prototype.activate=function(){var t=this;return this.context.logger.debug("loading "+this.fS),e.prototype.activate.call(this).then(function(){return t.eS?t.eS:t.gS?Promise.resolve():(t.eS=t.dS.load(t.fS).then(t.hS).catch(function(e){var i,n;if(t.eS=void 0,!t.isActive())return Promise.resolve();throw t.context.eventHandler&&t.context.eventHandler.dispatchEvent(s.PlayerEvent.Warning,new r.PlayerWarning(o.WarningCode.NETWORK_COULD_NOT_LOAD_SUBTITLE)),t.context.logger.debug("Could not load subtitles/captions, got HTTP status code ".concat(null!=(n=null==(i=null==e?void 0:e.status)?void 0:i.toString())?n:""),e),t.deactivate(),"loading failed"}),t.eS)})},t.prototype.iS=function(e){return u.SubtitleParserFactory.createInstance(this.context,e).parse(e)},t.enforceHTTPSForSecureOrigins=function(e){var t=RegExp("^(?:[a-z]+:)?//","i");return"https:"===location.protocol?e.replace(t,"//"):e},t.prototype.getSubtitleType=function(){return h.SubtitleType.EXTERNAL_FILE},t.prototype.clearBuffersUntil=function(){},t.prototype.onSeek=function(){},t.prototype.onSeeked=function(){},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.dS=(0,a.dispose)(this.dS)},t}(d.AbstractSubtitleHandler)},88788:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]}
23)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FragmentedSubtitleHandler=void 0;var o=i(4524),a=i(80813),s=i(3714),l=i(44468),c=i(87827),u=i(86897),d=i(93204),h=i(81199),p=i(34047),f=i(79721),m=i(85434),g=i(66502),v=i(23068),y=i(88052),b=i(62756),S=i(86058),_=i(15569),E=i(26438),T=i(74437),w=i(69363);function A(e){return g.TextSegmentAnalyzer.isPlainTextPayload(e.getData())}function P(e){var t=e.getCodec();return("wvtt"===t||"vtt"===t||""===t&&e.getMimeType().includes("vtt"))&&A(e)}function I(e,t){var i=y.ModuleManager.get(b.ModuleName.EngineBitmovin,!1);if(void 0!==t&&void 0!==i)return i.selectors.getContainerFormat(t,e)}function C(e){return"discontinuitySequenceNumber"in e}t.FragmentedSubtitleHandler=function(e){function t(t,i,n,r){var o=e.call(this,t,n,i.periodId)||this;return o.RT=function(e){var t,i=function(e){var t=null==e?void 0:e.getState();return void 0!==t&&void 0!==e?Promise.race((function(e){var t,i=null!=(t=e.activeTracks)?t:{};return Object.keys(i).flatMap(function(e){var t;return null!=(t=i[e].mediaTypes)?t:[]}).filter(function(e){return e===l.MediaType.Video||e===l.MediaType.Audio})})(t).map(function(i){return function(e,t,i){var n=I(i,t);return void 0!==n?Promise.resolve(n):(0,d.waitForStateChangeThen)(e)(function(e){return I(i,e)},function(e){return void 0!==e})}(e,t,i)})):Promise.reject("SourceState unavailable")}(o.context.serviceManager.get(a.ServiceName.SourceStoreService,o.context.sourceContext.sourceIdentifier)),n=null==(t=e.getSegmentInfo())?void 0:t.discontinuitySequenceNumber;return void 0!==n&&(i=i.then(function(){return o.IT(n)}).then(function(){return o.JT(n)}).then(function(){return o.isActive()}).catch(function(){return!1})),i.then(function(t){o.ST(e),t&&o.PT(e)})},o.ZT=function(e){var t;if(e&&void 0!==e.time){var i=e.time;o.clearBuffersUntil(i);var n=(null==(t=o.qS)?void 0:t.getTimeForNextSegment(o.jS))||i,r=n-i,a=(0,h.getPlayableBufferLevel)(o.context.internalPlayer);isNaN(n)||r>=a||o.kS.hasNext(n)&&(o.kS.getMPDHandler().resolvePendingSegmentInfoRequests(),o.kS.getNext(n))}},o.bT=function(){o.kS.updateMpd()},o.eventHandler=t.eventHandler,o.oS=i.sourceStore,o.qS=t.serviceManager.get(a.ServiceName.StreamTimeService),o.pS=t.serviceManager.get(a.ServiceName.ManifestUpdateSchedulingService,t.sourceContext.sourceIdentifier),o.mS=r,o.lS=i.isHls,o.nS=t.bufferSettings,o.kS=new(y.ModuleManager.get(b.ModuleName.EngineBitmovin)).SegmentController(t,o.RT,i.mimeType,i.codec,i.isHls,i.manifestLoader,i.periodId,i.sourceStore),o.kS.setCurrentLangObj(n),o.jS="".concat(i.mimeType,"/").concat(n.id),o.rS=y.ModuleManager.get(b.ModuleName.HLS,!1),o.tS(),o}return n(t,e),t.prototype.tS=function(){!this.sS&&this.oS&&(this.sS=(0,d.subscribe)(this.oS)(function(e){return null==e?void 0:e.manifest},this.bT,function(e,t){return!!(null!=e&&e.isInitialized&&!(null!=t&&t.isInitialized))}))},t.prototype.uS=function(){this.sS&&(this.sS(),this.sS=void 0)},t.prototype.vS=function(e){return P(e)?(0,_.parsePlainTextSubtitles)(e):!function(e){return m.MimeTypeHelper.isApplication(e.getMimeType())&&!A(e)}(e)?e.getMetadata().subtitles:(0,S.parseMP4WrappedSubtitles)(e,this.context.logger)},t.prototype.wS=function(e){var t=e.getMetadata();t.subtitles=this.vS(e),e.setMetadata(t)},t.prototype.xS=function(e){var t,i=null!=(t=e.getPlaybackTime())?t:e.getSegmentInfo().startTime;e.setPlaybackTime(i)},t.prototype.IT=function(e){var t=this.mS();return this.lS&&t?(void 0!==e&&this.OT()||(e=-1),t.waitForInitializationForDiscontinuity(e)):Promise.resolve()},t.prototype.JT=function(e){if(!this.OT()||void 0!==this.QT(e))return Promise.resolve();if(!this.rS)return Promise.reject(Error("HLS Module missing"));var t=this.rS.selectors,i=t.getHlsState,n=t.getPresentationTimeOffset;return(0,d.waitForStateChangeThen)(this.oS)(function(t){return n(i(t),String(e))},function(e){return void 0!==e}).then()},t.prototype.KT=function(e){var t,i,n=null==(t=this.context.serviceManager.get(a.ServiceName.SourceStoreService,e))?void 0:t.getState(),r=null==(i=this.kS.getCurrentAdaptationSet())?void 0:i.Representation[0];return r&&n?(0,y.ModuleManager.get(b.ModuleName.EngineBitmovin).selectors.getSegmentInfos)(n,r._internalId.key()):[]},t.prototype.LT=function(e,t){var i,n,r,o,s=y.ModuleManager.get(b.ModuleName.EngineBitmovin).AdaptationSetId,l=this.context.serviceManager.get(a.ServiceName.ManifestService,e),c=new s(f.DEFAULT_PERIOD_ID,t),u=null==l?void 0:l.getAdaptationSet(c);return null!=(o=null==(r=null==(n=null==(i=null==u?void 0:u.Representation[0])?void 0:i.SegmentList)?void 0:n[0])?void 0:r.SegmentURL)?o:[]},t.prototype.MT=function(){var e=this.context.sourceContext.sourceIdentifier;return this.context.settings.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE?this.KT(e):this.LT(e,this.get
vendor: 5,270 bytes, line 23
23Subtitle().id)},t.prototype.NT=function(){var e=this.MT();if(e&&0!==e.length)return e.reduce(function(e,t){var i=C(t)?t.startTime:t._playbackTime,n=C(t)?t.discontinuitySequenceNumber:t._discontinuitySequenceNumber;return(0,v.isNumber)(i)&&(0,v.isNumber)(n)&&void 0===e[n]&&(e[n]=i),e},{})},t.prototype.OT=function(){var e,t=y.ModuleManager.get(b.ModuleName.HLS,!1),i=null==(e=this.oS)?void 0:e.getState();if(!t||!i)return!1;var n=t.selectors,r=n.getHlsState,o=n.getMergedDiscontinuityTimings,a=r(i);if(!a)return!1;var s=this.NT();if(!s)return!1;var l=o(a),c=Object.keys(s).find(function(e){return!l[e]||Math.abs(l[e].startTime-s[e])>1}),u=Object.keys(l).find(function(e){return null==s[e]});return null==c&&null==u},t.prototype.PT=function(e){this.TT(e),this.wS(e),this.xS(e),this.VT(e),this.isActive()&&this.timeline.show()},t.prototype.QT=function(e){var t;if(this.rS){var i=this.rS.selectors,n=i.getHlsState,r=i.getPresentationTimeOffset,o=null==(t=this.oS)?void 0:t.getState(),a=o?n(o):void 0;if(a)return r(a,String(e))}},t.prototype.ST=function(e){var t,i=e.getPlaybackTimeRange();if(i){var n=y.ModuleManager.get(b.ModuleName.EngineBitmovin),r=n.actions.removeStreamTimeRange,o=n.mseModuleTypes.streamTimeRangeType;null==(t=this.oS)||t.dispatch(r(this.jS,i,o.Loading))}},t.prototype.TT=function(e){var t,i=e.getPlaybackTimeRange();if(!e.isInit()&&i){var n=y.ModuleManager.get(b.ModuleName.EngineBitmovin).actions.addLoadedRange,o=r(r({},i),{bufferBlockId:-1});null==(t=this.oS)||t.dispatch(n(this.jS,o))}},t.prototype.UT=function(e){var t,i,n=-this.kS.getMPDHandler().getTimestampOffset();if(this.lS){var r=e.getSegmentInfo().discontinuitySequenceNumber,o=this.QT(r);void 0!==o?n=-o:this.context.logger.warn("FragmentedSubtitleHandler: Failed to get PTO for disco sequence ".concat(r," from store, falling back to MPDHandler value of ").concat(-n),e.getSegmentInfo())}return n+(null!=(i=null==(t=this.mS())?void 0:t.getTimestampMappingOffset(e))?i:0)},t.prototype.VT=function(e){var i=e.getMetadata().subtitles;if(Array.isArray(i)&&0!==i.length){var n=P(e),r=this.UT(e),o=n||function(e){return"stpp"===p.CodecStringHelper.extractCodec(e.getCodec())}(e)||function(e){return"application/mp4"===e.getMimeType()&&"wvtt"===e.getCodec()&&!A(e)}(e)?this.WT(i,r):i,a=n?this.applyVttOffset(o):o,s=t.ensureCueInSegmentRange(a,e.getPlaybackTime(),e.getDuration(),r,this.isTsContainer());this.fireOnCueParsedEvents(s,this.periodId),this.timeline.addCues(s)}},t.prototype.WT=function(e,t){var i=this;return e.flatMap(function(e){return i.XT(e.text,t)})},t.ensureCueInSegmentRange=function(e,t,i,n,o){if(void 0===o&&(o=!1),!t&&0!==t||t<0||!i)return e;if(e.length>0){var a=i+n;if(e.every(function(e){return e.end<=a}))return e.map(function(e){return o&&null!=e.offset?r(r({},e),{start:e.start+t-n-e.offset,end:e.end+t-n-e.offset}):r(r({},e),{start:e.start+t-n,end:e.end+t-n})})}return e},t.prototype.XT=function(e,t){var i=E.SubtitleParserFactory.createInstance(this.context,e);return t?i.parse(e,t):i.parse(e)},t.prototype.activate=function(){var t=this;return e.prototype.activate.call(this),this.YT().then(function(){if(t.isActive()){var e=function(e,t){var i=(0,c.getPlayerState)(t.getState());return(0,c.getIsSeekingOrTimeshifting)(i)?i.targetPlaybackTime:e.getCurrentTime(!0)}(t.context.renderer,t.context.store);t.kS.activateSubtitleSegmentController(e),t.kS.hasNext(e)&&t.kS.getNext(e),t.eventHandler.on(s.PlayerEvent.TimeChanged,t.ZT)}})},t.prototype.YT=function(){var e=this.kS.getCurrentAdaptationSet().Representation[0],t=e._internalId,i=e._mimeType,n=y.ModuleManager.get(b.ModuleName.EngineBitmovin).actions,r=n.setRepresentationIdAction,o=n.setMediaTypeAction;return this.oS.dispatch(r(t)),this.oS.dispatch(o(t,m.MimeTypeHelper.getMediaType(i))),this.pS.waitForRepUpdate(t)},t.prototype.deactivate=function(){this.timeline.removeCues();var t,i=y.ModuleManager.get(b.ModuleName.EngineBitmovin).actions,n=i.resetStreamTimeline,r=i.resetLoadedRanges;this.eventHandler.off(s.PlayerEvent.TimeChanged,this.ZT),this.oS.dispatch(n(this.jS)),this.oS.dispatch(r(this.jS));var o=null==(t=this.kS.getCurrentAdaptationSet())?void 0:t._internalId;return o&&this.oS.dispatch(y.ModuleManager.get(b.ModuleName.EngineBitmovin).actions.removeActiveTrackAction(o)),e.prototype.deactivate.call(this)},t.prototype.getSubtitleType=function(){return w.SubtitleType.FRAGMENTED},t.prototype.clearBuffersUntil=function(t){e.prototype.clearBuffersUntil.call(this,t);var i=y.ModuleManager.get(b.ModuleName.EngineBitmovin).actions.removeLoadedRange;this.oS.dispatch(i(this.jS,{start:0,end:t,bufferBlockId:-1}))},t.prototype.aT=function(e){var t,i=null==(t=this.oS)?void 0:t.getState(),n=(0,u.getBufferState)(i),r=n?(0,u.getLoadedRangesForMimeType)(n,this.jS):[];return(0,o.isInTimeRanges)(r,e)},t.prototype.onSeek=function(e,t){this.isActive()&&(this.aT(t)||this.kS.cancelLoading())},t.prototype.onSeeked=function(e,t){if(this.isActive()&&!this.aT(t)){this.timeline.removeCues();var i=y.ModuleManager.get(b.ModuleName.EngineBitmovin).actions.resetLoadedRanges;this.oS.dispatch(i(this.jS)),this.kS.seekTo(t),this.kS.hasNext(t)&&this.kS.getNext(t)}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.uS(),this.kS.dispose()},t}(T.AbstractSubtitleHandler)},69363:function(e,t){var i;
23Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleType=void 0,function(e){e[e.EXTERNAL_FILE=0]="EXTERNAL_FILE",e[e.FRAGMENTED=1]="FRAGMENTED",e[e.IN_STREAM=2]="IN_STREAM"}(i||(t.SubtitleType=i={}))},71340:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hashCode=function(e){var t=0;if(0===e.length)return t;for(var i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i)|0;return t}},85224:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createHtmlElement=function(e){var t;if(function(){if(void 0===o){var e=(0,r.getCapabilities)().isReactNative;o=!(window&&window.document&&"function"==typeof window.document.createElement)||e}return o}()){var i=(function(){return null!=n||(n=new DOMParser),n})().parseFromString("<".concat(e,"></").concat(e,">"),"text/html");return(null==(t=i.body)?void 0:t.firstChild)||i.firstChild}return document.createElement(e)};var n,r=i(21513),o=void 0}},function(e){return function(){return e(e.s=52112)}()}])})}()}(bitmovinplayerSubtitles);var bitmovinplayerSubtitlesExports=bitmovinplayerSubtitles.exports;let SubtitlesModule=getDefaultExportFromCjs$1(bitmovinplayerSubtitlesExports);var bitmovinplayerSubtitlesVtt={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[831],{48519:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WebVttSubtitlesModuleDefinition=void 0;var n=i(62756),r=i(69041),o=i(1757);t.WebVttSubtitlesModuleDefinition={name:n.ModuleName.SubtitlesWebVTT,module:function(){return{WebVttParser:o.WebVttParser,extractVttProperties:r.extractVttProperties}},dependencies:[n.ModuleName.Subtitles]},t.default=t.WebVttSubtitlesModuleDefinition},1757:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var m in n)f[m]="access"===m?{}:n[m];for(var m in n.access)f.access[m]=n.access[m];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,i[p])("accessor"===l?{get:d.get,set:d.set}:d[c],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&r.unshift(s)}else(s=a(g))&&("field"===l?r.unshift(s):d[c]=s)}u&&Object.defineProperty(u,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.WebVttParser=void 0;var a=i(69957),s=i(730),l=/(<\d+:\d{2}:\d{2}[.,]\d{3}>)/g,c=function(){var e,t=[];return e=function(){function e(){r(this,t)}return e.prototype.parse=function(e,t){return void 0===t&&(t=0),(e=e.replace(/\r\n/gm,`
24`)).startsWith("[EMBEDDEDWEBVTT]")?this.Kt(e):this.Lt(e,t)},e.prototype.Kt=function(e){var t,i,n=e.split(`
25`),r=n[1],o=n[2],a=n[3],l=n[4],c=n.slice(5).join(`
26`),u=d();u.start=Number(r),u.end=Number(o),u.i=Number(a);var h=s.parseContents(c,0,s.getPlaceholderVttStyleProperties());return u.text=null!=(i=null!=(t=null==h?void 0:h.textContent)?t:null==h?void 0:h.innerText)?i:"",u.html=s.stringifyCueHtml(h),l&&(u.vtt=s.parseOptions(l,[])),u.vtt.id=a,[u]},e.prototype.Lt=function(e,t){var i=e.split(/\n{2,}
vendor: 31,762 bytes, lines 26-28
26|^[WEBVTT\n+]?X-TIMESTAMP-MAP=.*\n+|^WEBVTT\n+/m).filter(function(e){return null!=e&&""!==e}).map(function(e){return e.split(`
27`)}),n=this.Mt(e),r=this.Nt(i),o={vtt:n,base:t};return this.Ut(i,r,o)},e.prototype.Mt=function(e){var t=/X-TIMESTAMP-MAP=(.*)\n/.exec(e);if((null==t?void 0:t[1])==null)return 0;var i=t[0],n=/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m.exec(i),r=/MPEGTS:(\d+)/m.exec(i),o=0;if(null!=n&&n[1]){var a=s.parseTime(n[1]);null!=a&&(o=a)}var l=0;return null!=r&&(l=Number(r[1])),l/9e4-o},e.prototype.Nt=function(e){for(var t=[],i=[],n=0,r=e;n<r.length;n++){var o=r[n],a=o[0];/^STYLE/.test(a.trim())&&i.push.apply(i,s.parseStyles(o)),/^region:?/i.test(a.trim())&&t.push.apply(t,s.parseRegions(o))}return{regions:t,styles:i}},e.prototype.Ot=function(e){var t=/^NOTE/.test(e),i=/^STYLE/.test(e),n=/^region:?/i.test(e);return!t&&!i&&!n},e.prototype.Pt=function(e){return null!=e&&""!==e&&!!e.includes("--\x3e")},e.prototype.Qt=function(e){var t={},i=[];return e.forEach(function(e){null==e.identifier&&(t=n(n({},t),e.style));var r=i.findIndex(function(t){return t.identifier===e.identifier});-1!==r?i[r]={identifier:e.identifier,style:n(n({},i[r].style),e.style)}:i.push(e)}),s.getPlaceholderVttStyleProperties().forEach(function(e){i.find(function(t){return t.identifier===e.identifier})||i.push(e)}),{globalStyle:t,contentStyles:i}},e.prototype.Rt=function(e,t){var i=s.stringifyCssProperties(t);i&&(e.html.setAttribute("style",i),e.subCues.forEach(function(e){e.html.setAttribute("style",i)}))},e.prototype.St=function(e,t,i,n){var r=function(e){var t=e.indexOf("--\x3e");return t<0?{start:null,end:null}:{start:s.parseTime(e.substring(0,t).trim()),end:s.parseTime(e.substring(t+3).trim())}}(e[t]),o=r.start,a=r.end;if(null!==o&&null!==a){for(var c,u=function(e,t){return e.slice(t).join(`
28`).trim()}(e,t+1),d=u.split(l),p="",f=u.replace(l,""),m=o,g=[],v=0;v<d.length;v+=2){var y=d[v],b=d[v+1],S=(b?s.parseTime(b):a)??a;if(m!==S){var _=h(y,p,f=f.substring(y.length));p+=y;var E=s.parseContents(_,n,i);null==c?c=E:g.push({updateTime:m,html:E}),m=S}}if(null!=c)return{start:o,end:a,html:c,subCues:g}}},e.prototype.Tt=function(e,t,i){var r=n({},t);if(i)for(var o="#"+i,a=0,s=e;a<s.length;a++){var l=s[a];l.identifier===o&&Object.assign(r,l.style)}return r},e.prototype.Ut=function(e,t,i){for(var n=[],r=0,o=t.regions,a=t.styles,l=this.Qt(a),c=l.globalStyle,d=l.contentStyles,h=0,p=e;h<p.length;h++){var f=p[h];if(this.Ot(f[0])){var m=void 0,g=0;f[0].includes("--\x3e")||(m=f[0].trim(),g=1);var v=this.Vt(m,r);if(r=v,this.Pt(f[g])){var y=s.parseOptions(f[g],o);y.id=m;var b=this.St(f,g,d,i.base);if(void 0!==b){var S=this.Tt(d,c,m);this.Rt(b,S);var _=u(b,v,i,y);n.push(_)}}}}return n},e.prototype.Vt=function(e,t){var i=Number(e);return null==e||isNaN(i)?t+1:i},e}(),function(){var i="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;o(e,null,[(0,a.trackPerformance)("WebVttParser.parse")],{kind:"method",name:"parse",static:!1,private:!1,access:{has:function(e){return"parse"in e},get:function(e){return e.parse}},metadata:i},null,t),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})}(),e}();function u(e,t,i,r){var o,a,l=d();return l.i=t,l.start=e.start+i.base,l.end=e.end+i.base,l.text=(null==(o=e.html)?void 0:o.textContent)||(null==(a=e.html)?void 0:a.innerText)||"",l.html=s.stringifyCueHtml(e.html),l.vtt=n({},r),0!==i.vtt&&(l.offset=i.vtt),l.updates=e.subCues.map(function(e){return{updateTime:e.updateTime+i.base,html:s.stringifyCueHtml(e.html)}}),l}function d(){return{i:null,start:null,end:null,text:null,html:null,vtt:s.getDefaultVttProperties(),offset:null,updates:[]}}function h(e,t,i){return(t?p(t,"cue-past"):"")+e+(i?p(i,"cue-future"):"")}function p(e,t){return"<c.".concat(t,">").concat(e,"</c>")}t.WebVttParser=c,t.default=c},39157:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseContents=function(e,t,i){var o=n.ModuleManager.get(r.ModuleName.Subtitles).createHtmlElement("span");return p({input:e,root:o,current:o,tagStack:[],offset:t,styles:i})};var n=i(88052),r=i(62756),o=i(99735),a=i(69041),s=[[/&amp;/g,"&"],[/&lt;/g,"<"],[/&gt;/g,">"],[/&lrm;/g,"‎"],[/&rlm;/g,"‏"],[/&nbsp;/g,"\xa0"]],l={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},c={v:"title",lang:"lang"},u={rt:"ruby"},d={"cue-future":":future","cue-past":":past"},h=2;function p(e){var t=function(e){if(!e)return null;var t=/^([^<]*)(<[^>]+>?)?/.exec(e);if(!t)return null;var i=t[1],n=t[2];return i||n}(e.input);return null==t?e.root:(e.input=e.input.substring(t.length),function(e,t){if("<"!==e[0]){var i=t.current.ownerDocument.createTextNode(function(e){for(var t=0,i=s;t<i.length;t++){var n=i[t],r=n[0],o=n[1];e=e.replace(r,o)}return e}(e));return t.current.appendChild(i),p(t)}if("/"===e[1])return function(e,t){return t.length>0&&t[t.length-1]===e.substring(h).replace(">","")}(e,t.tagStack)&&(t.tagStack.pop(),t.current=t.current.parentNode),p(t);var n=(0,a.parseTime)(e.substring(1,e.length-1));if(null!=n){var r=t.current.ownerDocument.createComment("time: ".concat(n+t.offset));return t.current.appendChild(r),p(t)}var o=/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/.exec(e);if(!o)return p(t);var m=o[0],g=o[1],v=o[2],y=o[3],b=function(e,t,i){var n=l[e];if(!n)return null;var r=i.createElement(n),o=c[e];return o&&t&&(r[o]=t.trim()),r}(g,y,t.current.ownerDocument);return b&&function(e,t){return!u[t.localName]||u[t.localName]===e.localName}(t.current,b)&&(function(e,t,i){var n=function(e,t){var i,n,r,o="",s="",l={};if(t.type&&"v"!==t.type&&(l=null!=(i=f(e,t.type))?i:l),t.contents){l={};for(var c=t.contents.substring(1).split("."),u=0,h=c;u<h.length;u++){var p=h[u],m=f(e,d[p]||".".concat(p));m&&Object.assign(l,m)}o=c.join(" ").trim()}return"v"===t.type&&t.annotation&&(s=t.annotation.substring(1),l=null!=(n=f(e,"".concat(t.type,'[voice="').concat(s,'"]')))?n:l),{className:o,title:s,styleString:null!=(r=(0,a.stringifyCssProperties)(l))?r:""}}(t,i),r=n.className,o=n.title,s=n.styleString;o&&(e.title=o),r&&(e.className=r),s&&e.setAttribute("style",s)}(b,t.styles,{type:g,contents:v,annotation:y}),t.tagStack.push(m[1]),t.current.appendChild(b),t.current=b),p(t)}(t,e))}function f(e,t){for(var i,n=0,r=e;n<r.length;n++)if((i=r[n]).identifier===t)return i.style;for(var a=0,s=o.webVttDefaultClassStyles;a<s.length;a++)if((i=s[a]).identifier===t)return i.style}},99735:function(e,t){var i=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.webVttDefaultClassStyles=void 0;var n=["white","lime","cyan","red","yellow","magenta","blue","black"];t.webVttDefaultClassStyles=i(i([],n.map(function(e){return{identifier:".".concat(e),style:{color:e}}}),!0),n.map(function(e){return{identifier:".bg_".concat(e),style:{background:e}}}),!0)},76171:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseOptions=function(e,t){for(var i=e.split(/\s/),n=(0,r.getDefaultVttProperties)(),a=0,s=i;a<s.length;a++){var l=s[a],c=l.indexOf(":");-1!==c&&o(l.substring(0,c),l.substring(c+1),t,n)}return function(e){var t=(0,r.getDefaultVttProperties)();null!=e.region&&(e.vertical!==t.vertical||e.size!==t.size||e.line!==t.line)&&delete e.region}(n),n},t.setOptionProperty=o;var n=i(23068),r=i(69041);function o(e,t,i,o){switch(e){case"region":!function(e,t,i){var n=t.find(function(t){return t.id===e});null!=n&&(i.region=n)}(t,i,o);break;case"vertical":!function(e,t){var i=(0,r.ensureArray)(/^(lr|rl)$/.exec(e))[1];null!=i&&(t.vertical=i)}(t,o);break;case"align":!function(e,t){var i=(0,r.ensureArray)(/^(start|middle|center|end|left|right)$/.exec(e))[1];null!=i&&(t.align=i),t.positionAlign=a(void 0,t)}(t,o);break;case"size":!function(e,t){var i=(0,r.ensureArray)(/^([\d.]+)%$/.exec(e))[1];null!=i&&(t.size=Number(i))}(t,o);break;case"position":!function(e,t){var i=(0,r.ensureArray)(/^([\d.]+|auto)%?(?:,(line-left|line-right|center))?$/.exec(e)),n=i[1],o=i[2];"auto"===n?t.position="auto":void 0!==n&&(t.position=Number(n)),t.positionAlign=a(o,t)}(t,o);break;case"line":!function(e,t){var i=(0,r.ensureArray)(/^(-?[\d.]+|auto)(%)?(?:,(start|end|center|auto))?$/.exec(e)),o=i[1],a=i[2],s=i[3],l="%"===a;"auto"===o?t.line="auto":l?t.line="".concat(o,"%"):null!=e&&(t.line=Number(o)),null!=s&&(t.lineAlign=s),t.snapToLines=(0,n.isNumber)(t.line)}(t,o)}}function a(e,t){if(null!=e)return e;switch(t.align){case"start":case"left":return"line-left";case"end":case"right":return"line-right";default:return"center"}}},69041:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultVttProperties=s,t.extractVttProperties=function(e){var t=s(),i=l();return Object.keys(t).forEach(function(r){var o=function(e,t,i){var r=t[e],o=i[e],a=String(r||o),s="line"===e;return("position"===e&&(0,n.isNumber)(r)||s&&!1===t.snapToLines)&&(a+="%"),a}(r,e,t);(0,a.setOptionProperty)(r,o,[i],t)}),t},t.getDefaultVttRegionProperties=l,t.parseTime=function(e){var t=/(?:(\d{1,}):)?(\d{2}):(\d{2})[.,](\d{3})/g.exec(e);if(null==t)return null;var i=t[1],n=t[2],r=t[3];return Number(t[4])/1e3+Number(r)+60*Number(n)+3600*(Number(i)||0)},t.ensureArray=function(e){return Array.isArray(e)?e:[]},t.stringifyCssProperties=function(e){return e?Object.entries(e).map(function(e){return"".concat(e[0],":").concat(e[1],";")}).join(""):null},t.stringifyCueHtml=function(e){return(0,r.ModuleManager.get(o.ModuleName.Subtitles).HtmlTransformer.prepareHtml)((null==e?void 0:e.outerHTML)||"")};var n=i(23068),r=i(88052),o=i(62756),a=i(76171);function s(){return{vertical:"",align:"center",size:100,line:"auto",lineAlign:"start",position:"auto",positionAlign:"center",snapToLines:!1}}function l(){return{id:null,width:100,lines:3,regionAnchorX:0,regionAnchorY:100,viewportAnchorX:0,viewportAnchorY:100,scroll:""}}},79347:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseRegions=function(e){for(var t=[],i=0,n=e;i<n.length;i++){var a=n[i];if(a=a.trim(),/^REGION$/i.test(a)){t.push(r(e));break}/^Region:/i.test(a)&&t.push(o(a))}return t};var n=i(69041);function r(e){return a(e.slice(1),":")}function o(e){return a(e.split(/[ \t]+/).slice(1),"=")}function a(e,t){var i=(0,n.getDefaultVttRegionProperties)();return e.forEach(function(e){!function(e,t){var i=e[0],r=e[1];switch(i){case"id":!function(e,t){null!=e&&(t.id=e)}(r,t);break;case"width":!function(e,t){var i=(0,n.ensureArray)(/^(\d{1,2}|100)%$/.exec(e))[1];null!=i&&(t.width=Number(i))}(r,t);break;case"lines":!function(e,t){var i=(0,n.ensureArray)(/^(\d+)$/.exec(e))[1];null!=i&&(t.lines=Number(i))}(r,t);break;case"regionanchor":!function(e,t){var i=(0,n.ensureArray)(/^(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(e)),r=i[1],o=i[2];null!=r&&(t.regionAnchorX=Number(r)),null!=o&&(t.regionAnchorY=Number(o))}(r,t);break;case"viewportanchor":!function(e,t){var i=(0,n.ensureArray)(/^(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(e)),r=i[1],o=i[2];null!=r&&(t.viewportAnchorX=Number(r)),null!=o&&(t.viewportAnchorY=Number(o))}(r,t);break;case"scroll":!function(e,t){var i=(0,n.ensureArray)(/^(up)$/.exec(e))[1];null!=i&&(t.scroll=i)}(r,t)}}(e.split(t),i)}),i}},22649:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseStyles=function(e){var t=[],i=/::cue(\((.+)\))?(?= |{)/,n=/([a-zA-Z0-9-]+):(.+?(?=;|}|$))/g,r=i.exec(e[1]);if(!r)return t;for(var o=1;o<e.length;o++){for(var a=i.exec(e[o]),s=null!==a,l=(r=s?a:r)[2],c={},u=n.exec(e[o]);null!==u;){var d=u[1],h=u[2];c[d]=h.trim(),u=n.exec(e[o])}(s||Object.keys(c).length>0)&&t.push({identifier:l,style:c})}return t},t.getPlaceholderVttStyleProperties=function(){return[{identifier:":future",style:{visibility:"hidden"}}]}},730:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),r(i(79347),t),r(i(39157),t),r(i(76171),t),r(i(69041),t),r(i(22649),t)}},function(e){return function(){return e(e.s=48519)}()}])})}()}(bitmovinplayerSubtitlesVtt);var bitmovinplayerSubtitlesVttExports=bitmovinplayerSubtitlesVtt.exports;let SubtitlesVTT=getDefaultExportFromCjs$1(bitmovinplayerSubtitlesVttExports);var bitmovinplayerSubtitlesNative={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[826],{91444:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.NativeSubtitlesModuleDefinition=void 0;var n=i(62756),r=i(43931);t.NativeSubtitlesModuleDefinition={name:n.ModuleName.SubtitlesNative,module:function(){return{TextTrackController:r.TextTrackController}},dependencies:[n.ModuleName.Subtitles]},t.default=t.NativeSubtitlesModuleDefinition},43931:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.TextTrackController=void 0;var o,a,s,l=i(25926),c=i(4224),u=i(3714),d=i(4129),h=i(29669),p=i(74853),f=i(15487),m=i(88844),g=i(58313),v=i(88052),y=i(62756),b=i(52364);(function(e){e.Showing="showing",e.Hidden="hidden",e.Disabled="disabled"})(o||(o={})),function(e){e.Subtitle="subtitles",e.ForcedSubtitle="forced",e.Caption="captions",e.Metadata="metadata"}(a||(a={})),function(e){e.ID3="org.id3",e.DATERANGE="com.apple.quicktime.HLS",e.EMSG="https://aomedia.org/emsg/ID3"}(s||(s={}));var S=RegExp("^(?:[a-z]+:)?//","i"),_=function(e){var t={id:e.id,lang:e.lang,label:e.label,kind:e.kind,isFragmented:e.isFragmented,isSideloaded:e.isSideloaded,enabled:e.textTrack&&e.textTrack.mode!==o.Disabled,forced:e.kind===a.ForcedSubtitle};return e.url&&(t.url=e.url),e.metadata&&(t.metadata=e.metadata),t};function E(e,t){for(var i=0,n=e;i<n.length;i++){var r=n[i];if(r===t.textTrack)return r}}t.TextTrackController=function(){function e(e,t,i,r){var a=this;this.Yu=function(){a.Wu=!0,a.Zu()},this.du=function(e,t,i){var n=e.body;n&&a.cu(n.trim(),i)},this.eu=function(e,t){a.wt.logger.debug("Error loading subtitle file: "+JSON.stringify(t)),a.removeSubtitle(a.bu(e.url)),a.xt.dispatchEvent(u.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.NETWORK_COULD_NOT_LOAD_SUBTITLE)),a.wt.logger.debug("Could not load subtitles/captions, got HTTP status code "+e.status)},this.gu=function(e){var t=e.currentTarget.activeCues,i={frames:[]};for(var r in t)if(t[r].type===s.ID3&&void 0!==t[r].value){var o=t[r].value;p.ArrayHelper.isArrayBuffer(o.data)&&((o=n({},o)).data=p.ArrayHelper.getArray(new Uint8Array(o.data))),i[o.key]=o.data,i.frames.push(o),a.Vu&&a.hu(t[r],e.currentTarget)}i.frames.length&&a.xt.dispatchEvent(u.PlayerEvent.Metadata,{metadataType:u.MetadataType.ID3,metadata:i})},this.iu=function(e){var t=e.target;if(t.activeCues&&t.activeCues.length>0){var i=b.TextTrackCueHelper.cueListToArray(t.activeCues),n=a.xu(t);b.TextTrackCueHelper.sort(i).forEach(function(e){return a.ku(n,e)})}},this.qu=function(e){var t=window.setTimeout(function(){return a.ru(e)},0);a.Su.push(t)},this.wu=function(){return null},this.Au=function(){var e;a.zt?a.At&&a.disableSubtitle(a.At):(a.At=null==(e=a.zu())?void 0:e.id,a.At&&a.enableSubtitle(a.At,!0))},this.Bu=function(){a.disableSubtitle(a.At),a.Au()},this.Du=function(){var e=a.yu(),t=e[0],i=e[1];a.Cu(i)?(a.disableSubtitle(i),a.Au()):(i||(a.zt=void 0),a.Au(),a.Xu&&a.Eu(),i&&t&&t.mode!==o.Hidden&&!a.Tu.includes(t)&&a.enableSubtitle(i))},this.wt=e,this.xt=e.eventHandler,this.yt=t,this.type=r,this.Et=[],this.Ft={},this.Ct=1,this.Dt=0,this.Ht=!1,this.Su=[],this.Tu=[],this.Uu=[],this.Bt=null,this.Vu=(0,f.isSafariPlatform18orNewer)(),this.Wu=!1,i.hasOwnProperty("style")&&i.style.hasOwnProperty("nativeSubtitles")?this.Gt=!!i.style.nativeSubtitles:this.Gt=!1,t.audioTracks&&t.audioTracks.addEventListener("change",this.Bu),t.textTracks&&"function"==typeof t.textTracks.addEventListener&&(t.textTracks.addEventListener("addtrack",this.qu),t.textTracks.addEventListener("change",this.Du)),this.xt.one(u.PlayerEvent.SourceLoaded,this.Yu,!0)}return Object.defineProperty(e.prototype,"Xu",{get:function(){return this.Ht||this.Gt},enumerable:!1,configurable:!0}),e.prototype.getAvailableSubtitles=function(){return Object.values(this.Ft||{}).filter(function(e){return e.kind!==a.ForcedSubtitle}).map(_)},e.prototype.Zu=function(){var e=this;this.getAvailableSubtitles().filter(function(e){return!e.isSideloaded}).forEach(function(t){return e.xt.dispatchEvent(u.PlayerEvent.SubtitleAdded,{subtitle:t})})},e.prototype.enableSubtitle=function(e,t){void 0===t&&(t=!1);var i=this.Ft[e];return i?(t||(this.zt=e),i.textTrack&&(this.Gt||this.Ht?i.textTrack.mode=o.Showing:i.textTrack.mode=o.Hidden),i.enabled?Promise.resolve(!1):(i.enabled=!0,i.textTrack?i.loadPromise.then(function(){return!0},function(){return!1}):Promise.resolve(!0))):Promise.resolve(!1)},e.prototype.disableSubtitle=function(e){var t=this,i=this.Ft[e];return!!i&&(i.textTrack&&(i.textTrack.mode=o.Disabled),i.enabled=!1,r([],this.Uu,!0).forEach(function(i){return i.subtitleId===e&&t.ou(e,i)}),!0)},e.prototype.au=function(e){var t,i;return window.VTTCue?new window.VTTCue(e.start,e.end,null!=(t=e.html)?t:e.text):window.TextTrackCue?new TextTrackCue(e.start,e.end,null!=(i=e.html)?i:e.text):void 0},e.prototype.bu=function(e){if(e&&this.Ft){for(var t in this.Ft)if(this.Ft.hasOwnProperty(t)&&this.Ft[t].url===e)return t}},e.prototype.cu=function(e,t){var i=this.bu(t);if(i&&e){for(var r=v.ModuleManager.get(y.ModuleName.Subtitles).SubtitleParserFactory.createInstance(this.wt,e).parse(e),o=0;o<r.length;o++)this.xt.dispatchEvent(u.PlayerEvent.CueParsed,n(n({subtitleId:i},r[o]),{periodId:null})),this.Ft[i].textTrack.addCue(this.au(r[o]));this.xt.dispatchEvent(u.PlayerEvent.SubtitleAdded,{subtitle:_(this.Ft[i])})}},e.prototype.fu=function(e){var t=this;if(e&&e.trim())return this.wt.logger.debug("loading "+e),this.Bt=new d.DefaultContentLoader(this.wt,{maxRetries:this.wt.settings.MAX_RETRIES,retryDelay:this.wt.settings.RETRY_DELAY,onSuccess:this.du,onFailure:this.eu,requestType:h.HttpRequestType.MEDIA_SUBTITLES}),this.Bt.load(e).catch(function(e){t.wt.logger.debug("Error while loading subtitles ",e)})},e.prototype.hu=function(e,t){try{t.removeCue(e)}catch(e){"NotFoundError"!==e.name&&this.wt.logger.debug("Error removing cue from native TextTrack: ".concat(e.name,": ").concat(e.message))}},e.prototype.ju=function(e,t){var i=v.ModuleManager.get(y.ModuleName.Subtitles).HtmlTransformer,n=i.htmlToText,r=i.stripHtmlTags,o=(v.ModuleManager.get(y.ModuleName.SubtitlesWebVTT,!1)||{}).extractVttProperties,a={subtitleId:e,text:n(t.text),start:t.startTime,end:t.endTime},s=[a];if("subtitles"===t.track.kind)a.html=function(e){var t=(0,v.ModuleManager.get(y.ModuleName.Subtitles).HtmlTransformer.prepareHtml)(e);return t.startsWith("<span>")?t:"<span>".concat(t,"</span>")}(t.text),window.VTTCue&&(t instanceof VTTCue&&o?a.vtt=o(t):t instanceof VTTCue&&this.wt.logger.debug("Could not interpret VTT properties from native VTTCue Event as ".concat(y.ModuleName.SubtitlesWebVTT," is missing")));else if("captions"===t.track.kind){a.position=function(e){var t=5.333333333333333,i=e.line-10,n=e.position-10;return i-=i%t,n-=n%2.5,{row:i=Math.round(i/t),column:n=Math.round(n/2.5)}}(t);var l=r(a.text);a.position.column+l.length>b.CEA_608_MAX_LINE_LENGTH-1&&(s=b.TextTrackCueHelper.splitCea608Cue(a))}return s},e.prototype.ku=function(e,t){var i=this;if(t){var n=Object.values(this.Ft).find(function(e){return e.textTrack===t.track});if(function(e,t,i){if(i){var n=v.ModuleManager.get(y.ModuleName.Subtitles).HtmlTransformer,r=n.stripAwayHtmlBreakPoints,o=n.replaceHtmlBreakPointsWithNewLine;e&&i.isSideloaded&&(t.text=o(t.text)),e||i.isSideloaded||(t.text=r(t.text))}}(this.Gt||this.Ht,t,n),!this.Gt&&!this.Ht){var r=this.ju(e,t);r.forEach(function(n){i.mu(n)?i.xt.dispatchEvent(u.PlayerEvent.CueUpdate,n):i.nu(e,t,n)}),this.lu(e,r)}}},e.prototype.lu=function(e,t){var i=this,n=this.Uu.filter(function(i){return!t.find(function(e){return i.start===e.start&&i.text===e.text&&i.subtitleId===e.subtitleId})&&i.end===1/0&&i.subtitleId===e});n.length>0&&n.forEach(function(t){i.ou(e,t)})},e.prototype.mu=function(e){var t=this,i=this.Uu.find(function(i){var n=i.start===e.start,r=i.text===e.text,o=!e.end||i.end===1/0||i.end===t.yt.duration||i.end===e.end;return n&&r&&o});return!!i&&(i.end=e.end,!0)},e.prototype.nu=function(e,t,i){var n=this;this.Uu.push(i),t.onexit=function(){n.ju(e,t).forEach(function(t){return n.ou(e,t)})},this.xt.dispatchEvent(u.PlayerEvent.CueEnter,i)},e.prototype.ou=function(e,t){var i=this.Uu.find(function(e){return e.start===t.start&&e.end===t.end&&e.text===t.text});if(i){this.Uu=this.Uu.filter(function(e){return e!==i});var n={subtitleId:e,text:i.text,start:i.start,end:i.end};i.position&&(n.position=i.position),this.xt.dispatchEvent(u.PlayerEvent.CueExit,n)}},e.prototype.removeSubtitle=function(e){if(this.Ft.hasOwnProperty(e)){this.Ft[e].textTrack.mode!==o.Disabled&&this.disableSubtitle(e),this.Ft[e].textTrack.mode=o.Disabled;var t=this.Ft[e];delete this.Ft[e],this.xt.dispatchEvent(u.PlayerEvent.SubtitleRemoved,{subtitle:_(t)})}},e.prototype.signalSourceChange=function(){this.yt&&this.yt.textTracks&&"function"==typeof this.yt.textTracks.addEventListener&&this.yt.textTracks.removeEventListener("addtrack",this.qu),this.removeAll()},e.prototype.removeAll=function(){for(var e in this.wt.logger.debug("removing all subtitle tracks"),this.Su.forEach(function(e){return(0,m.clearTimeoutIfDefined)(e)}),this.Su=[],this.Ft)this.Ft.hasOwnProperty(e)&&(this.Ft[e].textTrack.mode=o.Disabled,this.Ft[e].textTrack.removeEventListener("cuechange",this.iu));this.Ft={},this.Uu=[],this.Ct=1,this.Dt=0},e.prototype.addSubtitle=function(e){if("function"!=typeof this.yt.addTextTrack)return this.wt.logger.warn("adding subtitles not supported!"),Promise.reject();this.Ft.hasOwnProperty(e.id)&&(this.wt.logger.debug("re-adding subtitle "+e.id),this.removeSubtitle(e.id));var t=e.url?g.URLHelper.toFullUrl(function(e){return"https:"===location.protocol?e.replace(S,"//"):e}(e.url.trim())):null,i={id:e.id,url:t,kind:e.kind,lang:e.lang,label:e.label,textTrack:null,isFragmented:!1,isSideloaded:!0,loadPromise:null,metadata:e.metadata};return this.Ft[e.id]=i,this.Ft[e.id].textTrack=this.yt.addTextTrack(e.kind,e.label),this.Ft[e.id].textTrack.mode=o.Disabled,this.Ft[e.id].textTrack.addEventListener("cuechange",this.iu),this.pu(i)},e.prototype.pu=function(e){var t=this;return e.url?e.loadPromise=this.fu(e.url).then(function(){if(!t.getAvailableSubtitles().find(function(t){return t.id===e.id}))throw"subtitle adding failed"}):(this.wt.logger.log("No url was provided for an external subtitle, nothing will be loaded."),e.loadPromise=Promise.resolve(),this.xt.dispatchEvent(u.PlayerEvent.SubtitleAdded,{subtitle:_(e)})),e.loadPromise},e.prototype.ru=function(e){for(var t,i,n=this,r=e.track,s=e.isFragmented&&r.kind===a.Subtitle||!1,l=0,c=Object.keys(this.Ft);l<c.length;l++){var d=c[l],h=this.Ft[d];if(h.textTrack===r&&h.isSideloaded)return void this.wt.logger.insane("track "+r.label+" has already been added externally")}switch(r.kind){case a.Subtitle:t=r.id||"sub".concat(this.Dt),i=r.label||"Subtitles (".concat(this.Dt,")"),this.Dt++;break;case a.ForcedSubtitle:t=r.id||"fsub".concat(this.Dt),i=r.label||"Subtitles (".concat(this.Dt,")) (Forced)"),this.Dt++;break;case a.Caption:t="CC".concat(this.Ct),i=r.label||"Captions (CC ".concat(this.Ct,")"),this.Ct++;break;default:return void this.su(r)}this.wt.logger.debug("adding ".concat(r.kind," text track ").concat(t)),this.Ft[t]={id:t,url:null,kind:r.kind,lang:r.language||"unknown",label:i,textTrack:r,isFragmented:s,isSideloaded:!1,loadPromise:Promise.resolve()},(i=this.uu(this.Ft[t]))&&"string"==typeof i&&(this.Ft[t].label=i),this.Tu.push(r),r.addEventListener("cuechange",this.iu),r.kind!==a.ForcedSubtitle&&(this.Wu?this.xt.dispatchEvent(u.PlayerEvent.SubtitleAdded,{subtitle:_(this.Ft[t])}):this.wt.logger.debug('Delaying SubtitleAdded event until source is loaded track id="'.concat(t,'" label="').concat(this.Ft[t].label,'"'))),r.mode=o.Disabled;var p=window.setTimeout(function(){n.Tu=n.Tu.filter(function(e){return e!==r}),Object.keys(n.Ft).map(function(e){return n.Ft[e]}).filter(function(e){return e.enabled&&!!e.textTrack&&e.textTrack.mode===o.Disabled}).forEach(function(e){n.Xu?e.textTrack.mode=o.Showing:e.textTrack.mode=o.Hidden})},0);this.Su.push(p),this.tu()&&this.Au()},e.prototype.su=function(e){this.wt.settings.HLS_PARSE_NATIVE_METADATA&&(this.Et.push(e),e.mode=o.Hidden,e.addEventListener("cuechange",this.gu))},e.prototype.tu=function(){var e=Object.keys(this.Ft).length;return this.yt.textTracks.length===e},e.prototype.uu=function(e){var t={kind:e.kind,id:e.id,label:e.label,lang:e.lang};return this.vu()(t)},e.prototype.vu=function(){var e=this.wt.sourceContext,t=e&&e.source&&e.source.labeling;return t&&t[this.type]&&t[this.type].subtitles?"function"!=typeof t[this.type].subtitles?this.wu:t[this.type].subtitles:this.wu},e.prototype.xu=function(e){var t;return(null==(t=Object.values(this.Ft).find(function(t){return t.textTrack===e}))?void 0:t.id)||null},e.prototype.yu=function(){for(var e=0,t=this.yt.textTracks;e<t.length;e++){var i=t[e];if((i.mode===o.Showing||i.mode===o.Hidden)&&i.kind!==a.Metadata&&i.kind!==a.ForcedSubtitle)return[i,this.xu(i)]}return[void 0,void 0]},e.prototype.enableNative=function(){var e=this;Object.keys(this.Ft).map(function(t){return e.Ft[t]}).filter(function(e){return e.enabled&&!!e.textTrack}).forEach(function(e){return e.textTrack.mode=o.Showing}),this.Ht=!0},e.prototype.disableNative=function(){var e=this;Object.keys(this.Ft).map(function(t){return e.Ft[t]}).filter(function(e){return e.enabled&&!!e.textTrack}).forEach(function(e){return e.textTrack.mode=o.Hidden}),this.Ht=!1},e.prototype.seek=function(){var e=this;Object.keys(this.Ft).map(function(t){return e.Ft[t]}).filter(function(e){return e.enabled&&!!e.textTrack}).forEach(function(e){var t=e.textTrack.mode;e.textTrack.mode=o.Disabled,e.textTrack.mode=t})},e.prototype.zu=function(){var e,t,i,n=this.yt.audioTracks,r=v.ModuleManager.get(y.ModuleName.Subtitles).LanguageComparer.isEqualIsoLanguage;if(this.zt)i=null==(e=this.Ft[this.zt])?void 0:e.lang;else{if(!n)return;var o=p.ArrayHelper.toArray(n).find(function(e){return e.enabled});i=null==o?void 0:o.language}i=null!=(t=i??navigator.language)?t:navigator.userLanguage;var s=Object.values(this.Ft).filter(function(e){return e.kind===a.ForcedSubtitle});return s.find(function(e){return r(e.lang,i)})??s[0]},e.prototype.Cu=function(e){var t=this,i=Object.keys(this.Ft).some(function(i){return i===e&&t.Ft[i].enabled});return e&&!this.Xu&&!i},e.prototype.Eu=function(){var e=this,t=function(e){var t=n({},e);return delete t.loadPromise,delete t.textTrack,n({},t)};this.Fu().forEach(function(i){e.disableSubtitle(i.id),e.xt.dispatchEvent(u.PlayerEvent.SubtitleDisabled,{subtitle:t(i)})}),this.Gu().forEach(function(i){e.xt.dispatchEvent(u.PlayerEvent.SubtitleEnabled,{subtitle:t(i)})})},e.prototype.Fu=function(){var e=this.yt.textTracks;return Object.values(this.Ft).filter(function(e){return e.enabled}).filter(function(t){var i=E(e,t);return i&&i.mode===o.Disabled})},e.prototype.Gu=function(){var e=this.yt.textTracks;return Object.values(this.Ft).filter(function(e){return!e.enabled}).filter(function(t){var i=E(e,t);return i&&i.mode!==o.Disabled})},e.prototype.dispose=function(){var e;this.removeAll(),this.xt.off(u.PlayerEvent.SourceLoaded,this.Yu),this.xt=null,this.Uu=null,this.Ft=null,this.Et=null,null==(e=this.yt.audioTracks)||e.removeEventListener("change",this.Bu),this.yt&&this.yt.textTracks&&"function"==typeof this.yt.textTracks.addEventListener&&(this.yt.textTracks.removeEventListener("addtrack",this.qu),this.yt.textTracks.removeEventListener("change",this.Du)),this.Bt&&this.Bt.dispose(),this.Bt=null},e}()},52364:function(e,t){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.TextTrackCueHelper=t.CEA_608_MAX_LINE_LENGTH=void 0,t.CEA_608_MAX_LINE_LENGTH=32;var n=function(){function e(){}return e.cueListToArray=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},e.sortEqualStartTimeByLineFn=function(e,t){if("line"in e&&"line"in t&&e.startTime===t.startTime){if(e.line<t.line)return -1;if(e.line>t.line)return 1}return 0},e.sortByStartTimeFn=function(e,t){return e.startTime<t.startTime?-1:+(e.startTime>t.startTime)},e.sort=function(t){return t.sort(e.sortByStartTimeFn),t.sort(e.sortEqualStartTimeByLineFn),t},e.getTagIndexRanges=function(e){for(var t,i=RegExp("<[^>]*>","g"),n=[];t=i.exec(e);){var r=t[0];n.push({start:t.index,end:t.index+r.length-1})}return n},e.splitCea608Cue=function(i){for(var n=t.CEA_608_MAX_LINE_LENGTH-i.position.column,r=i.text,o=e.getTagIndexRanges(r),a=[],s=0,l=0,c=!1,u=0,d=0;d<r.length;){if(d===r.length-1){a.push(r.substring(s));break}if(o.length>0&&d===o[0].start&&(c=!0),!c&&(l++," "===r[d]&&(u=d),l>=n&&u>s)){d=u+1;var h=r.substring(s,d);h&&a.push(h),s=d,l=1}c&&o.length>0&&d===o[0].end&&(c=!1,o.shift()),d++}var p=e.createCueEvents(a,i);return e.adjustCea608CaptionPositioning(p),p},e.createCueEvents=function(e,t){var n=e.length-1;return e.map(function(e){var r=i({},t);return r.text=e,r.position={column:r.position.column,row:r.position.row-n},n--,r})},e.adjustCea608CaptionPositioning=function(e){var t=Math.max.apply(Math,e.map(function(e){return e.position.row})),i=Math.min.apply(Math,e.map(function(e){return e.position.row}));if(t>14){var n=14-t;e.forEach(function(e){return e.position.row+=n})}if(i<0){var r=0-i;e.forEach(function(e){return e.position.row+=r})}},e}();t.TextTrackCueHelper=n}},function(e){return function(){return e(e.s=91444)}()}])})}()}(bitmovinplayerSubtitlesNative);var bitmovinplayerSubtitlesNativeExports=bitmovinplayerSubtitlesNative.exports;let SubtitlesNative=getDefaultExportFromCjs$1(bitmovinplayerSubtitlesNativeExports);var bitmovinplayerContainerTs={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[858],{72387:function(e,t,i){e.exports=function(){return i(90040)('!function(){var t={48:function(t){!function(){t.exports=function(){"use strict";var t,e,i,n,a,r,s,o,d,p,h,l,c,u,f,m,g,y,_,S,b,v,T,w,k,C,P,A,E,x,U,M,R,I,D,O,L,B,G,W,F=Math.pow(2,32),N=F;(function(){var t;if(C={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dec3:[],dinf:[],dref:[],"ec-3":[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(t in C)C.hasOwnProperty(t)&&(C[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);
28P=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),E=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),x=new Uint8Array(["h".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),A=new Uint8Array([0,0,0,1]),U=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]),M=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]),R={video:U,audio:M},O=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),B=L,G=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),W=L,I=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),t=function(t){var e,i,n=[],a=0;for(e=1;e<arguments.length;e++)n.push(arguments[e]);for(e=n.length;e--;)a+=n[e].byteLength;for(i=new Uint8Array(a+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(t,4),e=0,a=8;e<n.length;e++)i.set(n[e],a),a+=n[e].byteLength;return i},n=function(){return t(C.dinf,t(C.dref,O))},a=function(e){return t(C.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},i=function(e){var i=e.fscod||0,n=e.bsid||16,a=e.acmod||0,r=e.lfeon||0;return t(C.dec3,new Uint8Array([0,0,i<<6|n<<1,a<<1|r,0]))},r=function(e){var i,n,a;for(a=0;a<e.length;a++)if("video"===(n=e[a]).type){i={avc:E,hevc:x}[n.codec];break}return t(C.ftyp,P,A,P,i||E)},_=function(e){return t(C.hdlr,R[e])},s=function(e){return t(C.mdat,e)},y=function(e){var i=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(i[12]=e.samplerate>>>24&255,i[13]=e.samplerate>>>16&255,i[14]=e.samplerate>>>8&255,i[15]=255&e.samplerate),t(C.mdhd,i)},g=function(e){return t(C.mdia,y(e),_(e.type),d(e))},o=function(e){return t(C.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},d=function(e){return t(C.minf,"video"===e.type?t(C.vmhd,I):t(C.smhd,D),n(),b(e))},p=function(e,i){for(var n=[],a=i.length;a--;)n[a]=T(i[a]);return t.apply(null,[C.moof,o(e)].concat(n))},h=function(e){for(var i=e.length,n=[];i--;)n[i]=f(e[i]);return t.apply(null,[C.moov,c(4294967295)].concat(n).concat(l(e)))},l=function(e){for(var i=e.length,n=[];i--;)n[i]=w(e[i]);return t.apply(null,[C.mvex].concat(n))},c=function(e){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(C.mvhd,i)},S=function(e){var i,n,a=e.samples||[],r=new Uint8Array(4+a.length);for(n=0;n<a.length;n++)i=a[n].flags,r[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return t(C.sdtp,r)},b=function(e){return t(C.stbl,v(e),t(C.stts,W),t(C.stsc,B),t(C.stsz,G),t(C.stco,L))},e=function(){return t(C.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))},u=function(e,i){return t(C.pasp,new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))},function(){var n,r;v=function(e){return t(C.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?n(e):r(e))},n=function(i){var n,a,r=i.sps||[],s=i.parsedSps||{},o=i.pps||[],d=i.vps||[],p=[],h=[],l=[];for(n=0;n<r.length;n++)p.push((65280&r[n].byteLength)>>>8),p.push(255&r[n].byteLength),p=p.concat(Array.prototype.slice.call(r[n]));for(n=0;n<o.length;n++)h.push((65280&o[n].byteLength)>>>8),h.push(255&o[n].byteLength),h=h.concat(Array.prototype.slice.call(o[n]));for(n=0;n<d.length;n++)l.push(d[n].byteLength>>>8&255),l.push(255&d[n].byteLength),l=l.concat(Array.prototype.slice.call(d[n]));var c=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,(65280&s.width)>>8,255&s.width,(65280&s.height)>>8,255&s.height,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,255,255]);if("avc"===i.codec)return a=[C.avc1,c,t(C.avcC,new Uint8Array([1,s.profileIdc,s.profileCompatibility,s.levelIdc,255].concat([r.length],p,[o.length],h))),e()],i.sarRatio&&a.push(u(i.sarRatio[0],i.sarRatio[1])),t.apply(null,a);if("hevc"===i.codec){var f,m=s.sps_max_sub_layers_minus1+1,g=s.sps_temporal_id_nesting_flag,y=61440|s.min_spatial_segmentation_idc,_=new DataView(new ArrayBuffer(2)),S=new DataView(new ArrayBuffer(2)),b=new DataView(new ArrayBuffer(2));return _.setUint16(0,d.length),S.setUint16(0,r.length),b.setUint16(0,o.length),f=new Uint8Array([1,s.general_profile_space<<6|s.general_tier_flag<<5|s.general_profile_idc,s.general_profile_compatibility_flags>>>24&255,s.general_profile_compatibility_flags>>>16&255,s.general_profile_compatibility_flags>>>8&255,255&s.general_profile_compatibility_flags,s.general_constraint_indicator_flags_bytes[0],s.general_constraint_indicator_flags_bytes[1],s.general_constraint_indicator_flags_bytes[2],s.general_constraint_indicator_flags_bytes[3],s.general_constraint_indicator_flags_bytes[4],s.general_constraint_indicator_flags_bytes[5],s.general_level_idc,y>>>8&255,255&y,252,252|s.chroma_format_idc,248|s.bit_depth_luma_minus8,248|s.bit_depth_chroma_minus8,0,0,m<<3|g<<2|3,3].concat([160,_.getUint8(0),_.getUint8(1)],l).concat([161,S.getUint8(0),S.getUint8(1)],p).concat([162,b.getUint8(0),b.getUint8(1)],h)),t(C.hvc1,c,t(C.hvcC,f),e())}},r=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]);return"ec-3"===e.codec?t(C["ec-3"],n,i(e)):t(C.mp4a,n,a(e))}}(),m=function(e){var i=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(C.tkhd,i)},T=function(e){var i,n,a,r,s,o;return i=t(C.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(e.baseMediaDecodeTime/N),o=Math.floor(e.baseMediaDecodeTime%N),n=t(C.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(a=k(e,92),t(C.traf,i,n,a)):(r=S(e),a=k(e,r.length+92),t(C.traf,i,n,a,r))},f=function(e){return e.duration=e.duration||4294967295,t(C.trak,m(e),g(e))},w=function(e){var i=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(i[i.length-1]=0),t(C.trex,i)},function(){var e,i,n;n=function(t,e){var i=0,n=0,a=0,r=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(a=4),void 0!==t[0].compositionTimeOffset&&(r=8)),[0,0,i|n|a|r,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},i=function(e,i){var a,r,s,o,d,p;i+=20+16*(o=e.samples||[]).length,s=n(o,i),(r=new Uint8Array(s.length+16*o.length)).set(s),a=s.length;var h=0;for(p=0;p<o.length;p++)h+=(d=o[p]).duration,r[a++]=(4278190080&d.duration)>>>24,r[a++]=(16711680&d.duration)>>>16,r[a++]=(65280&d.duration)>>>8,r[a++]=255&d.duration,r[a++]=(4278190080&d.size)>>>24,r[a++]=(16711680&d.size)>>>16,r[a++]=(65280&d.size)>>>8,r[a++]=255&d.size,r[a++]=d.flags.isLeading<<2|d.flags.dependsOn,r[a++]=d.flags.isDependedOn<<6|d.flags.hasRedundancy<<4|d.flags.paddingValue<<1|d.flags.isNonSyncSample,r[a++]=61440&d.flags.degradationPriority,r[a++]=15&d.flags.degradationPriority,r[a++]=(4278190080&d.compositionTimeOffset)>>>24,r[a++]=(16711680&d.compositionTimeOffset)>>>16,r[a++]=(65280&d.compositionTimeOffset)>>>8,r[a++]=255&d.compositionTimeOffset;return e.segmentDuration=h,t(C.trun,r)},e=function(e,i){var a,r,s,o,d,p;i+=20+8*(o=e.samples||[]).length,s=n(o,i),(a=new Uint8Array(s.length+8*o.length)).set(s),r=s.length;var h=0;for(p=0;p<o.length;p++)h+=(d=o[p]).duration,a[r++]=(4278190080&d.duration)>>>24,a[r++]=(16711680&d.duration)>>>16,a[r++]=(65280&d.duration)>>>8,a[r++]=255&d.duration,a[r++]=(4278190080&d.size)>>>24,a[r++]=(16711680&d.size)>>>16,a[r++]=(65280&d.size)>>>8,a[r++]=255&d.size;return e.segmentDuration=h,t(C.trun,a)},k=function(t,n){return"audio"===t.type?e(t,n):i(t,n)}}();var z={ftyp:r,mdat:s,moof:p,moov:h,initSegment:function(t){var e,i=r(t),n=h(t);
vendor: 5,020 bytes, line 28
28return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}};var Y=function(t,e,i){return t(i={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&i.path)}},i.exports),i.exports}((function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(this,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})),j=function(){this.init=function(){var t={};this.on=function(e,i){t[e]||(t[e]=[]),t[e]=t[e].concat(i)},this.off=function(e,i){var n;return!!t[e]&&(n=t[e].indexOf(i),t[e]=t[e].slice(),t[e].splice(n,1),n>-1)},this.trigger=function(e){var i,n,a,r;if(i=t[e])if(2===arguments.length)for(a=i.length,n=0;n<a;++n)i[n].call(this,arguments[1]);else{for(r=[],n=arguments.length,n=1;n<arguments.length;++n)r.push(arguments[n]);for(a=i.length,n=0;n<a;++n)i[n].apply(this,r)}},this.dispose=function(){t={}}}};j.prototype.pipe=function(t){return this.on("data",(function(e){t.push(e)})),this.on("done",(function(e){t.flush(e)})),this.on("partialdone",(function(e){t.partialFlush(e)})),this.on("endedtimeline",(function(e){t.endTimeline(e)})),this.on("reset",(function(e){t.reset(e)})),t},j.prototype.push=function(t){this.trigger("data",t)},j.prototype.flush=function(t){this.trigger("done",t)},j.prototype.partialFlush=function(t){this.trigger("partialdone",t)},j.prototype.endTimeline=function(t){this.trigger("endedtimeline",t)},j.prototype.reset=function(t){this.trigger("reset",t)};var V,H,X,q,K,Z,$,J,Q=j,tt=function(t,e){var i=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}}();return i.dataOffset=e,i.compositionTimeOffset=t.pts-t.dts,i.duration=t.duration,i.size=4*t.length,i.size+=t.byteLength,t.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},et=function(t){var e,i,n=[],a=[];for(a.byteLength=0,a.nalCount=0,a.duration=0,n.byteLength=0,e=0;e<t.length;e++)"access_unit_delimiter_rbsp"===(i=t[e]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,a.byteLength+=n.byteLength,a.nalCount+=n.length,a.duration+=n.duration,a.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return a.length&&(!n.duration||n.duration<=0)&&(n.duration=a[a.length-1].duration),a.byteLength+=n.byteLength,a.nalCount+=n.length,a.duration+=n.duration,a.push(n),a},it=function(t){var e,i,n=[],a=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=t[0].pts,n.dts=t[0].dts,a.byteLength=0,a.nalCount=0,a.duration=0,a.pts=t[0].pts,a.dts=t[0].dts,e=0;e<t.length;e++)(i=t[e]).keyFrame?(n.length&&(a.push(n),a.byteLength+=n.byteLength,a.nalCount+=n.nalCount,a.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return a.length&&n.duration<=0&&(n.duration=a[a.length-1].duration),a.byteLength+=n.byteLength,a.nalCount+=n.nalCount,a.duration+=n.duration,a.push(n),a},nt=function(t){var e;return!t[0][0].keyFrame&&t.length>1&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},at=function(t,e){var i,n,a,r,s,o=e||0,d=[];for(i=0;i<t.length;i++)for(r=t[i],n=0;n<r.length;n++)s=r[n],o+=(a=tt(s,o)).size,d.push(a);return d},rt=function(t){var e,i,n,a,r,s,o=0,d=t.byteLength,p=t.nalCount,h=new Uint8Array(d+4*p),l=new DataView(h.buffer);for(e=0;e<t.length;e++)for(a=t[e],i=0;i<a.length;i++)for(r=a[i],n=0;n<r.length;n++)s=r[n],l.setUint32(o,s.data.byteLength),o+=4,h.set(s.data,o),o+=s.data.byteLength;return h},st=[33,16,5,32,164,27],ot=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],dt=function(t){for(var e=[];t--;)e.push(0);return e},pt=function(){if(!V){var t={96e3:[st,[227,64],dt(154),[56]],88200:[st,[231],dt(170),[56]],64e3:[st,[248,192],dt(240),[56]],48e3:[st,[255,192],dt(268),[55,148,128],dt(54),[112]],44100:[st,[255,192],dt(268),[55,163,128],dt(84),[112]],32e3:[st,[255,192],dt(268),[55,234],dt(226),[112]],24e3:[st,[255,192],dt(268),[55,255,128],dt(268),[111,112],dt(126),[224]],16e3:[st,[255,192],dt(268),[55,255,128],dt(268),[111,255],dt(269),[223,108],dt(195),[1,192]],12e3:[ot,dt(268),[3,127,248],dt(268),[6,255,240],dt(268),[13,255,224],dt(268),[27,253,128],dt(259),[56]],11025:[ot,dt(268),[3,127,248],dt(268),[6,255,240],dt(268),[13,255,224],dt(268),[27,255,192],dt(268),[55,175,128],dt(108),[112]],8e3:[ot,dt(268),[3,121,16],dt(47),[7]]};V=function(t){return Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(t,e){return t.concat(e)}),[])),e})
vendor: 10,187 bytes, line 28
28,{})}(t)}return V},ht={"48000_2":new Uint8Array([11,119,0,255,52,135,192,0,32,0,0,0,68,64,22,4,4,4,4,4,4,4,1,1,1,1,1,1,1,0,199,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,239,249,213,243,231,207,159,62,124,249,243,231,207,159,62,63,231,87,207,159,62,124,249,243,231,207,159,62,124,248,0,0,0,0,1,227,109,182,219,109,227,199,143,29,221,221,220,0,0,0,0,0,0,0,0,0,0,0,107,90,214,181,173,107,90,214,181,173,107,90,214,181,173,0,0,0,0,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,26,214,181,173,107,90,214,181,173,107,90,214,181,173,107,64,0,0,0,54,219,109,182,222,60,120,241,221,221,221,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,54,219,109,182,222,60,120,241,221,221,221,192,0,0,0,0,0,0,0,0,0,0,6,181,173,107,90,214,181,173,107,90,214,181,173,107,90,208,0,0,0,13,182,219,109,183,143,30,60,119,119,119,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,141,182,219,109,183,143,30,60,119,119,119,112,0,0,0,0,0,0,0,0,0,0,1,173,107,90,214,181,173,107,90,214,181,173,107,90,214,180,0,0,0,3,109,182,219,109,227,199,143,29,221,221,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,227,109,182,219,109,227,199,143,29,221,221,220,0,0,0,0,0,0,0,0,0,0,0,107,90,214,181,173,107,90,214,181,173,107,90,214,181,173,0,0,0,0,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,26,214,181,173,107,90,214,181,173,107,90,214,181,173,107,64,0,0,0,54,219,109,182,222,60,120,241,221,221,221,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,11]),"48000_6":new Uint8Array([11,119,2,255,63,135,192,0,32,0,0,0,2,0,0,0,4,16,31,186,4,4,1,1,0,64,64,16,16,4,4,24,249,243,231,207,159,62,125,255,58,190,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,199,252,234,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,31,243,171,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,127,206,175,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,241,255,58,190,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,199,252,234,0,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,227,109,182,249,243,90,214,181,173,107,90,214,181,173,104,0,0,0,111,159,62,124,219,109,182,219,199,143,30,60,120,241,227,199,143,30,60,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,243,231,207,155,109,182,219,120,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,124,249,243,230,219,109,182,222,60,120,241,227,199,143,30,60,120,241,227,118,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,217,0,0,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,30,54,219,111,159,53,173,107,90,214,181,173,107,90,214,128,0,0,6,249,243,231,205,182,219,109,188,120,241,227,199,143,30,60,120,241,227,198,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,223,62,124,249,182,219,109,183,143,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,55,207,159,62,109,182,219,109,227,199,143,30,60,120,241,227,199,143,30,55,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,144,0,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,227,109,182,249,243,90,214,181,173,107,90,214,181,173,104,0,0,0,111,159,62,124,219,109,182,219,199,143,30,60,120,241,227,199,143,30,60,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,243,231,207,155,109,182,219,120,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,124,249,243,230,219,109,182,222,60,120,241,227,199,143,30,60,120,241,227,118,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,217,0,0,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,30,54,219,111,159,53,173,107,90,214,181,173,107,90,214,128,0,0,6,249,243,231,205,182,219,109,188,120,241,227,199,143,30,60,120,241,227,198,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,223,62,124,249,182,219,109,183,143,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,55,207,159,62,109,182,219,109,227,199,143,30,60,120,241,227,199,143,30,55,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,144,0,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,227,109,182,249,243,90,214,181,173,107,90,214,181,173,104,0,0,0,111,159,62,124,219,109,182,219,199,143,30,60,120,241,227,199,143,30,60,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,243,231,207,155,109,182,219,120,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,124,249,243,230,219,109,182,222,60,120,241,227,199,143,30,60,120,241,227,118,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,217,0,0,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,30,54,219,111,159,53,173,107,90,214,181,173,107,90,214,128,0,0,6,249,243,231,205,182,219,109,188,120,241,227,199,143,30,60,120,241,227,198,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,223,62,124,249,182,219,109,183,143,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,55,207,159,62,109,182,219,109,227,199,143,30,60,120,241,227,199,143,30,55,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,6])},lt=9e4;Z=function(t,e){return H(K(t,e))},$=function(t,e){return X(q(t),e)},J=function(t,e,i){return q(i?t:t-e)};var ct=lt,ut=(H=function(t){return t*lt},X=function(t,e){return t*e},q=function(t){return t/lt},K=function(t,e){return t/e},Z),ft=$,mt=J,gt=function(t,e,i,n){var a,r,s,o,d=0,p=0,h=0,l=0;if(e.length){a=ut(t.baseMediaDecodeTime,t.samplerate);var c=e[0]&&e[0].sampleCount||1024;if(d=Math.ceil(ct/(t.samplerate/c)),i&&n&&(p=a-Math.max(i,n),l=(h=Math.floor(p/d))*d),!(h<1||l>ct/2)){var u;for("ec-3"===t.codec?(r=ht[t.samplerate+"_"+t.channelcount],u=1536):(r=pt()[t.samplerate],u=1024),r||(r=e[0].data,u=c),s=0;s<h;s++)o=e[0],e.splice(0,0,{data:r,dts:o.dts-d,pts:o.pts-d,sampleCount:u});return t.baseMediaDecodeTime-=Math.floor(ft(l,t.samplerate)),l}}},yt=function(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n.push({size:i.data.byteLength,duration:i.sampleCount||1024});return n},_t=function(t){var e,i,n=0,a=new Uint8Array(function(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e].data.byteLength;return i}(t));for(e=0;e<t.length;e++)i=t[e],a.set(i.data,n),n+=i.data.byteLength;return a},St=ct,bt=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},vt=function(t,e){var i,n=t.minSegmentDts;return e||(n-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===t.type&&(i*=t.samplerate/St,i=Math.floor(i)),i},Tt=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),t.timelineStartInfo.minSegmentPts=t.minSegmentPts,void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},wt=function(t){for(var e=0,i=[],n=0,a=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)n+=255,e++;for(n+=t[e++];255===t[e];)a+=255,e++;a+=t[e++];var r=String.fromCharCode(t[e+3],t[e+4],t[e+5],t[e+6]);4===n&&"GA94"===r&&i.push({payloadType:n,payloadSize:a,payload:t.subarray(e,e+a)}),e+=a,n=0,a=0}return i},kt=function(t){return 181!==t.payload[0]||49!=(t.payload[1]<<8|t.payload[2])||"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])||3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},Ct=function(t,e){var i,n,a,r,s=[];if(!(64&e[0]))return s;for(n=31&e[0],i=0;i<n;i++)r={type:3&e[2+(a=3*i)],pts:t},4&e[a+2]&&(r.ccData=e[a+3]<<8|e[a+4],s.push(r));return s},Pt=4,At=function t(e){e=e||{},t.prototype.init.call(this),this.parse708captions_="boolean"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Gt(0,0),new Gt(0,1),new Gt(1,0),new Gt(1,1)],this.parse708captions_&&(this.cc708Stream_=new Rt({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(
vendor: 6,749 bytes, line 28
28(function(t){t.on("data",this.trigger.bind(this,"data")),t.on("partialdone",this.trigger.bind(this,"partialdone")),t.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(At.prototype=new Q).push=function(t){var e=this;"sei_rbsp"===t.nalUnitType&&wt(t.escapedRBSP).filter((function(t){return t.payloadType===Pt})).map(kt).forEach((function(i){i&&(e.captionPackets_=e.captionPackets_.concat(Ct(t.pts,i)))}))},At.prototype.flushCCStreams=function(t){this.ccStreams_.forEach((function(e){return"flush"===t?e.flush():e.partialFlush()}),this)},At.prototype.flushStream=function(t){this.captionPackets_.length?(this.captionPackets_.forEach((function(t,e){t.presortIndex=e})),this.captionPackets_.sort((function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts})),this.captionPackets_.forEach((function(t){t.type<2?this.dispatchCea608Packet(t):this.dispatchCea708Packet(t)}),this),this.captionPackets_.length=0,this.flushCCStreams(t)):this.flushCCStreams(t)},At.prototype.flush=function(){return this.flushStream("flush")},At.prototype.partialFlush=function(){return this.flushStream("partialFlush")},At.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(t){t.reset()}))},At.prototype.dispatchCea608Packet=function(t){this.setsTextOrXDSActive(t)?this.activeCea608Channel_[t.type]=null:this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},At.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},At.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)},At.prototype.setsTextOrXDSActive=function(t){return 256==(28928&t.ccData)||4138==(30974&t.ccData)||6186==(30974&t.ccData)},At.prototype.dispatchCea708Packet=function(t){this.parse708captions_&&this.cc708Stream_.push(t)};var Et={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},xt=function(t){return 32<=t&&t<=127||160<=t&&t<=255},Ut=function(t){this.windowNum=t,this.reset()};Ut.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Ut.prototype.getText=function(){return this.rows.join("\\n")},Ut.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ut.prototype.newLine=function(t){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(t),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ut.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ut.prototype.addText=function(t){this.rows[this.rowIdx]+=t},Ut.prototype.backspace=function(){if(!this.isEmpty()){var t=this.rows[this.rowIdx];this.rows[this.rowIdx]=t.substr(0,t.length-1)}};var Mt=function(t,e,i){this.serviceNum=t,this.text="",this.currentWindow=new Ut(-1),this.windows=[],this.stream=i,"string"==typeof e&&this.createTextDecoder(e)};Mt.prototype.init=function(t,e){this.startPts=t;for(var i=0;i<8;i++)this.windows[i]=new Ut(i),"function"==typeof e&&(this.windows[i].beforeRowOverflow=e)},Mt.prototype.setCurrentWindow=function(t){this.currentWindow=this.windows[t]},Mt.prototype.createTextDecoder=function(t){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(t)}catch(e){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+t+" encoding. "+e})}};var Rt=function t(e){e=e||{},t.prototype.init.call(this);var i,n=this,a=e.captionServices||{},r={};Object.keys(a).forEach((function(t){i=a[t],/^SERVICE/.test(t)&&(r[t]=i.encoding)})),this.serviceEncodings=r,this.current708Packet=null,this.services={},this.push=function(t){3===t.type?(n.new708Packet(),n.add708Bytes(t)):(null===n.current708Packet&&n.new708Packet(),n.add708Bytes(t))}};Rt.prototype=new Q,Rt.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Rt.prototype.add708Bytes=function(t){var e=t.ccData,i=e>>>8,n=255&e;this.current708Packet.ptsVals.push(t.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},Rt.prototype.push708Packet=function(){var t=this.current708Packet,e=t.data,i=null,n=null,a=0,r=e[a++];for(t.seq=r>>6,t.sizeCode=63&r;a<e.length;a++)n=31&(r=e[a++]),7==(i=r>>5)&&n>0&&(i=r=e[a++]),this.pushServiceBlock(i,a,n),n>0&&(a+=n-1)},Rt.prototype.pushServiceBlock=function(t,e,i){var n,a=e,r=this.current708Packet.data,s=this.services[t];for(s||(s=this.initService(t,a));a<e+i&&a<r.length;a++)n=r[a],xt(n)?a=this.handleText(a,s):24===n?a=this.multiByteCharacter(a,s):16===n?a=this.extendedCommands(a,s):128<=n&&n<=135?a=this.setCurrentWindow(a,s):152<=n&&n<=159?a=this.defineWindow(a,s):136===n?a=this.clearWindows(a,s):140===n?a=this.deleteWindows(a,s):137===n?a=this.displayWindows(a,s):138===n?a=this.hideWindows(a,s):139===n?a=this.toggleWindows(a,s):151===n?a=this.setWindowAttributes(a,s):144===n?a=this.setPenAttributes(a,s):145===n?a=this.setPenColor(a,s):146===n?a=this.setPenLocation(a,s):143===n?s=this.reset(a,s):8===n?s.currentWindow.backspace():12===n?s.currentWindow.clearText():13===n?s.currentWindow.pendingNewLine=!0:14===n?s.currentWindow.clearText():141===n&&a++},Rt.prototype.extendedCommands=function(t,e){var i=this.current708Packet.data[++t];return xt(i)&&(t=this.handleText(t,e,{isExtended:!0})),t},Rt.prototype.getPts=function(t){return this.current708Packet.ptsVals[Math.floor(t/2)]},Rt.prototype.initService=function(t,e){var i,n,a=this;return(i="SERVICE"+t)in this.serviceEncodings&&(n=this.serviceEncodings[i]),this.services[t]=new Mt(t,n,a),this.services[t].init(this.getPts(e),(function(e){a.flushDisplayed(e,a.services[t])})
vendor: 10,372 bytes, line 28
28),this.services[t]},Rt.prototype.handleText=function(t,e,i){var n,a,r=i&&i.isExtended,s=i&&i.isMultiByte,o=this.current708Packet.data,d=r?4096:0,p=o[t],h=o[t+1],l=e.currentWindow;return e.textDecoder_&&!r?(s?(a=[p,h],t++):a=[p],n=e.textDecoder_.decode(new Uint8Array(a))):n=function(t){var e=Et[t]||t;return 4096&t&&t===e?"":String.fromCharCode(e)}(d|p),l.pendingNewLine&&!l.isEmpty()&&l.newLine(this.getPts(t)),l.pendingNewLine=!1,l.addText(n),t},Rt.prototype.multiByteCharacter=function(t,e){var i=this.current708Packet.data,n=i[t+1],a=i[t+2];return xt(n)&&xt(a)&&(t=this.handleText(++t,e,{isMultiByte:!0})),t},Rt.prototype.setCurrentWindow=function(t,e){var i=7&this.current708Packet.data[t];return e.setCurrentWindow(i),t},Rt.prototype.defineWindow=function(t,e){var i=this.current708Packet.data,n=i[t],a=7&n;e.setCurrentWindow(a);var r=e.currentWindow;return n=i[++t],r.visible=(32&n)>>5,r.rowLock=(16&n)>>4,r.columnLock=(8&n)>>3,r.priority=7&n,n=i[++t],r.relativePositioning=(128&n)>>7,r.anchorVertical=127&n,n=i[++t],r.anchorHorizontal=n,n=i[++t],r.anchorPoint=(240&n)>>4,r.rowCount=15&n,n=i[++t],r.columnCount=63&n,n=i[++t],r.windowStyle=(56&n)>>3,r.penStyle=7&n,r.virtualRowCount=r.rowCount+1,t},Rt.prototype.setWindowAttributes=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.winAttr;return n=i[++t],a.fillOpacity=(192&n)>>6,a.fillRed=(48&n)>>4,a.fillGreen=(12&n)>>2,a.fillBlue=3&n,n=i[++t],a.borderType=(192&n)>>6,a.borderRed=(48&n)>>4,a.borderGreen=(12&n)>>2,a.borderBlue=3&n,n=i[++t],a.borderType+=(128&n)>>5,a.wordWrap=(64&n)>>6,a.printDirection=(48&n)>>4,a.scrollDirection=(12&n)>>2,a.justify=3&n,n=i[++t],a.effectSpeed=(240&n)>>4,a.effectDirection=(12&n)>>2,a.displayEffect=3&n,t},Rt.prototype.flushDisplayed=function(t,e){for(var i=[],n=0;n<8;n++)e.windows[n].visible&&!e.windows[n].isEmpty()&&i.push(e.windows[n].getText());e.endPts=t,e.text=i.join("\\n\\n"),this.pushCaption(e),e.startPts=t},Rt.prototype.pushCaption=function(t){""!==t.text&&(this.trigger("data",{startPts:t.startPts,endPts:t.endPts,text:t.text,stream:"cc708_"+t.serviceNum}),t.text="",t.startPts=t.endPts)},Rt.prototype.displayWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&(e.windows[a].visible=1);return t},Rt.prototype.hideWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&(e.windows[a].visible=0);return t},Rt.prototype.toggleWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&(e.windows[a].visible^=1);return t},Rt.prototype.clearWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&e.windows[a].clearText();return t},Rt.prototype.deleteWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&e.windows[a].reset();return t},Rt.prototype.setPenAttributes=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.penAttr;return n=i[++t],a.textTag=(240&n)>>4,a.offset=(12&n)>>2,a.penSize=3&n,n=i[++t],a.italics=(128&n)>>7,a.underline=(64&n)>>6,a.edgeType=(56&n)>>3,a.fontStyle=7&n,t},Rt.prototype.setPenColor=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.penColor;return n=i[++t],a.fgOpacity=(192&n)>>6,a.fgRed=(48&n)>>4,a.fgGreen=(12&n)>>2,a.fgBlue=3&n,n=i[++t],a.bgOpacity=(192&n)>>6,a.bgRed=(48&n)>>4,a.bgGreen=(12&n)>>2,a.bgBlue=3&n,n=i[++t],a.edgeRed=(48&n)>>4,a.edgeGreen=(12&n)>>2,a.edgeBlue=3&n,t},Rt.prototype.setPenLocation=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.penLoc;return e.currentWindow.pendingNewLine=!0,n=i[++t],a.row=15&n,n=i[++t],a.column=63&n,t},Rt.prototype.reset=function(t,e){var i=this.getPts(t);return this.flushDisplayed(i,e),this.initService(e.serviceNum,t)};var It={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Dt=function(t){return t=It[t]||t,String.fromCharCode(t).replace(/[\\x00]/g,"")},Ot=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Lt=function(){for(var t=[],e=15;e--;)t.push("");return t},Bt=function(){for(var t=[],e=15;e--;)t[e]=0;return t},Gt=function t(e,i,n){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,i,n,a,r;if((e=32639&t.ccData)!==this.lastControlCode_){if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),n=e>>>8,a=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,i=this.displayedIndent_,this.displayedIndent_=this.nonDisplayedIndent_,this.nonDisplayedIndent_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=Lt(),this.displayedIndent_=Bt();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Lt(),this.nonDisplayedIndent_=Bt();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=Lt(),this.displayedIndent_=Bt()),this.mode_="paintOn",this.startPts_=t.pts;else{if(!Boolean(this.mode_))return;if(this.isSpecialCharacter(n,a))r=Dt((n=(3&n)<<8)|a),this[this.mode_](t.pts,r),this.column_++;else if(this.isExtCharacter(n,a))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),r=Dt((n=(3&n)<<8)|a),this[this.mode_](t.pts,r),this.column_++;else if(this.isMidRowCode(n,a))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14&~a||this.addFormatting(t.pts,["i"]),1&~a||this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,a)){var s=3&a;this.column_+=s,this.incrementIdentation(s)}else if(this.isPAC(n,a)){var o=Ot.indexOf(7968&e);"rollUp"===this.mode_&&(o-this.rollUpRows_+1<0&&(o=this.rollUpRows_-1),this.setRollUp(t.pts,o)),o!==this.row_&&(this.clearFormatting(t.pts),this.changeRow(o)),1&a&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16&~e||(this.column_=4*((14&e)>>1),"popOn"===this.mode_?this.nonDisplayedIndent_[this.row_]=this.column_:"rollUp"===this.mode_&&(this.displayedIndent_[this.row_]=this.column_)),this.isColorPAC(a)&&(14&~a||this.addFormatting(t.pts,["i"]))}else this.isNormalChar(n)&&(r=Dt(n),0!==a&&(r+=Dt(a)),this[this.mode_](t.pts,r),this.column_+=r.length)}}else this.lastControlCode_=null}};Gt.prototype=new Q,Gt.prototype.flushDisplayed=function(t){for(var e=0;e<this.displayed_.length;e++){var i=this.displayed_[e];i&&i.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:i,stream:this.name_,position:{row:e,column:this.displayedIndent_[e]}})}},Gt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Lt(),this.nonDisplayed_=Lt(),this.displayedIndent_=Bt(),this.nonDisplayedIndent_=Bt(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Gt.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_,this.TAB_OFFSET_1_=33,this.TAB_OFFSET_2_=34,this.TAB_OFFSET_3_=35},Gt.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&e>=48&&e<=63},Gt.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&e>=32&&e<=63},Gt.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&e>=32&&e<=47},Gt.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&e>=this.TAB_OFFSET_1_&&e<=this.TAB_OFFSET_3_},Gt.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&e>=64&&e<=127},Gt.prototype.isColorPAC=function(t){return t>=64&&t<=79||t>=96&&t<=127},Gt.prototype.isNormalChar=function(t){return t>=32&&t<=127},Gt.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=Lt(),this.displayed_=Lt(),this.displayedIndent_=Bt(),this.nonDisplayedIndent_=Bt()),void 0!==e&&e!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[e-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},Gt.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce(
28(function(t,e){return t+"<"+e+">"}),"");this[this.mode_](t,i)},Gt.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce((function(t,e){return t+"<
vendor: 6,458 bytes, line 28
28/"+e+">"}),"");this.formatting_=[],this[this.mode_](t,e)}},Gt.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},Gt.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},Gt.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},Gt.prototype.paintOn=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},Gt.prototype.changeRow=function(t){if("rollUp"===this.mode_){var e=this.row_-this.topRow_+1;this.topRow_=t-e+1;var i=this.displayed_,n=this.displayedIndent_;this.displayed_=Lt(),this.displayedIndent_=Bt();for(var a=0;a<e;a++)t-a>=0&&(this.displayed_[t-a]=i[this.row_-a],this.displayedIndent_[t-a]=n[this.row_-a])}this.row_=t},Gt.prototype.incrementIdentation=function(t){"popOn"===this.mode_?this.nonDisplayedIndent_[this.row_]+=t:"rollUp"===this.mode_&&(this.displayedIndent_[this.row_]+=t)};var Wt={CaptionStream:At,Cea608Stream:Gt,Cea708Stream:Rt},Ft={H264_STREAM_TYPE:27,H265_STREAM_TYPE:36,ADTS_STREAM_TYPE:15,AC3_STREAM_TYPE:129,EC3_STREAM_TYPE:135,METADATA_STREAM_TYPE:21},Nt=4294967296,zt="shared",Yt=function(t,e){var i=1;for(t>e&&(i=-1);Math.abs(e-t)>Nt;)t+=8589934592*i;return t},jt=function t(e){var i,n;t.prototype.init.call(this),this.type_=e||zt,this.push=function(t){this.type_!==zt&&t.type!==this.type_||(void 0===t.dts&&void 0===t.pts||(void 0===n&&(n=t.dts),t.dts=Yt(t.dts,n),t.pts=Yt(t.pts,n),i=t.dts),this.trigger("data",t))},this.flush=function(){n=i,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,i=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};jt.prototype=new Q;var Vt,Ht=jt,Xt=Nt,qt=function(t,e,i){if(!t)return-1;for(var n=i;n<t.length;n++)if(t[n]===e)return n;return-1},Kt=0,Zt=3,$t=function(t,e,i){var n,a="";for(n=e;n<i;n++)a+="%"+("00"+t[n].toString(16)).slice(-2);return a},Jt=function(t,e,i){var n=decodeURIComponent($t(t,e,i));return"\\0"===n[n.length-1]&&(n=n.slice(0,-1)),n},Qt=function(t,e,i){return unescape($t(t,e,i))},te=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},ee=function(t){return t.data[0]===Zt?Jt:t.data[0]===Kt?Qt:void 0},ie={APIC:function(t){var e,i,n=1;t.data[0]===Zt&&((e=qt(t.data,0,n))<0||(t.mimeType=Qt(t.data,n,e),n=e+1,t.pictureType=t.data[n],n++,(i=qt(t.data,0,n))<0||(t.description=Jt(t.data,n,i),n=i+1,"--\\x3e"===t.mimeType?t.url=Qt(t.data,n,t.data.length):t.pictureData=t.data.subarray(n,t.data.length))))},"T*":function(t){var e=ee(t);e&&(t.value=e(t.data,1,t.data.length).replace(/\\0*$/,""),t.data=t.value,t.values=t.value.split("\\0"))},TXXX:function(t){var e,i=ee(t);i&&-1!==(e=qt(t.data,0,1))&&(t.description=i(t.data,1,e),t.value=i(t.data,e+1,t.data.length).replace(/\\0*$/,""),t.data=t.value)},"W*":function(t){t.url=Qt(t.data,0,t.data.length).replace(/\\0.*$/,"")},WXXX:function(t){var e;t.data[0]===Zt&&-1!==(e=qt(t.data,0,1))&&(t.description=Jt(t.data,1,e),t.url=Qt(t.data,e+1,t.data.length).replace(/\\0.*$/,""))},PRIV:function(t){var e;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=Qt(t.data,0,e);break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}},ne={parseId3Frames:function(t){var e,i=10,n=0,a=[];if(!(t.length<10||t[0]!=="I".charCodeAt(0)||t[1]!=="D".charCodeAt(0)||t[2]!=="3".charCodeAt(0))){n=te(t.subarray(6,10)),n+=10,64&t[5]&&(i+=4,i+=te(t.subarray(10,14)),n-=te(t.subarray(16,20)));do{if((e=te(t.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(t[i],t[i+1],t[i+2],t[i+3]),data:t.subarray(i+10,i+e+10)};r.key=r.id,ie[r.id]?ie[r.id](r):"T"===r.id[0]?ie["T*"](r):"W"===r.id[0]&&ie["W*"](r),a.push(r),i+=10,i+=e}while(i<n);return a}},parseSyncSafeInteger:te,frameParsers:ie};(Vt=function(t){var e,i={descriptor:t&&t.descriptor},n=0,a=[],r=0;if(Vt.prototype.init.call(this),this.dispatchType=Ft.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(e=0;e<i.descriptor.length;e++)this.dispatchType+=("00"+i.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,i,s,o,d;if("timed-metadata"===t.type)if(t.dataAlignmentIndicator&&(r=0,a.length=0),0===a.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(a.push(t),r+=t.data.byteLength,1===a.length&&(n=ne.parseSyncSafeInteger(t.data.subarray(6,10)),n+=10),!(r<n)){for(e={data:new Uint8Array(n),frames:[],pts:a[0].pts,dts:a[0].dts},d=0;d<n;)e.data.set(a[0].data.subarray(0,n-d),d),d+=a[0].data.byteLength,r-=a[0].data.byteLength,a.shift();i=10,64&e.data[5]&&(i+=4,i+=ne.parseSyncSafeInteger(e.data.subarray(10,14)),n-=ne.parseSyncSafeInteger(e.data.subarray(16,20)));do{if((s=ne.parseSyncSafeInteger(e.data.subarray(i+4,i+8)))<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if((o={id:String.fromCharCode(e.data[i],e.data[i+1],e.data[i+2],e.data[i+3]),data:e.data.subarray(i+10,i+s+10)}).key=o.id,ne.frameParsers[o.id]?ne.frameParsers[o.id](o):"T"===o.id[0]?ne.frameParsers["T*"](o):"W"===o.id[0]&&ne.frameParsers["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var p=o.data,h=(1&p[3])<<30|p[4]<<22|p[5]<<14|p[6]<<6|p[7]>>>2;h*=4,h+=3&p[7],o.timeStamp=h,void 0===e.pts&&void 0===e.dts&&(e.pts=o.timeStamp,e.dts=o.timeStamp),this.trigger("timestamp",o)}e.frames.push(o),i+=10,i+=s}while(i<n);this.trigger("data",e)}}}).prototype=new Q;var ae,re,se,oe,de=Vt,pe=Xt,he=Ht,le=188;(re=function(){var t=new Uint8Array(le),e=0;re.prototype.init.call(this),this.push=function(i){var n,a=0,r=le;for(e?((n=new Uint8Array(i.byteLength+e)).set(t.subarray(0,e)),n.set(i,e),e=0):n=i;r<n.byteLength;)71!==n[a]||71!==n[r]?(a++,r++):(this.trigger("data",n.subarray(a,r)),a+=le,r+=le);a<n.byteLength&&(t.set(n.subarray(a),0),e=n.byteLength-a)},this.flush=function(){e===le&&71===t[0]&&(this.trigger("data",t),e=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){e=0,this.trigger("reset")}}).prototype=new Q,(se=function(){var t,e,i,n;se.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,t=function(t,n){var a=0;
28n.payloadUnitStartIndicator&&(a+=t[a]+1),"pat"===n.type?e(t.subarray(a),n):i(t.subarray(a),n)},e=function(t,e){e.section_number=t[7],e.last_section_number=t[8],n.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=n.pmtPid},i=function(t,e){var i,a;if(1&t[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&t[1])<<8|t[2])-4,a=12+((15&t[10])<<8|t[11]);a<i;){var r=t[a],s=(31&t[a+1])<<8|t[a+2];[Ft.H264_STREAM_TYPE,Ft.H265_STREAM_TYPE].indexOf(r)>-1&&null===n.programMapTable.video?n.programMapTable.video={pid:s,streamType:r,codec:ce[r]}:r!==Ft.ADTS_STREAM_TYPE&&r!==Ft.AC3_STREAM_TYPE&&r!==Ft.EC3_STREAM_TYPE||null!==n.programMapTable.audio?r===Ft.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][s]=r):n.programMapTable.audio={pid:s,streamType:r,codec:ce[r]},a+=5+((15&t[a+3])<<8|t[a+4])}e.programMapTable=n.programMapTable}},this.push=function(e){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&e[1]),i.pid=31&e[1],i.pid<<=8,i.pid|=e[2],(48&e[3])>>>4>1&&(n+=e[n]+1),0===i.pid)i.type="pat",t(e.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",t(e.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,n,i]):this.processPes_(e,n,i)},this.processPes_=function(t,e,i){this.programMapTable.video&&i.pid===this.programMapTable.video.pid?i.streamType=this.programMapTable.video.streamType:this.programMapTable.audio&&i.pid===this.programMapTable.audio.pid?i.streamType=this.programMapTable.audio.streamType:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),i.data.length>0&&this.trigger("data",i)}}).prototype=new Q,se.STREAM_TYPES={h264:27,adts:15},(oe=function(){var t,e=this,i=!1,n={data:[],size:0},a={data:[],size:0},r={data:[],size:0},s={video:!1,audio:!1,metadata:!1},o={video:[],audio:[],"timed-metadata":[]},d=!0,p=function(t,e,i){var n,a=new Uint8Array(t.size),r={type:e,codec:t.codec},d=0,p=0,h=!1;if(t.data.length&&!(t.size<9)){for(r.trackId=t.data[0].pid,d=0;d<t.data.length;d++)n=t.data[d],a.set(n.data,p),p+=n.data.byteLength;if(function(t,e){var i,n=t[0]<<16|t[1]<<8|t[2];e.data=new Uint8Array,1===n&&(e.packetLength=6+(t[4]<<8|t[5]),e.dataAlignmentIndicator=!!(4&t[6]),192&(i=t[7])&&(e.pts=(14&t[9])<<27|(255&t[10])<<20|(254&t[11])<<12|(255&t[12])<<5|(254&t[13])>>>3,e.pts*=4,e.pts+=(6&t[13])>>>1,e.dts=e.pts,64&i&&(e.dts=(14&t[14])<<27|(255&t[15])<<20|(254&t[16])<<12|(255&t[17])<<5|(254&t[18])>>>3,e.dts*=4,e.dts+=(6&t[18])>>>1)),s[e.type]||(e.dts>e.pts?e.dts=0:s[e.type]=!0),e.data=t.subarray(9+t[8]))}(a,r),h="video"===e||r.packetLength<=t.size,(i||h)&&(t.size=0,t.data.length=0),h)o[e].push(r);else{var l=new ArrayBuffer(t.size),c=0;t.data.forEach((function(t){var e=t.data;t.data=new Uint8Array(l,c,e.length),t.data.set(e),c+=t.data.length}))}}};oe.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var t,e;switch(s.streamType){case Ft.H264_STREAM_TYPE:case Ft.H265_STREAM_TYPE:(t=n).codec=ce[s.streamType],e="video";break;case Ft.ADTS_STREAM_TYPE:case Ft.AC3_STREAM_TYPE:case Ft.EC3_STREAM_TYPE:e="audio",(t=a).codec=ce[s.streamType];break;case Ft.METADATA_STREAM_TYPE:t=r,e="timed-metadata";break;default:return}s.payloadUnitStartIndicator&&p(t,e,!0),t.data.push(s),t.size+=s.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(t=s.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video.pid,codec:t.video.codec,type:"video"}),null!==t.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio.pid,codec:t.audio.codec,type:"audio"}),i=!0,e.trigger("data",n)}})[s.type]()},this.reset=function(){n.size=0,n.data.length=0,a.size=0,a.data.length=0,this.trigger("reset")},this.flushStreams_=function(){p(n,"video"),p(a,"audio"),p(r,"timed-metadata"),d&&o.video.length>0&&o.audio.length>0&&(d=!1,this.handleInitialRollover_()),o.video.forEach((function(t){e.trigger("data",t)})),o.audio.forEach((function(t){e.trigger("data",t)})),o["timed-metadata"].forEach((function(t){e.trigger("data",t)})
vendor: 10,495 bytes, line 28
28),o.video=[],o.audio=[],o["timed-metadata"]=[]},this.handleInitialRollover_=function(){var t=o.video[0].dts>o.video[o.video.length-1].dts,e=o.audio[0].dts>o.audio[o.audio.length-1].dts;if(e&&!t)for(;0<o.audio.length&&o.audio[0].dts>pe;)o.audio[0].dts=o.audio[0].pts=0;else if(!e&&t)for(;0<o.video.length&&o.video[0].dts>pe;)o.video[0].dts=o.video[0].pts=0},this.flush=function(){if(!i&&t){var n={type:"metadata",tracks:[]};null!==t.video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video.pid,codec:t.video.codec,type:"video"}),null!==t.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio.pid,codec:t.audio.codec,type:"audio"}),e.trigger("data",n)}i=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new Q;var ce=((ae={})[Ft.H264_STREAM_TYPE]="avc",ae[Ft.H265_STREAM_TYPE]="hevc",ae[Ft.ADTS_STREAM_TYPE]="adts",ae[Ft.AC3_STREAM_TYPE]="ac3-family",ae[Ft.EC3_STREAM_TYPE]="ec-3",ae),ue={PAT_PID:0,MP2T_PACKET_LENGTH:le,TransportPacketStream:re,TransportParseStream:se,ElementaryStream:oe,TimestampRolloverStream:he,CaptionStream:Wt.CaptionStream,Cea608Stream:Wt.Cea608Stream,Cea708Stream:Wt.Cea708Stream,MetadataStream:de};for(var fe in Ft)Ft.hasOwnProperty(fe)&&(ue[fe]=Ft[fe]);var me,ge=ue,ye=ct,_e=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(me=function(t){var e,i=0;me.prototype.init.call(this),this.skipWarn_=function(t,e){this.trigger("log",{level:"warn",message:"adts skiping bytes "+t+" to "+e+" in frame "+i+" outside syncword"})},this.push=function(n){var a,r,s,o,d,p=0,h=!n.codec||"adts"===n.codec;if(t||(i=0),"audio"===n.type&&h){var l;for(e&&e.length?(s=e,(e=new Uint8Array(s.byteLength+n.data.byteLength)).set(s),e.set(n.data,s.byteLength)):e=n.data;p+7<e.length;)if(255===e[p]&&240==(246&e[p+1])){if("number"==typeof l&&(this.skipWarn_(l,p),l=null),r=2*(1&~e[p+1]),a=(3&e[p+3])<<11|e[p+4]<<3|(224&e[p+5])>>5,d=(o=1024*(1+(3&e[p+6])))*ye/_e[(60&e[p+2])>>>2],e.byteLength-p<a)break;this.trigger("data",{pts:n.pts+i*d,dts:n.dts+i*d,sampleCount:o,audioobjecttype:1+(e[p+2]>>>6&3),channelcount:(1&e[p+2])<<2|(192&e[p+3])>>>6,samplerate:_e[(60&e[p+2])>>>2],samplingfrequencyindex:(60&e[p+2])>>>2,samplesize:16,data:e.subarray(p+7+r,p+a)}),i++,p+=a}else"number"!=typeof l&&(l=p),p++;"number"==typeof l&&(this.skipWarn_(l,p),l=null),e=e.subarray(p)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){e=void 0,this.trigger("reset")},this.endTimeline=function(){e=void 0,this.trigger("endedtimeline")}}).prototype=new Q;var Se=me,be=[48e3,44100,32e3],ve=[24e3,22050,16e3],Te=[1,2,3,6],we=[2,1,2,3,3,4,4,5],ke=function(t,e){if(e+8>t.length)return null;if(2935!=(t[e]<<8|t[e+1]))return null;var i=1+((7&t[e+2])<<8|t[e+3])<<1;if(e+i>t.length)return null;var n,a,r=t[e+4],s=t[e+5],o=r>>6&3;3===o?(n=ve[r>>4&3],a=3):(n=be[o],a=r>>4&3);var d=(14&r)>>1,p=1&r,h=Te[a];return{frameLength:i,sampleRate:n,channelCount:we[d]+p,sampleCount:256*h,numBlocks:h,acmod:d,lfeon:p,bsid:s>>3&31,fscod:o}},Ce=function t(){var e;t.prototype.init.call(this),this.push=function(t){var i,n,a=0,r=0,s=!t.codec||"ac3-family"===t.codec||"ec-3"===t.codec;if("audio"===t.type&&s){if(e){var o=e;(e=new Uint8Array(o.byteLength+t.data.byteLength)).set(o),e.set(t.data,o.byteLength)}else e=t.data;for(;a+8<e.length;)if(2935==(e[a]<<8|e[a+1])){if(!(i=ke(e,a)))break;n=9e4*i.sampleCount/i.sampleRate,this.trigger("data",{pts:t.pts+r*n,dts:t.dts+r*n,sampleCount:i.sampleCount,channelcount:i.channelCount,samplerate:i.sampleRate,samplesize:16,codec:i.bsid>10?"ec-3":"ac-3",acmod:i.acmod,lfeon:i.lfeon,bsid:i.bsid,fscod:i.fscod,data:e.subarray(a,a+i.frameLength)}),r++,a+=i.frameLength}else a++;e=a<e.length?e.subarray(a):void 0}},this.flush=function(){this.trigger("done")}};Ce.prototype=new Q;var Pe,Ae,Ee,xe=Ce,Ue=function(t){var e=t.byteLength,i=0,n=0;this.length=function(){return 8*e},this.bitsAvailable=function(){return 8*e+n},this.loadWord=function(){var a=t.byteLength-e,r=new Uint8Array(4),s=Math.min(4,e);if(0===s)throw new Error("no bytes available");r.set(t.subarray(a,a+s)),i=new DataView(r.buffer).getUint32(0),n=8*s,e-=s},this.skipBits=function(t){var a;n>t?(i<<=t,n-=t):(t-=n,t-=8*(a=Math.floor(t/8)),e-=a,this.loadWord(),i<<=t,n-=t)},this.readBits=function(t){var a=Math.min(n,t),r=i>>>32-a;return(n-=a)>0?i<<=a:e>0&&this.loadWord(),(a=t-a)>0?r<<a|this.readBits(a):r},this.skipLeadingZeros=function(){var t;for(t=0;t<n;++t)if(i&2147483648>>>t)return i<<=t,n-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},Me=[{chroma_format_idc:0,separate_colour_plane_flag:0,SubWidthC:1,SubHeightC:1},{chroma_format_idc:1,separate_colour_plane_flag:0,SubWidthC:2,SubHeightC:2},{chroma_format_idc:2,separate_colour_plane_flag:0,SubWidthC:2,SubHeightC:1},{chroma_format_idc:3,separate_colour_plane_flag:0,SubWidthC:1,SubHeightC:1},{chroma_format_idc:4,separate_colour_plane_flag:1,SubWidthC:1,SubHeightC:1}],Re=function(t,e,i,n){var a,r=0;if(i[e]=0,0!==e&&(r=t.readBits(1)),r)for(e===n&&t.skipUnsignedExpGolomb(),t.skipBits(1),t.skipUnsignedExpGolomb(),a=0;a<=i[e-1];a++)t.readBits(1)||t.skipBits(1);else{var s=t.readUnsignedExpGolomb(),o=t.readUnsignedExpGolomb();for(a=0;a<s;a++)t.skipUnsignedExpGolomb(),t.skipBits(1);for(a=0;a<o;a++)t.skipUnsignedExpGolomb(),t.skipBits(1)}},Ie=function(t,e,i,n){for(var a=0;a<i;a++)t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),n&&(t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),t.skipBits(1)},De=function(t,e){var i=0;return t.readBits(1)&&255===t.readUnsignedByte()&&t.skipBits(32),t.readBits(1)&&t.skipBits(1),t.readBits(1)&&(t.skipBits(4),t.readBits(1)&&t.skipBits(24)),t.readBits(1)&&(t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),t.skipBits(3),t.readBits(1)&&(t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),t.readBits(1)&&(t.skipBits(64),t.readBits(1)&&t.skipUnsignedExpGolomb(),t.readBits(1)&&function(t,e,i){var n=0,a=0,r=0;e&&(a=t.readBits(1),r=t.readBits(1),(a||r)&&((n=t.readBits(1))&&t.skipBits(19),t.skipBits(8),n&&t.skipBits(4),t.skipBits(15)));for(var s=0;s<=i;s++){var o=1,d=0,p=0;t.readBits(1)||(o=t.readBits(1)),o?t.skipUnsignedExpGolomb():d=t.readBits(1),d||(p=t.readUnsignedExpGolomb()),a&&Ie(t,0,p+1,n),r&&Ie(t,0,p+1,n)}}(t,1,e)),t.readBits(1)&&(t.skipBits(3),i=t.readUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),{min_spatial_segmentation_idc:i}},Oe=function(t){var e,i,n=new Ue(t),a=[],r=0,s=0,o=0,d=0,p=0,h=0,l=(i=n.readUnsignedByte())>>>1&7,c=1&i,u=function(t,e,i){var n,a,r,s,o,d,p,h=[],l=0,c=0;if(e)for(r=(a=t.readUnsignedByte())>>>6&3,s=a>>>5&1,o=31&a,d=t.readBits(32),n=0;n<6;n++)h.push(t.readUnsignedByte());for(p=t.readUnsignedByte(),n=0;n<i;n++)l|=t.readBits(1)<<n,c|=t.readBits(1)<<n;if(i>0)for(n=i;n<8;n++)t.skipBits(2);for(n=0;n<i;n++)l&1<<n&&t.skipBits(88),c&1<<n&&t.skipBits(8);return{general_profile_space:r,general_tier_flag:s,general_profile_idc:o,general_profile_compatibility_flags:d,general_constraint_indicator_flags_bytes:h,general_level_idc:p}}(n,1,l);n.skipUnsignedExpGolomb();var f=n.readUnsignedExpGolomb();3===f&&(r=n.readBits(1));var m=n.readUnsignedExpGolomb(),g=n.readUnsignedExpGolomb();n.readBits(1)&&(s=n.readUnsignedExpGolomb(),o=n.readUnsignedExpGolomb(),d=n.readUnsignedExpGolomb(),p=n.readUnsignedExpGolomb());var y=n.readUnsignedExpGolomb(),_=n.readUnsignedExpGolomb(),S=n.readUnsignedExpGolomb();for(e=n.readBits(1)?0:l;e<=l;e++)n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb();n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.readBits(1)&&n.readBits(1)&&function(t){for(var e=0;e<4;e++)for(var i=3===e?3:1,n=0;n<6;n+=i)if(t.readBits(1))t.skipUnsignedExpGolomb();else{e>1&&t.readExpGolomb();for(var a=Math.min(64,1<<4+(e<<1)),r=0;r<a;r++)t.readExpGolomb()}}(n),n.skipBits(1),n.skipBits(1),n.readBits(1)&&(n.skipBits(8),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipBits(1));var b,v=n.readUnsignedExpGolomb();for(e=0;e<v;e++)Re(n,e,a,v);if(n.readBits(1)){var T=n.readUnsignedExpGolomb();for(e=0;e<T;e++)n.skipBits(S+4),n.skipBits(1)}for(n.skipBits(2),n.readBits(1)&&(h=De(n,l).min_spatial_segmentation_idc),e=0;e<Me.length;e++){var w=Me[e];w.chroma_format_idc===f&&w.separate_colour_plane_flag===r&&(b=w)}return{width:m-b.SubWidthC*(o+s),height:g-b.SubHeightC*(p+d),general_profile_space:u.general_profile_space,general_tier_flag:u.general_tier_flag,general_profile_idc:u.general_profile_idc,general_profile_compatibility_flags:u.general_profile_compatibility_flags,general_constraint_indicator_flags_bytes:u.general_constraint_indicator_flags_bytes,general_level_idc:u.general_level_idc,min_spatial_segmentation_idc:h,chroma_format_idc:f,bit_depth_luma_minus8:y,bit_depth_chroma_minus8:_,sps_max_sub_layers_minus1:l,sps_temporal_id_nesting_flag:c}};(Ae=function(){var t,e,i=0;Ae.prototype.init.call(this),this.push=function(n){var a;e?((a=new Uint8Array(e.byteLength+n.data.byteLength)).set(e),a.set(n.data,e.byteLength),e=a):e=n.data;for(var r=e.byteLength;i<r-3;i++)if(1===e[i+2]){t=i+5;break}for(;t<r;)switch(e[t]){case 0:if(0!==e[t-1]){t+=2;break}if(0!==e[t-2]){t++;break}i+3!==t-2&&this.trigger("data",e.subarray(i+3,t-2));do{t++}while(1!==e[t]&&t<r);i=t-2,t+=3;break;case 1:if(0!==e[t-1]||0!==e[t-2]){t+=3;break}this.trigger("data",e.subarray(i+3,t-2)),i=t-2,t+=3;break;default:t+=3}e=e.subarray(i),t-=i,i=0},this.reset=function(){e=null,i=0,this.trigger("reset")},this.flush=function(){e&&e.byteLength>3&&this.trigger("data",e.subarray(i+3)),e=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new Q,Ee={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(Pe=function(){var t,e,i,n,a,r,s,o,d=new Ae;Pe.prototype.init.call(this),t=this,this.push=function(t){"video"===t.type&&(e=t.trackId,i=t.codec,n=t.pts,a=t.dts,d.push(t))},d.on("data",
vendor: 3,295 bytes, line 28
28(function(o){var d={trackId:e,pts:n,dts:a,data:o,nalUnitTypeCode:"avc"===i?31&o[0]:o[0]>>>1&63};if("avc"===i){switch(d.nalUnitTypeCode){case 5:d.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:d.nalUnitType="sei_rbsp",d.escapedRBSP=r(o.subarray(1));break;case 7:d.nalUnitType="seq_parameter_set_rbsp",d.escapedRBSP=r(o.subarray(1)),d.config=s(d.escapedRBSP);break;case 8:d.nalUnitType="pic_parameter_set_rbsp";break;case 9:d.nalUnitType="access_unit_delimiter_rbsp"}0!==d.nalUnitTypeCode&&t.trigger("data",d)}else if("hevc"===i){switch(d.nalUnitTypeCode){case 19:case 20:d.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 39:d.nalUnitType="sei_rbsp",d.escapedRBSP=r(o.subarray(2));break;case 32:d.nalUnitType="vid_parameter_set_rbsp";break;case 33:d.nalUnitType="seq_parameter_set_rbsp",d.escapedRBSP=r(o.subarray(2)),d.config=Oe(d.escapedRBSP);break;case 34:d.nalUnitType="pic_parameter_set_rbsp";break;case 35:d.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",d)}})),d.on("done",(function(){t.trigger("done")})),d.on("partialdone",(function(){t.trigger("partialdone")})),d.on("reset",(function(){t.trigger("reset")})),d.on("endedtimeline",(function(){t.trigger("endedtimeline")})),this.flush=function(){d.flush()},this.partialFlush=function(){d.partialFlush()},this.reset=function(){d.reset()},this.endTimeline=function(){d.endTimeline()},o=function(t,e){var i,n=8,a=8;for(i=0;i<t;i++)0!==a&&(a=(n+e.readExpGolomb()+256)%256),n=0===a?n:a},r=function(t){for(var e,i,n=t.byteLength,a=[],r=1;r<n-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(a.push(r+2),r+=2):r++;if(0===a.length)return t;e=n-a.length,i=new Uint8Array(e);var s=0;for(r=0;r<e;s++,r++)s===a[0]&&(s++,a.shift()),i[r]=t[s];return i},s=function(t){var e,i,n,a,r,s,d,p,h,l,c,u,f=0,m=0,g=0,y=0,_=[1,1];if(i=(e=new Ue(t)).readUnsignedByte(),a=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),Ee[i]&&(3===(r=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(c=3!==r?8:12,u=0;u<c;u++)e.readBoolean()&&o(u<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(s=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===s)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),d=e.readUnsignedExpGolomb(),u=0;u<d;u++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),p=e.readUnsignedExpGolomb(),h=e.readUnsignedExpGolomb(),0===(l=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(f=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),g=e.readUnsignedExpGolomb(),y=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:_=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}_&&(_[0],_[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:a,width:16*(p+1)-2*f-2*m,height:(2-l)*(h+1)*16-2*g-2*y,sarRatio:_}}}).prototype=new Q;
28var Le,Be={H26XStream:Pe,NalByteStream:Ae},Ge=function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return i=i>=0?i:0,(16&t[e+5])>>4?i+20:i+10},We=function t(e,i){return e.length-i<10||e[i]!=="I".charCodeAt(0)||e[i+1]!=="D".charCodeAt(0)||e[i+2]!=="3".charCodeAt(0)?i:t(e,i+=Ge(e,i))},Fe=function(t){var e=We(t,0);return t.length>=e+2&&!(255&~t[e])&&!(240&~t[e+1])&&16==(22&t[e+1])},Ne=Ge,ze=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i};(Le=function(){var t=new Uint8Array,e=0;Le.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.push=function(i){var n,a,r,s,o=0,d=0;for(t.length?(s=t.length,(t=new Uint8Array(i.byteLength+s)).set(t.subarray(0,s)),t.set(i,s)):t=i;t.length-d>=3;)if(t[d]!=="I".charCodeAt(0)||t[d+1]!=="D".charCodeAt(0)||t[d+2]!=="3".charCodeAt(0))if(255&~t[d]||240&~t[d+1])d++;else{if(t.length-d<7)break;if(d+(o=ze(t,d))>t.length)break;r={type:"audio",data:t.subarray(d,d+o),pts:e,dts:e,trackId:9999},this.trigger("data",r),d+=o}else{if(t.length-d<10)break;if(d+(o=Ne(t,d))>t.length)break;a={type:"timed-metadata",data:t.subarray(d,d+o)},this.trigger("data",a),d+=o}n=t.length-d,t=n>0?t.subarray(d):new Uint8Array},this.reset=function(){t=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){t=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new Q;var Ye,je=Le,Ve=Ne,He=function t(e,i){return e.length-i<10||e[i]!=="I".charCodeAt(0)||e[i+1]!=="D".charCodeAt(0)||e[i+2]!=="3".charCodeAt(0)?i:t(e,i+=Ve(e,i))},Xe={isLikelyEc3Data:function(t){var e=He(t,0);return t.length>=e+2&&11===t[e]&&119===t[e+1]},parseEc3FrameSize:function(t,e){return e+4>t.length?null:1+((7&t[e+2])<<8|t[e+3])<<1},parseId3TagSize:Ve};(Ye=function(){var t=new Uint8Array,e=0;Ye.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.push=function(i){var n,a,r,s=0,o=0;if(t.length){var d=t;(t=new Uint8Array(i.byteLength+d.length)).set(d),t.set(i,d.length)}else t=i;for(;t.length-o>=3;)if(t[o]!=="I".charCodeAt(0)||t[o+1]!=="D".charCodeAt(0)||t[o+2]!=="3".charCodeAt(0))if(t.length-o>=2&&2935==(t[o]<<8|t[o+1])){for(var p=o;o<t.length-1&&2935==(t[o]<<8|t[o+1])&&(s=Xe.parseEc3FrameSize(t,o))&&!(o+s>t.length);)o+=s;if(o===p)break;r={type:"audio",data:t.subarray(p,o),pts:e,dts:e,trackId:9998},this.trigger("data",r)}else o++;else{if(t.length-o<10)break;if(o+(s=Xe.parseId3TagSize(t,o))>t.length)break;a={type:"timed-metadata",data:t.subarray(o,o+s)},this.trigger("data",a),o+=s}n=t.length-o,t=n>0?t.subarray(o):new Uint8Array},this.reset=function(){t=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){t=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new Q;var qe,Ke,Ze,$e,Je=Ye,Qe=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize","baseMediaDecodeTime","segmentDuration"],ti=["codec","channelcount","samplerate","samplesize","acmod","lfeon","bsid","fscod","baseMediaDecodeTime","segmentDuration"],ei=["width","height","sarRatio","baseMediaDecodeTime","segmentDuration"],ii=xe,ni=Be.H26XStream,ai=Fe,ri=Xe.isLikelyEc3Data,si=ct,oi=function(t){return"ec-3"===t||"ac-3"===t||"ac3-family"===t},di=function(t,e){e.stream=t,this.trigger("log",e)},pi=function(t,e){for(var i=Object.keys(e),n=0;n<i.length;n++){var a=i[n];"headOfPipeline"!==a&&e[a].on&&e[a].on("log",di.bind(t,a))}},hi=function(t,e){var i;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},li=function(t,e,i,n,a,r){return{start:{dts:t,pts:t+(i-e)},end:{dts:t+(n-e),pts:t+(a-i)},prependedContentDuration:r,baseMediaDecodeTime:t}};(Ke=function(t,e){var i,n=[],a=0,r=1/0;i=(e=e||{}).firstSequenceNumber||0,Ke.prototype.init.call(this),this.push=function(e){Tt(t,e),t&&(oi(t.codec)?ti:Qe).forEach((function(i){t[i]=e[i]})),n.push(e)},this.setVideoBaseMediaDecodeTime=function(t){r=t},this.setAudioAppendStart=function(t){a=t},this.flush=function(){var s,o,d,p,h;if(0!==n.length){if(t.baseMediaDecodeTime=vt(t,e.keepOriginalTimestamps),h=gt(t,n,a,r),t.samples=yt(n),o=z.mdat(_t(n)),s=z.moof(i,[t]),d=new Uint8Array(s.byteLength+o.byteLength),i++,d.set(s),d.set(o,s.byteLength),bt(t),n.length){p=0;for(var l=0;l<n.length;l++){var c=n[l].sampleCount||1024;p+=Math.ceil(si*c/t.samplerate)}this.trigger("segmentTimingInfo",li(ut(t.baseMediaDecodeTime,t.samplerate),n[0].dts,n[0].pts,n[0].dts+p,n[0].pts+p,h||0)),this.trigger("timingInfo",{start:n[0].pts,end:n[0].pts+p})}n=[],this.trigger("data",{track:t,boxes:d}),this.trigger("done","AudioSegmentStream")}else this.trigger("done","AudioSegmentStream")},this.reset=function(){bt(t),n=[],this.trigger("reset")}}).prototype=new Q,(qe=function(t,e){var i,n,a,r,s=[],o=[];i=(e=e||{}).firstSequenceNumber||0,qe.prototype.init.call(this),delete t.minPTS,this.gopCache_=[],this.push=function(e){Tt(t,e),"seq_parameter_set_rbsp"!==e.nal
vendor: 4,250 bytes, line 28
28UnitType||n||(n=e.config,t.sps=[e.data],t.parsedSps=n,ei.forEach((function(e){t[e]=n[e]}),this)),"pic_parameter_set_rbsp"!==e.nalUnitType||a||(a=e.data,t.pps=[e.data]),"vid_parameter_set_rbsp"!==e.nalUnitType||r||(r=e.data,t.vps=[e.data]),s.push(e)},this.flush=function(){for(var n,a,r,d,p,h,l,c,u=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=et(s),(r=it(n))[0][0].keyFrame?t.isCurrentSegmentStartingWithKeyframe=!0:(a=this.getGopForFusion_(s[0],t),t.isCurrentSegmentStartingWithKeyframe=!1,a?(u=a.duration,r.unshift(a),r.byteLength+=a.byteLength,r.nalCount+=a.nalCount,r.pts=a.pts,r.dts=a.dts,r.duration+=a.duration):r=nt(r)),o.length){var f;if(!(f=e.alignGopsAtEnd?this.alignGopsAtEnd_(r):this.alignGopsAtStart_(r)))return this.gopCache_.unshift({gop:r.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");bt(t),r=f}Tt(t,r),t.samples=at(r),p=z.mdat(rt(r)),t.baseMediaDecodeTime=vt(t,e.keepOriginalTimestamps),this.trigger("processedGopsInfo",r.map((function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}}))),l=r[0],c=r[r.length-1],this.trigger("segmentTimingInfo",li(t.baseMediaDecodeTime,l.dts,l.pts,c.dts+c.duration,c.pts+c.duration,u)),this.trigger("timingInfo",{start:r[0].pts,end:r[r.length-1].pts+r[r.length-1].duration}),this.gopCache_.unshift({gop:r.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime),this.trigger("timelineStartInfo",t.timelineStartInfo),d=z.moof(i,[t]),h=new Uint8Array(d.byteLength+p.byteLength),i++,h.set(d),h.set(p,d.byteLength),this.trigger("data",{track:t,boxes:h}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),s=[],this.gopCache_.length=0,o.length=0,this.trigger("reset")},this.resetStream_=function(){bt(t),n=void 0,a=void 0},this.getGopForFusion_=function(e){var i,n,a,r,s,o,d=1/0;for(o=0;o<this.gopCache_.length;o++)r=(s=this.gopCache_[o]).gop,t.pps&&s.pps&&hi(t.pps[0],s.pps[0])&&t.sps&&s.sps&&hi(t.sps[0],s.sps[0])&&(r.dts<t.timelineStartInfo.dts&&(a=t.timelineStartInfo.dts-t.timelineStartInfo.baseMediaDecodeTime,r.dts<a)||(i=e.dts-r.dts-r.duration)>=-1e4&&i<=45e3&&(!n||d>i)&&(n=s,d=i));return n?n.gop:null},this.alignGopsAtStart_=function(t){var e,i,n,a,r,s,d,p;for(r=t.byteLength,s=t.nalCount,d=t.duration,e=i=0;e<o.length&&i<t.length&&(n=o[e],a=t[i],n.pts!==a.pts);)a.pts>n.pts?e++:(i++,r-=a.byteLength,s-=a.nalCount,d-=a.duration);return 0===i?t:i===t.length?null:((p=t.slice(i)).byteLength=r,p.duration=d,p.nalCount=s,p.pts=p[0].pts,p.dts=p[0].dts,p)},this.alignGopsAtEnd_=function(t){var e,i,n,a,r,s,d;for(e=o.length-1,i=t.length-1,r=null,s=!1;e>=0&&i>=0;){if(n=o[e],a=t[i],n.pts===a.pts){s=!0;break}n.pts>a.pts?e--:(e===o.length-1&&(r=i),i--)}if(!s&&null===r)return null;if(0===(d=s?i:r))return t;var p=t.slice(d),h=p.reduce((function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t}),{byteLength:0,duration:0,nalCount:0});return p.byteLength=h.byteLength,p.duration=h.duration,p.nalCount=h.nalCount,p.pts=p[0].pts,p.dts=p[0].dts,p},this.alignGopsWith=function(t){o=t}}).prototype=new Q,($e=function(t,e){this.numberOfTracks=0,this.metadataStream=e,void 0!==(t=t||{}).remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,"boolean"==typeof t.keepOriginalTimestamps?this.keepOriginalTimestamps=t.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,$e.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track,this.pendingBoxes.push(t.boxes)),void("audio"===t.track.type&&(this.audioTrack=t.track,this.pendingBoxes.unshift(t.boxes))))}}).prototype=new Q,$e.prototype.flush=function(t){var e,i,n,a,r=0,s={captions:[],captionStream
28s:{},metadata:[],info:{}},o=0,d=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,d=this.videoTrack.timelineStartInfo.baseMediaDecodeTime,ei.forEach((function(t){s.info[t]=this.videoTrack[t]}),this),s.info.codec=this.videoTrack.codec,s.info.sps=this.videoTrack.parsedSps?Y({},this.videoTrack.parsedSps):null,s.info.startsWithKeyframe=this.videoTrack.isCurrentSegmentStartingWithKeyframe,s.info.trackId=this.videoTrack.id,s.info.timelineStartInfo=this.videoTrack.timelineStartInfo):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,d=this.audioTrack.timelineStartInfo.baseMediaDecodeTime,(oi(this.audioTrack.codec)?ti:Qe).forEach((function(t){s.info[t]=this.audioTrack[t]}),this),s.info.trackId=this.audioTrack.id,s.info.timelineStartInfo=this.audioTrack.timelineStartInfo,s.info.startsWithKeyframe=!0),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=z.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),a=0;a<this.pendingBoxes.length;a++)s.data.set(this.pendingBoxes[a],r),r+=this.pendingBoxes[a].byteLength;for(a=0;a<this.pendingCaptions.length;a++)(e=this.pendingCaptions[a]).startTime=mt(e.startPts+d,o,this.keepOriginalTimestamps),e.endTime=mt(e.endPts+d,o,this.keepOriginalTimestamps),s.captionStreams[e.stream]=!0,s.captions.push(e);for(a=0;a<this.pendingMetadata.length;a++)(i=this.pendingMetadata[a]).cueTime=mt(i.pts+d,o,this.keepOriginalTimestamps),s.metadata.push(i);for(s.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",s),a=0;a<s.captions.length;a++)e=s.captions[a],this.trigger("caption",e);for(a=0;a<s.metadata.length;a++)i=s.metadata[a],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},$e.prototype.setRemux=function(t){this.remuxTracks=t},(Ze=function(t){var e,i,n=this;Ze.prototype.init.call(this),t=t||{},this.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.activeCaptionStream=null,this.setupAacPipeline=function(){var a={};return this.aacTransmuxPipeline=a,a.type="aac",a.hasFlushed=!0,a.metadataStream=new ge.MetadataStream,a.aacStream=new je,a.audioTimestampRolloverStream=new ge.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new ge.TimestampRolloverStream("timed-metadata"),a.adtsStream=new Se,a.coalesceStream=new $e(t,a.metadataStream),a.headOfPipeline=a.aacStream,a.aacStream.pipe(a.audioTimestampRolloverStream).pipe(a.adtsStream),a.aacStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.metadataStream.on("timestamp",(function(t){a.aacStream.setTimestamp(t.timeStamp)})),a.aacStream.on("data",(function(r){"timed-metadata"!==r.type&&"audio"!==r.type||a.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio",id:9999},a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new Ke(i,t),a.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),a.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),a.adtsStream.pipe(a.audioSegmentStream).pipe(a.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e}))})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done")),pi(this,a),a},this.setupEc3Pipeline=function(){var a={};return this.ec3TransmuxPipeline=a,a.type="ec3",a.hasFlushed=!0,a.metadataStream=new ge.MetadataStream,a.ec3RawStream=new Je,a.audioTimestampRolloverStream=new ge.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new ge.TimestampRolloverStream("timed-metadata"),a.ac3Stream=new ii,a.coalesceStream=new $e(t,a.metadataStream),a.headOfPipeline=a.ec3RawStream,a.ec3RawStream.pipe(a.audioTimestampRolloverStream).pipe(a.ac3Stream),a.ec3RawStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.metadataStream.on("timestamp",(function(t){a.ec3RawStream.setTimestamp(t.timeStamp)})),a.ec3RawStream.on("data",(function(r){"timed-metadata"!==r.type&&"audio"!==r.type||a.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"ec-3",type:"audio",id:9998},a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new Ke(i,t),a.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),a.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),a.ac3Stream.pipe(a.audioSegmentStream).pipe(a.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e}))})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done")),pi(this,a),a},this.setupTsPipeline=function(){var a={};return this.tsTransmuxPipeline=a,a.type="ts",a.hasFlushed=!0,a.metadataStream=new ge.MetadataStream,a.packetStream=new ge.TransportPacketStream,a.parseStream=new ge.TransportParseStream,a.elementaryStream=new ge.ElementaryStream,a.timestampRolloverStream=new ge.TimestampRolloverStream,a.adtsStream=new Se,a.ac3Stream=new ii,a.h26xStream=new ni,a.captionStream=new ge.CaptionStream(t),a.coalesceStream=new $e(t,a.metadataStream),a.headOfPipeline=a.packetStream,this.activeCaptionStream=a.captionStream,a.packetStream.pipe(a.parseStream).pipe(a.elementaryStream).pipe(a.timestampRolloverStream),a.timestampRolloverStream.pipe(a.h26xStream),a.timestampRolloverStream.pipe(a.adtsStream),a.timestampRolloverStream.pipe(a.ac3Stream),a.timestampRolloverStream.pipe(a.metadataStream).pipe(a.coalesceStream),a.h26xStream.pipe(a.captionStream).pipe(a.coalesceStream),a.elementaryStream.on("data",(function(r){var s;if("metadata"===r.type){for(s=r.tracks.length;s--;)e||"video"!==r.tracks[s].type?i||"audio"!==r.tracks[s].type||(i=r.tracks[s],e&&!t.keepOriginalTimestamps?i.timelineStartInfo=e.timelineStartInfo:i.timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(e=r.tracks[s]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;e&&!a.videoSegmentStream&&(a.coalesceStream.numberOfTracks++,a.videoSegmentStream=new qe(e,t),a.videoSegmentStream.on("log",n.getLogTrigger_("videoSegmentStream")),a.videoSegmentStream.on("timelineStartInfo",(function(e){i&&a.audioSegmentStream&&!t.keepOriginalTimestamps&&(i.timelineStartInfo=e)})),a.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),a.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),a.videoSegmentStream.on("baseMediaDecodeTime",(function(t){i&&a.audioSegmentStream&&a.audioSegmentStream.setVideoBaseMediaDecodeTime(t)})),a.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),a.h26xStream.pipe(a.videoSegmentStream).pipe(a.coalesceStream)),i&&!a.audioSegmentStream&&(a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new Ke(i,t),a.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),a.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),a.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),(oi(i.codec)?a.ac3Stream:a.adtsStream).pipe(a.audioSegmentStream).pipe(a.coalesceStream)),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e})}})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("id3Frame",(function(t){t.dispatchType=a.metadataStream.dispatchType,n.trigger("id3Frame",t)})),a.coalesceStream.on("caption",this.trigger.bind(this,"caption")),a.coalesceStream.on("done",this.trigger.bind(this,"done")),pi(this,a),a},this.setBaseMediaDecodeTime=function(n){t.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),this.getAllPipelines().forEac
28h((function(a){i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,t.keepOriginalTimestamps||(i.timelineStartInfo.baseMediaDecodeTime=n),bt(i),a.audioTimestampRolloverStream&&a.audioTimestampRolloverStream.discontinuity()),e&&(a.videoSegmentStream&&(a.videoSegmentStream.gopCache_=[]),e.timelineStartInfo.dts=void 0,e.timelineStartInfo.pts=void 0,t.keepOriginalTimestamps||(e.timelineStartInfo.baseMediaDecodeTime=n),bt(e),a.captionStream&&a.captionStream.reset()),a.timestampRolloverStream&&a.timestampRolloverStream.discontinuity()}))},this.setAudioAppendStart=function(t){this.getAllPipelines().forEach((function(e){i&&e.audioSegmentStream&&e.audioSegmentStream.setAudioAppendStart(t)}))},this.setRemux=function(e){t.remux=e,this.getAllPipelines().forEach((function(t){t.coalesceStream&&t.coalesceStream.setRemux(e)}))},this.alignGopsWith=function(t){e&&this.tsTransmuxPipeline.videoSegmentStream&&this.tsTransmuxPipeline.videoSegmentStream.alignGopsWith(t)},this.getLogTrigger_=function(t){var e=this;return function(i){i.stream=t,e.trigger("log",i)}},this.push=function(t){var e;ai(t)?(this.aacTransmuxPipeline=this.aacTransmuxPipeline||this.setupAacPipeline(),e=this.aacTransmuxPipeline):ri(t)?(this.ec3TransmuxPipeline=this.ec3TransmuxPipeline||this.setupEc3Pipeline(),e=this.ec3TransmuxPipeline):(this.tsTransmuxPipeline=this.tsTransmuxPipeline||this.setupTsPipeline(),e=this.tsTransmuxPipeline),e.hasFlushed=!1,e.headOfPipeline.push(t)},this.flush=function(){this.getAllPipelines().filter((function(t){return!t.hasFlushed})).forEach((function(t){t.hasFlushed=!0,t.headOfPipeline.flush()}))},this.endTimeline=function(){this.getAllPipelines().forEach((function(t){t.headOfPipeline&&t.headOfPipeline.endTimeline()}))},this.reset=function(){this.getAllPipelines().forEach((function(t){t.headOfPipeline&&t.headOfPipeline.reset()}))},this.resetCaptions=function(){this.tsTransmuxPipeline&&this.tsTransmuxPipeline.captionStream.reset()},this.getAllPipelines=function(){return[this.tsTransmuxPipeline,this.aacTransmuxPipeline,this.ec3TransmuxPipeline].filter((function(t){return Boolean(t)}))}}).prototype=new Q;var ci={Transmuxer:Ze,VideoSegmentStream:qe,AudioSegmentStream:Ke,AAC_AUDIO_PROPERTIES:Qe,AC3_AUDIO_PROPERTIES:ti,VIDEO_PROPERTIES:ei,CaptionStream:ge.CaptionStream,generateSegmentTimingInfo:li};return{generator:z,Transmuxer:ci.Transmuxer,AudioSegmentStream:ci.AudioSegmentStream,VideoSegmentStream:ci.VideoSegmentStream,CaptionStream:ci.CaptionStream}}()}()},499:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayIncludesPolyfill=void 0,e.ArrayIncludesPolyfill=function(){return{polyfill:function(){Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError(\'"this" is null or not defined\');var i=Object(this),n=i.length>>>0;if(0===n)return!1;var a=0|e,r=Math.max(a>=0?a:n-Math.abs(a),0);function s(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}for(;r<n;){if(s(i[r],t))return!0;r++}return!1}})}}}()},878:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringEndsWithPolyfill=void 0,e.StringEndsWithPolyfill=function(){return{polyfill:function(){String.prototype.endsWith=function(t,e){if(null==t)return!1;var i=this.length;return null!=e&&(i=Math.min(e,this.length)),this.substring(i-t.length,i)===t}}}}()},205:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringIncludesPolyfill=void 0,e.StringIncludesPolyfill=function(){return{polyfill:function(){String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}}}}()},829:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringStartsWithPolyfill=void 0,e.StringStartsWithPolyfill=function(){return{polyfill:function(){String.prototype.startsWith=function(t,e){var i=e>0?0|e:0;return this.substring(i,i+t.length)===t}}}}()},956:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assembleCaption=function(t){return{start:a(t)?t.startTime:t.startPts/n.MP2TS_TIMESCALE,end:a(t)?t.endTime:t.endPts/n.MP2TS_TIMESCALE,text:t.text,channel:t.stream,position:t.position}};var n=i(226);function a(t){return"startTime"in t}}
28,226:function(t,e,i){"use strict";var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.TransmuxerMessageHandler=e.MP2TS_TIMESCALE=void 0,e.getContext=function(){return a||p()};var a,r=i(48),s=i(599),o=i(741),d=i(956);function p(){var t=new o.WebWorkerContext(h);return onmessage=t.onMessageCallback,t}e.MP2TS_TIMESCALE=9e4;var h=function(t){function i(i,n){var a=t.call(this,i,n)||this;return a.b=!1,a.push=function(t){a.c=t.data,a.a.push(new Uint8Array(t.data))},a.flush=function(){a.a.flush()},a.initCaptionParser=function(){a.a.setupTsPipeline(),a.g()},a.pushCaptions=function(t){a.e((function(e){a.b=!1,t.data.forEach((function(t){return e.push(t)}))}))},a.flushCaptions=function(){a.e((function(t){return t.flush()}))},a.resetCaptions=function(){a.e((function(t){return t.reset()}))},a.setTimestampOffset=function(t){var i=t.offset;a.a.setBaseMediaDecodeTime(Math.round(i*e.MP2TS_TIMESCALE))},a.setAudioAppendStart=function(t){a.a.setAudioAppendStart(t.appendStart*e.MP2TS_TIMESCALE,t.trackId)},a.reset=function(){a.d()},a.dispose=function(){a.a&&a.a.dispose()},a.f=function(t){t.on("data",(function(t){var e=t.data;a.runsInWebWorker?t.data=e.buffer:t.data=e.buffer.slice(0),t.captions=t.captions.map(d.assembleCaption),a.postMessageFunction({action:"data",segment:t,byteOffset:e.byteOffset,byteLength:e.byteLength},[t.data])})),t.on("done",(function(){a.c&&a.postMessageFunction({action:"done",what:"transmuxing",originalSegment:a.c},[a.c])}))},a.g=function(){a.e((function(t){t.on("data",(function(t){a.postMessageFunction({action:"caption",caption:(0,d.assembleCaption)(t)})})),t.on("done",(function(){a.b||(a.b=!0,a.postMessageFunction({action:"done",what:"captions"}))}))}))},a.d(),a}return n(i,t),i.prototype.d=function(){this.dispose(),this.a=new r.Transmuxer({remux:!1}),this.f(this.a)},i.prototype.e=function(t){var e,i=null===(e=this.a)||void 0===e?void 0:e.activeCaptionStream;i&&t(i)},i}(s.MessageHandler);e.TransmuxerMessageHandler=h,"undefined"==typeof window&&(a=p())},599:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageHandler=void 0;var i=function(){return function(t,e){this.runsInWebWorker=t,this.postMessageFunction=e}}();e.MessageHandler=i},741:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorkerContext=void 0;var n=i(41),a=function(){return function(t){var e=this;this.i="undefined"==typeof window,this.onmessage=null,this.j=function(t,i){e.i?postMessage(t,i):"function"==typeof e.onmessage&&setTimeout((function(){e.onmessage({data:t})}),0)},this.postMessage=function(t){setTimeout((function(){e.onMessageCallback({data:t})}),0)},this.terminate=function(){},this.onMessageCallback=function(t){t.data.action&&t.data&&e.h[t.data.action]&&e.h[t.data.action](t.data)},this.i&&(0,n.installWorkerPolyfills)(),this.h=new t(this.i,this.j)}}();e.WebWorkerContext=a},41:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.installWorkerPolyfills=function(){Array.prototype.includes||n.ArrayIncludesPolyfill.polyfill(),String.prototype.includes||r.StringIncludesPolyfill.polyfill(),String.prototype.startsWith||s.StringStartsWithPolyfill.polyfill(),String.prototype.endsWith||a.StringEndsWithPolyfill.polyfill()};var n=i(499),a=i(878),r=i(205),s=i(829)}},e={};!function i(n){var a=e[n];if(void 0!==a)return a.exports;var r=e[n]={exports:{}};return t[n].call(r.exports,r,r.exports,i),r.exports}(226)}();',i.p+"af97e37630fe11ab4c17.worker.js")}},21332:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerTsModuleDefinition=void 0;var n=i(62756),r=i(67889);t.ContainerTsModuleDefinition={name:n.ModuleName.ContainerTS,module:function(){return{WebWorkerTransmuxer:i(77869).WebWorkerTransmuxer,TransmuxerWorker:r.TransmuxerWorkerClass}}},t.default=t.ContainerTsModuleDefinition}
vendor: 22,347 bytes, line 28
28,67889:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TransmuxerWorkerClass=void 0,t.TransmuxerWorkerClass=i(72387)},77869:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorkerTransmuxer=void 0,t.isRawAAC=I;var r=i(66790),o=i(40306),a=i(3336),s=i(80813),l=i(15971),c=i(74853),u=i(34047),d=i(34841),h=i(70233),p=i(85434),f=i(88052),m=i(62756),g=i(87187),v=i(67889),y=9e4,b=95443.7176888889;function S(e,t){var i=t.getTimescale();if(void 0===i)return NaN;var n=e&&e.segment.info,r=n&&n.segmentDuration>0?n.segmentDuration/i:t.getDuration();return t.getBaseMediaDecodeTime()/i+r}function _(e,t){for(var i=[],n=0;n<t;n++)i.push(e>>>n&1);return parseInt(i.join(""),2)}t.WebWorkerTransmuxer=function(){function e(t,i){var n=this;this.Lx=[],this.Px={},this.Qx={},this.Tx=!1,this.Vx=function(){n.resetCaptionParser()},this.cx=function(t){t.data=e.makeSegmentSelfInitializing(t.initSegment,t.data);var i={id3:e.getId3Metadata(t),closedCaptions:t.captions};n.Ox.push({segment:t,metadata:i})},this.jx=function(e){var t,i=n.Lx.shift();if(i){if(i.mp2tsSegment.setData(e),n.Jx.logger.debug("Transmuxed",i.mp2tsSegment.getUrl()),n.Ox.length<1||0===Object.keys(n.Ox[0].segment.info).length)return i.rejectFn(r.TransmuxingRejectionReason.INVALID_TS_SEGMENT),void n.ix();if(i.mp2tsSegment.getSegmentInfo().discardData||i.discard)n.ix();else{n.kx(i),n.Ox.sort(function(e,t){return e.segment.info.trackId-t.segment.info.trackId});var o=n.Ox.map(function(e){return e.metadata}),a=null==(t=n.Jx.config.tweaks)?void 0:t.parse_cea_708_caption;o.forEach(function(e){e.closedCaptions=e.closedCaptions.filter(function(e){return a?e.channel.includes("708"):!e.channel.includes("708")})});var s=n.fx(n.Ox,i.mp2tsSegment);n.Tx&&s.length>1&&(n.Jx.logger.debug("Discarding muxed audio from video segment since there is a separate audio playlist."),s=s.filter(function(e){var t=e[0];return e[1],p.MimeTypeHelper.isVideo(t.getMimeType())})),s.forEach(function(e){var t,i=e[0],r=e[1];p.MimeTypeHelper.isAudio(i.getMimeType())&&(null==(t=n.Mx)||t.postMessage({action:"setAudioAppendStart",appendStart:S(r,i),trackId:r.segment.info.trackId}))}),i.resolveFn({originalSegment:i.mp2tsSegment,transmuxedSegments:s.map(function(e){var t=e[0];return e[1],t}),metadata:o}),n.ix()}}},this.sx=function(t){if("done"!==t.data.action||"transmuxing"===t.data.what){var i=n.Nx[t.data.action];for(var r in i)if(i.hasOwnProperty(r))if("data"===t.data.action){var o=e.postProcessSegment(t.data.segment);i[r].call(n.Mx,o)}else"done"===t.data.action&&i[r].call(n.Mx,t.data.originalSegment)}},this.Jx=t,this.Kx=!1,this.Tx=i;try{this.Mx=new v.TransmuxerWorkerClass,this.Mx&&(this.Mx.onmessage=this.sx)}catch(e){this.Jx.eventHandler.fireError(new a.PlayerError(o.ErrorCode.PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER,{error:e},"There was an error during the transmuxer initialization.",this.Jx.sourceContext.sourceIdentifier))}this.Nx={},this.Ox=[],this.rx("data",this.cx),this.rx("done",this.jx)}return e.prototype.setShouldExpectSeparateAvSegments=function(e){this.Tx=e},e.prototype.waitForInitializationForDiscontinuity=function(e){return this.lx(e).promise},e.prototype.isSetupForDiscontinuity=function(e){return this.Sx===e},e.prototype.transmuxSegment=function(e){var t=this;return this.Ux(e).then(function(){return t.Zx(e)})},e.prototype.Ux=function(e){var t,i,n=e.getSegmentInfo().discontinuitySequenceNumber;if(null==n||null==e.getCodec()||p.MimeTypeHelper.isVideo(e.getMimeType())||!this.Tx||this.isSetupForDiscontinuity(n))return Promise.resolve();var r=null==(t=(0,l.getSourceState)(this.Jx))?void 0:t.hls,o=Object.keys(null!=(i=null==r?void 0:r.discontinuitySequenceTiming)?i:{}).filter(function(e){return p.MimeTypeHelper.isAV(e)}),a=f.ModuleManager.get(m.ModuleName.HLS).selectors.areDiscontinuitiesMisaligned;return r&&a(r,o,e.getDuration())?(this.Jx.logger.debug("[Transmuxer] Skipping delayed transmuxer initialization for disco ".concat(n," as discontinuities are misaligned")),Promise.resolve()):(this.Jx.logger.debug("[Transmuxer] Awaiting video segment to complete initialization for discontinuity ".concat(n)),this.waitForInitializationForDiscontinuity(n))},e.prototype.Wx=function(){var e=f.ModuleManager.get(m.ModuleName.HLS);this.Rx=new e.DiscontinuitySequenceNumberTracker(p.MimeTypeHelper.isVideo),this.Rx.subscribe(this.Vx)},e.prototype.Xx=function(e){this.Rx||this.Wx(),this.Rx.trackSegment(e)},e.prototype.Yx=function(){var e=this.Jx.sourceContext.sourceIdentifier,t=!1;return this.Jx.serviceManager.maybeCall(s.ServiceName.ManifestService,function(e){t=!!(e.getManifest()&&e.isHlsManifest()&&f.ModuleManager.has(m.ModuleName.HLS))},null,e),t},e.prototype.Zx=function(e){var t=this;return new Promise(function(i,n){var r={resolveFn:i,rejectFn:n,mp2tsSegment:e,discard:!1};t.Lx.push(r),t.Kx||(t.Kx=!0,t.bx(r))})},e.prototype.ax=function(e){return!(!p.MimeTypeHelper.isAudio(e.getMimeType())||this.Tx)&&I(e.getData())},e.prototype.bx=function(e){this.Jx.logger.debug("Transmuxing "+e.mp2tsSegment.getUrl()),this.Yx()&&this.Xx(e.mp2tsSegment);var t=e.mp2tsSegment.getSegmentInfo(),i=this.ax(e.mp2tsSegment),n=t.discontinuitySequenceNumber;if((i||!this.isSetupForDiscontinuity(n))&&null!=t.startTime){var r=t.startTime;i?this.Jx.logger.debug("[Transmuxer] Applying startTime offset to raw AAC, BMDT: ".concat(r," (").concat(r*y,")")):this.Jx.logger.debug("[Transmuxer] Initializing disco ".concat(n,", BMDT: ").concat(r," (").concat(r*y,")")),this.Sx=n,this.ox(r)}this.px(e.mp2tsSegment.getData()),this.qx()},e.makeSegmentSelfInitializing=function(e,t){return c.ArrayHelper.append(e,t)},e.prototype.dx=function(e){return e.sps?!function(e){return"avc"===e.codec}(e)?!function(e){return"hevc"===e.codec}(e)?null:(0,u.assembleHvcCodecString)("hvc1",n(n({},e.sps),{general_profile_compatibility_flags:_(e.sps.general_profile_compatibility_flags,32)})):"avc1.".concat(h.FormatHelper.intToHex(e.sps.profileIdc)).concat(h.FormatHelper.intToHex(e.sps.profileCompatibility)).concat(h.FormatHelper.intToHex(e.sps.levelIdc)):null},e.prototype.ex=function(e){return"audioobjecttype"in e?"mp4a.40.".concat(e.audioobjecttype):"bsid"in e?e.codec:""},e.prototype.fx=function(e,t){var i=this;return e.map(function(e){i.Jx.logger.debug("Got transmuxed "+e.segment.type,t.getUrl());var r,o=e.segment.type,a=e.segment.info,s="video"===o?y:a.samplerate,l=t.getSegmentInfo().presentationTimeOffset;r="video"===o?i.dx(a):i.ex(a),i.gx(e,t);var c=new g.Segment(e.segment.data.buffer,o+"/mp4",r,t.getPeriodId(),t.getDuration(),g.SegmentInitType.SELF_INIT,e.segment.info.startsWithKeyframe,t.getNetworkRequestSize(),t.getRepresentationId());return c.setTimescale(s),c.setUrl(t.getUrl()),c.setSegmentInfo(n(n({},t.getSegmentInfo()),{mimeType:c.getMimeType()})),c.setBaseMediaDecodeTime(a.baseMediaDecodeTime),void 0!==l?(c.setPresentationTimeOffset(l),c.setPlaybackTime(a.baseMediaDecodeTime/s-l)):c.setPlaybackTime(NaN),c.setDuration(i.hx(a,s,t.getDuration())),[c,e]})},e.prototype.gx=function(e,t){var i=this.Jx.serviceManager.get(s.ServiceName.SourceStoreService,this.Jx.sourceContext.sourceIdentifier),n=f.ModuleManager.get(m.ModuleName.HLS,!1);if(i&&n){var r=e.segment.info.timelineStartInfo.minSegmentPts%0x200000000,o=t.getPlaybackTime()-r/y,a=o+95443.7176888889;i.dispatch(n.actions.setTimestampRolloverPositions(a,o))}},e.prototype.hx=function(e,t,i){var n=e.segmentDuration/t;if(n){var r=Math.abs(i-n);return r>.1&&this.Jx.logger.debug("Segment duration is off by ".concat(r,", corrected from ").concat(i," to ").concat(n)),n}return i},e.prototype.ix=function(){if(this.Ox=[],this.Lx.length>0){var e=this.Lx[0];this.bx(e)}else this.Kx=!1},e.prototype.kx=function(e){var t=e.mp2tsSegment.getSegmentInfo().discontinuitySequenceNumber;if(void 0!==t){if(void 0===this.Px[t]){var i=this.Ox[0].segment.info.timelineStartInfo;this.Px[t]=(i.baseMediaDecodeTime-i.pts)/y}this.mx(t),this.mx(-1),this.nx(function(e){return e<t})}},e.prototype.lx=function(e){return this.Qx[e]||(this.Qx[e]=new d.Deferred),this.Qx[e]},e.prototype.mx=function(e){void 0!==e&&this.lx(e).resolve()},e.prototype.nx=function(e){var t=this;void 0===e&&(e=function(){return!0}),Object.entries(this.Qx).forEach(function(i){var n=i[0],o=i[1];!o.hasSettled&&e(Number(n))&&(t.Jx.logger.debug("[Transmuxer] Rejecting unresolved disco initialization ".concat(n)),o.reject(r.TransmuxingRejectionReason.TRANSMUXING_ABORTED),delete t.Qx[Number(n)])})},e.prototype.getTimestampMappingOffset=function(e){var t,i=null==(t=e.getSegmentInfo())?void 0:t.discontinuitySequenceNumber,n=this.Px[i];if(void 0!==i&&void 0!==n)return n+Math.floor((e.getPlaybackTime()-n)/b)*b},e.prototype.discardCurrentJobs=function(e){return p.MimeTypeHelper.isVideo(e)&&(this.nx(),this.Qx={}),this.isTransmuxing()?this.Lx.filter(function(t){return t.mp2tsSegment.getMimeType()===e}).map(function(e){return e.discard=!0,{mp2tsSegment:e.mp2tsSegment}}):[]},e.prototype.ox=function(e){var t;null==(t=this.Mx)||t.postMessage({action:"setTimestampOffset",offset:e})},e.prototype.px=function(e){var t;null==(t=this.Mx)||t.postMessage({action:"push",data:e},[e])},e.prototype.qx=function(){var e;null==(e=this.Mx)||e.postMessage({action:"flush"})},e.prototype.resetCaptionParser=function(){var e;this.Jx.logger.debug("Resetting caption parser..."),null==(e=this.Mx)||e.postMessage({action:"resetCaptions"})},e.prototype.hasActiveJobs=function(){return this.Kx&&this.Lx.some(function(e){return!1===e.discard})},e.prototype.hasDelayedAudioSegments=function(){return Object.values(this.Qx).some(function(e){return!e.hasSettled})},e.prototype.isTransmuxing=function(){return this.Kx},e.prototype.isTransmuxingSegmentsForPeriod=function(e){return this.Lx.some(function(t){return e===t.mp2tsSegment.getPeriodId()})},e.prototype.reset=function(){this.Jx.logger.debug("Resetting transmuxer..."),this.Sx=void 0,this.Rx&&this.Rx.reset()},e.prototype.dispose=function(){var e;this.Mx&&(this.Nx={},this.Lx=[],this.Ox=[],this.Mx.postMessage({action:"dispose"}),this.Mx.terminate(),this.Mx=null),this.reset(),this.nx(),null==(e=this.Rx)||e.dispose(),this.Qx={},this.Px={}},e.prototype.rx=function(e,t){this.Nx.hasOwnProperty(e)||(this.Nx[e]=[]),this.Nx[e].push(t)},e.getId3Frame=function(e){if(e&&e.key&&e.data){var t={key:e.key,data:""};return"TXXX"===e.key&&"string"==typeof e.data?(t.info=e.description,t.data=e.data):"PRIV"===e.key?(t.info=e.owner,t.data=e.data):"WXXX"===e.key&&"string"==typeof e.data?(t.info=e.description,e.url&&(t.data=e.url)):t.data=e.data,t.data instanceof Uint8Array&&(t.data=c.ArrayHelper.getArray(t.data)),t}},e.getId3Metadata=function(t){if(!t.hasOwnProperty("metadata")||!Array.isArray(t.metadata))return[];for(var i=[],n=0;n<t.metadata.length;n++){for(var r={frames:[]},o=0;o<t.metadata[n].frames.length;o++){var a=e.getId3Frame(t.metadata[n].frames[o]);a&&(r.frames.push(a),r[a.key]=a.data)}i.push({presentationTime:t.metadata[n].cueTime,data:r})}return i},e.postProcessSegment=function(e){if(e)return e.data=new Uint8Array(e.data),e},e}();var E=4,T=[73,68,51],w=255,A=240,P=240;function I(e){var t=new Uint8Array(e);return!(t.length<E||t[0]===T[0]&&t[1]===T[1]&&t[2]===T[2]||t[0]!==w||(t[1]&A)!==P)}}},function(e){return function(){return e(e.s=21332)}()}])})}()}(bitmovinplayerContainerTs);var bitmovinplayerContainerTsExports=bitmovinplayerContainerTs.exports;let TSContainerModule=getDefaultExportFromCjs$1(bitmovinplayerContainerTsExports);var bitmovinplayerDash={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[367],{96693:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.isInitializationStringNode=function(e){return(0,r.isObject)(e)&&null!=e._initialization},t.isInitializationNode=function(e){return(0,r.isObject)(e)&&Array.isArray(e.Initialization)&&e.Initialization.length>0},t.isIndexRangeNode=function(e){return(0,r.isObject)(e)&&null!=e._indexRange},t.provideSegmentInfoFromInitializationProperty=function(e,t){var i=(0,s.default)(e._initialization,t),r=o.URLHelper.concatBaseUrlWithPartial(l(t),i);return n(n({},(0,a.createInitSegmentInfoBase)(t)),{url:r,mediaURL:i})},t.extractBaseUrlFromRepresentation=l,t.provideSegmentInfoFromInitializationNodeProperty=function(e,t){var i=e.Initialization[0],r=function(e,t){return e._sourceURL?e._sourceURL:l(t)}(i,t),s=o.URLHelper.concatBaseUrlWithPartial(l(t),r),c=function(e){var t,i,n=null!=(i=null==(t=e._range)?void 0:t.split("-").map(function(e){return parseInt(e)}))?i:[];return n.length>1?{start:n[0],end:n[1]}:null}(i);return n(n({},(0,a.createInitSegmentInfoBase)(t)),{url:s,mediaURL:r,byteRange:c})},t.provideSegmentInfoFromIndexRangeProperty=function(e,t){var i=l(t),r={start:0,end:parseInt(e._indexRange.split("-")[0])-1};return n(n({},(0,a.createInitSegmentInfoBase)(t)),{url:i,mediaURL:i,byteRange:r})};var r=i(94685),o=i(58313),a=i(65439),s=i(4771);function l(e){return e.BaseURL?o.URLHelper.urlObjectToString(e.BaseURL[0]):""}},44908:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MPDLoader=void 0;var o=i(40306),a=i(3336),s=i(80813),l=i(3714),c=i(4129),u=i(85625),d=i(77401),h=i(57456),p=i(29669),f=i(91678),m=i(33436),g=i(89927),v=i(58313),y=i(78340);function b(e){return{url:e.url,statusCode:e.status,statusText:e.statusText}}function S(e){return(null==e?void 0:e._type)==="dynamic"}t.MPDLoader=function(){function e(e,t){var i=this;this.Kq=0,this.Sq=function(e){return e.body?i.Tq(e):(i.Iq.load(null,null).catch(function(){}),null)},this.Uq=function(e,t){i.Lq=function(e,t,i){if((null==t?void 0:t.name)===d.RequestError.Canceled)return null;if((null==t?void 0:t.name)===d.RequestError.TimedOut)return new a.PlayerError(o.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,b(e),"Failed to load DASH manifest: the request timed out.",i);var n=(null==e?void 0:e.status)===XMLHttpRequest.UNSENT?"Failed to load the DASH manifest due to CORS restrictions or because the client is offline.":"Failed to load DASH manifest: ".concat(e.status," ").concat(e.statusText,".");return new a.PlayerError(o.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,b(e),n,i)}(e,t,i.Dq.sourceIdentifier)},this.Cq=e,this.Dq=t,this.Jq=e.settings,this.Fq=new y.MPDParser(e,t),this.Eq=!1,this.Mq=e.eventHandler,this.Hq=[];var n={onFailure:this.Uq,maxRetries:this.Jq.MAX_MPD_RETRIES,requestType:p.HttpRequestType.MANIFEST_DASH,resetRetriesWhenOffline:!1};this.Iq=new c.DefaultContentLoader(e,n)}return e.prototype.Nq=function(e,t){if(this.Eq)return null;var i=e.trim();return this.Oq(i,t)},e.prototype.Oq=function(e,t){var i,n=this.Cq.serviceManager.get(s.ServiceName.ManifestCachingService),o=null!=(i=null==n?void 0:n.getParsedManifest(this.Gq))?i:this.Pq(e,t);return o?(S(o)||null==n||n.cacheParsedManifest(o,this.Gq),this.Hq=o.BaseURL?r(r([],o.Location,!0),o.BaseURL.map(function(e){return e.url}),!0):o.Location,this.Gq=this.Hq[0],o):null},e.prototype.Pq=function(e,t){return this.Fq.parse(e,this.Gq,t)},e.prototype.Qq=function(){this.Iq&&this.Iq.cancel(),this.Eq=!0,this.Gq=null},e.prototype.dispose=function(){this.Qq(),this.Iq.dispose(),this.Fq&&(this.Fq.dispose(),this.Fq=null),this.Jq=null},e.prototype.load=function(e){var t=this;this.Gq=e??this.Gq;var i=this.Gq;return this.Lq=null,e&&(this.Eq=!1),i?this.Rq(i).then(function(e){return t.Sq(e)}).then(function(e){return t.Gq!==i&&t.Hq.includes(t.Gq)&&(t.Cq.logger.debug("Switched manifest location to ".concat(t.Gq)),t.Cq.eventHandler.dispatchEvent(l.PlayerEvent.ContentLocationChanged,{sourceLocationId:i,targetLocationId:t.Gq,reason:l.ContentLocationChangedReason.Failover})),e}).catch(function(e){return t.Eq||(null==e?void 0:e.message)===d.RequestError.Canceled?Promise.reject():(t.Cq.logger.debug("Error during loading: "+t.Gq+": ",e),Promise.reject(e))}):(this.Cq.eventHandler.fireError(new a.PlayerError(o.ErrorCode.SOURCE_INVALID,void 0,"Cannot load the manifest: no URL was provided.",this.Dq.sourceIdentifier)),Promise.reject("No manifest url provided"))},e.prototype.Rq=function(e){var t,i=this,n=this.Cq.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(t){return t.getHttpResponse(e)});if(n)return Promise.resolve(n);var r=null==(t=this.Dq.source.options)?void 0:t.manifestWithCredentials;return this.Iq.load(e,p.HttpRequestMethod.GET,null,null,null,r,u.ManifestMimeType.Dash).catch(function(e){return i.Kq++,i.Kq<i.Hq.length?(i.Gq=v.URLHelper.replaceCdn(i.Gq,i.Hq[i.Kq]),i.Rq(i.Gq)):(i.Cq.logger.debug("no base url left, all tried"),i.Lq&&i.Mq.fireError(i.Lq),i.Lq=null,Promise.reject(e))})},e.prototype.updateRepresentation=function(e){return Promise.resolve(e)},e.prototype.stopRepresentationUpdate=function(e){return Promise.resolve()},e.prototype.Tq=function(e){var t,i,r,o,a=null!=(t=e.elapsedTime)?t:0;(0,h.isDownloadTimeInformationValid)(e)&&(this.Cq.logger.debug("Downloaded manifest in: ".concat(a.toFixed(2),", TTFB: ").concat(null==(i=e.timeToFirstByte)?void 0:i.toFixed(2))),this.Cq.store.dispatch((0,f.addMetricsValue)("default",m.MetricType.DownloadInformation,{bytes:e.length,time:a,timeToFirstByte:e.timeToFirstByte}))),this.Gq=e.url;var l=n({},this.Nq(e.body,(0,g.toSeconds)(Math.round(a))));return l._currentLoadingUrl=this.Gq,S(l)?(null==(o=null==(r=this.Cq)?void 0:r.settings)?void 0:o.INFINITE_RETRIES_FOR_LIVE)===!0&&this.Iq.setResetRetriesWhenOffline(!0):this.Cq.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(t){return t.cacheHttpResponse(e,e.url)}),l},e}()},78340:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var m in n)f[m]="access"===m?{}:n[m];for(var m in n.access)f.access[m]=n.access[m];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,i[p])("accessor"===l?{get:d.get,set:d.set}:d[c],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&r.unshift(s)}else(s=a(g))&&("field"===l?r.unshift(s):d[c]=s)}u&&Object.defineProperty(u,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseURL=t.MPDParser=void 0,t.mergeCommonAttributes=_,t.parseFraction=E;var a=i(25926),s=i(4224),l=i(3714),c=i(20213),u=i(69957),d=i(44468),h=i(34047),p=i(52424),f=i(68922),m=i(85434),g=i(58313),v=i(88052),y=i(62756),b=RegExp("_(.*:)?label","i"),S=["__text","_byteRange","_serviceLocation","_availabilityTimeOffset","_availabilityTimeComplete"];function _(e,t){if(e&&t)for(var i=["SegmentBase","SegmentList","SegmentTemplate"],r=0,o=i;r<o.length;r++){var a=o[r],s=Array.isArray(e[a])&&e[a][0],l=Array.isArray(t[a])&&t[a][0],c=i.find(function(t){return e[t]});l&&s?e[a]=[n(n({},t[a][0]),e[a][0])]:l&&!c&&(e[a]=t[a])}}function E(e){var t=e.split("/");return parseInt(t[0])/(parseInt(t[1])||1)}function T(e,t){return e.S.reduce(function(e,t){var i;return e+Number(t._d)*(Number(null!=(i=t._r)?i:"0")+1)},0)/t}function w(e){"string"==typeof e._audioSamplingRate&&(e._audioSamplingRate=parseFloat(e._audioSamplingRate))}function A(e){"string"==typeof e._height&&(e._height=parseFloat(e._height)),"string"==typeof e._width&&(e._width=parseFloat(e._width)),"string"==typeof e._frameRate&&(e._frameRate=E(e._frameRate))}function P(e){return"string"==typeof e?[{value:e}]:Array.isArray(e)?e.map(function(e){return{id:e._id,lang:e._lang,value:e.toString()}}):[]}function I(e){var t;return(null==(t=null==e?void 0:e[0])?void 0:t._schemeIdUri)==="http://dashif.org/guidelines/trickmode"}t.MPDParser=function(){var e,t,i=[];return e=function(){function t(e,t){this.aQ=r(this,i),this.aQ=e,this.bQ=t,this.cQ=e.renderer;var n=v.ModuleManager.get(y.ModuleName.XML);this.dQ=n.parseXML,this.oR=n.parseJSONtoXML}return t.prototype.pR=function(e,t){return(0,f.applyLabeling)({source:this.bQ.source,context:this.aQ,streamType:d.StreamType.Dash,labelingType:e},t)},t.prototype.qR=function(e){var t,i,n,r=null!=(n=null==(i=null==(t=e.Label)?void 0:t[0])?void 0:i.value)?n:e._label,o={mimeType:e._mimeType,lang:e._lang};return this.pR(f.LabelingType.Tracks,o)||r},t.prototype.rR=function(e,t){var i,n,r,o=null!=(r=null==(n=null==(i=t.Label)?void 0:i[0])?void 0:n.value)?r:t._label,a={id:t._id,mimeType:e,bitrate:t._bandwidth,qualityRanking:t._qualityRanking,width:t._width,height:t._height,frameRate:t._framerate};return this.pR(f.LabelingType.Qualities,a)||o},t.prototype.sR=function(e){var t=this,i=0;for(var n in e)if(e.hasOwnProperty(n)){if("Accessibility"===n&&this.tR(e,e[n]),"EssentialProperty"===n&&I(e[n]))return this.aQ.logger.debug("Ignoring trickplay track ".concat(e._id," from Period ").concat(e._periodId)),null;"Label"===n&&(e.Label=P(e[n])),"SegmentTemplate"===n&&this.uR(e[n]),"SegmentList"===n&&this.vR(e[n]),"SegmentTemplate"===n||0===n.indexOf("_")||Array.isArray(e[n])||
28(e[n]=[e[n]]),"Representation"===n&&(e[n]=e[n].filter(function(n){var r,o,a=n._mimeType||e._mimeType;if(n._mimeType=n._mimeType||e._mimeType,a&&(a=a.toLowerCase()),"AudioChannelConfiguration"in e){var s=e.AudioChannelConfiguration;null!=(r=(o=n).AudioChannelConfiguration)||(o.AudioChannelConfiguration=s)}_(n,e),w(n),A(n),"string"==typeof n._bandwidth&&(n._bandwidth=parseFloat(n._bandwidth)),n.Label&&(n.Label=P(n.Label)),n.SegmentTemplate&&t.uR(n.SegmentTemplate),n.SegmentList&&t.vR(n.SegmentList);var l=n._codecs||e._codecs;if(a&&(0===a.indexOf("application")||0===a.indexOf("text")||0===a.indexOf("image")||a.indexOf("mp2t")>=0))i++,n._label=t.rR(a,n);else if(a&&l){if(n._codecs=l,!h.CodecStringHelper.isSupportedByRenderer(t.cQ,a,l))return t.aQ.logger.debug("Representation not supported ("+a+'; codecs="'+l+'")'),!1;i++,n._label=t.rR(a,n)}return!0}))}return i>0?(!e.hasOwnProperty("_mimeType")&&e.Representation[0].hasOwnProperty("_mimeType")&&(e._mimeType=e.Representation[0]._mimeType),e._label=this.qR(e),e.Representation.sort(function(e,t){return e._bandwidth-t._bandwidth}),e):(this.aQ.logger.debug("AdaptationSet ".concat(e._id," from Period ").concat(e._periodId," has no supported representations")),null)},t.prototype.tR=function(t,i){t.ClosedCaptionLabels={};for(var n=e.filterAccessibilityTagsByScheme(i,"urn:scte:dash:cc:cea-608:2015"),r=e.extractLabelGroups(n),o=0;o<r.length;
vendor: 55,276 bytes, line 28
28o++){var a=r[o],s=a.split("="),l=2===s.length?[s[0],s[1]]:["CC"+o,a],c=l[0],u=l[1];t.ClosedCaptionLabels[c]={label:u,lang:u}}},t.prototype.uR=function(e){for(var t,i,n=0,r=e;n<r.length;n++){var o=r[n];if(o.hasOwnProperty("SegmentTimeline"))for(var a=Number(null!=(t=o._timescale)?t:"1"),s=0,l=null!=(i=o.SegmentTimeline)?i:[];s<l.length;s++){var c=l[s];c.totalDuration=T(c,a)}}},t.prototype.vR=function(e){for(var t,i,n,r,o,a,s=0,l=e;s<l.length;s++){var c=l[s];if(c.hasOwnProperty("SegmentTimeline")){for(var u=Number(null!=(t=c._timescale)?t:"1"),d=0,h=null!=(i=c.SegmentTimeline)?i:[];d<h.length;d++){var p=h[d];p.totalDuration=T(p,u)}c.totalDuration=null!=(o=null==(r=null==(n=c.SegmentTimeline)?void 0:n[0])?void 0:r.totalDuration)?o:0}else if(c.hasOwnProperty("_duration")&&c.hasOwnProperty("SegmentURL")){u=Number(null!=(a=c._timescale)?a:"1");var f=Number(c._duration)/u;c.totalDuration=f*c.SegmentURL.length}}},t.filterAccessibilityTagsByScheme=function(e,t){return e&&e.length>0?e.filter(function(e){return e._schemeIdUri===t}):[]},t.extractLabelGroups=function(e){for(var t=[],i=0,n=e;i<n.length;i++){var r=n[i];if(r._value){var o=r._value.split(";");t.push.apply(t,o)}}return t},t.prototype.wR=function(e,t){for(var i=0;i<e.length;i++)if("string"==typeof t&&e[i].url===t||"object"==typeof t&&e[i].url===t.url)return!0;return!1},t.prototype.xR=function(e,t,i,n){var r;Array.isArray(e.BaseURL)||(e.BaseURL=[e.BaseURL]);for(var o=[],a=0;a<e.BaseURL.length;a++){if((r=new C).customAttributes=[],null!=t&&(r.parentIds={},void 0!==t[0]&&null!==t[0]&&(r.parentIds.PeriodID=t[0]),void 0!==t[1]&&null!==t[1]&&(r.parentIds.AdaptationSetID=t[1]),void 0!==t[2]&&null!==t[2]&&(r.parentIds.RepresentationID=t[2])),"string"==typeof e.BaseURL[a])r.url=e.BaseURL[a];else if("object"==typeof e.BaseURL[a]){for(var s in e.BaseURL[a].hasOwnProperty("__text")&&(r.url=e.BaseURL[a].__text),e.BaseURL[a].hasOwnProperty("_serviceLocation")&&(r.serviceLocation=e.BaseURL[a]._serviceLocation),e.BaseURL[a].hasOwnProperty("_byteRange")&&(r.serviceLocation=e.BaseURL[a]._byteRange),e.BaseURL[a].hasOwnProperty("_availabilityTimeOffset")&&(r.serviceLocation=e.BaseURL[a]._availabilityTimeOffset),e.BaseURL[a].hasOwnProperty("_availabilityTimeComplete")&&(r.serviceLocation=e.BaseURL[a]._availabilityTimeComplete),e.BaseURL[a])if(e.BaseURL[a].hasOwnProperty(s)&&0===s.indexOf("_")&&-1===S.indexOf(s)){var l={};l[s.substring(1)]=e.BaseURL[a][s],r.customAttributes.push(l)}}o.push(r)}for(e.BaseURL=[],a=0;a<o.length;a++){var c=o[a];if(g.URLHelper.isUrlAbsolute(c))this.wR(e.BaseURL,c)||(c.isAbsolute=!0,n.push(c),e.BaseURL.push(c));else for(var u=0;u<i.length;u++){var d=i[u].toString();"/"!==i[u].url[i[u].url.length-1]&&(d+="/");var h=g.URLHelper.concatUrlParts(d,c);this.wR(e.BaseURL,h)||((r=new C).url=h,r.parentIds={},void 0!==t[0]&&null!==t[0]&&(r.parentIds.PeriodID=t[0]),void 0!==t[1]&&null!==t[1]&&(r.parentIds.AdaptationSetID=t[1]),void 0!==t[2]&&null!==t[2]&&(r.parentIds.RepresentationID=t[2]),r.serviceLocation=c.serviceLocation||i[u].serviceLocation,r.byteRange=c.byteRange||i[u].byteRange,r.availabilityTimeOffset=c.availabilityTimeOffset||i[u].availabilityTimeOffset,r.availabilityTimeComplete=c.availabilityTimeComplete||i[u].availabilityTimeComplete,e.BaseURL.push(r),n.push(r))}}return n},t.prototype.yR=function(e,t,i){var n=[];if(t=t||[],i=i||[],"object"!=typeof e)return e;for(var r in e.hasOwnProperty("BaseURL")&&(n=this.xR(e,i,t,n)),n.length<1&&(n=t),e)if(e.hasOwnProperty(r))if("object"==typeof e[r]&&0!==r.indexOf("_")){Array.isArray(e[r])||(e[r]=[e[r]]);for(var o=0;o<e[r].length;o++)if("BaseURL"!==r){var a=e[r][o]._id||o+"";e[r][o]=this.yR(e[r][o],n,i.concat([a])),"Representation"!==r||e[r][o].hasOwnProperty("BaseURL")||(e[r][o].BaseURL=n)}}else 0===r.indexOf("_")&&(b.test(r)||"_streamName"===r)&&(e._label=e[r],"_label"!==r&&delete e[r]);return e},t.prototype.zR=function(e){var t=p.DurationConverter.getDurationInSec(e._timeShiftBufferDepth);return(t=isNaN(t)?-1/0:-t)>0&&t<this.aQ.bufferSettings.getForwardTargetLevel()&&(t=this.aQ.bufferSettings.getForwardTargetLevel()),t},t.fillInMissingIds=function(e){Array.isArray(e.Period)||(e.Period=[e.Period]);for(var t=[],i=[],n=[],r=[],o=[],a=[],s=e.Period,l=0;l<s.length;l++){s[l].hasOwnProperty("_id")&&s[l]._id?t.push(s[l]._id):r.push(s[l]),Array.isArray(s[l].AdaptationSet)||(s[l].AdaptationSet=[s[l].AdaptationSet]);for(var c=s[l].AdaptationSet,u=0;u<c.length;u++){c[u].hasOwnProperty("_id")&&c[u]._id?i.push(c[u]._id):o.push(c[u]),c[u]._periodId=s[l]._id,Array.isArray(c[u].Representation)||(c[u].Representation=[c[u].Representation]);for(var d=c[u].Representation,h=0;h<d.length;h++)d[h].hasOwnProperty("_id")&&d[h]._id?n.push(d[h]._id):a.push(d[h])}}for(var p=0,f=0,m=r;f<m.length;f++){var g=m[f];do p++;while(t.includes(""+p));g._id=""+p;for(var v=0,y=g.AdaptationSet;v<y.length;v++)y[v]._periodId=g._id;t.push(""+p)}p=0;for(var b=0,S=o;b<S.length;b++){var _=S[b];do p++;while(i.includes(""+p));_._id=""+p,i.push(""+p)}p=0;for(var E=0,T=a;E<T.length;E++){var w=T[E];do p++;while(n.includes(""+p));w._id=""+p,n.push(""+p)}},t.prototype.AR=function(e){return"dynamic"===e._type&&(e._timeShiftBufferDepth=this.zR(e)),e},t.prototype.BR=function(e){return e._publishTime&&(e._publishTime=new Date(e._publishTime).getTime()),e},t.prototype.CR=function(e,t){return e.hasOwnProperty("Location")?Array.isArray(e.Location)||(e.Location=[e.Location]):e.Location=[t],e},t.prototype.DR=function(e){e.hasOwnProperty("BaseURL")&&!Array.isArray(e.BaseURL)&&(e.BaseURL=[e.BaseURL]);for(var t=[],i=0;i<e.Location.length;i++){var n=e.Location[i],r=new C;r.url=g.URLHelper.removeLastPathPart(n),t.push(r)}return this.yR(e,t,null)},t.prototype.ER=function(e,t){t._start?t.start=p.DurationConverter.getDurationInSec(t._start):(t.start=e.start+e.duration,t._start="PT"+t.start+"S")},t.prototype.FR=function(e){for(var t={start:0,duration:0,_start:"PT0S",_duration:"PT0S"},i=0;i<e.Period.length;i++){var n=e.Period[i];this.ER(t,n),n._duration?n.duration=p.DurationConverter.getDurationInSec(n._duration):(e.Period[i+1]?n.duration=(p.DurationConverter.getDurationInSec(e.Period[i+1]._start)||0)-n.start:e._mediaPresentationDuration?n.duration=(p.DurationConverter.getDurationInSec(e._mediaPresentationDuration)||0)-n.start:n.duration=1/0,n._duration="PT"+n.duration+"S"),this.aQ.logger.debug("period ".concat(i," (id=").concat(n._id,"): ").concat(n.start,"-").concat(n.start+n.duration)),e.Period[i]=n,t=n}return e},t.prototype.GR=function(e){for(var t,i,n=this,r=[],o=[],c=p.DurationConverter.getDurationInSec(e._mediaPresentationDuration),u=function(u){var h=e.Period[u];for(var f in t=p.DurationConverter.getDurationInSec(h._start),i=p.DurationConverter.getDurationInSec(h._duration),isNaN(t)&&0===o.length&&"static"===e._type&&(t=0),isNaN(t)&&o.length>0&&!isNaN(parseFloat(o[o.length-1].start))&&!isNaN(parseFloat(o[o.length-1].duration))&&(t=o[o.length-1].start+o[o.length-1].duration),isNaN(t)&&u===e.Period.length-1&&!isNaN(c)&&(i=c-t),o.length>0&&isNaN(parseFloat(o[o.length-1].duration))&&!isNaN(t)&&(o[o.length-1].duration=t-o[o.length-1].start),o.push({start:t,duration:i}),h)if(h.hasOwnProperty(f)&&["BaseURL","AdaptationSet","EventStream"].includes(f)){if(Array.isArray(h[f])||(h[f]=[h[f]]),"AdaptationSet"===f){var g=h[f].map(function(e){var t=e._mimeType;return!t&&e.Representation.length>0&&(t=e.Representation[0]._mimeType),m.MimeTypeHelper.extractContentType(t)}).filter(function(e,t,i){return i.indexOf(e)===t});h[f]=h[f].map(function(e){_(e,h);var t=n.sR(e);return null!==t&&!t.hasOwnProperty("ContentProtection")&&t.Representation[0].hasOwnProperty("ContentProtection")&&(t.ContentProtection=t.Representation[0].ContentProtection),t}).filter(function(e){return!!e});for(var v=function(e){h[f].some(function(t){return t._mimeType.includes(e)})||d.aQ.eventHandler.dispatchEvent(l.PlayerEvent.Warning,new a.PlayerWarning(s.WarningCode.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED))},y=0,b=g.filter(function(e){return"audio"===e||"video"===e});y<b.length;y++)v(b[y]);h[f].length<1&&r.push(u)}else if("EventStream"===f)for(var S=0,E=h[f].filter(function(e){return e.Event});S<E.length;S++)for(var T=0,w=E[S].Event;T<w.length;T++){var A=w[T];A.rawXmlRepresentation=d.oR({event:A})}}},d=this,h=0;h<e.Period.length;h++)u(h);return r.length>0&&"static"===e._type&&this.HR(r,o,c,e),e=this.FR(e)},t.prototype.HR=function(e,t,i,n){for(var r,o,a;!isNaN(parseInt(r=e.pop()));){if(o=t[r].start,a=t[r].duration,!isNaN(o)&&!isNaN(a)){isNaN(i)||(n._mediaPresentationDuration="PT"+(i-=a)+"S");for(var s=r+1;s<t.length;s++)isNaN(parseFloat(t[s].start))||(t[s].start=t[s].start-a,n.Period[s]._start="PT"+t[s].start+"S")}t.splice(r,1),n.Period.splice(r,1)}},t.parseUTCTimingInformation=function(e,t){var i,n,r,o;e.hasOwnProperty("UTCTiming")&&!Array.isArray(e.UTCTiming)&&(e.UTCTiming=[e.UTCTiming]);for(var a=[],s=function(s){var l={schemeIdUri:s._schemeIdUri,value:""};if("string"==typeof s._value)if(l.schemeIdUri.startsWith("urn:mpeg:dash:utc:http")){var c=null!=(r=null==(n=null==(i=e.BaseURL)?void 0:i[0])?void 0:n.url)?r:g.URLHelper.removeLastPathPart(t);l.value=(null!=(o=s._value.match(/\S+/g))?o:[s._value]).map(function(e){return g.URLHelper.concatBaseUrlWithPartial(c,e)}).join(" ")}else l.value=s._value;a.push(l)},l=0,c=(e.UTCTiming||[]).filter(function(e){return e.hasOwnProperty("_schemeIdUri")&&"string"==typeof e._schemeIdUri});l<c.length;l++)s(c[l]);return a.length>0?e.UTCTiming=a:delete e.UTCTiming,e},t.prototype.parse=function(t,i,n){var r,o=this.dQ(t,{decodeEntities:!0});if(!1===o.success)throw new c.PlayerError(c.ErrorCode.SOURCE_MANIFEST_INVALID,{errorMessage:o.error.message},"DASH manifest is not a valid XML",this.bQ.sourceIdentifier);var a=o.parsed.MPD;return a._requestTimestamp=Date.now(),a._downloadTime=n,a._type=null!=(r=a._type)?r:"static",e.fillInMissingIds(a),a=this.AR(a),a=this.BR(a),a=this.CR(a,i),a=this.DR(a),a=this.GR(a),(a=e.parseUTCTimingInformation(a,i))&&a.Period&&0!==a.Period.length?(a.originalDashManifest=t,a):(this.aQ.eventHandler.fireError(new c.PlayerError(c.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"DASH manifest contains no usable periods",this.bQ.sourceIdentifier)),null)},t.prototype.dispose=function(){this.cQ=null},t}(),function(){var n="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[(0,u.trackPerformance)("MPDParser.parse")],o(e,null,t,{kind:"method",name:"parse",static:!1,private:!1,access:{has:function(e){return"parse"in e},get:function(e){return e.parse}},metadata:n},null,i),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})}(),e}();var C=function(){function e(){this.url=null,this.parentIds=null,this.serviceLocation=null,this.byteRange=null,this.availabilityTimeOffset=null,this.availabilityTimeComplete=null,this.isAbsolute=!1,this.customAttributes=null}return e.prototype.toString=function(){return this.url?""+this.url:""},e}();t.BaseURL=C},66759:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DASHModuleDefinition=void 0;var n=i(62756),r=i(96693),o=i(44908),a=i(4771),s=i(63889),l=i(12054),c=i(31439),u={isIndexRangeNode:r.isIndexRangeNode,isInitializationNode:r.isInitializationNode,isInitializationStringNode:r.isInitializationStringNode},d={provideSegmentInfoFromInitializationProperty:r.provideSegmentInfoFromInitializationProperty,provideSegmentInfoFromInitializationNodeProperty:r.provideSegmentInfoFromInitializationNodeProperty,provideSegmentInfoFromIndexRangeProperty:r.provideSegmentInfoFromIndexRangeProperty};t.DASHModuleDefinition={name:n.ModuleName.DASH,module:function(){return{MPDLoader:o.MPDLoader,SegmentBaseMPDHandler:s.SegmentBaseMPDHandler,SegmentTemplateMPDHandler:l.SegmentTemplateMPDHandler,SegmentTimelineMPDHandler:c.SegmentTimelineMPDHandler,replaceAllPlaceholders:a.default,initSegmentInfoSourceDetectors:u,initSegmentInfoProviders:d}},dependencies:[n.ModuleName.EngineBitmovin,n.ModuleName.XML]},t.default=t.DASHModuleDefinition},63889:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentBaseMPDHandler=void 0;var r=i(80813),o=i(56481),a=i(4129),s=i(29669),l=i(79721),c=i(84568),u=i(58313),d=i(88052),h=i(62756),p=i(13422),f=i(59707),m=i(96693);function g(e,t,i){for(var n=[],r=0,o=e;r<o.length;r++){var a=o[r],s=a.referenced_size,l=a.subsegment_duration,c=t,u=c+s-1;n.push({byteRange:{start:c,end:u},time:i,duration:l}),t+=s,i+=l}return n}t.SegmentBaseMPDHandler=function(){function e(e,t){var i=this;this.context=e,this.Xq=0,this.Zq=-1,this.tr=(0,c.memoize)(this.Gr.bind(this),function(e,t){return t._internalId.representationId}),this.ur=function(e){var t=n({},i.qr.getRepresentationById(i.cq));return i.tr(e,t).then(function(e){var n;if(i.sr.dispatch((0,f.setRepresentationSegmentIndexAction)(t._internalId,e)),i.sr.dispatch((0,f.setRepresentationIsLoadingAction)(t._internalId,!1)),e||(i.sr.dispatch((0,f.setRepresentationSegmentIndexParsingErrorAction)(t._internalId,!0)),i.context.logger.warn("Error parsing SegmentIndex for representation with id ".concat(null==(n=i.cq)?void 0:n.key()))),i.Zq>=0){var r=i.Zq;i.Zq=-1,i.seekTo(r)}return i.pr=null,i.cq}).catch(function(e){throw i.tr.invalidate(),e})},this.vr=function(e){return i.pr=null,i.context.logger.warn("Getting segment index failed for representation with id ".concat(i.cq.key()," (Error: ").concat(JSON.stringify(e),")")),Promise.reject(JSON.stringify(e))},this.zr=function(e){return i.or?Promise.reject("fail"):new Promise(function(t,r){i.or=n(n({},e),{resolve:t,reject:r})})},this.Vq=e.settings;var o=t.sourceIdentifier;this.qr=e.serviceManager.get(r.ServiceName.ManifestService,o);var u=this.qr.getFirstPeriod()||{_id:l.DEFAULT_PERIOD_ID};this.Wq=u._id;var d=this.Vq.MAX_RETRIES;this.dq=new a.DefaultContentLoader(e,{maxRetries:d,retryDelay:this.Vq.RETRY_DELAY,requestType:s.HttpRequestType.MEDIA_SEGMENTINDEX}),this.sr=e.serviceManager.get(r.ServiceName.SourceStoreService,o)}return e.prototype.wr=function(e){var t,i,n=this.qr.getRepresentationById(e);if(n&&n.segmentIndex){var r=this.qr.getPeriodDuration(this.Wq);isFinite(r)&&(i=r/n.segmentIndex.references.length);var o=this.qr.getMediaPresentationDuration();0!==o&&(isFinite(o)&&(t=o/n.segmentIndex.references.length),i||(i=t)),n.segmentIndex&&(t=n.segmentIndex.references[0].duration/n.segmentIndex.timescale,i||(i=t))}return i},e.prototype.xr=function(){var e,t,i=this.qr.getRepresentationById(this.aq);if(null!=(t=null==(e=null==i?void 0:i.segmentIndex)?void 0:e.references)&&t.length){var n=i.segmentIndex.timescale||1,r=i.segmentIndex.references[this.Xq].time/n,o=this.getTimestampOffset(),a={url:"",byteRange:i.segmentIndex.references[this.Xq].byteRange,periodId:i._internalId.periodId,presentationTimeOffset:o,startTime:r-o};return this.Xq++,this.Yq=Math.floor(this.Xq*this.getSegmentDuration())+this.Dr(),a}},e.prototype.getInitSegmentInfo=function(e){var t=this.qr.getRepresentationById(e);return t&&t.SegmentBase&&t.BaseURL?n(n({},this.yr(t)),{codecs:(0,p.getCodecsFromAdaptationSet)(this.qr.getAdaptationSet(e))}):null},e.prototype.yr=function(e){var t,i=e.SegmentBase[0];return(0,m.isInitializationNode)(i)?(0,m.provideSegmentInfoFromInitializationNodeProperty)(i,e):e.segmentIndex?(0,m.isIndexRangeNode)(i)?(0,m.provideSegmentInfoFromIndexRangeProperty)(i,e):null:(this.context.logger.debug("SegmentIndex for representation ".concat(null==(t=e._internalId)?void 0:t.key()," not parsed yet!")),null)},e.prototype.resolvePendingSegmentInfoRequests=function(){if(this.or){var e=this.xr();e&&(this.or.resolve(e),this.or=null)}},e.prototype.setAdaptationSetId=function(e){this.bq=e,this.rr=e.adaptationSetId.split("-")[0],this.Ar(),this.resolvePendingSegmentInfoRequests()},e.prototype.Ar=function(){var e,t=this,i=this.qr.getRepresentationById(this.aq);i&&(e=i._bandwidth);var n=this.qr.getMatchingRepresentationsByBandwidth(this.bq,e),r=(this.aq?n.find(function(e){return e._internalId===t.aq}):null)??n[0];this.aq=r._internalId,this.Wq=this.aq.periodId,r.segmentIndex||(this.updateRepresentation(this.aq),r=this.qr.getRepresentationById(r._internalId)),r.hasOwnProperty("SegmentBase")&&r.SegmentBase.length>1&&this.context.logger.debug("Representation ".concat(r._id," has more than one SegmentBase! Taking the first one."))},e.prototype.setRepresentationId=function(e){return!!this.qr.getRepresentationById(e)&&(this.aq=e,this.seekTo(this.Yq),!0)},e.prototype.getSegmentInfos=function(){var e=this.getSeekableRange();return this.Br(e)},e.prototype.Br=function(e){var t=this,i={};return this.qr.getAdaptationSet(this.bq).Representation.forEach(function(n){var r=n._id;if(i[r]=[],1===n.BaseURL.length){var o=n.BaseURL[0].url;i[r].push({url:u.URLHelper.appendQueryParametersToUrl(o,t.Vq.QUERY_PARAMETERS)})}else for(var a=0;a<n.BaseURL.length;a++)o=u.URLHelper.appendQueryParametersToUrl(n.BaseURL[a].url,t.Vq.QUERY_PARAMETERS),i[r].push({url:o});i[r].forEach(function(t){t.duration=e.end-e.start,t.startTime=e.start})}),i},e.prototype.getNextSegmentInfo=function(e){var t=this.xr();return t?Promise.resolve(t):this.zr({time:e})},e.prototype.getSubtitleUrl=function(){var e=this.qr.getAvailableBaseURLsForRepresentation(this.aq);return e?e[0]:null},e.prototype.getStartNumber=function(){},e.prototype.getLiveEdgeTime=function(){return -1},e.prototype.getActualTimeShiftBufferDepth=function(){return this.qr.getTimeShiftBufferDepthSeconds()},e.prototype.Cr=function(){var e,t=this;return this.qr.getRepresentationById(this.aq)&&(e=this.wr(this.aq)),e<0&&(e=this.qr.getAdaptationSet(this.bq).Representation.map(function(e){return t.wr(e._internalId)}).find(function(e){return e>0})),isFinite(e)?[e,!0]:[1,!1]},e.prototype.getSegmentDuration=function(){return this.Cr()[0]},e.prototype.hasNext=function(){this.resolvePendingSegmentInfoRequests();var e=this.qr.getRepresentationById(this.aq);if(e){if(e.segmentIndex)return this.Xq<e.segmentIndex.references.length;if(!this.isSegmentInfoLoaded(this.aq))return!0}return!1},e.prototype.Dr=function(){var e,t,i;return null!=(i=null==(t=null==(e=this.qr)?void 0:e.findPeriod(this.Wq))?void 0:t.start)?i:0},e.prototype.seekTo=function(e){this.Yq=e;var t,i,n=this.Cr(),r=n[0],o=n[1];if((r<0||!o)&&(this.Zq=e),r>0&&o&&e>-1){var a=Math.max(e-this.Dr(),0),s=null==(t=this.qr)?void 0:t.getRepresentationById(this.aq);this.aq&&s&&(this.setIndex(Math.floor(a/r)),this.context.logger.debug("seekTo: ".concat(e,", new index: ").concat(this.Xq," (representationId: ").concat(null==(i=this.aq)?void 0:i.key(),", ").concat(s._mimeType,")")))}},e.prototype.getTimestampOffset=function(){var e=this.qr.findPeriod(this.Wq),t=this.qr.getRepresentationById(this.aq),i=t&&t.SegmentBase?t.SegmentBase[0]:null,n=0;if(i&&i.hasOwnProperty("_presentationTimeOffset")&&i.hasOwnProperty("_timescale")){var r=i.hasOwnProperty("_timescale")?parseInt(i._timescale):1;n=parseInt(i._presentationTimeOffset)/r}return e&&(n-=e.start),n},e.prototype.getIndex=function(){return this.Xq},e.prototype.setIndex=function(e){this.Xq=e},e.prototype.timeShift=function(e){},e.prototype.updateRepresentation=function(e){var t=this;if(this.isSegmentInfoLoaded(e))return this.context.logger.debug("Skipping updateRepresentation, SIDX info already loaded"),Promise.resolve(e);if(this.pr)return this.pr.catch(function(){}).then(function(){return t.updateRepresentation(e)});var i=void 0,n=void 0,r=this.qr.getRepresentationById(e);if(r){if(this.dq.isLoading())return;this.context.logger.debug("Going to load segment index (Representation Id: ".concat(null==e?void 0:e.key(),")")),i=(0,m.extractBaseUrlFromRepresentation)(r);var o=parseInt((n=r.SegmentBase[0]._indexRange).split("-")[1])+1;return this.sr.dispatch((0,f.setRepresentationAnchorPointAction)(r._internalId,o)),this.cq=e,this.pr=this.dq.load(i,s.HttpRequestMethod.GET,s.HttpResponseType.ARRAYBUFFER,null,{Range:"bytes="+n}).then(function(e){return t.ur(e.body)}).catch(this.vr)}return this.context.logger.log("Getting segment index failed (Invalid Representation Id: ".concat(null==e?void 0:e.key(),")")),Promise.reject(null)},e.prototype.isSegmentInfoLoaded=function(e){return this.qr.isSegmentInfoLoaded(e)},e.prototype.rewindOneSegment=function(){return this.Xq--,!(this.Xq<0&&(this.context.logger.debug("SegmentBase array index is smaller than 0, probably a discontinuity. Using 0."),this.setIndex(0),1))},e.prototype.getSeekableRange=function(){return{start:0,end:this.qr.getMediaPresentationDuration()}},e.prototype.getPendingSegmentInfoRequest=function(){return this.or},e.prototype.setPendingSegmentInfoRequest=function(e){this.or=e},e.prototype.canSwitchRepresentation=function(e){return!0},e.prototype.getLatestTimeForPossibleSwitch=function(e){return e},e.prototype.adjustTimeToNextSegmentStart=function(e){return e},e.prototype.dispose=function(){this.Vq=null,this.qr=null,this.aq=null,this.sr=null,this.dq=(0,o.dispose)(this.dq),this.or=null,this.tr=null},e.prototype.setTimestampOffset=function(e,t){},e.prototype.Er=function(){return this.context.serviceManager.get(r.ServiceName.SegmentService).get(this.rr).getSegment(this.getInitSegmentInfo(this.cq)).then(function(e){return e.read()}).then(function(e){return e.value})},e.prototype.Fr=function(e,t){return this.Er().then(function(i){var n=d.ModuleManager.get(h.ModuleName.ContainerWebM).WebMSegmentIndex,r=d.ModuleManager.get(h.ModuleName.ContainerWebM).WebMInitFile,o=new n(e),a=new r(i.getData()).segment.segmentInfo,s=function(e,t,i){for(var n=e.cues.flatMap(function(e){return e.cuePoints}),r=Array(n.length),o=t-function(e){var t=e.cues&&e.cues[0],i=t&&t.cuePoints&&t.cuePoints[0],n=i&&i.trackPositions&&i.trackPositions[0];return n&&n.clusterPosition||0}(e),a=n.length-1;a>=0;a--)r[a]={time:n[a].time,byteRange:{start:o+n[a].trackPositions[0].clusterPosition}},a===n.length-1?r[a].duration=i-r[a].time:(r[a].byteRange.end=r[a+1].byteRange.start-1,r[a].duration=r[a+1].time-r[a].time);return r}(o,parseInt(t.SegmentBase[0]._indexRange.split("-")[1])+1,a.getDuration()/a.getTimecodeScale());return{timescale:a.getTimecodeScale(),references:s}})},e.prototype.Gr=function(e,t){return"webm"===this.rr.split("/")[1]?this.Fr(e,t):Promise.resolve(this.Hr(e,t.anchorPoint))},e.prototype.Hr=function(e,t){if(!e||!t)return this.context.logger.debug("Error parsing SegmentIndex: Wrong Parameters"),null;var i=d.ModuleManager.get(h.ModuleName.ContainerMP4).parseBuffer(e).boxes.find(function(e){return"sidx"===e.type});return i?{timescale:i.timescale,references:g(i.references,i.first_offset+t,i.earliest_presentation_time)}:(this.context.logger.debug("Error parsing SegmentIndex: No sidx box found"),null)},e}()},12054:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTemplateMPDHandler=void 0,t.getTimescaleFromTemplate=p;var r=i(80813),o=i(77179),a=i(89927),s=i(23068),l=i(58313),c=i(16197),u=i(54053),d=i(96693),h=i(4771);function p(e){return e&&null!=e._timescale&&parseInt(e._timescale)||1}t.SegmentTemplateMPDHandler=function(){function e(e,t){this.context=e,this.sourceContext=t,this.settings=e.settings,this.manifestService=e.serviceManager.get(r.ServiceName.ManifestService,t.sourceIdentifier),this.time=0}return e.prototype.getStartNumber=function(){var e=this.getTemplate(this.currentRepresentationId);return e&&e.hasOwnProperty("_startNumber")?parseInt(e._startNumber):1},e.prototype.Jr=function(){var e=this.getTemplate(this.currentRepresentationId);return e&&e._endNumber?parseInt(e._endNumber):NaN},e.prototype.setAdaptationSetId=function(e,t,i){void 0===t&&(t=null),this.currentAdaptationSetId=e,this.currentRepresentationId=t;var n=!this.currentRepresentationId||!!this.manifestService.getRepresentationById(this.currentRepresentationId),r=this.manifestService.getAdaptationSet(this.currentAdaptationSetId);this.currentRepresentationId&&n||(this.currentRepresentationId=r.Representation[0]._internalId),this.getTemplate(this.currentRepresentationId)?this.Ir||this.setIndex(this.getStartNumber()):this.context.logger.debug("No template found in SegmentTemplateMPDHandler."),this.resolvePendingSegmentInfoRequests()},e.prototype.getCurrentPeriod=function(){return this.manifestService.getPeriod(this.currentRepresentationId||this.currentAdaptationSetId)},e.prototype.setRepresentationId=function(e){return!!this.manifestService.getRepresentationById(e)&&(this.currentRepresentationId=e,!0)},e.prototype.getInitSegmentInfo=function(e){var t=this.getTemplate(e),i=this.manifestService.getRepresentationById(e);return(0,d.isInitializationStringNode)(t)?(0,d.provideSegmentInfoFromInitializationProperty)(t,i):null},e.prototype.Kr=function(){return parseFloat(this.getTemplate(this.currentRepresentationId)._availabilityTimeOffset)||0},e.prototype.Lr=function(e){var t=this.getExpectedPresentationTime(e);return t-=this.Kr(),(0,a.toMilliSeconds)(t+this.getSegmentDuration()+this.settings.LIVE_EDGE_DISTANCE)},e.prototype.getTemplate=function(e){var t=this.manifestService.getRepresentationById(e);if(null!=t&&t.SegmentTemplate)return t.SegmentTemplate[0]},e.prototype.Mr=function(){var e;return(null==(e=this.getCurrentPeriod())?void 0:e.start)||0},e.prototype.isExpectedSegmentPlaybackTimeExceedingPeriodDuration=function(e){var t=this.Jr();if(isFinite(t))return e>t;var i=this.getCurrentPeriod(),n=null!=i&&i._duration?i.start+i.duration:1/0;return this.getExpectedPresentationTime(e)>=n},e.prototype.checkIfSegmentAvailable=function(e){return this.Lr(e)<=Date.now()},e.prototype.getNextSegmentInfo_=function(){var e={isInitSegment:!1,presentationTimeOffset:this.getTimestampOffset()},t=this.getTemplate(this.currentRepresentationId);if(!t||!t._media||!this.manifestService.representationExists(this.currentRepresentationId))return null;if(this.manifestService.isLive()){var i=this.checkIfSegmentAvailable(this.Ir),n=this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Ir);if(!i||n)return null;e.wallClockTime=this.Lr(this.Ir)-(0,a.toMilliSeconds)(this.getSegmentDuration())}var r=this.manifestService.getRepresentationById(this.currentRepresentationId);return e.periodId=null==r?void 0:r._internalId.periodId,e.url=(0,h.default)(t._media,r,this.Ir,this.time),e.segmentNumber=this.Ir,e.startTime=this.getExpectedPresentationTime(this.Ir),this.setIndex(this.Ir+1),e},e.prototype.getNextSegmentInfo=function(e){var t=this.getNextSegmentInfo_();return t?Promise.resolve(t):this.queueSegmentInfoRequest({time:e})},e.prototype.queueSegmentInfoRequest=function(e){var t=this;return this.pendingSegmentInfoRequest?Promise.reject("fail"):new Promise(function(i,r){t.pendingSegmentInfoRequest=n(n({},e),{resolve:i,reject:r})})},e.prototype.resolvePendingSegmentInfoRequests=function(){if(this.pendingSegmentInfoRequest){var e=this.getNextSegmentInfo_(),t=this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Ir);e?(this.pendingSegmentInfoRequest.resolve(e),this.pendingSegmentInfoRequest=null):t&&(this.pendingSegmentInfoRequest.reject(u.SegmentInfoError.SEGMENT_EXCEEDING_PERIOD_DURATION),this.pendingSegmentInfoRequest=null)}},e.prototype.getSegmentInfos=function(e){var t=this,i={};return this.manifestService.getAdaptationSet(this.currentRepresentationId).Representation.forEach(function(n){var r,o,a,s=n._internalId,c=t.getTemplate(s),u=[],d=t.getSeekableRange().end-t.getSeekableRange().start,p=0,f=t.manifestService.isLive();f?(a=t.time-d,r=t.Ir-d/t.getSegmentDuration(),o=t.Ir):(a=c._presentationTimeOffset||0,o=parseInt((r=0)+d/t.getSegmentDuration()));for(var m=r;m<=o;m++){var g={};g.duration=t.getSegmentDuration(),g.startTime=f?t.getExpectedPresentationTime(m):p*t.getSegmentDuration();var v=(0,h.default)(c._media,n,r+p,a+p*t.getSegmentDuration());g.url=e?l.URLHelper.concatBaseUrlWithPartial(e,v):v,g.url=l.URLHelper.appendQueryParametersToUrl(g.url,t.settings.QUERY_PARAMETERS),u.push(g),p++}i[s.representationId]=u}),i},e.prototype.getSubtitleUrl=function(){var e=this.manifestService.getRepresentationById(this.currentRepresentationId).BaseURL[0];return e.url||e},e.prototype.Nr=function(){var e=this.getTemplate(this.currentRepresentationId);return e&&e.hasOwnProperty("_liveEdgeNumber")},e.prototype.Or=function(){if(this.Nr())return parseInt(this.getTemplate(this.currentRepresentationId)._liveEdgeNumber)},e.prototype.getSegmentDuration=function(){var e=this.getTemplate(this.currentRepresentationId),t=Number(null==e?void 0:e._duration),i=Number(null==e?void 0:e._timescale);return isNaN(t)?1:isNaN(i)?t:t/i},e.prototype.seekTo=function(e){e>-1&&this.setIndex(this.Pr(e))},e.prototype.getTimescale=function(){return p(this.getTemplate(this.currentRepresentationId))},e.prototype.getExpectedPresentationTime=function(e){var t=this.Mr();return(e-this.getStartNumber())*this.getSegmentDuration()+t},e.prototype.Pr=function(e){var t=this.getSegmentDuration();return Math.floor(Math.max(e-this.Mr()-t/2,0)/t)+this.getStartNumber()},e.prototype.getActualTimeShiftBufferDepth=function(){var e=this.Qr();return e.end-e.start},e.prototype.Qr=function(){var e=(0,o.getStartTimeOffset)(this.Rr().getState()),t=this.manifestService.getMediaPresentationDuration()||1/0;return this.manifestService.isLive()?this.Tr(t):this.Sr(e,t)},e.prototype.Rr=function(){return this.context.serviceManager.get(r.ServiceName.SourceStoreService,this.sourceContext.sourceIdentifier)},e.prototype.Sr=function(e,t){return{start:e,end:isFinite(t)?e+t:0}},e.prototype.Tr=function(e){var t=(this.manifestService.getFirstPeriod()||{start:0}).start,i=Math.min(-1*this.manifestService.getTimeShiftBufferDepthSeconds(),(0,a.toSeconds)(Date.now()-this.manifestService.getAvailabilityStartTime())),n=this.getLiveEdgeTime();return{start:Math.max(t,n-i),end:n}},e.prototype.getSeekableRange=function(){var e=this.Qr();if(this.manifestService.isLive()){var t=this.manifestService.getDesiredDistanceToLiveEdge();e.end=Math.max(e.end-t,e.start)}return e},e.prototype.hasNext=function(e){var t=this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Ir),i=Math.ceil(e/this.getSegmentDuration())+this.getStartNumber()-1;return!t&&this.Ir<=i},e.prototype.getTimestampOffset=function(){var e=this.getCurrentPeriod(),t=0,i=this.getTemplate(this.currentRepresentationId);return i&&i._presentationTimeOffset&&(t=i._presentationTimeOffset/this.getTimescale()),e&&(t-=e.start),t},e.prototype.Ur=function(e,t){var i=this.manifestService.getPeriod(e)||this.getCurrentPeriod();return this.manifestService.isLastPeriod(e.periodId)?i&&(0,s.isNumber)(i.duration)&&isFinite(i.duration)?i.duration:i&&i.start?(0,a.toSeconds)(t)-i.start:this.manifestService.calculateCumulativePeriodDuration(e.periodId):this.manifestService.getPeriodDuration(e.periodId)},e.prototype.Vr=function(e){var t=Date.now(),i=(0,a.toSeconds)(t-this.manifestService.getRequestTimestamp());return this.Nr()?this.Or()+Math.floor(i/this.getSegmentDuration()):this.manifestService.isLive()&&this.manifestService.getManifest()._availabilityStartTime?Math.floor(this.Ur(e,t)/this.getSegmentDuration()+this.getStartNumber()):this.getStartNumber()},e.prototype.Wr=function(e){return Math.max(this.Vr(e),this.getStartNumber())},e.prototype.getIndex=function(){return this.Ir},e.prototype.setIndex=function(e){this.Ir=e},e.prototype.getLiveEdgeTime=function(){return(0,a.toSeconds)(Date.now())},e.prototype.timeShift=function(e,t){if(void 0===t&&(t=this.currentRepresentationId.periodId),this.manifestService.isLive()){var i=this.Ir,n=this.Wr(new c.PeriodId(t));0===e?(this.setIndex(n),this.context.logger.debug("timeShift changes index from "+i+" to "+this.Ir+" [back to live edge]")):(this.setIndex(n+Math.floor(e/this.getSegmentDuration())),this.Ir<this.getStartNumber()&&this.setIndex(this.getStartNumber()),this.context.logger.debug("timeShift changes index from "+i+" to "+this.Ir))}},e.prototype.updateRepresentation=function(e){return this.currentRepresentationId=e,Promise.resolve(e)},e.prototype.isSegmentInfoLoaded=function(e){return!0},e.prototype.rewindOneSegment=function(){return this.setIndex(this.Ir-1),this.Ir<this.getStartNumber()&&(this.context.logger.debug("Template number is smaller than start number, probably a discontinuity. Using start number."),this.setIndex(this.getStartNumber())),!0},e.prototype.getPendingSegmentInfoRequest=function(){return this.pendingSegmentInfoRequest},e.prototype.setPendingSegmentInfoRequest=function(e){this.pendingSegmentInfoRequest=e},e.prototype.canSwitchRepresentation=function(e){return!0},e.prototype.getLatestTimeForPossibleSwitch=function(e){return e},e.prototype.adjustTimeToNextSegmentStart=function(e){return e},e.prototype.dispose=function(){this.settings=null,this.manifestService=null,this.currentRepresentationId=null,this.currentAdaptationSetId=null,this.pendingSegmentInfoRequest=null},e.prototype.setTimestampOffset=function(e,t){},e}()},31439:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimelineMPDHandler=void 0;var o=i(74853),a=i(89927),s=i(58313),l=i(54053),c=i(4771),u=i(12054),d=i(39761);function h(e,t,i){var n;(n=e.entries).push.apply(n,t),e.latestTime+=i*t.length,e.latestOriginalTime+=i*t.length,e.index+=t.length}t.SegmentTimelineMPDHandler=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.Xr=0,n.Yr=null,n.Zr=[],n.ar=!0,n.er=!1,n.br=1,n.cr=0,n.dr=0,n}return n(t,e),t.prototype.setAdaptationSetId=function(t,i,n){void 0===i&&(i=null),void 0===n&&(n={isPeriodSwitch:!1,isManifestUpdate:!1}),this.currentAdaptationSetId=t,this.currentRepresentationId=i;var r=!this.currentRepresentationId||!!this.manifestService.getRepresentationById(this.currentRepresentationId),o=this.manifestService.getAdaptationSet(this.currentAdaptationSetId);this.currentRepresentationId&&r||(this.currentRepresentationId=o.Representation[0]._internalId);var a=this.getTemplate(this.currentRepresentationId);a?(this.setTimeline(a,n.isPeriodSwitch),this.getIndex()||e.prototype.setIndex.call(this,this.getStartNumber())):this.context.logger.debug("No template found in SegmentTemplateMPDHandler."),this.resolvePendingSegmentInfoRequests()},t.prototype.setRepresentationId=function(e){if(this.manifestService.getRepresentationById(e)){this.currentRepresentationId=e;var t=this.getTemplate(this.currentRepresentationId);return t&&this.setTimeline(t),!0}return!1},t.prototype.fr=function(e){return(null==e?void 0:e.start)!=null&&isFinite(e.start)?e.start:0},t.prototype.gr=function(){this.manifestService.isLive()&&this.ar&&(this.er||this.timeShift(0),this.ar=!1)},t.prototype.hr=function(e){return!(null!=e&&e._media)||!this.manifestService.representationExists(this.currentRepresentationId)},t.prototype.ir=function(e){var t=this.Zr[this.Xr];t&&(e.wallClockTime=(0,a.toMilliSeconds)(t.ot/this.br-this.getTimestampOffset()))},t.prototype.getNextSegmentInfo_=function(){var t,i,n={isInitSegment:!1,presentationTimeOffset:this.getTimestampOffset()},r=this.getTemplate(this.currentRepresentationId);if(this.hr(r)||(this.gr(),!(this.Zr.length>0&&this.Xr<this.Zr.length)))return null;var o=this.Zr[this.Xr];e.prototype.setIndex.call(this,o.i),this.time=o.ot,n.duration=o.duration,n.mediaPresentationTime=o.t,n.segmentNumber=o.i;var a=null!=(i=null==(t=this.getCurrentPeriod())?void 0:t.start)?i:0;if(n.startTime=o.playbackTime+a,this.manifestService.isLive()){if(this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Xr))return null;this.ir(n)}var s=this.manifestService.getRepresentationById(this.currentRepresentationId);return s?(n.periodId=null==s?void 0:s._internalId.periodId,n.url=(0,c.default)(r._media,s,this.getIndex(),this.time),e.prototype.setIndex.call(this,this.getIndex()+1),this.Xr++,n):null},t.prototype.getNextSegmentInfo=function(e){var t=this.getNextSegmentInfo_();return t?Promise.resolve(t):this.queueSegmentInfoRequest({time:e})},t.prototype.queueSegmentInfoRequest=function(e){var t=this;return this.pendingSegmentInfoRequest?Promise.reject("fail"):new Promise(function(i,n){t.pendingSegmentInfoRequest=r(r({},e),{resolve:i,reject:n})})},t.prototype.resolvePendingSegmentInfoRequests=function(){if(this.pendingSegmentInfoRequest){var e=this.getNextSegmentInfo_();if(e)this.pendingSegmentInfoRequest.resolve(e),this.pendingSegmentInfoRequest=null;else if(!this.manifestService.isSmoothManifest()){var t=this.getCurrentPeriod();if(isFinite(t.duration)){var i=this.getTimelineDuration(),n=i/this.getTimelineLength(),r=t.start+i,o=t.duration-n/2;isFinite(o)&&r>=o&&(this.pendingSegmentInfoRequest.reject(l.SegmentInfoError.PERIOD_COMPLETE),this.pendingSegmentInfoRequest=null)}}}},t.prototype.getSegmentInfos=function(e){var t=this,i={};return this.manifestService.getAdaptationSet(this.currentRepresentationId).Representation.forEach(function(n){for(var r=n._internalId,o=t.getTemplate(r),a=[],l=t.manifestService.isLive(),u=t.getTimelineLength(),d=0,h=0;h<u;h++){var p=t.Zr[h],f={};f.duration=p.duration,l?f.startTime=t.getExpectedPresentationTime(h):(f.startTime=d,d+=p.duration);var m=(0,c.default)(o._media,n,p.i,p.ot);f.url=e?s.URLHelper.concatBaseUrlWithPartial(e,m):m,f.url=s.URLHelper.appendQueryParametersToUrl(f.url,t.settings.QUERY_PARAMETERS),a.push(f)}i[r.representationId]=a}),i},t.prototype.getSubtitleUrl=function(){var e=this.manifestService.getRepresentationById(this.currentRepresentationId).BaseURL[0];return e.url||e},t.prototype.getSegmentDuration=function(){return this.getSegmentDurationCurrentElement()},t.prototype.seekTo=function(t){if(t>-1){var i=this.fr(this.getCurrentPeriod());this.er=!1,isFinite(i)&&(t-=i);for(var n=1;n<this.Zr.length;n++)if(this.Zr[n].playbackTime>t)return this.Xr=n-1,e.prototype.setIndex.call(this,this.Zr[this.Xr].i),this.ar=!1,this.getIndex();this.Xr=Math.max(this.Zr.length-1,0)}return e.prototype.setIndex.call(this,this.Zr[this.Xr].i),this.getIndex()},t.prototype.getExpectedPresentationTime=function(e){var t,i;return(null!=(i=null==(t=this.getCurrentPeriod())?void 0:t.start)?i:0)+this.Zr[e].playbackTime},t.prototype.hasNext=function(e){if(this.Xr<this.Zr.length){var t=this.Zr[0].t,i=this.Zr[this.Xr];if(this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Xr))return!1;if(i)return i.t-t<=e*this.br}return!1},t.prototype.getTimestampOffset=function(){var e=this.getCurrentPeriod(),t=this.cr/this.br;return e&&(t-=e.start),t},t.prototype.setIndex=function(t){if(e.prototype.setIndex.call(this,t),this.Zr&&this.Zr.length>0)for(var i=0;i<this.Zr.length;i++)this.Zr[i].i===t&&(this.Xr=i)},t.prototype.getLiveEdgeTime=function(){if(!this.manifestService.isLive())return -1;var t=this.manifestService.getLastPeriod(),i=this.getCurrentPeriod();if(null==t||(null==i?void 0:i._id)===t._id)return this.fr(i)+this.jr()/this.br;var n=(0,d.getFirstAvSegmentTemplateFromPeriod)(t);return null!=n&&n.SegmentTimeline?this.fr(t)+(0,d.calculateTimelineEnd)(n):e.prototype.getLiveEdgeTime.call(this)},t.prototype.jr=function(){if(!this.Zr.length)return 0;var e=this.Zr[this.Zr.length-1];return e.t+e.d},t.prototype.timeShift=function(t,i){if(this.manifestService.isLive()&&!(this.Zr.length<1)){this.er=!1;for(var n=this.Zr[0].t,r=this.jr(),o=t*this.br,a=Math.max(this.dr,this.settings.MIN_TIMELINE_LIVE_OFFSET)*this.br,s=Math.max(n+a,r+o),l=this.Zr.length-1;l>=0;l--)if(this.Zr[l].t<=s){this.Xr=l;break}(this.Xr>=this.Zr.length||this.Xr<=0)&&(this.context.logger.debug("timeline index ran out of bounds on timeShift, falling back to 0"),this.Xr=0),this.context.logger.debug("timeShift changes index to "+this.Xr),this.ar=!1,e.prototype.setIndex.call(this,this.Zr[this.Xr].i)}},t.prototype.updateRepresentation=function(e){return this.currentRepresentationId=e,Promise.resolve(e)},t.prototype.isSegmentInfoLoaded=function(e){return!0},t.prototype.rewindOneSegment=function(){return this.Xr--,this.Xr<0&&(this.context.logger.debug("Timeline array index is smaller than 0, probably a discontinuity. Using 0."),this.Xr=0),!0},t.prototype.kr=function(e,t){for(var i,n={entries:[],latestTime:0,latestOriginalTime:0,lastPreviousTimelineEntryIndex:0,index:this.getStartNumber()},r=0,o=0,a=0,s=e;a<s.length;a++)for(var l=0,c=null!=(i=s[a].S)?i:[];l<c.length;l++){var u=c[l],p=(0,d.parseStringToNumber)(u._r),f=parseInt(u._d);if(u.hasOwnProperty("_t")){var m=(0,d.parseStringToNumber)(u._t);n.latestOriginalTime=m,n.latestTime=m-this.cr}for(;n.latestTime+f<=0&&p>=0;)this.context.logger.debug("Negative timeline entry detected, discarding segment. Time: ".concat(n.latestTime,", presentationTimeOffset: ").concat(this.cr,".")),n.latestTime+=f,n.latestOriginalTime+=f,p--;for(var g=this.nr(n,t,f,p),v=0;v<g.length;v++)g[v].i=n.index+v;r+=g.length,h(n,g,f);var y=p-g.length+1;o+=y,h(n,this.mr(n,y,f),f)}return this.lr(r,o),n.entries},t.prototype.lr=function(e,t){var i;this.context.logger.debug("[SegmentTimeline][".concat(null==(i=this.currentRepresentationId)?void 0:i.representationId,"] Re-using ").concat(e," entries, adding ").concat(t," new entries"))},t.prototype.mr=function(e,t,i){for(var n=[],r=0;r<t;r++){var o=e.latestTime+i*r,a={d:i,t:o,ot:e.latestOriginalTime+i*r,i:e.index+r,playbackTime:o/this.br,duration:i/this.br};n.push(a)}return n},t.prototype.nr=function(e,t,i,n){var r=(0,o.findIndexWithin)(t,e.lastPreviousTimelineEntryIndex,t.length,function(t){return t.t===e.latestTime&&t.d===i});if(-1===r)return[];var a=function(e,t,i,n){for(var r=e[t].t,o=n;o>0;o--){var a=t+o,s=e[a],l=r+i*o;if(s&&s.t===l&&s.d===i)return a}return t}(t,r,i,n);return e.lastPreviousTimelineEntryIndex=a,t.slice(r,a+1)},t.prototype.getTimelineDuration=function(){var e=this;return this.Zr&&this.Zr.length>0&&isFinite(this.br)?this.Zr.reduce(function(t,i){return t+i.d/e.br},0):0},t.prototype.getTimelineLength=function(){return this.Zr?this.Zr.length:0},t.prototype.setTimeline=function(e,t){void 0===t&&(t=!1);var i=e.SegmentTimeline;if(this.er=this.er||!!t,i&&this.Yr!==i){this.Yr=i;var n=this.ys(),r=this.getTimescale();this.br=r,this.cr=parseFloat(String(e._presentationTimeOffset))||0;var o=this.kr(i,this.Zr);o.length>0&&(this.dr=o[0].d/r),this.zs(o,r,n),this.Zr=o}},t.prototype.ys=function(){return this.Zr&&this.Zr.length>0?this.br:this.getTimescale()},t.prototype.zs=function(t,i,n){var r,o=!1;if(this.Zr&&this.Zr.length>0?r=(o=this.Xr>=this.Zr.length)?this.Zr[this.Zr.length-1]:this.Zr[this.Xr]:(this.Xr=0,e.prototype.setIndex.call(this,0)),r){for(var a=t.length-1;a>=0;a--)if(m(t[a],i,r,n)){this.Xr=a+ +!!o,e.prototype.setIndex.call(this,t[a].i+ +!!o);break}}},t.prototype.getSegmentDurationCurrentElement=function(){var e=this.Zr[this.Xr];return e?e.d/this.br:1},t.prototype.dispose=function(){this.settings=null,this.Zr=[]},t}(u.SegmentTemplateMPDHandler);var p=1e8;function f(e){return Math.round(e*p)/p}function m(e,t,i,n){var r=f(e.t/t),o=f(r+e.d/t),a=f(i.t/n);return r<=a&&a<o}},4771:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i,r){var o=e.match(/(\$((RepresentationID)|(Bandwidth)|(Time)|(Number(%([\d]*[A-Za-z]))?)|())\$)/g),a=null!=i,s=t.hasOwnProperty("_bandwidth"),l=null!=r;function c(e){if(0===e.indexOf("Number")&&a){if(e.indexOf("%")>-1){var n=function(e){var t=parseInt(e.substring(0,e.length-1)),i=e[e.length-1].toLowerCase(),n=0!==e[e.length-1].indexOf(i);return[0===i.indexOf("o")?8:0===i.indexOf("x")?16:(i.indexOf("d"),10),t,n]}(e.substring(e.indexOf("%")+1)),o=n[0],c=n[1],u=n[2];return function(e,t){for(;e.length<t;)e="0"+e;return e}(function(e,t){return t?e.toUpperCase():e.toLowerCase()}(i.toString(o),u),c)}return String(i)}return 0===e.indexOf("RepresentationID")?t._internalId.representationId:0===e.indexOf("Bandwidth")&&s?String(t._bandwidth):0===e.indexOf("Time")&&l?String(r):""===e?"$":void 0}var u=[].concat(o).filter(function(e){return e}).map(function(e){return e.substring(1,e.length-1)}).map(function(e){return[e,c(e)]}).filter(function(e){return e[1].length>0}).reduce(function(e,t){var i=t[0],n=t[1];return e.replace("$".concat(i,"$"),n)},e);return(0,n.forceReallocation)(u)};var n=i(20649)},39761:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getFirstAvSegmentTemplateFromPeriod=function(e){var t,i=e.AdaptationSet.find(function(e){return n.MimeTypeHelper.isAV(e._mimeType)}),r=null==(t=null==i?void 0:i.Representation[0])?void 0:t.SegmentTemplate;return null==r?void 0:r[0]},t.calculateTimelineEnd=function(e){for(var t,i,n=parseFloat(String(e._presentationTimeOffset))||0,a=(0,r.getTimescaleFromTemplate)(e),s=0,l=0,c=null!=(t=e.SegmentTimeline)?t:[];l<c.length;l++)for(var u=0,d=null!=(i=c[l].S)?i:[];u<d.length;u++){var h=d[u],p=o(h._r),f=parseInt(h._d);h.hasOwnProperty("_t")&&(s=Math.max(0,o(h._t)-n)),s+=f*(p+1)}return s/a},t.parseStringToNumber=o;var n=i(85434),r=i(12054);function o(e,t){return void 0===t&&(t=0),e?parseInt(e):t}}},function(e){return function(){return e(e.s=66759)}()}])})}()}(bitmovinplayerDash);var bitmovinplayerDashExports=bitmovinplayerDash.exports;let DashModule=getDefaultExportFromCjs$1(bitmovinplayerDashExports);var bitmovinplayerContainerMp4={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[270],{97441:function(e,t){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function n(e){return void 0===e&&(e=0),{offset:e}}function r(e){return 0===e.length?null:e[0]}function o(e,t){var i=t.indexOf("."),n=[];if(-1===i)for(var r=0;r<e.length;r++)e[r].type===t&&n.push(e[r]);else{var o=t.substring(0,i),a=t.substring(i+1);for(r=0;r<e.length;r++)e[r].type===o&&(n=n.concat(e[r].list(a)))}return n}function a(e,i){e.forEach(function(e){t.ISOBox.prototype._boxParsers[e]=i})}function s(e,t){return e._cursor.offset-e._raw.byteOffset+t<=e.size}Object.defineProperty(t,"__esModule",{value:!0}),t.ISOBox=t.ISOFile=t.ISOBoxer=void 0,t.ISOBoxer={parseBuffer:function(e,i){return void 0===i&&(i={}),new t.ISOFile(e,i).parse()}},t.ISOFile=function(e,t){void 0===t&&(t={}),this.options=i({},t),this.options.iv_size=t.iv_size||8,e&&(this._raw=new DataView(e)),this._cursor=n(),this.boxes=[]},t.ISOFile.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},t.ISOFile.prototype.fetchAll=function(e,i){var n=[];return t.ISOFile._sweep.call(this,e,n,i),n},t.ISOFile.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=t.ISOBox.parse(this);if(void 0===e.type)break;this.boxes.push(e)}return this},t.ISOFile._sweep=function(e,i,n){for(var r in this.type&&this.type===e&&i.push(this),this.boxes){if(i.length&&n)return;t.ISOFile._sweep.call(this.boxes[r],e,i,n)}},t.ISOFile.prototype.get=function(e){return r(this.list(e))},t.ISOFile.prototype.list=function(e){return o(this.boxes,e)},t.ISOBox=function(){this._cursor=n()},t.ISOBox.parse=function(e){var i=new t.ISOBox;return i._offset=e._cursor.offset,i._root=e._root?e._root:e,i._raw=e._raw,i._parent=e,i._parseBox(),e._cursor.offset=i._raw.byteOffset+i._raw.byteLength,i},t.ISOBox.prototype.list=function(e){return o(this.boxes||this.entries||[],e)},t.ISOBox.prototype.get=function(e){return r(this.list(e))},t.ISOBox.prototype._readUint64=function(){return 0x100000000*this._raw.getUint32(this._cursor.offset-this._raw.byteOffset)+this._raw.getUint32(this._cursor.offset-this._raw.byteOffset+4)},t.ISOBox.prototype._readInt64=function(){return 0x100000000*this._raw.getInt32(this._cursor.offset-this._raw.byteOffset)+this._raw.getInt32(this._cursor.offset-this._raw.byteOffset+4)},t.ISOBox.prototype._readInt=function(e){var t=null;switch(e){case 8:t=this._raw.getInt8(this._cursor.offset-this._raw.byteOffset);break;case 16:t=this._raw.getInt16(this._cursor.offset-this._raw.byteOffset);break;case 32:t=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset);break;case 64:t=this._readInt64()}return this._cursor.offset+=e>>3,t},t.ISOBox.prototype._readUint=function(e){var t=null;switch(e){case 8:t=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset);break;case 16:t=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset);break;case 24:t=(this._raw.getUint16(this._cursor.offset-this._raw.byteOffset)<<8)+this._raw.getUint8(this._cursor.offset-this._raw.byteOffset+2);break;case 32:t=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset);break;case 64:t=this._readUint64()}return this._cursor.offset+=e>>3,t},t.ISOBox.prototype._readUintArray=function(e,t){for(var i=Array(t),n=0;n<t;++n)i[n]=this._readUint(e);return i},t.ISOBox.prototype._readFP=function(e){return this._readInt(2*e)/Math.pow(2,e)},t.ISOBox.prototype._readString=function(e){for(var t="",i=0;i<e;i++)t+=String.fromCharCode(this._readUint(8));return t},t.ISOBox.prototype._readHex=function(e){for(var t=[],i=0;i<e;i++){var n=this._readUint(8);t.push((n>>>4).toString(16)),t.push((15&n).toString(16))}return t.join("")},t.ISOBox.prototype._readUUID=function(){return this._readUintArray(8,16)},t.ISOBox.prototype._readTerminatedString=function(){for(var e="";;){var t=this._readUint(8);if(0==t)break;e+=String.fromCharCode(t)}return e},t.ISOBox.prototype._readTemplate=function(e){return this._readUint(e/2)+this._readUint(e/2)/Math.pow(2,e/2)},t.ISOBox.prototype._parseBox=function(){if(this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this.size=this._readUint(32),this.type=this._readString(4),1===this.size&&(this.largesize=this._readUint(64)),"uuid"===this.type&&(this.usertype=this._readUUID()),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}!this._incomplete&&this._boxParsers[this.type]&&this._boxParsers[this.type].call(this)}},t.ISOBox.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},t.ISOBox.prototype._createDataView=function(){return new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},t.ISOBox.prototype._boxParsers={},a(["moov","trak","tref","mdia","minf","stbl","edts","dinf","sinf","mvex","moof","traf","mfra","udta","meco","strk","vttc","schi"],function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(t.ISOBox.parse(this))}),t.ISOBox.prototype._boxParsers.elst=function(){this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];for(var e=1;e<=this.entry_count;e++){var i=new t.ISOBox;1===this.version?(i.segment_duration=this._readUint(64),i.media_time=this._readInt(64)):(i.segment_duration=this._readUint(32),i.media_time=this._readInt(32)),i.media_rate_integer=this._readInt(16),i.media_rate_fraction=this._readInt(16),this.entries.push(i)}},t.ISOBox.prototype._boxParsers.emsg=function(){this._parseFullBox(),0===this.version?(this.scheme_id_uri=this._readTerminatedString(),this.value=this._readTerminatedString(),this.timescale=this._readUint(32),this.presentation_time_delta=this._readUint(32),this.event_duration=this._readUint(32),this.id=this._readUint(32)):(this.timescale=this._readUint(32),this.presentation_time=this._readUint(64),this.event_duration=this._readUint(32),this.id=this._readUint(32),this.scheme_id_uri=this._readTerminatedString(),this.value=this._readTerminatedString()),this.message_data=this._createDataView()},a(["free","mdat"],function(){this.data=this._createDataView()}),a(["ftyp","styp"],function(){for(this.major_brand=this._readString(4),this.minor_versions=this._readUint(32),this.compatible_brands=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.compatible_brands.push(this._readString(4))}),t.ISOBox.prototype._boxParsers.hdlr=function(){this._parseFullBox(),this.pre_defined=this._readUint(32),this.handler_type=this._readString(4),this.reserved=[this._readUint(32),this._readUint(32),this._readUint(32)],this.name=this._readTerminatedString()},t.ISOBox.prototype._boxParsers.mdhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32));var e=this._readUint(16);this.pad=e>>15,this.language=String.fromCharCode(96+(e>>10&31),96+(e>>5&31),96+(31&e)),this.pre_defined=this._readUint(16)},t.ISOBox.prototype._boxParsers.mfhd=function(){this._parseFullBox(),this.sequence_number=this._readUint(32)},t.ISOBox.prototype._boxParsers.mvhd=function(){this._parseFullBox(),1===this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32)),this.rate=this._readTemplate(32),this.volume=this._readTemplate(16),this.reserved1=this._readUint(16),this.reserved2=[this._readUint(32),this._readUint(32)],this.matrix=[];for(var e=0;e<9;e++)this.matrix.push(this._readTemplate(32));for(this.pre_defined=[],e=0;e<6;e++)this.pre_defined.push(this._readUint(32));this.next_track_ID=this._readUint(32)},t.ISOBox.prototype._boxParsers.sidx=function(){this._parseFullBox(),this.reference_ID=this._readUint(32),this.timescale=this._readUint(32),0===this.version?(this.earliest_presentation_time=this._readUint(32),this.first_offset=this._readUint(32)):(this.earliest_presentation_time=this._readUint(64),this.first_offset=this._readUint(64)),this.reserved=this._readUint(16),this.reference_count=this._readUint(16),this.references=[];for(var e=0;e<this.reference_count;e++){var t={},i=this._readUint(32);t.reference_type=i>>31&1,t.referenced_size=0x7fffffff&i,t.subsegment_duration=this._readUint(32);var n=this._readUint(32);t.starts_with_SAP=n>>31&1,t.SAP_type=n>>28&7,t.SAP_delta_time=0xfffffff
vendor: 9,535 bytes, line 28
28&n,this.references.push(t)}},t.ISOBox.prototype._boxParsers.ssix=function(){this._parseFullBox(),this.subsegment_count=this._readUint(32),this.subsegments=[];for(var e=0;e<this.subsegment_count;e++){var t={};t.ranges_count=this._readUint(32),t.ranges=[];for(var i=0;i<t.ranges_count;i++){var n={};n.level=this._readUint(8),n.range_size=this._readUint(24),t.ranges.push(n)}this.subsegments.push(t)}},t.ISOBox.prototype._boxParsers.tfdt=function(){this._parseFullBox(),1===this.version?this.baseMediaDecodeTime=this._readUint(64):this.baseMediaDecodeTime=this._readUint(32)},t.ISOBox.prototype._boxParsers.tfhd=function(){this._parseFullBox(),this.track_ID=this._readUint(32),1&this.flags?(this.base_data_offset_present=!0,this.base_data_offset=this._readUint(64)):131072&this.flags&&(this.default_base_is_moof=!0),2&this.flags&&(this.sample_description_offset=this._readUint(32)),8&this.flags&&(this.default_sample_duration=this._readUint(32)),16&this.flags&&(this.default_sample_size=this._readUint(32)),32&this.flags&&(this.default_sample_flags=this._readUint(32))},t.ISOBox.prototype._boxParsers.tkhd=function(){this._parseFullBox(),1===this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(32)),this.reserved2=[this._readUint(32),this._readUint(32)],this.layer=this._readUint(16),this.alternate_group=this._readUint(16),this.volume=this._readTemplate(16),this.reserved3=this._readUint(16),this.matrix=[];for(var e=0;e<9;e++)this.matrix.push(this._readTemplate(32));this.width=this._readTemplate(32),this.height=this._readTemplate(32)},t.ISOBox.prototype._boxParsers.trun=function(){this._parseFullBox(),this.sample_count=this._readUint(32),1&this.flags&&(this.data_offset_present=!0,this.data_offset=this._readInt(32)),4&this.flags&&(this.first_sample_flags=this._readUint(32)),this.samples=[];for(var e=0;e<this.sample_count;e++){var t={};256&this.flags&&(t.sample_duration=this._readUint(32)),512&this.flags&&(t.sample_size=this._readUint(32)),1024&this.flags&&(t.sample_flags=this._readUint(32)),2048&this.flags&&(0==this.version?t.sample_composition_time_offset=this._readUint(32):t.sample_composition_time_offset=this._readInt(32)),this.samples.push(t)}},t.ISOBox.prototype._boxParsers.trex=function(){this._parseFullBox(),this.track_ID=this._readUint(32),this.default_sample_description_index=this._readUint(32),this.default_sample_duration=this._readUint(32),this.default_sample_size=this._readUint(32),this.default_sample_flags=this._readUint(32)},t.ISOBox.prototype._boxParsers.stsd=function(){for(this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.entries.push(t.ISOBox.parse(this))},t.ISOBox.prototype._boxParsers.encv=function(){for(this._readHex(6),this.data_reference_index=this._readUint(16),this._readUint(16),this._readUint(16),this._readUint(32),this._readUint(32),this._readUint(32),this.width=this._readUint(16),this.height=this._readUint(16),this.horizresolution=this._readTemplate(32),this.vertresolution=this._readTemplate(32),this._readUint(32),this.frame_count=this._readUint(16),this._readUint(8),this.compressor_name=this._readString(4),this.depth=this._readUint(16),this._readUint(16),this._readHex(27),this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(t.ISOBox.parse(this))},a(["enca","mp4a"],function(){for(this._readHex(6),this.data_reference_index=this._readUint(16),this._readUint(32),this._readUint(32),this.channel_count=this._readUint(16),this.sample_size=this._readUint(16),this._readUint(16),this._readUint(16),this.sample_rate=this._readUint(32)>>>16,this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(t.ISOBox.parse(this))}),a(["avc1","hvc1","hev1"],function(){this._readUint(32),this._readUint(16),this.data_reference_index=this._readUint(16),this.version=this._readUint(16),this.revision_level=this._readUint(16),this.vendor=this._readUint(32),this.temporal_quality=this._readUint(32),this.spatial_quality=this._readUint(32),this.width=this._readUint(16),this.height=this._readUint(16),this.horizontal_resolution=this._readTemplate(32),this.vertical_resolution=this._readTemplate(32),this.data_size=this._readUint(32),this.frame_count=this._readUint(16);var e=this._readUint(8);this.compressor_name="";for(var i=0;i<31;i++){var n=this._readUint(8);i<e&&(this.compressor_name+=String.fromCharCode(n))}for(this.depth=this._readUint(16),this._readInt(16),this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(t.ISOBox.parse(this))}),t.ISOBox.prototype._boxParsers.avcC=function(){this.configuration_version=this._readUint(8),this.avc_profile_indication=this._readUint(8),this.profile_compatibility=this._readUint(8),this.avc_level_indication=this._readUint(8);var e=this._readUint(8);this.complete_representation=e>>>7&1,this.length_size_minus_one=3&e,this.num_sps=31&this._readUint(8),this.sps=[];for(var t=0;t<this.num_sps;++t)this.sps.push(this._readUintArray(8,this._readUint(16)));for(this.num_pps=31&this._readUint(8),this.pps=[],t=0;t<this.num_pps;++t)this.pps.push(this._readUintArray(8,this._readUint(16)))},t.ISOBox.prototype._boxParsers.hvcC=function(){var e;this.configurationVersion=this._readUint(8),e=this._readUint(8),this.general_profile_space=e>>>6,this.general_tier_flag=e>>>5&1,this.general_profile_idc=31&e,this.general_profile_compatibility_flags=this._readUint(32),this.general_constraint_indicator_flags_bytes=[];for(var t=0;t<6;t++)this.general_constraint_indicator_flags_bytes[t]=this._readUint(8);this.general_level_idc=this._readUint(8),this.min_spatial_segmentation_idc=4095&this._readUint(16),this.parallelismType=3&this._readUint(8),this.chroma_format_idc=3&this._readUint(8),this.bit_depth_luma_minus8=7&this._readUint(8),this.bit_depth_chroma_minus8=7&this._readUint(8),this.avgFrameRate=this._readUint(16),e=this._readUint(8),this.constantFrameRate=e>>>6,this.numTemporalLayers=e>>>3&7,this.temporalIdNested=e>>>2&1,this.lengthSizeMinusOne=3&e,this.numOfArrays=this._readUint(8)},t.ISOBox.prototype._boxParsers.esds=function(){this._parseFullBox(),this._readUint(16),this.esId=this._readUint(16),this.streamPriority=31&this._readUint(8),this._readUint(16),this.decoderConfig={},this.decoderConfig.objectProfileIndication=this._readUint(8),this.decoderConfig.streamType=this._readUint(8)>>>2&63,this.decoderConfig.bufferSize=this._readUint(24),this.decoderConfig.maxBitrate=this._readUint(32),this.decoderConfig.avgBitrate=this._readUint(32),this.decoderConfig.decoderConfigDescriptor={},this.decoderConfig.decoderConfigDescriptor.tag=this._readUint(8),this.decoderConfig.decoderConfigDescriptor.length=this._readUint(8);var e=this._readUint(8),t=this._readUint(8),i=this.decoderConfig.decoderConfigDescriptor;i.audioObjectType=e>>>3&31,i.samplingFrequencyIndex=(7&e)<<1|t>>>7&1,i.channelConfiguration=t>>>3&15},t.ISOBox.prototype._boxParsers.tenc=function(){this._parseFullBox(),this.default_is_encrypted=1===this._readUint(24),this.default_iv_size=this._readUint(8),this.default_kid=this._readHex(16)},t.ISOBox.prototype._boxParsers.senc=function(){var e=this;this._parseFullBox(),this.sample_count=this._readUint(32),this.samples=Array.apply(null,Array(this.sample_count)).map(function(t){return function(e){if(s(e,e._root.options.iv_size)){var t={iv:e._readHex(e._root.options.iv_size)};return e.flags&&(t=function(e,t){return s(e,2)?(t.subsample_count=e._readUint(16),t.subsamples=Array.apply(null,Array(t.subsample_count)).map(function(t){return function(e){return s(e,6)?{bytes_of_clear_data:e._readUint(16),bytes_of_encrypted_data:e._readUint(32)}:{bytes_of_clear_data:0,bytes_of_encrypted_data:0}}(e)}),t):i(i({},t),{subsample_count:0,subsamples:[]})}(e,t)),t}e.samples=[]}(e)})},t.ISOBox.prototype._boxParsers.frma=function(){this.codingname=this._readString(4)},t.ISOBox.prototype._boxParsers.schm=function(){this._parseFullBox(),this.scheme_type=this._readString(4),this.scheme_version=this._readUint(32),1&this.flags&&(this.scheme_uri=this._readUint(8))},t.ISOBox.prototype._boxParsers.saiz=function(){if(this._parseFullBox(),1&this.flags&&(this.aux_info_type=this._readUint(32),this.aux_info_type_parameter=this._readUint(32)),this.default_sample_info_size=this._readUint(8),this.sample_count=this._readUint(32),0===this.default_sample_info_size){this.sample_info_size=[];for(var e=0;e<this.sample_count;++e)this.sample_info_size.push(this._readUint(8))}},t.ISOBox.prototype._boxParsers.pssh=function(){if(this._parseFullBox(),this.system_id=this._readUUID(),this.version>0){this.kid_count=this._readUint(32),this.kids=[];for(var e=0;e<this.kid_count;++e)this.kids.push(this._readString(16))}this.data_size=this._readUint(32),this.data=new DataView(this._raw.buffer,this._cursor.offset,this.data_size)},t.ISOBox.prototype._boxParsers.prft=function(){this._parseFullBox(),this.reference_track_ID=this._readUint(32),this.ntp_timestamp_seconds=this._readUint(32),this.ntp_timestamp_seconds_fraction=this._readUint(32),0===this.version?this.media_time=this._readUint(32):this.media_time=this._readUint(64)}},51700:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CmafChunkParser=void 0;var n=i(74853)
vendor: 41,842 bytes, line 28
28;t.CmafChunkParser=function(){function e(e){this.Qy=e,this.Ry=new ArrayBuffer(0)}return e.parseIsoBoxType=function(e,t){return String.fromCharCode(e[t])+String.fromCharCode(e[t+1])+String.fromCharCode(e[t+2])+String.fromCharCode(e[t+3])},e.prototype.appendData=function(e){this.Ry=n.ArrayHelper.concatBuffers(this.Ry,e)},e.prototype.getCompleteChunks=function(){var t=e.findCompleteCmafChunks(this.Ry);if(0===t.length)return null;this.Qy.logger.insane("Found ".concat(t.length," CMAF chunks"));var i=t[t.length-1].end,n=this.Ry.slice(0,i);return this.Ry=this.Ry.slice(i),n},e.findCompleteCmafChunks=function(t){if(!t||t.byteLength<8)return[];for(var i=new DataView(t),n=[],r=["moof","mdat"],o=0,a=[],s=0;s+8<t.byteLength;){var l=i.getUint32(s),c=e.parseIsoBoxType(new Uint8Array(t),s+4);if(0===l)break;s+l<=t.byteLength&&(a.push(c),c===r[0]&&r.shift(),0===r.length&&(n.push({start:o,end:s+l,boxes:a}),r=["moof","mdat"],o=s+l+1,a=[])),s+=l}return n},e.prototype.reset=function(){this.Ry.byteLength>0&&this.Qy.logger.debug("CMAF chunk parser discarded ".concat(this.Ry.byteLength," bytes")),this.Ry=new ArrayBuffer(0)},e}()},12392:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MP4Decrypter=void 0;var n=i(97441),r=i(74853),o=i(70233),a=i(2992),s=i(88052),l=i(62756);t.MP4Decrypter=function(){function e(e,t,i){this.Sy=e,this.Ty=t,this.Vy=!1,this.ay=i,this.Uy=[]}return e.prototype.parseInitSegment=function(e){var t=this;this.Vy=!1;for(var i=n.ISOBoxer.parseBuffer(e),s=i._raw.buffer,l=function(e){var t=[],i=[];i.push.apply(i,e.list("moov.pssh")),i.push.apply(i,e.list("moof.pssh"));for(var n=0,r=i;n<r.length;n++){var o=r[n];o.kids&&o.kids.length>0&&t.push.apply(t,o.kids)}return t}(i),c=0,u=l;c<u.length;c++){var d=u[c];this.by(d)}var h=i.get("moov.trak.mdia.minf.stbl.stsd").entries[0];return h.list("sinf").forEach(function(e){var n=e.get("frma"),s=e.get("schm"),l=e.get("schi.tenc");if(n&&l&&s){for(var c=0;c<4;++c)i._raw.setUint8(h._offset+4+c,n.codingname.charCodeAt(c));t.Yy=l.default_is_encrypted,t.Zy=l.default_iv_size,t.Xy=l.default_kid,t.Vy=!0;var u=r.ArrayHelper.arrayBufferToAsciiString(o.FormatHelper.hexToBytes(t.Xy).buffer,!0);t.by(u)}(0,a.rewriteMp4BoxType)(e,"free")}),Promise.resolve(s)},e.prototype.by=function(e){this.Uy.includes(e)||this.Uy.push(e)},e.prototype.getKeyIds=function(){return this.Uy},e.prototype.addKeys=function(e){for(var t=function(e){var t=i.Ty.find(function(t){return t.kid===e.kid});t?t.key=e.key:i.Ty.push(e)},i=this,n=0,r=e;n<r.length;n++)t(r[n])},e.prototype.getKey=function(){var e;if(this.Wy)return this.Wy;for(var t in this.Ty)if(this.Ty.hasOwnProperty(t)&&this.Ty[t].hasOwnProperty("key")&&this.Ty[t].hasOwnProperty("kid")&&this.Ty[t].kid===this.Xy){e=this.Ty[t].key;break}return void 0===e&&(e=this.Ty[0].key),"string"==typeof e?this.Wy=o.FormatHelper.hexToBytes(e).buffer:e instanceof Uint8Array?this.Wy=e.buffer:this.Wy=e,this.Wy},e.prototype.decryptDataSegment=function(e){if(!this.getKey())return this.Sy.logger.debug("MP4Decrypter.decryptSegment: Error decrypting AES-128 encrypted content"),Promise.reject("Error decrypting AES-128 encrypted content");if(!1===this.isEncrypted())return this.Sy.logger.debug("MP4Decrypter.decryptSegment: NO ENCRYPTED CONTENT"),Promise.reject("NO ENCRYPTED CONTENT");for(var t=n.ISOBoxer.parseBuffer(e,{iv_size:this.Zy}),i=new c(t),r=[],o=0;o<i.getSampleCount();++o)r.push(this.cy(e,i,o));return Promise.all(r).then(function(){return function(e){[e.uuidBox,e.sencBox,e.saioBox,e.saizBox,e.seigBox,e.sbgpBox].forEach(function(e){e&&(0,a.rewriteMp4BoxType)(e,"free")})}(i),e})},e.prototype.cy=function(e,t,i){var n=t.sampleToOffset(i),r=t.sampleToSize(i,1),o=t.getSampleEncodeInfo(i);return o.iv?function(e,t,i,n,r){var o;return(null!=(o=r.subsample_count)?o:0)>0&&r.subsamples?function(e,t){var i=function(e){for(var t=e.reduce(function(e,t){return e+t.byteLength},0),i=new Uint8Array(t),n=0,r=0,o=e;r<o.length;r++){var a=o[r];i.set(a,n),n+=a.byteLength}return i.buffer}(t);return e.decrypt(i).then(function(e){for(var i=0,n=0,r=t;n<r.length;n++){var o=r[n],a=new Uint8Array(e,i,o.byteLength);o.set(a),i+=o.byteLength}})}(e,function(e,t,i){if(!i.subsamples)return[];for(var n=[],r=0,o=i.subsamples;r<o.length;r++){var a=o[r];t+=a.bytes_of_clear_data;var s=a.bytes_of_encrypted_data;if(s>0){var l=new Uint8Array(e,t,s);n.push(l),t+=s}}return n}(t,i,r)):function(e,t,i,n){var r=t.slice(i,i+n);return e.decrypt(r).then(function(e){new Uint8Array(t).set(new Uint8Array(e),i)})}(e,t,i,n)}(new(s.ModuleManager.get(l.ModuleName.Crypto)).CryptoApi(this.Sy,"AES-CTR",this.getKey(),o.iv,this.ay),e,n,r,o):(this.Sy.logger.debug("MP4Decrypter.decryptSegment: NO INITIAL VECTOR PROVIDED"),Promise.reject("NO INITIAL VECTOR PROVIDED"))},e.prototype.isEncrypted=function(){return this.Vy},e}();var c=function(){function e(e){var t=e.get("moof.traf");this.trunBox=t.get("trun"),this.sencBox=t.get("senc"),this.uuidBox=t.get("uuid"),this.saizBox=t.get("saiz"),this.saioBox=t.get("saio"),this.seigBox=t.get("seig"),this.sbgpBox=t.get("sbgp"),this.mdatOffset=e.get("mdat")._offset+8}return e.prototype.getSampleSizeTable=function(){return this.trunBox.samples},e.prototype.getSampleCount=function(){return this.getSampleSizeTable().length},e.prototype.getSampleEncodeInfo=function(e){return this.sencBox.samples[e]},e.prototype.sampleToOffset=function(e){return this.mdatOffset+this.sampleToSize(0,e)},e.prototype.sampleToSize=function(e,t){for(var i,n=this.getSampleSizeTable(),r=0,o=e;o<e+t;o++)r+=null!=(i=n[o].sample_size)?i:0;return r},e}()},24014:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MP4EncryptionParser=void 0;var n=i(40306),r=i(3336),o=i(13531),a=i(25811),s=i(51682),l=i(74853),c=i(70233),u=i(85434),d=i(15487);t.MP4EncryptionParser=function(){function e(e){var t=this;this.vy={stsd:function(e){var i;switch(e+=s.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+s.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH,t.ty[0]){case"vide":i=t.vy.encv;break;case"soun":i=t.vy.enca;break;case"hint":case"meta":case"auxv":t.uy.logger.debug("handler type "+t.ty[0]+" not yet supported");break;default:t.uy.logger.debug("invalid handler type "+t.ty[0])}return i?e+=4:(t.uy.logger.debug("unsupported handler type "+t.ty[0]),-1)},encv:function(e){return e+78},enca:function(e){return e+28}},this.uy=e}return e.prototype.wy=function(e,t){var i=e.getUint32(t);return i<=0?null:i},e.prototype.xy=function(e,t){for(var i="",n=0;n<s.ISOBMFFConstants.BOX_TYPE_LENGTH;n++)i+=String.fromCharCode(e.getInt8(t+n));return i},e.prototype.yy=function(e,t){for(var i,n,r=0,o=t,a=[],l=new DataView(e);r+3<l.byteLength;){if(n=this.wy(l,r),i=this.xy(l,r+s.ISOBMFFConstants.BOX_SIZE_LENGTH),null===n)return this.uy.logger.debug("size is 0, maybe an error, or the largesize should be parsed. Returning with null."),[];if(i!==o[0])r+=n;else{if(o.length<=1)a.push(e.slice(r,r+n));else{var c=r;if(r+=s.ISOBMFFConstants.BOX_SIZE_LENGTH+s.ISOBMFFConstants.BOX_TYPE_LENGTH,this.vy.hasOwnProperty(i)){var u=this.vy[i](r);-1!==u&&(r=u)}var d=r-c;d=n-d;var h=e.slice(r,r+d),p=this.yy(h,t.slice(1));p&&(a=a.concat(p)),r=c}r+=n}}return a.length>0?a:[]},e.prototype.zy=function(e){for(var t=this.yy(e,["moov","trak","mdia","hdlr"]),i=[],n=0;n<t.length;n++){var r=new DataView(t[n]),o=s.ISOBMFFConstants.BOX_SIZE_LENGTH+s.ISOBMFFConstants.BOX_TYPE_LENGTH;o+=s.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+s.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH,o+=4,i.push(this.xy(r,o))}return i},e.prototype.Ay=function(e){if(!e||!(e instanceof ArrayBuffer)||e.byteLength<1)return null;var t=new DataView(e),i=s.ISOBMFFConstants.BOX_SIZE_LENGTH+s.ISOBMFFConstants.BOX_TYPE_LENGTH;i+=s.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+s.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+3+1;for(var n="",r=0;r<16;r++)n+=c.FormatHelper.intToHex(t.getUint8(i+r));return n},e.prototype.parseDefaultKIDFromBuffer=function(e,t){this.ty=this.zy(e),i=u.MimeTypeHelper.isVideo(t)?["moov","trak","mdia","minf","stbl","stsd","encv","sinf","schi","tenc"]:["moov","trak","mdia","minf","stbl","stsd","enca","sinf","schi","tenc"];var i,n=this.yy(e,i);if(!n||n.length<1)return null;for(var r=[],o=0;o<n.length;o++){var a=this.Ay(n[o]);null!==a&&r.push(a)}return this.uy.logger.debug("default KID extracted: "+r),r},e.prototype.By=function(e){return l.ArrayHelper.arrayBufferToAsciiString(e,!0)},e.prototype.Cy=function(e){if(!e||!(e instanceof ArrayBuffer)||e.byteLength<3)return this.uy.logger.debug("could not parse pssh data from box"),null;this.uy.logger.isLevelEnabled(o.LogLevel.DEBUG)&&this.uy.logger.debug(this.By(e));var t,i={},n=new DataView(e);t=0+(s.ISOBMFFConstants.BOX_SIZE_LENGTH+s.ISOBMFFConstants.BOX_TYPE_LENGTH);var r=n.getUint8(t);t+=s.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+s.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH;for(var u="",d=0;d<s.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH;d++)u+=c.FormatHelper.intToHex(n.getUint8(t)),t++;if(i.systemIDraw=u,i.systemID="urn:uuid:".concat(c.FormatHelper.beautifyUUID(u)),a.DRMSchemeIDURIs.hasOwnProperty(i.systemID)&&(i.systemName=a.DRMSchemeIDURIs[i.systemID]),r>0){var h=n.getUint32(t);for(t+=4,i.kid=[],d=0;d<h;d++){var p=l.ArrayHelper.extractHexString(n,t,s.ISOBMFFConstants.PSSH_KID_LEN);t+=s.ISOBMFFConstants.PSSH_KID_LEN,i.kid.push(p)}}return i.initData=e.slice(0),i.initDataStr=this.By(i.initData),i},e.prototype.parsePsshBox=function(e){if(0>e.getMimeType().indexOf("mp4"))return null;var t=e.getData();if(!(t&&t instanceof ArrayBuffer))return null;var i=[];if(i=(i=i.concat(this.yy(t,["moov","pssh"]))).concat(this.yy(t,["moof","pssh"])),e.isEncrypted()&&!i.length&&e.isInit()&&(0,d.isTizen2016)())return this.uy.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SEGMENT_PSSH_DATA_MISSING,void 0,void 0,this.uy.sourceContext.sourceIdentifier)),[];var o=[];if(Array.isArray(i))for(var a=0;a<i.length;a++){var s=this.Cy(i[a]);null!==s&&o.push(s)}return o},e}()},32951:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MP4Parser=void 0,t.getVideoSamples=function(e,t,i,n){var r=(0,d.getCodecTag)(t);return S(e.moof,e.mdat,t,n).map(function(e){var t=e;return t.nalus=function(e,t,i){void 0===i&&(i=[]);for(var n=d.AVC_CODEC_TAGS.includes(t)?E:T,r=_+n,o=[],a=0;a+r<e.byteLength;){var s=Math.min(e.getUint32(a),e.byteLength-a-r);if(a+=4,0!==s){var l=d.AVC_CODEC_TAGS.includes(t)?31&e.getUint8(a):e.getUint8(a)>>1&63;if(a+=n,0===i.length||i.includes(l)){var c={type:l,data:new DataView(e.buffer,e.byteOffset+a,s-n)};w(c),o.push(c)}a+=s-n}}return o}(e.data,r,i),t})},t.getTrackSamples=S,t.removeEmulationPreventionThreeBytes=w,t.getMp4Fragments=function(e){var t=e.getParsedData().fetchAll("moof"),i=e.getParsedData().fetchAll("mdat");return t.length===i.length?t.map(function(e,t){return{moof:e,mdat:i[t]}}):[]},t.parseTfdtBoxOffsets=function(e){var t=A(e.getData()).fetchAll("tfdt");return t?t.map(function(e){return e._raw.byteOffset}):[]},t.getTrackId=function(e,t){var i=t.get("moof.traf.tfhd");return i?i.track_ID?i.track_ID:(e.log("Track fragment header has no track_ID field. This does not look like a valid mp4."),-1):(e.log("Cannot extract trackID from data fragment."),-1)},t.parseBuffer=A,t.parsePlaybackTime=function(e,t){var i=C(e).get("moof.traf.tfdt");M(e,t);var n=e.getTimescale();return i&&void 0!==n?i.baseMediaDecodeTime/n:void 0===n?NaN:void 0},t.parseSegmentData=P,t.isValidMp4=function(e){var t=C(e),i=(e.isInit()?["ftyp","moov"]:["moof","mdat"]).every(function(e){return!!t.fetch(e)}),n=t.boxes[t.boxes.length-1],r=(n?n.size+n._offset:0)===e.getData().byteLength,o=!t._incomplete;return i&&r&&o},t.getCodecFromSegment=function(e){var t=P(e);return function(e){var t=I(e);if(!t)return null;var i=t.entries.find(function(e){return n(n([],l.VisualSampleEntryTypes.Avc,!0),l.VisualSampleEntryTypes.Hvc,!0).includes(e.type)});return i?l.VisualSampleEntryTypes.Avc.includes(i.type)?function(e){var t=e.get("avcC");return t&&0!==t.sps.length?e.type+"."+h.FormatHelper.bytesToHex(new Uint8Array(t.sps[0].splice(1,3))):null}(i):l.VisualSampleEntryTypes.Hvc.includes(i.type)?(0,d.assembleHvcCodecString)(i.type,i.get("hvcC")):null:null}(t)||function(e){var t=I(e);if(!t)return null;var i=t.entries[0],n=(i.get("esds")||{}).decoderConfig;return n?i.type+"."+n.objectProfileIndication.toString(16)+"."+n.decoderConfigDescriptor.audioObjectType:null}(t)};var r=i(97441),o=i(40306),a=i(3336),s=i(13531),l=i(1001),c=i(51682),u=i(74853),d=i(34047),h=i(70233),p=i(85434),f=i(2992),m=i(23068),g=i(88052),v=i(62756),y=i(78246),b=8;function S(e,t,i,n){var r,o,a,s=e.get("traf"),l=s.get("tfhd"),u=s.get("trun"),d=null!=(r=l.base_data_offset)?r:e._offset,h=null!=(o=u.data_offset)?o:0;return null!=(a=null==u?void 0:u.samples)&&a.length?u.samples.map(function(e){var r=e.sample_size||l.default_sample_size||i.getDefaultSampleSize();r>u._raw.buffer.byteLength&&(r=u._raw.buffer.byteLength-(d+h),n.warn("trun.samples.sample_size (".concat(e.sample_size,") is bigger than the available buffer length:").concat(u._raw.buffer.byteLength,". Adjusting to remaining bytes:").concat(r))),1!==u.sample_count||e.sample_size||(r=t.size-function(e){return e.hasOwnProperty("largesize")?c.ISOBMFFConstants.BOX_HEADER_LENGTH_LARGE:c.ISOBMFFConstants.BOX_HEADER_LENGTH_REGULAR}(t));var o={duration:e.sample_duration||l.default_sample_duration||i.getDefaultSampleDuration(),size:r,compositionTimeOffset:e.sample_composition_time_offset||0,data:new DataView(u._raw.buffer,d+h,r)};return h+=r,o}):[]}t.MP4Parser=function(){function e(e,t,i){void 0===i&&(i=r.ISOBoxer),this.context=e,this.mp4EncryptionParser=t,this.isoBoxer=i,this.dy=g.ModuleManager.get(v.ModuleName.Crypto,!1)}return e.prototype.parseSegment=function(e){"mp4"===p.MimeTypeHelper.extractContainerType(e.getMimeType())?(e.isInit()?this.jy(e):this.ly(e),e.setDrmInitData(this.ey(e))):this.context.logger.debug("Skipping parsing of a non MP4 segment")},e.prototype.ey=function(e){var t=this,i=this.mp4EncryptionParser.parsePsshBox(e);return this.context.logger.isLevelEnabled(s.LogLevel.DEBUG)&&(null==i||i.forEach(function(e){return t.context.logger.debug("initData found: ".concat(e.initDataStr))})),Array.isArray(i)&&i.length>0?i:[]},e.prototype.fy=function(e){var t=e.getParsedData().get("moov.mvex.trex");if(t){var i={defaultSampleSize:t.default_sample_size,defaultSampleDuration:t.default_sample_duration};e.updateParserMetadata(i),this.context.logger.debug("default sample duration for "+e.getMimeType()+" : "+i.defaultSampleDuration)}},e.prototype.gy=function(e){var t=e.getParsedData().get("moof.traf.sgpd");if(t&&"seig"===function(e){return String.fromCharCode(e._raw.getUint8(12),e._raw.getUint8(13),e._raw.getUint8(14),e._raw.getUint8(15))}(t)){var i=function(e){var t=1===R(e)?20:16;return e._raw.getUint32(t)}(t);if(!(i<1)){var n=function(e){var t=R(e),i=k(e),n=1===t?24:20;return 1===t&&0===i?e._raw.getUint32(n):i}(t),r=function(e){var t=R(e),i=k(e),n=1===t&&0===i?28:24;return(e._raw.getUint16(n)<<16)+e._raw.getUint8(n+2)}(t),o=function(e){var t=R(e),i=k(e),n=1===t&&0===i?31:27;return e._raw.getUint8(n)}(t),a=function(e){for(var t=R(e),i=k(e),n=1===t&&0===i?32:28,r=new Uint8Array(16),o=0;o<16;o++)r[o]=e._raw.getUint8(n+o);return h.FormatHelper.bytesToUUID(r)}(t);this.context.logger.debug("Parsed SGPD/SEIG, entries(".concat(i,"), key ID(").concat(a,"), IV size(").concat(o,"), isEncrypted(").concat(!!r,"), descriptor length(").concat(n,")")),e.setDrmKid(a)}}},e.prototype.hy=function(e){var t=this.mp4EncryptionParser.parseDefaultKIDFromBuffer(e.getData(),e.getMimeType()),i=null!=t&&t.length?t.pop():void 0,n=e.getParsedData().get("moov.trak.mdia.minf.stbl.stsd.encv.sinf.schi.tenc")||e.getParsedData().get("moov.trak.mdia.minf.stbl.stsd.enca.sinf.schi.tenc");n&&(e.updateParserMetadata({ivSize:n.default_iv_size}),e.setEncrypted(!0)),i&&e.setDrmKid(h.FormatHelper.beautifyUUID(i))},e.prototype.iy=function(e){var t=e.get("elst");return!(t&&t.entries.length>0&&t.entries[0].media_time<0)},e.prototype.jy=function(e){var t=P(e,{},this.isoBoxer);t?(this.hy(e),M(e,this.context.logger),this.fy(e),this.context.settings.IGNORE_MP4_EDTS_BOX&&this.ky(t)):this.context.eventHandler.fireError(new a.PlayerError(o.ErrorCode.SOURCE_EMPTY_SEGMENT,{mimeType:e.getMimeType(),segmentUrl:e.getUrl()},"The player has encountered an init segment that is unexpectedly empty.",this.context.sourceContext.sourceIdentifier))},e.prototype.ky=function(e){var t=e.get("moov.trak.edts");t&&!this.iy(t)&&(this.context.logger.debug("Found unsupported edts box, dropping it!"),(0,f.rewriteMp4BoxType)(t,"free"))},e.prototype.ly=function(t){var i,n,r=0,o=t.getSegmentInfo();null!=o&&o.presentationTimeOffset&&(r=o.presentationTimeOffset);var a=this.oy(t);t.isSelfInit()&&this.fy(t),this.gy(t),this.hy(t),t.setEncrypted(null!=(n=null==(i=t.getInitSegment())?void 0:i.isEncrypted())&&n),function(e){e.getParsedData().fetch("senc")&&e.setEncrypted(!0)}(t),M(t,this.context.logger),this.ny(t,r,a),this.my(t),this.context.settings.PARSE_EMSG_BOXES&&t.setInbandEvents(this.ry(t,r)),t.setLastSegment(this.sy(t));var s=e.getProducerReferenceTime(t);s&&(o.wallClockTime=s)},e.prototype.my=function(e){var t=this.py(e);if(t){var i=Math.abs(e.getDuration()-t);i>.5&&this.context.logger.debug("Segment duration is off by "+i+", corrected from "+e.getDuration()+" to "+t),e.setDuration(t)}},e.prototype.ny=function(e,t,i){var n=i.fetchAll("tfdt"),r=n[0],o=n.map(function(e){return e._offset});if(r){var a=e.getTimescale();e.setTFDTBoxOffsets(o),e.setBaseMediaDecodeTime(r.baseMediaDecodeTime),e.setPresentationTimeOffset(t),void 0===a?this.context.logger.debug("Could not set playback time - segment is missing timescale."):e.setPlaybackTime(r.baseMediaDecodeTime/a-t)}},e.prototype.oy=function(e){return P(e,{iv_size:e.getIvSize()||b},this.isoBoxer)},e.prototype.py=function(e){var t=this,i=e.getTimescale();return p.MimeTypeHelper.isAV(e.getMimeType())?void 0===i?(this.context.logger.debug("Could not parse segment duration - segment is missing timescale."),null):e.getParsedData().list("moof.traf").reduce(function(i,n){return i+t.qy(n,e.getDefaultSampleDuration())},0)/i:null},e.prototype.qy=function(e,t){var i,n=e.get("trun");if(!n)return this.context.logger.insane("Media segment is missing trun box!"),0;var r=e.get("tfhd"),o=r?r.default_sample_duration:null;return(null==(i=n.samples)?void 0:i.reduce(function(e,i){return e+(i.sample_duration||o||t||0)},0))??0},e.prototype.ry=function(e,t){var i=this.oy(e),n=function(e,t,i){var n=t.fetch("sidx"),r=0,o=e.getTimescale();if(void 0===o)return 0;if(n&&n.earliest_presentation_time)r=n.earliest_presentation_time/o;else{var a=t.fetch("tfdt");a&&a.baseMediaDecodeTime&&(r=a.baseMediaDecodeTime/o)}return(0,m.isNumber)(r)?r-=i:r=0,r}(e,i,t);return i.fetchAll("emsg").map(function(e){return{schemeIdUri:e.scheme_id_uri,value:e.value,presentationTime:x(e,n,t),eventDuration:e.event_duration/e.timescale,id:String(e.id),messageData:u.ArrayHelper.convertBufferSourceToUTF8(e.message_data)}})},e.parseFourCharsText=function(e,t){for(var i="",n=0;n<4;n++)i+=String.fromCharCode(e.getInt8(t+n));return i},e.prototype.sy=function(t){var i=t.getData();if(!i||i.byteLength<4)return!1;for(var n=new DataView(i),r=0;r+3<n.byteLength;){var o=n.getUint32(r);if(o<=0)break;if("styp"===e.parseFourCharsText(n,r+4)){r+=8,r+=8;for(var a=void 0;r<o;)if(a=e.parseFourCharsText(n,r),r+=4,"lmsg"===a)return this.context.logger.debug("lmsg found, this should be the last segment in this stream"),!0;break}r+=o}return!1},e.getProducerReferenceTime=function(e){var t=e.getParsedData().fetch("prft");if(!t)return null;var i=1e3*t.ntp_timestamp_seconds;return i+=Math.round(t.ntp_timestamp_seconds_fraction/0x100000000*1e3),(0,y.ntpToUnix)(i)},e}();var _=4,E=1,T=2;function w(e){for(var t=[],i=1;i<e.data.byteLength-2;)0===e.data.getUint8(i)&&0===e.data.getUint8(i+1)&&3===e.data.getUint8(i+2)?(t.push(i+2),i+=3):i++;if(0!==t.length){for(var n=new DataView(new ArrayBuffer(e.data.byteLength-t.length)),r=0,o=0;r<n.byteLength;r++,o++)t[0]===o&&(t.shift(),o++),n.setUint8(r,e.data.getInt8(o));e.data=n}}function A(e,t,i){return void 0===t&&(t={}),void 0===i&&(i=r.ISOBoxer),i.parseBuffer(e,t)}function P(e,t,i){if(void 0===t&&(t={}),void 0===i&&(i=r.ISOBoxer),!e.getParsedData()){var n=A(e.getData(),t,i);e.setParsedData(n)}return e.getParsedData()}function I(e){return e.get("moov.trak.mdia.minf.stbl.stsd")}function C(e,t){return void 0===t&&(t=r.ISOBoxer),P(e,{iv_size:e.getIvSize()||b},t)}function M(e,t){var i=e.getParsedData().get("moov.trak.mdia.mdhd");if(i){var n=i.timescale;e.setTimescale(n),t.debug("timescale for ".concat(e.getMimeType()," is ").concat(n))}}function R(e){return e._raw.getUint8(8)}function k(e){return 1===R(e)?e._raw.getUint32(16):0}function x(e,t,i){return 1===e.version?e.presentation_time/e.timescale-i:t+e.presentation_time_delta/e.timescale}},37910:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerMp4ModuleDefinition=void 0;var n=i(62756),r=i(51700),o=i(12392),a=i(24014),s=i(32951);t.ContainerMp4ModuleDefinition={name:n.ModuleName.ContainerMP4,module:{MP4Parser:s.MP4Parser,MP4Decrypter:o.MP4Decrypter,MP4EncryptionParser:a.MP4EncryptionParser,CmafChunkParser:r.CmafChunkParser,getMp4Fragments:s.getMp4Fragments,getVideoSamples:s.getVideoSamples,parseTfdtBoxOffsets:s.parseTfdtBoxOffsets,getTrackId:s.getTrackId,parseBuffer:s.parseBuffer,parsePlaybackTime:s.parsePlaybackTime,isValidMp4:s.isValidMp4,getCodecFromSegment:s.getCodecFromSegment,getTrackSamples:s.getTrackSamples}},t.default=t.ContainerMp4ModuleDefinition},78246:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ntpToUnix=function(e){return e+i};var i=new Date(Date.UTC(1900,0,1)).getTime()}},function(e){return function(){return e(e.s=37910)}()}])})}()}(bitmovinplayerContainerMp4);var bitmovinplayerContainerMp4Exports=bitmovinplayerContainerMp4.exports;let MP4ContainerModule=getDefaultExportFromCjs$1(bitmovinplayerContainerMp4Exports);var bitmovinplayerVr={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[339],{50879:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ByteBuffer=void 0,t.ByteBuffer=function(){function e(){}return e.stringToBytes=function(e,t){t=!!t;for(var i=e.length,n=new Uint8Array(t?4*i:i),r=0,o=0;o<i;o++){var a=e.charCodeAt(o);if(t&&55296<=a&&a<=56319){if(++o>=i)throw Error("Malformed string, low surrogate expected at position "+o);a=(55296^a)<<10|65536|56320^e.charCodeAt(o)}else if(!t&&a>>>8)throw Error("Wide characters are not allowed.");!t||a<=127?n[r++]=a:(a<=2047?n[r++]=192|a>>6:(a<=65535?n[r++]=224|a>>12:(n[r++]=240|a>>18,n[r++]=128|a>>12&63),n[r++]=128|a>>6&63),n[r++]=128|63&a)}return n.subarray(0,r)},e.bytesToHex=function(e){for(var t="",i=0;i<e.length;i++){var n=(255&e[i]).toString(16);n.length<2&&(t+="0"),t+=n}return t},e.hexToBytes=function(e){var t=e.length;1&t&&(e="0"+e,t++);for(var i=new Uint8Array(t>>1),n=0;n<t;n+=2)i[n>>1]=parseInt(e.substr(n,2),16);return i},e.base64ToBytes=function(t){return e.stringToBytes(atob(t))},e}()},5357:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Cardboard=void 0;var n=i(57160),r=i(50879);t.Cardboard=function(){function e(){}return e.decode=function(t){return new n.ProtoBuf(r.ByteBuffer.base64ToBytes(t),e.proto).readAll()},e.proto={1:{name:"vendor",type:"string"},2:{name:"model",type:"string"},3:{name:"screen_to_lens_distance",type:"float"},4:{name:"inter_lens_distance",type:"float"},5:{name:"left_eye_field_of_view_angles",type:"float",packed:!0},11:{name:"vertical_alignment",type:{0:"bottom",1:"center",2:"top"}},6:{name:"tray_to_lens_distance",type:"float"},7:{name:"distortion_coefficients",type:"float",packed:!0},10:{name:"has_magnet",type:"boolean"},12:{name:"primary_button",type:{0:"none",1:"magnet",2:"touch",3:"indirect_touch"}},defaults:{vertical_alignment:"bottom",primary_button:"magnet"}},e}()},7247:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CardboardViewer=void 0;var n=i(67392);t.CardboardViewer=function(){return function(e){this.label=e.model,this.fov=e.left_eye_field_of_view_angles[0],this.interLensDistance=e.inter_lens_distance,this.baselineLensDistance=e.tray_to_lens_distance,this.screenLensDistance=e.screen_to_lens_distance,this.distortion=new n.Distortion(e.distortion_coefficients),this.inverseCoefficients=this.distortion.approximateInverse()}}()},95433:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Device=void 0;var i=[{type:"android",rules:[{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5 "}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6 "}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3}],n=function(){function e(t){this.width=t.width||e.getScreenWidth(),this.height=t.height||e.getScreenHeight(),this.widthMeters=t.widthMeters,this.heightMeters=t.heightMeters,this.bevelMeters=t.bevelMeters}return e.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.platform)},e.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},e.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},e.detect=function(t){for(var n=navigator.userAgent||navigator.vendor||window.opera,a=e.getScreenWidth(),s=e.getScreenHeight(),l=0;l<i.length;l++){var c=i[l];if(c.rules)if("ios"===c.type||"android"===c.type){if(e.isIOS()===("ios"===c.type)){for(var u=!1,d=0;d<c.rules.length;d++){var h=c.rules[d];if(e.matchRule(h,n,a,s)){t.debug("Rule matched:"+JSON.stringify(h)),u=!0;break}}if(u){var p=.0254,f={width:a,height:s,widthMeters:.0254/(c.dpi[0]||c.dpi)*a,heightMeters:p/(c.dpi[1]||c.dpi)*s,bevelMeters:.001*c.bw};return t.debug("Device found: "+JSON.stringify(f)),new e(f)}}}else t.debug("Device["+l+"] has invalid type.");else t.debug("Device["+l+"] has no rules section.")}return e.isIOS()?(t.debug("Using fallback iOS device measurements."),o):(t.debug("Using fallback Android device measurements."),r)},e.matchRule=function(e,t,i,n){if(!e.ua&&!e.res||e.ua&&0>t.indexOf(e.ua))return!1;if(e.res){if(!e.res[0]||!e.res[1])return!1;var r=e.res[0],o=e.res[1];if(Math.min(i,n)!==Math.min(r,o)||Math.max(i,n)!==Math.max(r,o))return!1}return!0},e}();t.Device=n;var r=new n({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),o=new n({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004})},3973:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceInfo=void 0;var n=i(95433),r=i(44369),o=i(7247);t.DeviceInfo=function(){function e(e,t){this.y0=new o.CardboardViewer(e),this.z0=n.Device.detect(t)}return e.prototype.getDevice=function(){return this.z0},e.prototype.setViewer=function(e){this.y0=e},e.prototype.getDistortedFieldOfViewLeftEye=function(){var e=this.y0.screenLensDistance,t=this.y0.distortion,i=(this.z0.widthMeters-this.y0.interLensDistance)/2,n=this.y0.interLensDistance/2,o=this.y0.baselineLensDistance-this.z0.bevelMeters,a=this.z0.heightMeters-o,s=r.MathUtil.radToDeg(Math.atan(t.distort(i/e))),l=r.MathUtil.radToDeg(Math.atan(t.distort(n/e))),c=r.MathUtil.radToDeg(Math.atan(t.distort(o/e))),u=r.MathUtil.radToDeg(Math.atan(t.distort(a/e)));return{leftDegrees:Math.min(s,this.y0.fov),rightDegrees:Math.min(l,this.y0.fov),downDegrees:Math.min(c,this.y0.fov),upDegrees:Math.min(u,this.y0.fov)}},e.prototype.getLeftEyeVisibleTanAngles=function(){var e=this.y0.distortion,t=Math.tan(-r.MathUtil.degToRad(this.y0.fov)),i=Math.tan(r.MathUtil.degToRad(this.y0.fov)),n=Math.tan(r.MathUtil.degToRad(this.y0.fov)),o=Math.tan(-r.MathUtil.degToRad(this.y0.fov)),a=this.z0.widthMeters/4,s=this.z0.heightMeters/2,l=this.y0.baselineLensDistance-this.z0.bevelMeters-s,c=this.y0.interLensDistance/2-a,u=-l,d=this.y0.screenLensDistance,h=e.distort((c-a)/d),p=e.distort((u+s)/d),f=e.distort((c+a)/d),m=e.distort((u-s)/d),g=new Float32Array(4);return g[0]=Math.max(t,h),g[1]=Math.min(i,p),g[2]=Math.min(n,f),g[3]=Math.max(o,m),g},e.prototype.getLeftEyeNoLensTanAngles=function(){var e=this.y0.distortion,t=new Float32Array(4),i=e.distortInverse(Math.tan(-r.MathUtil.degToRad(this.y0.fov))),n=e.distortInverse(Math.tan(r.MathUtil.degToRad(this.y0.fov))),o=e.distortInverse(Math.tan(r.MathUtil.degToRad(this.y0.fov))),a=e.distortInverse(Math.tan(-r.MathUtil.degToRad(this.y0.fov))),s=this.z0.widthMeters/4,l=this.z0.heightMeters/2,c=this.y0.baselineLensDistance-this.z0.bevelMeters-l,u=this.y0.interLensDistance/2-s,d=-c,h=this.y0.screenLensDistance,p=(u-s)/h,f=(d+l)/h,m=(u+s)/h,g=(d-l)/h;return t[0]=Math.max(i,p),t[1]=Math.min(n,f),t[2]=Math.min(o,m),t[3]=Math.max(a,g),t},e.prototype.getLeftEyeVisibleScreenRect=function(e){var t=this.y0.screenLensDistance,i=(this.z0.widthMeters-this.y0.interLensDistance)/2,n=this.y0.baselineLensDistance-this.z0.bevelMeters,r=(e[0]*t+i)/this.z0.widthMeters,o=(e[1]*t+n)/this.z0.heightMeters,a=(e[2]*t+i)/this.z0.widthMeters,s=(e[3]*t+n)/this.z0.heightMeters;return{x:r,y:s,width:a-r,height:o-s}},e.prototype.getFieldOfViewLeftEye=function(e){return e?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},e.prototype.getFieldOfViewRightEye=function(e){var t=this.getFieldOfViewLeftEye(e);return{leftDegrees:t.leftDegrees,rightDegrees:t.rightDegrees,downDegrees:t.downDegrees,upDegrees:t.upDegrees}},e.prototype.getUndistortedFieldOfViewLeftEye=function(){var e=this.getUndistortedParams_();return{leftDegrees:r.MathUtil.radToDeg(Math.atan(e.outerDist)),rightDegrees:r.MathUtil.radToDeg(Math.atan(e.innerDist)),downDegrees:r.MathUtil.radToDeg(Math.atan(e.bottomDist)),upDegrees:r.MathUtil.radToDeg(Math.atan(e.topDist))}},e.prototype.getUndistortedViewportLeftEye=function(){var e=this.getUndistortedParams_(),t=this.y0.screenLensDistance,i=this.z0.widthMeters/t,n=this.z0.heightMeters/t,r=this.z0.width/i,o=this.z0.height/n,a=Math.round((e.eyePosX-e.outerDist)*r),s=Math.round((e.eyePosY-e.bottomDist)*o);return{x:a,y:s,width:Math.round((e.eyePosX+e.innerDist)*r)-a,height:Math.round((e.eyePosY+e.topDist)*o)-s}},e.prototype.getUndistortedParams_=function(){var e=this.y0.distortion,t=this.y0.screenLensDistance,i=this.y0.interLensDistance/2/t,n=this.z0.widthMeters/t,o=this.z0.heightMeters/t,a=n/2-i,s=(this.y0.baselineLensDistance-this.z0.bevelMeters)/t,l=this.y0.fov,c=e.distortInverse(Math.tan(r.MathUtil.degToRad(l))),u=Math.min(a,c),d=Math.min(i,c),h=Math.min(s,c);return{outerDist:u,innerDist:d,topDist:Math.min(o-s,c),bottomDist:h,eyePosX:a,eyePosY:s}},e}()},67392:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Distortion=void 0,t.Distortion=function(){function e(e){this.hcb=e}return e.prototype.distortInverse=function(e){for(var t=0,i=1,n=e-this.distort(t);Math.abs(i-t)>1e-4;){var r=e-this.distort(i),o=i-(i-t)/(r-n)*r;t=i,i=o,n=r}return i},e.prototype.distort=function(e){for(var t=e*e,i=0,n=this.hcb.length-1;n>=0;n--)i=t*(i+this.hcb[n]);return(i+1)*e},e.solveLinear_=function(e,t){var i,n,r,o=e.length;for(n=0;n<o-1;++n)for(r=n+1;r<o;++r){var a=e[n][r]/e[n][n];for(i=n+1;i<o;++i)e[i][r]-=a*e[i][n];t[r]-=a*t[n]}var s=Array(o);for(n=o-1;n>=0;--n){var l=t[n];for(i=n+1;i<o;++i)l-=e[i][n]*s[i];s[n]=l/e[n][n]}return s},e.solveLeastSquares_=function(t,i){var n,r,o,a,s=t.length,l=t[0].length;if(l!==i.length)throw Error("Matrix / vector dimension mismatch");var c=Array(s);for(o=0;o<s;++o)for(c[o]=Array(s),r=0;r<s;++r){for(a=0,n=0;n<l;++n)a+=t[r][n]*t[o][n];c[o][r]=a}var u=Array(s);for(r=0;r<s;++r){for(a=0,n=0;n<l;++n)a+=t[r][n]*i[n];u[r]=a}return e.solveLinear_(c,u)},e.prototype.approximateInverse=function(t,i){t=t||1,i=i||100;var n,r,o=Array(12);for(r=0;r<12;++r)o[r]=Array(i);var a=Array(i);for(n=0;n<i;++n){var s=t*(n+1)/i,l=this.distort(s),c=l;for(r=0;r<12;++r)c*=l*l,o[r][n]=c;a[n]=s-l}return e.solveLeastSquares_(o,a)},e}()},44369:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Quat=t.Vec3=t.Mat4=t.MathUtil=void 0,t.MathUtil=function(){function e(){}return e.degToRad=function(e){return e*Math.PI/180},e.radToDeg=function(e){return 180*e/Math.PI},e.hypot=function(e,t){return Math.sqrt(e*e+t*t)},e.getSum=function(e){return e.length>0?e.reduce(function(e,t){return e+t},0):0},e.getAverage=function(t){return t.length>0?e.getSum(t)/t.length:1/0},e.sign=function(e){return Math.sign&&Math.sign(e)||(e>0?1:e<0?-1:0)},e}(),t.Mat4=function(){function e(){}return e.create=function(){var e;return(e="u">typeof Float32Array?new Float32Array(16):Array(16))[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.rotate=function(e,t,i){var n,r,o,a,s,l,c,u,d,h,p,f,m,g,v,y,b,S,_,E,T,w,A,P,I=i[0],C=i[1],M=i[2],R=Math.sqrt(I*I+C*C+M*M);return 1e-6>Math.abs(R)?null:(I*=R=1/R,C*=R,M*=R,n=Math.sin(t),o=1-(r=Math.cos(t)),a=e[0],s=e[1],l=e[2],c=e[3],u=e[4],d=e[5],h=e[6],p=e[7],f=e[8],m=e[9],g=e[10],v=e[11],y=I*I*o+r,b=C*I*o+M*n,S=M*I*o-C*n,_=I*C*o-M*n,E=C*C*o+r,T=M*C*o+I*n,w=I*M*o+C*n,A=C*M*o-I*n,P=M*M*o+r,e[0]=a*y+u*b+f*S,e[1]=s*y+d*b+m*S,e[2]=l*y+h*b+g*S,e[3]=c*y+p*b+v*S,e[4]=a*_+u*E+f*T,e[5]=s*_+d*E+m*T,e[6]=l*_+h*E+g*T,e[7]=c*_+p*E+v*T,e[8]=a*w+u*A+f*P,e[9]=s*w+d*A+m*P,e[10]=l*w+h*A+g*P,e[11]=c*w+p*A+v*P,e)},e.multiply=function(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],p=t[10],f=t[11],m=t[12],g=t[13],v=t[14],y=t[15],b=i[0],S=i[1],_=i[2],E=i[3];return e[0]=b*n+S*s+_*d+E*m,e[1]=b*r+S*l+_*h+E*g,e[2]=b*o+S*c+_*p+E*v,e[3]=b*a+S*u+_*f+E*y,b=i[4],S=i[5],_=i[6],E=i[7],e[4]=b*n+S*s+_*d+E*m,e[5]=b*r+S*l+_*h+E*g,e[6]=b*o+S*c+_*p+E*v,e[7]=b*a+S*u+_*f+E*y,b=i[8],S=i[9],_=i[10],E=i[11],e[8]=b*n+S*s+_*d+E*m,e[9]=b*r+S*l+_*h+E*g,e[10]=b*o+S*c+_*p+E*v,e[11]=b*a+S*u+_*f+E*y,b=i[12],S=i[13],_=i[14],E=i[15],e[12]=b*n+S*s+_*d+E*m,e[13]=b*r+S*l+_*h+E*g,e[14]=b*o+S*c+_*p+E*v,e[15]=b*a+S*u+_*f+E*y,e},e.perspective=function(e,t,i,n,r){var o=1/Math.tan(t/2),a=1/(n-r);return e[0]=o/i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(r+n)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*n*a,e[15]=0,e},e.invert=function(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],h=t[10],p=t[11],f=t[12],m=t[13],g=t[14],v=t[15],y=i*s-n*a,b=i*l-r*a,S=i*c-o*a,_=n*l-r*s,E=n*c-o*s,T=r*c-o*l,w=u*m-d*f,A=u*g-h*f,P=u*v-p*f,I=d*g-h*m,C=d*v-p*m,M=h*v-p*g,R=y*M-b*C+S*I+_*P-E*A+T*w;return R?(R=1/R,e[0]=(s*M-l*C+c*I)*R,e[1]=(r*C-n*M-o*I)*R,e[2]=(m*T-g*E+v*_)*R,e[3]=(h*E-d*T-p*_)*R,e[4]=(l*P-a*M-c*A)*R,e[5]=(i*M-r*P+o*A)*R,e[6]=(g*S-f*T-v*b)*R,e[7]=(u*T-h*S+p*b)*R,e[8]=(a*C-s*P+c*w)*R,e[9]=(n*P-i*C-o*w)*R,e[10]=(f*E-m*S+v*y)*R,e[11]=(d*S-u*E-p*y)*R,e[12]=(s*A-a*I-l*w)*R,e[13]=(i*I-n*A+r*w)*R,e[14]=(m*b-f*_-g*y)*R,e[15]=(u*_-d*b+h*y)*R,e):null},e}();var i=function(){function e(){}return e.create=function(){var e;return(e="u">typeof Float32Array?new Float32Array(3):[,,,])[0]=0,e[1]=0,e[2]=0,e},e}();t.Vec3=i,t.Quat=function(){function e(){}return e.create=function(){var e;return(e="u">typeof Float32Array?new Float32Array(4):[,,,,])[0]=0,e[1]=0,e[2]=0,e[3]=1,e},e.fromValues=function(e,t,i,n){var r;return(r="u">typeof Float32Array?new Float32Array(4):[,,,,])[0]=e,r[1]=t,r[2]=i,r[3]=n,r},e.multiply=function(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],c=i[2],u=i[3];return e[0]=n*u+a*s+r*c-o*l,e[1]=r*u+a*l+o*s-n*c,e[2]=o*u+a*c+n*l-r*s,e[3]=a*u-n*s-r*l-o*c,e},e.toAngle=function(e){var t=i.create(),n=e[0]*e[0],r=e[1]*e[1],o=e[2]*e[2],a=e[0]*e[1]+e[2]*e[3];return a>.499?(t[2]=2*Math.atan2(e[0],e[3]),t[0]=Math.PI/2,t[1]=0):a<-.499?(t[2]=-2*Math.atan2(e[0],e[3]),t[0]=-Math.PI/2,t[1]=0):(t[2]=Math.atan2(2*e[1]*e[3]-2*e[0]*e[2],1-2*r-2*o),t[0]=Math.asin(2*a),t[1]=Math.atan2(2*e[0]*e[3]-2*e[1]*e[2],1-2*n-2*o)),{yaw:180*t[2]/Math.PI,pitch:180*t[1]/Math.PI,roll:180*t[0]/Math.PI}},e}()}
vendor: 4,093 bytes, line 28
28,57160:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProtoBuf=void 0,t.ProtoBuf=function(){function e(e,t){this.Nbb=e,this.Qbb=t,this.Obb=0,this.Pbb=new DataView(this.Nbb.buffer,0,this.Nbb.length)}return e.prototype.readVarInt=function(){var e,t=0;for(e=0;this.Obb<this.Nbb.length&&(t|=(127&this.Nbb[this.Obb])<<e,128&this.Nbb[this.Obb]);this.Obb++)e+=7;return this.Obb++,t},e.prototype.readHeader=function(){var e=this.readVarInt();return{tag:e>>>3,type:7&e}},e.prototype.readString=function(){for(var e=this.readVarInt(),t=Array(e),i=0,n=this.Obb;n<this.Obb+e;n++){var r=this.Nbb[n];if(r<128)t[i++]=r;else if(r>=192&&r<224&&n+1<e)t[i++]=(31&r)<<6|63&this.Nbb[++n];else if(r>=224&&r<240&&n+2<e)t[i++]=(15&r)<<12|(63&this.Nbb[++n])<<6|63&this.Nbb[++n];else{if(!(r>=240&&r<248&&n+3<e))throw Error("Malformed UTF8 character at byte offset "+n);var o=(7&r)<<18|(63&this.Nbb[++n])<<12|(63&this.Nbb[++n])<<6|63&this.Nbb[++n];o<=65535?t[i++]=o:(o^=65536,t[i++]=55296|o>>10,t[i++]=56320|1023&o)}}var a="",s=16384;for(n=0;n<i;n+=s)a+=String.fromCharCode.apply(String,t.slice(n,n+s<=i?n+s:i));return this.Obb+=e,a},e.prototype.readPacked=function(e){var t=this.readVarInt(),i=[];switch(e){case"float":for(var n=0;n<t/4;n++)i.push(this.Pbb.getFloat32(this.Obb,!0)),this.Obb+=4;break;case"int":for(var r=this.Obb;this.Obb<r+t;)i.push(this.readVarInt())}return i},e.prototype.Rbb=function(e){for(var t=0,i=0;i<e;i++)t=(t<<8)+this.Nbb[this.Obb+i],this.Obb++;return t},e.prototype.readNum32=function(){var e=this.Pbb.getFloat32(this.Obb,!0);return this.Obb+=4,e},e.prototype.readNum64=function(){return this.Rbb(8)},e.prototype.readField=function(e){var t;switch(e){case 0:t=this.readVarInt();break;case 1:t=this.readNum64();break;case 2:t=this.readString();break;case 5:t=this.readNum32()}return t},e.prototype.readAll=function(){for(var e={};this.Obb<this.Nbb.length;){var t=this.readHeader(),i=void 0;if(this.Qbb.hasOwnProperty(t.tag))if(i=this.Qbb[t.tag],2===t.type&&i&&i.hasOwnProperty("packed")&&i.packed)e[i.name]=this.readPacked(i.type);else{var n=this.readField(t.type);"boolean"===i.type?n=!!n:"object"==typeof i.type&&(n=i.type[n]),e[i.name]=n}}if(e.length>0)for(var r in this.Qbb.defaults)this.Qbb.defaults.hasOwnProperty(r)&&void 0===e[r]&&(e[r]=this.Qbb.defaults[r]);return e},e}()},43948:function(e,t){var i,n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.TransitionTimingType=t.VRState=t.VRContentType=void 0,function(e){e.Single="single",e.TAB="tab",e.SBS="sbs"}(i||(t.VRContentType=i={})),function(e){e.Ready="ready",e.Playing="playing",e.Error="error",e.Uninitialized="uninitialized"}(n||(t.VRState=n={})),function(e){e.None="none",e.EaseIn="ease-in",e.EaseOut="ease-out",e.EaseInOut="ease-in-out"}(r||(t.TransitionTimingType=r={}))},61535:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.InternalVRHandler=void 0;var n=i(5357),r=i(3973),o=i(25926),a=i(4224),s=i(45202),l=i(3714),c=i(44468),u=i(21513),d=i(19274),h=i(43948),p=i(33639),f=i(85361);t.InternalVRHandler=function(){function e(t,i,c,m,g,v,y,b){var S=this;this.SC=null,this.TC=null,this.UC=null,this.VC=null,this.WC=h.VRState.Uninitialized,this.XC=null,this.YC=!1,this.ZC=!1,this.aC=null,this.bC=null,this.cC=null,this.dC=!1,this.tC=function(){S.eC=!0},this.HD=function(e){if(S.WC!==h.VRState.Playing)return S.gC&&S.lC.onRenderingSuspended&&S.lC.onRenderingSuspended(),void(S.gC=!1);S.ED(),S.ZC!==S.YC&&(S.iC.getEventFunction()(l.PlayerEvent.VRStereoChanged,{stereo:S.YC}),S.ZC=S.YC);var t=S.bC.update(e),i=!S.dC||S.eC||0===e;i||t||0===e||S.fC?(S.hC&&S.lC.onStartRendering&&S.lC.onStartRendering(),!S.gC&&S.lC.onRenderingResumed&&S.lC.onRenderingResumed(),S.aC.drawScene(S.bC.getProjectionInverse(),i),S.hC=!1,S.gC=!0):(S.gC&&S.lC.onRenderingSuspended&&S.lC.onRenderingSuspended(),S.gC=!1),null===S.XC&&(S.UC=requestAnimationFrame(S.HD)),S.eC=!1,S.fC=!1},this.ID=function(){S.sC().removeEventListener(d.MediaElementEvent.playing,S.ID),S.sC().removeEventListener(d.MediaElementEvent.seeked,S.ID),S.WC===h.VRState.Ready&&(S.ED(),S.WC=h.VRState.Playing,S.UC=requestAnimationFrame(S.HD))}
vendor: 59,132 bytes, line 28
28,this.JD=function(e){S.WC=h.VRState.Error,S.XC=e,S.GD(),S.UC&&(cancelAnimationFrame(S.UC),S.UC=null),S.iC.getEventFunction()(l.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.VR_RENDERING_ERROR)),S.mC.debug("VR Rendering error: "+e)},this.enableGyroscope=function(){return S.bC.enableGyroscope(),!0},this.disableGyroscope=function(){return S.bC.disableGyroscope(),!0},this.isGyroscopeEnabled=function(){return S.bC.isGyroscopeEnabled()},this.enableMouseControl=function(){return S.bC.enableMouseControl(),!0},this.disableMouseControl=function(){return S.bC.disableMouseControl(),!0},this.isMouseControlEnabled=function(){return S.bC.isMouseControlEnabled()},this.enableKeyboardControl=function(){return S.bC.enableKeyboardControl(),!0},this.disableKeyboardControl=function(){return S.bC.disableKeyboardControl(),!0},this.isKeyboardControlEnabled=function(){return S.bC.isKeyboardControlEnabled()},this.setViewingDirection=function(e){return!!S.bC&&(S.bC.setViewingDirection(e),!0)},this.pause=function(){S.dC=!0},this.KD=function(){var e=S.sC();4!==e.readyState?e.addEventListener(d.MediaElementEvent.playing,function(){return S.dC=!1}):S.dC=!1},this.LD=function(){S.iC.off(l.PlayerEvent.Playing,S.KD),S.iC.off(l.PlayerEvent.Paused,S.pause),S.iC.off(l.PlayerEvent.Destroy,S.LD),S.iC.off(l.PlayerEvent.SourceUnloaded,S.LD),S.iC=null;var e=S.sC();S.pC&&S.pC.removeEventListener(d.MediaElementEvent.seeked,S.tC),S.GD(),S.SC&&S.SC.parentNode&&(S.SC.parentNode.removeChild(S.SC),S.SC=null),S.TC&&S.TC.parentNode&&(S.TC.parentNode.removeChild(S.TC),S.TC=null),S.VC&&S.VC.parentNode&&(S.VC.parentNode.removeChild(S.VC),S.VC=null),S.WC=h.VRState.Uninitialized,S.UC&&(cancelAnimationFrame(S.UC),S.UC=null),S.bC&&S.bC.destroy(),S.bC=null,S.aC.destroy(),S.aC=null,e.removeEventListener(d.MediaElementEvent.playing,S.ID),e.removeEventListener(d.MediaElementEvent.seeked,S.ID)},this.iC=t.eventHandler,this.pC=t.videoElement,this.qC=m,this.jC=t.parentHtmlElement,this.id=i,this.kC=c,this.lC=b,this.mC=g,this.nC=v,this.oC=t.sourceContext.technology.streaming,this.rC=y,this.eC=!1,this.fC=!1,this.gC=!1,this.hC=!0,this.SC=document.createElement("canvas"),this.SC.setAttribute("id","bitmovinplayer-vr-canvas"),this.SC.style.display="none",this.SC.style.position="absolute";var _=this.jC.getElementsByClassName(s.Environment.idPrefix+"poster")[0];_?this.jC.insertBefore(this.SC,_):this.jC.appendChild(this.SC);var E=t.sourceContext.technology.player;if(e.isVideoTextureSupported(v,this.oC,E)?this.mC.debug("VR: using 3D rendering context"):(this.TC=document.createElement("canvas"),this.TC.setAttribute("id","bitmovinplayer-vr-helper-canvas"),this.TC.style.display="none",this.TC.style.position="absolute",this.jC.insertBefore(this.TC,this.SC),this.mC.debug("VR: using 2D rendering context")),(0,u.getCapabilities)().isSafariIOS&&(this.pC.setAttribute("playsinline",""),this.pC.setAttribute("webkit-playsinline",""),this.mC.debug("VR: set playsinline = true")),this.VC=document.getElementById("bitmovinplayer-no-select-style-node"),this.VC||(this.VC=document.createElement("style"),this.VC.setAttribute("id","bitmovinplayer-no-select-style-node"),this.VC.appendChild(document.createTextNode(".bitmovinplayer-no-select { -webkit-user-select: none; -moz-user-select: -moz-none; -ms-user-select: none; user-select: none; }")),document.getElementsByTagName("head")[0].appendChild(this.VC)),this.YC=this.kC.stereo,this.ZC=this.YC,this.kC.restrictedInlinePlayback?this.mC.debug("VR: using restricted inline playback"):this.pC.addEventListener(d.MediaElementEvent.seeked,this.tC),"string"==typeof this.kC.cardboard){var T=n.Cardboard.decode(this.kC.cardboard);this.mC.debug("cardboard: "+JSON.stringify(T)),T.hasOwnProperty("distortion_coefficients")&&(this.cC=new r.DeviceInfo(T,this.mC))}this.WC=h.VRState.Ready,this.bC=new p.OrientationHandler(this.SC,this.jC,this.kC,this.lC,this.iC),this.aC=new f.Renderer(this.SC,this.TC,t,this.cC,this.JD,this.mC,this.rC,this.kC,this.lC),this.iC.on(l.PlayerEvent.Playing,this.KD),this.iC.on(l.PlayerEvent.Paused,this.pause),this.iC.on(l.PlayerEvent.Destroy,this.LD),this.iC.on(l.PlayerEvent.SourceUnloaded,this.LD),this.FD(),this.ED();var w=this.sC();4!==w.readyState&&w.paused?(w.addEventListener(d.MediaElementEvent.playing,this.ID),w.addEventListener(d.MediaElementEvent.seeked,this.ID)):this.ID()}return e.prototype.sC=function(){return this.kC.restrictedInlinePlayback&&this.qC?this.qC:this.pC},e.prototype.ED=function(){if(this.SC){this.jC&&this.jC.clientWidth&&this.jC.clientHeight?(e=this.jC.clientWidth,t=this.jC.clientHeight):(e=window.innerWidth,t=window.innerHeight),this.pC&&this.pC.videoWidth&&this.pC.videoHeight?(i=this.pC.videoWidth,n=this.pC.videoHeight):(i=e,n=t);var e,t,i,n,r=(this.nC.devicePixelRatio||1)/this.aC.getBackingStoreRatio(),o=e*r,a=t*r,s=o/a;o>i&&(a=(o=i)/s),a>n&&(o=(a=n)*s),this.SC.width===o&&this.SC.height===a||(this.SC.width=o,this.SC.height=a),this.TC&&(this.TC.width!==i||this.TC.height!==n)&&(this.TC.width=i,this.TC.height=n)}},e.prototype.FD=function(){this.SC&&(this.SC.style.display="block"),this.TC&&(this.TC.style.display="block"),this.pC&&(this.pC.style.display="none")},e.prototype.GD=function(){this.SC&&(this.SC.style.display="none"),this.TC&&(this.TC.style.display="none"),this.pC&&this.pC.style&&(this.pC.style.display="block")},e.isVideoTextureSupported=function(e,t,i){var n=e.appName,r=e.userAgent,o=e.appVersion,a=(0,u.getCapabilities)().safariVersion,s=(a.major>10||10===a.major&&a.minor>=1)&&!(0,u.getCapabilities)().isSafariIOS,l=-1;return!(t===c.StreamType.Hls&&i===c.PlayerType.Native&&!s)&&("Microsoft Internet Explorer"===n?null!==RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(l=parseFloat(RegExp.$1)):"Netscape"===n&&(-1!==o.indexOf("Trident")?l=11:null!==RegExp("Edge/([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(l=parseFloat(RegExp.$1))),-1===l||l>=13)},e.prototype.setStereo=function(e){return this.fC=this.YC!==e,this.YC=e,this.YC?(this.aC.enableStereo(),this.bC.enableStereo()):(this.aC.disableStereo(),this.bC.disableStereo()),!0},e.prototype.getStereo=function(){return this.YC},e.prototype.getState=function(){return this.WC===h.VRState.Ready?h.VRState.Ready:this.WC===h.VRState.Playing?h.VRState.Playing:this.WC===h.VRState.Error?h.VRState.Error:this.WC===h.VRState.Uninitialized?null:void 0},e.prototype.getLastError=function(){return this.XC},e.prototype.getViewingDirection=function(){return this.bC?this.bC.getViewingDirection():{yaw:0,pitch:0,roll:0}},e.prototype.moveViewingDirection=function(e){return!!this.bC&&(this.bC.moveViewingDirection(e),!0)},e.prototype.setViewingDirectionChangeEventInterval=function(e){return!!this.bC&&(this.bC.setViewingDirectionChangeEventInterval(e),!0)},e.prototype.getViewingDirectionChangeEventInterval=function(){return this.bC?this.bC.getViewingDirectionChangeEventInterval():-1},e.prototype.setViewingDirectionChangeThreshold=function(e){return!!this.bC&&(this.bC.setViewingDirectionChangeThreshold(e),!0)},e.prototype.getViewingDirectionChangeThreshold=function(){return this.bC?this.bC.getViewingDirectionChangeThreshold():-1},e.prototype.setVerticalFieldOfView=function(e){return!!this.bC&&(this.bC.setVerticalFieldOfView(e),!0)},e.prototype.getVerticalFieldOfView=function(){return this.bC?this.bC.getVerticalFieldOfView():-1},e.prototype.setHorizontalFieldOfView=function(e){return!!this.bC&&(this.bC.setHorizontalFieldOfView(e),!0)},e.prototype.getHorizontalFieldOfView=function(){return this.bC?this.bC.getHorizontalFieldOfView():-1},e.prototype.zoom=function(e){return!!this.bC&&this.bC.zoom(e)},e.prototype.getZoom=function(){return this.bC?this.bC.getZoom():-1},e.prototype.deviceOrientationPermissionRequired=function(){var e,t;return null!=(t=null==(e=this.bC)?void 0:e.permissionRequired())&&t},e.prototype.requestDeviceOrientationPermission=function(){var e,t;return null!=(t=null==(e=this.bC)?void 0:e.requestPermission())?t:Promise.resolve()},e}()},6463:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VRState=t.TransitionTimingType=t.VRContentType=t.VRModuleDefinition=void 0;var n=i(62756),r=i(43948);Object.defineProperty(t,"TransitionTimingType",{enumerable:!0,get:function(){return r.TransitionTimingType}}),Object.defineProperty(t,"VRContentType",{enumerable:!0,get:function(){return r.VRContentType}}),Object.defineProperty(t,"VRState",{enumerable:!0,get:function(){return r.VRState}});var o=i(24180);t.VRModuleDefinition={name:n.ModuleName.VR,module:{VRHandler:o.VRHandler},exports:{VRContentType:r.VRContentType,TransitionTimingType:r.TransitionTimingType,VRState:r.VRState}},t.default=t.VRModuleDefinition},85361:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Renderer=void 0;var n=i(44369),r=i(3714),o=i(44468),a=i(43948),s=i(54479),l=i(17378),c=function(){function e(){this.fY=[],this.gY=[]}return e.prototype.getVideoWidths=function(){return this.fY},e.prototype.getVideoHeights=function(){return this.gY},e.prototype.add=function(e,t){0>this.fY.indexOf(e)&&(this.fY.push(e),this.fY.sort(function(e,t){return e-t})),0>this.gY.indexOf(t)&&(this.gY.push(t),this.gY.sort(function(e,t){return e-t}))},e}();t.Renderer=function(){function e(e,t,i,n,o,a,u,d,h){var p=this;this.hY=null,this.iY=null,this.jY=s.GL_ERROR.NO_ERROR,this.lY=-1,this.mY=!1,this.nY=-1,this.oY=-1,this.pY=-1,this.qY=-1,this.rY=-1,this.sY=[-1,-1,1,-1,1,1,-1,1],this.tY=[0,1,2,0,2,3],this.uY=-1,this.vY=/mediump/g,this.wY=!0,this.xY=[0,0,0,0,0,0,0,0,0,0,0,0],this.yY={LEFT:0,RIGHT:1},this.zY=[0,0,0,0,0,0,0,0,0,0,0,0],this.AY=1,this.BY=[[1,1],[1,1]],this.CY=[1,1],this.RZ=null,this.SZ=null,this.TZ=null,this.UZ=null,this.VZ=null,this.WZ=null,this.XZ=-1,this.YZ=-1,this.ZZ=null,this.aZ=!1,this.bZ=null,d.stereo?(this.mY=!0,this.lY=2):(this.mY=!1,this.lY=1),this.QZ=i.eventHandler,this.RZ=a,this.SZ=e,this.TZ=t,this.UZ=i.videoElement,this.VZ=o,this.WZ=i.sourceContext.technology.streaming,this.bZ=u,this.cZ=d,this.dZ=h,this.kY=[],this.QZ.on(r.PlayerEvent.TimeChanged,function(){return p.wY=!1}),n&&(this.zY=this.EZ(n),this.AY=this.FZ(n),this.BY[this.yY.LEFT]=this.HZ(n,this.yY.LEFT),this.BY[this.yY.RIGHT]=this.HZ(n,this.yY.RIGHT),this.CY=this.IZ(n)),this.ZZ=new c,this.FY=new l.FrameRateMonitor(1500,1e3),this.cZ.enableFrameRateMeasurements?(this.FY.enable(),this.FY.subscribe(this)):this.FY.disable();try{this.uZ(),this.tZ(),this.vZ(),this.wZ(),this.xZ(),this.yZ(),this.zZ(),this.AZ()}catch(e){this.RZ.error(e)}}return e.prototype.qZ=function(e){if(void 0===e&&(e=[]),null!==this.hY){var t=this.hY.getError();if(t===s.GL_ERROR.NO_ERROR)return this.jY=s.GL_ERROR.NO_ERROR,void(this.kY=[]);if(this.kY.push(t),e.indexOf(t)>-1&&this.wY)throw this.jY=s.GL_ERROR.NO_ERROR,this.kY=[],"STARTUP ERROR";if(!(this.kY.length>=this.bZ.MAX_CONSECUTIVE_VR_ERRORS))return;this.jY=this.kY[this.kY.length-1]}var i="Unable to initialize WebGL";throw s.GL_ERROR_STR[this.jY]&&(i=s.GL_ERROR_STR[this.jY]),this.VZ(i),i},e.prototype.rZ=function(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var r=null;if(e&&"function"==typeof e[t]){try{r=e[t].apply(e,i)}catch(e){this.RZ.warn("could not call WebGL function ("+t+"("+JSON.stringify(i)+")): "+e)}this.qZ()}return r},e.prototype.sZ=function(e){throw this.jY=s.GL_ERROR.OTHER_ERROR,this.VZ(e),e},e.prototype.tZ=function(){this.EY=i(10768),this.DY=i(50766);var e=this.rZ(this.hY,"getShaderPrecisionFormat",this.hY.FRAGMENT_SHADER,this.hY.HIGH_FLOAT);0!==e.precision&&0!==e.rangeMin&&0!==e.rangeMax&&(this.EY=this.EY.replace(this.vY,"highp")),0!==(e=this.rZ(this.hY,"getShaderPrecisionFormat",this.hY.VERTEX_SHADER,this.hY.HIGH_FLOAT)).precision&&0!==e.rangeMin&&0!==e.rangeMax&&(this.DY=this.DY.replace(this.vY,"highp"))},e.prototype.uZ=function(){this.TZ&&(this.iY=this.TZ.getContext("2d"));var e={failIfMajorPerformanceCaveat:!0};this.hY=this.SZ.getContext("webgl",e)||this.SZ.getContext("experimental-webgl",e),this.qZ(),this.rZ(this.hY,"clearColor",.5,.5,.5,1),this.rZ(this.hY,"clearDepth",1),this.rZ(this.hY,"disable",this.hY.DEPTH_TEST)},e.prototype.vZ=function(){this.nY=this.rZ(this.hY,"createShader",this.hY.VERTEX_SHADER),this.rZ(this.hY,"shaderSource",this.nY,this.DY),this.rZ(this.hY,"compileShader",this.nY),this.rZ(this.hY,"getShaderParameter",this.nY,this.hY.COMPILE_STATUS)||this.sZ("Vertex shader compilation failed ("+this.rZ(this.hY,"getShaderInfoLog",this.nY)+")"),this.oY=this.rZ(this.hY,"createShader",this.hY.FRAGMENT_SHADER),this.rZ(this.hY,"shaderSource",this.oY,this.EY),this.rZ(this.hY,"compileShader",this.oY),this.rZ(this.hY,"getShaderParameter",this.oY,this.hY.COMPILE_STATUS)||this.sZ("Fragment shader compilation failed ("+this.rZ(this.hY,"getShaderInfoLog",this.oY)+")")},e.prototype.wZ=function(){this.pY=this.rZ(this.hY,"createProgram"),this.rZ(this.hY,"attachShader",this.pY,this.nY),this.rZ(this.hY,"attachShader",this.pY,this.oY),this.rZ(this.hY,"linkProgram",this.pY),this.rZ(this.hY,"getProgramParameter",this.pY,this.hY.LINK_STATUS)||this.sZ("Unable to link program: "+this.rZ(this.hY,"getProgramInfoLog",this.pY)),this.rZ(this.hY,"useProgram",this.pY)},e.prototype.xZ=function(){this.eZ=new s.GLAttribute(this.hY,this.pY,"vertexPosition",null)},e.prototype.yZ=function(){this.fZ=new s.GLUniform(this.hY,this.pY,"eyeSelector",s.GLVariableType.UNIFORM_1I),this.gZ=new s.GLUniform(this.hY,this.pY,"textureUnit",s.GLVariableType.UNIFORM_1I),this.iZ=new s.GLUniform(this.hY,this.pY,"contentType",s.GLVariableType.UNIFORM_1I),this.jZ=new s.GLUniform(this.hY,this.pY,"contentFieldOfView",s.GLVariableType.UNIFORM_1F),this.kZ=new s.GLUniform(this.hY,this.pY,"videoWidth",s.GLVariableType.UNIFORM_1F),this.lZ=new s.GLUniform(this.hY,this.pY,"videoHeight",s.GLVariableType.UNIFORM_1F),this.hZ=new s.GLUniform(this.hY,this.pY,"projectionInverse",s.GLVariableType.UNIFORM_MATRIX_4FV),this.mZ=new s.GLUniform(this.hY,this.pY,"distortionCoefficients",s.GLVariableType.UNIFORM_1FV),this.nZ=new s.GLUniform(this.hY,this.pY,"distortionMaxFovSquared",s.GLVariableType.UNIFORM_1F),this.oZ=new s.GLUniform(this.hY,this.pY,"distortionFovOffset",s.GLVariableType.UNIFORM_2FV),this.pZ=new s.GLUniform(this.hY,this.pY,"distortionFovScale",s.GLVariableType.UNIFORM_2FV)},e.prototype.zZ=function(){this.qY=this.rZ(this.hY,"createBuffer"),this.rZ(this.hY,"bindBuffer",this.hY.ARRAY_BUFFER,this.qY),this.rZ(this.hY,"bufferData",this.hY.ARRAY_BUFFER,new Float32Array(this.sY),this.hY.STATIC_DRAW),this.rY=this.rZ(this.hY,"createBuffer"),this.rZ(this.hY,"bindBuffer",this.hY.ELEMENT_ARRAY_BUFFER,this.rY),this.rZ(this.hY,"bufferData",this.hY.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.tY),this.hY.STATIC_DRAW)},e.prototype.AZ=function(){this.uY=this.rZ(this.hY,"createTexture"),this.rZ(this.hY,"bindTexture",this.hY.TEXTURE_2D,this.uY),this.rZ(this.hY,"texParameteri",this.hY.TEXTURE_2D,this.hY.TEXTURE_MAG_FILTER,this.hY.LINEAR),this.rZ(this.hY,"texParameteri",this.hY.TEXTURE_2D,this.hY.TEXTURE_MIN_FILTER,this.hY.LINEAR),this.rZ(this.hY,"texParameteri",this.hY.TEXTURE_2D,this.hY.TEXTURE_WRAP_S,this.hY.CLAMP_TO_EDGE),this.rZ(this.hY,"texParameteri",this.hY.TEXTURE_2D,this.hY.TEXTURE_WRAP_T,this.hY.CLAMP_TO_EDGE)},e.prototype.BZ=function(e,t){var i,n,r=this.rZ(this.iY,"getImageData",0,0,e,t);if(!r)return this.RZ.debug("Texture size verification failed."),void(this.aZ=!1);for(var o=this.ZZ.getVideoWidths(),a=this.ZZ.getVideoHeights(),s=0;s<o.length&&r.data[4*(o[s]-1)+3]>0;s++)i=Math.min(o[s],e);for(var l=0;l<a.length&&r.data[(a[l]-1)*this.UZ.videoWidth*4+3]>0;l++)n=Math.min(a[l],t);i&&n&&(i!==e||n!==t)?(this.RZ.debug("Texture size mismatch! Expected "+e+"x"+t+" but got "+i+"x"+n+" instead."),this.rZ(this.iY,"drawImage",this.TZ,0,0,i,n,0,0,this.TZ.width,this.TZ.height)):this.aZ=!1},e.prototype.CZ=function(){if(!this.jY||this.jY===s.GL_ERROR.NO_ERROR){var e=this.UZ.videoWidth,t=this.UZ.videoHeight;if(this.TZ&&this.iY){var i=0;this.WZ!==o.StreamType.Progressive&&/Trident/.test(navigator.userAgent)&&(i=.0555555*t);var n=t-2*i;this.rZ(this.iY,"drawImage",this.UZ.getWrappedElement(),0,i,e,n,0,0,this.TZ.width,this.TZ.height),this.ZZ.add(e,t);var r=this.XZ!==e,a=this.YZ!==t;!r&&!a||/Trident/.test(navigator.userAgent)||(this.aZ=!0),this.aZ&&this.BZ(e,t),this.XZ=e,this.YZ=t}this.rZ(this.hY,"activeTexture",this.hY.TEXTURE0),this.rZ(this.hY,"bindTexture",this.hY.TEXTURE_2D,this.uY);try{var l=null!==this.dZ.requestFakeInput?this.dZ.requestFakeInput():null;null!==l?this.rZ(this.hY,"texImage2D",this.hY.TEXTURE_2D,0,this.hY.RGB,this.hY.RGB,this.hY.UNSIGNED_BYTE,l):this.TZ?this.rZ(this.hY,"texImage2D",this.hY.TEXTURE_2D,0,this.hY.RGB,this.hY.RGB,this.hY.UNSIGNED_BYTE,this.TZ):this.rZ(this.hY,"texImage2D",this.hY.TEXTURE_2D,0,this.hY.RGB,this.hY.RGB,this.hY.UNSIGNED_BYTE,this.UZ.getWrappedElement())}catch(e){this.sZ(e.message)}}},e.prototype.onFrameRateAvailable=function(e,t,i){this.RZ.debug("Average framerate: "+e.toFixed(2)+"fps, of which "+(100*i).toFixed(2)+"% were spent drawing the scene, "+(100*t).toFixed(2)+"% were spent updating the texture")},e.prototype.DZ=function(e,t){if(!this.jY||this.jY===s.GL_ERROR.NO_ERROR){switch(this.rZ(this.hY,"useProgram",this.pY),this.rZ(this.hY,"bindBuffer",this.hY.ARRAY_BUFFER,this.qY),this.rZ(this.hY,"vertexAttribPointer",this.eZ.loc,2,this.hY.FLOAT,!1,0,0),this.rZ(this.hY,"activeTexture",this.hY.TEXTURE0),this.rZ(this.hY,"bindTexture",this.hY.TEXTURE_2D,this.uY),this.fZ.setValue(e),this.gZ.setValue(0),this.jZ.setValue(this.cZ.contentFieldOfView),isFinite(this.UZ.videoWidth)&&this.UZ.videoWidth>0&&isFinite(this.UZ.videoHeight)&&this.UZ.videoHeight>0?(this.kZ.setValue(this.UZ.videoWidth),this.lZ.setValue(this.UZ.videoHeight)):(this.kZ.setValue(4096),this.lZ.setValue(2048)),this.cZ.contentType){case a.VRContentType.Single:this.iZ.setValue(0);break;case a.VRContentType.SBS:this.iZ.setValue(1);break;case a.VRContentType.TAB:this.iZ.setValue(2);break;default:this.sZ("Invalid content type specified ("+this.cZ.contentType+")")}this.mZ.setValue(this.zY),this.nZ.setValue(this.AY),this.oZ.setValue(this.BY[e]),this.pZ.setValue(this.CY),this.hZ.setValue(t),this.rZ(this.hY,"viewport",this.SZ.width/2*e,0,this.SZ.width/this.lY,this.SZ.height),this.rZ(this.hY,"bindBuffer",this.hY.ELEMENT_ARRAY_BUFFER,this.rY),this.rZ(this.hY,"drawElements",this.hY.TRIANGLES,6,this.hY.UNSIGNED_SHORT,0)}},e.prototype.EZ=function(e){return e?e.viewer.inverseCoefficients:this.xY},e.prototype.FZ=function(e){var t=this.GZ(e),i=n.MathUtil.hypot(Math.tan(n.MathUtil.degToRad(Math.max(t.leftDegrees,t.rightDegrees))),Math.tan(n.MathUtil.degToRad(Math.max(t.downDegrees,t.upDegrees))));return i*i},e.prototype.GZ=function(e,t){var i=t||this.yY.LEFT;return i===this.yY.LEFT?e.getFieldOfViewLeftEye(!0):i===this.yY.RIGHT?e.getFieldOfViewRightEye(!0):null},e.prototype.HZ=function(e,t){var i=this.GZ(e,t);return[Math.tan(n.MathUtil.degToRad(i.leftDegrees)),Math.tan(n.MathUtil.degToRad(i.downDegrees))]},e.prototype.IZ=function(e){var t=this.GZ(e);return[Math.tan(n.MathUtil.degToRad(t.leftDegrees))+Math.tan(n.MathUtil.degToRad(t.rightDegrees)),Math.tan(n.MathUtil.degToRad(t.upDegrees))+Math.tan(n.MathUtil.degToRad(t.downDegrees))]},e.prototype.getBackingStoreRatio=function(){var e=0;return this.jY===s.GL_ERROR.NO_ERROR&&(e=(e=(e=(e=(e=e||this.hY.webkitBackingStorePixelRatio)||this.hY.mozBackingStorePixelRatio)||this.hY.msBackingStorePixelRatio)||this.hY.oBackingStorePixelRatio)||this.hY.backingStorePixelRatio),e||1},e.prototype.enableStereo=function(){this.mY=!0,this.lY=2},e.prototype.disableStereo=function(){this.mY=!1,this.lY=1},e.prototype.drawScene=function(e,t){if((!this.jY||this.jY===s.GL_ERROR.NO_ERROR)&&this.hY&&this.UZ.getWrappedElement()){this.FY.endAnimationFrame(),this.FY.startAnimationFrame(),this.FY.startDrawScene();try{this.FY.startUpdateTexture(),t&&this.CZ(),this.FY.endUpdateTexture(),this.DZ(this.yY.LEFT,e),this.mY&&this.DZ(this.yY.RIGHT,e),null!==this.dZ.onDrawScene&&this.dZ.onDrawScene(this.hY),this.qZ([s.GL_ERROR.INVALID_VALUE])}catch(e){this.RZ.warn("Texture update failed: "+e)}this.FY.endDrawScene()}},e.prototype.destroy=function(){this.FY.unsubscribe(this),this.FY.destroy(),this.FY=null,this.ZZ=null,this.hY=null,this.SZ=null,this.iY=null,this.TZ=null},e}()},24180:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VRHandler=void 0;var n,r=i(61535),o=i(70372);t.VRHandler=function(){function e(e,t,i,a,s,l,c){var u=o.ConfigParser.parse(i),d=u[0],h=u[1],p=new r.InternalVRHandler(e,t,d,a,s,l,c,h);(n=n||new window.WeakMap).set(this,p)}return e.prototype.b=function(){return n.has(this)&&"error"!==n.get(this).getState()},e.prototype.setStereo=function(e){var t="boolean"==typeof e;return!(!this.b()||!t)&&n.get(this).setStereo(e)},e.prototype.enableGyroscope=function(){return!!this.b()&&n.get(this).enableGyroscope()},e.prototype.disableGyroscope=function(){return!!this.b()&&n.get(this).disableGyroscope()},e.prototype.isGyroscopeEnabled=function(){return!!this.b()&&n.get(this).isGyroscopeEnabled()},e.prototype.enableMouseControl=function(){return!!this.b()&&n.get(this).enableMouseControl()},e.prototype.disableMouseControl=function(){return!!this.b()&&n.get(this).disableMouseControl()},e.prototype.isMouseControlEnabled=function(){return!!this.b()&&n.get(this).isMouseControlEnabled()},e.prototype.enableKeyboardControl=function(){return!!this.b()&&n.get(this).enableKeyboardControl()},e.prototype.disableKeyboardControl=function(){return!!this.b()&&n.get(this).disableKeyboardControl()},e.prototype.isKeyboardControlEnabled=function(){return!!this.b()&&n.get(this).isKeyboardControlEnabled()},e.prototype.getStereo=function(){return!!this.b()&&n.get(this).getStereo()},e.prototype.getState=function(){return n.has(this)?n.get(this).getState():null},e.prototype.getLastError=function(){return n.has(this)?n.get(this).getLastError():null},e.prototype.getViewingDirection=function(){return this.b()?n.get(this).getViewingDirection():{yaw:0,pitch:0,roll:0}},e.prototype.setViewingDirection=function(e){var t=e&&isFinite(e.yaw)&&isFinite(e.pitch)&&isFinite(e.roll);return!(!this.b()||!t)&&n.get(this).setViewingDirection(e)},e.prototype.moveViewingDirection=function(e){var t=isFinite(e.x)&&isFinite(e.y)&&isFinite(e.phi);return!(!this.b()||!t)&&n.get(this).moveViewingDirection(e)},e.prototype.setViewingDirectionChangeEventInterval=function(e){var t=isFinite(e);return!(!this.b()||!t)&&n.get(this).setViewingDirectionChangeEventInterval(e)},e.prototype.getViewingDirectionChangeEventInterval=function(){return this.b()?n.get(this).getViewingDirectionChangeEventInterval():-1},e.prototype.setViewingDirectionChangeThreshold=function(e){var t=isFinite(e);return!(!this.b()||!t)&&n.get(this).setViewingDirectionChangeThreshold(e)},e.prototype.getViewingDirectionChangeThreshold=function(){return this.b()?n.get(this).getViewingDirectionChangeThreshold():-1},e.prototype.setVerticalFieldOfView=function(e){return!!this.b()&&n.get(this).setVerticalFieldOfView(e)},e.prototype.getVerticalFieldOfView=function(){return this.b()?n.get(this).getVerticalFieldOfView():-1},e.prototype.setHorizontalFieldOfView=function(e){return!!this.b()&&n.get(this).setHorizontalFieldOfView(e)},e.prototype.getHorizontalFieldOfView=function(){return this.b()?n.get(this).getHorizontalFieldOfView():-1},e.prototype.zoom=function(e){return!!this.b()&&n.get(this).zoom(e)},e.prototype.getZoom=function(){return this.b()?n.get(this).getZoom():-1},e.prototype.deviceOrientationPermissionRequired=function(){var e,t;return this.b()&&null!=(t=null==(e=n.get(this))?void 0:e.deviceOrientationPermissionRequired())&&t},e.prototype.requestDeviceOrientationPermission=function(){var e,t;return this.b()&&null!=(t=null==(e=n.get(this))?void 0:e.requestDeviceOrientationPermission())?t:Promise.resolve()},e}()},45698:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ApiControl=void 0;var r=i(37485);t.ApiControl=function(e){function t(t,i,n){var o=e.call(this,t,i)||this;return o.setViewingDirectionChangeEventInterval(n),o.icb=new r.DisplacementVector,o.jcb=new r.DisplacementVector,o.lcb=0,o}return n(t,e),t.prototype.getDisplacementVector=function(e){return this.lcb+=e,this.lcb>this.kcb?this.jcb.update(0,0,0,!1,e):(r.DisplacementVector.clone(this.icb,this.jcb),this.jcb.length=this.icb.length*e,this.jcb.phi=this.icb.phi*e,this.jcb.update(this.jcb.x,this.jcb.y,this.jcb.phi,!0,e)),this.jcb},t.prototype.setTargetVector=function(e){this.icb.fromVec3(e,!0),this.lcb=0},t.prototype.setViewingDirectionChangeEventInterval=function(e){this.kcb=e},t.prototype.dispose=function(){this.disable()},t}(i(67982).Control)},67982:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Control=void 0,t.Control=function(){function e(e,t){this.config=e,this.debugHooks=t}return e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.isEnabled=function(){return this.enabled},e}()},22185:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardControl=void 0;var r=i(37485),o=i(67982),a=function(){function e(e){this.setKeyCombinations(e),this.ncb=!1}return e.prototype.checkAndSetActiveState=function(e){return this.mcb.some(function(t){return!t.some(function(t){return 0>e.indexOf(t)})})?(this.ncb=!0,!0):(this.ncb=!1,!1)},e.prototype.isActive=function(){return this.ncb},e.prototype.setKeyCombinations=function(e){for(var t=[],i=0,n=e;i<n.length;i++){var r=n[i].split(" ").filter(function(e){return e.length>0});r.length>0&&t.push(r)}this.mcb=t},e}();t.KeyboardControl=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.Hdb=function(e){if(e&&"string"==typeof e.key){var t=e.key.replace(" ","Space"),i=n.Fdb.indexOf(t);i>=0&&"keyup"===e.type?n.Fdb.splice(i,1):i<0&&"keydown"===e.type&&n.Fdb.push(t),n.pcb.checkAndSetActiveState(n.Fdb),n.Adb.checkAndSetActiveState(n.Fdb),n.Bdb.checkAndSetActiveState(n.Fdb),n.Cdb.checkAndSetActiveState(n.Fdb),n.Ddb.checkAndSetActiveState(n.Fdb),n.Edb.checkAndSetActiveState(n.Fdb)}},n.ocb=n.config.maxDisplacementSpeed,n.pcb=new a(["w"]),n.Adb=new a(["s"]),n.Bdb=new a(["a"]),n.Cdb=new a(["d"]),n.Ddb=new a(["e"]),n.Edb=new a(["q"]),n.Fdb=[],n.Gdb=new r.DisplacementVector,n.applyKeyMap(n.config.keyMap),n.enable(),n}return n(t,e),t.prototype.getDisplacementVector=function(e){if(this.enabled){var t=0,i=0,n=0;this.debugHooks.requestKeyActiveState?(i+=this.debugHooks.requestKeyActiveState("up")?this.ocb*e:0,i-=this.debugHooks.requestKeyActiveState("down")?this.ocb*e:0,t+=this.debugHooks.requestKeyActiveState("left")?this.ocb*e:0,t-=this.debugHooks.requestKeyActiveState("right")?this.ocb*e:0,n-=this.debugHooks.requestKeyActiveState("rotateClockwise")?this.ocb*e:0,n+=this.debugHooks.requestKeyActiveState("rotateCounterclockwise")?this.ocb*e:0):(i+=this.pcb.isActive()?this.ocb*e:0,i-=this.Adb.isActive()?this.ocb*e:0,t+=this.Bdb.isActive()?this.ocb*e:0,t-=this.Cdb.isActive()?this.ocb*e:0,n-=this.Ddb.isActive()?this.ocb*e:0,n+=this.Edb.isActive()?this.ocb*e:0);var r=0!==t||0!==i||0!==n;this.Gdb.update(t,i,n,r,e)}else this.Gdb.update(0,0,0,!1,e);return this.Gdb},t.prototype.enable=function(){this.enabled=!0,document.addEventListener("keydown",this.Hdb,!1),document.addEventListener("keyup",this.Hdb,!1)},t.prototype.disable=function(){this.enabled=!1,document.removeEventListener("keydown",this.Hdb,!1),document.removeEventListener("keyup",this.Hdb,!1)},t.prototype.dispose=function(){this.disable()},t.prototype.applyKeyMap=function(e){e.hasOwnProperty("up")&&this.pcb.setKeyCombinations(e.up),e.hasOwnProperty("down")&&this.Adb.setKeyCombinations(e.down),e.hasOwnProperty("left")&&this.Bdb.setKeyCombinations(e.left),e.hasOwnProperty("right")&&this.Cdb.setKeyCombinations(e.right),e.hasOwnProperty("rotateClockwise")&&this.Ddb.setKeyCombinations(e.rotateClockwise),e.hasOwnProperty("rotateCounterclockwise")&&this.Edb.setKeyCombinations(e.rotateCounterclockwise)},t}(o.Control)},64419:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MouseControl=void 0;var r=i(37485),o=i(51629);t.MouseControl=function(e){function t(i,n,a,s,l){void 0===l&&(l=90);var c=e.call(this,i,n)||this;return c.Rdb=function(e){var i=t.getTouchPosition(e),n=0,r=0;c.Kdb&&(n=i.x-c.Ndb.x,r=i.y-c.Ndb.y,c.Odb.x+=n,c.Odb.y+=r,c.Ndb=i),Math.abs(n)+Math.abs(r)>0&&(c.Mdb=!0),e.preventDefault()},c.Sdb=function(e){e.stopPropagation(),e.preventDefault(),o.ElementHelper.removeEventListener(document,["click"],c.Sdb,!0)},c.Tdb=function(e){o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,c.Rdb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,c.Tdb,!1),o.ElementHelper.removeEventListener(c.Idb,o.ElementHelper.touchEvents.up,c.Tdb,!1),o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select"),c.Ndb=null,c.Kdb=!1,c.Mdb&&c.Ldb&&e.target===c.Ldb&&o.ElementHelper.addEventListener(document,["click"],c.Sdb,!0),c.Mdb=!1,c.Ldb=null},c.Udb=function(e){c.Ndb=t.getTouchPosition(e),c.Odb={x:0,y:0},c.Kdb=!0,c.Mdb=!1,c.Ldb=e.target,o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.move,c.Rdb,!1),o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.up,c.Tdb,!1),o.ElementHelper.addEventListener(c.Idb,o.ElementHelper.touchEvents.up,c.Tdb,!1),o.ElementHelper.addClass(document.body,"bitmovinplayer-no-select")},c.Idb=a,c.Jdb=s,c.Kdb=!1,c.Ndb=null,c.Odb={x:0,y:0},c.Pdb=l,c.Qdb=new r.DisplacementVector,c.enable(),c}return n(t,e),t.prototype.getDisplacementVector=function(e){var t=this.Jdb.clientWidth,i=this.Jdb.clientHeight,n=!!this.debugHooks.requestTraveledMouseDistance,r=this.Pdb*(i/t);if(this.Odb=n?this.debugHooks.requestTraveledMouseDistance(e):this.Odb,this.enabled&&isFinite(r)&&r>0){var o=this.Kdb||0!==this.Odb.x||0!==this.Odb.y;this.Qdb.update(this.Odb.x/this.Jdb.clientWidth*this.Pdb,this.Odb.y/this.Jdb.clientHeight*r,0,o,e),this.Odb={x:0,y:0}}else this.Qdb.update(0,0,0,this.Kdb,e);return this.Qdb},t.prototype.enable=function(){this.enabled=!0,o.ElementHelper.addEventListener(this.Idb,o.ElementHelper.touchEvents.down,this.Udb,!1)},t.prototype.disable=function(){this.enabled=!1,o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,this.Rdb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,this.Tdb,!1),o.ElementHelper.removeEventListener(this.Idb,o.ElementHelper.touchEvents.up,this.Tdb,!1),o.ElementHelper.removeEventListener(this.Idb,o.ElementHelper.touchEvents.down,this.Udb,!1),o.ElementHelper.removeEventListener(document,["click"],this.Sdb,!0),this.Ndb=null,this.Kdb=!1,this.Mdb=!1,this.Ldb=null,o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select")},t.prototype.dispose=function(){this.disable(),this.Idb=null,this.Jdb=null},t.getTouchPosition=function(e){var t={x:0,y:0};return"ms"===o.ElementHelper.touchEvents.type?(t.x=e.clientX||e.originalEvent.layerX,t.y=e.clientY||e.originalEvent.layerY):"mobile"===o.ElementHelper.touchEvents.type?(t.x=e.touches[0].clientX,t.y=e.touches[0].clientY):(t.x=e.clientX,t.y=e.clientY),t.x=t.x||0,t.y=t.y||0,t},t}(i(67982).Control)},54479:function(e,t){var i,n,r=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.GLUniform=t.GLAttribute=t.GLVariableType=t.GL_ERROR_STR=t.GL_ERROR=void 0,function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.OTHER_ERROR=1]="OTHER_ERROR",e[e.INVALID_ENUM=1280]="INVALID_ENUM",e[e.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",e[e.INVALID_OPERATION=1282]="INVALID_OPERATION",e[e.INVALID_VALUE=1281]="INVALID_VALUE"}(i||(t.GL_ERROR=i={})),t.GL_ERROR_STR={1280:"INVALID_ENUM",1286:"INVALID_FRAMEBUFFER_OPERATION",1282:"INVALID_OPERATION",1281:"INVALID_VALUE"},function(e){e.UNIFORM_1I="uniform1i",e.UNIFORM_1F="uniform1f",e.UNIFORM_MATRIX_4FV="uniformMatrix4fv",e.UNIFORM_1FV="uniform1fv",e.UNIFORM_2FV="uniform2fv"}(n||(t.GLVariableType=n={}));var o=function(){function e(e,t,i,n){this.context=e,this.program=t,this.name=i,this.type=n}return Object.defineProperty(e.prototype,"loc",{get:function(){return this.location},enumerable:!1,configurable:!0}),e}();t.GLAttribute=function(e){function t(t,i,n,r){var o=e.call(this,t,i,n,r)||this;return o.location=o.context.getAttribLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(t,e),t.prototype.setValue=function(e){},t}(o),t.GLUniform=function(e){function t(t,i,n,r){var o=e.call(this,t,i,n,r)||this;return o.location=o.context.getUniformLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(t,e),t.prototype.setValue=function(e){this.type.indexOf("Matrix")>-1?this.context[this.type].call(this.context,this.location,!1,e):this.context[this.type].call(this.context,this.location,e)},t}(o)},55443:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDeviceOrientationProvider=void 0;var r,o=i(44369),a=i(16404);!function(e){e.Granted="granted",e.Denied="denied"}(r||(r={})),t.DefaultDeviceOrientationProvider=function(e){function t(){var i=e.call(this)||this;i.kgb=null,i.lgb=null,i.mgb=null,i.ngb=0,i.ogb=0,i.rgb=function(e){var t=void 0!==e.alpha&&null!==e.alpha,n=void 0!==e.beta&&null!==e.beta,r=void 0!==e.gamma&&null!==e.gamma;t&&n&&r&&(i.kgb=e.alpha,i.lgb=e.gamma,i.mgb=e.beta),e.hasOwnProperty("screenOrientation")&&(i.ngb=i.qgb(e))},i.sgb=function(){i.rgb(t.getDeviceOrientationFromWindow())},i.tgb=function(e){e&&e.data&&i.rgb(e.data)},window.top!==window?window.addEventListener("message",i.tgb,!1):window.addEventListener("deviceorientation",i.rgb);try{window.addEventListener("orientationchange",i.sgb);var n=t.getDeviceOrientationFromWindow();i.rgb(n)}catch{window.removeEventListener("orientationchange",i.sgb)}return i.enable(),i}return n(t,e),t.prototype.getOrientation=function(){if(!this.orientationDataAvailable()||!this.enabled)return this.defaultDeviceOrientation;var e=o.MathUtil.degToRad(this.kgb)/2,t=o.MathUtil.degToRad(this.mgb)/2,i=o.MathUtil.degToRad(this.lgb)/2,n=Math.cos(t),r=Math.cos(i),a=Math.cos(e),s=Math.sin(t),l=Math.sin(i),c=Math.sin(e),u=n*r*a-s*l*c,d=s*r*a-n*l*c,h=n*l*a+s*r*c,p=n*r*c+s*l*a,f=o.Quat.fromValues(d,h,p,u),m=o.MathUtil.degToRad(this.pgb())/2,g=o.Quat.fromValues(0,0,-Math.sin(m),Math.cos(m)),v=o.Quat.create();o.Quat.multiply(v,f,g);var y=Math.sqrt(.5);return o.Quat.multiply(v,o.Quat.fromValues(-y,0,0,y),v),o.Quat.toAngle(v)},t.prototype.orientationDataAvailable=function(){return null!==this.kgb},t.supported=function(){return!!window.DeviceOrientationEvent},t.prototype.pgb=function(){return this.ngb},t.prototype.qgb=function(e){var t;switch(e.screenOrientation.type){case"landscape-primary":t=90;break;case"landscape-secondary":t=-90;break;case"portrait-secondary":t=180;break;case"portrait-primary":t=0}return!t&&isNaN(t)&&(t=isNaN(e.screenOrientation.type)?e.orientation||0:e.screenOrientation.type),window.top!==window&&t===this.ogb&&e.orientation!==t&&(t=e.orientation||0),t},t.getDeviceOrientationFromWindow=function(){var e=window.screen,t=e.orientation||e.mozOrientation||e.msOrientation||{};return{screenOrientation:{type:t.type||t,angle:t.angle},orientation:window.orientation}},t.prototype.permissionRequired=function(){return"u">typeof DeviceMotionEvent&&"function"==typeof DeviceMotionEvent.requestPermission},t.prototype.requestPermission=function(){return typeof DeviceMotionEvent>"u"||"function"!=typeof DeviceMotionEvent.requestPermission?Promise.resolve():DeviceMotionEvent.requestPermission().then(function(e){return e===r.Granted?Promise.resolve():Promise.reject()})},t}(a.DeviceOrientationProvider)},16404:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceOrientationProvider=void 0,t.DeviceOrientationProvider=function(){function e(){this.defaultFieldOfView={upDegrees:45,rightDegrees:55,downDegrees:45,leftDegrees:55},this.defaultDeviceOrientation={yaw:0,pitch:0,roll:0}}return e.prototype.getFieldOfViewParams=function(){return this.defaultFieldOfView},e.supported=function(){return!1},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.isEnabled=function(){return this.enabled},e.prototype.permissionRequired=function(){return!1},e.prototype.requestPermission=function(){return Promise.resolve()},e}()},59324:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceOrientationProviderFactory=void 0;var n=i(55443),r=i(11805),o=i(72458);t.DeviceOrientationProviderFactory=function(){function e(){}return e.get=function(){return o.WebVRDeviceOrientationProvider.supported()?new o.WebVRDeviceOrientationProvider:n.DefaultDeviceOrientationProvider.supported()?new n.DefaultDeviceOrientationProvider:new r.NoDeviceOrientationProvider},e}()},37485:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DisplacementVector=void 0;var n=i(23068),r=Math.PI/180,o=180/Math.PI;t.DisplacementVector=function(){function e(e,t,i,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=!1),this.Ybb=null,this.update(e,t,i,n)}return Object.defineProperty(e.prototype,"x",{get:function(){return this.Sbb},set:function(e){this.Sbb!==e&&this.update(e,this.Tbb,this.Ubb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.Tbb},set:function(e){this.Tbb!==e&&this.update(this.Sbb,e,this.Ubb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"phi",{get:function(){return this.Ubb},set:function(e){this.Ubb!==e&&this.update(this.Sbb,this.Tbb,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.Wbb},set:function(e){this.Wbb!==e&&this.update(this.Vbb*Math.cos(e*r),this.Vbb*Math.sin(e*r),this.Ubb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.Vbb},set:function(e){this.Vbb!==e&&this.update(e*Math.cos(this.Wbb*r),e*Math.sin(this.Wbb*r),this.Ubb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this.Xbb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deltaTime",{get:function(){return this.Ybb||0},set:function(e){this.Ybb=e},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t,i,r,a){if(void 0===i&&(i=0),"boolean"==typeof r&&(this.Xbb=r),(0,n.isNumber)(a)&&(this.Ybb=a),this.Sbb!==e||this.Tbb!==t||this.Ubb!==i){if(this.Sbb=1e-4>Math.abs(e)?0:e,this.Tbb=1e-4>Math.abs(t)?0:t,this.Ubb=1e-4>Math.abs(i)?0:i,0===this.Sbb&&0===this.Tbb&&0===this.Ubb)return this.Vbb=0,void(this.Wbb=0);this.Vbb=Math.sqrt(this.Sbb*this.Sbb+this.Tbb*this.Tbb),0===this.Tbb&&this.Sbb>=0?this.Wbb=0:0===this.Sbb&&this.Tbb>0?this.Wbb=90:0===this.Sbb&&this.Tbb<0?this.Wbb=270:this.Sbb<0&&0===this.Tbb?this.Wbb=180:this.Sbb>0&&this.Tbb>0?this.Wbb=Math.atan(this.Tbb/this.Sbb)*o:this.Sbb<0&&this.Tbb>0||this.Sbb<0&&this.Tbb<0?this.Wbb=180+Math.atan(this.Tbb/this.Sbb)*o:this.Sbb>0&&this.Tbb<0?this.Wbb=360+Math.atan(this.Tbb/this.Sbb)*o:this.Wbb=0}},e.prototype.fromVec3=function(e,t,i){this.update(e.x,e.y,e.phi,t,i)},e.prototype.add=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=this.Sbb,n=this.Tbb,r=this.Ubb,o=0,a=e;o<a.length;o++){var s=a[o];i+=s.Sbb,n+=s.Tbb,r+=s.Ubb}this.update(i,n,r)},e.prototype.diff=function(t,i){i instanceof e?this.update(i.x-t.x,i.y-t.y,i.phi-t.phi):this.update(t.x-this.Sbb,t.y-this.Tbb,t.phi-this.Ubb)},e.clone=function(t,i){t instanceof e&&i instanceof e&&i.update(t.Sbb,t.Tbb,t.Ubb,t.Xbb,t.Ybb)},e.prototype.scale=function(e){this.length=this.Vbb*e},e}()},11805:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.NoDeviceOrientationProvider=void 0,t.NoDeviceOrientationProvider=function(e){function t(){var t=e.call(this)||this;return t.enable(),t}return n(t,e),t.prototype.getOrientation=function(){return this.defaultDeviceOrientation},t.prototype.orientationDataAvailable=function(){return!0},t.supported=function(){return!0},t}(i(16404).DeviceOrientationProvider)},33639:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.OrientationHandler=void 0;var n,r=i(44369),o=i(3714),a=i(45698),s=i(22185),l=i(64419),c=i(76320),u=i(59324),d=i(37485);!function(e){e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.BOTH="BOTH"}(n||(n={})),t.OrientationHandler=function(){function e(e,t,i,o,h){var p=this;this.B0=null,this.C0=null,this.D0=1,this.E0=null,this.F0=null,this.G0=null,this.H0=null,this.I0=null,this.J0=null,this.K0=null,this.enableGyroscope=function(){p.A0.enable()},this.disableGyroscope=function(){p.A0.disable()},this.isGyroscopeEnabled=function(){return p.A0.isEnabled()},this.enableMouseControl=function(){p.O0.enable()},this.disableMouseControl=function(){p.O0.disable()},this.isMouseControlEnabled=function(){return p.O0.isEnabled()},this.enableKeyboardControl=function(){p.N0.enable()},this.disableKeyboardControl=function(){p.N0.disable()},this.isKeyboardControlEnabled=function(){return p.N0.isEnabled()},this.L0=e,this.M0=i,this.q1=h,this.A0=u.DeviceOrientationProviderFactory.get(),this.H0=r.Mat4.create(),this.I0=r.Mat4.create(),this.J0=r.Mat4.create(),this.E0=r.Mat4.create(),this.B0=r.Mat4.create(),this.D0=this.M0.stereo?2:1,this.G0={yaw:0,pitch:0,roll:0},this.G0.yaw=this.M0.startPosition,this.T0=new d.DisplacementVector,this.U0=new d.DisplacementVector,this.F0={yaw:this.G0.yaw,pitch:0,roll:0},this.V0=this.M0.viewingDirectionChangeEventInterval,this.W0=this.M0.viewingDirectionChangeThreshold,this.l1=this.M0.verticalFieldOfView,this.m1=this.M0.horizontalFieldOfView,this.n1=this.l1>-1,this.o1=this.m1>-1,this.p1=1,this.X0=0,this.Y0=!1,this.N0=new s.KeyboardControl(this.M0.keyboardControl,o),this.O0=new l.MouseControl(this.M0.mouseControl,o,t,this.L0),this.P0=new a.ApiControl(this.M0.apiControl,o,this.V0),this.R0=c.TransitionTimingFactory.get(this.M0.keyboardControl),this.Q0=c.TransitionTimingFactory.get(this.M0.mouseControl),this.S0=c.TransitionTimingFactory.get(this.M0.apiControl),this.l1>-1&&this.m1>-1?this.k1=n.BOTH:this.m1>-1?this.k1=n.HORIZONTAL:this.k1=n.VERTICAL}return e.clampValue=function(e,t,i){return 0===t&&360===i?e%360:e>i?i:e<t?t:e},e.clampToWindow=function(t,i){var n={yaw:0,pitch:0,roll:t.roll};return n.yaw=e.clampValue(t.yaw,i.minYaw,i.maxYaw),n.pitch=e.clampValue(t.pitch,i.minPitch,i.maxPitch),n},e.prototype.r1=function(t){void 0===t&&(t={yaw:0,pitch:0,roll:0}),null!==this.K0&&(this.K0=e.clampToWindow(this.K0,this.M0.viewingWindow),this.G0.yaw=this.K0.yaw-t.yaw,this.G0.pitch=this.K0.pitch-t.pitch,this.G0.roll=this.K0.roll-t.roll,this.Q0.reset(),this.R0.reset(),this.S0.reset()),this.K0=null,this.F0.yaw=this.G0.yaw+t.yaw,this.F0.pitch=this.G0.pitch+t.pitch,this.F0.roll=this.G0.roll+t.roll,this.F0=e.clampToWindow(this.F0,this.M0.viewingWindow),r.Mat4.identity(this.E0),r.Mat4.rotate(this.E0,r.MathUtil.degToRad(this.F0.yaw+180),[0,1,0]),r.Mat4.rotate(this.E0,r.MathUtil.degToRad(this.F0.pitch),[1,0,0]),r.Mat4.rotate(this.E0,r.MathUtil.degToRad(this.F0.roll),[0,0,1])},e.prototype.getProjectionInverse=function(){return this.B0},e.prototype.getViewingDirection=function(){return this.F0},e.prototype.setViewingDirection=function(e){this.K0=e},e.prototype.setVerticalFieldOfView=function(e){this.n1=-1!==e,this.l1=-1===e?-1:Math.max(Math.min(180,e),0),-1===e&&this.k1===n.BOTH?this.k1=n.HORIZONTAL:this.k1===n.HORIZONTAL&&(this.o1?this.k1=n.BOTH:this.k1=n.VERTICAL)},e.prototype.getVerticalFieldOfView=function(){return this.l1/this.p1},e.prototype.setHorizontalFieldOfView=function(e){this.o1=-1!==e,this.m1=-1===e?-1:Math.max(Math.min(180,e),0),-1===e&&this.k1===n.BOTH?this.k1=n.VERTICAL:this.k1===n.VERTICAL&&(this.n1?this.k1=n.BOTH:this.k1=n.HORIZONTAL)},e.prototype.getHorizontalFieldOfView=function(){return this.m1/this.p1},e.prototype.zoom=function(e){return!!isFinite(e)&&(this.p1=Math.max(Number(e),1e-10),!0)},e.prototype.getZoom=function(){return this.p1},e.prototype.s1=function(){var e,t,i=this.A0.getFieldOfViewParams(),o=[1];this.l1<0&&(this.l1=i.upDegrees+i.downDegrees),this.m1<0&&(this.m1=i.leftDegrees+i.rightDegrees),this.k1!==n.BOTH&&this.k1!==n.HORIZONTAL||o.push(180/(this.m1/this.p1)),this.k1!==n.BOTH&&this.k1!==n.VERTICAL||o.push(180/(this.l1/this.p1)),this.p1/=Math.min.apply(null,o);var a=r.MathUtil.degToRad(this.l1/this.p1),s=r.MathUtil.degToRad(this.m1/this.p1);this.k1===n.BOTH?(e=a,t=Math.tan(.5*s)/Math.tan(.5*a)):t=this.L0.width/this.D0/this.L0.height,this.k1===n.HORIZONTAL?(e=2*Math.atan(Math.tan(s/2)/t),this.l1=r.MathUtil.radToDeg(e)*this.p1):this.k1===n.VERTICAL&&(e=a,this.m1=r.MathUtil.radToDeg(2*Math.atan(t*Math.tan(a/2)))/this.D0*this.p1),r.Mat4.perspective(this.J0,e,t,.1,10),r.Mat4.invert(this.H0,this.J0),r.Mat4.multiply(this.B0,this.E0,this.H0)},e.prototype.update=function(t){this.C0=this.C0||t;for(var i=(t-this.C0)/1e3,n=r.Mat4.create(),a=0;a<this.B0.length;a++)n[a]=this.B0[a];this.X0+=i,this.T0.update(0,0,0),i>0&&this.T0.add(this.Q0.apply(this.O0.getDisplacementVector(i)),this.R0.apply(this.N0.getDisplacementVector(i)),this.S0.apply(this.P0.getDisplacementVector(i))),this.G0.yaw+=this.T0.x,this.G0.pitch+=this.T0.y,this.G0.roll+=this.T0.phi,this.G0=e.clampToWindow(this.G0,this.M0.viewingWindow),this.C0=t,this.A0.orientationDataAvailable()?this.r1(this.A0.getOrientation()):this.r1(),this.U0.add(this.T0);var s=Math.abs(this.U0.length)>this.W0||Math.abs(this.U0.phi)>this.W0;s||this.Y0||(this.X0=0);var l=this.X0>=this.V0;for(s&&(l||!this.Y0)?(this.Y0=!0,this.X0=0,this.U0.update(0,0,0),this.q1.getEventFunction()(o.PlayerEvent.VRViewingDirectionChange,{direction:this.F0})):l&&this.Y0&&(this.Y0=!1,this.U0.update(0,0,0),this.X0=0,this.q1.getEventFunction()(o.PlayerEvent.VRViewingDirectionChanged,{direction:this.F0})),this.s1(),a=0;a<this.B0.length;a++)if(n[a]!==this.B0[a])return!0;return!1},e.prototype.enableStereo=function(){this.D0=2},e.prototype.disableStereo=function(){this.D0=1},e.prototype.moveViewingDirection=function(e){this.P0.setTargetVector(e)},e.prototype.setViewingDirectionChangeEventInterval=function(e){this.V0=e},e.prototype.getViewingDirectionChangeEventInterval=function(){return this.V0},e.prototype.setViewingDirectionChangeThreshold=function(e){this.W0=e},e.prototype.getViewingDirectionChangeThreshold=function(){return this.W0},e.prototype.permissionRequired=function(){return this.A0.permissionRequired()},e.prototype.requestPermission=function(){return this.A0.requestPermission()},e.prototype.destroy=function(){this.N0.dispose(),this.O0.dispose(),this.N0=null,this.O0=null},e}()},72458:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.WebVRDeviceOrientationProvider=void 0;var r=i(44369);t.WebVRDeviceOrientationProvider=function(e){function t(){var t=e.call(this)||this;return t.vgb=null,t.wgb=null,t.xgb=function(e){var i;for(i=0;i<e.length;++i)if(e[i]instanceof HMDVRDevice){t.vgb=e[i];break}if(t.vgb){for(i=0;i<e.length;++i)if(e[i]instanceof PositionSensorVRDevice&&e[i].hardwareUnitId===t.vgb.hardwareUnitId){t.wgb=e[i];break}}},navigator.getVRDevices&&navigator.getVRDevices().then(t.xgb),t.enable(),t}return n(t,e),t.prototype.getOrientation=function(){if(this.orientationDataAvailable()&&this.enabled){var e=this.wgb.getState(),t=new Float32Array([0,0,0,0]);return null!==e&&e.orientation&&(t=new Float32Array([e.orientation.x,e.orientation.y,e.orientation.z,e.orientation.w])),r.Quat.toAngle(t)}return this.defaultDeviceOrientation},t.prototype.getFieldOfViewParams=function(){return this.orientationDataAvailable()?this.vgb.getEyeParameters("left").recommendedFieldOfView:this.defaultFieldOfView},t.prototype.orientationDataAvailable=function(){return null!==this.wgb&&null!==this.vgb},t.supported=function(){return!!navigator.getVRDevices},t}(i(16404).DeviceOrientationProvider)},81116:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.EaseInOutTransitionTiming=void 0;var r=i(44369),o=i(37485);t.EaseInOutTransitionTiming=function(e){function t(t){var i=e.call(this,t)||this;return i.currentDisplacementVector=new o.DisplacementVector,i.intermediateDisplacementVector=new o.DisplacementVector,i.targetDisplacementVector=new o.DisplacementVector,i.normalizedTargetDisplacementVector=new o.DisplacementVector,i.normalizedDisplacementVector=new o.DisplacementVector,i.maximumLinearAcceleration=0,i.maximumAngularAcceleration=0,i}return n(t,e),t.prototype.shouldTransitionBeApplied=function(){var e=isFinite(this.targetDisplacementVector.deltaTime),t=this.targetDisplacementVector.deltaTime>0;return e&&t},t.prototype.apply=function(e){if(this.targetDisplacementVector.deltaTime=e.deltaTime,o.DisplacementVector.clone(e,this.normalizedDisplacementVector),o.DisplacementVector.clone(this.targetDisplacementVector,this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.length/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.phi/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.phi/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.diff(this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length>0&&(this.maximumLinearAcceleration=this.normalizedDisplacementVector.length/this.config.transitionTime),0!==Math.abs(this.normalizedDisplacementVector.phi)&&(this.maximumAngularAcceleration=Math.abs(this.normalizedDisplacementVector.phi)/this.config.transitionTime),o.DisplacementVector.clone(e,this.targetDisplacementVector),!this.shouldTransitionBeApplied())return o.DisplacementVector.clone(this.targetDisplacementVector,this.currentDisplacementVector),this.targetDisplacementVector;this.intermediateDisplacementVector.diff(this.currentDisplacementVector,this.targetDisplacementVector);var t=Math.min(this.maximumLinearAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed),i=Math.min(this.maximumAngularAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed);return this.intermediateDisplacementVector.length>t&&(this.intermediateDisplacementVector.length=t),Math.abs(this.intermediateDisplacementVector.phi)>i&&(this.intermediateDisplacementVector.phi=r.MathUtil.sign(this.intermediateDisplacementVector.phi)*i),this.currentDisplacementVector.add(this.intermediateDisplacementVector),this.currentDisplacementVector},t.prototype.reset=function(){this.currentDisplacementVector.update(0,0,0),this.intermediateDisplacementVector.update(0,0,0),this.targetDisplacementVector.update(0,0,0),this.maximumLinearAcceleration=0,this.maximumAngularAcceleration=0},t}(i(7192).TransitionTiming)},68801:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.EaseInTransitionTiming=void 0,t.EaseInTransitionTiming=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldTransitionBeApplied=function(){var e=isFinite(this.targetDisplacementVector.deltaTime),t=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return e&&t&&i},t}(i(81116).EaseInOutTransitionTiming)},95746:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.EaseOutTransitionTiming=void 0,t.EaseOutTransitionTiming=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldTransitionBeApplied=function(){var e=isFinite(this.targetDisplacementVector.deltaTime),t=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return e&&t&&!i},t}(i(81116).EaseInOutTransitionTiming)},4551:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.NoTransitionTiming=void 0,t.NoTransitionTiming=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.apply=function(e){return e},t.prototype.reset=function(){},t}(i(7192).TransitionTiming)},7192:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TransitionTiming=void 0,t.TransitionTiming=function(){return function(e){this.config=e}}()},76320:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TransitionTimingFactory=void 0;var n=i(43948),r=i(81116),o=i(68801),a=i(95746),s=i(4551);t.TransitionTimingFactory=function(){function e(){}return e.get=function(e){switch(e.transitionTimingType){case n.TransitionTimingType.None:return new s.NoTransitionTiming(e);case n.TransitionTimingType.EaseIn:return new o.EaseInTransitionTiming(e);case n.TransitionTimingType.EaseOut:return new a.EaseOutTransitionTiming(e);case n.TransitionTimingType.EaseInOut:return new r.EaseInOutTransitionTiming(e)}},e}()},70372:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigParser=void 0;var n=i(43948),r={contentType:n.VRContentType.Single,stereo:!1,startPosition:0,contentFieldOfView:360,verticalFieldOfView:-1,horizontalFieldOfView:-1,viewingWindow:{minYaw:0,maxYaw:360,minPitch:-90,maxPitch:90},restrictedInlinePlayback:!1,enableFrameRateMeasurements:!1,cardboard:null,viewingDirectionChangeThreshold:5,viewingDirectionChangeEventInterval:.25,keyboardControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:90,keyMap:{up:["w"],right:["d"],down:["s"],left:["a"],rotateClockwise:["e"],rotateCounterclockwise:["q"]}},mouseControl:{transitionTimingType:n.TransitionTimingType.EaseOut,transitionTime:.25,maxDisplacementSpeed:1/0},apiControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:1/0}};t.ConfigParser=function(){function e(){}return e.getObject=function(e,t){for(var i=t.split("."),n=!0,o=e,a=r,s=0,l=i;s<l.length;s++){var c=l[s];o.hasOwnProperty(c)&&n?o=o[c]:n=!1,a.hasOwnProperty(c)&&(a=a[c])}return[n,o,a]},e.getPrimitive=function(t,i,n,r){var o=e.getObject(t,i),a=o[0],s=o[1],l=o[2],c=!0;if(r)for(var u in r){if(r.hasOwnProperty(u)&&r[u]===s){c=!0;break}c=!1}return a&&typeof s===n&&c?s:l
vendor: 4,265 bytes, line 28
28},e.getArray=function(t,i,n){var r=e.getObject(t,i),o=r[0],a=r[1],s=r[2];return o&&"object"==typeof a&&a instanceof Array&&!a.some(function(e){return typeof e!==n})?a:s},e.getStringPrimitive=function(t,i,n){return e.getPrimitive(t,i,"string",n)},e.getEnumPrimitive=function(t,i,n){return e.getPrimitive(t,i,"string",n)},e.getBooleanPrimitive=function(t,i,n){return e.getPrimitive(t,i,"boolean",n)},e.getNumberPrimitive=function(t,i,n){return e.getPrimitive(t,i,"number",n)},e.getStringArray=function(t,i){return e.getArray(t,i,"string")},e.parseGeneralConfig=function(t,i){i.stereo=e.getBooleanPrimitive(t,"stereo"),i.restrictedInlinePlayback=e.getBooleanPrimitive(t,"restrictedInlinePlayback"),i.startPosition=e.getNumberPrimitive(t,"startPosition"),i.contentFieldOfView=e.getNumberPrimitive(t,"contentFieldOfView"),i.verticalFieldOfView=e.getNumberPrimitive(t,"verticalFieldOfView"),i.horizontalFieldOfView=e.getNumberPrimitive(t,"horizontalFieldOfView"),i.enableFrameRateMeasurements=e.getBooleanPrimitive(t,"enableFrameRateMeasurements"),i.cardboard=e.getStringPrimitive(t,"cardboard"),i.viewingDirectionChangeThreshold=e.getNumberPrimitive(t,"viewingDirectionChangeThreshold"),i.viewingDirectionChangeEventInterval=e.getNumberPrimitive(t,"viewingDirectionChangeEventInterval")},e.parseViewingWindow=function(t,i){i.viewingWindow=r.viewingWindow,t.hasOwnProperty("viewingWindow")&&"object"==typeof t.viewingWindow&&(i.viewingWindow.minYaw=e.getNumberPrimitive(t,"viewingWindow.minYaw"),i.viewingWindow.maxYaw=e.getNumberPrimitive(t,"viewingWindow.maxYaw"),i.viewingWindow.minPitch=e.getNumberPrimitive(t,"viewingWindow.minPitch"),i.viewingWindow.maxPitch=e.getNumberPrimitive(t,"viewingWindow.maxPitch"))},e.parseKeyboardControl=function(t,i){i.keyboardControl=r.keyboardControl,t.hasOwnProperty("keyboardControl")&&"object"==typeof t.keyboardControl&&(i.keyboardControl.transitionTimingType=e.getEnumPrimitive(t,"keyboardControl.transitionTimingType",n.TransitionTimingType),i.keyboardControl.transitionTime=e.getNumberPrimitive(t,"keyboardControl.transitionTime"),i.keyboardControl.maxDisplacementSpeed=e.getNumberPrimitive(t,"keyboardControl.maxDisplacementSpeed"),t.keyboardControl.hasOwnProperty("keyMap")&&"object"==typeof t.keyboardControl.keyMap&&(i.keyboardControl.keyMap.up=e.getStringArray(t,"keyboardControl.keyMap.up"),i.keyboardControl.keyMap.right=e.getStringArray(t,"keyboardControl.keyMap.right"),i.keyboardControl.keyMap.down=e.getStringArray(t,"keyboardControl.keyMap.down"),i.keyboardControl.keyMap.left=e.getStringArray(t,"keyboardControl.keyMap.left"),i.keyboardControl.keyMap.rotateClockwise=e.getStringArray(t,"keyboardControl.keyMap.rotateClockwise"),i.keyboardControl.keyMap.rotateCounterclockwise=e.getStringArray(t,"keyboardControl.keyMap.rotateCounterclockwise")))},e.parseMouseControl=function(t,i){i.mouseControl=r.mouseControl,t.hasOwnProperty("mouseControl")&&"object"==typeof t.mouseControl&&(i.mouseControl.transitionTimingType=e.getEnumPrimitive(t,"mouseControl.transitionTimingType",n.TransitionTimingType),i.mouseControl.transitionTime=e.getNumberPrimitive(t,"mouseControl.transitionTime"),i.mouseControl.maxDisplacementSpeed=e.getNumberPrimitive(t,"mouseControl.maxDisplacementSpeed"))},e.parseApiControl=function(t,i){i.apiControl=r.apiControl,t.hasOwnProperty("apiControl")&&"object"==typeof t.apiControl&&(i.apiControl.transitionTimingType=e.getEnumPrimitive(t,"apiControl.transitionTimingType",n.TransitionTimingType),i.apiControl.transitionTime=e.getNumberPrimitive(t,"apiControl.transitionTime"),i.apiControl.maxDisplacementSpeed=e.getNumberPrimitive(t,"apiControl.maxDisplacementSpeed"))},e.parseDebugHooks=function(e){var t={onDrawScene:null,onStartRendering:null,onRenderingSuspended:null,onRenderingResumed:null,requestFakeInput:null,requestTraveledMouseDistance:null,requestKeyActiveState:null};return e.debugHooks&&Object.keys(t).filter(function(t){return"function"==typeof e.debugHooks[t]}).forEach(function(i){return t[i]=e.debugHooks[i]}),t},e.parse=function(t){t=t||{};var i={contentType:e.getEnumPrimitive(t,"contentType",n.VRContentType)};return e.parseGeneralConfig(t,i),e.parseViewingWindow(t,i),e.parseKeyboardControl(t,i),e.parseMouseControl(t,i),e.parseApiControl(t,i),[i,e.parseDebugHooks(t)]},e}()
vendor: 14,446 bytes, lines 28-129
28},51629:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ElementHelper=void 0,t.ElementHelper=function(){function e(){}return e.addEventListener=function(e,t,i,n){for(var r=0;r<t.length;r++)e.addEventListener(t[r],i,n)},e.removeEventListener=function(e,t,i,n){for(var r=0;r<t.length;r++)e.removeEventListener(t[r],i,n)},e.addClass=function(e,t){if(e&&t){var i=e.getAttribute("class"),n=!0;i&&i.length>0&&(n=0>i.split(" ").indexOf(t)),i&&i.length>0&&n&&(t=i+" "+t),n&&e.setAttribute("class",t)}},e.removeClass=function(e,t){if(e&&t){var i=e.getAttribute("class");i&&i.indexOf(t)>-1&&(i=i.replace(RegExp("(?:^|\\s)"+t+"(?!\\S)"),"").trim(),e.setAttribute("class",i))}},e.getNavigator=function(){return window.navigator},Object.defineProperty(e,"touchEvents",{get:function(){var t=e.getNavigator().userAgent,i=e.getNavigator().msPointerEnabled;return/Android|IEMobile|iP(hone|ad|od)/i.test(t)?i?{start:["MSPointerDown"],move:["MSPointerMove"],end:["MSPointerUp"],down:["MSPointerDown"],up:["MSPointerUp"],click:["MSPointerUp"],type:"ms"}:{start:["touchstart"],move:["touchmove"],end:["touchend","touchcancel"],down:["touchstart"],up:["touchend","touchcancel"],click:["touchend"],type:"mobile"}:{start:["mouseover"],move:["mousemove"],end:["mouseleave","mouseout"],down:["mousedown"],up:["mouseup"],click:["click"],type:"desktop"}},enumerable:!1,configurable:!0}),e}()},17378:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.FrameRateMonitor=void 0;var n=i(44369);t.FrameRateMonitor=function(){function e(e,t){void 0===t&&(t=1e3);var i=this;this.startAnimationFrame=function(){i.Kbb&&(i.Gbb=window.performance.now())},this.endAnimationFrame=function(){if(!(i.Gbb<0)){var e=window.performance.now()-i.Gbb;i.Dbb.push(e),i.Mbb(),i.Jbb+=e,i.Jbb>i.Bbb&&i.Cbb&&(i.Jbb=0,i.Lbb(i.getAverageFrameRate(),i.getTimeSpentUpdatingTexture(),i.getTimeSpentDrawingScene()))}},this.startUpdateTexture=function(){i.Kbb&&(i.Hbb=window.performance.now())},this.endUpdateTexture=function(){i.Hbb<0||i.Fbb.push(window.performance.now()-i.Hbb)},this.startDrawScene=function(){i.Kbb&&(i.Ibb=window.performance.now())},this.endDrawScene=function(){i.Ibb<0||i.Ebb.push(window.performance.now()-i.Ibb)},this.Dbb=[],this.Fbb=[],this.Ebb=[],this.Gbb=-1,this.Hbb=-1,this.Ibb=-1,this.Abb=e,this.Bbb=t,this.Cbb=[],this.Jbb=0,this.Kbb=!1}return e.prototype.enable=function(){this.Kbb=!0},e.prototype.disable=function(){this.Kbb=!1,this.Dbb=[],this.Fbb=[],this.Ebb=[],this.Gbb=-1,this.Hbb=-1,this.Ibb=-1},e.prototype.subscribe=function(e){-1===this.Cbb.indexOf(e)&&this.Cbb.push(e)},e.prototype.unsubscribe=function(e){this.Cbb.indexOf(e)>-1&&this.Cbb.splice(this.Cbb.indexOf(e),1)},e.prototype.getAverageFrameRate=function(){return 1/(n.MathUtil.getAverage(this.Dbb)/1e3)},e.prototype.getTimeSpentUpdatingTexture=function(){return n.MathUtil.getSum(this.Fbb)/n.MathUtil.getSum(this.Dbb)},e.prototype.getTimeSpentDrawingScene=function(){return n.MathUtil.getSum(this.Ebb)/n.MathUtil.getSum(this.Dbb)},e.prototype.destroy=function(){this.disable(),this.Cbb=null},e.prototype.Lbb=function(e,t,i){for(var n=0,r=this.Cbb;n<r.length;n++)r[n].onFrameRateAvailable(e,t,i)},e.prototype.Mbb=function(){for(var e=0,t=this.Dbb.length-1;t>=0;t--)if((e+=this.Dbb[t])>=this.Abb){this.Dbb.splice(0,t+1),this.Fbb.splice(0,t+1),this.Ebb.splice(0,t+1);break}},e}()},10768:function(e){e.exports=`precision mediump float;
29
30const int LEFT_EYE = 0;
31const int RIGHT_EYE = 1;
32const int CONTENT_TYPE_MONO = 0;
33const int CONTENT_TYPE_STEREO_SBS = 1;
34const int CONTENT_TYPE_STEREO_TAB = 2;
35const float PI = 3.1415926535897932384626433832795;
36const float TwoPI = 6.283185307179586476925286766559;
37
38uniform int eyeSelector;
39uniform int contentType;
40uniform float videoWidth;
41uniform float videoHeight;
42uniform float contentFieldOfView;
43uniform sampler2D textureUnit;
44varying vec3 viewingDirection;
45
46float restrictedMod(float value, float divisor, float bound) {
47  return mod(value, divisor) * (1.0 - (2.0 * bound)) + bound;
48}
49
50vec4 directionToColor(vec3 direction, int eye, int contentType, float contentFieldOfView, float videoWidth, float videoHeight) {
51  float eyeOffset = 0.0;
52  float textureSizeMultiplier = contentFieldOfView / 180.;
53  float theta = atan(direction.x, direction.z * -1.0);
54  float verticalSamplingOffset = 1.0 / (2.0 * videoHeight);
55  float horizontalSamplingOffset = 1.0 / (2.0 * videoWidth);
56  float phi = atan(direction.y * -1.0, length(direction.xz));
57
58  float u = mod(theta / (PI * textureSizeMultiplier), 1.0);
59  float v = mod(phi / PI + 0.5, 1.0);
60
61  if (eye == LEFT_EYE) {
62    eyeOffset = 0.0;
63  } else if (eye == RIGHT_EYE) {
64    eyeOffset = 0.5;
65  }
66
67  if ((theta + PI) / PI > textureSizeMultiplier) {
68    return vec4(0., 0., 0., 1.);
69  }
70
71  if (contentType == CONTENT_TYPE_STEREO_SBS) {
72    u = restrictedMod(theta / (TwoPI * textureSizeMultiplier), 0.5, horizontalSamplingOffset) + eyeOffset;
73  } else if (contentType == CONTENT_TYPE_STEREO_TAB) {
74    v = restrictedMod(v / 2.0, 0.5, verticalSamplingOffset) + (0.5 - eyeOffset);
75  }
76
77  return texture2D(textureUnit, vec2(u, v));
78}
79void main(void) {
80  gl_FragColor = directionToColor(viewingDirection, eyeSelector, contentType, contentFieldOfView, videoWidth, videoHeight);
81}
82`},50766:function(e){e.exports=`precision mediump float;
83
84attribute vec2 vertexPosition;
85varying vec3 viewingDirection;
86uniform mat4 projectionInverse;
87uniform vec2 distortionFovScale;
88uniform vec2 distortionFovOffset;
89uniform float contentWidthDegrees;
90uniform float distortionMaxFovSquared;
91uniform float distortionCoefficients[12];
92
93float DistortionFactor(float rSquared) {
94    float ret = 0.0;
95    rSquared = min(distortionMaxFovSquared, rSquared);
96    ret = rSquared * (ret + distortionCoefficients[11]);
97    ret = rSquared * (ret + distortionCoefficients[10]);
98    ret = rSquared * (ret + distortionCoefficients[9]);
99    ret = rSquared * (ret + distortionCoefficients[8]);
100    ret = rSquared * (ret + distortionCoefficients[7]);
101    ret = rSquared * (ret + distortionCoefficients[6]);
102    ret = rSquared * (ret + distortionCoefficients[5]);
103    ret = rSquared * (ret + distortionCoefficients[4]);
104    ret = rSquared * (ret + distortionCoefficients[3]);
105    ret = rSquared * (ret + distortionCoefficients[2]);
106    ret = rSquared * (ret + distortionCoefficients[1]);
107    ret = rSquared * (ret + distortionCoefficients[0]);
108    return ret + 1.0;
109}
110
111vec4 Distort(vec4 point) {
112    vec3 pointNdc = point.xyz / point.w;
113    vec2 pointUnitSquare = (pointNdc.xy + vec2(1.0)) / 2.0;
114    vec2 pointTanAngle = pointUnitSquare * distortionFovScale - distortionFovOffset;
115    float radiusSquared = dot(pointTanAngle, pointTanAngle);
116    float distortionFactor = DistortionFactor(radiusSquared);
117    vec2 distortedPointTanAngle = pointTanAngle * distortionFactor;
118    vec2 distortedPointUnitSquare = (distortedPointTanAngle + distortionFovOffset)
119        / distortionFovScale;
120    vec3 distortedPointNdc = vec3(distortedPointUnitSquare * 2.0 - vec2(1.0), pointNdc.z);
121    return vec4(distortedPointNdc, 1.0) * point.w;
122}
123
124void main(void) {
125  gl_Position = Distort(vec4(vertexPosition, 1.0, 1.0));
126  vec4 projectiveDirection = projectionInverse * gl_Position;
127  viewingDirection = projectiveDirection.xyz / projectiveDirection.w;
128 }
129`}},function(e){return function(){return e(e.s=6463)}()}])})}()}(bitmovinplayerVr);var bitmovinplayerVrExports=bitmovinplayerVr.exports;let VR=getDefaultExportFromCjs$1(bitmovinplayerVrExports);var bitmovinplayerXml={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[962],{54663:function(e,t,i){i.r(t),i.d(t,{SaxXMLParserWrapper:function(){return S},decode:function(){return l}});var n=String.fromCharCode,r=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,a={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function s(e,t,i,o){return o?r.call(a,o)?a[o]:"&"+o+";":n(t||parseInt(i,16))}function l(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(o,s):e}Object.keys(a).forEach(function(e){a[e.toUpperCase()]=a[e]});var c="http://www.w3.org/2001/XMLSchema-instance",u="xsi",d="xsi:type",h="non-whitespace outside of root node";function p(e){return Error(e)}function f(e){return"missing namespace for prefix <"+e+">"}function m(e){return{get:e,enumerable:!0}}function g(e){var t,i={};for(t in e)i[t]=e[t];return i}function v(e){return e+"$uri"}function y(){return{line:0,column:0}}function b(e){throw e}function S(e){if(!this)return new S(e);var t,i,n,r,o,a,s,_,E,T=e&&e.proxy,w=e&&e.attributeNamePrefix||"",A=function(e){return w+e},P=b,I=y,C=!1,M=!1,R=null,k=!1;function x(e){e instanceof Error||(e=p(e)),R=e,P(e,I)}function O(e){o&&(e instanceof Error||(e=p(e)),o(e,I))}this.on=function(e,l){if("function"!=typeof l)throw p("required args <name, cb>");switch(e){case"openTag":i=l;break;case"text":t=l;break;case"closeTag":n=l;break;case"error":P=l;break;case"warn":o=l;break;case"cdata":r=l;break;case"attention":_=l;break;case"question":s=l;break;case"comment":a=l;break;default:throw p("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw p("required args <nsMap={}>");var t,i={};for(t in e)i[t]=e[t];return i[c]=u,M=!0,E=i,this},this.parse=function(e){if("string"!=typeof e)throw p("required args <xml=string>");return R=null,function(e){var o,c,u,p,y,b,S,w,P,R,D,L=M?[]:null,N=M?function(e){var t,i,n={};for(t in e)n[i=e[t]]=i,n[v(i)]=t;return n}(E):null,U=[],F=0,B=!1,V=!1,j=0,z=0,H="",G=0;function q(){if(null!==D)return D;var e,t,i,n,r,o,a,s,c,u,h,p=M&&N.xmlns,m=M&&C?[]:null,y=G,b=H,S=b.length,_={},T={},w=function(e,t){return _[A(e)]=t};e:for(;y<S;y++)if(c=!1,!(32===(u=b.charCodeAt(y))||u<14&&u>8)){for((u<65||u>122||u>90&&u<97)&&95!==u&&58!==u&&(O("illegal first char attribute name"),c=!0),h=y+1;h<S;h++)if(!((u=b.charCodeAt(h))>96&&u<123||u>64&&u<91||u>47&&u<59||46===u||45===u||95===u)){if(32===u||u<14&&u>8){O("missing attribute value"),y=h;continue e}if(61===u)break;O("illegal attribute name char"),c=!0}if("xmlns:xmlns"===(s=b.substring(y,h))&&(O("illegal declaration of xmlns"),c=!0),34===(u=b.charCodeAt(h+1)))-1===(h=b.indexOf('"',y=h+2))&&-1!==(h=b.indexOf("'",y))&&(O("attribute value quote missmatch"),c=!0);else if(39===u)-1===(h=b.indexOf("'",y=h+2))&&-1!==(h=b.indexOf('"',y))&&(O("attribute value quote missmatch"),c=!0);else for(O("missing attribute value quotes"),c=!0,h+=1;h<S&&!(32===(u=b.charCodeAt(h+1))||u<14&&u>8);h++);for(-1===h&&(O("missing closing quotes"),h=S,c=!0),c||(o=b.substring(y,h)),y=h;h+1<S&&!(32===(u=b.charCodeAt(h+1))||u<14&&u>8);h++)y===h&&(O("illegal character after attribute end"),c=!0);if(y=h+1,!c)if(s in T)O("attribute <"+s+"> already defined");else if(T[s]=!0,M)if(C){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=l(o),t=v(r),!(a=E[e])){if("xmlns"===r||t in N&&N[t]!==e)do a="ns"+F++;while(void 0!==N[a]);else a=r;E[e]=a}N[r]!==a&&(n||(N=g(N),n=!0),N[r]=a,"xmlns"===r&&(N[v(a)]=e,p=a),N[t]=e),w(s,o);continue}m.push(s,o)}else -1!==(u=s.indexOf(":"))?(i=N[s.substring(0,u)])?((s=p===i?s.substr(u+1):i+s.substr(u))===d&&(o=-1!==(u=o.indexOf(":"))?(i=N[i=o.substring(0,u)]||i)+o.substring(u):p+":"+o),w(s,o)):O(f(s.substring(0,u))):w(s,o);else w(s,o)}if(C)for(y=0,S=m.length;y<S;y++){if(s=m[y++],o=m[y],-1!==(u=s.indexOf(":"))){if(!(i=N[s.substring(0,u)])){O(f(s.substring(0,u)));continue}(s=p===i?s.substr(u+1):i+s.substr(u))===d&&(o=-1!==(u=o.indexOf(":"))?(i=N[i=o.substring(0,u)]||i)+o.substring(u):p+":"+o)}w(s,o)}return D=_}for(I=function(){for(var t,i,n=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=z;j>=a&&(t=n.exec(e))&&!((s=t[0].length+t.index)>j);)r+=1,a=s;return -1==j?(o=s,i=e.substring(z)):0===z?i=e.substring(z,j):(o=j-a,i=-1==z?e.substring(j):e.substring(j,z+1)),{data:i,line:r,column:o}},T&&(R=Object.create({},{name:m(function(){return w}),originalName:m(function(){return P}),attrs:m(q),ns:m(function(){return N})}));-1!==z;){if(-1===(j=60===e.charCodeAt(z)?z:e.indexOf("<",z)))return U.length?x("unexpected end of file"):0===z?x("missing start tag"):void(z<e.length&&e.substring(z).trim()&&O(h));if(z!==j){if(U.length){if(t&&(t(e.substring(z,j),l,I),k))return}else if(e.substring(z,j).trim()&&(O(h),k))return}if(33===(y=e.charCodeAt(j+1))){if(91===(p=e.charCodeAt(j+2))&&"CDATA["===e.substr(j+3,6)){if(-1===(z=e.indexOf("]]>",j)))return x("unclosed cdata");if(r&&(r(e.substring(j+9,z),I),k))return;z+=3;continue}if(45===p&&45===e.charCodeAt(j+3)){if(-1===(z=e.indexOf("--\x3e",j)))return x("unclosed comment");if(a&&(a(e.substring(j+4,z),l,I),k))return;z+=3;continue}}if(63!==y){for(c=j+1;;c++){if(isNaN(b=e.charCodeAt(c)))return z=-1,x("unclosed tag");if(34===b)c=-1!==(p=e.indexOf('"',c+1))?p:c;else if(39===b)c=-1!==(p=e.indexOf("'",c+1))?p:c;else if(62===b){z=c;break}}if(33!==y){if(D={},47===y){if(B=!1,V=!0,!U.length)return x("missing open tag");if(c=w=U.pop(),p=j+2+c.length,e.substring(j+2,p)!==c)return x("closing tag mismatch");for(;p<z;p++)if(!(32===(y=e.charCodeAt(p))||y>8&&y<14))return x("close tag")}else{if(47===e.charCodeAt(z-1)?(c=w=e.substring(j+1,z-1),B=!0,V=!0):(c=w=e.substring(j+1,z),B=!0,V=!1),!(y>96&&y<123||y>64&&y<91||95===y||58===y))return x("illegal first char nodeName");for(p=1,u=c.length;p<u;p++)if(!((y=c.charCodeAt(p))>96&&y<123||y>64&&y<91||y>47&&y<59||45===y||95===y||46==y)){if(32===y||y<14&&y>8){w=c.substring(0,p),D=null;break}return x("invalid nodeName")}V||U.push(w)}if(M){if(o=N,B&&(V||L.push(o),null===D&&(C=-1!==c.indexOf("xmlns",p))&&(G=p,H=c,q(),C=!1)),P=w,-1!==(y=w.indexOf(":"))){if(!(S=N[w.substring(0,y)]))return x("missing namespace on <"+P+">");w=w.substr(y+1)}else S=N.xmlns;S&&(w=S+":"+w)}if(B&&(G=p,H=c,i&&(T?i(R,l,V,I):i(w,q,l,V,I),k)))return;if(V){if(n&&(n(T?R:w,l,B,I),k))return;M&&(N=B?o:L.pop())}z+=1}else{if(_&&(_(e.substring(j,z+1),l,I),k))return;z+=1}}else{if(-1===(z=e.indexOf("?>",j)))return x("unclosed question");if(s&&(s(e.substring(j,z+2),I),k))return;z+=2}}}(e),I=y,k=!1,R},this.stop=function(){k=!0}}},78442:function(e,t){var i=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSONtoXML=c;var n=["__prefix","__text","__cdata"];function r(e){return n.includes(e)}function o(e){return e.length>
1290&&""!==e.join("")}function a(e,t,i){return function(e,t,i){var n="";return i?(n+="<".concat(i),n+=e.length>0?" ".concat(e.join(" ")):"",n+=t?">":"/>"):n}(t,o(e),i)+function(e,t){var i="";return o(e)&&(i+=e.join(""),i+=t?"</".concat(t,">"):""),i}(e,i)}function s(e){return"<![CDATA[".concat(e,"]]>")}function l(e,t){return t.map(function(t){return"string"==typeof t?a(""!==t?[t]:[],[],e):c(t,e)})}function c(e,t){var n=function(e){for(var t=function(e){return Object.keys(e).filter(r)}(e),i=null,n=[],o=0,a=t;o<a.length;o++){var l=a[o];"__prefix"===l&&(i=e[l]),"__text"===l&&n.push(e[l]),"__cdata"===l&&e[l].forEach(function(e){n.push(s(e))})}return[i,n]}(e),o=n[0],u=n[1],d=function(e){for(var t=function(e){return Object.keys(e).filter(function(e){return!e.startsWith("_")})}(e),i=[],n=0,r=t;n<r.length;n++){var o=r[n],a=e[o];"string"!=typeof a?a instanceof Array?i.push.apply(i,l(o,a)):"object"==typeof a&&i.push(c(a,o)):i.push("<".concat(o,">").concat(a,"</").concat(o,">"))}return i}(e),h=function(e){return(function(e){return Object.keys(e).filter(function(e){return e.startsWith("_")&&!r(e)})})(e).map(function(t){return"".concat(t.replace("_",""),'="').concat(e[t],'"')})}(e),p=t;return p&&o&&(p="".concat(o,":").concat(t)),a(i(i([],u,!0),d,!0),h,p)}},15872:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLModuleDefinition=void 0;var n=i(62756),r=i(78442),o=i(89214),a=i(89214);t.XMLModuleDefinition={name:n.ModuleName.XML,module:{parseXML:a.parseXML,parseJSONtoXML:r.parseJSONtoXML,setLogger:o.setLogger}},t.default=t.XMLModuleDefinition},89214:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeXML=h,t.setLogger=function(e){l=e},t.parseXML=function(e,t){s=s||new r.SaxXMLParserWrapper({attributeNamePrefix:"_"});var i,a=h(e),p={},f=t.useArrayRepresentationForChildren?c:u;return s.on(n.TagOpened,function(e,i,n,r){var o=function(e,t){var i=t();if(!e.includes(":"))return[e,i];var n=e.split(":"),r=n[0],o=n[1];return i.__prefix=r,[o,i]}(e,i),a=o[0],s=o[1];(function(e,t,i){i&&(e._media&&(e._media=t(e._media)),e._initialization&&(e._initialization=t(e._initialization)))})(s,n,t.decodeEntities),p=f(p,a,s,r)}),s.on(n.TagClosed,function(e){p=function(e){var t=e.parent;return delete e.parent,function(e,t){if(d(t)&&null!=t.key)if(e[t.key]!==t){if(e[t.key].constructor===Array){var i=e[t.key].indexOf(t);e[t.key][i]=t.__text}}else e[t.key]=t.__text}(t,e),delete e.key,t}(p)}),s.on(n.Text,function(e,i){!function(e,t){e.__text=t.trim(),o(e)}(p,t.decodeEntities?i(e):e)}),s.on(n.CData,function(e){null==p.__cdata?p.__cdata=[e]:p.__cdata.push(e),o(p)}),s.on(n.Error,function(e){i=Error("XML parsing failed: ".concat(e instanceof Error?e.message:String(e))),l&&l.debug(i.message),s.stop(),p={}}),s.parse(a),i?{success:!1,error:i}:{success:!0,parsed:p}};var n,r=i(54663);function o(e){e.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}}function a(e,t){t&&2===Object.keys(e).length&&(e.__text="",o(e))}!function(e){e.TagOpened="openTag",e.TagClosed="closeTag",e.Text="text",e.Error="error",e.Warning="warn",e.CData="cdata",e.Attention="attention",e.Question="question",e.Comment="comment"}(n||(n={}));var s,l,c=function(e,t,i,n){return i.parent=e,i.key=t,e.parent||e.key||e[t]?e[t]?e[t].push(i):(a(i,n),e[t]=[i]):e[t]=i,i},u=function(e,t,i,n){return i.parent=e,i.key=t,e[t]?e[t].constructor===Array?e[t].push(i):e[t]=[e[t],i]:(a(i,n),e[t]=i),i},d=function(e){return null!=e.__text&&3===Object.keys(e).length};function h(e){return e.replace(/>\s+</g,"><").replace(/[\n|\r]+/g," ").trim()}}},function(e){return function(){return e(e.s=15872)}()}])})}()}(bitmovinplayerXml);var bitmovinplayerXmlExports=bitmovinplayerXml.exports;let XML=getDefaultExportFromCjs$1(bitmovinplayerXmlExports),logger$2=loglevelExports.getLogger("resolveMutedConfig");function resolveMutedConfig(e){if("MUTED"===e)return!0;if("u">typeof navigator&&"userActivation"in navigator){let{hasBeenActive:e}=navigator.userActivation;return e||logger$2.debug("User has not interacted with the page yet, muting the player by default."),!e}return!1}function createBitmovinPlayerOptions(e,t){var i;let n=null==(i=e.adService)?void 0:i.createBitmovinAdConfig(),r=e.autoplay,o=resolveMutedConfig(e.muted);return{...t,playback:{autoplay:r,muted:o},advertising:n}}let log$g=loglevelExports.getLogger("createBitmovinPlayer");function getModuleExport$1(e){return isObject$7(e)&&"default"in e?e.default:e}function getBitmovinModules$1(){try{return bitmovinplayerCoreExports.Player.getModules()}catch{return[]}}function isModuleLoaded$1(e){return(getBitmovinModules$1()??[]).includes(e)}function setupBitmovinModules(){bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(BitmovinEngineModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(EngineNative)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(MSERendererModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(HLSModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(ABRModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(TSContainerModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(MP4ContainerModule)),isModuleLoaded$1(bitmovinplayerCoreExports.ModuleName.XML)||bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(XML)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(DashModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(SubtitlesModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(SubtitlesVTT)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(SubtitlesNative)),bitmovinplayerCoreExports.Player.addModule(getModuleExport$1(VR))}setupBitmovinModules();let storedPlayers=[];function findStoredPlayerInfo(e){return storedPlayers.find(t=>
129t.id===e)}function createBitmovinPlayer(e,t){var i;let n=null==(i=findStoredPlayerInfo(e.playerId))?void 0:i.player;if(n){let{playback:t}=n.getConfig(!0);return t&&(t.autoplay=e.autoplay),log$g.debug("reusing previous player instance for id",e.playerId),{player:n,id:e.playerId}}let r=createBitmovinPlayerOptions(e,t);log$g.debug("creating new bitmovin player instance",e.playerId);let o=new bitmovinplayerCoreExports.Player(e.element,r);return storedPlayers.push({player:o,id:e.playerId}),{player:o,id:e.playerId}}function calculateNumber(e){return e??0}function resolveAdBreakStarted(e){var t;return(null==(t=e.ad)?void 0:t.data.adPodInfo.adPosition)===1}let defaultAdData={adId:"",skippable:!1,duration:0,title:""},resolveAdEventData=e=>e??defaultAdData;function resolveAdSkippedOrFinishedType(e){let{SKIPPED:t}=window.google.ima.AdEvent.Type;return e===t?"adSkipped":"adFinished"}function resolveCurrentAdType(e){let{getLastMainMediaPositionInSec:t,getInitialSeekTimeInSec:i,getMainMediaDurationInSec:n}=e;return calculateAdType(t(),i(),n())}class InteractiveMediaAds{constructor(e,t){Si(this,"playerId"),Si(this,"eventEmitter"),Si(this,"resetIsSeekingToFalse"),Si(this,"currentPlaybackPosition"),Si(this,"currentAdId"),Si(this,"_isShowingAd",!1),Si(this,"_isPlaying",!1),Si(this,"handleAdEvent",e=>{let{STARTED:t,AD_PROGRESS:i,SKIPPED:n,COMPLETE:r,RESUMED:o}=window.google.ima.AdEvent.Type;switch(e.type){case i:this.handleProgressEvent(e);break;case t:this.isPlaying=!0,this.isShowingAd=!0,this.handleAdStartedEvent(e);break;case n:case r:this.isPlaying=!1,this.isShowingAd=!1,this.handleAdFinishedEvent(e);break;case o:this.isPlaying=!0;break;default:this.isPlaying=!1}}),Si(this,"handleProgressEvent",e=>{let t=e.getAdData(),i=calculateNumber(null==t?void 0:t.duration);this.currentPlaybackPosition=calculateNumber(null==t?void 0:t.currentTime);let n=calculateNumber(null==t?void 0:t.adPosition),r=calculateNumber(null==t?void 0:t.totalAds);this.dispatchEvent({type:"adTimeChanged",duration:i,playbackPosition:this.currentPlaybackPosition,adPosition:n,totalAds:r})}),Si(this,"handleAdStartedEvent",e=>{var t;this.handleAdBreakStarted(e);let{adId:i,skippable:n,duration:r}=resolveAdEventData(null==(t=e.ad)?void 0:t.data);this.currentAdId=i;let o=resolveCurrentAdType(this.playerDataAccessor);this.dispatchEvent({type:"adStarted",skippable:n,duration:r,adType:o})}),Si(this,"handleAdFinishedEvent",e=>{let t=resolveAdSkippedOrFinishedType(e.type);this.dispatchEvent({type:t})}),this.adsManager=e,this.playerDataAccessor=t;const{playerId:i,eventEmitter:n,resetIsSeekingToFalse:r}=t;this.playerId=i,this.eventEmitter=n,this.resetIsSeekingToFalse=r,this.updateEventListeners()}get isShowingAd(){return this._isShowingAd}set isShowingAd(e){this._isShowingAd=e}get isPlaying(){return this._isPlaying}set isPlaying(e){this._isPlaying=e}updateEventListeners(){this.addOrRemoveEventListeners("removeEventListener"),this.addOrRemoveEventListeners("addEventListener")}addOrRemoveEventListeners(e){let{STARTED:t,AD_PROGRESS:i,PAUSED:n,SKIPPED:r,COMPLETE:o,RESUMED:a}=window.google.ima.AdEvent.Type;this.adsManager[e](t,this.handleAdEvent),this.adsManager[e](i,this.handleAdEvent),this.adsManager[e](n,this.handleAdEvent),this.adsManager[e](r,this.handleAdEvent),this.adsManager[e](o,this.handleAdEvent),this.adsManager[e](a,this.handleAdEvent)}handleAdBreakStarted(e){resolveAdBreakStarted(e)&&this.resetIsSeekingToFalse()}dispatchEvent(e){let t={...e,playerId:this.playerId,adId:this.currentAdId};
129this.eventEmitter.fireEvent(t)}getCurrentTimeInSeconds(){return this.currentPlaybackPosition}destroy(){this.addOrRemoveEventListeners("removeEventListener"),this.adsManager.destroy()}}function resolveVRSourceConfig(e){if(e)return{contentType:"single",keyboardControl:{transitionTimingType:"none",transitionTime:.5,maxDisplacementSpeed:90}}}let log$f=loglevelExports.getLogger("CastContextManager"),Jr=class Jr{constructor(){Si(this,"castContext",null),Si(this,"isInitialized",!1),this.initialize()}static getInstance(){return Jr.instance||(Jr.instance=new Jr),Jr.instance}initialize(){if(!(!window.cast||!window.chrome))try{let e=window.cast.framework.CastContext.getInstance();e.setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:"origin_scoped"}),this.castContext=e,this.isInitialized=!0}catch(e){log$f.error("Failed to initialize Cast context:",e)}}isCastAvailable(){return!!this.castContext&&!!window.cast&&this.castContext.getCastState()!==window.cast.framework.CastState.NO_DEVICES_AVAILABLE}isContextInitialized(){return this.isInitialized}destroy(){this.castContext=null,this.isInitialized=!1,Jr.instance=null}};Si(Jr,"instance",null);let CastContextManager=Jr,entitlementsResolver=e=>{},crepoIdRegex=/(?<masterId>rrn:content:.*):(?<locale>[a-z]{2}-[A-Z]{2,3})$/,defaultLocale="en";function localeResolver(e){var t;let i=e.match(crepoIdRegex);return i?((null==(t=i.groups)?void 0:t.locale)??defaultLocale).split("-").join("_"):defaultLocale}let optoutPropResolver=e=>e?+("0"===e):void 0;function playerStatusResolver(e,t,i){return"BUFFERING"!==e&&t===i||"IDLE"===e&&0===t&&0===i?"ENDED":e}function productIdResolver(e){return stripOffLocaleFromCrepoIdOrReturnOriginalIfNotRrn(e)}let receiverIds={rbtv:{STAGING:"C38B64C2",PRODUCTION:"90687B8B"},stv:{STAGING:"26F9577A",PRODUCTION:"FDED6DE8"},rallytv:{STAGING:"FD67451C",PRODUCTION:"3ECE9108"}};function receiverIdResolver(e,t){return receiverIds[e][t]}let namespaces={rbtv:"urn:x-cast:tv.rbtv.cast",stv:"urn:x-cast:tv.stv.cast",rallytv:"urn:x-cast:tv.rallytv.cast"};function receiverNamespaceResolver(e){return namespaces[e]}function trackIndexResolver(e,t){return t?t.findIndex(t=>t.language===e):-1}function trackLangResolver(e,t){let i=t.find(t=>t.id===e);return i?i.lang:""}let log$e=loglevelExports.getLogger("CastSender"),Qn=class Qn{constructor(e,t){Si(this,"playerId",""),Si(this,"castContext",null),Si(this,"currentSession",null),Si(this,"namespace",""),Si(this,"receiverApplicationId",""),Si(this,"isInitialized",!1),Si(this,"sessionReady",!1),Si(this,"remotePlayer",null),Si(this,"remotePlayerController",null),Si(this,"playerStatus","IDLE"),Si(this,"currentTimeInSec",0),Si(this,"currentVideoData",null),Si(this,"_currentAudioTrackIndex",0),Si(this,"currentAudioTracks",null),Si(this,"_currentCcTrackIndex",-1),Si(this,"currentCcTracks",null),Si(this,"initializeCastContext",async()=>{try{let e=window.cast;if(!Qn.isCastAvailable(e))return;await new Promise((t,i)=>{try{e.framework.CastContext.getInstance().setOptions({receiverApplicationId:this.receiverApplicationId,autoJoinPolicy:"page_scoped",language:"en-US",resumeSavedSession:!1});let i=e.framework.CastContext.getInstance();i.addEventListener(e.framework.CastContextEventType.SESSION_STATE_CHANGED,this.onSessionStateChanged),this.castContext=i,t()}catch(e){i(e)}})}catch(e){throw log$e.error("Failed to initialize Cast context:",e),e}}),Si(this,"setupRemotePlayerEventListeners",()=>{let e=window.cast;this.remotePlayerController&&Qn.isCastAvailable(e)&&(this.remotePlayerController.addEventListener(e.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.onCurrentTimeChanged),this.remotePlayerController.addEventListener(e.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED,this.onPlayerStateChanged))}),Si(this,"removeRemotePlayerEventListeners",()=>{let e=window.cast;this.remotePlayerController&&Qn.isCastAvailable(e)&&(this.remotePlayerController.removeEventListener(e.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.onCurrentTimeChanged),this.remotePlayerController.removeEventListener(e.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED,this.onPlayerStateChanged))}),Si(this,"onCurrentTimeChanged",()=>{this.remotePlayer&&(this.currentTimeInSec=this.remotePlayer.currentTime,this.dispatchEvent("timeChanged"))}),Si(this,"onPlayerStateChanged",()=>{if(this.remotePlayer){let e=this.remotePlayer.playerState;this.playerStatus=e,this.dispatchEvent(e.toLocaleLowerCase())}}),Si(this,"onSessionStateChanged",e=>{let t=e.sessionState,i=e.session;log$e.debug("Session state changed:",t,i),this.dispatchEvent("castStateChanged",{castState:t,sender:this}),i?this.prepareSession(i):this.cleanupSession()}),Si(this,"prepareSession",e=>{this.currentSession=e,this.setupRemotePlayer(),this.setupMessageListeners()}),Si(this,"cleanupSession",()=>{var e;null==(e=this.currentSession)||e.endSession(!0),this.currentSession=null,this.cleanupRemotePlayer(),this.isInitialized=!1,this.sessionReady=!1}),Si(this,"cleanupRemotePlayer",()=>{var e;this.removeRemotePlayerEventListeners(),null==(e=this.remotePlayerController)||e.stop(),this.remotePlayer=null,this.remotePlayerController=null}),Si(this,"setupMessageListeners",()=>{this.currentSession&&this.currentSession.addMessageListener(this.namespace,this.onReceiverMessage)}),Si(this,"setupRemotePlayer",()=>{let e=window.cast;e&&(this.remotePlayer=new e.framework.RemotePlayer,this.remotePlayerController=new e.framework.RemotePlayerController(this.remotePlayer),this.setupRemotePlayerEventListeners())}),Si(this,"onReceiverMessage",(e,t)=>{try{let e=JSON.parse(t),i=e.event;
129log$e.debug("Received message from receiver:",i,e),"session"===i&&"success"===e.status?(this.sessionReady=!0,this.dispatchEvent("castStateChanged",{castState:"CONNECTED"})):"audioList"===i?this.currentAudioTracks=e.tracks:"ccList"===i&&(this.currentCcTracks=e.tracks)}catch(e){log$e.error("Failed to parse receiver message:",e)}}),Si(this,"dispatchEvent",(e,t)=>{var i,n;let r=null==(i=this.remotePlayer)?void 0:i.duration,o=null==(n=this.remotePlayer)?void 0:n.currentTime;this.eventEmitter.fireEvent({type:e,duration:r,playbackPosition:o,playerId:this.playerId,issuer:"CAST",...t})}),this.config=e,this.eventEmitter=t,this.namespace=receiverNamespaceResolver(e.tenant),this.playerId=e.playerId,this.receiverApplicationId=receiverIdResolver(e.tenant,e.environment)}get currentAudioTrackIndex(){return this._currentAudioTrackIndex}get currentCcTrackIndex(){return this._currentCcTrackIndex}static getInstance(e,t){if(!Qn.instance){if(!e||!t)throw Error("Config and eventEmitter are required for first initialization");Qn.instance=new Qn(e,t)}return Qn.instance}static isCastAvailable(e=window.cast){var t;if(!e)return!1;let i=CastContextManager.getInstance();return i.isContextInitialized()?i.isCastAvailable():null==(t=Qn.instance)||!t.castContext||Qn.instance.castContext.getCastState()!==e.framework.CastState.NO_DEVICES_AVAILABLE}static isCastingVideo(){if(!Qn.isCastAvailable())return!1;let e=window.cast;if(!e)return!1;let t=e.framework.CastContext.getInstance();return t.getCastState()===e.framework.CastState.CONNECTED&&!!t.getCurrentSession()}static stopCastingVideo(){var e;null!=(e=Qn.instance)&&e.currentSession&&Qn.instance.cleanupSession()}async connect(){if(this.castContext||await this.initializeCastContext(),!this.castContext)return void log$e.debug("Cast context is not available");try{await this.castContext.requestSession()}catch(e){log$e.debug("Failed to connect to Cast device:",e)}}async init(e){var t;if(!this.currentSession)throw Error("No active Cast session");let i={command:"init",...e,optout:optoutPropResolver(this.config.optout),entitlements:entitlementsResolver(e.entitlements),countryCode:(null==(t=e.countryCode)?void 0:t.toLowerCase())??"en",locale:e.locale??localeResolver(this.config.assetId)};try{await this.sendCommand(i),this.isInitialized=!0}catch(e){throw log$e.error("Failed to send init command:",e),e}}async updateEntitlements(e){if(!this.isInitialized)throw Error("Cast sender not initialized");let t={command:"updateEntitlements",entitlements:e};await this.sendCommand(t)}async replayVideo(){this.currentVideoData&&await this.loadVideo({...this.currentVideoData})}async loadVideo(e){if(!this.isInitialized)throw Error("Cast sender not initialized. Call init() first.");if(!this.currentSession)throw Error("No active Cast session");this.currentVideoData=e,await this.waitForSessionReady();let t={media:{contentId:productIdResolver(e.productId),contentType:"application/vnd.apple.mpegurl",metadata:{type:"video",title:"Video"},customData:{detailPageId:e.detailPageId,token:e.token,uid:e.uid}},autoplay:!0,currentTime:e.currentTime??0};try{await this.currentSession.loadMedia(t)}catch(e){throw log$e.error("Failed to load media:",e),e}}async waitForSessionReady(e=1e4){let t=Date.now();for(;!this.sessionReady;){if(Date.now()-t>e)throw Error("Timeout waiting for Cast session to be ready");await new Promise(e=>setTimeout(e,100))}}play(){this.remotePlayerController&&this.remotePlayer&&this.remotePlayer.isPaused&&this.remotePlayerController.playOrPause()}pause(){this.remotePlayerController&&this.remotePlayer&&!this.remotePlayer.isPaused&&this.remotePlayerController.playOrPause()}seek(e){return!!this.remotePlayer&&!!this.remotePlayerController&&(this.remotePlayer.currentTime=e,this.remotePlayerController.seek(),!0)}async setVolume(e){this.remotePlayer&&this.remotePlayerController&&(this.remotePlayer.volumeLevel=e/100,this.remotePlayerController.setVolumeLevel())}getVolume(){var e;let t=null==(e=this.remotePlayer)?void 0:e.volumeLevel;return void 0===t?100:100*t}async toggleNerdMode(){await this.sendCommand({command:"nerdMode"})}async setCCOn(e,t){var i;let n=trackLangResolver(e,t);if(n){let e=trackIndexResolver(n,this.currentCcTracks);if(e>-1){this._currentCcTrackIndex=e,await this.sendCommand({command:"ccOn",trackId:null==(i=this.currentCcTracks)?void 0:i[e].trackId});return}}}async setCCOff(){this._currentCcTrackIndex=-1,await this.sendCommand({command:"ccOff"})}async getCCList(){await this.sendCommand({command:"ccList"})}async getCCCurrent(){await this.sendCommand({command:"ccCurrent"})}async getAudioList(){await this.sendCommand({command:"audioList"})}async setAudioTrack(e,t){var i;let n=trackLangResolver(e,t);if(n){let e=trackIndexResolver(n,this.currentAudioTracks);e>-1&&(this._currentAudioTrackIndex=e,await this.sendCommand({command:"audioTrack",trackId:null==(i=this.currentAudioTracks)?void 0:i[e].trackId}))}}async getAudioCurrent(){await this.sendCommand({command:"audioCurrent"})}async getDVRStatus(){await this.sendCommand({command:"dvr"})}async sendCommand(e){if(!this.currentSession)throw Error("No active 
129Cast session");try{await this.currentSession.sendMessage(this.namespace,JSON.stringify(e))}catch(e){throw log$e.error("Failed to send command:",e),e}}get isConnected(){return!!this.currentSession}get isReady(){return this.isInitialized&&this.sessionReady}getCurrentTime(){return this.currentTimeInSec}getPlayerStatus(){var e;return playerStatusResolver(this.playerStatus,this.currentTimeInSec,null==(e=this.remotePlayer)?void 0:e.duration)}destroy(){let e=window.cast;this.castContext&&Qn.isCastAvailable(e)&&this.castContext.removeEventListener(e.framework.CastContextEventType.SESSION_STATE_CHANGED,this.onSessionStateChanged),this.cleanupSession(),this.cleanupRemotePlayer(),this.castContext=null,Qn.instance=null}static addCastStatusListener(e,t){let i=window.cast;null==i||i.framework.CastContext.getInstance().addEventListener(i.framework.CastContextEventType.CAST_STATE_CHANGED,i=>{e.fireEvent({type:"castStateChanged",castState:i.castState,playerId:t,issuer:"CAST"})})}};Si(Qn,"instance",null);let CastSender=Qn;async function createCastSender(e,t){let i=CastSender.getInstance(e,t);return await i.initializeCastContext(),await i.connect(),i}let CAST_SDK_URL="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js";async function loadCastSdk(){return new Promise((e,t)=>{var i;if(null!=(i=window.cast)&&i.framework)return void e();let n=document.createElement("script");n.src=`${CAST_SDK_URL}?loadCastFramework=1`,n.async=!0;let r=setTimeout(()=>{t(Error("Cast SDK load timeout"))},1e4);n.onload=()=>{clearTimeout(r);let i=0,n=50,o=()=>{var r;null!=(r=window.cast)&&r.framework?e():i>=n?t(Error("Cast SDK framework not ready after loading")):(i++,setTimeout(o,100))};o()},n.onerror=()=>{clearTimeout(r),t(Error("Failed to load Cast SDK"))},document.head.appendChild(n)})}let hc=class hc{static async detectAndProvide(){return this.detectionPromise||(this.detectionPromise=hc.performDetectionAndLoading()),this.detectionPromise}static async performDetectionAndLoading(){var e,t;try{return null!=(e=window.cast)&&!!e.framework||!!(/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor))&&(await loadCastSdk(),!!(null!=(t=window.cast)&&t.framework))}catch(e){return console.warn("Cast SDK loading failed:",e),!1}}};Si(hc,"detectionPromise",null);let CastFeatureDetector=hc;async function resolveCastEnablement(e){let{log:t}=e;if(!await checkCookieEnvAvailable())return;let i=!1;getCurrentCookieConsent().performance&&(await initializeCast(e),i=!0);try{subscribeToCookieChanges(t=>{getCurrentCookieConsent().performance&&!i&&(initializeCast(e),i=!0)})}catch(e){t.error("Error subscribing to cookie changes",e)}}let initializeCast=async e=>{let{eventEmitter:t,playerId:i,log:n}=e;try{await CastFeatureDetector.detectAndProvide(),CastSender.addCastStatusListener(t,i),n.info("Cast enabled based on cookie consent")}catch(e){n.error("Error while cast status detecting",e)}},log$d=loglevelExports.getLogger("BitmovinPlayerAdapter"),playerConfig={key:"adb77626-0c8f-4879-a13a-b0be47d4222b",ui:!1,logs:{bitmovin:!1},adaptation:{preload:!1,limitToPlayerSize:!0},tweaks:{native_hls_parsing:!0}};function resolvePlayerConfig(e){if(!(null!=e&&e.customVideoUrlRequestHeader))return playerConfig;let t=e.customVideoUrlRequestHeader.key,i=e.customVideoUrlRequestHeader.value;return{...playerConfig,network:{preprocessHttpRequest:async(e,n)=>(n.headers[t]=i,n)}}}class BitmovinPlayerAdapter{constructor(e){Si(this,"player"),Si(this,"currentSeekTarget",0),Si(this,"currentSeekIssuer"),Si(this,"isSeeking",!1),Si(this,"isPlayRequested",!1),Si(this,"ima"),Si(this,"hasStarted",!1),Si(this,"shouldAutoPlay",!1),Si(this,"hasError",!1),Si(this,"mainMediaDurationInSec",0),Si(this,"initialSeekTimeInSec",0),Si(this,"segmentStartDate",0),Si(this,"loaded",!1),Si(this,"queuedAction"),Si(this,"lastTimeChangedPlaybackTime",0),Si(this,"lastTimeChangedTimestamp",0),Si(this,"lastPlayerEvent"),Si(this,"showingAds",!1),Si(this,"initialPlaybackMode","UNKNOWN"),Si(this,"serverEnvironment"),Si(this,"allBitmovinWarnings",[]),Si(this,"lastMainMediaPositionInSec",0),Si(this,"playerId"),Si(this,"eventEmitter"),Si(this,"subtitleHandler",new SubtitleHandler),Si(this,"currentSetAudioTrackIssuer","INITIAL"),Si(this,"currentSetSubtitleTrackIssuer","INITIAL"),Si(this,"postRollAdBreakFinished",!1),Si(this,"castSender",null),Si(this,"_handlePlayerEvent",e=>{try{let t=!0;switch(e.type){case bitmovinplayerCoreExports.PlayerEvent.Seeked:case bitmovinplayerCoreExports.PlayerEvent.TimeShifted:this._handleSeekDone(e,this.playerId);return;case bitmovinplayerCoreExports.PlayerEvent.Playing:this.isPlayRequested=!1,this.shouldAutoPlay=!1;break;case bitmovinplayerCoreExports.PlayerEvent.TimeChanged:t=this._handleTimeChanged(e),this.isShowingAd()||(this.lastMainMediaPositionInSec=this.getCurrentTimeInSec());break;case bitmovinplayerCoreExports.PlayerEvent.Play:this.isShowingAd()||(this.lastMainMediaPositionInSec=this.getCurrentTimeInSec());break;case bitmovinplayerCoreExports.PlayerEvent.Warning:this.handleWarningEvent(e);break;case bitmovinplayerCoreExports.PlayerEvent.SegmentPlayback:{let t=e.dateTime,i=t?Date.parse(t):0;i>0&&this.segmentStartDate!==i&&(this.segmentStartDate=i);break}case bitmovinplayerCoreExports.PlayerEvent.SourceUnloaded:this.loaded=!1;break;case bitmovinplayerCoreExports.PlayerEvent.AdBreakStarted:this.showingAds=!0;break;case bitmovinplayerCoreExports.PlayerEvent.AdBreakFinished:this.showingAds=!1;break;case bitmovinplayerCoreExports.PlayerEvent.Error:this.handleErrorEvent(e)}switch(t&&this.mapEventAndEmit(e,this.playerId),e.type){case bitmovinplayerCoreExports.PlayerEvent.TimeChanged:this.handleTimeChangedAfterEmit();break;case bitmovinplayerCoreExports.PlayerEvent.SubtitleEnabled:case bitmovinplayerCoreExports.PlayerEvent.SubtitleDisabled:case bitmovinplayerCoreExports.PlayerEvent.SubtitleDisable:this.currentSetSubtitleTrackIssuer=void 0,this.eventEmitter.f
129ireEvent(this.subtitleHandler.resetAndGetEvent(this.playerId));break;case bitmovinplayerCoreExports.PlayerEvent.AudioChanged:this.currentSetAudioTrackIssuer=void 0}}catch(e){log$d.error("ERROR DURING EVENT HANDLING",e)}this.lastPlayerEvent=e,this.postRollAdBreakFinished=!1}),Si(this,"_handleSubtitleEvent",e=>{let t=this.subtitleHandler.handleSubtitleEvent(e,this.playerId);this.eventEmitter.fireEvent(t)}),Si(this,"resetIsSeekingToFalse",()=>{this.isSeeking=!1}),Si(this,"startCastingProcess",async e=>{let t=this.castSender?this.castSender:await createCastSender({...e,environment:e.environment,playerId:this.playerId},this.eventEmitter);if(!this.castSender){let{optout:i,gdpr:n,entitlements:r,userCountry:o}=e;await t.init({optout:i,gdpr:n,countryCode:o,entitlements:r,audioLanguage:getBrowserLanguage(),locale:e.locale})}try{this.eventEmitter.addEventListener(this.handleCastSessionStateChanged)}catch{}await t.loadVideo({productId:e.assetId,currentTime:this.getCurrentTimeInSec()}),this.castSender=t}),Si(this,"handleCastSessionStateChanged",e=>{switch(e.castState){case"CONNECTED":case"SESSION_STARTED":case"SESSION_RESUMED":this.setVideoElementVisibility(!1);break;case"NOT_CONNECTED":case"NO_DEVICES_AVAILABLE":case"SESSION_SUSPENDED":case"SESSION_ENDED":case"SESSION_START_FAILED":this.destroyCastSender(),this.setVideoElementVisibility(!0)}}),Si(this,"handleAdBreakFinished",e=>{"adBreakFinished"===e.type&&"POST_ROLL"===e.adType&&(this.postRollAdBreakFinished=!0)});const t=e.playerId;this.eventEmitter=e.eventEmitter,this.playerId=t,this.serverEnvironment=e.serverEnvironment;const i=createBitmovinPlayer(e,resolvePlayerConfig(e));this.player=i.player;const n=this.player;e.autoplay&&(this.hasStarted=!0,this.isPlayRequested=!0,this.shouldAutoPlay=!0),isDatazoomEnabled(e.enableDataZoom,e.dataZoomConfig)&&createDataZoomTracker(e.dataZoomConfig,n),this.addAllEventListeners(n),resolveCastEnablement({eventEmitter:this.eventEmitter,playerId:t,log:log$d})}getPlayerApi(){return this.player}addAllEventListeners(e){this.addOrRemoveAllEventListeners(e,"add")}removeAllEventListeners(e){this.addOrRemoveAllEventListeners(e,"remove")}addOrRemoveEventListener(e,t,i,n){"add"===t?e.on(i,n):e.off(i,n)}addOrRemoveAllEventListeners(e,t){this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.AirplayChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.AudioChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.CueEnter,this._handleSubtitleEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.CueExit,this._handleSubtitleEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.CueUpdate,this._handleSubtitleEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.Error,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.Muted,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.Paused,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.Play,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.PlaybackFinished,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.PlaybackSpeedChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.Playing,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.Seek,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.Seeked,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.SourceUnloaded,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.StallEnded,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.StallStarted,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.SubtitleAdded,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.SubtitleDisabled,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.SubtitleEnabled,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.TimeChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.TimeShift,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.TimeShifted,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.Unmuted,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.Vie
129wModeChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.VolumeChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.Warning,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.AdBreakStarted,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.AdBreakFinished,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.SegmentPlayback,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.VideoQualityChanged,this._handlePlayerEvent),this.addOrRemoveEventListener(e,t,bitmovinplayerCoreExports.PlayerEvent.DownloadFinished,this._handlePlayerEvent)}_handleTimeChanged(e){let t=!0;return this.isSeeking||this.isShowingAd()?t=!1:this.checkForTimeSkipAndNotify(e),t}handleErrorEvent(e){reportClientError("Bitmovin threw an error",this.serverEnvironment,[...this.allBitmovinWarnings,e])}handleWarningEvent(e){var t,i;if(this.allBitmovinWarnings.push(e),e.code===bitmovinplayerCoreExports.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED){let e=null==(t=this.player)?void 0:t.getConfig(!0).playback,n=(null==e?void 0:e.autoplay)??!1;if(!(null==e?void 0:e.muted)&&n&&this.shouldAutoPlay){log$d.debug("trying another auto-play with mute turned on"),this.shouldAutoPlay=!1;let e=(null==(i=this.player)?void 0:i.isMuted())??!1;this.mute("INITIAL"),this.play().catch(t=>{log$d.warn("auto play with mute on did not work either",t),e||this.unmute("INITIAL")})}}}getSubtitlesApi(){var e;return null==(e=this.player)?void 0:e.subtitles}_handleSeekDone(e,t){var i;this.isSeeking=!1;let n=null==(i=this.player)?void 0:i.getCurrentTime(bitmovinplayerCoreExports.TimeMode.AbsoluteTime),r={...e,issuer:this.currentSeekIssuer,time:n};this.currentSeekTarget=0,this.currentSeekIssuer=void 0,this.lastTimeChangedTimestamp=0,this.mapEventAndEmit(r,t)}canSeekOrTimeshiftForward(){return!!this.player&&(this.player.isLive()?0>this.player.getTimeShift():this.getCurrentTimeInSec()<Math.max(0,this.getMainMediaDurationInSec()-1))}canSeekOrTimeshiftBackward(){return!!this.player&&(this.player.isLive()?this.player.getTimeShift()>this.player.getMaxTimeShift():this.getCurrentTimeInSec()>1)}disableSubtitle(){var e;if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");if(this.castSender)return void this.castSender.setCCOff();let t=this.getSelectedSubtitleTrack();t&&(null==(e=this.getSubtitlesApi())||e.disable(t.id))}enableSubtitle(e,t="USER"){var i;if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.castSender?this.castSender.setCCOn(e,this.getAvailableSubtitleTracks()):(this.currentSetSubtitleTrackIssuer=t,null==(i=this.getSubtitlesApi())||i.enable(e,!0))}getAvailableVideoQualities(){var e;return((null==(e=this.player)?void 0:e.getAvailableVideoQualities())??[]).map(e=>({bitrate:e.bitrate,height:e.height,id:e.id,width:e.width,frameRate:e.frameRate}))}getLiveVariant(){if(!this.player)return"LINEAR";if(this.player.isLive())return isLinearStream(this.player.getMaxTimeShift())?"LINEAR":"DVR";throw Error("trying to get LiveVariant on a VOD player")}getPlaybackMode(){return this.player?this.showingAds||this.isShowingAd()?"ADS":this.player.isLive()?"LIVE":"VOD":"UNKNOWN"}getPlayerType(){return"VIDEO"}getAvailableSubtitleTracks(){var e;return((null==(e=this.getSubtitlesApi())?void 0:e.list())??[]).filter(e=>isValidSubtitleTrack(e))}getSelectedSubtitleTrack(){var e;if(this.castSender){let e=this.castSender.currentCcTrackIndex;return this.getAvailableSubtitleTracks()[e]??void 0}return((null==(e=this.getSubtitlesApi())?void 0:e.list())??[]).find(e=>e.enabled)}isAirPlayAvailable(){var e;return!!(null!=(e=this.player)&&e.isAirplayAvailable())}isPlayingVideoViaAirPlay(){var e;return!!(null!=(e=this.player)&&e.isAirplayActive())}isCastingAvailable(){return CastSender.isCastAvailable()}isCastingVideo(){return CastSender.isCastingVideo()}stopCastingVideo(){if(CastSender.stopCastingVideo(),this.castSender){let e=this.castSender.getCurrentTime();this.isPlayRequested=!1,this.destroyCastSender(!1),this.player&&!this.player.isLive()&&this.seek(e,"USER")}}isShowingAd(){var e;return!!(null!=(e=this.getNativePlayerAdvertisingAPI())&&e.getActiveAdBreak())}playVideoViaAirPlay(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.isAirPlayAvailable()&&this.player.showAirplayTargetPicker()}playVideoViaCasting(e){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.isCastingAvailable()&&(this.pause(),this.startCastingProcess(e).catch(e=>{log$d.debug("Cast connection failed:",e)}))}setVideoElementVisibility(e){let t=this.getVideoElement();t&&(t.style.opacity=e?"1":"0")}setHasError(e){this.hasError=e}isPictureInPictureAvailable(){return document.pictureInPictureEnabled}isFullscreenAvailable(){var e;
129return!!(null!=(e=this.player)&&e.isViewModeAvailable(bitmovinplayerCoreExports.ViewMode.Fullscreen))}isInPictureInPictureMode(){return!!document.pictureInPictureElement}isInFullscreenMode(){var e;return(null==(e=this.player)?void 0:e.getViewMode())===bitmovinplayerCoreExports.ViewMode.Fullscreen}isPlayerLoaded(){return this.loaded}togglePictureInPicture(){this.setPictureInPicture(!this.isInPictureInPictureMode())}setPictureInPicture(e){var t;if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");e?null==(t=this.getVideoElement())||t.requestPictureInPicture():document.exitPictureInPicture()}toggleFullscreen(e){this.setFullscreen(!this.isInFullscreenMode(),e)}setFullscreen(e,t){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");e?this.player.setViewMode(bitmovinplayerCoreExports.ViewMode.Fullscreen,{fullscreenElement:t}):this.player.setViewMode(bitmovinplayerCoreExports.ViewMode.Inline)}getCurrentTimeInSeconds(){var e;if(this.isShowingAd()&&this.ima)return this.ima.getCurrentTimeInSeconds()??0;if(this.castSender)return this.castSender.getCurrentTime();let{start:t}=this.getSeekableRange();return((null==(e=this.player)?void 0:e.getCurrentTime())??0)-t}getCurrentTimeInSec(){var e;if(this.isSeeking){let{start:e}=this.getSeekableRange();return this.currentSeekTarget-e}if("LIVE"===this.getPlaybackMode())return(null==(e=this.player)?void 0:e.getTimeShift())??0;let t=this.getCurrentTimeInSeconds();return isNaN(t)?0:t}getLastTimeChangedPlaybackTime(){return this.lastTimeChangedPlaybackTime}getLatestSegmentStartTimestamp(){return this.segmentStartDate}getDurationInSec(){var e;return(null==(e=this.player)?void 0:e.getDuration())??0}getMaxTimeShiftInSec(){var e;return(null==(e=this.player)?void 0:e.getMaxTimeShift())??0}getTimeShiftInSec(){var e;return(null==(e=this.player)?void 0:e.getTimeShift())??0}getInitialSeekTimeInSec(){return this.initialSeekTimeInSec}getIsPlayRequested(){return this.isPlayRequested}getShouldAutoPlay(){return this.shouldAutoPlay}getCurrentSetAudioTrackIssuer(){return this.currentSetAudioTrackIssuer}getCurrentSetSubtitleTrackIssuer(){return this.currentSetSubtitleTrackIssuer}getMainMediaDurationInSec(){var e;return this.isShowingAd()?this.mainMediaDurationInSec:(null==(e=this.player)?void 0:e.getDuration())??0}getLastMainMediaPositionInSec(){return this.lastMainMediaPositionInSec}getPlayerAdvertisingAPI(){return this.ima}getNativePlayerAdvertisingAPI(){var e;return null==(e=this.player)?void 0:e.ads}getAdCuePoints(){var e;if(null!=(e=this.player)&&e.ads)return this.player.ads.list().map(e=>e.scheduleTime)}getVideoBufferLength(){var e;return this.isSeeking?0:(null==(e=this.player)?void 0:e.getVideoBufferLength())??0}setPlaybackSpeed(e){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.player.setPlaybackSpeed(e)}getPlaybackSpeed(){var e;return(null==(e=this.player)?void 0:e.getPlaybackSpeed())??1}async load({source:e,initialSeekTimeInSec:t,aspectRatio:i,customSubtitleTracks:n}){var r,o,a;this.loaded=!1,this.lastTimeChangedTimestamp=0,this.lastPlayerEvent=void 0,this.currentSetSubtitleTrackIssuer="INITIAL",this.currentSetAudioTrackIssuer="INITIAL",log$d.debug("load player for instance",this.playerId,e);let s=null==n?void 0:n.map(e=>({...e,kind:"subtitle"})),l={hls:(null==e?void 0:e.mediaType)==="application/vnd.apple.mpegurl"?e.videoUrl:void 0,dash:(null==e?void 0:e.mediaType)==="application/dash+xml"?e.videoUrl:void 0,progressive:(null==e?void 0:e.mediaType)==="video/mp4"?e.videoUrl:void 0,vr:resolveVRSourceConfig(null==e?void 0:e.vr),subtitleTracks:s,options:{startOffset:t}};try{await (null==(r=this.player)?void 0:r.unload())}catch(e){log$d.error("error unloading bitmovin player with data",this.playerId,e)}log$d.debug("loading bitmovin player with data",this.playerId,l);try{await (null==(o=this.player)?void 0:o.load(l)),this.initialPlaybackMode=this.getPlaybackMode(),this.setVideoElementPoster(i),this.loaded=!0,this.mainMediaDurationInSec=(null==(a=this.player)?void 0:a.getDuration())??0,this.initialSeekTimeInSec=t,log$d.debug("Successfully loaded source for instance",this.playerId),this.performInitialSeekOrTimeshift(t),this.queuedAction&&(log$d.debug("have task queue after load",this.queuedAction),this.processAction(this.queuedAction),this.queuedAction=void 0)}catch(e){throw this.loaded=!1,log$d.error("Error while loading source for instance",this.playerId,e),Error(`bitmovin load error ${e}`)}}setVideoElementPoster(e){let t=this.getVideoElement();t&&(t.poster=generateVideoTagPosterSource(e))}performInitialSeekOrTimeshift(e){e>0&&"VOD"===this.getPlaybackMode()?this.seek(e,"INITIAL"):"LIVE"===this.getPlaybackMode()&&e<0&&this.timeShift(e,"INITIAL")}processAction(e){switch(e){case"PLAY":this.play();break;case"PAUSE":this.pause()}}mute(e="USER"){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.player.mute(e)}pause(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");if(this.isPlayRequested=!1,!this.loaded){this.queuedAction="PAUSE";return}this.castSender?this.castSender.pause():this.player.pause()}async play(){if(!this.loaded){this.queuedAction="PLAY";return}if(this.hasStarted=!0,this.isPlayRequested=!0,!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");try{this.castSender?this.castSender.play():await this.player.play()}catch(e){throw log$d.warn("failed to play",e),this.isPlayRequested=!1,e}}async stop(){this.isInPictureInPictureMode()&&this.setPictureInPicture(!1),this.setFullscreen(!1),await this.reset()}async reset(){this.hasStarted=!1,this.shouldAutoPlay=!1,this.isPlayRequested=!1,this.hasError=!1,this.queuedAction=void 0,this.lastTimeChangedTimestamp=0,this.lastPlayerEvent=void 0,this.lastTimeChangedPlaybackTime=0,this.currentSetAudioTrackIssuer="INITIAL",this.currentSetSubtitleTrackIssuer="INITIAL",this.currentSeekIssuer=void 0,this.segmentStartDate=0,this.loaded=!1,this.showingAds=!1,this.initialPlaybackMode="UNKNOWN",this.allBitmovinWarnings=[],this.destroyCastSender(),this.destroyImaInstance(),await this.dispatchUnloadedEventAndUnload()}destroyCastSender(e=!0){this.castSender&&(this.castSender.destroy(),this.castSender=null,e&&this.eventEmitter.removeEventListener(this.handleCastSessionStateChanged))}async dispatchUnloadedEventAndUnload(){var e;
129this.eventEmitter.fireEvent({type:"sourceUnloaded",playerId:this.playerId}),await (null==(e=this.player)?void 0:e.unload())}seek(e,t){if("LIVE"===this.getPlaybackMode())throw Error("cannot seek in live mode, use `timeshift` instead");if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");return this.currentSeekTarget=e,this.currentSeekIssuer=t,this.isSeeking=!0,log$d.debug("SEEK player seek target ",this.currentSeekTarget,"is seeking",this.isSeeking),"RESTART"===t&&0===e&&(this.lastMainMediaPositionInSec=0,this.initialSeekTimeInSec=0),this.castSender?("RESTART"===t&&0===e?this.castSender.replayVideo():this.castSender.seek(e),this.isSeeking=!1,!0):this.player.seek(e,t)}seekRelative(e,t){if("LIVE"===this.getPlaybackMode())throw Error("cannot seek in live mode, use `timeshift` instead");if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");let i=this.player.getCurrentTime(),{start:n,end:r}=this.getSeekableRange(),o=Math.max(Math.min(i+e,r),n);return this.player.seek(o,t)}timeShift(e,t="USER"){var i;if(!(null!=(i=this.player)&&i.isLive()))throw Error("player is not in live mode");return this.isSeeking=!0,this.currentSeekIssuer=t,this.currentSeekTarget=this.player.getCurrentTime(bitmovinplayerCoreExports.TimeMode.AbsoluteTime)+e,this.player.timeShift(e,t),!0}unmute(e="USER"){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.player.unmute(e)}async destroy(e=!1){var t;this.player&&(destroyDataZoomTracker(this.player),this.removeAllEventListeners(this.player)),e&&this.isInPictureInPictureMode()&&this.setPictureInPicture(!1),this.destroyImaInstance(),await this.reset(),e&&(await (null==(t=this.player)?void 0:t.destroy()),this.player=void 0)}hasEnded(){var e;return this.postRollAdBreakFinished||!!(null!=(e=this.player)&&e.hasEnded())}getPlayerStatus(){return this.hasError?"ERROR":this.castSender?this.castSender.getPlayerStatus():this.loaded?this.player?this.player.isStalled()?"BUFFERING":this.player.isPlaying()?"PLAYING":this.hasEnded()?"ENDED":this.isPlayRequested?"BUFFERING":this.hasStarted?"PAUSED":"IDLE":"TRANSITIONING":"IDLE"}mapEventAndEmit(e,t){if(!this.player)throw Error("dont have player");let i=mapBitmovinPlayerEvent(e,t,this);log$d.debug(t,"received bitmovin event",e,"mapped to",i),i&&this.eventEmitter.f
129ireEvent(i)}checkForTimeSkipAndNotify(e){var t;let i=Date.now();if((null==(t=this.lastPlayerEvent)?void 0:t.type)!==bitmovinplayerCoreExports.PlayerEvent.TimeChanged)return void this.updateLastTimeChangedPlaybackTimeAndTimeStamp(e.time);if(this.lastTimeChangedTimestamp&&1===this.getPlaybackSpeed()&&"LIVE"===this.getPlaybackMode()){let t=Math.abs((i-this.lastTimeChangedTimestamp)/1e3-(e.time-this.lastTimeChangedPlaybackTime));t>1&&(log$d.info("TIME SKIP detected",{previousPlaybackTimeInSec:this.lastTimeChangedPlaybackTime,currentPlaybackTimeInSec:e.time,timeSkipDurationInSec:t}),this.eventEmitter.fireEvent({type:"timeSkipped",playerId:this.playerId,previousPlaybackTimeInSec:this.lastTimeChangedPlaybackTime,currentPlaybackTimeInSec:e.time}))}this.updateLastTimeChangedPlaybackTimeAndTimeStamp(e.time)}updateLastTimeChangedPlaybackTimeAndTimeStamp(e){e&&(this.lastTimeChangedTimestamp=Date.now(),this.lastTimeChangedPlaybackTime=e)}handleTimeChangedAfterEmit(){this.isShowingAd()||(this.lastMainMediaPositionInSec=this.getCurrentTimeInSec())}isStreamAtLivePos(){let e=this.player;return!!e&&e.isLive()&&e.getTimeShift()>=-4}getAvailableAudioTracks(){return this.player?this.player.getAvailableAudio():[]}getAudioLanguage(){var e,t;return(null==(t=null==(e=this.player)?void 0:e.getAudio())?void 0:t.lang)??""}getAudioLanguageId(){var e,t,i;if(this.castSender){let t=this.castSender.currentAudioTrackIndex;return(null==(e=this.getAvailableAudioTracks()[t])?void 0:e.id)??""}return(null==(i=null==(t=this.player)?void 0:t.getAudio())?void 0:i.id)??""}setAudioTrack(e,t="USER"){if(!this.player)throw Error("setAudioTrack: why is the player undef here?");(this.currentSetAudioTrackIssuer=t,this.castSender)?this.castSender.setAudioTrack(e,this.getAvailableAudioTracks()):this.player.setAudio(e)}getSubtitleTrackLanguage(){var e;return null==(e=this.getSelectedSubtitleTrack())?void 0:e.lang}getVolume(){var e,t;return this.castSender?this.castSender.getVolume():null!=(e=this.player)&&e.isMuted()?0:(null==(t=this.player)?void 0:t.getVolume())??100}setVolume(e){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.castSender?this.castSender.setVolume(e):(0===e&&this.player.mute(),e>0&&this.player.isMuted()&&this.player.unmute(),this.player.setVolume(e))}getVideoQuality(){if(!this.player)return log$d.info("dont have player"),{height:0,width:0};let e=this.getVideoElement();return{height:(null==e?void 0:e.videoHeight)??0,width:(null==e?void 0:e.videoWidth)??0}}getSelectedVideoQuality(){var e;if(!this.player)return log$d.info("dont have player"),defaultVideoQuality();let t=this.player.getVideoQuality();if("auto"!==t.id)return{isAuto:!1,...t};let i=this.player.getPlaybackVideoData(),n=null==(e=this.getAvailableVideoQualities().find(e=>e.id===i.id))?void 0:e.frameRate;return{...defaultVideoQuality(),height:i.height,width:i.width,frameRate:n}}setVideoQuality(e){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");this.player.setVideoQuality(e)}async scheduleAd(e,t="vmap"){var i;let n=null==(i=this.player)?void 0:i.ads;if(!n)throw Error("dont have ad player api");let r=n.list();r.length>0&&(log$d.debug("got existing ad breaks",r),r.forEach(e=>{n.discardAdBreak(e.id)}));let o={tag:{url:e,type:"vmap"===t?bitmovinplayerAdvertisingCoreExports.AdTagType.VMAP:bitmovinplayerAdvertisingCoreExports.AdTagType.VAST}};return log$d.debug("schedule ad ",o),n.schedule(o)}getTechVersion(){var e;return null==(e=this.player)?void 0:e.version}getActualPlayerInstance(){return this.player}getVideoElement(){var e;return null==(e=this.player)?void 0:e.getVideoElement()}enableInteractiveMediaAds(e){this.destroyImaInstance(),this.ima=new InteractiveMediaAds(e,{playerId:this.playerId,eventEmitter:this.eventEmitter,getLastMainMediaPositionInSec:()=>this.lastMainMediaPositionInSec,getInitialSeekTimeInSec:()=>this.initialSeekTimeInSec,getMainMediaDurationInSec:()=>this.mainMediaDurationInSec,resetIsSeekingToFalse:this.resetIsSeekingToFalse}),this.eventEmitter.addEventListener(this.handleAdBreakFinished)}destroyImaInstance(){this.ima&&(this.ima.destroy(),this.ima=void 0,this.eventEmitter.removeEventListener(this.handleAdBreakFinished))}isVRVideo(){var e,t;return!!(null!=(t=null==(e=this.player)?void 0:e.getSource())&&t.vr)}setViewingDirection(e,t){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");if(!this.isVRVideo())throw Error("trying to set viewing direction on non-VR video");this.player.vr.setViewingDirection({yaw:e,pitch:t,roll:0})}getViewingDirection(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");if(!this.isVRVideo())throw Error("trying to get viewing direction on non-VR video");let e=this.player.vr.getViewingDirection();return{x:e.yaw,y:e.pitch}}
129addCustomSubtitleTracks(e){e.forEach(e=>{var t;null==(t=this.getSubtitlesApi())||t.add({...e,kind:"subtitle"})})}getSeekableRange(){if(!this.player)throw Error("unexpectedly the player is `undefined` during a user interaction");return this.player.getSeekableRange()}getInitialPlaybackMode(){return this.initialPlaybackMode}getActualTimeFromPlayer(){var e;return(null==(e=this.player)?void 0:e.getCurrentTime())??0}}function isValidSubtitleTrack(e){return"unknown"!==e.lang}function createPlayerAdapter(e){switch(e.adapterType){case"BITMOVIN":return new BitmovinPlayerAdapter(e);case"SIMULATION":return new SimulationPlayerAdapter(e);default:throw Error(`unknown player adapter type ${e.adapterType}`)}}function convertToServiceEnablement(e,t){return void 0===e?t:e}function resolveGoogleAnalyticsConfig(e){return{...e,defaultPlayerMode:e.defaultPlayerMode??"standard",customInitAttributes:e.customInitAttributes??{},dataLayer:e.dataLayer??window.dataLayer}}function resolveTrackingSettings(e){var t;let i=e.configs,n=e.services;if((null==n?void 0:n.dataZoom)==="ACTIVE"){if(!(null!=(t=i.dataZoom)&&t.configId))throw Error("cannot enable dataZoom without a configuration id");if(!i.dataZoom.assetId)throw Error("cannot enable dataZoom without an assetId")}let r={googleAnalytics:convertToServiceEnablement(null==n?void 0:n.googleAnalytics,"ACTIVE"),dataZoom:convertToServiceEnablement(null==n?void 0:n.dataZoom,"INACTIVE")},o={...i,googleAnalytics:resolveGoogleAnalyticsConfig(i.googleAnalytics)};return{...e,configs:o,services:r}}function getValueOrDefault(e,t){return e??t}function resolvePlayerDataConfiguration(e){let t=getValueOrDefault(e.autoplay,!1),i=getValueOrDefault(e.cookieConsent,!1),n=t?"MUTED":"NOT_MUTED",r=getValueOrDefault(e.feedbackUrl,DEFAULT_FEEDBACK_URL),o=getValueOrDefault(e.initialSeekTimeInSec,0),a=getValueOrDefault(e.muted,n),s=getValueOrDefault(e.phasing,!1),l=getValueOrDefault(e.sharingEnabled,!0),c=getValueOrDefault(e.environment,"PRODUCTION"),u=e.productPlacement,d=getValueOrDefault(e.adMarkerEnabled,"INACTIVE");return{...e,autoplay:t,adMarkerEnabled:d,configurationType:"VIDEO",cookieConsent:i,environment:c,feedbackUrl:r,hooks:e.hooks??[],initialSeekTimeInSec:o,muted:a,phasing:s,productPlacement:u,sharingEnabled:l,tracking:resolveTrackingSettings(e.tracking)}}let log$c=loglevelExports.getLogger("VideoPlayerCoordinator"),creationStats={};function printCreationStats(){log$c.debug("Creation Stats",creationStats)}let OBSERVED_DOM_EVENT_TYPES=[RBUP_AUDIO_DOM_EVENT_TYPE,RBUP_VIDEO_DOM_EVENT_TYPE];class VideoPlayerCoordinator{constructor(e){var t,i;Si(this,"playerId"),Si(this,"urlSharingStrategy"),Si(this,"dataLoader"),Si(this,"adService"),Si(this,"eventEmitter"),Si(this,"player"),Si(this,"phasingService"),Si(this,"storageService"),Si(this,"hookService"),Si(this,"thumbnailService"),Si(this,"trackingService"),Si(this,"mediaSessionService"),Si(this,"dispatchElement"),Si(this,"errorReportingEnabled"),Si(this,"reporterComponent"),Si(this,"playerConfig"),Si(this,"_fullscreenElement"),Si(this,"currentErrorDetails"),Si(this,"lastPlaybackPosition",0),Si(this,"cumulatedPlayTimeInSec",0),Si(this,"mediaMetaData"),Si(this,"HdPlaybackHeightThreshold",700),Si(this,"liveStatus"),Si(this,"loaded",!1),Si(this,"destroyed",!1),Si(this,"instanceId",v4()),Si(this,"lastRequestedVolume",100),Si(this,"stopped",!1),Si(this,"nextUpTransitioning",!1),Si(this,"nextUpTransitioningFromEnded",!1),Si(this,"genericListener",e=>{switch(e.type){case"loaded":this.handleLoadedEvent(e),this.dispatchDomEvent(e);break;case"playing":this.handlePlayingEvent(e);break;case"timeChanged":this.handleTimeChangedEvent(e);break;case"seekingDone":this.handleSeekingEvent(e);break;case"timeshiftingDone":this.handleTimeshiftingDoneEvent(e);break;case"play":this.dispatchDomEvent(e);break;case"error":this.handlePlayerOrDataError(e);break;case"liveStatusChanged":this.handleLiveStatusChanged(e);break;case"adBreakFinished":this.handleAdBreakFinished(e);break;case"timeSkipped":this.handleTimeSkippedEvent(e)}}),Si(this,"domEventListener",e=>{if(!OBSERVED_DOM_EVENT_TYPES.includes(e.type))return;let t=e.detail;if(t.playerId===this.playerId)return;let i=this.getPlayerStatus();"play"!==t.type||["IDLE","PAUSED"].includes(i)||(log$c.debug("received play event from player",t.playerId,"pausing"),this.pause())}),this.playerId=e.playerId;const n=creationStats[this.playerId]??{createCount:0,destroyCount:0};n.createCount+=1,creationStats[this.playerId]=n,printCreationStats(),this.eventEmitter=e.eventEmitter??new EventEmitter$1,this.dataLoader=e.dataLoader,this.dispatchElement=e.dispatchElement,this.urlSharingStrategy=e.urlSharingStrategy,this.adService=e.adService;const r=resolvePlayerDataConfiguration(e.config),o=(null==(t=e.config._debug)?void 0:t.playerAdapterType)??"BITMOVIN";if(this.playerConfig=r,this.phasingService=e.phasingService,this.thumbnailService=e.config.thumbnailService??e.thumbnailService,this.hookService=new HookService(e.config.hooks??[]),!e.config.assetId)throw Error("no asset id");log$c.debug("created coordinator",this.playerId,this.instanceId,n),this.player=createPlayerAdapter({adapterType:o,adService:e.adService,muted:r.muted,playerId:e.playerId,element:e.divElement,eventEmitter:this.eventEmitter,autoplay:r.autoplay,enableDataZoom:r.tracking.services.dataZoom,dataZoomConfig:r.tracking.configs.dataZoom,customVideoUrlRequestHeader:null==(i=e.config._debug)?void 0:i.customVideoUrlRequestHeader,serverEnvironment:r.environment}),this.addEventListener(this.genericListener),"ACTIVE"===r.tracking.services.googleAnalytics&&(this.trackingService=createTrackingService(this,r.tracking.configs.googleAnalytics.dataLayer)),this.mediaSessionService=new MediaSessionService(this),this.errorReportingEnabled=!!e.config.enableErrorReporting,this.errorReportingEnabled&&(this.reporterComponent=e.config.componentName,playerErrorReporter.configure({environment:r.environment,componentVersion:CORE_VERSION})),document.addEventListener(RBUP_VIDEO_DOM_EVENT_TYPE,this.domEventListener),document.addEventListener(RBUP_AUDIO_DOM_EVENT_TYPE,this.domEventListener)}get fullscreenElement(){return this._fullscreenElement}set fullscreenElement(e){this._fullscreenElement=e}get isAirPlayAvailable(){return this.player.isAirPlayAvailable()}get isCastingAvailable(){var e,t,i;return(null==(t=null==(e=this.playerConfig)?void 0:e.cast)?void 0:t.tenant)!==void 0&&!!(null!=(i=this.mediaMetaData)&&i.isCastable)&&this.player.isCastingAvailable()}get isCastingVideoViaCast(){return this.player.isCastingVideo()}get isVideoLoaded(){return this.loaded}addEventListener(e){this.eventEmitter.addEventListener(e)}async destroy(e=!1){var t,i,n;this.loaded=!1,this.destroyed=!0;let r=creationStats[this.playerId]??{createCount:0,destroyCount:0};r.destroyCount+=1,creationStats[this.playerId]=r,printCreationStats(),document.removeEventListener(RBUP_VIDEO_DOM_EVENT_TYPE,this.domEventListener),document.removeEventListener(RBUP_AUDIO_DOM_EVENT_TYPE,this.domEventListener);try{null==(t=this.phasingService)||t.stop(),null==(i=this.trackingService)||i.destroy(),this.mediaSessionService.destroy(),null==(n=this.storageService)||n.destroy();let e=this.playerConfig,r=this.mediaMetaData;await this.hookService.beforeDestroy(e,r,this),this.storageService=void 0}catch(t){let e=resolveErrorMessageFromUnknown(t);log$c.warn("error destroying player adapter services for player",this.playerId,this.instanceId,e)}try{await this.player.destroy(e),log$c.debug("done destroying coordinator",this.playerId,this.instanceId)}catch(t){let e=resolveErrorMessageFromUnknown(t);log$c.warn("error destroying player adapter for player",this.playerId,this.instanceId,e)}this.errorReportingEnabled&&playerErrorReporter.destroy()}canSeekOrTimeshiftBackward(){return this.player.canSeekOrTimeshiftBackward()}canSeekOrTimeshiftForward(){return this.player.canSeekOrTimeshiftForward()}canPlayVideo(){var e,t;return!!(null!=(t=null==(e=this.getMediaMetaData())?void 0:e.mediaSrc)&&t.videoUrl)}disableSubtitle(e="USER"){return this.player.disableSubtitle(e)}enableSubtitle(e,t="USER"){return this.player.enableSubtitle(e,t)}getAvailableAudioTracks(){return this.player.getAvailableAudioTracks()}getSelectedAudioTrack(){let e=this.getAvailableAudioTracks(),t=this.player.getAudioLanguageId();return e.find(e=>e.id===t)}getAvailableVideoQualities(){return this.player.getAvailableVideoQualities()}getSubtitleTracks(){return this.player.getAvailableSubtitleTracks()}getSelectedSubtitleTrack(){return this.player.getSelectedSubtitleTrack()}getCumulatedPlayTimeInSec(){return this.cumulatedPlayTimeInSec}getCurrentErrorDetails(){return this.currentErrorDetails}getDurationInSec(){return this.player.getDurationInSec()}getLatestSegmentStartTimestamp(){return this.player.getLatestSegmentStartTimestamp()}getMaxTimeShiftInSec(){return this.player.getMaxTimeShiftInSec()}getTimeShiftInSec(){return this.player.getTimeShiftInSec()}getLiveStatus(){return this.liveStatus}
129getMediaMetaData(){return this.mediaMetaData}getPlaybackSpeed(){return this.player.getPlaybackSpeed()}getPlayerConfiguration(){let e=this.playerConfig;if(!e)throw Error("dont have player config yet!");return e}getPlayerStatus(){return this.nextUpTransitioning?"TRANSITIONING":this.player.getPlayerStatus()}setNextUpTransitioning(e){this.nextUpTransitioning=e,this.nextUpTransitioningFromEnded=e&&"ENDED"===this.player.getPlayerStatus()}isTransitioningFromEnded(){return this.nextUpTransitioning&&this.nextUpTransitioningFromEnded}getSelectedVideoQuality(){return this.player.getSelectedVideoQuality()}getBufferLengthInSec(){return this.player.getVideoBufferLength()}getPlayerData(){return this.player}getVideoQuality(){return this.player.getVideoQuality()}getVolume(){return this.player.getVolume()}isFullscreenAvailable(){return this.player.isFullscreenAvailable()&&!!this.fullscreenElement}isInFullscreenMode(){return this.player.isInFullscreenMode()}isHdPlayback(){return this.getVideoQuality().height>this.HdPlaybackHeightThreshold}getLiveVariant(){return this.player.getLiveVariant()}getPlaybackMode(){return this.player.getPlaybackMode()}isPhasingEnabled(){var e;return!!(null!=(e=this.playerConfig)&&e.phasing)||!!this.mediaMetaData&&"shouldPhase"in this.mediaMetaData&&!!this.mediaMetaData.shouldPhase}isPictureInPictureAvailable(){return this.player.isPictureInPictureAvailable()}async setThumbnail(e,t,i){return this.thumbnailService.setThumbnail(e,t,i)}handleInvalidLoadCall(e){if(!e)throw Error("no player config provided yet, cannot load");if(!this.dataLoader)throw Error("no data loader provided");if(!this.player)throw Error("no player is active")}async load(e,t=!1){var i,n;this.handleInvalidLoadCall(e),this.nextUpTransitioning=!1,this.loaded=!1,null==(i=this.phasingService)||i.stop();let r=resolvePlayerDataConfiguration(e);this.playerConfig=r,fetchBrowserOrConfiguredTranslationLanguage(e.overrideTranslationLanguage);try{let i=await this.doLoadMetadata(t,r);this.mediaMetaData=i;let o=this.player.getPlayerApi();extendDatazoomMetadataWithVideoPlayerMetadata(e.tracking,i,o);try{this.playerConfig=await this.hookService.beforeLoad(this.playerConfig,i,this)}catch(e){log$c.warn("preloadHook failed, carrying on without it, error",e)}if(this.isPhasingEnabled()){let e=await this.handleLiveStreamPhasingOnLoad(this.playerConfig,i);if(log$c.debug("phasing: live stream response",i,"should load",e),!e)return}if((null==(n=i.playabilityErrors)?void 0:n.length)??!this.canPlayVideo())return this.eventEmitter.f
129ireEvent({type:"error",playerId:this.playerId,code:"SERVER_ERROR"}),i;i.thumbnailSprites&&this.thumbnailService.setThumbnailSprites(i.thumbnailSprites);let a=await this.doLoadAndScheduleAd(i,this.playerConfig);return this.setAriaLabelOfVideoElement(i.title),a}catch(i){let e=resolveErrorMessageFromUnknown(i);log$c.error("error during load",e);let t=e.includes("403")?"NOT_AUTHORIZED":"DATA_NOT_LOADED";this.handlePlayerOrDataError({type:"error",playerId:this.playerId,code:t});return}}async doLoadMetadata(e,t){var i,n;let r=await this.dataLoader.loadData(t);return log$c.debug("got SSDM metadata",r),e&&!(null!=(i=r.mediaSrc)&&i.videoUrl)&&null!=(n=r.playabilityErrors)&&n.includes("NOT_YET_AVAILABLE")&&(await sleep(5e3),log$c.warn("got player data without video url when expecting it!",r,"new livestatus",this.getLiveStatus()),r=await this.dataLoader.loadData(t,!0)),r}initStorageService(e,t,i,n){var r;let o=new AudioLanguageResolver(e,t,i,n),a=new AudioVolumeResolver(t);null==(r=this.storageService)||r.destroy(),this.storageService=void 0,this.storageService=new StorageService(this,o,a),this.storageService.load()}getStorageServiceAllStoredValues(){var e;return null==(e=this.storageService)?void 0:e.getAllStoredValues()}async handleLiveStreamPhasingOnLoad(e,t){if(!this.phasingService)return log$c.warn("no phasing service but config says livestream %o",e),!0;let i=await this.phasingService.start(e,t);return i.shouldKeepPolling||this.phasingService.stop(),this.liveStatus=i.liveStatus,i.shouldLoadPlayer}async doLoadAndScheduleAd(e,t){var i;if(!e.mediaSrc)return;let n={...e.mediaSrc,vr:e.vr},r=e.aspectRatio??16/9;await this.player.load({source:n,initialSeekTimeInSec:t.initialSeekTimeInSec,aspectRatio:r,customSubtitleTracks:t.customSubtitleTracks}),this.loaded=!0;try{let n=t.assetId;await (null==(i=this.adService)?void 0:i.scheduleAd(this.player,n,e))}catch(e){log$c.warn("error during scheduleAd, carrying on anyway",e)}try{this.playerConfig=await this.hookService.afterLoad(t,e,this)}catch(e){log$c.warn("onAfterLoad hook failed, carrying on without it, error",e)}
129return this.eventEmitter.fireEvent({type:"loaded",playerId:this.playerId,data:e}),e}setAriaLabelOfVideoElement(e){let t=this.player.getVideoElement();null==t||t.setAttribute("aria-label",e??"")}pause(){return this.player.pause()}async stop(){await this.player.stop(),await this.hookService.beforeDestroy(this.playerConfig,this.mediaMetaData,this),this.reset(),this.stopped=!0}async play(){if(!this.canPlayVideo())throw Error("no playable video source detected!");return this.stopped&&(this.stopped=!1,await this.load(this.playerConfig,!0)),this.eventEmitter.fireEvent({type:"beforePlay",playerId:this.playerId}),this.nextUpTransitioningFromEnded=!1,this.player.play()}playVideoViaAirPlay(){this.player.playVideoViaAirPlay()}playVideoViaCasting(){var e,t,i;if(!(null!=(t=null==(e=this.playerConfig)?void 0:e.cast)&&t.tenant)||!this.playerConfig.assetId)throw Error("no cast tenant configured, cannot start casting");let n={tenant:this.playerConfig.cast.tenant,assetId:this.playerConfig.assetId,environment:this.playerConfig.environment,optout:this.playerConfig.cast.optout,gdpr:this.playerConfig.cast.gdpr,entitlements:this.playerConfig.cast.entitlements,userCountry:null==(i=this.mediaMetaData)?void 0:i.userCountry,locale:this.playerConfig.cast.locale};this.player.playVideoViaCasting(n)}stopCastingVideo(){this.player.stopCastingVideo()}removeEventListener(e){this.eventEmitter.removeEventListener(e)}reset(){var e;this.cumulatedPlayTimeInSec=0,this.lastPlaybackPosition=0,null==(e=this.trackingService)||e.reset(),this.mediaSessionService.reset()}restartPlaybackFromBeginning(){if("VOD"===this.player.getPlaybackMode()){this.reset();let{start:e}=this.player.getSeekableRange();this.player.seek(e,"RESTART")}else if("LIVE"===this.player.getPlaybackMode()&&"DVR"===this.player.getLiveVariant()){let e=this.getMaxTimeShiftInSec();this.timeShift(e)}}seek(e){return!this.player.isShowingAd()&&this.player.seek(e,"USER")}seekOrTimeshiftRelative(e){let t=this.player;if("LIVE"===this.getPlaybackMode()){let i=Math.min(0,t.getTimeShiftInSec()+e);return t.timeShift(i,"USER"),!0}return this.seekRelative(e)}seekRelative(e){return this.player.seekRelative(e,"USER")}setAudioTrack(e,t="USER"){this.player.setAudioTrack(e,t)}setPlaybackSpeed(e){this.player.setPlaybackSpeed(e)}timeShift(e){this.player.timeShift(e,"USER")}toggleFullscreen(){!this.player.isInFullscreenMode()&&this.player.isInPictureInPictureMode()&&this.player.setPictureInPicture(!1),this.player.toggleFullscreen(this.fullscreenElement)}setFullscreen(e){this.player.setFullscreen(e,this.fullscreenElement)}togglePictureInPicture(){this.player.isInFullscreenMode()&&this.player.setFullscreen(!1,this.fullscreenElement),this.player.togglePictureInPicture()}isInPictureInPictureMode(){return this.player.isInPictureInPictureMode()}setVideoQuality(e){this.player.setVideoQuality(e)}setVolume(e){e>0&&(this.lastRequestedVolume=e),this.player.setVolume(e)}setMuted(e){this.player.setVolume(e?0:this.lastRequestedVolume)}isMuted(){return 0===this.getVolume()}dispatchDomEvent(e){let t=new CustomEvent(RBUP_VIDEO_DOM_EVENT_TYPE,{detail:e});log$c.debug("dispatching DOM event",t),document.dispatchEvent(t)}
129dispatchPlayerEvent(e){this.eventEmitter.fireEvent(e)}async handleNonPlayableLiveStatusPhase(){this.isInFullscreenMode()&&this.setFullscreen(!1),this.loaded=!1,this.reset(),await this.player.reset()}handleLiveStatusChanged(e){let{liveStatus:t}=e;this.liveStatus=t,(async()=>{var e,i;log$c.info("live status changed",t);let n=null==(e=this.phasingService)?void 0:e.isPlayablePhase(t.phase);!this.loaded&&this.playerConfig&&n?await this.load(this.playerConfig,!0):this.loaded&&(n?"post"===t.phase&&(log$c.debug("stopping phasing service as we are in POST"),null==(i=this.phasingService)||i.stop()):await this.handleNonPlayableLiveStatusPhase())})()}handleLoadedEvent(e){this.lastPlaybackPosition=0,this.cumulatedPlayTimeInSec=0;let t=this.playerConfig,i=this.getMediaMetaData(),n=this.getAvailableAudioTracks(),r=this.getSubtitleTracks();t&&i&&(n.length>0||r.length>0?this.initStorageService(i,t,n,r):setTimeout(()=>{let e=this.getAvailableAudioTracks(),n=this.getSubtitleTracks();this.initStorageService(i,t,e,n)},300))}handleAdBreakFinished(e){"LIVE"===this.getPlaybackMode()&&(this.lastPlaybackPosition=0)}handleTimeSkippedEvent(e){"LIVE"===this.getPlaybackMode()&&(this.lastPlaybackPosition=e.currentPlaybackTimeInSec)}handlePlayingEvent(e){"LIVE"===this.player.getPlaybackMode()&&(this.lastPlaybackPosition=e.playbackPosition)}handleTimeChangedEvent(e){this.player.isShowingAd()||("LIVE"===this.player.getPlaybackMode()&&0===this.lastPlaybackPosition&&(this.lastPlaybackPosition=e.playbackPosition),this.cumulatedPlayTimeInSec+=e.playbackPosition-this.lastPlaybackPosition,this.lastPlaybackPosition=e.playbackPosition)}handleSeekingEvent(e){this.lastPlaybackPosition=e.playbackPosition}handleTimeshiftingDoneEvent(e){this.lastPlaybackPosition=e.playbackPosition}handlePlayerOrDataError(e){var t;let i=e.code;"SERVER_ERROR"===i&&this.mediaMetaData?this.currentErrorDetails={serverErrorDetails:{playabilityErrors:this.mediaMetaData.playabilityErrors??[],playabilityErrorDetails:this.mediaMetaData.playabilityErrorDetails}}:i?this.currentErrorDetails={playerErrorCode:i}:this.currentErrorDetails={serverErrorDetails:e},this.errorReportingEnabled&&playerErrorReporter.reportCaughtError("player",{assetId:null==(t=this.playerConfig)?void 0:t.assetId,...this.currentErrorDetails},this.reporterComponent),"PLAYING"===this.player.getPlayerStatus()&&this.player.pause(),this.player.setHasError(!0)}getPosterImage(){var e,t,i;if(this.isMediaDataLoadedOrError())return(null==(e=this.playerConfig)?void 0:e.posterImageUrl)??(null==(t=this.mediaMetaData)?void 0:t.posterImageUrl)??(null==(i=this.playerConfig)?void 0:i.customFallbackPosterImageUrl)??RBUP_FALLBACK_POSTER_IMAGE}isMediaDataLoadedOrError(){return!!this.mediaMetaData||!!this.currentErrorDetails}getTechVersion(){return this.player.getTechVersion()}getAspectRatio(){var e;return(null==(e=this.mediaMetaData)?void 0:e.aspectRatio)??16/9}shouldShowProductPlacement(){var e,t;let i=null==(e=this.playerConfig)?void 0:e.productPlacement;return void 0===i?!!(null!=(t=this.getMediaMetaData())&&t.showProductPlacement):"visible"===i}getAdCuePoints(){return this.player.getAdCuePoints()}addCustomSubtitleTracks(e){this.player.addCustomSubtitleTracks(e)}getSeekableRange(){return this.player.getSeekableRange()}getInitialPlaybackMode(){return this.player.getInitialPlaybackMode()}}let qn=class qn{static setPlayerStatus(e){qn.staticPlayerStatus=e}constructor(e){qn.staticOptions=e}isCastingAvailable(){return!1}playVideoViaCasting(){}getPreviousAudioLanguage(){}getCurrentSetAudioTrackIssuer(){}getCurrentSetSubtitleTrackIssuer(){}isInPictureInPictureMode(){return!1}isPlayingVideoViaAirPlay(){return!1}getAvailableAudioTracks(){return[{id:"audio/mp4-1",lang:"en",label:"English"},{id:"audio/mp4-2",lang:"ja",label:"日本語"},{id:"audio/mp4-3",lang:"de",label:"Deutsch"},{id:"audio/mp4-4",lang:"es",label:"espa\xf1ol"}]}setAudioTrack(e,t){}getAvailableSubtitleTracks(){return[{id:"application/mp4-5",lang:"en-US",label:"English (US)"},{id:"application/mp4-6",lang:"el-GR",label:"Ελληνικά (GR)"},{id:"application/mp4-7",lang:"pl-PL",label:"polski (PL)"},{id:"application/mp4-8",lang:"pt-BR",label:"portugu\xeas (BR)"}]}getPlayerType(){return"VIDEO"}getSelectedSubtitleTrack(){}disableSubtitle(e){}enableSubtitle(e,t){}timeShift(e,t="USER"){return!1}canSeekOrTimeshiftBackward(){return!1}canSeekOrTimeshiftForward(){return!1}getMaxTimeShiftInSec(){return MIN_TIMESHIFT_FOR_DVR_SECS}getTimeShiftInSec(){return -10}isStream(){return!1}mute(){}pause(){}async play(){}async stop(){}seek(e,t){return!1}seekRelative(e,t){return!1}unmute(){}async load(e){}async destroy(){}async reset(){}getPlaybackMode(){return"VOD"}getLiveVariant(){return"DVR"}getAvailableVideoQualities(){return[{bitrate:535114,height:240,id:"240_639293",width:426,frameRate:25},{bitrate:889212,height:360,id:"360_1057509",width:640,frameRate:25},{bitrate:1594819,height:540,id:"540_1966184",width:960,frameRate:25},{bitrate:3057048,height:720,id:"720_3752211",width:1280,frameRate:25},{bitrate:6154006,height:1080,id:"1080_7560397",width:1920,frameRate:25}]}getSelectedVideoQuality(){return{height:1920,width:1080,id:"1080_7560397",bitrate:2e3,isAuto:!1}}getVideoQuality(){return{height:1900,width:1280}}setVideoQuality(e){}getPlayerStatus(){return qn.staticPlayerStatus}getCurrentTimeInSeconds(){return 0}getCurrentTimeInSec(){return qn.staticCurrentTime}static setCurrentTime(e){qn.staticCurrentTime=e}getLastTimeChangedPlaybackTime(){return 0}getLatestSegmentStartTimestamp(){return 0}getDurationInSec(){return qn.staticDurationInSec}static setDurationInSec(e){qn.staticDurationInSec=e}getVolume(){return 1}setVolume(e){}setHasError(e){}isPictureInPictureAvailable(){return!0}isFullscreenAvailable(){return!0}isInFullscreenMode(){return!1}togglePictureInPicture(){}setPictureInPicture(e){}toggleFullscreen(e){}setFullscreen(e,t){}getVideoBufferLength(){return qn.staticBufferLength}static setVideoBufferLength(e){qn.staticBufferLength=e}isAirPlayAvailable(){return!1}isPlayerLoaded(){return!1}playVideoViaAirPlay(){}setPlaybackSpeed(e){}getPlaybackSpeed(){return 1}isStreamAtLivePos(){return!1}getPlayerMode(){return"standard"}getAudioLanguage(){return"en"}getAudioLanguageId(){return"audio/mp4-1"}getSubtitleTrackLanguage(){}async scheduleAd(e,t){}getInitialSeekTimeInSec(){return 0}getMainMediaDurationInSec(){return 100}
129getLastMainMediaPositionInSec(){return 0}isShowingAd(){return!1}getTechVersion(){return"1.0.0"}getActualPlayerInstance(){return{}}enableInteractiveMediaAds(e){}getViewingDirection(){return{x:0,y:0}}setViewingDirection(e,t){}isVRVideo(){return!1}getAdCuePoints(){}getVideoElement(){}isCastingVideo(){return!1}stopCastingVideo(){}addCustomSubtitleTracks(e){}getPlayerApi(){}getSeekableRange(){return{start:0,end:qn.staticDurationInSec}}getInitialPlaybackMode(){return"VOD"}getActualTimeFromPlayer(){return qn.staticCurrentTime}};Si(qn,"staticPlayerStatus","IDLE"),Si(qn,"staticOptions"),Si(qn,"staticCurrentTime",0),Si(qn,"staticDurationInSec",42),Si(qn,"staticBufferLength",1);let SimulationPlayerAdapter=qn,defaultUrlSharingStrategy=new QueryParamUrlSharingStrategy;function createPlayerCoordinator({adService:e,config:t,dataLoader:i,dispatchElement:n,divElement:r,playerId:o,urlSharingStrategy:a,eventEmitter:s,phasingService:l,thumbnailService:c}){return new VideoPlayerCoordinator({playerId:o,divElement:r,dispatchElement:n,dataLoader:i,eventEmitter:s,phasingService:l,urlSharingStrategy:a??defaultUrlSharingStrategy,config:t,adService:e,thumbnailService:c})}let publicPlayerEventTypesAsString$1=publicPlayerEventTypes,log$b=loglevelExports.getLogger("CoreApi");function assertPlayerLoaded(e){if(!e)throw Error("dont have coordinator");if(!e.isVideoLoaded)throw Error("no video loaded yet")}function pushListener(e,t){let i=e.current;i&&!i.includes(t)&&i.push(t)}function useCoreApi(e,t,i,n){let r=_$3(!1),o=_$3(e);o.current=e;let a=F$4(()=>({isReady(){var e;return(null==(e=o.current)?void 0:e.isVideoLoaded)??!1},async play(){let e=o.current;return assertPlayerLoaded(e),e.play()},async stop(){let e=o.current;return assertPlayerLoaded(e),e.stop()},pause(){let e=o.current;assertPlayerLoaded(e),e.pause()},seek(e){let t=o.current;assertPlayerLoaded(t);let{start:i}=t.getSeekableRange(),n=i+e;t.seek(n)},timeShift(e){let t=o.current;assertPlayerLoaded(t),t.timeShift(e)},getPlaybackMode(){let e=o.current;return assertPlayerLoaded(e),e.getPlaybackMode()},setFullscreen(e){let t=o.current;assertPlayerLoaded(t),t.setFullscreen(e)},isFullscreen(){let e=o.current;return assertPlayerLoaded(e),e.isInFullscreenMode()},getStatus(){let e=o.current;return assertPlayerLoaded(e),e.getPlayerStatus()},getCurrentTime(){var e;let t=o.current;return assertPlayerLoaded(t),(null==(e=t.getPlayerData())?void 0:e.getCurrentTimeInSec())??0},getDuration(){var e;let t=o.current;return assertPlayerLoaded(t),(null==(e=t.getPlayerData())?void 0:e.getDurationInSec())??0},getCurrentTimeOfMainVideo(){var e;let t=o.current;return assertPlayerLoaded(t),(null==(e=t.getPlayerData())?void 0:e.getLastMainMediaPositionInSec())??0},getDurationOfMainVideo(){var e;let t=o.current;return assertPlayerLoaded(t),(null==(e=t.getPlayerData())?void 0:e.getMainMediaDurationInSec())??0},getCurrentTimeshift(){var e;let t=o.current;return assertPlayerLoaded(t),(null==(e=t.getPlayerData())?void 0:e.getTimeShiftInSec())??0},getMaxTimeshift(){let e=o.current;return assertPlayerLoaded(e),e.getMaxTimeShiftInSec()},setMuted(e){let t=o.current;assertPlayerLoaded(t),t.setMuted(e)},isMuted(){let e=o.current;return assertPlayerLoaded(e),e.isMuted()},setVolume(e){let t=o.current;assertPlayerLoaded(t),t.setVolume(e)},getVolume(){let e=o.current;return assertPlayerLoaded(e),e.getVolume()},addEventListener(e){pushListener(n,e)},removeEventListener(e){var t,i;let r=null==(t=n.current)?void 0:t.findIndex(t=>t===e);void 0!==r&&(null==(i=n.current)||i.splice(r,1))}}),[n]);A$3(t,()=>a,[a]);let s=null==e?void 0:e.isVideoLoaded,l=null==e?void 0:e.getCurrentErrorDetails();return p$6(()=>{let t=e;log$b.debug("coreApi",{coordinator:t,apiAvailable:i,videoLoaded:s}),t&&!r.current&&i&&(r.current=!0,log$b.debug("coreApi invoking apiAvailable",{coordinator:t,apiAvailable:i,videoLoaded:s}),l?i.reject(l):i.resolve(a))},[i,a,s,e,l]),F$4(()=>e=>{if(publicPlayerEventTypesAsString$1.includes(e.type))for(let t of n.current??[])try{t(e)}catch(e){log$b.error("error invoking public event listener",e)}},[n])}let cosmosFonts='@font-face{font-family:Bull Text;font-style:normal;font-weight:400;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:500;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff) format("woff")}@font-face{font-family:Bull VF;font-style:normal;font-weight:300 800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2-variations"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2")}',playablePhases=["live","post"],nonPollPhases=["canceled","post"];function isPlayablePhase(e){return playablePhases.includes(e)}function shouldPollInPhase(e){return!nonPollPhases.includes(e)}let log$a=loglevelExports.getLogger("PhasingService"),MIN_TO_MS=6e4,THREE_HOURS=180*MIN_TO_MS,TEN_MIN=10*MIN_TO_MS,TEN_SEC=1e4;function calculateInterval(e,t){switch(e){case"pre":case"trim":case"unconfirmed":case"live":return t&&new Date(t).getTime()-Date.now()>THREE_HOURS?TEN_MIN:TEN_SEC;case"post":case"canceled":return;default:log$a.warn("unexpected live status phase %s",e);return}}let log$9=loglevelExports.getLogger("PhasingService");class PhasingService{constructor(e,t,i){Si(this,"liveStatus"),Si(this,"running",!1),Si(this,"timeoutHandle"),Si(this,"currentPlayerConfig"),Si(this,"currentMetaData"),this.playerId=e,this.liveStatusDataLoader=t,this.eventEmitter=i}async loadLiveStatus(e,t){log$9.debug("loading live status for config",e);let i=await this.liveStatusDataLoader.loadLiveStatus(e,t);return log$9.debug("-> got live status response",i),i}async start(e,t){this.running=!0,this.currentPlayerConfig=e,this.currentMetaData=t;let i=await this.poll(e,!1),n=null==i?void 0:i.phase,r=this.isPlayablePhase(n??"pre"),o=(null==i?void 0:i.shouldKeepPolling)??this.shouldPollInPhase(n??"pre");return{shouldLoadPlayer:r,liveStatus:i,shouldKeepPolling:o}}isPlayablePhase(e){return["live","post"].includes(e)}shouldPollInPhase(e){return!["canceled","post"].includes(e)}stop(){this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.running=!1,this.currentPlayerConfig=void 0}isRunning(){return this.running}
129emitLiveStatusChangedEvent(e,t,i){e&&this.eventEmitter.fireEvent({type:"liveStatusChanged",playerId:this.playerId,liveStatus:t,previousLiveStatus:i})}keepPolling(e){return this.running&&e}async poll(e,t=!0){var i;let n,r=this.liveStatus;if(!this.currentMetaData)throw Error("dont have media metadata for phasing poll");try{if(n=await this.loadLiveStatus(e,this.currentMetaData),!this.running||this.currentPlayerConfig!==e)return;areLiveStatusResponsesEqual(r,n)||(this.liveStatus=n,this.emitLiveStatusChangedEvent(t,n,r))}catch(e){if(log$9.error("error polling live status",e),!r){let e={phase:"pre",shouldKeepPolling:!0};this.liveStatus=e,this.emitLiveStatusChangedEvent(!0,e)}}let o=calculateInterval((null==(i=this.liveStatus)?void 0:i.phase)??"pre",null==n?void 0:n.startTime);return this.keepPolling(o)&&(this.timeoutHandle=window.setTimeout(()=>this.poll(e),o)),this.liveStatus}_injectStarted(e,t,i,n){this.running=e,this.currentPlayerConfig=t,this.currentMetaData=i,this.liveStatus=n}}function normalizeLiveStatusResponse(e){if(e)return{...e,_meta:void 0}}function areLiveStatusResponsesEqual(e,t){return deepEqual(normalizeLiveStatusResponse(e),normalizeLiveStatusResponse(t))}let styles$6='@font-face{font-family:Bull Text;font-style:normal;font-weight:400;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Regular.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:500;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Medium.woff) format("woff")}@font-face{font-family:Bull Text;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullText-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:700;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Bold.woff) format("woff")}@font-face{font-family:Bull;font-style:normal;font-weight:800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff2) format("woff2"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/Bull-Heavy1.woff) format("woff")}@font-face{font-family:Bull VF;font-style:normal;font-weight:300 800;font-display:swap;src:url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2-variations"),url(https://rbds-static.redbull.com/@cosmos/foundation/latest/fonts/v5.002/BullVAR.woff2) format("woff2")}.rbup-video-core-container{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;aspect-ratio:var(--aspect-ratio);margin:auto;max-height:100%}.rbup-video-core-container__player{background-color:var(--rbup-container16x9-background-color);height:100%}.rbup-video-core-container__player video{width:100%;height:100%}.rbup-video-core-container__player #bitmovinplayer-vr-canvas{top:0;left:0;bottom:0;right:0;width:100%;height:100%}',log$8=loglevelExports.getLogger("VideoCoreInternal");async function destroyPlayer(e,t,i=!1){if(e&&!e.destroyed)try{log$8.debug("destroying coordinator",e.playerId),e.removeEventListener(t),await e.destroy(i),log$8.debug("coordinator destroyed",e.playerId)}catch(e){log$8.error("Error while destroying coordinator",e)}}async function loadPlayerCoordinatorAndInvokeReadyCallback(e,t,i,n){log$8.debug("config was changed, loading new data into player",e,t,"ref",i),i&&(await i.load(t),log$8.debug("loading done",i.playerId),null==n||n(i))}async function createPlayerCoordinatorAndInvokeReadyCallback({adService:e,config:t,dataLoader:i,dispatchElement:n,divElement:r,liveStatusDataLoader:o,playerId:a,urlSharingStrategy:s,lastCoordinator:l,listener:c,onCoordinatorAvailable:u}){await destroyPlayer(l,c),t.skipCosmosFontInjection||injectCosmosFontIntoHeader(cosmosFonts);let d=new EventEmitter$1,h=o?new PhasingService(a,o,d):void 0,p=t.thumbnailService??new CommonThumbnailService,f=createPlayerCoordinator({adService:e,config:t,dataLoader:i,dispatchElement:n,divElement:r,playerId:a,urlSharingStrategy:s,eventEmitter:
129d,phasingService:h,thumbnailService:p});return f.addEventListener(c),await loadPlayerCoordinatorAndInvokeReadyCallback(a,t,f,u),f}let VideoCoreInternal=({config:e,dataLoader:t,adService:i,onCoordinatorAvailable:n,urlSharingStrategy:r,liveStatusDataLoader:o,internalOnApiAvailable:a,aspectRatio:s},l)=>{let c=_$3(null),u=_$3(),d=_$3(!1),h=_$3(null),[p,f]=h$3(),[m]=h$3(v4()),g=_$3(null),v=_$3([]),y=T$4(()=>{h.current&&(window.clearTimeout(h.current),h.current=null)},[]);if(!e)throw Error("no config provided");let b=useCoreApi(p,l,a,v),S=_$3(b);S.current=b,p$6(()=>{let a=g.current,s=c.current;if(t&&a&&s&&e.assetId){let l=e=>{null==n||n(e),f(e)};(async()=>{y(),h.current=window.setTimeout(async()=>{let n=await createPlayerCoordinatorAndInvokeReadyCallback({adService:i,config:e,dataLoader:t,dispatchElement:s,divElement:a,liveStatusDataLoader:o,playerId:m,urlSharingStrategy:r,lastCoordinator:u.current,listener:b,onCoordinatorAvailable:l});d.current&&destroyPlayer(n,b,!0),u.current=n,f(n)},100)})()}},[m,t,g,e,r,i,o,n,b,y]),p$6(()=>{p&&t&&(p.dataLoader=t)},[p,t]),p$6(()=>()=>{d.current=!0,u.current&&destroyPlayer(u.current,S.current,!0)},[]);let _=(null==p?void 0:p.isInFullscreenMode())??!1;return useReportUsage(c,e.environment),o$i(k$5,{children:[o$i("style",{children:styles$6}),o$i("div",{class:"rbup-video-core-container",style:{"--aspect-ratio":`${s?transformAspectRatioForCss(s):""}`},ref:c,"data-rbup-core":!0,children:o$i("div",{class:"rbup-video-core-container__player",ref:g,"data-rbup-core-container":!0,"data-rbup-fullscreen":resolveTagAttributeValue(_)})})]})},RbupVideoCore=k$3(VideoCoreInternal);async function initRbupVideo(e,t,i){log$8.info("calling initRbupVideo with args",i),await customElements.whenDefined(t);let n=document.querySelector(`#${e}`);if(!n)throw Error(`html element with id ${e} not found`);let r=createControllablePromise(),o={...i,"internal-on-api-available":r};return deleteUndefinedValues(o),Object.assign(n,o),removeNoLongerExistingAttributes(n,o,log$8),r}function useIosVrFullscreen(){let{playerState:{isFullscreenMode:e,isVRVideo:t}}=usePlayerContext(),i=F$4(()=>isIosDevice(),[]),n=F$4(()=>t&&e,[t,e]);return i&&n}function isMultipleAdShown(e,t){return 0!==e&&0!==t&&(1!==e||1!==t)}let AdControlsTimeDisplay=()=>{let{playerState:{playerCoordinator:e}}=usePlayerContext(),t=T$4(e=>{if("adTimeChanged"===e.type){let t=e.adPosition,i=e.totalAds,r=Math.round(e.duration-e.playbackPosition),o=translate("ad-endsin",{sec:`${r}`});if(isMultipleAdShown(t,i)){let e=translate("ad-from-ads",{adPosition:`${t}`,totalAds:`${i}`});n(`${o} \xb7 ${e}`)}else n(o)}},[]),[i,n]=h$3();return p$6(()=>(null==e||e.addEventListener(t),()=>{null==e||e.removeEventListener(t)}),[e,t]),o$i("div",{"data-rbup-time-display":!0,class:"ad-controls-time-display",children:o$i(CosmosText,{appearance:"light",size:"xx-small@small x-small@medium",children:i})})},AdControls=()=>{let{playerState:{durationInSec:e}}=usePlayerContext(),[t,i]=h$3(""),n=T$4(e=>{i(e)},[]);return o$i(k$5,{children:o$i("div",{"data-rbup-ad-controls":!0,class:"ad-controls",children:isFinite(e)&&o$i("div",{"data-rbup-ad-controls-ui":!0,class:"ad-controls__ui",children:[o$i(ThemedVideoPlayerTooltip,{class:"ad-controls__tooltip",content:t,children:o$i("div",{class:"ad-controls__buttons",children:o$i(PlayPauseButton,{onTooltipUpdate:n})})}),o$i("div",{class:"ad-controls__buttons",children:o$i(VolumeControls,{})}),o$i(AdControlsTimeDisplay,{})]})})})};function isEndState(e){return"ENDED"===e}function isErrorState(e){return"ERROR"===e}function isStartState(e,t,i){let n=e.getPlayerConfiguration().autoplay,r=e.isPhasingEnabled(),o=(i&&isPlayablePhase(i.phase))??!0;return"IDLE"===t&&!n&&(!r||o)}function isStopped(e,t,i){var n;let r=(i&&isPlayablePhase(i.phase))??!0;return"IDLE"===t&&!(null!=(n=e.getPlayerData())&&n.isPlayerLoaded())&&r}function isTransitioning(e){return"TRANSITIONING"===e}function getState(e,t,i){return t?isErrorState(e)?"ERROR":isStartState(t,e,i)||isStopped(t,e,i)?"START":isTransitioning(e)?"TRANSITIONING":isEndState(e)?"END":"HIDDEN":"HIDDEN"}function useStartEndViewState(e){let t=(null==e?void 0:e.getPlayerStatus())??"ER
129ROR",i=null==e?void 0:e.getLiveStatus();return F$4(()=>getState(t,e,i),[i,e,t])}let EndslateViewItem=({title:e,imageUrl:t,targetUrl:i,previewImageUrl:n})=>o$i("a",{"data-rbup-endslate-item":!0,class:"endslate-view-item",href:i,target:"_self",children:[o$i(CosmosMediaPreview,{class:"endslate-view-item__image",image:t,imagePreview:n,"data-rbup-endslate-item-image":!0,imageAlt:""}),o$i(CosmosText,{class:"endslate-view-item__title",weight:"bold",appearance:"light",size:"xx-small@small x-small@medium medium@large",clamp:2,children:e})]}),EndslateView=({relatedVideos:e,config:t,playOrReplayCallback:i})=>{let{playerState:{playerCoordinator:n}}=usePlayerContext(),r=useStartEndViewState(n),o=e&&"END"===r,a=(null==t?void 0:t.title)??translate("endslate-title"),s=()=>{null==n||n.restartPlaybackFromBeginning(),null==n||n.play(),i()};return o$i(k$5,{children:o&&o$i("div",{"data-rbup-endslate":!0,children:o$i("div",{class:"endslate-view",children:o$i("div",{class:"endslate-view__grid",children:[o$i(CosmosTitle,{class:"endslate-view__headline","data-rbup-endslate-title":!0,appearance:"light",size:"xx-small@small x-small@medium small@large",weight:"bold",children:a}),o$i("div",{class:"endslate-view__items",children:e.map((e,t)=>o$i(EndslateViewItem,{...e},t))}),o$i(CosmosButton,{class:"endslate-view__replay-button","data-rbup-endslate-replay":!0,kind:"secondary",size:"small",shape:"pill",appearance:"light",onClick:s,children:[o$i(CosmosIconReplay,{class:"endslate-view__replay-icon",slot:"icon"}),translate("endslate-replay")]})]})})})})},InitialLoadingSpinner=()=>o$i("div",{class:"initial-loading-spinner","data-rbup-initial-loading-spinner":!0,children:o$i("div",{class:"initial-loading-spinner__container",children:o$i(CosmosSpinner,{"data-rbup-buffer":!0,appearance:"light"})})}),selectedLocales=window.navigator.languages,longDateFormat=Intl.DateTimeFormat(selectedLocales,{dateStyle:"long"}),shortDateFormat=Intl.DateTimeFormat(selectedLocales,{weekday:"short",day:"2-digit",month:"short",year:"numeric"}),timeZonedTimeFormat=Intl.DateTimeFormat(selectedLocales,{hour:"numeric",minute:"numeric",timeZoneName:"short"});function getStreamState(e,t){let i;switch(null==t?void 0:t.phase){case"canceled":i="CANCELED";break;case"live":i="STREAMING";break;case"trim":i="TRIMMING";break;case"unconfirmed":i="UNCONFIRMED";break;case"pre":i="PRE";break;case"post":case void 0:i="NOT_LIVE_STREAM"}return i}function extractPosterImageTag(e){if(!e)return;if(Array.isArray(e))return e.find(e=>extractPosterImageTag(e));let t=e;if(t&&"object"==typeof t&&"type"in t)return"img"===t.type||"picture"===t.type?t:extractPosterImageTag(t.props.children)}function getCountdownString(e,t=new Date){if(!e)return;let i=new Date(e).getTime()-t.getTime(),n=Math.floor(i/864e5),r=Math.floor(i/36e5%24),o=Math.floor(i/1e3/60%60),a=Math.floor(i/1e3%60);return{days:n<0?"00":addLeadingZero(n),hours:r<0?"00":addLeadingZero(r),minutes:o<0?"00":addLeadingZero(o),seconds:a<0?"00":addLeadingZero(a)}}let LiveStreamCountdown=({nowDate:e,startTime:t})=>{let i=_$3(0),[n,r]=h$3(getCountdownString(t));return p$6(()=>(i.current=window.setInterval(()=>{t&&r(getCountdownString(t,e))},1e3),()=>{window.clearInterval(i.current)}),[e,t]),o$i("div",{class:"live-stream-countdown",children:[o$i("div",{class:"live-stream-countdown__segment",children:[o$i("div",{class:"live-stream-countdown__numbers",children:[o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==n?void 0:n.days[0]})}),o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==n?void 0:n.days[1]})})]}),o$i(CosmosText,{appearance:"light",kind:"subtle",size:"x-small",children:translate("liveStream-days")})]}),o$i("div",{class:"live-stream-countdown__segment",children:[o$i("div",{class:"live-stream-countdown__numbers",children:[o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==n?void 0:n.hours[0]})}),o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==n?void 0:n.hours[1]})})]}),o$i(CosmosText,{appearance:"light",kind:"subtle",size:"x-small",children:translate("liveStream-hours")})]}),o$i("div",{class:"live-stream-countdown__segment",children:[o$i("div",{class:"live-stream-countdown__numbers",children:[o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==n?void 0:n.minutes[0]})}),o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==n?void 0:n.minutes[1]})})]}),o$i(CosmosText,{appearance:"light",kind:"subtle",size:"x-small",children:translate("liveStream-minutes")})]}),o$i("div",{class:"live-stream-countdown__segment",children:[o$i("div",{class:"live-stream-countdown__numbers",children:[o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==n?void 0:n.seconds[0]})}),o$i("div",{class:"live-stream-countdown__number",children:o$i(CosmosText,{size:"medium",weight:"bold",children:null==n?void 0:n.seconds[1]})})]}),o$i(CosmosText,{appearance:"light",kind:"subtle",size:"x-small",children:translate("liveStream-seconds")})]})]})};function calculateStateFromStreamState(e){return{renderComponent:"NOT_LIVE_STREAM"!==e&&"STREAMING"!==e,isCanceled:"CANCELED"===e,isPre:"PRE"===e,isTrimming:"TRIMMING"===e,isUnconfirmed:"UNCONFIRMED"===e}}let InfoDisplay=({streamState:e})=>{let{isCanceled:t,isTrimming:i,isUnconfirmed:n}=calculateStateFromStreamState(e),r=e.toLocaleLowerCase(),o=`liveStream-${r}`,a={[`data-rbup-live-stream-info-${r}-badge`]:!0,class:"live-stream-info__badge",appearance:"light",size:"x-small",weight:"bold"};return o$i(k$5,{children:[t&&o$i(CosmosText,{...a,children:[o$i(CosmosIconNoData,{class:"live-stream-info__icon"}),o$i("span",{children:translate(o)})]}),i&&o$i(CosmosText,{...a,children:[o$i(CosmosIconClock,{class:"live-stream-info__icon"}),o$i("span",{children:translate(o)})]}),n&&o$i(CosmosText,{...a,children:[o$i(CosmosIconEventDetails,{class:"live-stream-info__icon"}),o$i("span",{children:translate(o)})]})]})},PreOrCanceledOrTrimmingDisplay=({streamState:e,startTime:t})=>{let{isCanceled:i,isPre:n,isTrimming:r}=calculateStateFromStreamState(e);return o$i(k$5,{children:[(n||i)&&o$i(CosmosText,{class:`live-stream-info__date${i?" live-stream-info__date--canceled":""}`,appearance:"light",size:"x-small",children:t&&o$i(k$5,{children:[o$i("span",{"data-rbup-canceled-date":!0,children:longDateFormat.format(new Date(t))}),o$i("span",{class:"live-stream-info__separator",children:"\xb7"}),o$i("span",{"data-rbup-canceled-time":!0,children:timeZonedTimeFormat.format(new Date(t))})]})}),r&&o$i(CosmosText,{class:"live-stream-info__date live-stream-info__date--trimming",appearance:"light",size:"x-small",children:t&&o$i(k$5,{children:[o$i(CosmosIconLiveBroadcast,{class:"live-stream-info__icon"}),o$i("span",{children:[translate("liveStream-airedOn",{date:shortDateFormat.format(new Date(t))})," "]})]})})]})},LiveStreamInfoPoster=({userPosterImage:e,posterSrcSet:t,playerWidth:i,imgAlt:n})=>o$i(k$5,{children:e?o$i("div",{class:"live-stream-info__custom-poster-container",children:e}):o$i("div",{class:"live-stream-info__poster-container",children:o$i(CosmosImage,{"data-rbup-live-stream-info-poster":!0,fit:"cover",imagePreview:null==t?void 0:t.preview,srcset:null==t?void 0:t.srcSet,image:null==t?void 0:t.src,sizes:`${i}px`,alt:n})})}),LiveStreamInfo=({playerWidth:e,aspectRatio:t,customPosterImage:i})=>{let{playerState:{liveStatus:n,mediaMetaData:r,playbackMode:o,posterImage:a,playerConfiguration:s}}=usePlayerContext(),l=getStreamState(o,n),{renderComponent:c,isPre:u}=calculateStateFromStreamState(l),d=(null==n?void 0:n.startTime)??resolveCurrentSunrise(r),h=d&&100>getDaysFromNow(d),p=u&&h,f=F$4(()=>a?calculatePosterSrcSet(a,t):void 0,[t,a]),m=(null==r?void 0:r.title)??(null==s?void 0:s.title),g=F$4(()=>extractPosterImageTag(i),[i]);return o$i(k$5,{children:c&&o$i("div",{"data-rbup-live-stream-info":!0,class:"live-stream-info",children:[o$i(LiveStreamInfoPoster,{userPosterImage:g,posterSrcSet:f,playerWidth:e,imgAlt:m}),o$i("div",{class:"live-stream-info__background"}),o$i("div",{class:"live-stream-info__info",children:[(null==r?void 0:r.eventLogoUrl)&&o$i("img",{"data-rbup-live-stream-info-event-logo":!0,src:r.eventLogoUrl,class:"live-stream-info__event-logo",alt:""}),p&&o$i("div",{"data-rbup-live-stream-info-countdown":!0,class:"live-stream-info__countdown",children:o$i(LiveStreamCountdown,{startTime:d})}),o$i(InfoDisplay,{streamState:l}),o$i(CosmosText,{"data-rbup-live-stream-info-title":!0,appearance:"light",class:"live-stream-info__title",size:"large x-large@medium",weight:"bold",children:null==r?void 0:r.title}),o$i(PreOrCanceledOrTrimmingDisplay,{streamState:l,startTime:null==n?void 0:n.startTime}),o$i(CosmosText,{"data-rbup-live-stream-info-description":!0,class:"live-stream-info__description",appearance:"light",size:"x-small",kind:"subtle",children:null==r?void 0:r.description}),(null==r?void 0:r.eventPageUrl)&&o$i(CosmosText,{class:"live-stream-info__event-link",size:"x-small",weight:"bold",children:o$i(CosmosButton,{"data-rbup-live-stream-info-event-page-link":!0,appearance:"light",href:r.eventPageUrl,kind:"tertiary",shape:"pill",size:"small",target:"_blank",children:[o$i(CosmosIconChevronLeft,{slot:"icon",class:"live-stream-info__icon"}),translate("liveStream-backToEvent")]})})]})]})})};function getDaysFromNow(e){let t=new Date(e);return Math.floor(Math.abs(new Date().getTime()-t.getTime())/1e3/86400)}
129function resolveCurrentSunrise(e){if(e)return e.currentSunrise}function timeDifference(e){return Date.parse(e)-Date.now()}function getTimeRemaining(e){let t=getFormattedTimeString(timeDifference(e)/1e3).split(":"),i=3===t.length,n=i?t[0]:"00",r=i?t[1]:t[0],o=i?t[2]:t[1];return`${n} h ${r} m ${o} s`}function getMonthString(e){return["january","february","march","april","may","june","july","august","september","october","november","december"][e]}let TWO_DAYS_IN_MS=1728e5,MultiChannelSwitcherViewLiveAtLabel=({startTime:e})=>{let[t]=h$3(()=>timeDifference(e)<TWO_DAYS_IN_MS&&timeDifference(e)>=0),i=_$3(0),[n,r]=h$3("...");return p$6(()=>{let n=new Date(e);if(t)i.current=window.setInterval(()=>{r(`${translate("multiChannel-label-liveIn")} ${getTimeRemaining(e)}`)},1e3);else{window.clearInterval(i.current);let e=`global-month-short-${getMonthString(n.getMonth())}`;r(`${n.getDate()} ${translate(e)} ${n.getFullYear()}`)}return()=>{window.clearInterval(i.current)}},[t,e]),o$i(CosmosText,{class:"multi-channel-switcher-view-live-at__label",size:"x-small",children:n})};function getStatusLabel(e){switch(e){case"now":return translate("multiChannel-label-nowWatching");case"live":return translate("multiChannel-label-live");case"post":return translate("multiChannel-label-replay");case"trim":return translate("multiChannel-label-trim");default:return}}function calculateClassName(e){return["multi-channel-switcher-view-item",!isMobileDevice()&&"multi-channel-switcher-view-item__desktop",e&&"multi-channel-switcher-view-item--active"].filter(Boolean).join(" ")}let MultiChannelSwitcherViewItem=({isCurrentlyPlaying:e=!1,phase:t,title:i,startTime:n,videoId:r,onSelectNewAsset:o})=>{let a=("post"===t||"live"===t)&&!e,s=T$4(e=>{a&&(isLeftClick(e)||isTouch(e))&&o(r)},[a,o,r]);return o$i("button",{class:calculateClassName(a),onPointerUp:s,children:o$i("div",{class:"multi-channel-switcher-view-item__container",children:[o$i("div",{class:"multi-channel-switcher-view-item__text",children:[o$i(CosmosText,{class:"multi-channel-switcher-view-item__title",appearance:"light",clamp:1,weight:"bold",size:"small",children:i}),o$i("div",{class:"multi-channel-switcher-view-item__status",children:[e&&o$i("div",{children:o$i(CosmosIconPlay,{class:"multi-channel-switcher-view-item__status-icon"})}),o$i(CosmosText,{class:"multi-channel-switcher-view-item__status-label",appearance:"light",clamp:1,size:"x-small",children:["pre"===t&&n&&o$i(MultiChannelSwitcherViewLiveAtLabel,{startTime:n}),"pre"!==t&&getStatusLabel(e?"now":t)]})]})]}),!e&&o$i("div",{class:"multi-channel-switcher-view-item__icon",children:o$i("div",{children:o$i(CosmosIconPlay,{class:"multi-channel-switcher-view-item__icon-play"})})})]})})};function onScroll(e,t,i){let n={behavior:"smooth"},r=e.scrollWidth/t-16;"left"===i&&(n.left=e.scrollLeft-r),"right"===i&&(n.left=e.scrollLeft+r),e.scrollTo(n)}function showHideScrollButtonsWhenNeeded(e){let t={showLeftButton:!1,showRightButton:!1};return e&&(e.scrollLeft>0&&(t.showLeftButton=!0),Math.round(e.scrollLeft+e.offsetWidth)<e.scrollWidth&&(t.showRightButton=!0)),t}function addCurrentToOtherLiveVideos(e,t){return null!=e&&e.otherLiveVideos&&t?[{phase:e.phase,startTime:e.startTime,title:t.title,videoId:t.videoId}].concat(e.otherLiveVideos):[]}let MultiChannelSwitcherView=({onCloseView:e,onPlayNewAsset:t})=>{let{playerState:{liveStatus:i,mediaMetaData:n}}=usePlayerContext(),r=_$3(null),[o,a]=h$3(),s=F$4(()=>addCurrentToOtherLiveVideos(i,n),[i,n]),l=T$4(t=>{t.stopPropagation(),e()},[e]);p$6(()=>{a(showHideScrollButtonsWhenNeeded(r.current))},[]);let c=T$4((e,t)=>{r.current&&(e.stopPropagation(),onScroll(r.current,s.length,t),a(showHideScrollButtonsWhenNeeded(r.current)))},[s.length]),u=T$4(i=>{t(i),e()},[e,t]);useResize(()=>a(showHideScrollButtonsWhenNeeded(r.current)),r);let[d]=h$3(!isMobileDevice()),h=d?"multi-channel-switcher-view__item-list-items":"multi-channel-switcher-view__item-list-items--mobile",p=["multi-channel-switcher-view__item-list",!d&&"multi-channel-switcher-view__item-list--mobile"].filter(Boolean).join(" "),f=["multi-channel-switcher-view__item-list-headline",d&&"multi-channel-switcher-view__item-list-headline--desktop"].filter(
129Boolean).join(" ");return o$i("div",{"data-rbup-multi-channel-switcher-view":!0,class:"multi-channel-switcher-view",children:[o$i("div",{class:"multi-channel-switcher-view__close-button-container",children:o$i("div",{class:"multi-channel-switcher-view__close-button",children:[o$i(ControlsButton,{dataAttribute:"data-rbup-close-button",Icon:o$i(CosmosIconClose,{"data-rbup-icon-close":!0,class:"multi-channel-switcher-view__close-icon",slot:"icon"}),appearance:"light",shape:"circle",kind:"tertiary",onPointerUp:l}),o$i(CosmosText,{class:"multi-channel-switcher-view__close-label",appearance:"light",size:"x-small",weight:"bold",children:translate("button-close")})]})}),o$i("div",{class:"multi-channel-switcher-view__item-list-container",children:[o$i("div",{class:p,children:[o$i(CosmosTitle,{class:f,appearance:"light",size:"x-small",children:translate("multiChannel-schedule")}),o$i("div",{class:h,onScroll:()=>{a(showHideScrollButtonsWhenNeeded(r.current))},ref:r,children:s.map((e,t)=>o$i(MultiChannelSwitcherViewItem,{isCurrentlyPlaying:0===t,phase:e.phase,title:e.title??"",videoId:e.videoId??"",startTime:e.startTime,onSelectNewAsset:u},t))})]}),!d&&o$i("div",{class:"multi-channel-switcher-view__fade multi-channel-switcher-view__fade--mobile"}),d&&o$i("div",{class:"multi-channel-switcher-view__navi","data-rbup-multi-channel-switcher-view-navi":!0,children:[o$i("div",{class:"multi-channel-switcher-view__fade multi-channel-switcher-view__fade--desktop"}),(null==o?void 0:o.showLeftButton)&&o$i("div",{class:"multi-channel-switcher-view__navi-button multi-channel-switcher-view__navi-button--left",children:o$i(ControlsButton,{dataAttribute:"rbup-multi-channel-switcher-left",Icon:o$i(CosmosIconChevronLeft,{"data-rbup-icon-arrow-left":!0,class:"multi-channel-switcher-view__navi-icon",slot:"icon"}),kind:"primary",shape:"square",onPointerUp:e=>c(e,"left")})}),(null==o?void 0:o.showRightButton)&&o$i("div",{class:"multi-channel-switcher-view__navi-button multi-channel-switcher-view__navi-button--right",children:o$i(ControlsButton,{dataAttribute:"rbup-multi-channel-switcher-right",Icon:o$i(CosmosIconChevronRight,{"data-rbup-icon-arrow-right":!0,class:"multi-channel-switcher-view__navi-icon",slot:"icon"}),kind:"primary",shape:"square",onPointerUp:e=>c(e,"right")})})]})]})]})},BASE_CLASS="product-placement",PRODUCT_PLACEMENT_RENDER_TIME_IN_SECONDS=3,defaultProductPlacementDefinition={ProductPlacementComponent:CosmosIconProductPlacement,displayTimeInSec:PRODUCT_PLACEMENT_RENDER_TIME_IN_SECONDS},RbupVideoProductPlacement=({productPlacementDefinition:e=defaultProductPlacementDefinition,onAnimationEnd:t})=>{let{ProductPlacementComponent:i,displayTimeInSec:n}=e,[r,o]=h$3(!0);return p$6(()=>{let e=window.setTimeout(()=>{o(!1)},1e3*n);return()=>{window.clearTimeout(e)}},[n]),o$i("div",{id:"product-placement","data-rbup-product-placement":!0,class:F$4(()=>getProductPlacementClasses(r),[r]),onAnimationEnd:t,children:o$i(i,{})})};function getProductPlacementClasses(e){return`${BASE_CLASS} ${e?"product-placement--fade-in":"product-placement--fade-out"}`}function usePressedKeyGroup(e,t){let[i,n]=h$3(!1),[r,o]=h$3([]),a=T$4(e=>{let i=e.key;!r.includes(i)&&t.includes(i)&&r.push(e.key)},[t,r]),s=T$4(()=>{n(r.join("")===t.join(""))},[t,r]),l=T$4(e=>{s();let t=e.key;o(r.filter(e=>e!==t))},[s,r]);return p$6(()=>{let t=e.current;if(!t)throw Error("No element provided");return t.addEventListener("keydown",a),t.addEventListener("keyup",l),()=>{t.removeEventListener("keydown",a),t.removeEventListener("keyup",l)}},[e,a,l]),i}let OverrideTarget={AUDIO:"Audio",SUBTITLES:"Subtitles",TRANSLATIONS:"Translations"};function languageOverrideInfo(e){if(!e)return;let t=getBrowserLanguage(),i=e.getStorageServiceAllStoredValues(),n=e.getPlayerConfiguration();return{audioOverride:calculateAudioOverride(n,e,t,i),subtitleOverride:calculateSubtitlesOverride(n,i),translationsOverride:calculateTranslationsOverride(n,t),overrideReference:calculateFormattedOverrideReferenceString(n,i)}}function calculateFormattedOverrideReferenceString(e,t){let i="",n="";return null!=t&&t.audioLanguage&&(i=`${i}${OverrideTarget.AUDIO}: ${t.audioLanguage} `),null!=t&&t.subtitleLanguage&&(i=`${i}${OverrideTarget.SUBTITLES}: ${t.subtitleLanguage} `),e.overrideAudioLanguage&&(n=`${n}${OverrideTarget.AUDIO}: ${e.overrideAudioLanguage} `),e.overrideSubtitleLanguage&&(n=`${n}${OverrideTarget.SUBTITLES}: ${e.overrideSubtitleLanguage} `),e.overrideTranslationLanguage&&(n=`${n}${OverrideTarget.TRANSLATIONS}: ${e.overrideTranslationLanguage} `),{storedRef:""!==i?i:void 0,configRef:""!==n?n:void 0}}function getCurrentAudioIso(e,t){let i=t??"";return e?e[i]:i}function calculateAudioOverride(e,t,i,n){var r,o;let a=getCurrentAudioIso(null==(r=t.getMediaMetaData())?void 0:r.availableAudioLanguages,null==(o=t.getSelectedAudioTrack())?void 0:o.lang),s=i===a&&(null==n?void 0:n.audioLanguage)!==a&&e.overrideAudioLanguage!==a?{source:"Browser",iso:i}:void 0,l=(null==n?void 0:n.audioLanguage)===a&&e.overrideAudioLanguage!==a?{source:"Storage",iso:null==n?void 0:n.audioLanguage}
129:void 0,c=e.overrideAudioLanguage?{source:"Config",iso:e.overrideAudioLanguage}:void 0;return s??l??c}function calculateSubtitlesOverride(e,t){return e.overrideSubtitleLanguage?{source:"Config",iso:e.overrideSubtitleLanguage}:null!=t&&t.subtitleLanguage?{source:"Storage",iso:t.subtitleLanguage}:void 0}function calculateTranslationsOverride(e,t){return e.overrideTranslationLanguage?{source:"Config",iso:e.overrideTranslationLanguage}:{source:"Browser",iso:t}}let CopyableListElement=({body:e})=>{let[t,i]=h$3(!1),n=T$4(async()=>{"string"==typeof e&&(await navigator.clipboard.writeText(e),i(!0),setTimeout(()=>{i(!1)},5e3))},[e]),r=o$i("div",{class:"nerd-mode__list-item-button",children:o$i(CosmosTooltip,{content:translate("nerdMode-copyId"),placement:"above",spacing:"tight",unreachable:!0,follow:"cursor",children:o$i(CosmosButton,{kind:"cover-up",size:"small",shape:"pill",onClick:n,children:e})})}),o=o$i(CosmosText,{size:"small",children:translate("nerdMode-idCopied")});return t?o:r},ListItem=({label:e,crepoOrAssetId:t})=>o$i(k$5,{children:[e&&o$i("li",{class:"nerd-mode__list-item",children:e&&o$i(CosmosText,{size:"small",children:e})}),t&&o$i("li",{class:"nerd-mode__list-item",children:t&&CopyableListElement({body:t})})]}),PropertyList=({crepoId:e,subtitleOverride:t,translationsOverride:i,hasOverrideReference:n})=>o$i("ul",{class:"nerd-mode__label-list","data-rbup-nerd-mode-label-list":!0,children:[o$i(ListItem,{label:translate("nerdMode-assetId")}),e&&o$i(ListItem,{label:translate("nerdMode-crepoId")}),o$i(ListItem,{label:translate("nerdMode-playerVersion")}),o$i(ListItem,{label:translate("nerdMode-techVersion")}),o$i(ListItem,{label:translate("nerdMode-geolocation")}),o$i(ListItem,{label:translate("nerdMode-rendition")}),o$i(ListItem,{label:translate("nerdMode-audioLanguageOverride")}),t&&o$i(ListItem,{label:translate("nerdMode-subtitlesLanguageOverride")}),i&&o$i(ListItem,{label:translate("nerdMode-translationsLanguageOverride")}),n&&o$i(ListItem,{label:translate("nerdMode-overrideReference")})]}),ValueList=({elementRef:e,elementStyle:t,assetId:i,crepoId:n,subtitleOverride:r,playerCoordinator:o,userCountry:a,audioOverride:s,translationsOverride:l,hasOverrideReference:c,overrideReference:u})=>o$i("ul",{class:"nerd-mode__data-list","data-rbup-nerd-mode-data-list":!0,ref:e,style:t,children:[o$i(ListItem,{crepoOrAssetId:i}),n&&o$i(ListItem,{crepoOrAssetId:n}),o$i(ListItem,{label:CORE_VERSION}),o$i(ListItem,{label:(null==o?void 0:o.getTechVersion())??translate("nerdMode-unknownValue")}),o$i(ListItem,{label:a}),o$i(ListItem,{label:`${null==o?void 0:o.getVideoQuality().height}p`}),o$i(ListItem,{label:s??"N/A"}),o$i(ListItem,{label:r}),o$i(ListItem,{label:l}),c&&(null==u?void 0:u.configRef)&&o$i(ListItem,{label:`${translate("nerdMode-playerConfiguration")}: ${u.configRef}`}),c&&(null==u?void 0:u.storedRef)&&o$i(ListItem,{label:`${translate("nerdMode-localeStorage")}: ${u.storedRef}`})]});function getLanguageOverrideInfo(e){return null!=e&&e.iso?`${e.iso} (${e.source})`:void 0}function calculateAssetId(e,t){return(null==e?void 0:e.assetId)??(null==e?void 0:e.videoId)??t}let NerdMode=()=>{let{playerState:{mediaMetaData:e,playerCoordinator:t,playerConfiguration:i}}=usePlayerContext(),n=_$3(null),[r,o]=h$3(""),a=calculateAssetId(e,null==i?void 0:i.assetId),s=null!=e&&e.assetId?e.videoId:void 0,l=F$4(()=>languageOverrideInfo(t),[t]),c=getLanguageOverrideInfo(null==l?void 0:l.audioOverride),u=getLanguageOverrideInfo(null==l?void 0:l.subt
129itleOverride),d=getLanguageOverrideInfo(null==l?void 0:l.translationsOverride),h=null==l?void 0:l.overrideReference,p=(null==h?void 0:h.storedRef)??(null==h?void 0:h.configRef);return p$6(()=>{n.current&&o(`width: ${n.current.clientWidth+1}px`)},[o]),o$i("section",{class:"nerd-mode","data-rbup-nerd-mode":!0,children:[o$i("header",{class:"nerd-mode__header","data-rbup-nerd-mode-header":!0,children:[o$i(CosmosIconPreview,{class:"nerd-mode__header-icon","data-rbup-nerd-mode-header-icon":!0}),o$i(CosmosTitle,{"data-rbup-nerd-mode-header-title":!0,weight:"bold",size:"x-small",children:"Nerd Mode"})]}),o$i("hr",{class:"nerd-mode__separator-line"}),o$i("div",{class:"nerd-mode__grid",children:[o$i(PropertyList,{crepoId:s,subtitleOverride:u,translationsOverride:d,hasOverrideReference:p}),o$i(ValueList,{elementRef:n,elementStyle:r,assetId:a,crepoId:s,playerCoordinator:t,userCountry:(null==e?void 0:e.userCountry)??translate("nerdMode-unknownValue"),audioOverride:c,subtitleOverride:u,translationsOverride:d,hasOverrideReference:p,overrideReference:h})]})]})},MAIN_CLASS_NAME="themed-player-root",InnerThemedPlayer=k$3((e,t)=>{let{adService:i,config:n,CustomToastComponent:r,dataLoader:o,id:a,internalOnApiAvailable:s,liveStatusDataLoader:l,styles:c,ThemeComponent:u,aspectRatio:d,globalKeyboardNavigation:h,CenteredToastComponent:p,WrapperComponent:f,AdditionalButtonComponent:m}=e,[g,v]=h$3(),{init:y,playerState:{playerCoordinator:b,playerStatus:S,isVRVideo:_}}=usePlayerContext(),E=validateGivenAspectRatio(d),T=_$3(null),[w,A]=h$3(n);p$6(()=>{A(n)},[n]);let P=F$4(()=>f??(({children:e})=>o$i(k$5,{children:e})),[f]),I=usePlayerWidth(T),C=useContainerQuery(T,BREAKPOINTS),M={smallOrBigger:cssClassesContainsBreakpoint(C,Breakpoint.small),mediumOrBigger:cssClassesContainsBreakpoint(C,Breakpoint.medium),largeOrBigger:cssClassesContainsBreakpoint(C,Breakpoint.large)},R=getThemeCSSVariables(null==w?void 0:w.theme),k=T$4(e=>{e&&(y(e),e.fullscreenElement=T.current)},[y]),x=usePressedKeyGroup(T,[KEYCODE_R,KEYCODE_B]);p$6(()=>{x&&v(e=>!e)},[x]);let O=T$4(e=>{A({...n,assetId:e})},[n]),D=getMaxWidthForAspectRatio(E),L=`${MAIN_CLASS_NAME}${_?" vr-content":""}`,N=T$4(()=>{var e;null==(e=T.current)||e.focus()},[]),U=calcValueOfAspectRatio(E);return o$i(k$5,{children:[o$i("style",{children:c}),o$i("div",{"data-rbup-pause-themed-player":!0,id:a,class:`${L} ${C}`,style:{...R,"--max-width":D,"--aspect-ratio":U},ref:T,tabIndex:0,onKeyDown:e=>{handleThemedPlayerKeyDown(e,T,b)},"aria-label":"Video Player",role:"region",children:w&&o$i(P,{resolvedAspectRatio:U,sizeBreakpoints:M,children:[o$i(RbupVideoCore,{ref:t,adService:i,config:w,dataLoader:o,liveStatusDataLoader:l,onCoordinatorAvailable:k,internalOnApiAvailable:s,aspectRatio:E}),b&&o$i(u,{...e,config:w,sizeBreakpoints:M,playerWidth:I,playerCoordinator:b,playerStatus:S,onPlayNewAsset:O,CustomToastComponent:r,aspectRatio:E,globalKeyboardNavigation:h,CenteredToastComponent:p,playOrReplayCallback:N,AdditionalButtonComponent:m}),g&&o$i(NerdMode,{}),o$i(ErrorDisplay,{})]})})]})}),ThemedPlayer=k$3((e,t)=>o$i(PlayerStateContextProvider,{children:o$i(UserInteractionContextProvider,{children:o$i(ControlsVisibilityContextProvider,{children:o$i(InnerThemedPlayer,{ref:t,...e})})})})),StartAndEndViewButtons=({currentState:e,showAtEnd:t,tooltipText:i,replayButtonLabel:n,playButtonLabel:r})=>o$i("div",{class:"start-and-end-view__buttons",children:o$i(ThemedVideoPlayerTooltip,{content:i,offset:30,children:["END"===e&&t&&o$i(CosmosButton,{"data-rbup-replay-button":!0,buttonAriaLabel:n,shape:"circle",class:"start-and-end-view__button",children:o$i(CosmosIconReplay,{"data-rbup-replay-icon":!0,class:"start-and-end-view__icon",slot:"icon"})}),"START"===e&&o$i(CosmosButton,{"data-rbup-start-button":!0,buttonAriaLabel:r,shape:"circle",class:"start-and-end-view__button",children:o$i(CosmosIconPlay,{class:"start-and-end-view__icon",slot:"icon"})})]})}),log$7=loglevelExports.getLogger("StartAndEndView");function shouldRenderView(e,t){return"HIDDEN"!==e&&"TRANSITIONING"!==e||t}function shouldShowPoster(e,t){return"START"===e||"END"===e||"ERROR"===e||t}let PosterImage=({userPosterImage:e,posterSrcSet:t,playerWidth:i,imgAlt:n})=>
129e?o$i("div",{class:"start-and-end-view__bg-custom-image-container",children:e}):o$i("div",{className:"start-and-end-view__bg-image-container",children:o$i(CosmosImage,{"data-rbup-poster":!0,fit:"cover",imagePreview:null==t?void 0:t.preview,srcset:null==t?void 0:t.srcSet,image:null==t?void 0:t.src,sizes:`${i}px`,alt:n})}),StartAndEndView=({playerWidth:e,customPosterImage:t,aspectRatio:i,showAtEnd:n=!0,playOrReplayCallback:r})=>{let{playerState:{playerCoordinator:o,posterImage:a,mediaMetaData:s,playerConfiguration:l}}=usePlayerContext(),c=useStartEndViewState(o),u="TRANSITIONING"===c&&((null==o?void 0:o.isTransitioningFromEnded())??!1),d=()=>{"START"===c?(null==o||o.play().catch(e=>log$7.error("failed to start playback",e)),r()):"END"===c&&n&&(null==o||o.restartPlaybackFromBeginning(),null==o||o.play().catch(e=>log$7.error("failed to start playback",e)),r())},h=e=>{let t="keydown"===e.type&&e.key===KEYCODE_ENTER,i="keyup"===e.type&&e.key===KEYCODE_SPACE;(t||i)&&d()},p=F$4(()=>a?calculatePosterSrcSet(a,i):void 0,[i,a]),f=translate("tooltip-play"),m=translate("tooltip-replay"),g=(null==s?void 0:s.title)??(null==l?void 0:l.title),v=F$4(()=>extractPosterImageTag(t),[t]),y="END"===c?m:f;return(p$6(()=>{"END"===c&&(isIphoneDevice()&&(null==o||o.setFullscreen(!1)),null!=o&&o.isInPictureInPictureMode()&&o.togglePictureInPicture())},[c,o]),shouldRenderView(c,u))?o$i("div",{"data-rbup-start-end":!0,class:"start-and-end-view",onKeyDown:h,onPointerUp:d,children:[shouldShowPoster(c,u)&&o$i(PosterImage,{userPosterImage:v,posterSrcSet:p,playerWidth:e,imgAlt:g}),"TRANSITIONING"!==c&&o$i(StartAndEndViewButtons,{currentState:c,showAtEnd:n,tooltipText:y,replayButtonLabel:m,playButtonLabel:f}),u&&o$i(InitialLoadingSpinner,{})]}):null},SubtitleContainer=({htmlStringArr:e,controlsVisibility:t})=>o$i("div",{class:`subtitles-overlay ${"fade-in"===t?"subtitles-on-top":""}`,children:o$i("div",{class:"subtitles-overlay__text-container",children:null==e?void 0:e.map((e,t)=>o$i(CosmosText,{size:"medium",appearance:"light",class:"subtitles-overlay__text-display",dir:"auto",children:o$i("span",{dangerouslySetInnerHTML:{__html:e}})},t))})}),SubtitlesOverlay=()=>{let{playerState:{playerCoordinator:e}}=usePlayerContext(),{controlsVisibility:t}=useControlsVisibilityContext(),[i,n]=h$3();return p$6(()=>{let t=e=>{switch(e.type){case"subtitleUpdate":n(e.currentSubtitleHtmls);break;case"playbackFinished":case"loaded":case"seeking":n(void 0)}};return null==e||e.addEventListener(t),()=>{null==e||e.removeEventListener(t)}},[e]),o$i(k$5,{children:i&&o$i(SubtitleContainer,{htmlStringArr:i,controlsVisibility:t})})};function useIsCenteredToastWrapperOverlapping(e,t){let[i,n]=h$3(!0);return p$6(()=>{if(e||!i)return;let r=window.setInterval(()=>{var e;let i=null==(e=t.current)?void 0:e.getRootNode(),r=null==i?void 0:i.getElementById("maturity-rating"),o=null==i?void 0:i.getElementById("product-placement"),a=null==i?void 0:i.getElementById("subtitles-available");n(!!r||!!o||!!a)},100);return()=>window.clearInterval(r)},[t,e,i]),i}let CenteredToastWrapper=({CenteredToastComponent:e,sizeBreakpoints:t,parentRef:i})=>{let n=useIsCenteredToastWrapperOverlapping(t.mediumOrBigger,i);return o$i(k$5,{children:!t.mediumOrBigger&&!n&&e&&o$i(e,{})})},styles$5=':host,:root{all:initial;--transition-timing: .3s;--g-controls-animation-fade-in: g-controls-fade-in var(--transition-timing) forwards;--g-controls-animation-fade-out: g-controls-fade-out var(--transition-timing) forwards;-webkit-tap-highlight-color:transparent}:host *,:root *{box-sizing:border-box}.g-icon{color:#fff;height:18px;width:18px}.g-icon--primary{color:var(--rbup-primary-color)}.g-screen-reader-only{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}@keyframes g-controls-fade-in{0%{pointer-events:none;opacity:0}to{pointer-events:auto;opacity:1}}@keyframes g-controls-fade-out{0%{pointer-events:auto;opacity:1}to{pointer-events:none;opacity:0}}.cornerbug{height:100%;justify-self:center;position:absolute;aspect-ratio:var(--aspect-ratio);pointer-events:none}.cornerbug__icon{position:absolute;top:4.9383%;right:2.777%;width:8.888%;max-width:180px;pointer-events:none}.cornerbug__icon:after{content:"";position:relative;display:block;width:1%;height:0;padding-bottom:41.86%}.endslate-view{align-items:center;background:linear-gradient(0deg,#000f1e66,#000f1e66);display:flex;justify-content:center;padding:0 24px;position:absolute;
129left:0;bottom:0;top:0;right:0;--cosmos-title-font-family: var(--rbup-component-font-family, $default-font-family)}.endslate-view__grid{display:grid;grid-template-areas:"title" "image" "button"}.endslate-view__headline{grid-area:title;margin-bottom:12px}.endslate-view__replay-button{grid-area:button;justify-self:center;margin-top:12px}.endslate-view__replay-icon{height:25px;width:25px}.endslate-view__items{grid-area:image;display:grid;flex:1;grid-column-gap:24px;grid-template-columns:repeat(2,1fr);grid-template-rows:auto 0}.endslate-view-item{background-color:#000f1e99;border-radius:6px;filter:drop-shadow(0 16px 16px rgba(0,15,30,.2));position:relative;height:77px;width:136px}.endslate-view-item__image{height:100%;border-radius:6px}.endslate-view-item:nth-child(3){display:none}.endslate-view-item:after{background:linear-gradient(180deg,#000f1e00,#000f1e66);border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.endslate-view-item:hover:after{background:linear-gradient(180deg,#000f1e00,#000f1e99)}.endslate-view-item__title{align-items:end;bottom:8px;display:flex;left:14px;max-width:360px;pointer-events:none;position:absolute;z-index:1}.cq-650 .endslate-view-item{height:163px;width:290px}.cq-650 .endslate-view__replay-button{margin-top:40px}.cq-1000 .endslate-view-item{height:170px;width:302px}.cq-1000 .endslate-view__items{grid-template-columns:repeat(3,1fr);grid-template-rows:1fr}.cq-1000 .endslate-view-item:nth-child(3){display:initial}.cq-1200 .endslate-view-item{height:207px;width:368px}.cq-1350 .endslate-view-item{height:225px;width:400px}.error-display{position:absolute;top:0;width:100%;height:100%;display:flex;justify-content:center;text-align:start}.error-display__description{position:absolute;background-color:#000c;border-radius:8px;display:flex;top:24px;padding:12px;
129min-width:200px;max-width:500px;min-height:80px}.cq-650 .error-display__description{min-width:400px}.error-display__icon-container{padding:0 10px 0 0}.error-display__icon{width:36px;height:36px;color:#db0a40}.error-display__text-container{flex-direction:column;display:inherit;padding:4px 0;color:#fff}.error-display__text{width:fit-content}.initial-loading-spinner{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.initial-loading-spinner__container{width:80px;height:80px}.initial-loading-spinner [data-rbup-buffer]{height:100%;width:100%}.nerd-mode{--cosmos-text-color: #FFFFFF;--cosmos-title-color: #FFFFFF;--cosmos-title-font-family: var(--rbup-component-font-family, $default-font-family);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#00162bcc;height:100%;left:0;min-width:430px;overflow:auto;padding:40px;position:absolute;top:0}.nerd-mode__header{align-items:center;display:flex;gap:16px}.nerd-mode__header-icon{color:#fff;height:30px;width:30px}.nerd-mode__separator-line{border:1px solid #DB0A40}.nerd-mode__grid{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"labels data";gap:40px}.nerd-mode__data-list,.nerd-mode__label-list{list-style:none;padding:0}.nerd-mode__data-list{grid-area:data}.nerd-mode__label-list{grid-area:labels}.nerd-mode__list-item{min-height:40px}.live-stream-countdown{display:flex;gap:12px}.live-stream-countdown__segment{align-items:center;display:flex;flex-direction:column}.live-stream-countdown__numbers{display:flex;gap:2px;margin-bottom:8px}.live-stream-countdown__number{background-color:#fff;align-items:center;border-radius:3px;display:flex;height:40px;justify-content:center;width:28px}.live-stream-info{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;top:0;width:100%}.live-stream-info__background{background-color:#00162bb3;display:flex;height:100%;position:absolute;top:0;width:100%}.live-stream-info__badge{background-color:#ffffff1a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:6px;align-items:center;display:flex;justify-content:center;margin-bottom:24px;padding:8px 16px}.live-stream-info__badge span{position:relative;top:-2px}.live-stream-info__countdown{margin-bottom:8px}.live-stream-info__canceled{padding-bottom:24px;padding-top:24px}.live-stream-info__date{margin-bottom:12px}.live-stream-info__date--canceled{text-decoration:#FFFFFF line-through}.live-stream-info__date--trimming span{position:relative;top:-2px}.live-stream-info__description{display:none;margin-bottom:24px;width:400px}.live-stream-info__event-logo{display:none;margin-bottom:24px;max-height:154px}.live-stream-info__icon{height:20px;margin-right:8px;width:20px}.live-stream-info__info{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;padding:24px;text-align:center;width:100%;height:100%;position:relative}.live-stream-info__poster-container{position:absolute;height:100%;width:100%}.live-stream-info__poster-container img{height:100%;width:100%;object-fit:cover}.live-stream-info__custom-poster-container{position:absolute;width:100%;height:100%}.live-stream-info__custom-poster-container img{width:100%;height:100%;object-fit:cover}.live-stream-info__separator{margin:0 8px}.live-stream-info__title{margin-bottom:12px}.cq-650 .live-stream-info__description{display:block}.cq-650 .live-stream-info__event-link{left:24px;position:absolute;top:24px}.cq-650 .live-stream-info__event-logo{display:block;max-width:120px}.cq-1000 .live-stream-info__countdown{margin-bottom:24px}.cq-1000 .live-stream-info__event-logo{max-width:170px}.ad-controls{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.ad-controls__back-button{pointer-events:auto}.ad-controls__ui{--cosmos-button-background-hover: rgb(0 0 0 / 0%);align-items:center;background:linear-gradient(0deg,#0000007d,#00000050 36%,#0000 85%);bottom:0;display:flex;gap:8px;left:0;padding:8px;position:absolute;width:100%}.ad-controls__buttons{align-items:center;display:flex;gap:8px;pointer-events:auto}.ad-controls__tooltip{align-items:center;display:flex}.ad-controls-time-display{align-items:center;display:flex;gap:4px;margin:0 8px;position:relative;-webkit-user-select:none;user-select:none}.themed-video-player-tooltip{--cosmos-tooltip-background: var(--rbup-tooltip-background, #00162B);--cosmos-tooltip-font-family: var(--rbup-tooltip-font-family, $default-font-family)}.multi-channel-switcher-view{background-color:#000f1ee6;position:absolute;top:0;height:100%;-webkit-user-select:none;user-select:none;width:100%}.multi-channel-switcher-view__navi{position:absolute;bottom:97px;width:100%;pointer-events:none}.multi-channel-switcher-view__navi-button{pointer-events:auto}.multi-channel-switcher-view__navi-button--left{left:-5px;position:absolute}.multi-channel-switcher-view__navi-button--left [kind=primary]{--cosmos-button-background: #FFFFFF;--cosmos-button-background-hover: #F8F8F8;--cosmos-button-border-width: 0}.multi-channel-switcher-view__navi-button--right{right:-5px;position:absolute}.multi-channel-switcher-view__navi-button--right [kind=primary]{--cosmos-button-background: #FFFFFF;--cosmos-button-background-hover: #F8F8F8;--cosmos-button-border-width: 0}.multi-channel-switcher-view__navi-icon{color:#00162b}.multi-channel-switcher-view__close-button-container{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.multi-channel-switcher-view__close-button-container div{text-align:center;margin-bottom:112px}.multi-channel-switcher-view__close-icon{width:30px;height:30px;padding-top:4px}.multi-channel-switcher-view__close-label{margin-top:16px;--cosmos-text-color: rgba(255, 255, 255, .6);display:none}.multi-channel-switcher-view__item-list-container{bottom:0;left:0;position:absolute;right:0;pointer-events:none}.multi-channel-switcher-view__item-list{position:relative;margin:32px 0}.multi-channel-switcher-view__item-list-headline{margin-left:16px;padding:4px 0}.multi-channel-switcher-view__item-list--mobile{margin:32px 0}.multi-channel-switcher-view__item-list-headline--desktop{margin-left:56px}.multi-channel-switcher-view__fade{background:linear-gradient(to right,rgba(0,15,30,.9) 75%,transparent);height:5.3125rem;left:0;position:absolute}.multi-channel-switcher-view__fade--desktop{bottom:-66px;width:56px}.multi-channel-switcher-view__fade--mobile{bottom:32px;width:16px}.multi-channel-switcher-view__item-list-items{overflow:hidden;scroll-behavior:smooth}.multi-channel-switcher-view__item-list-items--mobile{overflow:scroll}.multi-channel-switcher-view__item-list-items,.multi-channel-switcher-view__item-list-items--mobile{display:flex;column-gap:16px;pointer-events:auto}.multi-channel-switcher-view-item--active{cursor:pointer}.multi-channel-switcher-view-item--active:hover{background-color:#fff3}.multi-channel-switcher-view-item{background-color:#ffffff1a;border-radius:6px;border:none;filter:drop-shadow(0 16px 16px rgba(0,15,30,.2));padding:12px;max-width:290px;min-width:290px}.multi-channel-switcher-view-item:first-of-type{border:2px solid rgba(255,255,255,.45);margin-left:16px}.multi-channel-switcher-view-item:last-child{margin-right:16px}.multi-channel-switcher-view-item__desktop:first-of-type{margin-left:56px}.multi-channel-switcher-view-item__desktop:last-child{margin-right:56px}.multi-channel-switcher-view-item__container{display:grid;grid-template:1fr/1fr .1fr;grid-template-areas:"text icon";gap:0 16px}.multi-channel-switcher-view-item__text{grid-area:text;text-align:start;max-width:214px}.multi-channel-switcher-view-item__title{margin-bottom:12px}.multi-channel-switcher-view-item__status{display:flex;align-items:center}.multi-channel-switcher-view-item__status div{background:#db0a40;border-radius:2px;margin-right:12px}.multi-channel-switcher-view-item__status-label{color:#00f}.multi-channel-switcher-view-item__status-icon{color:#fff;padding:2px 2px 0 0}.multi-channel-switcher-view-item__icon{grid-area:icon;display:flex;align-items:center}.multi-channel-switcher-view-item__icon div{display:inherit;align-items:inherit;justify-content:center;background:#db0a40;width:36px;height:36px;border-radius:90px}.multi-channel-switcher-view-item__icon-play{color:#fff;width:25px;height:25px}.multi-channel-switcher-view-live-at__label{--cosmos-text-color: #E06600}.cq-540 .multi-channel-switcher-view__close-button [data-rbup-close-button]::part(base){height:60px;width:60px;max-width:60px;max-height:60px}.cq-540 .multi-channel-switcher-view__close-label{display:initial}.cq-650 .multi-channel-switcher-view__item-list-headline{padding:12px 0}.cq-650 .multi-channel-switcher-view-item{max-width:380px;min-width:380px}.cq-650 .multi-channel-switcher-view-item__text{max-width:305px}.cq-1000 .multi-channel-switcher-view__close-button-container div{margin-bottom:0}.active-cast-indicator{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;grid-column:1/3;opacity:.08;pointer-events:none}.active-cast-indicator .g-icon{transform:scale(5)}.cq-540 .active-cast-indicator .g-icon{transform:scale(6)}.cq-650 .active-cast-indicator .g-icon{transform:scale(8)}.cq-1000 .active-cast-indicator .g-icon{transform:scale(11)}.cq-1200 .active-cast-indicator .g-icon{transform:scale(13)}.controls__gradient{bottom:0;content:"";height:100%;left:0;pointer-events:none;position:absolute;width:100%;--gradient-color: var(--rbup-override-gradient-color, 0 22 43);background:linear-gradient(180deg,rgb(var(--gradient-color)/0%),rgb(var(--gradient-color)/.605%),rgb(var(--gradient-color)/2.49%),rgb(var(--gradient-color)/5.72%),rgb(var(--gradient-color)/10.3%),rgb(var(--gradient-color)/16.2%),rgb(var(--gradient-color)/23.2%),rgb(var(--gradient-color)/31%),rgb(var(--gradient-color)/39%),rgb(var(--gradient-color)/46.8%),rgb(var(--gradient-color)/53.8%),rgb(var(--gradient-color)/59.7%),rgb(var(--gradient-color)/64.3%),rgb(var(--gradient-color)/67.5%),rgb(var(--gradient-color)/69.4%),rgb(var(--gradient-color)/70%))}.controls__play{align-self:center;grid-column:2/3;grid-row:1/5}
129.controls__video-details{pointer-events:none;grid-area:details;width:100%;display:none}.controls__scrub-bar{grid-area:scrub-bar}.controls__buttons-container{grid-area:buttons}.controls__buttons{display:flex;justify-content:space-between;margin:0 8px}.controls__extra-buttons{margin:0 8px}.controls-container--fullscreen{cursor:none}.controls-container{display:grid;grid-template:1fr auto auto auto/1fr 1fr 1fr;grid-template-areas:"top top top" "details details details" "scrub-bar scrub-bar scrub-bar" "buttons buttons buttons";height:100%;padding:8px;outline:none;-webkit-user-select:none;user-select:none}.controls-container--fade-in{cursor:default}.controls-container--fade-in .controls__play,.controls-container--fade-in .controls__video-details,.controls-container--fade-in .controls__scrub-bar,.controls-container--fade-in .controls__buttons-container{animation:var(--g-controls-animation-fade-in)}.controls-container--fade-in .controls__gradient{animation:g-gradient-fade-in var(--transition-timing) forwards}.controls-container--fade-out .controls__play,.controls-container--fade-out .controls__video-details,.controls-container--fade-out .controls__scrub-bar,.controls-container--fade-out .controls__buttons-container{animation:var(--g-controls-animation-fade-out)}.controls-container--fade-out .controls__gradient{animation:g-gradient-fade-out var(--transition-timing) forwards}.controls-container--hide .controls__play,.controls-container--hide .controls__scrub-bar,.controls-container--hide .controls__buttons-container{opacity:0;pointer-events:none}.controls-container--hide .controls__gradient{opacity:0}.cq-650 .controls__buttons,.cq-650 .controls__extra-buttons{margin:0 24px}.cq-650 .controls__gradient{height:60%}.cq-650 .controls__video-details{display:block}.cq-1350 .controls__gradient{height:50%}@keyframes g-gradient-fade-in{0%{opacity:0}to{opacity:1}}@keyframes g-gradient-fade-out{0%{opacity:1}to{opacity:0}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}.fading-content{opacity:0}.fading-content-fade-in{animation:fade-in .7s forwards}.fading-content-fade-out{animation:fade-out .7s forwards}.click-and-tap-overlay-container{display:grid;grid-column:1/4;grid-row:1/5;grid-template:1fr/1fr 1fr}.click-and-tap-overlay-container.grab{cursor:move;cursor:grab}.click-and-tap-overlay-container.grabbing{cursor:move;cursor:grabbing}.fast-forward-backward-container{height:100%;display:flex;align-items:center;justify-content:center}.fast-forward-backward-container__fast-backward-container,.fast-forward-backward-container__fast-forward-container{opacity:0;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border-radius:70px;height:70px;width:70px}.fast-forward-backward-container__fast-backward-container--show-animation,.fast-forward-backward-container__fast-forward-container--show-animation{opacity:1}.fast-backward-animation__arrow{width:20px;height:20px;background:#fff;margin:0 2px;clip-path:polygon(100% 0,100% 100%,0 50%);opacity:.5;animation:fade-in-out 1s ease-in-out infinite}.fast-forward-animation__arrow{width:20px;height:20px;background:#fff;margin:0 2px;clip-path:polygon(100% 50%,0% 100%,0 0);opacity:.5;animation:fade-in-out 1s ease-in-out infinite}.animation__arrow--outer{animation-delay:.2s}.left-side-controls{align-items:center;display:flex;flex-basis:33%;flex-shrink:1;justify-content:left}.left-side-controls__selective-elements{display:flex}.left-side-controls__tooltip-wrapper{display:flex;align-items:center}.left-side-controls__icon{color:#fff}.center-controls{display:flex;align-items:center;flex-basis:33%;flex-shrink:1;justify-content:center}.play-seek-controls{display:flex;justify-content:center;position:relative}.play-seek-controls.play-seek-controls__bottom,.play-seek-controls.play-seek-controls__vr-content{display:none}.play-seek-controls.play-seek-controls__bottom.play-seek-controls__vr-content{display:flex}.play-seek-controls__play-seek-pause-container{align-items:center;display:flex;gap:12px}.play-seek-controls__play-seek-pause-container [data-rbup-seek-back]::part(base),.play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]::part(base){height:44px;max-width:44px;min-width:44px;width:44px}.play-seek-controls__play-seek-pause-container [data-rbup-seek-back] .play-seek-controls__icon,.play-seek-controls__play-seek-pause-container [data-rbup-seek-forward] .play-seek-controls__icon{height:25px;width:25px}.play-seek-controls__play-seek-pause-container [disabled] .play-seek-controls__icon{color:#ffffff73}.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-seek-back]::part(base),.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]::part(base){height:52px;max-width:52px;min-width:52px;width:52px}.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-seek-back] .play-seek-controls__icon,.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward] .play-seek-controls__icon{height:29.5px;width:29.5px}.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-seek-back]::part(base),.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]::part(base){height:60px;max-width:60px;min-width:60px;width:60px}.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-seek-back] .play-seek-controls__icon,.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward] .play-seek-controls__icon{height:34px;width:34px}.cq-1000 .play-seek-controls{display:none}.cq-1000 .play-seek-controls.play-seek-controls__bottom{display:flex;position:relative}.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container [data-rbup-seek-back]::part(base),.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]::part(base){height:36px;max-width:36px;min-width:36px;width:36px}.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container [data-rbup-seek-back]::part(base),.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container [data-rbup-seek-forward]::part(base){height:36px;max-width:36px;min-width:36px;width:36px}.play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.play-seek-controls__play-seek-pause-container [data-rbup-stop]::part(base),.play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base),.play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{height:44px;max-width:44px;min-width:44px;width:44px}.play-seek-controls__play-seek-pause-container [data-rbup-pause] .play-seek-controls__icon,.play-seek-controls__play-seek-pause-container [data-rbup-stop] .play-seek-controls__icon,.play-seek-controls__play-seek-pause-container [data-rbup-play] .play-seek-controls__icon{height:25px;width:25px}.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-stop]::part(base),.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base),.cq-540 .play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{height:66px;max-width:66px;min-width:66px;width:66px}.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-pause] .play-seek-controls__icon,.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-stop] .play-seek-controls__icon,.cq-540 .play-seek-controls__play-seek-pause-container [data-rbup-play] .play-seek-controls__icon{height:37.5px;width:37.5px}.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-stop]::part(base),.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base),.cq-650 .play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{height:88px;max-width:88px;min-width:88px;width:88px}.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-pause] .play-seek-controls__icon,.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-stop] .play-seek-controls__icon,.cq-650 .play-seek-controls__play-seek-pause-container [data-rbup-play] .play-seek-controls__icon{height:50px;width:50px}.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container [data-rbup-stop]::part(base),.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base),.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{height:36px;max-width:36px;min-width:36px;width:36px}.cq-1000 .play-seek-controls.play-seek-controls__bottom .play-seek-controls__play-seek-pause-container .play-seek-controls__icon{height:18px;width:18px}.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container [data-rbup-pause]::part(base),.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container [data-rbup-stop]::part(base),.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container [data-rbup-play]::part(base),.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container .play-seek-controls__spinner{height:36px;max-width:36px;min-width:36px;width:36px}.themed-player-root .play-seek-controls.play-seek-controls__vr-content .play-seek-controls__play-seek-pause-container .play-seek-controls__icon{height:18px;width:18px}
129.right-side-controls{align-items:center;display:flex;gap:0;flex-basis:33%;flex-shrink:1;justify-content:right}.right-side-controls__audio-button,.right-side-controls__subtitles-button,.right-side-controls__multi-steam-button{display:none}.right-side-controls--casting .right-side-controls__audio-button,.right-side-controls--casting .right-side-controls__subtitles-button,.right-side-controls--casting .right-side-controls__multi-steam-button{display:contents}.cq-540 .right-side-controls{gap:8px}.cq-650 .right-side-controls__audio-button,.cq-650 .right-side-controls__subtitles-button,.cq-650 .right-side-controls__multi-steam-button{display:contents}.right-side-controls__tooltip-wrapper{display:flex;gap:8px;position:relative}.video-details{padding:8px 24px;position:relative;text-align:start;--cosmos-text-line-height: var(--rbup-text-line-height);--cosmos-title-font-family: var(--rbup-component-font-family, $default-font-family)}.video-details__title{-webkit-user-select:text;user-select:text}.video-details__description{-webkit-user-select:text;user-select:text;margin-top:8px}.overlay{height:100%;left:0;position:absolute;top:0;width:100%}.disabled{pointer-events:none}.live-button,.live-button-live{display:flex;position:relative;--cosmos-button-font-size: .7rem}.live-button .cosmos-button--kind-bare,.live-button-live .cosmos-button--kind-bare{background-color:initial}[data-rbup-live]{--cosmos-button-color: #fff;--cosmos-button-background: rgb(0 0 0 / 0%);--cosmos-button-background-hover: rgb(0 0 0 / 0%)}[data-rbup-live] .live-button__icon{color:var(--rbup-primary-color)}[data-rbup-dvr]{pointer-events:auto}[data-rbup-dvr] .live-button__icon{color:#fff}.multi-channel-button{--cosmos-button-font-size: .7rem;align-items:center;display:flex;position:relative;margin-left:8px}.ad-markers{bottom:0;height:2px;width:100%;left:0;margin:12px 0;position:absolute;pointer-events:none;transition:transform .3s cubic-bezier(0,.32,.32,1);-webkit-user-select:none;user-select:none}.ad-markers__background-container{background-color:#fc0;height:100%;width:100%;position:absolute;transition:clip-path .3s cubic-bezier(0,.32,.32,1)}.buffer-bar{background-color:#fff;bottom:0;height:2px;left:0;margin:12px 0;position:absolute;pointer-events:none;transition:transform .3s cubic-bezier(0,.32,.32,1);-webkit-user-select:none;user-select:none}.heatmap{position:absolute;bottom:calc(100% - 2px);pointer-events:none;opacity:0;transition:opacity .3s cubic-bezier(0,.32,.32,1)}.heatmap.mobile{opacity:1}.controls__scrub-bar:has(.heatmap){margin-top:16px}.scrub-bar:hover .heatmap{opacity:1}#heatmap-gradient{--color-top: rgba(255, 255, 255, .45);--color-bottom: rgba(255, 255, 255, .2)}.progress-bar{background-color:var(--rbup-primary-color);bottom:0;height:2px;left:0;margin:12px 0;position:absolute;pointer-events:none;transition:transform .3s cubic-bezier(0,.32,.32,1);-webkit-user-select:none;user-select:none}.seek-bar{display:inline-block;height:100%;position:relative;width:100%}.seek-bar__cosmos-tooltip::part(base){max-width:initial;padding:0}.seek-bar-handle{bottom:21px;position:absolute;pointer-events:none}.seek-bar-handle__knob{background:#fff;border-radius:9999px;box-shadow:0 2px 8px #000f1e;color:#fff;height:16px;position:absolute;pointer-events:none;right:-8px;width:16px}.seek-bar-tooltip{align-items:center;display:flex;flex-direction:column;opacity:0;transition:opacity .3s cubic-bezier(0,.32,.32,1)}.seek-bar-tooltip--visible{opacity:1}.seek-bar-tooltip__image-container{border-radius:6px 6px 0 0;overflow:hidden}.seek-bar-tooltip__image{position:relative}.seek-bar-tooltip__text{align-items:center;display:flex;flex-direction:column;gap:4px;padding:8px;text-align:center}.seek-bar-tooltip--with-thumbnail .seek-bar-tooltip__text{margin-top:4px;padding:0 4px 4px}.seek-bar__tooltip-container--with-heatmap{margin-bottom:16px}.cq-540 .seek-bar-tooltip{padding:4px}.cq-540 .seek-bar-tooltip__image-container{border-radius:6px}.scrub-bar__rail{background-color:#fff6;bottom:0;left:0;height:2px;margin:12px 0;position:absolute;pointer-events:none;transition:transform .3s cubic-bezier(0,.32,.32,1);-webkit-user-select:none;user-select:none;width:100%}.scrub-bar{cursor:pointer;position:relative;height:20px;margin:0 8px;outline:none}.scrub-bar .scrub-bar__background-container{height:100%;width:100%;position:absolute;transition:clip-path .3s cubic-bezier(0,.32,.32,1)}.scrub-bar[data-hovered] .buffer-bar,.scrub-bar[data-hovered] .progress-bar,.scrub-bar[data-hovered] .scrub-bar__rail,.scrub-bar[data-hovered] .ad-markers{transform-origin:center center;transform:scaleY(3)}.scrub-bar[data-hovered=false]{height:20px}.cq-650 .scrub-bar{margin:0 24px}.aria-message-container{position:absolute;width:0;height:0;overflow:hidden;border:0}.scrub-bar:focus-visible .scrub-bar__rail{outline:0}.scrub-bar:focus-visible .scrub-bar__rail:before{border:1px solid #1B6AEE;border-radius:2px;content:"";height:calc(100% + 2px);bottom:-1px;right:-1px;left:-1px;position:absolute;transition:transform .3s cubic-bezier(0,.32,.32,1);box-sizing:border-box}.controls-time-display{align-items:center;display:flex;flex-shrink:0;margin-left:8px;position:relative;pointer-events:none}
129.controls-time-display__duration{display:none}.controls-time-display__separator{padding:0 4px}.cq-650 .controls-time-display__duration{display:flex}.controls-volume-slider{height:inherit;margin-left:12px;margin-top:1px;position:relative}.controls-volume-slider__slider{cursor:pointer;display:flex;height:36px;margin:0;overflow:hidden;position:relative;transition:width .3s cubic-bezier(0,.32,.32,1);width:0}.controls-volume-slider__slider--visible{width:38px}.controls-volume-slider__indicator-element{pointer-events:none;margin:14px 2px 0 0}.volume-controls{align-items:center;display:flex;position:relative}.volume-indicator-element{width:2px;height:8px;background:#fff9}.volume-indicator-element--active{background-color:var(--rbup-primary-color)}.volume-indicator-element--highlighted{background-color:#fff;height:14px;margin:-3px 0}.product-placement{left:var(--rbup-product-placement-left, 23px);position:absolute;top:var(--rbup-product-placement-top, 23px);color:#fff}.cq-1000 .product-placement{left:var(--rbup-product-placement-left, 48px);top:var(--rbup-product-placement-top, 48px)}.product-placement--fade-in{opacity:1;transition:opacity .5s .5s}.product-placement--fade-out{opacity:0;animation:product-placement-fade-out .5s}@keyframes product-placement-fade-out{0%{opacity:1}to{opacity:0}}.audio-menu{background-color:#fff;border-radius:8px;bottom:0;box-shadow:0 8px 12px #000f1e0a,0 2px 4px #000f1e05;max-height:250px;min-width:180px;overflow-y:auto;padding:16px;position:absolute;right:0;transform:translate(-12px,calc(-3rem + var(--rbup-menu-extra-bottom-offset, 0px)));z-index:2;pointer-events:auto}.audio-menu__title{margin-bottom:12px}.audio-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .audio-settings{overflow:visible}.audio-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.audio-settings__list-item{--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.audio-settings__list-item:last-child{margin-bottom:0}.audio-settings__list-item>*{display:inline-block}.audio-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.audio-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .audio-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .audio-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .audio-settings__list-item label input:checked:before{background-color:#000f1e}.back-button{--cosmos-text-color: #FFFFFF;align-items:center;background-color:transparent;border:none;cursor:pointer;display:flex;padding:0;margin-bottom:12px;position:relative}.back-button:focus-visible{outline:0}.back-button:focus-visible:before{border:2px solid #1B6AEE;border-radius:8px;content:"";height:100%;top:-2px;bottom:-2px;left:-2px;right:-2px;position:absolute;width:100%}.back-button .back-button__icon{height:24px;width:24px;color:#fff;transform:translate(-2px);transition:.25s ease-in-out}.back-button:hover .back-button__icon{transform:translate(-8px);color:var(--rbup-primary-color);transition:.25s ease-in-out}.cq-650 .back-button{--cosmos-text-color: #000F1E}.cq-650 .back-button .back-button__icon{color:#000f1e}.settings-menu-button__label{text-align:start}.settings-menu-button{--cosmos-text-color: #FFFFFF;align-items:center;background-color:transparent;border:none;cursor:pointer;display:flex;justify-content:space-between;width:100%;padding:1px 6px;position:relative}.settings-menu-button:focus-visible{outline:0}.settings-menu-button:focus-visible:before{border:2px solid #1B6AEE;border-radius:8px;content:"";height:100%;top:-2px;bottom:-2px;left:-2px;right:-2px;position:absolute;width:100%}.settings-menu-button:not(:last-child){margin-bottom:16px}.settings-menu-button[href]::part(base):not(:focus):hover{border-color:transparent}.settings-menu-button .settings-menu-button__label{color:#fff;font-size:14px;position:relative}.settings-menu-button .settings-menu-button__label:before{border:0;border-bottom:solid 2px var(--rbup-primary-color);border-radius:0;bottom:-3px;content:"";left:0;position:absolute;pointer-events:none;transition:.25s ease-in-out;width:0}.settings-menu-button:hover .settings-menu-button__label:before{width:100%;transition:.25s ease-in-out}.settings-menu-button__icon{height:24px;margin-left:4px;width:24px;color:#fff;transition:.25s ease-in-out}.settings-menu-button__icon:hover .settings-menu-button__icon{transform:translate(8px);color:var(--rbup-primary-color);transition:.25s ease-in-out}.settings-menu-button__selected-setting{--cosmos-text-color: rgba(255, 255, 255, .6);align-items:center;display:flex;text-transform:capitalize}.cq-650 .settings-menu-button{--cosmos-text-color: #000F1E}.cq-650 .settings-menu-button .settings-menu-button__icon{color:#000f1e99}.cq-650 .settings-menu-button .settings-menu-button__label{color:#000f1e}.cq-650 .settings-menu-button__selected-setting{--cosmos-text-color: rgba(0, 15, 30, .6)}.quality-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .quality-settings{overflow:visible}.quality-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.cq-650 .quality-settings__list{padding:0}.quality-settings__list-item{--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.quality-settings__list-item:last-child{margin-bottom:0}.quality-settings__list-item>*{display:inline-block}.quality-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.quality-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .quality-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .quality-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .quality-settings__list-item label input:checked:before{background-color:#000f1e}.cq-650 [data-rbup-menu-button=audio],.cq-650 [data-rbup-menu-button=subtitles],.cq-650 [data-rbup-menu-button=multi-stream]{dis
129play:none}.settings-menu{display:grid;grid-template-areas:"close-btn invisible menu ";grid-template-columns:minmax(42px,78px) 1px minmax(240px,320px);bottom:0;position:absolute;height:0;right:0;z-index:2;-webkit-user-select:text;user-select:text;pointer-events:auto}.settings-menu-animation{transition:height .3s cubic-bezier(0,.32,.32,1),width .3s cubic-bezier(0,.32,.32,1)}.settings-menu__invisible-title{grid-area:invisible}.settings-menu__close-button{grid-area:close-btn;--cosmos-button-border-color: rgba(255, 255, 255, .2);--cosmos-button-border-color-hover: rgba(255, 255, 255, .45);--cosmos-button-background: rgba(0, 15, 30, .45);--cosmos-button-color: #FFFFFF;--cosmos-button-color-hover: #FFFFFF;align-self:center;justify-self:center}.settings-menu__settings-area{grid-area:menu;overflow:hidden;display:flex;width:100%;height:100%;background-color:#000f1ee6}.settings-menu__settings-container{position:relative;height:100%}.cq-650 .settings-menu{height:auto;display:block;overflow:hidden;border-radius:8px;transform:translate(-12px,calc(-3rem + var(--rbup-menu-extra-bottom-offset, 0px)));box-shadow:0 8px 12px #000f1e0a,0 2px 4px #000f1e05}.cq-650 .settings-menu .settings-menu__settings-area{background-color:#fff}.settings-menu__settings-page--positioned,.settings-menu__settings-page{transition:transform .3s cubic-bezier(0,.32,.32,1);display:flex;flex-direction:column;width:100%;height:100%}.settings-menu__settings-page{overflow-x:hidden;overflow-y:auto}.settings-menu__settings-page--positioned{position:absolute}.settings-menu__settings-wrapper{max-height:100%}.settings-menu__settings-wrapper>div{padding:16px;display:flex;flex-direction:column;align-items:stretch;height:100%}.cq-650 .settings-menu__settings-wrapper{max-height:initial}.cq-650 .settings-menu__settings-wrapper>div{height:auto}.share-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .share-settings{overflow:visible}.share-settings__copied-text{animation:3s copied-text ease-in-out;margin-left:12px;transform:scale(0)}.share-settings__link::part(base){align-items:center;border:0;display:flex;gap:8px;margin:0;position:relative}.share-settings__link::part(base):focus{margin:0;padding:0}.share-settings__link::part(base):before{border:0;border-bottom:solid 2px var(--rbup-primary-color);border-radius:0;bottom:-6px;content:"";left:0;position:absolute;pointer-events:none;transition:.25s ease-in-out;width:0}.share-settings__link::part(base):focus:before,.share-settings__link::part(base):hover:before{width:100%;transition:.25s ease-in-out}.share-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.share-settings__list-item{display:flex;align-items:center;margin-bottom:12px;--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.share-settings__list-item:last-child{margin-bottom:0}.share-settings__list-item>*{display:inline-block}.share-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.share-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .share-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .share-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .share-settings__list-item label input:checked:before{background-color:#000f1e}.share-settings__share-time{--cosmos-text-color: #FFFFFF;align-items:center;border-bottom:1px solid #F8F8F8;display:flex;flex-direction:row;justify-content:space-between;margin-bottom:12px;padding-left:5px;padding-right:5px;padding-bottom:12px}.share-settings__share-time input{border-color:#fff;background-color:unset}.share-settings__share-time [data-rbup-share-time-checkbox]{--cosmos-checkbox-font-size: 14px}.cq-650 .share-settings__share-time{--cosmos-text-color: #000F1E;border-bottom:1px solid #00162B}.cq-650 .share-settings__share-time label input{border-color:#00162b;background-color:#fff}.share-settings__time-input{border:0;border-bottom:2px solid #00162B;border-radius:0;color:#fff;font-family:var(--rbup-font-family);font-size:14px;height:26px;text-align:center;width:56px}.share-settings__time-input:focus{border-color:var(--rbup-primary-color);outline:0}.share-settings__time-input:disabled{background-color:transparent;border-bottom:2px solid rgba(255,255,255,.1);color:#ffffff73}.cq-650 .share-settings__time-input{border-bottom:2px solid #00162B;color:#000f1e}.cq-650 .share-settings__time-input:disabled{border-bottom:2px solid #F8F8F8;color:#000f1e99}@keyframes copied-text{0%{transform:scale(0)}10%{transform:scale(1)}90%{transform:scale(1)}to{transform:scale(0)}}.speed-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .speed-settings{overflow:visible}.speed-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.speed-settings__list-item{--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.speed-settings__list-item:last-child{margin-bottom:0}.speed-settings__list-item>*{display:inline-block}.speed-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.speed-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .speed-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .speed-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .speed-settings__list-item label input:checked:before{background-color:#000f1e}.subtitles-menu{background-color:#fff;border-radius:8px;bottom:0;box-shadow:0 8px 12px #000f1e0a,0 2px 4px #000f1e05;max-height:250px;min-width:180px;overflow-y:auto;padding:16px;position:absolute;right:0;transform:translate(-12px,calc(-3rem + var(--rbup-menu-extra-bottom-offset, 0px)));z-index:2;pointer-events:auto}.subtitles-menu__title{margin-bottom:12px}.subtitles-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .subtitles-settings{overflow:visible}.subtitles-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.subtitles-settings__list-item{--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.subtitles-settings__list-item:last-child{margin-bottom:0}.subtitles-settings__list-item>*{display:inline-block}.subtitles-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.subtitles-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .subtitles-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .subtitles-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .subtitles-settings__list-item label input:checked:before{background-color:#000f1e}.multi-stream-menu{background-color:#fff;border-radius:8px;bottom:0;box-shadow:0 8px 12px #000f1e0a,0 2px 4px #000f1e05;max-height:250px;min-width:180px;overflow-y:auto;padding:16px;position:absolute;right:0;transform:translate(-12px,calc(-3rem + var(--rbup-menu-extra-bottom-offset, 0px)));z-index:2}.multi-stream-menu__title{margin-bottom:12px}
129.multi-stream-settings{overflow-x:hidden;overflow-y:auto}.cq-650 .multi-stream-settings{overflow:visible}.multi-stream-settings__list{display:block;list-style:none;margin:0;padding:5px 5px 9px}.multi-stream-settings__list-item{--cosmos-radio-font-size: 14px;--cosmos-radio-line-height: 1.357143;--cosmos-button-color: #FFFFFF;--cosmos-text-color: #FFFFFF}.multi-stream-settings__list-item:last-child{margin-bottom:0}.multi-stream-settings__list-item>*{display:inline-block}.multi-stream-settings__list-item label input{background-color:#000f1ee6;border:2px solid rgba(255,255,255,.45)}.multi-stream-settings__list-item label input:checked:before{background-color:#fff}.cq-650 .multi-stream-settings__list-item{--cosmos-button-color: #000F1E;--cosmos-text-color: #000F1E}.cq-650 .multi-stream-settings__list-item label input{background-color:#fff;border:1px solid #00162B}.cq-650 .multi-stream-settings__list-item label input:checked:before{background-color:#000f1e}.start-and-end-view{position:absolute;top:0;width:100%;height:100%}.start-and-end-view__buttons{align-items:center;cursor:pointer;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.start-and-end-view__bg-image-container{height:100%;width:100%}.start-and-end-view__bg-custom-image-container{width:100%;height:100%}.start-and-end-view__bg-custom-image-container img{width:100%;height:100%;object-fit:cover}.start-and-end-view__button{--cosmos-button-background: var(--rbup-play-button-background-color);--cosmos-button-background-hover: var(--rbup-play-button-background-hover-color)}.start-and-end-view__button::part(base){height:80px;max-width:80px;min-width:80px;width:80px}.start-and-end-view__icon{height:50px;width:50px}.subtitles-overlay{position:absolute;left:16px;right:16px;bottom:16px;text-align:center;pointer-events:none}.subtitles-overlay.subtitles-on-top{top:0}.subtitles-overlay__text-container{display:flex;flex-direction:column;align-items:center}.subtitles-overlay__text-display{color:#fff;background-color:#000f1e73;padding:.1666em .5em .3333em;margin-top:.3em}.themed-player-root{position:relative;overflow:hidden;aspect-ratio:var(--aspect-ratio);min-width:300px;max-width:var(--max-width);margin:auto;--rbup-container16x9-background-color: #000;--rbup-font-family: Bull Text, Helvetica, sans-serif;--rbup-primary-color: #DB0A40;--cosmos-button-font-family: var(--rbup-font-family);--cosmos-font-family-text: var(--rbup-font-family);--cosmos-text-font-family: var(--rbup-font-family);--cosmos-tooltip-font-family: var(--rbup-font-family);--cosmos-tooltip-z-index: 1;font-family:var(--rbup-font-family)}.themed-player-root.vr-content{min-width:370px;z-index:9999}.rbup-default-theme__toasts{display:flex;gap:16px;left:12px;position:absolute;top:12px;transition:bottom .3s}.rbup-default-theme__centered-toasts{position:absolute;top:var(--rbup-centered-toast-top, 10px);left:var(--rbup-centered-toast-left, 10px)}.rbup-default-theme__centered-toasts--controls-visible{animation:var(--g-controls-animation-fade-in)}.rbup-default-theme__centered-toasts--controls-hide{animation:var(--g-controls-animation-fade-out)}.rbup-default-theme__toasts--product-placement-visible{top:20px;left:64px}.rbup-default-theme--vr-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999}.cq-650 .rbup-default-theme__toasts{bottom:32px;left:auto;right:32px;top:auto}.cq-650 .rbup-default-theme__toasts--controls-visible{bottom:70px}@keyframes fade-in-out{0%,40%,to{opacity:1}20%,60%{opacity:.5}}';function getToastCSSClass(e,t){return["rbup-default-theme__toasts","visible"===t&&"rbup-default-theme__toasts--product-placement-visible","fade-in"===e&&"rbup-default-theme__toasts--controls-visible"].filter(Boolean).join(" ")}function getCenteredToastCSSClass(e){return["rbup-default-theme__centered-toasts","fade-in"===e?"rbup-default-theme__centered-toasts--controls-visible":"rbup-default-theme__centered-toasts--controls-hide"].filter(Boolean).join(" ")}function getPlayerDisplayState(e,t,i){return"TRANSITIONING"===e?"transitioning":("IDLE"===e||"BUFFERING"===e)&&t<1?"initial":i?"advertisement":"playback"}let DefaultThemeComponent=({config:e,customPosterImage:t,sizeBreakpoints:i,playerWidth:n,playerCoordinator:r,globalKeyboardNavigation:o,onPlayNewAsset:a,
129CustomOverlayComponent:s,allowControlsCaptureAreaInteraction:l,CustomToastComponent:c,aspectRatio:u,CenteredToastComponent:d,playOrReplayCallback:h,AdditionalButtonComponent:p})=>{var f,m,g,v;let{playerState:{isShowingAd:y,playerStatus:b,playbackPosInSec:S}}=usePlayerContext(),_=useControlsVisibilityContext().controlsVisibility,[E,T]=h$3(areTranslationsLoaded());onTranslationDataLoaded(()=>T(!0));let w=!!(null!=(f=e.relatedVideos)&&f.items),A=getPlayerDisplayState(b,Math.abs(S-((null==(m=r.getPlayerData())?void 0:m.getInitialSeekTimeInSec())??0)),y);return o$i(CosmosMode,{mode:"light",class:useIosVrFullscreen()?"rbup-default-theme--vr-fullscreen":"",children:[("initial"===A||"transitioning"===A)&&o$i(InitialLoadingSpinner,{}),"playback"===A&&o$i(MainMediaPlaybackComponent,{allowControlsCaptureAreaInteraction:l,config:e,controlsVisibility:_,CustomOverlayComponent:s,CustomToastComponent:c,globalKeyboardNavigation:o,onPlayNewAsset:a,playerCoordinator:r,playerStatus:b,sizeBreakpoints:i,playerWidth:n,CenteredToastComponent:d,AdditionalButtonComponent:p}),"advertisement"!==A&&o$i(k$5,{children:[r.isPhasingEnabled()&&o$i(LiveStreamInfo,{playerWidth:n,aspectRatio:u,customPosterImage:t}),o$i(StartAndEndView,{customPosterImage:t,aspectRatio:u,showAtEnd:!w,playerWidth:n,playOrReplayCallback:h}),w&&o$i(EndslateView,{relatedVideos:null==(g=e.relatedVideos)?void 0:g.items,config:null==(v=e.relatedVideos)?void 0:v.config,playOrReplayCallback:h})]}),"advertisement"===A&&o$i(AdControls,{}),"playback"===A&&o$i(SubtitlesOverlay,{})]})},RbupVideoCoreDefaultTheme=k$3((e,t)=>o$i(ThemedPlayer,{ref:t,styles:styles$5,ThemeComponent:DefaultThemeComponent,...e}));function getShowMultiChannelSwitcherClickedCallback(e,t,i){return e&&i&&i.length>0?t:void 0}let MainMediaPlaybackComponent=({allowControlsCaptureAreaInteraction:e,config:t,controlsVisibility:i,CustomOverlayComponent:n,CustomToastComponent:r,globalKeyboardNavigation:o,onPlayNewAsset:a,playerCoordinator:s,sizeBreakpoints:l,CenteredToastComponent:c,AdditionalButtonComponent:u})=>{let{playerState:{liveStatus:d,mediaMetaData:h}}=usePlayerContext(),p=_$3(null),f=null==d?void 0:d.otherLiveVideos,m=getToastCSSClass(i,t.productPlacement),g=getCenteredToastCSSClass(i),v=s.shouldShowProductPlacement(),[y,b]=h$3(!1),S=T$4((e=!0)=>{b(e)},[]),_=getShowMultiChannelSwitcherClickedCallback("visible"===t.multiChannelSwitcher,S,f),E=F$4(()=>{var e;return null==(e=t.resolveCornerbug)?void 0:e.call(t,h)},[t,h]);return o$i(k$5,{children:[E&&o$i("div",{class:"rbup-video-core-container",children:o$i(RbupVideoCornerbug,{IconComponent:E})}),v&&!n&&o$i(RbupVideoProductPlacement,{productPlacementDefinition:t.productPlacementComponentDefinition}),n&&o$i(n,{playerCoordinator:s,sizeBreakpoints:l,showProductPlacement:v,productPlacementDefinition:t.productPlacementComponentDefinition}),o$i(RbupVideoCoreOverlay,{sizeBreakpoints:l,playerCoordinator:s,onShowMultiChannelSwitcher:_,allowControlsCaptureAreaInteraction:e,globalKeyboardNavigation:o,CenteredToastComponent:c,AdditionalButtonComponent:u}),o$i("div",{ref:p,"data-rbup-centered-toast-container":!0,class:g,children:o$i(CenteredToastWrapper,{sizeBreakpoints:l,CenteredToastComponent:c,parentRef:p})}),o$i("div",{"data-rbup-toast-container":!0,class:m,children:r&&o$i(r,{playerCoordinator:s,sizeBreakpoints:l})}),y&&o$i(MultiChannelSwitcherView,{onCloseView:()=>S(!1),onPlayNewAsset:a})]})},styles$4=".subtitles-available{position:absolute;top:var(--rbup-subtitles-top, 16px);left:var(--rbup-subtitles-left, 16px);bottom:auto;transition:bottom .3s}.subtitles-available--controls-visible{animation:var(--g-controls-animation-fade-in)}.subtitles-available--controls-hide{animation:var(--g-controls-animation-fade-out)}.cq-650 .subtitles-available{bottom:var(--rbup-subtitles-bottom-650, 70px);left:auto;right:32px;top:auto}",TIME_TO_DISPLAY_MS=5e3;function getCSSClass(e,t){let i=["subtitles-available"];return t?[...i,"fade-in"===e?"subtitles-available--controls-visible":"subtitles-available--controls-hide"].join(" "):i.join(" ")}let SubtitlesAvailable=({playerCoordinator:e,sizeBreakpoints:t})=>{var i;let[n,r]=h$3(!1),[o,a]=h$3(!1),s=_$3(),l=null==(i=e.getMediaMetaData())?void 0:i.availableSubtitleLanguages,c=F$4(()=>{let e=window.navigator.language;return!!l&&void 0!==getLanguageMatchForIsoCode(e,l)}
129,[l]),u=e.getPlayerStatus(),d=t.mediumOrBigger,h=getCSSClass(useControlsVisibilityContext().controlsVisibility,t.mediumOrBigger);return p$6(()=>{!n&&c&&"PLAYING"===u&&(a(!0),r(!0),s.current=window.setTimeout(()=>{a(!1)},TIME_TO_DISPLAY_MS))},[n,c,u]),o$i(k$5,{children:[o$i("style",{children:styles$4}),o&&o$i("div",{id:"subtitles-available",className:h,children:o$i(CosmosBadge,{"data-rbup-subtitles-available":!0,appearance:"light",kind:"cover-up",size:"small",shape:"pill",children:[d&&o$i(CosmosIconSubtitles,{slot:"prefix"}),translate("rbcom-subtitlesAvailable")]})})]})};if(typeof window>"u")throw Error("SSR is not supported");let appName={rallytv:"Rally TV",stv:"ServusTV On",rbtv:"Red Bull TV"};function resolveDatazoomAppName(e){return appName[e]}let tvStreamingDataZoomMetadataCustomizer=e=>{var t;return{TITLE:e.title,CUSTOM_CONTENT_TYPE:e.contentType,CUSTOM_URL:null==(t=e.mediaSrc)?void 0:t.videoUrl}},STV_CHANNEL_ID="0";function createDatazoomCustomMetadata(e){let{assetId:t,dataZoomBuildVersion:i,tenant:n}=e,r={CUSTOM_ASSET_ID:t,APP_NAME:resolveDatazoomAppName(n),DEVICE_PLATFORM:DATAZOOM_DEVICE_PLATFORM,PLAYER_VERSION:CORE_VERSION};return i&&(r.APP_VERSION=i),"stv"===n&&(r.TVI_CHANNEL_ID=STV_CHANNEL_ID),r}function createDatazoomConfig(e){let{assetId:t,dataZoomBuildVersion:i,dataZoomConfigId:n,tenant:r}=e;if(n)return{assetId:t,configId:n,customMetadata:createDatazoomCustomMetadata({assetId:t,dataZoomBuildVersion:i,tenant:r}),dataZoomMetadataCustomizer:tvStreamingDataZoomMetadataCustomizer}}let rallyTvTrackingConfig={playerId:"RBUP_RALLYTV",accountName:"RALLYTV",source:"RallyTV"},rbtvTrackingConfig={playerId:"RBUP",accountName:"RBTV",source:"RBTV"},stvTrackingConfig={playerId:"RBUP_STV",accountName:"Servus TV Relaunch",source:"STV"};function resolveGoogleAnalyticsTenantConfig(e){switch(e){case"stv":return stvTrackingConfig;case"rallytv":return rallyTvTrackingConfig;default:return rbtvTrackingConfig}}let resolvePageName=e=>{var t;if(!e)return;let{title:i,videoId:n}=e,r=null==(t=null==i?void 0:i.toLowerCase())?void 0:t.replaceAll(" ","-");return`web|${n}|${r}`};class TvStreamingTrackingEventCustomizer{customize(e,t){return isInitTrackingEvent(e)?this.customizeInitEvent(e,t):e}customizeInitEvent(e,t){return delete e.media_asset_id,delete e.video_label_group,delete e.video_player_id,{...e,page_name:resolvePageName(t),video_asset_id:null==t?void 0:t.assetId,video_product_id:null==t?void 0:t.videoId}}}function createTrackingConfig(e){let{assetId:t,customDataLayer:i,dataZoomBuildVersion:n,dataZoomConfigId:r,tenant:o}=e,a=r?"ACTIVE":"INACTIVE";return{configs:{googleAnalytics:{...resolveGoogleAnalyticsTenantConfig(o),eventCustomizer:new TvStreamingTrackingEventCustomizer,dataLayer:i},dataZoom:createDatazoomConfig({assetId:t,dataZoomBuildVersion:n,dataZoomConfigId:r,tenant:o})},services:{dataZoom:a}}}let adaptNextUpConfig=()=>(e,t)=>{var i;let n=null==(i=e.tracking.configs.dataZoom)?void 0:i.configId,r=e.tracking.configs.googleAnalytics.dataLayer,o=createTrackingConfig({assetId:e.assetId,dataZoomConfigId:n,customDataLayer:r,tenant:e.tenant});return{...e,tracking:o}},PLAY_API_BASE_URL_PRODUCTION="https://play.redbull.com",PLAY_API_BASE_URL_STAGING="https://play-qa.redbull.com";function calculatePlayApiUrl(e){switch(e){case"PRODUCTION":return PLAY_API_BASE_URL_PRODUCTION;case"STAGING":return PLAY_API_BASE_URL_STAGING;default:throw Error("unknown server environment")}}class CornerbugFetchError extends Error{constructor(e){super(`Cornerbug API returned ${e}`),this.status=e,this.name="CornerbugFetchError"}}function buildCornerbugUrl(e,t,i,n,r,o){let a=new URL(`/cornerbug/v1/${e}/${t}/${i}/${n}`,calculatePlayApiUrl(o));return a.searchParams.set("device_group",r),a.toString()}function mapResponse(e){return{refreshRate:e.refresh_rate,cornerBugMarkers:e.corner_bug_markers.map(e=>({showCornerBug:e.show_corner_bug,startTime:e.start_time,endTime:e.end_time,id:e.id}))}}async function fetchCornerbugMarkers(e){let t=await fetch(e,{cache:"no-store"});if(!t.ok)throw new CornerbugFetchError(t.status);let i=await t.json();if(!i||!Array.isArray(i.corner_bug_markers))throw new CornerbugFetchError(t.status);return mapResponse(i)}let MIN_REFETCH_DELAY_MS=5e3,DEFAULT_REFRESH_RATE_MS=6e4,MAX_FETCH_RETRIES=3,PERMANENT_ERROR_STATUSES=[404,410],EVALUATION_INTERVAL_MS=1e3,createInitialCycleState=()=>({markers:[],refreshRate:DEFAULT_REFRESH_RATE_MS,fetchState:{forbidRefetch:!1,consecutiveFailures:0},fetchInProgress:!1,currentMarkerId:void 0,terminated:!1,scheduledMarkersFetch:void 0,currentMarkerCalculationInterval:void 0}),sanitizeMarkers=e=>e.reduce((e,t)=>
129{let i=new Date(t.startTime).getTime(),n=new Date(t.endTime).getTime();return Number.isNaN(i)||Number.isNaN(n)||e.push({...t,startMs:i,endMs:n}),e},[]),getNextDelay=(e,t)=>e.consecutiveFailures>0&&e.consecutiveFailures<=MAX_FETCH_RETRIES?MIN_REFETCH_DELAY_MS:t,handleFetchError=(e,t)=>{if(e instanceof CornerbugFetchError&&PERMANENT_ERROR_STATUSES.includes(e.status)){t.forbidRefetch=!0;return}t.consecutiveFailures++},shouldRefetch=(e,t)=>!!e||t.consecutiveFailures>0&&t.consecutiveFailures<=MAX_FETCH_RETRIES,evaluateVisibility=(e,t)=>{let i=Date.now(),n=e.markers.find(e=>i>=e.startMs&&i<e.endMs),r=null==n?void 0:n.id,o=(null==n?void 0:n.showCornerBug)??!1;return r!==e.currentMarkerId&&(e.currentMarkerId=r,t(o)),e.markers.some(e=>e.endMs>i)};function startFetchCycle(e,t,i,n){let r=i.current.currentMarkerCalculationInterval,o=()=>{if(i.current.terminated)return;let e=evaluateVisibility(i.current,n);r&&!e&&(window.clearInterval(r),r=void 0)},a=e=>{r&&(window.clearInterval(r),r=void 0),!i.current.terminated&&t&&e>0&&(r=window.setInterval(o,EVALUATION_INTERVAL_MS))},s=()=>
129{if(i.current.terminated)return;let{fetchState:e,refreshRate:n}=i.current;!e.forbidRefetch&&shouldRefetch(t,e)&&(i.current.scheduledMarkersFetch=window.setTimeout(l,getNextDelay(e,n)))},l=async()=>{let t=i.current;if(!(t.fetchInProgress||t.fetchState.forbidRefetch)){t.fetchInProgress=!0;try{let n=await fetchCornerbugMarkers(e);if(i.current.terminated)return;t.fetchState.consecutiveFailures=0,t.markers=sanitizeMarkers(n.cornerBugMarkers),t.refreshRate=n.refreshRate>0?n.refreshRate:DEFAULT_REFRESH_RATE_MS,o(),a(t.markers.length)}catch(e){i.current.terminated||handleFetchError(e,t.fetchState)}finally{i.current.terminated||(t.fetchInProgress=!1,s())}}};return l(),terminateCycle(i)}let terminateCycle=e=>()=>{e.current.currentMarkerCalculationInterval&&window.clearInterval(e.current.currentMarkerCalculationInterval),e.current.scheduledMarkersFetch&&window.clearTimeout(e.current.scheduledMarkersFetch),e.current.terminated=!0},useShowCornerbug=({tenant:e,videoId:t,locale:i,deviceGroup:n,userCountry:r,isLinearStream:o,playerStatus:a,environment:s})=>{let l=F$4(()=>{if(!(!t||!i||!r))return buildCornerbugUrl(e,i,r,t,n,s)},[e,i,r,t,n,s]),[c,u]=h$3(!1),d=_$3(createInitialCycleState());return p$6(()=>{if(l){if("PLAYING"!==a&&o){u(!1),d.current=createInitialCycleState();return}if(!(d.current.markers.length>0&&!o))return d.current=createInitialCycleState(),startFetchCycle(l,o,d,u)}},[l,o,a]),c},RallyTvCornerbugIcon=x$5(()=>{let[e,t]=h$3(""),i=`cb${v4().replace(/-/g,"")}`,n=`
130        .rallytv-cornerbug * {
131            transition: fill 0.4s linear, opacity 0.4s linear;
132        }
133        .rallytv-cornerbug.mono #${i}-white {
134            fill: #fff;
135        }
136        .rallytv-cornerbug.mono #${i}-black {
137            fill: rgba(0, 0, 0, 0);
138        }
139
140        .rallytv-cornerbug.mono #paint4_linear_2007_829 stop{
141            animation: stopColorTransitionToWhite 0.4s linear forwards;
142        }
143        @keyframes stopColorTransitionToWhite {
144            to {
145                stop-color: white;
146            }
147        }
148    `;return p$6(()=>{setTimeout(()=>{t("mono")},3e3)},[]),o$i("div",{"data-rbup-rallytv-cornerbug-icon":"true",children:[o$i("style",{children:n}),o$i("svg",{viewBox:"0 0 200 62",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`rallytv-cornerbug move-left ${e}`,children:[o$i("path",{d:"M126.577 44.4871C125.772 43.2401 125.33 41.7394 125.243 40.02H118.969C117.153 40.02 116.427 39.0924 116.786 37.2417L120.802 16.5163H114.16L110.227 36.8217C109.698 39.5606 109.943 41.7263 110.967 43.3101C112.017 44.9596 113.78 45.7821 116.252 45.7821H127.636C127.194 45.3577 126.849 44.9115 126.577 44.4871Z",fill:"white"}),o$i("path",{d:"M144.24 45.7865H133.709C131.237 45.7865 129.474 44.964 128.424 43.3145C127.4 41.7307 127.15 39.565 127.684 36.8261L131.622 16.5207H138.259L134.243 37.2461C133.884 39.0968 134.61 40.0244 136.426 40.0244H145.36L144.24 45.7865Z",fill:"white"}),o$i("path",{d:"M84.2864 45.7865H76.4854C73.4753 38.2742 72.1277 33.7021 72.4471 32.0658C72.6309 31.1164 73.4709 30.3201 74.9629 29.6857L75.5841 29.4188C78.1218 28.3162 79.5306 27.0168 79.8237 25.5161L79.9287 24.9648C80.095 24.116 79.9375 23.3854 79.4606 22.7772C78.9531 22.1297 78.2093 21.8059 77.2336 21.8059H76.6998C75.6979 21.8059 74.8272 22.1297 74.0834 22.7772C73.344 23.4247 72.8759 24.2385 72.6877 25.2142L68.7019 45.7865H62.0603L66.0899 25.0042C66.6106 22.3266 67.91 20.1565 69.997 18.4939C72.084 16.8313 74.4816 16 77.1986 16H78.3974C81.1144 16 83.2626 16.7307 84.8421 18.1876C86.5659 19.7758 87.1697 21.8803 86.6622 24.5054L86.5878 24.8861C85.8659 28.605 83.6739 31.1908 80.0031 32.6521C79.6312 32.8052 79.4256 32.9802 79.3862 33.1859C79.3599 33.3127 79.4081 33.5709 79.5218 33.9646C79.9812 35.706 81.5694 39.6437 84.2864 45.7865Z",fill:"white"}),o$i("path",{d:"M107.851 45.7865H101.057L100.842 39.7137H92.5423L89.9172 45.7865H83.4856L94.5724 20.6859C95.115 19.4696 95.9419 18.4283 97.0619 17.5663C98.3789 16.525 99.8183 16.0044 101.38 16.0044C103.043 16.0044 104.338 16.525 105.265 17.5663C106.027 18.4151 106.442 19.4564 106.508 20.6859L107.851 45.7865ZM100.615 34.2141L100.597 32.7309C100.58 31.7158 100.483 29.8432 100.317 27.1174C100.186 25.1749 100.173 23.7748 100.278 22.9129C100.308 22.6985 100.212 22.5891 99.9977 22.5891C99.7833 22.5891 99.6258 22.6985 99.5339 22.9129C99.3195 23.7004 97.9676 26.9731 95.4781 32.7309L94.8481 34.2141H100.615Z",fill:"white"}),o$i("path",{d:"M168.264 16.5163L156.442 34.5947C156.044 35.216 155.795 35.776 155.699 36.2704L153.852 45.7865H147.228L149.101 36.1173C149.193 35.636 149.175 35.041 149.048 34.3278L144.209 16.5163H150.908L152.058 21.084C152.457 22.6941 152.741 23.9148 152.912 24.7373C153.275 26.6012 153.428 28.1369 153.371 29.3444C153.371 29.5457 153.472 29.6507 153.673 29.6507C153.9 29.6507 154.036 29.5501 154.075 29.3444C154.767 27.275 156.228 24.5229 158.455 21.084L161.395 16.5163H168.264Z",fill:"white"}),o$i("path",{d:"M195.732 16.5382L193.684 20.6552C192.223 23.5823 191.225 26.0018 190.687 27.9181C190.661 28.045 190.578 28.1062 190.429 28.1062C190.289 28.1062 190.228 28.045 190.254 27.9181C190.434 26.1461 190.359 23.7266 190.035 20.6552L189.611 16.5119H173.795L173.103 20.0777H177.422L174.604 34.6122H178.699L181.517 20.0777H185.826L187.253 33.304C187.367 34.3847 187.997 34.9359 189.147 34.9534C189.611 34.9534 190.062 34.8266 190.504 34.5772C191.024 34.2797 191.418 33.8553 191.689 33.3084L199.998 16.5382H195.732Z",fill:"white"}),o$i("path",{id:`${i}-white`,d:"M166.86 34.9622C168.527 34.9622 169.879 33.6106 169.879 31.9433C169.879 30.276 168.527 28.9244 166.86 28.9244C165.193 28.9244 163.841 30.276 163.841 31.9433C163.841 33.6106 165.193 34.9622 166.86 34.9622Z",fill:"#ED2D29"}),o$i("path",{id:`${i}-white`,d:"M11.5198 45.6817C8.92785 41.7192 9.93342 38.8264 10.7632 37.4526C12.2646 34.9693 15.1351 33.9792 17.5196 34.0468V34.0448H22.585C22.7272 34.0428 22.8675 34.0408 23.0077 34.0388H23.0591C25.9237 34.0388 28.2549 31.6928 28.2549 28.8099C28.2549 25.927 25.9237 23.5809 23.0591 23.5809H0.00222778L0.00420335 51.4992C0.00617892 59.5792 8.70264 64.6213 15.6487 60.5713L25.7439 54.6843C20.4593 52.6881 14.0861 49.6044 11.5198 45.6817Z",fill:"url(#paint0_linear_2007_829)"}),o$i("path",{id:`${i}-white`,d:"M50.806 21.9267L15.6487 1.42841C8.70264 -2.62155 0.00617892 2.42251 0.00420335 10.5006V17.3698H23.0611C29.3296 17.3698 34.4305 22.5033 34.4305 28.8119C34.4305 35.1125 29.3454 40.238 23.0887 40.2539
148C20.5916 40.2957 19.2304 40.3036 18.4699 40.2977C15.8404 40.403 16.4449 42.095 17.0316 42.7332C19.4774 45.6439 26.953 48.7674 32.8401 50.5508L50.806 40.075C57.7343 36.035 57.7343 25.9667 50.806 21.9267Z",fill:"url(#paint1_linear_2007_829)"}),o$i("path",{id:`${i}-white`,d:"M18.2861 22.1057C19.2223 22.1057 19.9812 21.3419 19.9812 20.3998C19.9812 19.4577 19.2223 18.6939 18.2861 18.6939C17.35 18.6939 16.5911 19.4577 16.5911 20.3998C16.5911 21.3419 17.35 22.1057 18.2861 22.1057Z",fill:"#EA2A28"}),o$i("path",{id:`${i}-black`,d:"M17.0297 42.7312C16.4429 42.093 15.8384 40.4011 18.4679 40.2957C19.2285 40.3016 20.5896 40.2937 23.0868 40.2519C29.3434 40.236 34.4285 35.1105 34.4285 28.8099C34.4285 22.5013 29.3276 17.3678 23.0591 17.3678H0.00222778V23.5809H23.0591C25.9237 23.5809 28.2549 25.927 28.2549 28.8099C28.2549 31.6928 25.9237 34.0388 23.0591 34.0388H23.0077C22.8694 34.0408 22.7272 34.0428 22.585 34.0448H17.5196C15.1351 33.9772 12.2666 34.9673 10.7632 37.4526C9.93342 38.8244 8.92785 41.7192 11.5198 45.6817C14.0861 49.6024 20.4593 52.6861 25.7439 54.6863L32.8401 50.5488C26.951 48.7654 19.4754 45.6419 17.0297 42.7312Z",fill:"white"}),o$i("path",{id:`${i}-white`,d:"M18.2861 22.1057C19.2223 22.1057 19.9812 21.3419 19.9812 20.3998C19.9812 19.4577 19.2223 18.6939 18.2861 18.6939C17.35 18.6939 16.5911 19.4577 16.5911 20.3998C16.5911 21.3419 17.35 22.1057 18.2861 22.1057Z",fill:"#ED2D29"}),o$i("path",{id:`${i}-white`,d:"M23.0077 34.0389H23.0591C25.9237 34.0389 28.2548 31.6929 28.2548 28.81C28.2548 25.9271 25.9237 23.581 23.0591 23.581H0.00222778V24.7282L21.0875 27.0524C21.0875 27.0524 26.2082 27.4938 24.0054 31.6372C22.9722 33.5797 20.1985 33.9773 18.6872 34.0469H22.583C22.7272 34.0449 22.8675 34.0429 23.0077 34.0389Z",fill:"url(#paint2_linear_2007_829)"}),o$i("path",{id:`${i}-white`,d:"M11.5196 45.6818C8.92764 41.7193 9.9332 38.8265 10.7629 37.4526C10.7629 37.4507 10.7649 37.4507 10.7649 37.4487C9.91542 38.5899 7.47757 42.6041 10.7886 47.5288L19.4021 58.3824L25.718 54.6764C20.4393 52.6783 14.0819 49.5985 11.5196 45.6818Z",fill:"url(#paint3_linear_2007_829)"}),o$i("path",{d:"M15.6013 20.4178C15.6013 19.8512 15.7772 19.3243 16.0755 18.8889L0.00222778 20.1752V20.6206L16.0715 21.9428C15.7752 21.5054 15.6013 20.9825 15.6013 20.4178Z",fill:"url(#paint4_linear_2007_829)"}),o$i("defs",{children:[o$i("linearGradient",{id:"paint0_linear_2007_829",x1:"-3.70311",y1:"49.038",x2:"63.9924",y2:"-33.5806",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.0664","stop-color":"#EE3A34"}),o$i("stop",{offset:"0.4709","stop-color":"#ED4730"}),o$i("stop",{offset:"0.9536","stop-color":"#EC5C2A"})]}),o$i("linearGradient",{id:"paint1_linear_2007_829",x1:"-3.43594",y1:"64.2609",x2:"47.8962",y2:"22.6724",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.0664","stop-color":"#EE3A36"}),o$i("stop",{offset:"0.4709","stop-color":"#ED4731"}),o$i("stop",{offset:"0.9536","stop-color":"#EB5C2A"})]}),o$i("linearGradient",{id:"paint2_linear_2007_829",x1:"0.00222778",y1:"28.8149",x2:"29.8354",y2:"28.8149",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.206","stop-color":"#3F061B"}),o$i("stop",{offset:"1","stop-color":"#831628","stop-opacity":"0.7"})]}),o$i("linearGradient",{id:"paint3_linear_2007_829",x1:"9.10184",y1:"47.9164",x2:"25.718",y2:"47.9164",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.1161","stop-color":"#3F061B"}),o$i("stop",{offset:"1","stop-color":"#831628","stop-opacity":"0.7"})]}),o$i("linearGradient",{id:"paint4_linear_2007_829",x1:"0.0022267",y1:"20.4167",x2:"16.0755",y2:"20.4167",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.198","stop-color":"#EF4B30","stop-opacity":"0.1"}),o$i("stop",{offset:"0.9996","stop-color":"#F48128","stop-opacity":"0.5"})]})]})]})]})}),ServustvCornerbugIcon=()=>o$i("svg",{"data-rbup-servustv-icon":!0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1142.54 505.15",children:[o$i("defs",{children:o$i("style",{children:".cls-1{fill:#bd1212;}.cls-2{fill:#FFFFFF;}.cls-3{fill:#e9e9e9;}"})}),o$i("title",{children:"ServusTV_2015_RGB"}),o$i("path",{class:"cls-1",d:"M493.4,180.44c6.38,2,12.3,4.8,16.65,9.58,5.76,6.33,4.55,14.74,2.26,21.67-5.91,17.88-19.6,28.85-36.09,36.81-11.86,5.73-24.38,9.77-36.92,13.42-8.91,2.59-18.48,1.33-27.77.61-.83-.06-2-.16-1.89-1.16.5-5.2-4.27-5.53-7-7.68-1.19-.94-3.83-1-2.81-3.19.95-2,1.5-5.26,4.55-5.14a90.72,90.72,0,0,0,27.9-3.66,118.73,118.73,0,0,0,38-17.65c2.49-1.78,4.91-3.81,7.67-5,2.36-1,4.7-1.41,4.66-4.72,0-4-.29-8.1-4-10.51a16.25,16.25,0,0,0-6.87-2.34c-10.49-1.36-20.92-1-31.34.19-6.42.7-12.38,3.26-18.37,5.5-7,2.63-14.41,4.78-20.74,8.62-8.42,5.11-17.67,8.53-25.35,15.44-7,6.33-9.06,15.46-15.67,21.69-2,1.92-1.21,5.62-.59,8.19,1.44,5.94,2.43,12,3.82,17.89,2.29,9.75,9.41,16.43,15.74,23.59,6,6.77,14.08,10.83,20.82,16.65,7.39,6.38,15.37,12.11,23.23,17.93,6,4.47,13.26,7.48,18,13.56,8.26,10.65,18.25,19.87,25.31,31.54,6.66,11,9.63,23.06,10.57,35.52.84,11.17.87,22.43-3.19,33.36a90.94,90.94,0,0,1-18.06,29.51,142,142,0,0,1-45.62,33.81c-16.11,7.51-32.94,12.46-50.05,16.92a245.68,245.68,0,0,1-53.48,7.5A171,171,0,0,1,260.39,534c-12.93-3.12-25.63-6.72-37.89-11.81-15-6.25-28.27-14.74-37.21-29C180.1,484.85,174.38,477,171,467.62c-2.7-
1487.45-3.18-15.24-4.13-22.92a86.49,86.49,0,0,1,7.11-46,113.62,113.62,0,0,1,21-31.31c12.27-13.24,27.53-22.28,42.2-32.23,5.34-3.62,11.62-4.67,17.53-6.4s11.83-3.89,17.82-5.59c3.21-.91,6.3-1.84,9.71-1.8,9.34.12,9.28,0,8.08,9.43-.24,1.86-.91,2.33-2.72,2.67-12.29,2.27-23.09,7.95-33.29,15a150.65,150.65,0,0,0-28,25.24c-6.79,7.77-12.08,16.85-16.7,26.17-9.21,18.6-11.2,37.76-2.93,57.15,8.18,19.16,20.41,35.38,38.91,45.55,12.08,6.64,25.06,11.66,39.28,11.58,3.55,0,6.51,2.73,10.54,1.79-4.31-3.65-9.54-5.16-14.07-7.87-7.95-4.74-13.11-11.76-17.9-19.23-6-9.43-10.88-19.49-13.24-30.44-2-9.38-3.17-18.87-1.87-28.64,1.67-12.5,4.22-24.56,10.06-35.89C268.74,374,284,359.49,304.53,350.75c2-.86,4.33-1.49,6.71-2.28,2,8.16,3.2,15.73-1.69,23.72a70.7,70.7,0,0,1-7.21,9.52c-4.74,5.48-7,12.62-11.85,18.26-7,8.2-11.11,18.46-13.4,28.51a57.36,57.36,0,0,0,1.06,28.09c3.57,12.43,9.69,23.15,20.15,31.15a65,65,0,0,0,29.77,12.46c15.12,2.42,30.23,1.33,45-2.15,17.91-4.23,34.68-11.31,49.19-23.14a149.46,149.46,0,0,0,26-26.49c10.27-13.8,10.12-27.65,2-42.26-9.27-16.72-21.87-30.35-36.91-42-16.87-13.11-35.21-24.13-52-37.44-15.13-12-26-26.76-29.49-45.77-3.18-17.28.6-33.58,10.29-48.56,9.48-14.65,22.44-24.92,37.72-32.87,9.27-4.82,18.6-9.43,28.46-12.87a156.28,156.28,0,0,1,38.08-8c1.81-.16,11.87-2.22,22.2-2a106.65,106.65,0,0,1,24.73,3.8",transform:"translate(-32.86 -176.61)"}),o$i("path",{class:"cls-2",d:"M1175.4,581.06c-8.81-1.31-16.75-2.35-24.64-3.75a42.08,42.08,0,0,0-8.42-.66c-1.55,0-3.63-.65-4.21,1.58a5.51,5.51,0,0,0,1,5.14c2.23,2.76,4.27,5.67,6.62,8.81-3.72,1-6.05-1.28-8.45-2.17-12.76-4.71-26.12-6.59-39.28-9.53-13-2.89-26.31-3.64-39-8.66-7.59-3-16.44-3.3-24.64-2.35-9.78,1.12-18.67-2.29-28-3.49-9.68-1.25-19.23-2.81-29.1-2.81-10.08,0-20.15-1.88-30.24-2.64-20.89-1.57-41.79-2.8-62.73-3.44-10.7-.33-21.32-2.79-32-3.78-7.25-.67-14.53-.2-21.11,3.69a7.56,7.56,0,0,1-6.76.43c-5.21-2.6-10-1.11-14.76.59-4,1.41-7.49,0-10.87-1.6-3.58-1.66-7-3.65-11.06-3.77-.66,0-1.63.07-1.91-.3-3.79-5-5-1.22-6.34,1.83-1.08,2.49-2.55,3.07-5,1.74a11.31,11.31,0,0,0-11-.12c-4.72,2.43-9.8,1.23-14.64,2-14.69,2.41-29.55,1.44-44.31,2.62-5.74.46-11,1.43-15.81,4.53-2,1.26-3.83,1.74-6,.78-5.77-2.52-11.57-1.94-17.29.14a16.07,16.07,0,0,1-4.88.79c-14.68.7-29.36.77-44.06.77-14.11,0-28.57-.21-42.25,2.65-19.32,4-39,3.3-58.22,6.69-11.37,2-22.91,2.75-34.1,6.3-12.29,3.89-25.32,4.67-38.07,6.37-14.26,1.91-28.53,3.66-42.68,6.28-10.06,1.86-20,4.3-30.1,5.93-8.65,1.4-17.08,3.62-25.59,5.57a11.61,11.61,0,0,1-4.36-.26c-3.69-.51-7.39-1.29-10.81,1.77-1.85,1.66-4.72,2.21-7.5,2.07-9.2-.47-18,1.87-26.82,4-9,2.16-18,4-27,6-8.81,1.94-17.68,3.82-26.3,6.76-11.8,4-23.72,7.93-36.41,8a21.16,21.16,0,0,0-5.77,1.19c-2,.55-4.37,3.29-5.75-.89-.1-.31-1.9-.27-2.83-.06q-18.76,4.19-37,10.16c-20.87,6.81-41.08,15.45-62,22.1-17,5.41-34.2,10.51-52,13.16-2.72.41-6.43,1.62-7.8-1.27-1.54-3.26,2.52-4.39,4.5-5.94,2.56-2,6-2.55,8.85-4,11.61-6.09,24.19-9.46,36.45-13.78,15-5.28,30.36-8.46,45.78-11.92,12.73-2.86,25.25-6.89,37.74-10.92,16.46-5.32,32.54-11.68,49-17,9.2-3,18.46-5.87,27.7-8.74,10.48-3.25,21.31-5.35,32-7.93,7.83-1.89,15.67-3.79,23.52-5.61,12.17-2.82,24.35-5.55,36.52-8.38,7.86-1.83,15.65-4,23.56-5.59,13.71-2.78,27.24-6.34,41.1-8.5,10-1.55,19.73-4.19,29.67-5.84,16.3-2.72,32.44-6.33,48.91-8,6.58-.68,13-2.28,19.58-3.29,14.24-2.21,28.58-3.58,42.78-6.14,12.52-2.26,25.32-3,38-4.55,9.37-1.18,18.68-2.77,28-4,15.09-2,30.26-3.61,45.29-6,16.89-2.71,34-3.66,50.88-6.15,9.18-1.35,18.48-2.08,27.76-2.63,28.39-1.7,56.79-3.39,85.23-3.39,27.28,0,54.52,1.09,81.76,2.93,18.73,1.26,37.33,3.49,56,5.5,14.48,1.56,28.86,4.07,43.26,6.24,12.08,1.82,24.21,3.44,36.2,5.71,18,3.41,35.9,6.95,53.68,11.13,14.54,3.42,29,7.08,43.42,11.28,14.76,4.32,29,9.95,43.49,14.95.38.13.61.7,1.63,1.93",transform:"translate(-32.86 -176.61)"}),o$i("path",{class:"cls-2",d:"M703.56,428.62c3.83-4.64,5.45-10.09,6.9-15.26,2-7.24,6.52-13.08,9.52-19.73,3.6-8,8-15.65,12.18-23.39,12.14-22.44,25.25-44.14,46.69-59.23,1.66-1.17,3.19-2.9,5.59-2.78,2.78.13,6.08-.4,4.59,4.29a1.32,1.32,0,0,0,0,1c5.43,8.4-1.63,13.84-5.7,18.69-8,9.49-13,20.61-19.54,30.84a79.1,79.1,0,0,0-6.32,11c-1,2.3-9.93,17.25-13.7,25.27-4,8.61-8.9,24.74-12.26,32.88-4.33,10.49-8.15,21.49-16.09,30.06-4.78,5.16-10,9.79-18,8.39a26,26,0,0,0-4-.17c-11.63-.22-16.67-5.19-17.74-17-2.14-23.74-2.32-47.41.7-71.13,2.11-16.6,4-17.17,9.3-33a7.19,7.19,0,0,1,11.88-2.74,2.45,2.45,0,0,1,.6,3,14.59,14.59,0,0,0-1.11,5c-.19,1.56-.15,4,.8,4.73,5.48,4.28,1.35,14.16,3,19.17,3.23,10-.06,5.31,2.59,14.59,3.46,12.11-1.59,23.34.14,35.49",transform:"translate(-32.86 -176.61)"}),o$i("path",{class:"cls-2",d:"M724.22,316c-3.83-5.25-32.46-6.94-55.3,3.81-18.86,8.89-25.11,15.27-26,17.27-.32.67.84-4.07.15-6.65-.33-1.23-3.08-.88-4.61-.78-2.37.16-2.1-.93-5.26.65-1,.51-4.59-1.84-5,.05-1,5.06-1.7,19.81-6,32.48-7.4,21.64-30.65,57.1-52.9,79.48-7,7-29.63,28.9-47,18-4-2.49-4.1-8.34-4.48-13.29-1.29-16.66,4-27.31,10.44-42.19,1.16-2.69,2.25-2.86,4.94-4,4-1.73,8.05-3.54,12.14-5.17,11.36-4.54,21.86-9.2,31.72-16.5,11.19-8.28,20.36-14.35,29.44-29.58,7.82-13.1,9.28-37.82-11.1-39.82-19.79-1.95-45.7,13.84-59,28.25-16.29,17.69-16.51,25.64-25.42,43.68a10.55,10.55,0,0,1-1.39,2.16c-2.79,3.75-7.66,5.47-11.62,6.35-3,.66-7.47,2.57-5,4.87,3.52,3.27,1.31,7.07,5.18,7.07,4.92,0,1.15,6.61.44,9.11-4.76,16.81-6.89,33.75-2.62,51,2.15,8.66,7.08,15.45,15.37,19.42,11.42,5.46,30.8,1.82,41.67-2.79,28.06-11.9,59.36-56.2,60.19-62.33-2.92,17.84-7.14,32.78-9.41,49.21-.89,6.45,5.37,9.58,13.33,11.41,3.29.76,9.86-6,12.5-3,1,1.11,3.25-1.26,3.18-2.93-.13-3.39-.8-3.78-1.32-11.94a131.39,131.39,0,0,1,1.46-18.35c.62-3,4.8-23.48,4.47-27.09-.52-5.62,1.17-6.18,1.81-14,2.24-27.34,15.83-42.86,22-48.76,31.91-30.34,59.31-23.6,60.72-22.55,3.95,2.93,5.53-5.42,3.45-7.42-2.3-2.21-.8-4.52-1.21-5.08M587.5,330.5c18.42,17.5-53.94,54.76-46.75,39,12.49-27.39,41.21-44.26,46.75-39",transform:"translate(-32.86 -176.61)"}),o$i("path",{class:"cls-2",d:"M847,358.24c.58-4,.36-8.49,1-12.32,1.34-8.44,9.23-15.62,15.45-21.08,2.87-2.52,4.48-6.14,7.79-8.51,2.46-1.77,5-2.81,7.13-1.46s.48,35.38-8.43,65.48C860.23,412.89,857,422.9,850.5,441c-1.83,5.14,1.07,5,3.32,3.92,7.05-3.29,29.32-38.59,37-55.53,5.52-12.24,16.16-34,22.15-50.12,2.91-7.84,5.89-16.6,11.95-25.11,1.41-2,5.06-8.33,23.84-8.66,3.33-.06-.13,9.22,5.49,7.11,1.75,0-.33,4.2-5.55,9.07-9.26,8.63-14.1,24.51-10.81,36.8,3.14,11.71,18.24,25.14,26.62,33.62,13.46,13.62,15.23,30.27,13,47.62-1.31,10.31-8.26,18.22-16.53,24.42
148s-17.82,10.54-27.21,14.3c-9.64,3.85-19.73,6.8-29.51,10.53a11.77,11.77,0,0,1-9.24-.58c-3.61-1.82-7.28-1.58-11.1-.44-3.49,1-7.12,1.4-11-.46,4-5.81,10-7.82,15.67-10,17.86-6.77,33.88-16.53,49-28.15a45.71,45.71,0,0,0,10.31-11.79c6.16-9.45,4.49-20.16-4.2-31.77-7.33-9.8-17.27-17.71-22.89-28.68a74.9,74.9,0,0,1-4-9.94c-3.77,8.28-6.61,14.12-10.33,22.2-23.6,60.64-49.5,79.45-58.25,73.5-2.4-1.36-2.73-5.49-6.7-5.5-4.14,0-3.52,2.35-8,5.83s-9.74,6.39-28.2,6.9c-4.87.13-12.11-.53-18.56-4.33a35.05,35.05,0,0,1-15.91-19.62c-4.78-15.28-6.2-30.23-2.6-46.26,4.06-18.11,7.21-29.35,17.64-46l2.78-5.29c2.55-6.05,6.85-11,9.11-17.31,2-5.71,7-10,12.1-13.47,3.31-2.27,7.33-2.09,11-.26,2.6,1.31,2.63,4,2.68,6.51a4.49,4.49,0,0,1-1.37,3.54c-6.39,6.49-10.79,14.11-11.69,23.27-.32,3.25-3.4,4.58-5.35,9-.44,1-1.32,3.17-1.66,3.77-.52.9-.18,2.31-1,4.09-3,6.38-8.2,15.26-11.46,26.16-1.31,4.41-1.25,10.3-2.19,14.74-3.4,16.09-3.66,42.1,15.93,42.75,15.68.52,39.84-76.8,42.2-93.14",transform:"translate(-32.86 -176.61)"}),o$i("path",{class:"cls-3",d:"M287.63,333.52a5.81,5.81,0,0,0,1.36-.39,11.35,11.35,0,0,0-1.36.39,67,67,0,0,0-8.45,2.15c-8.9,2.87-17,7.45-24.84,12.81a150.66,150.66,0,0,0-28,25.24c-6.79,7.77-12.08,16.85-16.7,26.17-9.21,18.6-11.2,37.76-2.93,57.15,8.18,19.16,20.41,35.37,38.91,45.55,12.08,6.64,25.06,11.66,39.28,11.58,3.55,0,6.51,2.73,10.54,1.79-4.31-3.65-9.54-5.16-14.07-7.87-7.95-4.74-13.11-11.76-17.9-19.23-6-9.43-10.88-19.49-13.24-30.44-2-9.38-3.17-18.87-1.87-28.64,1.67-12.5,4.22-24.56,10.06-35.89C268.73,374,284,359.52,304.52,350.77c2-.86,4.33-1.49,6.71-2.28h0a10.24,10.24,0,0,0-.42-1.15s-5.09-10.07-10.12-12.59A16.58,16.58,0,0,0,289,333.13",transform:"translate(-32.86 -176.61)"}),o$i("path",{class:"cls-2",d:"M1098.94,368.23l-14,45.17c-1.84,5.52-2.32,10.92-3.54,16.43h-.31c-1.39-5.39-2.16-10.78-4.16-16.18L1063,368.23H987.27V385.8h18v77h22.95v-77h16.39l27.35,77h18.78L1123,368.23Z",transform:"translate(-32.86 -176.61)"})]}),cornerbugIcon={rallytv:RallyTvCornerbugIcon,stv:ServustvCornerbugIcon,rbtv:RbupVideoDefaultCornerbugIcon},Cornerbug=x$5(({tenant:e})=>{var t;let{playerState:{mediaMetaData:i,playerStatus:n,playerConfiguration:r}}=usePlayerContext(),o=i,a=(null==o?void 0:o.videoId)??"",s=(null==(t=null==o?void 0:o.videoDetails)?void 0:t.locale)??"",l=(null==o?void 0:o.userCountry)??"",c=!!(null!=o&&o.isLinearStream),u=(null==r?void 0:r.environment)??"PRODUCTION";return useShowCornerbug({tenant:e,videoId:a,locale:s,deviceGroup:(null==o?void 0:o.deviceGroup)??"",userCountry:l,isLinearStream:c,playerStatus:n,environment:u})?o$i(cornerbugIcon[e],{}):null}),getTenantCornerbugComponent=e=>()=>o$i(Cornerbug,{tenant:e}),style=".product-placement{top:26px;left:72px}.cq-650 .product-placement,.cq-1000 .product-placement{top:20px;left:72px}[data-rbup-stv-product-placement]{display:flex;width:130px;height:20px}.cq-650 [data-rbup-stv-product-placement]{width:198px;height:29px}",ServustvProductPlacement=()=>o$i(k$5,{children:[o$i("style",{children:style}),o$i("div",{"data-rbup-stv-product-placement":!0,children:o$i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 859 132",children:[o$i("defs",{children:o$i("style",{children:".st0{stroke:#FFFFFF;stroke-width:4;stroke-miterlimit:10;}.st1{fill:#FFFFFF;}"})}),o$i("title",{children:"ServusTV_Product_Placement"}),o$i("g",{id:"Layer_3",children:[o$i("rect",{x:"29",y:"32",class:"st0",width:"72",height:"72"}),o$i("rect",{x:"121",y:"32",class:"st0",width:"711",height:"72"}),o$i("g",{children:o$i("path",{class:"st1",d:`M64.8,73.9h-6.7v15.4h-7.9V47.1H64c10,0,15.3,4.9,15.3,13C79.3,69,73.8,73.9,64.8,73.9z M64.1,53.8h-6v13.6
149			h6.6c4.5,0,6.5-3.7,6.5-7.1C71.2,56.8,68.7,53.8,64.1,53.8z`})}),o$i("g",{children:[o$i("path",{class:"st1",d:`M155.8,73.9h-6.7v15.4h-7.9V47.1H155c10,0,15.3,4.9,15.3,13C170.3,69,164.8,73.9,155.8,73.9z M155.1,53.8h-6
150			v13.6h6.6c4.5,0,6.5-3.7,6.5-7.1C162.2,56.8,159.7,53.8,155.1,53.8z`}),o$i("path",{class:"st1",d:`M201.3,89.3l-8-17h-6.6v17h-7.9V47.1h14.4c9.9,0,14.5,4.5,14.5,12.3c0,5.6-2.7,9.7-7.1,11.3v0.1
151			c0.5,0.9,1.9,3.7,3.2,6.3l6,12.2C209.8,89.3,201.3,89.3,201.3,89.3z M192.9,53.8h-6.3v11.9h6.3c5,0,6.5-3.3,6.5-6.3
152			C199.5,55.9,197.1,53.8,192.9,53.8z`}),o$i("path",{class:"st1",d:`M233.7,90c-11.3,0-18.4-8-18.4-21.8c0-13.7,7.2-21.8,18.4-21.8s18.4,8.1,18.4,21.8C252.1,82,245,90,233.7,90z
153			 M233.7,53.3c-6.1,0-10.3,5.5-10.3,14.9c0,9.5,4,14.9,10.3,14.9c6.2,0,10.2-5.4,10.2-14.9C244,58.8,239.8,53.3,233.7,53.3z`}),o$i("path",{class:"st1",d:`M275.1,89.3h-13.5V47.1h13.8c10.8,0,18.9,7.4,18.9,20.8C294.3,81.5,286.8,89.3,275.1,89.3z M274.9,53.8h-5.3
154			v28.9h5.3c6.6,0,11.3-5,11.3-14.4C286.2,58.8,281.5,53.8,274.9,53.8z`}),o$i("path",{class:"st1",d:`M319.4,90c-9.8,0-15.8-5.1-15.8-14.6V47.1h7.9v27.5c0,5,2.3,8.5,7.9,8.5s7.8-3.5,7.8-8.5V47.1h7.9v28.2
155			C335.1,84.9,329.2,90,319.4,90z`}),o$i("path",{class:"st1",d:`M369.9,89.3l-5.4-9.7c-2.3-4-4.8-8.7-5.6-10.4h-0.1l-4.4,6.3v13.8h-7.9V47.1h7.9v17.2h0.1
156			c1-1.9,3.5-5.5,5.4-8.1l6.9-9.2h9l-12.3,15.9l15.2,26.2h-8.8V89.3z`}
156),o$i("path",{class:"st1",d:"M400.7,53.8v35.5h-7.9V53.8h-12v-6.6h31.8v6.6H400.7z"}),o$i("path",{class:"st1",d:`M434.4,73.9h-6.7v15.4h-7.9V47.1h13.9c10,0,15.3,4.9,15.3,13C448.9,69,443.5,73.9,434.4,73.9z M433.7,53.8h-6
157			v13.6h6.6c4.5,0,6.5-3.7,6.5-7.1C440.8,56.8,438.4,53.8,433.7,53.8z`}),o$i("path",{class:"st1",d:"M457.3,89.3V47.1h7.9v35.5h17.5v6.6h-25.4V89.3z"}),o$i("path",{class:"st1",d:`M513.4,89.3l-2.5-9.1H497l-2.5,9.1h-7.6l12.5-42.2h9.5l12.5,42.2H513.4z M509.4,74.1l-1.5-5.3
158			c-1.5-5.7-3.3-12.5-3.8-15.1H504c-0.6,2.6-2.4,9.4-3.9,15.1l-1.5,5.3H509.4z`}),o$i("path",{class:"st1",d:"M541.6,53.8v35.5h-7.9V53.8h-12v-6.6h31.8v6.6H541.6z"}),o$i("path",{class:"st1",d:`M557.9,89.3v-6l14.7-22.8c1.1-1.5,3.2-4.5,4.8-6.6v-0.1h-17.7v-6.6h26.7v6.1l-14.5,22.6
159			c-1,1.5-3.2,4.5-4.9,6.7v0.1h20.3v6.6H557.9z`}),o$i("path",{class:"st1",d:"M595.9,89.3V47.1h7.9v42.2H595.9z"}),o$i("path",{class:"st1",d:"M615.5,89.3V47.1h25.9v6.6h-18v10.5H639v6.3h-15.6v12.1h19.2v6.6h-27.1V89.3z"}),o$i("path",{class:"st1",d:`M674.1,89.3l-8-17h-6.6v17h-7.9V47.1H666c9.9,0,14.5,4.5,14.5,12.3c0,5.6-2.7,9.7-7.1,11.3v0.1
160			c0.5,0.9,1.9,3.7,3.2,6.3l6,12.2C682.6,89.3,674.1,89.3,674.1,89.3z M665.7,53.8h-6.3v11.9h6.3c5,0,6.5-3.3,6.5-6.3
161			C672.3,55.9,669.8,53.8,665.7,53.8z`}),o$i("path",{class:"st1",d:`M706.4,90c-9.8,0-15.8-5.1-15.8-14.6V47.1h7.9v27.5c0,5,2.3,8.5,7.9,8.5s7.8-3.5,7.8-8.5V47.1h7.9v28.2
162			C722.2,84.9,716.2,90,706.4,90z`}),o$i("path",{class:"st1",d:`M758.9,89.3l-10.8-17.1c-2.5-3.8-5.5-8.7-6.8-11.1h-0.1c0.1,2,0.2,6.8,0.2,10.7v17.5h-7.9V47.1h7.1l10.9,17.2
163			c2.3,3.6,5.3,8.6,6.6,11h0.1c-0.1-1.5-0.2-6.3-0.2-10.8V47.1h7.9v42.2H758.9z`}),o$i("path",{class:"st1",d:`M803.7,89.3l-1-3.3h-0.1c-2.4,2.1-6,4-9.4,4c-11.5,0-17.8-7.6-17.8-21.7c0-13.5,8.2-21.8,20.3-21.8
164			c5.3,0,7.6,0.8,10.8,2l-2.3,6.4c-2.8-1.1-4.7-1.5-8.7-1.5c-6.8,0-12,5.6-12,14.9c0,9.6,3.4,14.9,10.3,14.9c2.7,0,5.8-1.2,7.7-2.6
165			v-6.8h-7.1v-5.7h14.3v21.2H803.7z`})]})]})]})})]}),RALLYTV_FEEDBACK_URL="https://help.rally.tv/hc/en-us",RBTV_FEEDBACK_URL="https://www.redbull.com/at-de/support-and-contact",STV_FEEDBACK_URL="https://www.servustv.com/allgemein/p/kontakt";function useTvStreamingConfig(e){let{_debug:t,assetId:i,autoplay:n,collectionId:r,customDataLayer:o,dataZoomBuildVersion:a,dataZoomConfigId:s,dfpGdpr:l,dfpGdprConsent:c,entitlements:u,environment:d,hooks:h,locale:p,muted:f,overrideAudioLanguage:m,overrideSubtitleLanguage:g,overrideTranslationLanguage:v,poster:y,productPlacement:b,relatedVideos:S,skipCosmosFontInjection:_,tenant:E}=e,T=F$4(()=>new QueryParamUrlSharingStrategy,[]),[w,A]=h$3(void 0),P=F$4(()=>()=>getTenantCornerbugComponent(E),[E]),I=F$4(()=>{switch(E){case"rallytv":return RALLYTV_FEEDBACK_URL;case"stv":return STV_FEEDBACK_URL;default:return RBTV_FEEDBACK_URL}},[E]),C=F$4(()=>"stv"===E?"Servus TV":"Red Bull",[E]),M=F$4(()=>"stv"===E?{ProductPlacementComponent:ServustvProductPlacement,displayTimeInSec:3}:void 0,[E]),R=F$4(()=>{switch(E){case"stv":return"https://player-images.redbull.com/image/upload/{op}/stvFallback_rhn2j9.jpg";case"rallytv":return"https://player-images.redbull.com/image/upload/{op}/rallyFallback_d6hoeh.jpg";default:return}},[E]),k=F$4(()=>{let e={tenant:E,locale:p};return"rallytv"===E?e:{...e,optout:l,gdpr:c,entitlements:u}},[E,p,l,c,u]);return p$6(()=>{A({_debug:t,adMarkerEnabled:"ACTIVE",assetId:i,autoplay:isTrueValue(n),collectionId:r,resolveCornerbug:P,environment:d,enableErrorReporting:!0,componentName:"rbup-video-tv-streaming",hooks:h,muted:f,posterImageUrl:y,relatedVideos:S,feedbackUrl:I,videoDetails:"visible",initialSeekTimeInSec:T.determineInitialSeek(i),tracking:createTrackingConfig({assetId:i,dataZoomBuildVersion:a,dataZoomConfigId:s,customDataLayer:o,tenant:E}),skipCosmosFontInjection:isTrueValue(_),mediaSessionArtist:C,customFallbackPosterImageUrl:R,cast:k,overrideAudioLanguage:m,overrideSubtitleLanguage:g,overrideTranslationLanguage:v,productPlacement:b,productPlacementComponentDefinition:M})},[t,i,n,k,r,o,R,d,a,s,I,h,C,f,m,g,v,y,S,P,_,E,T,b,M]),{urlSharingStrategy:T,config:w,setConfig:A}}let log$6=loglevelExports.getLogger("useTvVideoApi"),publicPlayerEventTypesAsString=[...publicPlayerEventTypes];function useTvStreamingVideoApi(e,t){let i=_$3([]),n=F$4(()=>e=>{if(publicPlayerEventTypesAsString.includes(e.type))for(let t of i.current)try{t(e)}catch(e){log$6.error("error invoking public event listener",e)}},[i]);p$6(()=>(e&&e.addEventListener(n),()=>{null==e||e.removeEventListener(n)}),[n,e]);let r=F$4(()=>e?{...e,addEventListener(e){i.current.includes(e)||i.current.push(e)},removeEventListener(e){let t=i.current.findIndex(t=>t===e);-1!==t&&i.current.splice(t,1)}}:{},[e]);return A$3(t,()=>r,[r]),{tvVideoApi:r,forwardingListener:n}}async function fetchSsdmTvLiveStatus(e,t,i,n,r){let o="/tv/live-status",a={videoId:e,locale:t,tenant:i},s=calculateSsdmUrl(n,r),l=await fetch(`${s}${o}?${new URLSearchParams(a)}`);if(l.ok)return{response:await l.json(),correlationId:l.headers.get("x-correlation-id")??void 0};throw Error(`server returned ${l.status}`)}let log$5=loglevelExports.getLogger("TvLiveStatusDataloader");function mapStvPhase(e){switch(e){case"pre":return"pre";case"post":return"post";case"trim":return"trim";case"live":return"live";case"canceled":return"canceled";case"unconfirmed":return"unconfirmed";default:return log$5.warn("unknown live status phase code %s",e),"pre"}}class TvLiveStatusDataloader{constructor(e,t,i){this.tenant=e,this.locale=t,this.prNumber=i}async loadLiveStatus(e,t){var i;let{response:n,correlationId:r}=await fetchSsdmTvLiveStatus(e.assetId,this.locale,this.tenant,e.environment,this.prNumber),o=mapStvPhase(n.code);return{title:n.title,subtitle:n.subtitle,phase:o,startTime:n.startTime,endTime:n.endTime,shouldKeepPolling:shouldPollInPhase(o),_meta:{serverTime:null==(i=n._meta)?void 0:i.serverTime,correlationId:r}}}}function calculatePlayability(e,t){let i=new Date().getHours();return i>=e||i<t}function extendPlayabilityErrors(e){return e.maturityRestriction?calculatePlayability(e.maturityRestriction.minEveningHour,e.maturityRestriction.maxMorningHour)?{playabilityErrors:e.playabilityErrors,playabilityErrorDetails:e.playabilityErrorDetails}:{playabilityErrors:[...e.playabilityErrors,"FSK_BLOCKED"],playabilityErrorDetails:{...e.playabilityErrorDetails,FSK_BLOCKED:e.maturityRestriction}}:{playabilityErrors:e.playabilityErrors,playabilityErrorDetails:e.playabilityErrorDetails}}let log$4=loglevelExports.getLogger("resolveContentEntitlements");
165function resolveContentEntitlements(e){try{if(!e)return;let t=JSON.parse(e).content;if(!Array.isArray(t))return;let i=Object.values(t).map(e=>e.id).filter(e=>void 0!==e&&"string"==typeof e);return 0===i.length?void 0:i.join(",")}catch(e){log$4.error("Failed while parsing the passed in entitlements",e);return}}function resolveCurrentlyPlayedAssetId(e){let t=new Date,i=e.cards.find(e=>{let i=new Date(e.start_time),n=new Date(e.end_time);return t>=i&&t<=n});return null==i?void 0:i.id}let TV_API_BASE_URL_PRODUCTION="https://tv-api.redbull.com",TV_API_BASE_URL_STAGING="https://tv-api-qa.redbull.com";function calculateTvApiUrl(e){switch(e){case"PRODUCTION":return TV_API_BASE_URL_PRODUCTION;case"STAGING":return TV_API_BASE_URL_STAGING;default:throw Error("unknown server environment")}}let SESSION_ENDPOINT="session",GET_SESSION_ENDPOINT_VERSION="v3",CATEGORY="personal_computer",OS_FAMILY="http";async function fetchSessionFromTvApi(e){let{environment:t,locale:i,tenant:n}=e,r=new URLSearchParams({namespace:n,locale:i,category:CATEGORY,os_family:OS_FAMILY});try{let e=`${calculateTvApiUrl(t)}/${GET_SESSION_ENDPOINT_VERSION}/${SESSION_ENDPOINT}?${r.toString()}`,i=await fetch(e);if(i.ok)return await i.json();throw Error(`TV API GetSession server returned ${i.status}`)}catch(e){console.error("Error while fetching TV API GetSession metadata",e);return}}let FALLBACK_DEVICE_GROUP="group_5";async function resolveDeviceGroupAndLocale(e){let{deviceGroup:t,environment:i,locale:n,playerMode:r,tenant:o}=e;if("embed"===r){let e=await fetchSessionFromTvApi({environment:i,locale:n,tenant:o});return null!=e&&e.device_group&&e.locale?{deviceGroup:e.device_group,locale:e.locale}:{deviceGroup:FALLBACK_DEVICE_GROUP,locale:n}}if(!t)throw Error('The "deviceGroup" parameter is missing but required. Please provide a deviceGroup.');return{deviceGroup:t,locale:n}}async function fetchPlayApiInitMetadata(e){if(e)try{let t=await fetch(e);if(t.ok)return await t.json();throw Error(`Play API init server returned ${t.status}`)}catch(e){console.error("Error while fetching play api metadata",e);return}}let DTV_COOKIE_NAME="dtv_spoof",VIEWER_COUNTRY_HEADER="Akamai-Viewer-Country";async function fetchSsdmMetadata(e,t,i,n,r,o,a,s,l,c){let u={videoId:e,deviceGroup:i,locale:t,tenant:r,playerMode:o};a&&(u.collectionId=a),s&&(u.entitlements=s);let d=calculateSsdmUrl(n,l),h=await fetch(`${d}/tv?${new URLSearchParams(u)}`,{headers:{...calculateCachingHeaders(c),...resolveCountrySpoofHeader(n,DTV_COOKIE_NAME,VIEWER_COUNTRY_HEADER)}});if(h.ok)return await h.json();throw Error(`server returned ${h.status}`)}class FetchTvApiGuidesError extends Error{constructor(e,t){super(t),this.status=e}}async function fetchTvApiGuidesMetadata(e,t=!1){if(e)try{let i=await fetch(e,{cache:t?"no-store":"default"});if(i.ok)return await i.json();throw new FetchTvApiGuidesError(i.status,`TV API Guides server returned ${i.status}`)}catch(e){e instanceof FetchTvApiGuidesError&&403===e.status?console.warn("Error while fetching TV API Guides metadata",e):console.error("Error while fetching TV API Guides metadata",e);return}}let HLS_MEDIA_TYPE="application/vnd.apple.mpegurl";class TvStreamingDataLoader{constructor(e,t,i,n,r,o){this.tenant=e,this.locale=t,this.deviceGroup=i,this.playerMode=n,this.entitlements=r,this.prNumber=o}async loadData(e,t){if(!this.locale)throw Error('The "locale" parameter is missing but required. Please provide a locale.');let{deviceGroup:i,locale:n}=await resolveDeviceGroupAndLocale({deviceGroup:this.deviceGroup,environment:e.environment,locale:this.locale,playerMode:this.playerMode,tenant:this.tenant}),r=resolveContentEntitlements(this.entitlements),o=await fetchSsdmMetadata(e.assetId,n,i,e.environment,this.tenant,this.playerMode,e.collectionId,r,this.prNumber,t),a=createEaseLiveConfigFromInput(o,n),s=extendPlayabilityErrors(o),l={aspectRatio:o.aspectRatio,assetId:o.assetId,assetType:o.assetType,chapter:o.chapter,contentColor:o.contentColor,description:o.description,dfpAdvertisingConfig:o.dfpAdvertisingConfig,duration:o.duration,easeLiveConfig:a,gfkClipType:o.gfkClipType,gfkPlayerId:o.gfkPlayerId,gfkTrackingEnabled:o.gfkTrackingEnabled,interactiveStats:o.interactiveStats,isLinearStream:o.isLinearStream,label:o.label,mediaSrc:{videoUrl:o.videoUrl,mediaType:o.videoMediaType},posterImageUrl:o.poster,season:o.season,thumbnailSprites:o.thumbnailSprites,title:o.title,userCountry:o.userCountry??null,isCastable:o.isCastable,videoId:o.videoId,videoDetails:{...o.videoDetails,locale:n},globalKeyboardNavigation:o.globalKeyboardNavigation,reduceAdsToastLink:o.reduceAdsToastLink,bookmarkAllowed:o.bookmarkAllowed,nextUp:o.nextUp,maturityRating:o.contentMaturityRating,availableAudioLanguages:o.availableAudioLanguages,availableSubtitleLanguages:o.availableSubtitleLanguages,contentType:o.contentType,cueTag:o.cueTag,activateHeatmapTracking:o.activateHeatmap,heatmapData:o.heatmap,playabilityErrorDetails:s.playabilityErrorDetails,playabilityErrors:s.playabilityErrors,isLive:o.isLive,shouldPhase:o.shouldPhase,shareUrl:o.shareUrl,showProductPlacement:"stv"===this.tenant?o.showProductPlacement:void 0,tvApiGuidesUrl:o.tvApiGuidesUrl,deviceGroup:i,currentSunrise:o.currentSunrise,currentSunset:o.currentSunset,maturityRatingChimeUrl:o.maturityRatingChimeUrl},[c,u]=await Promise.all([fetchPlayApiInitMetadata(o.playApiInitUrl),fetchTvApiGuidesMetadata(o.tvApiGuidesUrl)]);return{...l,...c&&{mediaSrc:{...l.mediaSrc,videoUrl:c.manifest_url,mediaType:c.manifest_url?HLS_MEDIA_TYPE:void 0}}
165,...u&&{dfpVidPropertyOverride:resolveCurrentlyPlayedAssetId(u)}}}}let commonStyles='@charset "UTF-8";.event-breakdown{background-color:#000f1e;z-index:3;width:100%;min-height:127px}.event-breakdown iframe{width:100%}@media (orientation: landscape) and (max-height: 650px){.streaming-info--outside-content{max-height:300px}}.streaming-info-content__content{display:flex;flex-flow:column wrap;gap:40px;padding:20px;background-color:#000f1e}.streaming-info-content__image{max-width:367px;max-height:166px;border-radius:12px;object-fit:cover}@media (orientation: landscape) and (max-height: 650px){.streaming-info-content__image{display:none}}.streaming-info-content__details{display:flex;flex-direction:column;justify-content:space-between;gap:16px;width:100%;--cosmos-title-font-family: var(--rbup-component-font-family, $default-font-family)}.streaming-info-content__badges{display:flex;gap:16px;flex-flow:row wrap}.tv-api-header-badges{display:flex;flex-flow:row wrap}.tv-api-header-badges__badge:not(:last-child):after{content:"\xb7";color:#fff9;margin:0 8px}.cq-1000 .streaming-info-content__content{flex-direction:row}.cq-1000 .streaming-info-content__details{flex-basis:280px;flex-grow:7}.cq-1000 .streaming-info-content__buttons{flex-basis:135px;flex-grow:2}.streaming-information__panel-hover .streaming-info-content{padding:16px}.streaming-information__panel-hover .streaming-info-content .streaming-info-content__content{border-radius:16px}.streaming-sidebar{display:flex;flex-direction:column;height:100%;background-color:#000f1e;width:fit-content}.streaming-sidebar__close-button{flex-shrink:0;margin:8px;align-self:flex-end}.streaming-sidebar__content{flex:1;overflow-y:auto;overflow-x:hidden}.interactive-stats-content{height:100%;background-color:#000f1e;display:flex;flex-direction:column;min-width:350px;min-height:246px;scrollbar-width:none;-ms-overflow-style:none}.interactive-stats-content::-webkit-scrollbar{display:none}.interactive-stats-content__tabs{display:flex;gap:8px;padding:8px;overflow-x:auto;overflow-y:hidden;flex-shrink:0;scrollbar-width:none;-ms-overflow-style:none}.interactive-stats-content__tabs::-webkit-scrollbar{display:none}.interactive-stats-content__iframe{flex:1;width:100%;position:relative;border:0}.cq-1000 .interactive-stats-content{overflow-y:scroll;overflow-x:hidden;margin:0;height:100%;border-radius:0}.linkout-button .animated-container{height:100%}.linkout-button .animated-container .animated-container__reference-wrapper{width:fit-content}.linkout-button .animated-container .animated-container__reference-wrapper>*{margin-right:16px}.linkout-button .animated-container .cosmos-button{gap:0}.linkout-button__text-container{--cosmos-text-color: #FFFFFF}.linkout-button__icon{margin:-12px;transition:margin-right .5s}.linkout-button--expanded .linkout-button__icon{margin-right:0}',rallyTvStyles=".themed-player-root{--rbup-container16x9-background-color: #1a1a1a;--rbup-override-gradient-color: 26 26 26;--rbup-component-font-family: Saira, Helvetica, sans-serif;--rbup-primary-color: #fc4c02;--rbup-play-button-background-color: #fc4c02;--rbup-play-button-background-hover-color: #b13501}",stvStyles='.themed-player-root{--rbup-component-font-family: "Noto Sans", "Bull Text", helvetica, sans-serif;--cosmos-title-line-height: normal;--rbup-tooltip-font-family: "Noto Sans", "Bull Text", helvetica, sans-serif;--cosmos-button-font-family: "Noto Sans", "Bull Text", helvetica, sans-serif;--rbup-primary-color: #C30F24;--rbup-play-button-background-color: #C30F24;--rbup-play-button-background-hover-color: #DE1129;--rbup-override-gradient-color: 21 22 25;--rbup-tooltip-background: #151619}',log$3=loglevelExports.getLogger("AccountService"),INTERVAL_BETWEEN_SAVE_CALLS_IN_SEC=5,MAX_ERROR_COUNT_FOR_RECONNECT=5;class AccountService{constructor(e){Si(this,"playerCoordinator"),Si(this,"socket"),Si(this,"lastSendingTimestamp",0),Si(this,"errorCount",0),Si(this,"socketUrl"),Si(this,"queryParams"),Si(this,"playerEventListener",e=>{var t;switch(e.type){case"playing":(null==(t=this.playerCoordinator)?void 0:t.getPlaybackMode())==="VOD"&&this.startWebSocket();break;case"paused":case"playbackFinished":case"sourceUnloaded":case"error":this.stopWebSocket();break;case"timeChanged":this.sendTimeUpdate(e)}}),this.accountSdk=e;const t=e.getConfig(),i=new URL(t.bookmarksApiUrl);this.socketUrl=`wss://${i.host}/ws/bookmark/save`,this.queryParams={namespace:t.namespace}}async onBeforeLoad(e,t,i){if(!isVideoPlayerCoordinator(i))throw Error("wrong type of player coordinator");if(!isVideoPlayerConfig(e))throw Error("wrong type of player config");if(this.playerCoordinator=i,i.addEventListener(this.playerEventListener),log$3.debug("calling account preload hook",e),e.initialSeekTimeInSec)return e;let n=stripOffLocaleFromCrepoIdOrReturnOriginalIfNotRrn(e.assetId);try{let t=this.accountSdk.getUser();if(t){let i=await this.getUserBookmarks(n,t);log$3.debug("got bookmarks",i);let r=i[n];if(r&&!r.isComplete)return{...e,initialSeekTimeInSec:r.playhead/1e3}}}catch(e){log$3.warn("error during fetching user bookmarks for",n,"Error: ",e)}return e}async getUserBookmarks(e,t){return await this.accountSdk.getUserBookmarks(e)}async destroy(e,t,i){return this.stopWebSocket(),i.removeEventListener(this.playerEventListener),this.playerCoordinator=void 0,this.errorCount=0,this.lastSendingTimestamp=0,e}buildWebsocketUrl(){if(!this.socketUrl)throw Error("dont have websocket url");let e=this.accountSdk.getUser();if(!e)throw Error("dont have user");let t=new URLSearchParams(this.queryParams);return t.set("uid",e.userTokens.uid),t.set("token",e.userTokens.id_token),`${this.socketUrl}?${t.toString()}`}startWebSocket(){if(!this.accountSdk.getUser())return;if(!this.socketUrl)throw Error("dont have websocket url");let e=this.buildWebsocketUrl();log$3.debug("connecting to websocket url",e),this.socket=new WebSocket(e),this.socket.addEventListener("message",e=>{log$3.debug("WS message response",e)}),this.socket.addEventListener("error",e=>{log$3.debug("WS error response",e),this.errorCount=this.errorCount+1}),this.socket.addEventListener("open",e=>{log$3.debug("WS open",e)}),this.socket.addEventListener("close",e=>{log$3.debug("WS close",e)})}stopWebSocket(){this.socket&&(this.socket.close(),this.socket=void 0,this.errorCount=0)}sendTimeUpdate(e){if(!this.playerCoordinator)return;let t=this.playerCoordinator.getPlayerData();if(!t||t.isShowingAd()||"LIVE"===t.getPlaybackMode())return;let i=Date.now(),n=i-this.lastSendingTimestamp;this.socket&&(this.socket.readyState===WebSocket.CLOSED?this.attemptReconnect():this.socket.readyState===WebSocket.OPEN&&n>=1e3*INTERVAL_BETWEEN_SAVE_CALLS_IN_SEC&&this.sendBookmarkUpdateViaWebSocket(e,i))}sendBookmarkUpdateViaWebSocket(e,t){if(!this.socket)throw Error("dont have socket");if(!this.playerCoordinator)throw Error("dont have player coordinator, this should not be possible");let i=this.playerCoordinator.getMediaMetaData();if((null==i?void 0:i.bookmarkAllowed)===!1)return void log$3.debug("Bookmarking not allowed, not sending bookmark update!");let n=e.playbackPosition,r=this.playerCoordinator.getDurationInSec(),o=this.playerCoordinator.getPlayerConfiguration().assetId;if(!o)return void log$3.warn("dont have an asset id, something has gone terribly wrong");let a=stripOffLocaleFromCrepoIdOrReturnOriginalIfNotRrn(o),s=this.accountSdk.getUser();if(!s)return void log$3.debug("dont have account user");this.lastSendingTimestamp=t;let l=s.userTokens.uid,c=this.buildPayload(a,l,n,r);log$3.debug("Sending bookmark update",c),this.socket.send(JSON.stringify(c))}attemptReconnect(){this.errorCount<MAX_ERROR_COUNT_FOR_RECONNECT&&(log$3.info(`current socket connection is closed, trying a reconnect (error count ${this.errorCount})`),this.startWebSocket())}buildPayload(e,t,i,n){return{productId:e,userId:t,playhead:Math.floor(1e3*i),duration:Math.floor(1e3*n),version:"v1.0"}}}function isVideoPlayerCoordinator(e){return"function"==typeof e.isInFullscreenMode}var bitmovinplayerAdvertisingIma={exports:{}};!function(e,t){!function(){!function(t,i){e.exports=i()}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[399],{93500:function(e,t){var i;
vendor: 30,010 bytes, line 165
165Object.defineProperty(t,"__esModule",{value:!0}),t.ImaPassthroughMode=void 0,function(e){e.None="none",e.Vast="vast",e.VastAndVmap="vastandvmap"}(i||(t.ImaPassthroughMode=i={}))},39401:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ImaInternalAdbreakState=void 0,t.ImaInternalAdBreaksTracker=function(e,t){var n=null,r=e.getCuePoints(),o=r.map(function(e){return{state:i.SCHEDULED,position:e,ads:[]}}),a=function(e){var t=e.getAd();t&&f(t,i.PLAYING)},s=function(e){var t=e.getAd();t&&f(t,i.PLAYED)},l=function(e){var t=e.getAd();t&&f(t,i.SKIPPED)},c=function(e){var t=e.getAd();t&&f(t,i.LOADED)},u=function(e){var t=e.getAd();t&&(n=t)},d=function(e){var t,r,a=e.getAdData();if(a.adError&&n){var s=n.getAdPodInfo().getTimeOffset(),l=o.find(function(e){return e.position===s});l&&[i.SCHEDULED,i.LOADED].includes(l.state)&&f(n,i.PLAYED)}(null==(r=null==(t=a.adError)?void 0:t.data)?void 0:r.errorCode)===google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE&&o.forEach(function(e){return e.state=i.PLAYED})},h=function(e){var t=e.getError();if(t&&n){var r=n.getAdPodInfo().getTimeOffset(),a=o.find(function(e){return e.position===r});a&&[i.SCHEDULED,i.LOADED].includes(a.state)&&f(n,i.PLAYED)}(null==t?void 0:t.getErrorCode())===google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE&&o.forEach(function(e){return e.state=i.PLAYED})};function p(e){var t,n=e.getAd();if(n){var r=n.getAdPodInfo().getTimeOffset();void 0!==r&&n.isLinear()&&(null==(t=o.find(function(e){return e.position===r}))||t.ads.push({id:n.getAdId(),state:i.LOADED}))}}function f(e,t){var n=e.getAdPodInfo().getTimeOffset(),r=e.getAdId();if(void 0!==n){var a=o.find(function(e){return e.position===n});if(!a)return;var s=a.ads.findIndex(function(e){return e.id===r});-1!==s&&(a.ads[s].state=t,function(e){return e.every(function(e){return e.state===i.PLAYED||e.state===i.SKIPPED})}(a.ads)?(a.state=i.PLAYED,function(e){o.filter(function(t){return t.state===i.SCHEDULED&&t.position<e&&t.position>0}).forEach(function(e){e.state=i.MISSED})}(n),function(e){o.filter(function(t){return t.state===i.MISSED&&t.position>e}).forEach(function(e){e.state=i.SCHEDULED})}(n)):a.state=t)}}return e.addEventListener(google.ima.AdEvent.Type.LOADED,p),e.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,c),e.addEventListener(google.ima.AdEvent.Type.STARTED,a),e.addEventListener(google.ima.AdEvent.Type.COMPLETE,s),e.addEventListener(google.ima.AdEvent.Type.SKIPPED,l),e.addEventListener(google.ima.AdEvent.Type.LOG,d),e.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,h),e.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,u),{updateAdBreakState:f,reset:function(){n=null,o=[],r=[],e.removeEventListener(google.ima.AdEvent.Type.LOADED,p),e.removeEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,c),e.removeEventListener(google.ima.AdEvent.Type.STARTED,a),e.removeEventListener(google.ima.AdEvent.Type.COMPLETE,s),e.removeEventListener(google.ima.AdEvent.Type.SKIPPED,l),e.removeEventListener(google.ima.AdEvent.Type.LOG,d),e.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,h),e.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,u)},hasAdBreaksToPlay:function(e){return o.some(function(n){var r=n.position,o=[i.SCHEDULED,i.LOADED].includes(n.state);return!(n.state===i.LOADED&&0===n.ads.length&&r<=e+2)&&(-1===r?o&&e>=t-2:o&&r<=e+2)})},getImaInternalAdBreaks:function(){return o}}},function(e){e.SCHEDULED="SCHEDULED",e.LOADED="LOADED",e.PLAYING="PLAYING",e.PLAYED="PLAYED",e.SKIPPED="SKIPPED",e.MISSED="MISSED"}(i||(t.ImaInternalAdbreakState=i={}))},5181:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ImaModule=void 0;var a=i(45202),s=i(3714),l=i(34841),c=i(65348),u=i(43767),d=i(89927),h=i(88844),p=i(23068),f=i(70850),m=i(45392),g=i(90176),v=i(28412),y=i(28610),b=i(23912),S=i(6365),_=i(47091),E=i(5838),T=i(93500),w=i(71751),A=i(39401),P=i(73134),I=i(62899);function C(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];e&&"function"==typeof e&&e.apply(void 0,t)}function M(e,t){return e.scheduleTime-e.preloadOffset-(t.scheduleTime-t.preloadOffset)}function R(e,t){var i=t.getAd();if(i){if(e.isLinear=i.isLinear(),1===Object.keys(i).length){var n=i[Object.keys(i)[0]].clickThroughUrl;n&&(e.clickThroughUrl=n)}var r=i.getMediaUrl();r&&(e.mediaFileUrl=r),e.data=(0,w.collectAdData)(t)}}t.ImaModule=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.Tg=!0,n.Wg=function(e){n.Bg.restoreCustomPlaybackStateOnAdBreakComplete=!1,n.Bg.loadVideoTimeout=n.Hg,n.Eg=e.getAdsManager(n.player.getVideoElement(),n.Bg);var t=n.player.getVideoElement().duration;n.Fg=(0,A.ImaInternalAdBreaksTracker)(n.Eg,t),n.Eg.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,n.bg),n.Eg.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,n.cg),n.Eg.addEventListener(google.ima.AdEvent.Type.STARTED,n.uh),n.Eg.addEventListener(google.ima.AdEvent.Type.LOADED,n.hg),n.Eg.addEventListener(google.ima.AdEvent.Type.SKIPPED,n.Bh),n.Eg.addEventListener(google.ima.AdEvent.Type.COMPLETE,n.Ch),n.Eg.addEventListener(google.ima.AdEvent.Type.PAUSED,n.Gh),n.Eg.addEventListener(google.ima.AdEvent.Type.RESUMED,n.Hh),n.Eg.addEventListener(google.ima.AdEvent.Type.CLICK,n.Ih),n.Eg.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,n.Kh),n.Eg.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,n.Lh),n.Eg.addEventListener(google.ima.AdEvent.Type.MIDPOINT,n.Mh),n.Eg.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,n.Nh),n.Eg.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,n.Yg),n.Eg.addEventListener(google.ima.AdEvent.Type.INTERACTION,n.Jh),n.Eg.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,n.Dh),C(n.config.onAdsManagerAvailable,n.Eg),n.Eg.init(n.zg.clientWidth,n.zg.clientHeight,google.ima.ViewMode.NORMAL),n.Eg.setVolume(n.player.getVolume()/100),n.getActiveAdBreak()||n.Xg()},n.Yg=function(e){var t,i=n.getActiveAdBreak(),r=e.getError(),o=r.getInnerError(),a=r.getErrorCode(),s=null!=o&&o.getErrorCode?o:null;if(i){if(null==(t=n.tg)||t.then(function(){return(0,m.pingVmapTrackingUrls)(i.trackingEvents,y.VmapTrackingEventType.Error)}),function(e){return e===google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE||e===google.ima.AdError.ErrorCode.VAST_NO_ADS_AFTER_WRAPPER}(a)&&!n.tg&&((0,m.pingVmapTrackingUrls)(i.trackingEvents,y.VmapTrackingEventType.BreakStart),(0,m.pingVmapTrackingUrls)(i.trackingEvents,y.VmapTrackingEventType.Error),(0,m.pingVmapTrackingUrls)(i.trackingEvents,y.VmapTrackingEventType.BreakEnd)),s&&s.getErrorCode()===google.ima.AdError.ErrorCode.AUTOPLAY_DISALLOWED)return n.Pg||(n.mg=[i].concat(n.og,n.mg),n.og=[]),void n.ag(s);n.Ig.includes(r.getErrorCode())?n.bh(i).then(function(e){if(e.manifest)n.eh(i,e.manifest,!0);else{if(i.passthroughMode===T.ImaPassthroughMode.None)return Promise.reject();n.eh(i,null,!0)}}).catch(function(){return n.ag(r)}):n.ag(r)}else n.ag(r)},n.bg=function(e){n.Sg=!0,(n.tg?n.Eh(!1):Promise.resolve()).then(function(){var t=r({},n.getActiveAdBreak());if(n.Wh(t),!t){var i=n.player.getVideoElement().currentTime;t={tag:null,id:f.Util.generateUniqueId(),position:String(i),scheduleTime:i}}n.tg=n.player.requestAdPlayback(n.sh(e,t)),n.ug=n.tg.then(function(e){return e.requestReporter()}),n.tg.then(function(){return(0,m.pingVmapTrackingUrls)(t.trackingEvents,y.VmapTrackingEventType.BreakStart)});var o=e.getAd();n.xh(o.isLinear(),o.getWidth(),o.getHeight())})},n.cg=function(){var e,t,i=null==(e=n.Fg)?void 0:e.hasAdBreaksToPlay(n.qg),r=n.getActiveAdBreak();null==(t=n.tg)||t.then(function(){return(0,m.pingVmapTrackingUrls)(null==r?void 0:r.trackingEvents,y.VmapTrackingEventType.BreakEnd)}),i||(n.sg&&n.Ch(),n.Sg=!1,n.Rg&&(n.Rg=!1,r&&delete r.currentFallbackIndex),n.rg=null,n.Qg=!1,n.Ag.style.display="none",n.tg?n.tg.then(function(e){n.og.length>0?n.ch(n.og.shift()):e.done().then(function(){n.tg=null,n.dg()})}):n.dg())},n.hg=function(e){var t=n.getActiveAdBreak();t&&n.eg(n.sh(e,t))},n.uh=function(e){(n.rg||n.sg)&&(n.xh(e.getAd().isLinear(),e.getAd().getWidth(),e.getAd().getHeight()),n.sg||n.th(e),n.rg&&(n.rg.ads=n.rg.ads||[],n.rg.ads.includes(n.sg)||n.rg.ads.push(n.sg)),n.config&&n.config.companionAdContainers&&n.zh(n.config.companionAdContainers(),e),n.sg.isLinear?n.vh(e):n.wh(e))},n.Ah=function(){if(n.ug){var e=n.currentTime();e!==n.wg&&e>0&&n.ug.then(function(t){return t.timeupdate(e)}),n.wg=e}},n.Bh=function(){n.Fh(),n.ug&&n.ug.then(function(e){return e.skipped()})},n.Ch=function(){var e;n.Oh(),n.Fh(),n.ug&&(n.ug.then(function(e){return e.done()}),n.ug=null==(e=n.tg)?void 0:e.then(function(e){return e.requestReporter()}))},n.Dh=function(){n.Tg||(n.Eg.destroy(),n.Dg.contentComplete())},n.Gh=function(){n.Qg=!1,n.ug.then(function(e){return e.paused(n.currentTime())})},n.Hh=function(){n.Qg=!0,n.ug.then(function(e){return e.resumed(n.currentTime())})},n.Ih=function(){var e=n.sg?n.sg.clickThroughUrl:null;n.player.adClicked(e)},n.Jh=function(e){var t;n.player.adInteraction(s.AdInteractionType.Vpaid,null==(t=e.getAdData())?void 0:t.id)},n.Kh=function(e){n.Gg=e.getAd().getDuration()},n.Lh=function(){n.player.onQuartile(s.AdQuartile.FIRST_QUARTILE),n.yg.push(s.AdQuartile.FIRST_QUARTILE)},n.Mh=function(){n.player.onQuartile(s.AdQuartile.MIDPOINT),n.yg.push(s.AdQuartile.MIDPOINT)},n.Nh=function(){n.player.onQuartile(s.AdQuartile.THIRD_QUARTILE),n.yg.push(s.AdQuartile.THIRD_QUARTILE)},n.Ph=function(e){var t=n.config.strategy.shouldLoadAdBreak(e);return t||n.Qh(e),t},n.mg=[],n.ng=[],n.og=[],n.pg=[],n.qg=0,n.rg=null,n.sg=null,n.Fg=null,n.Hg=i.videoLoadTimeout,n.Ig=[],n.Sg=!1,n.yg=[],n.Mg=!1,n.Ng=!1,n.Og=Promise.resolve(null),n.Qg=!1,n.Rg=!1,n.config.placeholders=r(r({},g.adTagPlaceholderDefaults),n.config.placeholders),n.Kg=new l.Deferred,n.Jg=u.FileLoader.getInstance().loadScript(i.sdkUrl),n}return n(t,e),t.prototype.Ug=function(){"function"==typeof this.config.adContainer&&(this.Ag=this.config.adContainer(),this.Ag instanceof HTMLElement?this.Mg=!0:this.player.onError(_.VastErrorCode.UNDEFINED_ERROR,"AdvertisingConfig.adContainer was defined but did not provide a valid HTMLElement.")),this.Mg||(this.Ag=c.DOMHelper.createTag("div",{class:a.Environment.idPrefix+"ima-container"},{height:"100%",width:"100%",display:"none",border:"none",overflow:"hidden",position:"absolute",top:"0"}),this.zg=this.player.getVideoElement().parentElement,this.zg.appendChild(this.Ag)),C(this.config.onAdContainerAvailable,this.Ag)},t.prototype.initialize=function(){var e=this;this.Jg.then(function(){e.Ug(),e.Vg(),e.Ng=!0}).catch(function(){e.player.onError(P.ImaModuleErrorCode.FAILED_TO_REQUEST_IMA_SDK,"could not load the IMA SDK"),e.Ng=!1,e.Kg.resolve()})},t.prototype.Vg=function(){google.ima.settings.setPlayerType("bitmovin-player"),google.ima.settings.setNumRedirects(25),google.ima.settings.setCookiesEnabled(this.config.withCredentials),C(this.config.beforeInitialization,google.ima.settings),this.Bg=new google.ima.AdsRenderingSettings,this.config.allowedUiElements&&(this.Bg.uiElements=this.config.allowedUiElements),this.Cg=new google.ima.AdDisplayContainer(this.Ag,this.player.getVideoElement()),this.Cg.initialize(),this.Dg=new google.ima.AdsLoader(this.Cg),this.Dg.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.Yg),this.Dg.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Wg),this.Ig=function(){return[100,404,google.ima.AdError.ErrorCode.COMPANION_REQUIRED_ERROR,google.ima.AdError.ErrorCode.FAILED_TO_REQUEST_ADS,google.ima.AdError.ErrorCode.NONLINEAR_DIMENSIONS_ERROR,google.ima.AdError.ErrorCode.UNKNOWN_AD_RESPONSE,google.ima.AdError.ErrorCode.UNKNOWN_ERROR,google.ima.AdError.ErrorCode.VAST_ASSET_NOT_FOUND,google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE,google.ima.AdError.ErrorCode.VAST_LINEAR_ASSET_MISMATCH,google.ima.AdError.ErrorCode.VAST_LOAD_TIMEOUT,google.ima.AdError.ErrorCode.VAST_MALFORMED_RESPONSE,google.ima.AdError.ErrorCode.VAST_NO_ADS_AFTER_WRAPPER,google.ima.AdError.ErrorCode.VAST_SCHEMA_VALIDATION_ERROR,google.ima.AdError.ErrorCode.VAST_TOO_MANY_REDIRECTS,google.ima.AdError.ErrorCode.VAST_TRAFFICKING_ERROR,google.ima.AdError.ErrorCode.VAST_UNSUPPORTED_VERSION,google.ima.AdError.ErrorCode.VAST_WRAPPER_ERROR,1012]}(),this.Kg.resolve()},t.prototype.Xg=function(){this.tg&&this.Eh(),this.xg=null},t.prototype.Zg=function(){this.dg(),this.Sg||this.Eh().catch(function(){})},t.prototype.ag=function(e){this.player.onError(e.getErrorCode(),e.getMessage(),this.getActiveAdBreak()),this.Fh(),this.rg=null,this.og.length>0?this.ch(this.og.shift()):this.Zg()},t.prototype.dg=function(){this.Lg&&(this.Lg.resolve(),this.Lg=null)},t.prototype.eg=function(e){e.passthroughMode!==T.ImaPassthroughMode.None&&this.fg(e),this.xg=null,e.hasOwnProperty("ads")||(e.ads=[]),this.gg(e)},t.prototype.fg=function(e){var t=(0,p.isNumber)(e.currentFallbackIndex)&&e.currentFallbackIndex>=0?e.fallbackTags[e.currentFallbackIndex]:e.tag,i=this.xg&&t.type!==b.AdTagType.VMAP?{downloadTime:(0,d.toSeconds)(Date.now()-this.xg)}:null;this.player.metadataLoaded(e,i)},t.prototype.gg=function(e){this.config.strategy.shouldPlayAdBreak(e)?this.Eg.start():(this.rg=null,this.og.length>0?this.ch(this.og.shift()):this.dg())},t.prototype.sh=function(e,t){var i,n=r({},t);n.ads=t.ads?o([],t.ads,!0):[];var a=this.sg;return a||R(a={id:null==(i=e.getAd())?void 0:i.getAdId()},e),-1===n.ads.findIndex(function(t){var i;return t.id===(null==(i=e.getAd())?void 0:i.getAdId())})&&n.ads.push(a),n},t.prototype.th=function(e){var t=this.getActiveAdBreak();if(t&&t.ads){var i=e.getAd().getAdId(),n=t.ads.find(function(e){return e.id===i});n&&(this.sg=n)}this.sg=this.sg||{id:e.getAd().getAdId()},R(this.sg,e)},t.prototype.vh=function(e){var t=this,i=e.getAd().getSkipTimeOffset();this.Gg=e.getAd().getDuration(),-1===this.Gg&&(this.Gg=null),this.sg.width=e.getAd().getVastMediaWidth(),this.sg.height=e.getAd().getVastMediaHeight(),this.sg.duration=this.Gg,this.sg.skippable=i!==S.NON_SKIPPABLE_IDENTIFIER,this.sg.skippable&&(this.sg.skippableAfter=i),this.Qg=!0,this.ug.then(function(e){e.started(t.sg),t.vg=window.setInterval(t.Ah,250)})},t.prototype.wh=function(e){this.og.length>0?this.ch(this.og.shift()):(this.sg.width=e.getAd().getWidth(),this.sg.height=e.getAd().getHeight(),this.player.overlayAdStarted(this.sg),this.Lg&&(this.Lg.resolve(),this.Lg=null)),this.rg=null},t.prototype.xh=function(e,t,i){this.Ag.style.display="block",this.Mg||(e?(this.Ag.style.width="100%",this.Ag.style.height="100%",this.Ag.style.top="0",this.Ag.style.bottom="",this.Ag.style.left="",this.Ag.style.right="",this.Ag.style.marginLeft="",this.Ag.style.marginRight=""):(this.Ag.style.width=t+"px",this.Ag.style.height=i+"px",this.Ag.style.top="",this.Ag.style.bottom=S.DEFAULT_OVERLAY_AD_BOTTOM_POSITION,this.Ag.style.left="0",this.Ag.style.right="0",this.Ag.style.marginLeft="auto",this.Ag.style.marginRight="auto")),this.yh(e,t,i)},t.prototype.yh=function(e,t,i){var n=this.Ag.firstElementChild;n&&(e?(n.style.width="100%",n.style.height="100%"):(n.style.width=t+"px",n.style.height=i+"px"));var r=n.getElementsByTagName("iframe")[0];r&&(e?(r.style.width="100%",r.style.height="100%"):(r.style.width=t+"px",r.style.height=i+"px"))},t.prototype.zh=function(e,t){var i=this,n=t.getAd();n&&e.forEach(function(e){var t=(0,I.selectCompanionAd)(e,n);"innerHTML"in e&&void 0!==t&&(i.sg.hasOwnProperty("companionAds")||(i.sg.companionAds=[]),i.sg.companionAds.push({width:t.getWidth(),height:t.getHeight()}),e.innerHTML=t.getContent())})},t.prototype.Eh=function(e){if(void 0===e&&(e=!0),!this.tg)return Promise.resolve();var t=this.tg.then(function(t){return t.done(e)});return this.tg=null,t},t.prototype.Fh=function(){this.sg&&this.sg.companionAds&&this.config.companionAdContainers().forEach(function(e){return e.innerHTML=""}),(0,h.clearIntervalIfDefined)(this.vg),this.vg=null,this.sg=null,this.Qg=!1,this.wg=null,this.yg=[]},t.prototype.Oh=function(){var e=this;[s.AdQuartile.FIRST_QUARTILE,s.AdQuartile.MIDPOINT,s.AdQuartile.THIRD_QUARTILE].filter(function(t){return!e.yg.includes(t)}).forEach(function(t){e.player.onQuartile(t)})},t.prototype.onTimeChanged=function(e){var t=this;if(!this.isLinearAdActive()){this.Pg=!0,this.qg=e;var i=this.mg.filter(function(t){return t.preloadOffset&&!t.vastResponse&&t.scheduleTime-t.preloadOffset<=e}),n=this.mg.filter(function(t){return t.scheduleTime<=e&&!t.isScheduled});i.filter(this.Ph).forEach(function(e){return t.ah(e)}),n.filter(function(e){return!!e.vastResponse||t.Ph(e)}).forEach(function(e){e.isScheduled=!0,t.ah(e).then(function(){t.mg.includes(e)&&t.ch(e)})})}},t.prototype.Qh=function(e){e.discardAfterPlayback?this.discardAdBreak(e.id):e.isScheduled=!0},t.prototype.Rh=function(e){this.mg.forEach(function(t){return t.scheduleTime>=e&&(t.isScheduled=!1)})},t.prototype.onSeek=function(e,t){this.Rh(t);var i=this.mg.filter(function(e){return e.scheduleTime<=t&&!e.isScheduled});if(this.mg=this.mg.filter(function(e){return!i.includes(e)}),i.length>0){var n=this.config.strategy.shouldPlaySkippedAdBreaks(o([],i,!0),e,t);(i=i.filter(function(e){return!e.discardAfterPlayback||n.includes(e)})).forEach(function(e){return e.isScheduled=!0}),n.forEach(function(e){var t=i.findIndex(function(t){return t===e});t>-1&&(i[t].isScheduled=!1)}),this.mg=i.concat(this.mg)}},t.prototype.onResize=function(e,t,i){if(this.Eg&&(!this.sg||this.sg.isLinear)){var n=i?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;this.Eg.resize(e,t,n)}},t.prototype.onVolumeChanged=function(e){this.Eg&&this.Eg.setVolume(e/100)},t.prototype.beforeContent=function(){var e=this;return this.Xh(this.ng.splice(0,this.ng.length)),this.Jg.then(function(){return e.Ng?e.Og.catch(function(){}).then(function(){return e.Zh("pre")}):Promise.resolve()})},t.prototype.afterContent=function(){var e=this;return this.Ng?(this.sg&&!this.sg.isLinear&&(this.Fh(),this.rg=null,this.Eg.stop()),this.Dg.contentComplete(),this.Zh("post").then(function(){return e.Rh(0)})):Promise.resolve()},t.prototype.Sh=function(e){return Object.keys(T.ImaPassthroughMode).some(function(t){return e===T.ImaPassthroughMode[t]})},t.prototype.Th=function(e){e.fallbackTags&&e.fallbackTags.length>0&&(e.fallbackTags=e.fallbackTags.filter(function(e){return!!e.url})),this.Sh(e.passthroughMode)||(e.passthroughMode=T.ImaPassthroughMode.Vast);var t=e;return t.position?t.position=String(t.position).toLowerCase():t.position=S.DEFAULT_AD_BREAK_POSITION,"number"!=typeof t.preloadOffset&&(t.preloadOffset=S.DEFAULT_PRELOAD_OFFSET),t},t.prototype.Uh=function(e){return e.tag?e.tag.url?Object.keys(b.AdTagType).some(function(t){return e.tag.type===b.AdTagType[t]})?void 0:"The provided ad tag type is invalid":"No ad tag url was provided":"No ad tag was provided"},t.prototype.Vh=function(e,t){return e.map(function(e){var i=r(r({},e.publicAdBreakConfig),{isScheduled:!1,parentAdTag:t.tag});return e.trackingEvents&&(i.trackingEvents=e.trackingEvents),void 0===i.id&&(i.id=f.Util.generateUniqueId()),i})},t.prototype.Wh=function(e){return delete e.isScheduled,delete e.parentAdTag,e},t.prototype.schedule=function(e){var t=this;return this.Og=this.Kg.promise.then(function(){if(!t.Ng)return Promise.reject("The IMA SDK was not loaded and initialized properly");var i=t.Uh(e);if(i)return Promise.reject(i);var n=t.Th(e);return t.Yh(n).then(function(i){if(0===i.length&&n.fallbackTags&&n.fallbackTags.length>0)return n.tag=n.fallbackTags.shift(),t.schedule(n);var a=t.Vh(i,e);return a.forEach(function(t){return t.discardAfterPlayback=!1!==e.discardAfterPlayback}),Promise.resolve(o([],t.Xh(a).map(function(e){var i=r({},e);return t.Wh(i),i}),!0))})})},t.prototype.Xh=function(e){var t=this,i=[];e.forEach(function(e){var n=t.player.parsePosition(e.position);isNaN(n)?t.ng.push(e):(e.scheduleTime=n,i.push(e))});var n=i.filter(function(e){return e.persistent});return this.mg=this.mg.concat(i),this.pg=this.pg.concat(n),this.mg.sort(M),this.pg.sort(M),i},t.prototype.Yh=function(e){var t=this;return new Promise(function(i){if(e.tag.type===b.AdTagType.VMAP&&e.passthroughMode!==T.ImaPassthroughMode.VastAndVmap){var n=e.tag.url;e.tag.url=t.hh(e.tag.url),E.VmapExtractor.extractAdBreakConfigs(e).then(function(r){var o=r.adBreakConfigs.filter(function(e){var i=t.player.parsePosition(e.publicAdBreakConfig.position);return isNaN(i)||i>=t.qg});e.tag.url=n,t.player.metadataLoaded(e,r.downloadTiming),i(o)}).catch(function(r){e.tag.url=n,r?t.player.onError(r.code,null,e):t.player.onError(_.VastErrorCode.UNDEFINED_ERROR,null,e),i([])})}else i([{publicAdBreakConfig:e}])})},t.prototype.Zh=function(e){var t=this;return this.Kg.promise.then(function(){if(!t.Ng)return Promise.resolve();var i="post"===e?t.mg.filter(function(t){return t.position.includes(e)||t.scheduleTime===1/0}):t.mg.filter(function(t){return t.position.includes(e)||0===t.scheduleTime}),n=Promise.resolve();return(i=i.filter(t.Ph)).length>0&&(t.Lg=new l.Deferred,n=t.Lg.promise,i.forEach(function(e){e.isScheduled=!0,t.ah(e).then(function(){return t.ch(e)})})),n})},t.prototype.ah=function(e,t){var i=this,n=e.tag;if(t&&(e.vastResponse=null,n=t),e.vastResponse&&!t)return e.vastResponse;var r=this.hh(n.url);return e.passthroughMode!==T.ImaPassthroughMode.None?e.vastResponse=Promise.resolve({}):e.vastResponse=m.AdManifestHelper.downloadVastManifest(r).then(function(t){var n=t.manifest,r={manifest:m.AdManifestHelper.xmlToString(n)};return m.AdManifestHelper.parseAdVerifications(n).then(function(n){return n&&n.length>0&&(e.ads=[],n.forEach(function(t){t.verifications&&t.verifications.length>0&&e.ads.push({id:t.id,verifications:t.verifications})})),i.player.metadataLoaded(e,t.downloadTiming),Promise.resolve(r)})}).catch(function(t){return i.bh(e).catch(function(){return delete e.currentFallbackIndex,t?i.player.onError(t.code,null,e):i.player.onError(_.VastErrorCode.UNDEFINED_ERROR,null,e),Promise.resolve({})})}),e.vastResponse},t.prototype.bh=function(e){return"number"!=typeof e.currentFallbackIndex?e.currentFallbackIndex=0:e.currentFallbackIndex++,e.fallbackTags&&e.fallbackTags[e.currentFallbackIndex]?this.ah(e,e.fallbackTags[e.currentFallbackIndex]):Promise.reject()},t.prototype.ch=function(e){var t=this;this.Kg.promise.then(function(){var i;if(t.Ng)if(t.mg.includes(e)&&e.discardAfterPlayback&&t.mg.splice(t.mg.indexOf(e),1),t.rg)t.og.push(e);else{t.sg&&!t.sg.isLinear&&t.Eg&&(t.Dh(),t.Fh()),t.rg=e;var n=function(e){var i;return e.parentAdTag&&(null==(i=t.rg)?void 0:i.parentAdTag)&&e.parentAdTag===t.rg.parentAdTag};t.Tg=t.mg.some(n)||t.og.some(n),null==(i=e.vastResponse)||i.then(function(i){return t.eh(e,i.manifest)})}})},t.prototype.dh=function(e){var t,i,n;return null!=(n=null==(i=null==(t=null==e?void 0:e.fallbackTags)?void 0:t[e.currentFallbackIndex])?void 0:i.url)?n:e.tag.url},t.prototype.eh=function(e,t,i){var n=(t?m.AdManifestHelper.toDataUri(t):void 0)??this.dh(e);n&&this.fh(n,i)},t.prototype.fh=function(e,t){var i,n=new google.ima.AdsRequest,r=e;0===r.indexOf("data:text/xml,")?n.adsResponse=decodeURIComponent(r.substring(14)):n.adTagUrl=this.hh(e),this.zg&&(n.linearAdSlotWidth=this.zg.clientWidth,n.linearAdSlotHeight=this.zg.clientHeight,n.nonLinearAdSlotWidth=this.zg.clientWidth),null!=(i=this.config)&&i.vastLoadTimeout&&(n.vastLoadTimeout=this.config.vastLoadTimeout),this.gh(n),n.nonLinearAdSlotHeight=150,this.Rg=t,this.xg=Date.now(),this.Dg.requestAds(n)},t.prototype.gh=function(e){var t,i,n=null==(i=null==(t=this.config.trackers)?void 0:t.omSdk)?void 0:i.onAccessMode;if(void 0!==n&&"function"==typeof n){var r=n(e);if(r){var o={},a=function(e,t){t&&t.forEach(function(t){if("string"==typeof t){var i=google.ima.OmidVerificationVendor[t];void 0!==i&&(o[i]=e)}})};a(google.ima.OmidAccessMode.FULL,r.full),a(google.ima.OmidAccessMode.DOMAIN,r.domain),a(google.ima.OmidAccessMode.LIMITED,r.limited),Object.keys(o).length>0&&(e.omidAccessModeRules=o)}}},t.prototype.hh=function(e){var t=this,i={playbackTime:String(this.player.getVideoElement().currentTime),height:String(this.zg.clientHeight),width:String(this.zg.clientWidth),domain:encodeURIComponent(document.location.hostname),page:encodeURIComponent(document.location.href),referrer:encodeURIComponent(document.referrer),random:Math.floor(1e7+9e7*Math.random()).toString(),timestamp:String(Date.now())};return Object.keys(this.config.placeholders).forEach(function(n){t.config.placeholders[n].forEach(function(t){e=e.replace(t,i[n])})}),e},t.prototype.list=function(){var e=this,t=o(o([],this.og.map(function(e){return r({},e)}),!0),this.mg.map(function(e){return r({},e)}),!0);return t.forEach(function(t){return e.Wh(t)}),t},t.prototype.getActiveAdBreak=function(){return this.rg},t.prototype.getActiveAd=function(){return this.sg},t.prototype.isLinearAdActive=function(e){return!!this.sg&&(e?!!this.sg.isLinear&&this.Qg:!!this.sg.isLinear)},t.prototype.discardAdBreak=function(e){e&&(this.rg&&this.rg.id===e&&(this.Bh(),this.rg=null,this.Eg.stop()),this.mg=this.mg.filter(function(t){return t.id!==e}),this.og=this.og.filter(function(t){return t.id!==e}))},t.prototype.currentTime=function(){return!isFinite(this.Gg)||!this.Eg||0>this.Eg.getRemainingTime()?NaN:this.Gg-this.Eg.getRemainingTime()},t.prototype.duration=function(){return isFinite(this.Gg)?this.Gg:0},t.prototype.pause=function(){this.Eg&&this.Eg.pause()},t.prototype.resume=function(){this.Eg&&this.Eg.resume()},t.prototype.skip=function(){return this.Eg&&(this.Eg.skip(),this.sg&&!this.sg.isLinear&&(this.Eg.stop(),this.Ag.style.display="none",this.Fh())),Promise.resolve()},t.prototype.getModuleInfo=function(){return{name:"advertising-ima",version:a.Environment.VERSION_NUMBER}},t.prototype.ih=function(){var e=this.mg,t=this.ng;this.reset(!1),this.mg=e,this.ng=t,this.cleanUpImaSdk(),this.Kg=new l.Deferred,this.Ng=!1},t.prototype.reset=function(e){var t;return void 0===e&&(e=!0),this.tg=null,this.ug=null,this.getActiveAdBreak()&&(null==(t=this.Eg)||t.stop()),this.Fh(),this.mg=this.pg,this.og=[],this.qg=0,this.Gg=null,this.rg=null,this.Pg=!1,this.Rg=!1,this.xg=null,e&&(this.Og=Promise.resolve(null)),this.cleanUpImaSdk(),this.Kg=new l.Deferred,this.Ng=!1,Promise.resolve()},t.prototype.cleanUpImaSdk=function(){var e;this.Dg&&(this.Dg.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.Yg),this.Dg.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Wg),this.Dg.destroy(),this.Dg=null),this.Eg&&(null==(e=this.Fg)||e.reset(),this.Fg=null,this.Eg.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.bg),this.Eg.removeEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.cg),this.Eg.removeEventListener(google.ima.AdEvent.Type.STARTED,this.uh),this.Eg.removeEventListener(google.ima.AdEvent.Type.LOADED,this.hg),this.Eg.removeEventListener(google.ima.AdEvent.Type.SKIPPED,this.Bh),this.Eg.removeEventListener(google.ima.AdEvent.Type.COMPLETE,this.Ch),this.Eg.removeEventListener(google.ima.AdEvent.Type.PAUSED,this.Gh),this.Eg.removeEventListener(google.ima.AdEvent.Type.RESUMED,this.Hh),this.Eg.removeEventListener(google.ima.AdEvent.Type.CLICK,this.Ih),this.Eg.removeEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this.Kh),this.Eg.removeEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this.Lh),this.Eg.removeEventListener(google.ima.AdEvent.Type.MIDPOINT,this.Mh),this.Eg.removeEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this.Nh),this.Eg.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.Yg),this.Eg.removeEventListener(google.ima.AdEvent.Type.INTERACTION,this.Jh),this.Eg.removeEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this.Dh),this.Eg.destroy(),this.Eg=null),this.Cg&&(this.Cg.destroy(),this.Cg=null),this.Bg=null},t.prototype.dispose=function(){this.Fh(),this.cleanUpImaSdk(),this.zg&&this.zg.removeChild(this.Ag),this.Ag=null,this.rg=null,this.sg=null},t.imaMarker=function(){},t}(v.AdvertisingModule)},73134:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ImaModuleErrorCode=void 0,function(e){e[e.FAILED_TO_REQUEST_IMA_SDK=103]="FAILED_TO_REQUEST_IMA_SDK",e[e.VAST_NO_ADS_AFTER_WRAPPER=303]="VAST_NO_ADS_AFTER_WRAPPER",e[e.FAILED_TO_REQUEST_ADS=1005]="FAILED_TO_REQUEST_ADS",e[e.VAST_ASSET_NOT_FOUND=1007]="VAST_ASSET_NOT_FOUND",e[e.VAST_EMPTY_RESPONSE=1009]="VAST_EMPTY_RESPONSE",e[e.UNKNOWN_AD_RESPONSE=1010]="UNKNOWN_AD_RESPONSE",e[e.UNSUPPORTED_LOCALE=1011]="UNSUPPORTED_LOCALE",e[e.ADS_REQUEST_NETWORK_ERROR=1012]="ADS_REQUEST_NETWORK_ERROR",e[e.INVALID_AD_TAG=1013]="INVALID_AD_TAG",e[e.STREAM_INITIALIZATION_FAILED=1020]="STREAM_INITIALIZATION_FAILED",e[e.ASSET_FALLBACK_FAILED=1021]="ASSET_FALLBACK_FAILED",e[e.INVALID_ARGUMENTS=1101]="INVALID_ARGUMENTS",e[e.AUTOPLAY_DISALLOWED=1205]="AUTOPLAY_DISALLOWED"}(i||(t.ImaModuleErrorCode=i={}))},61647:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ImaPassthroughMode=t.ImaModuleErrorCode=t.AdvertisingImaModuleDefinition=void 0;var n=i(62756),r=i(93500);Object.defineProperty(t,"ImaPassthroughMode",{enumerable:!0,get:function(){return r.ImaPassthroughMode}});var o=i(5181),a=i(73134);Object.defineProperty(t,"ImaModuleErrorCode",{enumerable:!0,get:function(){return a.ImaModuleErrorCode}}
165),t.AdvertisingImaModuleDefinition={name:n.ModuleName.Advertising,module:function(){return o.ImaModule},dependencies:[n.ModuleName.AdvertisingCore],exports:{ImaModuleErrorCode:a.ImaModuleErrorCode,ImaPassthroughMode:r.ImaPassthroughMode}},t.default=t.AdvertisingImaModuleDefinition},71751:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.collectAdData=function(e){var t,i=e.getAd();return i?function(e){var t=n({},e);return Object.keys(t).forEach(function(e){var i=t[e],n=i&&"object"==typeof i&&!Object.keys(i).some(function(e){return!!i[e]});((0,r.isNumber)(i)&&i<0||!(0,r.isNumber)(i)&&!i||n)&&delete t[e]}),t}({adTitle:i.getTitle(),adSystem:{name:i.getAdSystem()},mimeType:i.getContentType(),bitrate:i.getVastMediaBitrate&&i.getVastMediaBitrate()>0?i.getVastMediaBitrate():-1,wrapperAdIds:i.getWrapperAdIds(),adDescription:i.getDescription(),advertiser:{name:i.getAdvertiserName()},apiFramework:null!=(t=i.getApiFramework())?t:void 0,creative:{id:i.getCreativeId(),adId:i.getCreativeAdId(),universalAdId:{idRegistry:i.getUniversalAdIdRegistry(),value:i.getUniversalAdIdValue()}},dealId:i.getDealId(),minSuggestedDuration:i.isLinear()?o.NON_SKIPPABLE_IDENTIFIER:i.getMinSuggestedDuration(),survey:a(i),traffickingParameters:i.getTraffickingParameters()}):{}};var r=i(23068),o=i(6365);function a(e){var t=e.getSurveyUrl();return t?{uri:t}:void 0}},62899:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.selectCompanionAd=function(e,t){var i=e.clientWidth,n=e.clientHeight,r=t.getCompanionAds(i,n,function(){var e=new google.ima.CompanionAdSelectionSettings;return e.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.STATIC,e.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.IMAGE,e.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.SELECT_NEAR_MATCH,e}());return r.length>0?r[0]:t.getCompanionAds(i,n,function(){var e=new google.ima.CompanionAdSelectionSettings;return e.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.STATIC,e.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.IMAGE,e.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE,e}())[0]}}},function(e){return function(){return e(e.s=61647)}()}])})}()}(bitmovinplayerAdvertisingIma);var bitmovinplayerAdvertisingImaExports=bitmovinplayerAdvertisingIma.exports;let AdvertisingImaModule=getDefaultExportFromCjs$1(bitmovinplayerAdvertisingImaExports);function getModuleExport(e){return isObject$7(e)&&"default"in e?e.default:e}function getBitmovinModules(){try{return bitmovinplayerCoreExports.Player.getModules()}catch{return[]}}function isModuleLoaded(e){return getBitmovinModules().includes(e)}function setupModules(){isModuleLoaded(bitmovinplayerCoreExports.ModuleName.XML)||bitmovinplayerCoreExports.Player.addModule(getModuleExport(XML)),bitmovinplayerCoreExports.Player.addModule(getModuleExport(AdvertisingCoreModule)),bitmovinplayerCoreExports.Player.addModule(getModuleExport(AdvertisingImaModule))}setupModules();let MOBILE_DEVICE_DEFINITION="/web/mobile",DESKTOP_DEVICE_DEFINITION="/web/desktop";function calculateDeviceDefinition(){return isMobileDevice()?MOBILE_DEVICE_DEFINITION:DESKTOP_DEVICE_DEFINITION}function calculateAdUnit(e){let t=calculateDeviceDefinition();return`${e}${t}`}function calculateCustomParameterString(e){let t=Object.entries(e).filter(([e,t])=>!!t).map(([e,t])=>`${camelToSnakeCase(e)}=${t}`);return t.length>0?t.join("&"):void 0}function camelToSnakeCase(e){return e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}function calculateMediaId(e,t,i){return i||("rbcom"===t&&e.startsWith("rrn")?stripOffLocaleFromCrepoId(e):e)}let BASE_URL="https://pubads.g.doubleclick.net/gampad/ads",AD_SIZE="640x480";function calculateDfpAdUrl(e,t,i,n,r){let{mediaId:o,config:a}=t,{adUnit:s,cmsId:l,entitlements:c,consentParams:u,pageId:d}=a;if(!o)throw Error("invalid media id");let h=calculateAdUnit(s),p=document.location.href,f=calculateCustomParameterString({pageId:d,streamingType:n,entitlements:c}),m=calculateMediaId(o,i,r),g=isMobileDevice()?"mobile":"desktop",v=new URLSearchParams({iu:h,vid:m,tfcd:"0",npa:"0",sz:AD_SIZE,cmsid:l,gdfp_req:"1",output:"xml_vmap1_vast4",unviewed_position_start:"1",env:"vp",impl:"s",description_url:p,url:p,wta:"1",ad_rule:"1",vpmute:isPlayerMuted(e)?"1":"0",plcmt:"1",pp:`web_${g}
165`,...resolveConsentParams(u),...f?{cust_params:f}:null});return`${BASE_URL}?${v.toString()}&correlator=[timestamp]`}function isPlayerMuted(e){return 0===e.getVolume()}function resolveConsentParams(e){return(null==e?void 0:e.gdpr)!=="1"?{gdpr:"0"}:{gdpr:"1",...void 0!==e.gdprConsent&&{gdpr_consent:e.gdprConsent},...void 0!==e.addtlConsent&&{addtl_consent:e.addtlConsent}}}function calculateStreamingType(e){return"LIVE"!==e.getPlaybackMode()?"vod":"LINEAR"===e.getLiveVariant()?"linear":"live"}let logger$1=loglevelExports.getLogger("DfpAdService");class DfpAdService{constructor(e,t={}){Si(this,"videoPlayerAdapter"),Si(this,"destroy"),this.adRequester=e,this.config=t}createBitmovinAdConfig(){return{allowedUiElements:[],placeholders:{timestamp:["[timestamp]"]},onAdsManagerAvailable:e=>{var t;null==(t=this.videoPlayerAdapter)||t.enableInteractiveMediaAds(e)}}}async scheduleAd(e,t,i){let{dfpAdvertisingConfig:n,dfpVidPropertyOverride:r}=i;if(!n)throw Error("dfpAdvertisingConfig is missing");this.videoPlayerAdapter=e;let o=calculateStreamingType(e),a=calculateDfpAdUrl(e,{mediaId:t,config:{...this.config,...n}},this.adRequester,o,r);logger$1.info("scheduling ad url",a);let s=await e.scheduleAd(a);return logger$1.debug(" -> schedule result",s),s}}let GFK_MEDIA_ID="servustv",GFK_REGION_ID="at";function createTvStreamingPlayerHooks(e,t,i,n,r,o){let a="stv"===r?"servustv":r,s="ACTIVE"===e?new DfpAdService(a,n):void 0,l=t?new AccountService(t):void 0,c=[];if(l&&c.push(l),"stv"===r){let e=new GfkTrackingService(GFK_MEDIA_ID,GFK_REGION_ID,o,s,i);return c.push(e),{adService:e,hooks:c,gfkService:e}}return{adService:s,hooks:c}}function entitlementsIncludeLimitedAds(e){let t=resolveEntitlements(e);return null==t?void 0:t.includes("limited-ads")}var freeGlobal$1="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root$8=freeGlobal||freeSelf||Function("return this")(),_root=root$8,root$7=_root,Symbol$6=root$7.Symbol,_Symbol=Symbol$6;function arrayMap$2(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}var _arrayMap=arrayMap$2,isArray$7=Array.isArray,isArray_1=isArray$7,Symbol$5=_Symbol,objectProto$d=Object.prototype,hasOwnProperty$a=objectProto$d.hasOwnProperty,nativeObjectToString$1=objectProto$d.toString,symToStringTag$1=Symbol$5?Symbol$5.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$a.call(e,symToStringTag$1),i=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var n=!0}catch{}var r=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=i:delete e[symToStringTag$1]),r}var _getRawTag=getRawTag$1,objectProto$c=Object.prototype,nativeObjectToString=objectProto$c.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,Symbol$4=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$4?Symbol$4.toStringTag:void 0;function baseGetTag$6(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$6;function isObjectLike$7(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike$7,baseGetTag$5=_baseGetTag,isObjectLike$6=isObjectLike_1,symbolTag$2="[object Symbol]";function isSymbol$3(e){return"symbol"==typeof e||isObjectLike$6(e)&&baseGetTag$5(e)==symbolTag$2}var isSymbol_1=isSymbol$3,Symbol$3=_Symbol,arrayMap$1=_arrayMap,isArray$6=isArray_1,isSymbol$2=isSymbol_1,symbolProto$1=Symbol$3?Symbol$3.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString$2(e){if("string"==typeof e)return e;if(isArray$6(e))return arrayMap$1(e,baseToString$2)+"";if(isSymbol$2(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var _baseToString=baseToString$2,reWhitespace=/\s/;function trimmedEndIndex$1(e){for(var t=e.length;t--&&reWhitespace.test(e.charAt(t)););return t}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(e){return e&&e.slice(0,trimmedEndIndex(e)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1;function baseSlice$2(e,t,i){var n=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(i=i>r?r:i)<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(r);++n<r;)o[n]=e[n+t];return o}var _baseSlice=baseSlice$2,baseSlice$1=_baseSlice;function castSlice$1(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:baseSlice$1(e,t,i)}
165var _castSlice=castSlice$1;function baseFindIndex$1(e,t,i,n){for(var r=e.length,o=i+(n?1:-1);n?o--:++o<r;)if(t(e[o],o,e))return o;return -1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(e){return e!=e}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(e,t,i){for(var n=i-1,r=e.length;++n<r;)if(e[n]===t)return n;return -1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$2(e,t,i){return t==t?strictIndexOf(e,t,i):baseFindIndex(e,baseIsNaN,i)}var _baseIndexOf=baseIndexOf$2,baseIndexOf$1=_baseIndexOf;function charsEndIndex$1(e,t){for(var i=e.length;i--&&baseIndexOf$1(t,e[i],0)>-1;);return i}var _charsEndIndex=charsEndIndex$1,baseIndexOf=_baseIndexOf;function charsStartIndex$1(e,t){for(var i=-1,n=e.length;++i<n&&baseIndexOf(t,e[i],0)>-1;);return i}var _charsStartIndex=charsStartIndex$1;function asciiToArray$1(e){return e.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsVarRange$1="\\ufe0e\\ufe0f",rsZWJ$1="\\u200d",reHasUnicode=RegExp("["+rsZWJ$1+rsAstralRange$1+rsComboRange$1+rsVarRange$1+"]");function hasUnicode$1(e){return reHasUnicode.test(e)}var _hasUnicode=hasUnicode$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeToArray$1(e){return e.match(reUnicode)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$1(e){return hasUnicode(e)?unicodeToArray(e):asciiToArray(e)}var _stringToArray=stringToArray$1,baseToString$1=_baseToString;function toString$2(e){return null==e?"":baseToString$1(e)}var toString_1=toString$2,baseToString=_baseToString,baseTrim=_baseTrim,castSlice=_castSlice,charsEndIndex=_charsEndIndex,charsStartIndex=_charsStartIndex,stringToArray=_stringToArray,toString$1=toString_1;function trim(e,t,i){if((e=toString$1(e))&&(i||void 0===t))return baseTrim(e);if(!e||!(t=baseToString(t)))return e;var n=stringToArray(e),r=stringToArray(t),o=charsStartIndex(n,r),a=charsEndIndex(n,r)+1;return castSlice(n,o,a).join("")}var trim_1=trim;let _trim=getDefaultExportFromCjs$1(trim_1);var uaParser={exports:{}};!function(e,t){!function(i){var n="",r="?",o="function",a="undefined",s="object",l="string",c="major",u="model",d="name",h="type",p="vendor",f="version",m="architecture",g="console",v="mobile",y="tablet",b="smarttv",S="wearable",_="embedded",E=500,T="Amazon",w="Apple",A="ASUS",P="BlackBerry",I="Browser",C="Chrome",M="Firefox",R="Google",k="Huawei",x="LG",O="Microsoft",D="Motorola",L="Opera",N="Samsung",U="Sharp",F="Sony",B="Xiaomi",V="Zebra",j="Facebook",z="Chromium OS",H="Mac OS",G=function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i},q=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},W=function(e,t){return typeof e===l&&-1!==Y(t).indexOf(Y(e))},Y=function(e){return e.toLowerCase()},K=function(e){return typeof e===l?e.replace(/[^\d\.]/g,n).split(".")[0]:void 0},X=function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,n),typeof t===a?e:e.substring(0,E)},Q=function(e,t){for(var i,n,r,a,l,c,u=0;u<t.length&&!l;){var d=t[u],h=t[u+1];for(i=n=0;i<d.length&&!l&&d[i];)if(l=d[i++].exec(e))for(r=0;r<h.length;r++)c=l[++n],typeof(a=h[r])===s&&a.length>0?2===a.length?typeof a[1]==o?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:3===a.length?typeof a[1]!==o||a[1].exec&&a[1].test?this[a[0]]=c?c.replace(a[1],a[2]):void 0:this[a[0]]=c?a[1].call(this,c,a[2]):void 0:4===a.length&&(this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):void 0):this[a]=c||void 0;u+=2}},Z=function(e,t){for(var i in t)if(typeof t[i]===s&&t[i].length>0){for(var n=0;n<t[i].length;n++)if(W(t[i][n],e))return i===r?void 0:i}
165else if(W(t[i],e))return i===r?void 0:i;return e},J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},$={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,f],[/opios[\/ ]+([\w\.]+)/i],[f,[d,L+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[d,L+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[d,L]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[d,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,f],[/\bddg\/([\w\.]+)/i],[f,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[d,"UC"+I]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[d,"Smart Lenovo "+I]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+I],f],[/\bfocus\/([\w\.]+)/i],[f,[d,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[d,L+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[d,L+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[d,"MIUI "+I]],[/fxios\/([-\w\.]+)/i],[f,[d,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[d,"360 "+I]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1 "+I],f],[/samsungbrowser\/([\w\.]+)/i],[f,[d,N+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[d,/_/g," "],f],[/metasr[\/ ]?([\d\.]+)/i],[f,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[d,f],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,j],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[d,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,C+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[d,"Android "+I]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[f,Z,{"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[d,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[d,f],[/(cobalt)\/([\w\.]+)/i],[d,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,Y]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,n,Y]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;
165|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,Y]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[p,N],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[p,N],[h,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[p,w],[h,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[p,w],[h,y]],[/(macintosh);/i],[u,[p,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[p,U],[h,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[p,k],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[p,k],[h,v]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[p,B],[h,v]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[p,B],[h,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[p,"OPPO"],[h,v]],[/\b(opd2\d{3}a?) bui/i],[u,[p,"OPPO"],[h,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[p,"Vivo"],[h,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[p,"Realme"],[h,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[p,D],[h,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[p,D],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[p,x],[h,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[p,x],[h,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[p,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[p,"Nokia"],[h,v]],[/(pixel c)\b/i],[u,[p,R],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[p,R],[h,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[p,F],[h,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[p,F],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[p,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[p,T],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[p,T],[h,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,p,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[p,P],[h,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[p,A],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[p,A],[h,v]],[/(nexus 9)/i],[u,[p,"HTC"],[h,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[u,/_/g," "],[h,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[p,"Acer"],[h,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[p,"Meizu"],[h,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[p,"Ulefone"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,u,[h,v]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,u,[h,y]],[/(surface duo)/i],[u,[p,O],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[p,"Fairphone"],[h,v]],[/(u304aa)/i],[u,[p,"AT&T"],[h,v]],[/\bsie-(\w*)/i],[u,[p,"Siemens"],[h,v]],[/\b(rct\w+) b/i],[u,[p,"RCA"],[h,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[p,"Dell"],[h,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[p,"Verizon"],[h,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[p,"Barnes & Noble"],[h,y]],[/\b(tm\d{3}\w+) b/i],[u,[p,"NuVision"],[h,y]],[/\b(k88) b/i],[u,[p,"ZTE"],[h,y]],[/\b(nx\d{3}j) b/i],[u,[p,"ZTE"],[h,v]],[/\b(gen\d{3}) b.+49h/i],[u,[p,"Swiss"],[h,v]],[/\b(zur\d{3}) b/i],[u,[p,"Swiss"],[h,y]],[/\b((zeki)?tb.*\b) b/i],[u,[p,"Zeki"],[h,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],u,[h,y]],[/\b(ns-?\w{0,9}) b/i],[u,[p,"Insignia"],[h,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[p,"NextBook"],[h,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],u,[h,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],u,[h,v]],[/\b(ph-1) /i],[u,[p,"Essential"],[h,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[p,"Envizen"],[h,y]],[/\b(trio[-\w\. ]+) b/i],[u,[p,"MachSpeed"],[h,y]],[/\btu_(1491) b/i],[u,[p,"Rotor"],[h,y]],[/(shield[\w ]+) b/i],[u,[p,"Nvidia"],[h,y]],[/(sprint) (\w+)/i],[p,u,[h,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[p,O],[h,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[p,V],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[p,V],[h,v]],[/smart-tv.+(samsung)/i],[p,[h,b]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[p,N],[h,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,x],[h,b]],[/(apple) ?tv/i],[p,[u,w+" TV"],[h,b]],[/crkey/i],[[u,C+"cast"],[p,R],[h,b]],[/droid.+aft(\w+)( bui|\))/i],[u,[p,T],[h,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[p,U],[h,b]],[/(bravia[\w ]+)( bui|\))/i],[u,[p,F],[h,b]],[/(mitv-\w{5}) bui/i],[u,[p,B],[h,b]],[/Hbbtv.*(technisat) (.*);/i],[p,u,[h,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,X],[u,X],[h,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,u,[h,g]],[/droid.+; (shield) bui/i],[u,[p,"Nvidia"],[h,g]],[/(playstation [345portablevi]+)/i],[u,[p,F],[h,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[p,O],[h,g]],[/((pebble))app/i],[p,u,[h,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[p,w],[h,S]],[/droid.+; (glass) \d/i],[u,[p,R],[h,S]],[/droid.+; (wt63?0{2,3})\)/i],[u,[p,V],[h,S]],[/(quest( \d| pro)?)/i],[u,[p,j],[h,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[h,_]],[/(aeobc)\b/i],[u,[p,T],[h,_]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[h,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[d,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[d,[f,Z,J]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,Z,J],[d,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,H],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,f],[/\(bb(10);/i],[f,[d,P]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[d,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[d,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,z],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,f],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,f]]},ee=function(e,t){if(typeof e===s&&(t=e,e=void 0),!(this instanceof ee))return new ee(e,t).getResult();var r=typeof i!==a&&i.navigator?i.navigator:void 0,g=e||(r&&r.userAgent?r.userAgent:n),b=r&&r.userAgentData?r.userAgentData:void 0,S=t?G($,t):$,_=r&&r.userAgent==g;return this.getBrowser=function(){var e={};return e[d]=void 0,e[f]=void 0,Q.call(e,g,S.browser),e[c]=K(e[f]),_&&r&&r.brave&&typeof r.brave.isBrave==o&&(e[d]="Brave"),e},this.getCPU=function(){var e={};return e[m]=void 0,Q.call(e,g,S.cpu),e},this.getDevice=function(){var e={};return e[p]=void 0,e[u]=void 0,e[h]=void 0,Q.call(e,g,S.device),_&&!e[h]&&b&&b.mobile&&(e[h]=v),_&&"Macintosh"==e[u]&&r&&typeof r.standalone!==a&&r.maxTouchPoints&&r.maxTouchPoints>2&&(e[u]="iPad",e[h]=y),e},this.getEngine=function(){var e={};return e[d]=void 0,e[f]=void 0,Q.call(e,g,S.engine),e},this.getOS=function(){var e={};return e[d]=void 0,e[f]=void 0,Q.call(e,g,S.os),_&&!e[d]&&b&&b.platform&&"Unknown"!=b.platform&&(e[d]=b.platform.replace(/chrome os/i,z).replace(/macos/i,H)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return g},this.setUA=function(e){return g=typeof e===l&&e.length>E?X(e,E):e,this},this.setUA(g),this};ee.VERSION="1.0.38",ee.BROWSER=q([d,f,c]),ee.CPU=q([m]),ee.DEVICE=q([u,p,h,g,v,b,y,S,_]),ee.ENGINE=ee.OS=q([d,f]),e.exports&&(t=e.exports=ee),t.UAParser=ee;var et=typeof i!==a&&(i.jQuery||i.Zepto);if(et&&!et.ua){var ei=new ee;et.ua=ei.getResult(),et.ua.get=function(){return ei.getUA()},et.ua.set=function(e){ei.setUA(e);var t=ei.getResult();for(var i in t)et.ua[i]=t[i]}}}("object"==typeof window?window:commonjsGlobal)}(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;let UAParser=getDefaultExportFromCjs$1(uaParserExports);var eventemitter2={exports:{}};!function(e,t){!function(t){var i=Object.hasOwnProperty,n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=10,o="object"==typeof process&&"function"==typeof process.nextTick,a="function"==typeof Symbol,s="object"==typeof Reflect,l="function"==typeof setImmediate?setImmediate:setTimeout,c=a?s&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function u(){this._events={},this._conf&&d.call(this,this._conf)}function d(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==t&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function h(e,t){var i="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(i+=" Event name: "+t+"."),"u">typeof process&&process.emitWarning){var n=Error(i);n.name="MaxListenersExceededWarning",n.emitter=this,n.count=e,process.emitWarning(n)}else console.error(i),console.trace&&console.trace()}var p=function(e,t,i){var n=arguments.length;switch(n){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,i];default:for(var r=Array(n);n--;)r[n]=arguments[n];return r}};function f(e,i){for(var n={},r=e.length,o=0,a=0;a<r;a++)n[e[a]]=a<o?i[a]:t;return n}function m(e,t,i){if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(i.on||i.off)&&(n=i.on,r=i.off),t.addEventListener?(n=t.addEventListener,r=t.removeEventListener):t.addListener?(n=t.addListener,r=t.removeListener):t.on&&(n=t.on,r=t.off),!n&&!r)throw Error("target does not implement any known event API");if("function"!=typeof n)throw TypeError("on method must be a function");if("function"!=typeof r)throw TypeError("off method must be a function");this._on=n,this._off=r;var n,r,o=e._observers;o?o.push(this):e._observers=[this]}function g(e,n,r,o){var a=Object.assign({},n);if(!e)return a;
165if("object"!=typeof e)throw TypeError("options must be an object");var s,l,c,u=Object.keys(e),d=u.length;function h(e){throw Error('Invalid "'+s+'" option value'+(e?". Reason: "+e:""))}for(var p=0;p<d;p++){if(s=u[p],!i.call(n,s))throw Error('Unknown "'+s+'" option');(l=e[s])!==t&&(c=r[s],a[s]=c?c(l,h):l)}return a}function v(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function y(e){var t="value must be type of "+e.join("|"),i=e.length,n=e[0],r=e[1];return 1===i?function(e,i){if(typeof e===n)return e;i(t)}:2===i?function(e,i){var o=typeof e;if(o===n||o===r)return e;i(t)}:function(n,r){for(var o=typeof n,a=i;a-- >0;)if(o===e[a])return n;r(t)}}Object.assign(m.prototype,{subscribe:function(e,t,i){var n=this,r=this._target,o=this._emitter,a=this._listeners,s=function(){var n=p.apply(null,arguments),a={data:n,name:t,original:e};if(i){!1!==i.call(r,a)&&o.emit.apply(o,[a.name].concat(n));return}o.emit.apply(o,[t].concat(n))};if(a[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,o._newListener&&o._removeListener&&!n._onNewListener?(this._onNewListener=function(i){i===t&&null===a[e]&&(a[e]=s,n._on.call(r,e,s))},o.on("newListener",this._onNewListener),this._onRemoveListener=function(i){i===t&&!o.hasListeners(i)&&a[e]&&(a[e]=null,n._off.call(r,e,s))},a[e]=null,o.on("removeListener",this._onRemoveListener)):(a[e]=s,n._on.call(r,e,s))},unsubscribe:function(e){var t,i,n,r=this,o=this._listeners,a=this._emitter,s=this._off,l=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function u(){r._onNewListener&&(a.off("newListener",r._onNewListener),a.off("removeListener",r._onRemoveListener),r._onNewListener=null,r._onRemoveListener=null);var e=E.call(a,r);a._observers.splice(e,1)}if(e){if(!(t=o[e]))return;s.call(l,e,t),delete o[e],--this._listenersCount||u()}else{for(n=(i=c(o)).length;n-- >0;)e=i[n],s.call(l,e,o[e]);this._listeners={},this._listenersCount=0,u()}}});var b=y(["function"]),S=y(["object","function"]);function _(e,t,i){var n,r,o,a=0,s=new e(function(l,c,u){function d(){r&&(r=null),a&&(clearTimeout(a),a=0)}n=!(i=g(i,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}})).overload&&"function"==typeof e.prototype.cancel&&"function"==typeof u;var h=function(e){d(),l(e)},p=function(e){d(),c(e)};n?t(h,p,u):(r=[function(e){p(e||Error("canceled"))}],t(h,p,function(e){if(o)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");r.push(e)}),o=!0),i.timeout>0&&(a=setTimeout(function(){var e=Error("timeout");e.code="ETIMEDOUT",a=0,s.cancel(e),c(e)},i.timeout))});return n||(s.cancel=function(e){if(r){for(var t=r.length,i=1;i<t;i++)r[i](e);r[0](e),r=null}}),s}function E(e){var t=this._observers;if(!t)return -1;for(var i=t.length,n=0;n<i;n++)if(t[n]._target===e)return n;return -1}function T(e,t,i,n,r){if(!i)return null;if(0===n){var o=typeof t;if("string"===o){var a,s,l=0,u=0,d=this.delimiter,h=d.length;if(-1!==(s=t.indexOf(d))){a=[,,,,,];do a[l++]=t.slice(u,s),u=s+h;while(-1!==(s=t.indexOf(d,u)));a[l++]=t.slice(u),t=a,r=l}else t=[t],r=1}else"object"===o?r=t.length:(t=[t],r=1)}var p,f,m,g,v,y,b,S=null,_=t[n],E=t[n+1];if(n===r)i._listeners&&("function"==typeof i._listeners?e&&e.push(i._listeners):e&&e.push.apply(e,i._listeners),S=[i]);else if("*"===_){for(s=(y=c(i)).length;s-- >0;)"_listeners"!==(p=y[s])&&(b=T(e,t,i[p],n+1,r))&&(S?S.push.apply(S,b):S=b);return S}else if("**"===_){for((v=n+1===r||n+2===r&&"*"===E)&&i._listeners&&(S=T(e,t,i,r,r)),s=(y=c(i)).length;s-- >0;)"_listeners"!==(p=y[s])&&("*"===p||"**"===p?(i[p]._listeners&&!v&&(b=T(e,t,i[p],r,r))&&(S?S.push.apply(S,b):S=b),b=T(e,t,i[p],n,r)):b=p===E?T(e,t,i[p],n+2,r):T(e,t,i[p],n,r),b&&(S?S.push.apply(S,b):S=b));return S}else i[_]&&(S=T(e,t,i[_],n+1,r));if((f=i["*"])&&T(e,t,f,n+1,r),m=i["**"])if(n<r)for(m._listeners&&T(e,t,m,r,r),s=(y=c(m)).length;s-- >0;)"_listeners"!==(p=y[s])&&(p===E?T(e,t,m[p],n+2,r):p===_?T(e,t,m[p],n+1,r):((g={})[p]=m[p],T(e,t,{"**":g},n+1,r)));else m._listeners?T(e,t,m,r,r):m["*"]&&m["*"]._listeners&&T(e,t,m["*"],r,r);return S}function w(e,t,i){var n,r,o=0,a=0,s=this.delimiter,l=s.length;if("string"==typeof e)if(-1!==(n=e.indexOf(s))){r=[,,,,,];do r[o++]=e.slice(a,n),a=n+l;while(-1!==(n=e.indexOf(s,a)));r[o++]=e.slice(a)}else r=[e],o=1;else r=e,o=e.length;if(o>1){for(n=0;n+1<o;n++)if("**"===r[n]&&"**"===r[n+1])return}var c,u=this.listenerTree;for(n=0;n<o;n++)if(u=u[c=r[n]]||(u[c]={}),n===o-1)return u._listeners?("function"==typeof u._listeners&&(u._listeners=[u._listeners]),i?u._listeners.unshift(t):u._listeners.push(t),!u._listeners.warned&&this._maxListeners>0&&u._listeners.length>this._maxListeners&&(u._listeners.warned=!0,h.call(this,u._listeners.length,c))):u._listeners=t,!0;return!0}function A(e,t,i,n){for(var r,o,a,s,l=c(e),u=l.length,d=e._listeners;u-- >0;)r=e[o=l[u]],a="_listeners"===o?i:i?i.concat(o):[o],s=n||"symbol"==typeof o,d&&t.push(s?a:a.join(this.delimiter)),"object"==typeof r&&A.call(this,r,t,a,s);return t}function P(e){for(var t,i,n,r=c(e),o=r.length;o-- >0;)(t=e[i=r[o]])&&(n=!0,"_listeners"===i||P(t)||delete e[i]);return n}function I(e,t,i){this.emitter=e,this.event=t,this.listener=i}function C(e,i,n){if(!0===n)a=!0;else if(!1===n)r=!0;else{if(!n||"object"!=typeof n)throw TypeError("options should be an object or true");var r=n.async,a=n.promisify,s=n.nextTick,c=n.objectify}if(r||s||a){var u=i,d=i._origin||i;if(s&&!o)throw Error("process.nextTick is not supported");a===t&&(a="AsyncFunction"===i.constructor.name),(i=function(){var e=arguments,t=this,i=this.event;return a?s?Promise.resolve():new Promise(function(e){l(e)}).then(function(){return t.event=i,u.apply(t,e)}):(s?process.nextTick:l)(function(){t.event=i,u.apply(t,e)})})._async=!0,i._origin=d}return[i,c?new I(this,e,i):this]}function M(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,d.call(this,e)}function R(e,t,i){return _((i=g(i,{Promise,timeout:0,overload:!1},{Promise:v})).Promise,function(i,n,r){if("function"==typeof e.addEventListener){o=function(){i(p.apply(null,arguments))},r(function(){e.removeEventListener(t,o)}),e.addEventListener(t,o,{once:!0});return}var o,a,s=function(){a&&e.removeListener("error",a),i(p.apply(null,arguments))};
165"error"!==t&&(a=function(i){e.removeListener(t,s),n(i)},e.once("error",a)),r(function(){a&&e.removeListener("error",a),e.removeListener(t,s)}),e.once(t,s)},{timeout:i.timeout,overload:i.overload})}I.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},M.EventEmitter2=M,M.prototype.listenTo=function(e,i,r){if("object"!=typeof e)throw TypeError("target musts be an object");var o=this;function a(t){if("object"!=typeof t)throw TypeError("events must be an object");var i,n=r.reducers,a=E.call(o,e);i=-1===a?new m(o,e,r):o._observers[a];for(var s,l=c(t),u=l.length,d="function"==typeof n,h=0;h<u;h++)s=l[h],i.subscribe(s,t[s]||s,d?n:n&&n[s])}return r=g(r,{on:t,off:t,reducers:t},{on:b,off:b,reducers:S}),a(n(i)?f(i):"string"==typeof i?f(i.split(/\s+/)):i),this},M.prototype.stopListeningTo=function(e,t){var i=this._observers;if(!i)return!1;var n,r=i.length,o=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;r-- >0;)n=i[r],e&&n._target!==e||(n.unsubscribe(t),o=!0);return o},M.prototype.delimiter=".",M.prototype.setMaxListeners=function(e){e!==t&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},M.prototype.getMaxListeners=function(){return this._maxListeners},M.prototype.event="",M.prototype.once=function(e,t,i){return this._once(e,t,!1,i)},M.prototype.prependOnceListener=function(e,t,i){return this._once(e,t,!0,i)},M.prototype._once=function(e,t,i,n){return this._many(e,1,t,i,n)},M.prototype.many=function(e,t,i,n){return this._many(e,t,i,!1,n)},M.prototype.prependMany=function(e,t,i,n){return this._many(e,t,i,!0,n)},M.prototype._many=function(e,t,i,n,r){var o=this;if("function"!=typeof i)throw Error("many only accepts instances of Function");function a(){return 0==--t&&o.off(e,a),i.apply(this,arguments)}return a._origin=i,this._on(e,a,n,r)},M.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||u.call(this);var e,t,i,n,r,o,s=arguments[0],l=this.wildcard;if("newListener"===s&&!this._newListener&&!this._events.newListener)return!1;if(l&&(e=s,"newListener"!==s&&"removeListener"!==s&&"object"==typeof s)){if(i=s.length,a){for(n=0;n<i;n++)if("symbol"==typeof s[n]){o=!0;break}}o||(s=s.join(this.delimiter))}var c,d=arguments.length;if(this._all&&this._all.length)for(c=this._all.slice(),n=0,i=c.length;n<i;n++)switch(this.event=s,d){case 1:c[n].call(this,s);break;case 2:c[n].call(this,s,arguments[1]);break;case 3:c[n].call(this,s,arguments[1],arguments[2]);break;default:c[n].apply(this,arguments)}if(l)c=[],T.call(this,c,e,this.listenerTree,0,i);else if("function"==typeof(c=this._events[s])){switch(this.event=s,d){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(t=Array(d-1),r=1;r<d;r++)t[r-1]=arguments[r];c.apply(this,t)}return!0}else c&&(c=c.slice());if(c&&c.length){if(d>3)for(t=Array(d-1),r=1;r<d;r++)t[r-1]=arguments[r];for(n=0,i=c.length;n<i;n++)switch(this.event=s,d){case 1:c[n].call(this);break;case 2:c[n].call(this,arguments[1]);break;case 3:c[n].call(this,arguments[1],arguments[2]);break;default:c[n].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===s)throw arguments[1]instanceof Error?arguments[1]:Error("Uncaught, unspecified 'error' event.");return!!this._all},M.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||u.call(this);var e,t,i,n,r,o,s=arguments[0],l=this.wildcard;if("newListener"===s&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(l&&(e=s,"newListener"!==s&&"removeListener"!==s&&"object"==typeof s)){if(n=s.length,a){for(r=0;r<n;r++)if("symbol"==typeof s[r]){t=!0;break}}t||(s=s.join(this.delimiter))}var c,d=[],h=arguments.length;if(this._all)for(r=0,n=this._all.length;r<n;r++)switch(this.event=s,h){case 1:d.push(this._all[r].call(this,s));break;case 2:d.push(this._all[r].call(this,s,arguments[1]));break;case 3:d.push(this._all[r].call(this,s,arguments[1],arguments[2]));break;default:d.push(this._all[r].apply(this,arguments))}if(l?(c=[],T.call(this,c,e,this.listenerTree,0)):c=this._events[s],"function"==typeof c)switch(this.event=s,h){case 1:d.push(c.call(this));break;case 2:d.push(c.call(this,arguments[1]));break;case 3:d.push(c.call(this,arguments[1],arguments[2]));break;default:for(i=Array(h-1),o=1;o<h;o++)i[o-1]=arguments[o];d.push(c.apply(this,i))}else if(c&&c.length){if(c=c.slice(),h>3)for(i=Array(h-1),o=1;o<h;o++)i[o-1]=arguments[o];for(r=0,n=c.length;r<n;r++)switch(this.event=s,h){case 1:d.push(c[r].call(this));break;case 2:d.push(c[r].call(this,arguments[1]));break;case 3:d.push(c[r].call(this,arguments[1],arguments[2]));break;default:d.push(c[r].apply(this,i))}}else if(!this.ignoreErrors&&!this._all&&"error"===s)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(d)},M.prototype.on=function(e,t,i){return this._on(e,t,!1,i)},M.prototype.prependListener=function(e,t,i){return this._on(e,t,!0,i)},M.prototype.onAny=function(e){return this._onAny(e,!1)},M.prototype.prependAny=function(e){return this._onAny(e,!0)},M.prototype.addListener=M.prototype.on,M.prototype._onAny=function(e,t){if("function"!=typeof e)throw Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},M.prototype._on=function(e,i,n,r){if("function"==typeof e)return this._onAny(e,i),this;if("function"!=typeof i)throw Error("on only accepts instances of Function");this._events||u.call(this);var o,a=this;return r!==t&&(i=(o=C.call(this,e,i,r))[0],a=o[1]),this._newListener&&this.emit
165("newListener",e,i),this.wildcard?w.call(this,e,i,n):this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),n?this._events[e].unshift(i):this._events[e].push(i),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,h.call(this,this._events[e].length,e))):this._events[e]=i,a},M.prototype.off=function(e,t){if("function"!=typeof t)throw Error("removeListener only takes instances of Function");var i,r=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();if(!(r=T.call(this,null,o,this.listenerTree,0)))return this}else{if(!this._events[e])return this;i=this._events[e],r.push({_listeners:i})}for(var a=0;a<r.length;a++){var s=r[a];if(n(i=s._listeners)){for(var l=-1,c=0,u=i.length;c<u;c++)if(i[c]===t||i[c].listener&&i[c].listener===t||i[c]._origin&&i[c]._origin===t){l=c;break}if(l<0)continue;return this.wildcard?s._listeners.splice(l,1):this._events[e].splice(l,1),0===i.length&&(this.wildcard?delete s._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(i===t||i.listener&&i.listener===t||i._origin&&i._origin===t)&&(this.wildcard?delete s._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&P(this.listenerTree),this},M.prototype.offAny=function(e){var t,i=0,n=0;if(e&&this._all&&this._all.length>0){for(t=this._all,i=0,n=t.length;i<n;i++)if(e===t[i])return t.splice(i,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(i=0,n=t.length;i<n;i++)this.emit("removeListenerAny",t[i]);this._all=[]}return this},M.prototype.removeListener=M.prototype.off,M.prototype.removeAllListeners=function(e){if(e===t)return this._events&&u.call(this),this;if(this.wildcard){var i,n=T.call(this,null,e,this.listenerTree,0);if(!n)return this;for(i=0;i<n.length;i++)n[i]._listeners=null;this.listenerTree&&P(this.listenerTree)}else this._events&&(this._events[e]=null);return this},M.prototype.listeners=function(e){var i,n,r,o,a,s=this._events;if(e===t){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!s)return[];for(o=(i=c(s)).length,r=[];o-- >0;)"function"==typeof(n=s[i[o]])?r.push(n):r.push.apply(r,n);return r}if(this.wildcard){if(!(a=this.listenerTree))return[];var l=[],u="string"==typeof e?e.split(this.delimiter):e.slice();return T.call(this,l,u,a,0),l}return s&&(n=s[e])?"function"==typeof n?[n]:n:[]},M.prototype.eventNames=function(e){var t=this._events;return this.wildcard?A.call(this,this.listenerTree,[],null,e):t?c(t):[]},M.prototype.listenerCount=function(e){return this.listeners(e).length},M.prototype.hasListeners=function(e){if(this.wildcard){var i=[],n="string"==typeof e?e.split(this.delimiter):e.slice();return T.call(this,i,n,this.listenerTree,0),i.length>0}var r=this._events,o=this._all;return!!(o&&o.length||r&&(e===t?c(r).length:r[e]))},M.prototype.listenersAny=function(){return this._all?this._all:[]},M.prototype.waitFor=function(e,i){var n=this,r=typeof i;return"number"===r?i={timeout:i}:"function"===r&&(i={filter:i}),_((i=g(i,{timeout:0,filter:t,handleError:!1,Promise,overload:!1},{filter:b,Promise:v})).Promise,function(t,r,o){function a(){var o=i.filter;if(!(o&&!o.apply(n,arguments)))if(n.off(e,a),i.handleError){var s=arguments[0];s?r(s):t(p.apply(null,arguments).slice(1))}else t(p.apply(null,arguments))}o(function(){n.off(e,a)}),n._on(e,a,!1)},{timeout:i.timeout,overload:i.overload})};var k=M.prototype;Object.defineProperties(M,{defaultMaxListeners:{get:function(){return k._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");k._maxListeners=e},enumerable:!0},once:{value:R,writable:!0,configurable:!0}}),Object.defineProperties(k,{_maxListeners:{value:r,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),e.exports=M}()}(eventemitter2);var eventemitter2Exports=eventemitter2.exports;let EventEmitter=getDefaultExportFromCjs$1(eventemitter2Exports);function _classCallCheck$2(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _defineProperties$2(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass$2(e,t,i){return t&&_defineProperties$2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var EventDispatcher=function(){function e(){_classCallCheck$2(this,e),this.eventEmitter=new EventEmitter({wildcard:!0})}return _createClass$2(e,[{key:"on",value:function(){if((arguments.length<=0?void 0:arguments[0])==="*")this.eventEmitter.onAny(arguments.length<=1?void 0:arguments[1]);else{var e;(e=this.eventEmitter).on.apply(e,arguments)}}},{key:"off",value:function(){if((arguments.length<=0?void 0:arguments[0])==="*")this.eventEmitter.offAny(arguments.length<=1?void 0:arguments[1]);else{var e;(e=this.eventEmitter).off.apply(e,arguments)}}},{key:"once",value:function(){var e;(e=this.eventEmitter).once.apply(e,arguments)}},{key:"many",value:function(){var e;(e=this.eventEmitter).many.apply(e,arguments)}},{key:"listeners",value:function(){var e;(e=this.eventEmitter).listeners.apply(e,arguments)}},{key:"emit",value:function(){var e;(e=this.eventEmitter).emit.apply(e,arguments)}},{key:"removeAllListeners",value:function(){var e;(e=this.eventEmitter).removeAllListeners.apply(e,arguments)}}]),e}();function error(e){e.dispatcher.on("*.error",function(e){console.error(e)})}function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$2(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$2,eq$1=eq_1;function assocIndexOf$4(e,t){for(var i=e.length;i--;)if(eq$1(e[i][0],t))return i;return -1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,i=assocIndexOf$3(t,e);return!(i<0)&&(i==t.length-1?t.pop():splice.call(t,i,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,i=assocIndexOf$2(t,e);return i<0?void 0:t[i][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var i=this.__data__,n=assocIndexOf(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}ListCache$4.prototype.clear=listCacheClear,ListCache$4.prototype.delete=listCacheDelete,ListCache$4.prototype.get=listCacheGet,ListCache$4.prototype.has=listCacheHas,ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4,ListCache$3=_ListCache;function stackClear$1(){this.__data__=new ListCache$3,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}var _stackDelete=stackDelete$1;function stackGet$1(e){return this.__data__.get(e)}var _stackGet=stackGet$1;function stackHas$1(e){return this.__data__.has(e)}var _stackHas=stackHas$1;function isObject$5(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$5,baseGetTag$4=_baseGetTag,isObject$4=isObject_1,asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$2(e){if(!isObject$4(e))return!1;var t=baseGetTag$4(e);return t==funcTag$2||t==genTag$1||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$2,root$6=_root,coreJsData$1=root$6["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");
165return e?"Symbol(src)_1."+e:""}();function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource$2(e){if(null!=e){try{return funcToString$2.call(e)}catch{}try{return e+""}catch{}}return""}var _toSource=toSource$2,isFunction$1=isFunction_1,isMasked=_isMasked,isObject$3=isObject_1,toSource$1=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$b=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$9=objectProto$b.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$9).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject$3(e)||isMasked(e))&&(isFunction$1(e)?reIsNative:reIsHostCtor).test(toSource$1(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$7(e,t){var i=getValue(e,t);return baseIsNative(i)?i:void 0}var _getNative=getNative$7,getNative$6=_getNative,root$5=_root,Map$4=getNative$6(root$5,"Map"),_Map=Map$4,getNative$5=_getNative,nativeCreate$4=getNative$5(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$a=Object.prototype,hasOwnProperty$8=objectProto$a.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var i=t[e];return i===HASH_UNDEFINED$1?void 0:i}return hasOwnProperty$8.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto$9=Object.prototype,hasOwnProperty$7=objectProto$9.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty$7.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1,Hash=_Hash,ListCache$2=_ListCache,Map$3=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache$2),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){var i=e.__data__;return isKeyable(t)?i["string"==typeof t?"string":"hash"]:i.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){var t=getMapData$3(this,e).delete(e);return this.size-=!!t,t}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var i=getMapData(this,e),n=i.size;return i.set(e,t),this.size+=+(i.size!=n),this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$2(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}MapCache$2.prototype.clear=mapCacheClear,MapCache$2.prototype.delete=mapCacheDelete,MapCache$2.prototype.get=mapCacheGet,MapCache$2.prototype.has=mapCacheHas,MapCache$2.prototype.set=mapCacheSet;var _MapCache=MapCache$2,ListCache$1=_ListCache,Map$2=_Map,MapCache$1=_MapCache,LARGE_ARRAY_SIZE=200;function stackSet$1(e,t){var i=this.__data__;if(i instanceof ListCache$1){var n=i.__data__;if(!Map$2||n.length<LARGE_ARRAY_SIZE-1)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new MapCache$1(n)}return i.set(e,t),this.size=i.size,this}
165var _stackSet=stackSet$1,ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$1(e){var t=this.__data__=new ListCache(e);this.size=t.size}Stack$1.prototype.clear=stackClear,Stack$1.prototype.delete=stackDelete,Stack$1.prototype.get=stackGet,Stack$1.prototype.has=stackHas,Stack$1.prototype.set=stackSet;var _Stack=Stack$1;function arrayEach$1(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}var _arrayEach=arrayEach$1,getNative$4=_getNative,defineProperty$2=function(){try{var e=getNative$4(Object,"defineProperty");return e({},"",{}),e}catch{}}(),_defineProperty$2=defineProperty$2,defineProperty$1=_defineProperty$2;function baseAssignValue$2(e,t,i){"__proto__"==t&&defineProperty$1?defineProperty$1(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}var _baseAssignValue=baseAssignValue$2,baseAssignValue$1=_baseAssignValue,eq=eq_1,objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function assignValue$2(e,t,i){var n=e[t];hasOwnProperty$6.call(e,t)&&eq(n,i)&&(void 0!==i||t in e)||baseAssignValue$1(e,t,i)}var _assignValue=assignValue$2,assignValue$1=_assignValue,baseAssignValue=_baseAssignValue;function copyObject$5(e,t,i,n){var r=!i;i||(i={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=n?n(i[s],e[s],s,i,e):void 0;void 0===l&&(l=e[s]),r?baseAssignValue(i,s,l):assignValue$1(i,s,l)}return i}var _copyObject=copyObject$5;function baseTimes$1(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}var _baseTimes=baseTimes$1,baseGetTag$3=_baseGetTag,isObjectLike$5=isObjectLike_1,argsTag$2="[object Arguments]";function baseIsArguments$1(e){return isObjectLike$5(e)&&baseGetTag$3(e)==argsTag$2}var _baseIsArguments=baseIsArguments$1,baseIsArguments=_baseIsArguments,isObjectLike$4=isObjectLike_1,objectProto$7=Object.prototype,hasOwnProperty$5=objectProto$7.hasOwnProperty,propertyIsEnumerable$1=objectProto$7.propertyIsEnumerable,isArguments$2=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike$4(e)&&hasOwnProperty$5.call(e,"callee")&&!propertyIsEnumerable$1.call(e,"callee")},isArguments_1=isArguments$2,isBuffer$2={exports:{}};function stubFalse(){return!1}var stubFalse_1=stubFalse;isBuffer$2.exports,function(e,t){var i=_root,n=stubFalse_1,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?i.Buffer:void 0;e.exports=(a?a.isBuffer:void 0)||n}(isBuffer$2,isBuffer$2.exports);var isBufferExports=isBuffer$2.exports,MAX_SAFE_INTEGER$1=0x1fffffffffffff,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$1(e,t){var i=typeof e;return!!(t=t??MAX_SAFE_INTEGER$1)&&("number"==i||"symbol"!=i&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}var _isIndex=isIndex$1,MAX_SAFE_INTEGER=0x1fffffffffffff;function isLength$2(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER}var isLength_1=isLength$2,baseGetTag$2=_baseGetTag,isLength$1=isLength_1,isObjectLike$3=isObjectLike_1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$1="[object Error]",funcTag$1="[object Function]",mapTag$4="[object Map]",numberTag$2="[object Number]",objectTag$3="[object Object]",regexpTag$2="[object RegExp]",setTag$4="[object Set]",stringTag$2="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};function baseIsTypedArray$1(e){return isObjectLike$3(e)&&isLength$1(e.length)&&!!typedArrayTags[baseGetTag$2(e)]}typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag$2]=typedArrayTags[boolTag$2]=typedArrayTags[dataViewTag$3]=typedArrayTags[dateTag$2]=typedArrayTags[errorTag$1]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$4]=typedArrayTags[numberTag$2]=typedArrayTags[objectTag$3]=typedArrayTags[regexpTag$2]=typedArrayTags[setTag$4]=typedArrayTags[stringTag$2]=typedArrayTags[weakMapTag$2]=!1;var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$3(e){return function(t){return e(t)}}var _baseUnary=baseUnary$3,_nodeUtil={exports:{}};_nodeUtil.exports,function(e,t){var i=_freeGlobal,n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n&&i.process;e.exports=function(){try{return r&&r.require&&r.require("util").t
165ypes||o&&o.binding&&o.binding("util")}catch{}}()}(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary$2=_baseUnary,nodeUtil$2=_nodeUtilExports,nodeIsTypedArray=nodeUtil$2&&nodeUtil$2.isTypedArray,isTypedArray$1=nodeIsTypedArray?baseUnary$2(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$1,baseTimes=_baseTimes,isArguments$1=isArguments_1,isArray$5=isArray_1,isBuffer$1=isBufferExports,isIndex=_isIndex,isTypedArray=isTypedArray_1,objectProto$6=Object.prototype,hasOwnProperty$4=objectProto$6.hasOwnProperty;function arrayLikeKeys$2(e,t){var i=isArray$5(e),n=!i&&isArguments$1(e),r=!i&&!n&&isBuffer$1(e),o=!i&&!n&&!r&&isTypedArray(e),a=i||n||r||o,s=a?baseTimes(e.length,String):[],l=s.length;for(var c in e)(t||hasOwnProperty$4.call(e,c))&&!(a&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||isIndex(c,l)))&&s.push(c);return s}var _arrayLikeKeys=arrayLikeKeys$2,objectProto$5=Object.prototype;function isPrototype$3(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||objectProto$5)}var _isPrototype=isPrototype$3;function overArg$2(e,t){return function(i){return e(t(i))}}var _overArg=overArg$2,overArg$1=_overArg,nativeKeys$1=overArg$1(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype$2=_isPrototype,nativeKeys=_nativeKeys,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty;function baseKeys$1(e){if(!isPrototype$2(e))return nativeKeys(e);var t=[];for(var i in Object(e))hasOwnProperty$3.call(e,i)&&"constructor"!=i&&t.push(i);return t}var _baseKeys=baseKeys$1,isFunction=isFunction_1,isLength=isLength_1;function isArrayLike$2(e){return null!=e&&isLength(e.length)&&!isFunction(e)}var isArrayLike_1=isArrayLike$2,arrayLikeKeys$1=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike$1=isArrayLike_1;function keys$3(e){return isArrayLike$1(e)?arrayLikeKeys$1(e):baseKeys(e)}var keys_1=keys$3,copyObject$4=_copyObject,keys$2=keys_1;function baseAssign$1(e,t){return e&&copyObject$4(t,keys$2(t),e)}var _baseAssign=baseAssign$1;function nativeKeysIn$1(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}var _nativeKeysIn=nativeKeysIn$1,isObject$2=isObject_1,isPrototype$1=_isPrototype,nativeKeysIn=_nativeKeysIn,objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty;function baseKeysIn$1(e){if(!isObject$2(e))return nativeKeysIn(e);var t=isPrototype$1(e),i=[];for(var n in e)"constructor"==n&&(t||!hasOwnProperty$2.call(e,n))||i.push(n);return i}var _baseKeysIn=baseKeysIn$1,arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike=isArrayLike_1;function keysIn$3(e){return isArrayLike(e)?arrayLikeKeys(e,!0):baseKeysIn(e)}var keysIn_1=keysIn$3,copyObject$3=_copyObject,keysIn$2=keysIn_1;function baseAssignIn$1(e,t){return e&&copyObject$3(t,keysIn$2(t),e)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports,function(e,t){var i=_root,n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?i.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var i=e.length,n=a?a(i):new e.constructor(i);return e.copy(n),n}}(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$1(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i<n;)t[i]=e[i];return t}var _copyArray=copyArray$1;function arrayFilter$1(e,t){for(var i=-1,n=null==e?0:e.length,r=0,o=[];++i<n;){var a=e[i];t(a,i,e)&&(o[r++]=a)}return o}var _arrayFilter=arrayFilter$1;function stubArray$2(){return[]}var stubArray_1=stubArray$2,arrayFilter=_arrayFilter,stubArray$1=stubArray_1,objectProto$2=Object.prototype,propertyIsEnumerable=objectProto$2.propertyIsEnumerable,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbols$3=nativeGetSymbols$1?function(e){return null==e?[]:arrayFilter(nativeGetSymbols$1(e=Object(e)),function(t){return propertyIsEnumerable.call(e,t)})}:stubArray$1,_getSymbols=getSymbols$3,copyObject$2=_copyObject,getSymbols$2=_getSymbols;function copySymbols$1(e,t){return copyObject$2(e,getSymbols$2(e),t)}var _copySymbols=copySymbols$1;function arrayPush$3(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}var _arrayPush=arrayPush$3,overArg=_overArg,getPrototype$3=overArg(Object.getPrototypeOf,Object),_getPrototype=getPrototype$3,arrayPush$2=_arrayPush,getPrototype$2=_getPrototype,getSymbols$
1651=_getSymbols,stubArray=stubArray_1,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbolsIn$2=nativeGetSymbols?function(e){for(var t=[];e;)arrayPush$2(t,getSymbols$1(e)),e=getPrototype$2(e);return t}:stubArray,_getSymbolsIn=getSymbolsIn$2,copyObject$1=_copyObject,getSymbolsIn$1=_getSymbolsIn;function copySymbolsIn$1(e,t){return copyObject$1(e,getSymbolsIn$1(e),t)}var _copySymbolsIn=copySymbolsIn$1,arrayPush$1=_arrayPush,isArray$4=isArray_1;function baseGetAllKeys$2(e,t,i){var n=t(e);return isArray$4(e)?n:arrayPush$1(n,i(e))}var _baseGetAllKeys=baseGetAllKeys$2,baseGetAllKeys$1=_baseGetAllKeys,getSymbols=_getSymbols,keys$1=keys_1;function getAllKeys$1(e){return baseGetAllKeys$1(e,keys$1,getSymbols)}var _getAllKeys=getAllKeys$1,baseGetAllKeys=_baseGetAllKeys,getSymbolsIn=_getSymbolsIn,keysIn$1=keysIn_1;function getAllKeysIn$2(e){return baseGetAllKeys(e,keysIn$1,getSymbolsIn)}var _getAllKeysIn=getAllKeysIn$2,getNative$3=_getNative,root$4=_root,DataView$2=getNative$3(root$4,"DataView"),_DataView=DataView$2,getNative$2=_getNative,root$3=_root,Promise$2=getNative$2(root$3,"Promise"),_Promise=Promise$2,getNative$1=_getNative,root$2=_root,Set$2=getNative$1(root$2,"Set"),_Set=Set$2,getNative=_getNative,root$1=_root,WeakMap$2=getNative(root$1,"WeakMap"),_WeakMap=WeakMap$2,DataView$1=_DataView,Map$1=_Map,Promise$1=_Promise,Set$1=_Set,WeakMap$1=_WeakMap,baseGetTag$1=_baseGetTag,toSource=_toSource,mapTag$3="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",setTag$3="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$2="[object DataView]",dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap$1),getTag$3=baseGetTag$1;(DataView$1&&getTag$3(new DataView$1(new ArrayBuffer(1)))!=dataViewTag$2||Map$1&&getTag$3(new Map$1)!=mapTag$3||Promise$1&&getTag$3(Promise$1.resolve())!=promiseTag||Set$1&&getTag$3(new Set$1)!=setTag$3||WeakMap$1&&getTag$3(new WeakMap$1)!=weakMapTag$1)&&(getTag$3=function(e){var t=baseGetTag$1(e),i=t==objectTag$2?e.constructor:void 0,n=i?toSource(i):"";if(n)switch(n){case dataViewCtorString:return dataViewTag$2;case mapCtorString:return mapTag$3;case promiseCtorString:return promiseTag;case setCtorString:return setTag$3;case weakMapCtorString:return weakMapTag$1}return t});var _getTag=getTag$3,objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function initCloneArray$1(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&hasOwnProperty$1.call(e,"index")&&(i.index=e.index,i.input=e.input),i}var _initCloneArray=initCloneArray$1,root=_root,Uint8Array$2=root.Uint8Array,_Uint8Array=Uint8Array$2,Uint8Array$1=_Uint8Array;function cloneArrayBuffer$3(e){var t=new e.constructor(e.byteLength);return new Uint8Array$1(t).set(new Uint8Array$1(e)),t}var _cloneArrayBuffer=cloneArrayBuffer$3,cloneArrayBuffer$2=_cloneArrayBuffer;function cloneDataView$1(e,t){var i=t?cloneArrayBuffer$2(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}var _cloneDataView=cloneDataView$1,reFlags=/\w*$/;function cloneRegExp$1(e){var t=new e.constructor(e.source,reFlags.exec(e));return t.lastIndex=e.lastIndex,t}var _cloneRegExp=cloneRegExp$1,Symbol$2=_Symbol,symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function cloneSymbol$1(e){return symbolValueOf?Object(symbolValueOf.call(e)):{}}var _cloneSymbol=cloneSymbol$1,cloneArrayBuffer$1=_cloneArrayBuffer;function cloneTypedArray$1(e,t){var i=t?cloneArrayBuffer$1(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}var _cloneTypedArray=cloneTypedArray$1,cloneArrayBuffer=_cloneArrayBuffer,cloneDataView=_cloneDataView,cloneRegExp=_cloneRegExp,cloneSymbol=_cloneSymbol,cloneTypedArray=_cloneTypedArray,boolTag$1="[object Boolean]",dateTag$1="[object Date]",mapTag$2="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$2
165="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag$1(e,t,i){var n=e.constructor;switch(t){case arrayBufferTag$1:return cloneArrayBuffer(e);case boolTag$1:case dateTag$1:return new n(+e);case dataViewTag$1:return cloneDataView(e,i);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(e,i);case mapTag$2:return new n;case numberTag$1:case stringTag$1:return new n(e);case regexpTag$1:return cloneRegExp(e);case setTag$2:return new n;case symbolTag$1:return cloneSymbol(e)}}var _initCloneByTag=initCloneByTag$1,isObject$1=isObject_1,objectCreate=Object.create,baseCreate$1=function(){function e(){}return function(t){if(!isObject$1(t))return{};if(objectCreate)return objectCreate(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}(),_baseCreate=baseCreate$1,baseCreate=_baseCreate,getPrototype$1=_getPrototype,isPrototype=_isPrototype;function initCloneObject$1(e){return"function"!=typeof e.constructor||isPrototype(e)?{}:baseCreate(getPrototype$1(e))}var _initCloneObject=initCloneObject$1,getTag$2=_getTag,isObjectLike$2=isObjectLike_1,mapTag$1="[object Map]";function baseIsMap$1(e){return isObjectLike$2(e)&&getTag$2(e)==mapTag$1}var _baseIsMap=baseIsMap$1,baseIsMap=_baseIsMap,baseUnary$1=_baseUnary,nodeUtil$1=_nodeUtilExports,nodeIsMap=nodeUtil$1&&nodeUtil$1.isMap,isMap$1=nodeIsMap?baseUnary$1(nodeIsMap):baseIsMap,isMap_1=isMap$1,getTag$1=_getTag,isObjectLike$1=isObjectLike_1,setTag$1="[object Set]";function baseIsSet$1(e){return isObjectLike$1(e)&&getTag$1(e)==setTag$1}var _baseIsSet=baseIsSet$1,baseIsSet=_baseIsSet,baseUnary=_baseUnary,nodeUtil=_nodeUtilExports,nodeIsSet=nodeUtil&&nodeUtil.isSet,isSet$1=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,isSet_1=isSet$1,Stack=_Stack,arrayEach=_arrayEach,assignValue=_assignValue,baseAssign=_baseAssign,baseAssignIn=_baseAssignIn,cloneBuffer=_cloneBufferExports,copyArray=_copyArray,copySymbols=_copySymbols,copySymbolsIn=_copySymbolsIn,getAllKeys=_getAllKeys,getAllKeysIn$1=_getAllKeysIn,getTag=_getTag,initCloneArray=_initCloneArray,initCloneByTag=_initCloneByTag,initCloneObject=_initCloneObject,isArray$3=isArray_1,isBuffer=isBufferExports,isMap=isMap_1,isObject=isObject_1,isSet=isSet_1,keys=keys_1,keysIn=keysIn_1,CLONE_DEEP_FLAG$1=1,CLONE_FLAT_FLAG$1=2,CLONE_SYMBOLS_FLAG$1=4,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag$1="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};function baseClone$1(e,t,i,n,r,o){var a,s=t&CLONE_DEEP_FLAG$1,l=t&CLONE_FLAT_FLAG$1,c=t&CLONE_SYMBOLS_FLAG$1;if(i&&(a=r?i(e,n,r,o):i(e)),void 0!==a)return a;if(!isObject(e))return e;var u=isArray$3(e);if(u){if(a=initCloneArray(e),!s)return copyArray(e,a)}else{var d=getTag(e),h=d==funcTag||d==genTag;if(isBuffer(e))return cloneBuffer(e,s);if(d==objectTag$1||d==argsTag||h&&!r){if(a=l||h?{}:initCloneObject(e),!s)return l?copySymbolsIn(e,baseAssignIn(a,e)):copySymbols(e,baseAssign(a,e))}else{if(!cloneableTags[d])return r?e:{};a=initCloneByTag(e,d,s)}}o||(o=new Stack);var p=o.get(e);if(p)return p;o.set(e,a),isSet(e)?e.forEach(function(n){a.add(baseClone$1(n,t,i,n,e,o))}):isMap(e)&&e.forEach(function(n,r){a.set(r,baseClone$1(n,t,i,r,e,o))});var f=c?l?getAllKeysIn$1:getAllKeys:l?keysIn:keys,m=u?void 0:f(e);return arrayEach(m||e,function(n,r){m&&(n=e[r=n]),assignValue(a,r,baseClone$1(n,t,i,r,e,o))}),a}cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag$1]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;var _baseClone=baseClone$1,isArray$2=isArray_1,isSymbol$1=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(e,t){if(isArray$2(e))return!1;var i=typeof e;return!!("number"==i||"symbol"==i||"boolean"==i||null==e||isSymbol$1(e))||reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t)}var _isKey=isKey$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError(FUNC_ERROR_TEXT);var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],o=i.cache;if(o.has(r))return o.get(r);var a=e.apply(this,n);return i.cache=o.set(r,a)||o,a};return i.cache=new(memoize$1.Cache||MapCache),i}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var t=memoize(e,function(e){return i.size===MAX_MEMOIZE_SIZE&&i.clear(),e}),i=t.cache;return t}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,function(e,i,n,r){t.push(n?r.replace(reEscapeChar,"$1"):i||e)}),t}),_stringToPath=stringToPath$1,isArray$1=isArray_1,isKey=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$3(e,t){return isArray$1(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}var _castPath=castPath$3;function last$1(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}
165var last_1=last$1,isSymbol=isSymbol_1;function toKey$2(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var _toKey=toKey$2,castPath$2=_castPath,toKey$1=_toKey;function baseGet$1(e,t){t=castPath$2(t,e);for(var i=0,n=t.length;null!=e&&i<n;)e=e[toKey$1(t[i++])];return i&&i==n?e:void 0}var _baseGet=baseGet$1,baseGet=_baseGet,baseSlice=_baseSlice;function parent$1(e,t){return t.length<2?e:baseGet(e,baseSlice(t,0,-1))}var _parent=parent$1,castPath$1=_castPath,last=last_1,parent=_parent,toKey=_toKey;function baseUnset$1(e,t){return t=castPath$1(t,e),null==(e=parent(e,t))||delete e[toKey(last(t))]}var _baseUnset=baseUnset$1,baseGetTag=_baseGetTag,getPrototype=_getPrototype,isObjectLike=isObjectLike_1,objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject$1(e){if(!isObjectLike(e)||baseGetTag(e)!=objectTag)return!1;var t=getPrototype(e);if(null===t)return!0;var i=hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&funcToString.call(i)==objectCtorString}var isPlainObject_1=isPlainObject$1,isPlainObject=isPlainObject_1;function customOmitClone$1(e){return isPlainObject(e)?void 0:e}var _customOmitClone=customOmitClone$1,Symbol$1=_Symbol,isArguments=isArguments_1,isArray=isArray_1,spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable$1(e){return isArray(e)||isArguments(e)||!!(spreadableSymbol&&e&&e[spreadableSymbol])}var _isFlattenable=isFlattenable$1,arrayPush=_arrayPush,isFlattenable=_isFlattenable;function baseFlatten$1(e,t,i,n,r){var o=-1,a=e.length;for(i||(i=isFlattenable),r||(r=[]);++o<a;){var s=e[o];t>0&&i(s)?t>1?baseFlatten$1(s,t-1,i,n,r):arrayPush(r,s):n||(r[r.length]=s)}return r}var _baseFlatten=baseFlatten$1,baseFlatten=_baseFlatten;function flatten$1(e){return(null==e?0:e.length)?baseFlatten(e,1):[]}var flatten_1=flatten$1;function apply$1(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}var _apply=apply$1,apply=_apply,nativeMax=Math.max;function overRest$1(e,t,i){return t=nativeMax(void 0===t?e.length-1:t,0),function(){for(var n=arguments,r=-1,o=nativeMax(n.length-t,0),a=Array(o);++r<o;)a[r]=n[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=n[r];return s[t]=i(a),apply(e,this,s)}}var _overRest=overRest$1;function constant$1(e){return function(){return e}}var constant_1=constant$1;function identity$1(e){return e}var identity_1=identity$1,constant=constant_1,defineProperty=_defineProperty$2,identity=identity_1,baseSetToString$1=defineProperty?function(e,t){return defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:constant(t),writable:!0})}:identity,_baseSetToString=baseSetToString$1,HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut$1(e){var t=0,i=0;return function(){var n=nativeNow(),r=HOT_SPAN-(n-i);if(i=n,r>0){if(++t>=HOT_COUNT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var _shortOut=shortOut$1,baseSetToString=_baseSetToString,shortOut=_shortOut,setToString$1=shortOut(baseSetToString),_setToString=setToString$1,flatten=flatten_1,overRest=_overRest,setToString=_setToString;function flatRest$1(e){return setToString(overRest(e,void 0,flatten),e+"")}var _flatRest=flatRest$1,arrayMap=_arrayMap,baseClone=_baseClone,baseUnset=_baseUnset,castPath=_castPath,copyObject=_copyObject,customOmitClone=_customOmitClone,flatRest=_flatRest,getAllKeysIn=_getAllKeysIn,CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4,omit=flatRest(function(e,t){var i={};if(null==e)return i;var n=!1;t=arrayMap(t,function(t){return t=castPath(t,e),n||(n=t.length>1),t}),copyObject(e,getAllKeysIn(e),i),n&&(i=baseClone(i,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone));for(var r=t.length;r--;)baseUnset(i,t[r]);return i}),omit_1=omit;let _omit=getDefaultExportFromCjs$1(omit_1);var serialize=function(e){return Object.keys(e).map(function(t){return void 0===e[t]?e[t]:"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))}).filter(function(e){return void 0!==e}).join("&")};function createUrl(e){if(!e.params)return e.url;var t=e.url;t.match(/\?/)?t+="&":t.match(/\/$/)||t.match(/html?$/)?t+="?":t+="/?";var i=(t.match(/[?&][^=]+/g)||[]).map(function(e){return e.slice(1)});return(t+serialize(_omit(e.params,i))).replace(/&$/,"")}function getUrlQueryParam(e,t){if(!e||0===e.length||-1===e.indexOf("?")||!t||0===t.length)return null;var i=new URLSearchParams(e.split("?")[1]);if(i.has(t)){var n=i.get(t);if(n.length>0)return n}return null}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw TypeError(`Invalid attempt to de
165structure non-iterable instance.
166In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(e,t)}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function _iterableToArrayLimit(e,t){var i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,o=[],a=!0,s=!1;try{for(i=i.call(e);!(a=(n=i.next()).done)&&(o.push(n.value),!(t&&o.length===t));a=!0);}catch(e){s=!0,r=e}finally{try{a||null==i.return||i.return()}finally{if(s)throw r}}return o}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function ownKeys$1(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function _objectSpread$1(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$1(Object(i),!0).forEach(function(t){_defineProperty$1(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys$1(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function _defineProperty$1(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var zoids={},zoidUrls={},zoidDimensions={};function xcomponent(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e,n=_objectSpread$1(_objectSpread$1({},i.options),t);function r(e){i.dispatcher.emit("view.error",{type:"fatal",message:e})}if(n.params.zoid=1,!n.playerContainer&&!i.options.viewContainer)return void r('Configuration property "playerContainer" is missing. Not able to attach the container to the DOM.');if(!n.url)return void r('Configuration property "url" is missing. Not able to attach the container to the DOM.');var o=n.tag||"ease-live";n.params.tag=o;var a=createUrl(n);i.emit("view.init",{url:a}),zoidUrls[o]=a,zoidDimensions[o]={width:n.width||"100%",height:n.height||"100%"};var s=new URL(a),l=s.hostname,c=s.protocol,u="".concat(c,"//").concat(l),d=n.createView||window.__easeLive.createEaseLiveWebBridgeHost,h=zoids[o]||d({tag:o,defaultLogLevel:"error",url:function(){return zoidUrls[o]},attributes:{iframe:{allow:"camera ".concat(u,";microphone ").concat(u,";clipboard-read ").concat(u,";clipboard-write ").concat(u,";fullscreen ").concat(u,";"),title:""}},dimensions:function(){return zoidDimensions[o]},prerenderTemplate:function(e){return e.doc.createElement("html")},autoResize:{width:!1,height:!1}});zoids[o]||(zoids[o]=h);var p,f,m=i.options.viewContainer||n.playerContainer;"string"==typeof m&&(m=document.querySelector(m));var g={};if(localStorage){var v="ease-live:".concat(e.accountId,":").concat(e.options.projectId);Object.entries(localStorage).forEach(function(e){var t=_slicedToArray(e,2),i=t[0],n=t[1];i.startsWith(v)&&(g[i.slice(v.length+1)]=n)})}var y=h({timeout:n.setupTimeout||3e4,onTimeout:function(){},onError:function(){},logLevel:n.logLevel,emit:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{id:"web-app"},r=e;if("StageClicked"===r)r="bridge.stage";else if("WebAppOnLoadEnd"===r)r="app.ready";else if("WebAppOnLoadStart"===r)r="app.loading";else if("app.deeplink"===r&&t&&t.path)return void window.open(t.path);i.emit(r,t,n)},setDispatcher:function(e){p=e},appStorage:g}),b=function(){i.emit("view.mouseenter")},S=!1;function _(e,t,i){i&&"web-app"===i.id||S||p&&p.emit(e,t||{},i)}function E(e,t){"player.ready"!==this.event&&_(this.event,e,t)}function T(e,t){_(this.event,e,t)}function w(e,t){_(this.event,e,t)}function A(e,t){_(this.event,e,t)}function P(e,t){"string"!=typeof e.event?console.error('bridge: appMessage data missing "event" field',e):_(e.event,e.metadata,t)}function I(e){localStorage.setItem(e.key,e.value)}function C(){return S=!0,i&&(i.off("destroy",C),i.off("destroyView",C),i.off("bridge.*",T),i.off("player.*",E),i.off("stage.*",w),i.off("app.*",A),i.off("appMessage",P),i.off("app.storage",I)),f&&(f.removeEventListener("mouseenter",b),f.remove()),y.close().then(function(){f=null,p=null,i=null,delete zoids[o]}).catch(function(){}).finally(function(){S=!1})}return y.render(m).then(function(){if(!(f=m.querySelector("div[id^=zoid-".concat(o,"]")))){var e=m.querySelector("slot");if(e&&e.name){var t=document.querySelector("div[slot^=".concat(e.name,"]"));t&&(t.style.width=n.width||"100%",t.style.height=n.height||"100%"),f=document.querySelector("div[slot^=".concat(e.name,"] > div[id^=zoid-").concat(o,"]"))}}if(f){f.addEventListener("mouseenter",b);var r=f.querySelector("iframe");r&&(r.style.pointerEvents="none");var s=!1,l=function(){s=!s,i.emit("bridge.stage",{controls:s?"visible":"hidden"}),i.emit("stage.clicked",{controls:s?"visible":"hidden"})};f.addEventListener("click",l),i.once("app.ready",function(){f&&f.removeEventListener("click",l),r&&(r.style.pointerEvents=""),r=null})}i.emit("view.ready",{viewContainer:f,url:a})}
166).catch(function(e){S&&e&&"Component closed"===e.message||i.emit("view.error",e)}),i.on("player.*",E),i.on("bridge.*",T),i.on("stage.*",w),i.on("app.*",A),i.on("appMessage",P),i.on("app.storage",I),i.on("destroy",C),{tag:o,focus:function(){if(f){var e=f.querySelector("iframe");if(e)return e.focus(),i.emit("appMessage",{event:"app.focus",metadata:{}}),!0}return!1},hasFocus:function(){if(f){var e=f.querySelector("iframe");if(e)return document.activeElement===e}return!1},destroy:function(){return C()}}}let version$1="1.19.0",packageInfo={version:version$1};function _classCallCheck$1(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass$1(e,t,i){return t&&_defineProperties$1(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var RestApi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.hostname=0===t.accountId.indexOf("staging-")?"".concat(t.accountId,".dev.number60.tv"):"".concat(t.accountId,"-cdn.cloud.easelive.tv"),this.baseUrl="https://".concat(this.hostname,"/api/v1")}return _createClass$1(e,[{key:"getProject",value:function(e,t){var i=t&&"prod"!==t?"?env=".concat(t):"";return fetch("".concat(this.baseUrl,"/projects/live/").concat(e).concat(i)).then(function(e){return e.json()})}},{key:"getProgram",value:function(e){return fetch("".concat(this.baseUrl,"/programs/live/").concat(e)).then(function(e){return e.json()})}}]),e}();function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(i),!0).forEach(function(t){_defineProperty(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,i){return t&&_defineProperties(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var version=packageInfo.version,loadScript=function(e,t,i){if(window.__easeLive&&window.__easeLive.createEaseLiveWebBridgeHost)return void t();window&&!window.__easeLive&&(window.__easeLive={instances:{}});var n=document.createElement("script");n.src=e,n.onload=function(){window.__easeLive&&window.__easeLive.createEaseLiveWebBridgeHost?(delete window.createEaseLiveWebBridgeHost,t()):i(),n.parentNode.removeChild(n),n=null},n.onerror=function(){n.parentNode.removeChild(n),n=null,i()},document.head.appendChild(n)},EaseLive=function(){function e(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e),this.instanceId=Date.now().toString(36)+Math.floor(1e12+9*Math.random()*1e12).toString(36),window&&!window.__easeLive&&(window.__easeLive={instances:{}}),this.player=void 0,this.view=void 0;var n={logLevel:"info",params:{loaderTimeout:30}};this.options=_objectSpread(_objectSpread({},n),i),this.options.params=_objectSpread(_objectSpread({},n.params),i.params),this.isPlayerReady=!1,this.installedPlugins=[],this.dispatcher=new EventDispatcher;var r=this.accountId;r&&(this.api=new RestApi({accountId:r}),this.options.params.accountId||(this.options.params.accountId=r)),!this.options.params.projectId&&this.options.projectId&&(this.options.params.projectId=this.options.projectId),!this.options.params.programId&&this.options.programId&&(this.options.params.programId=this.options.programId),["on","off","emit","once"].forEach(function(e){t[e]=t.dispatcher[e].bind(t.dispatcher)}),error(this),this.checkRequiredParms(),"debug"===i.logLevel&&(console.log("Initializing Ease Live",i),this.on("*",function(e,t,i){console.log(e,t,i)}))}return _createClass(e,[{key:"accountId",get:function(){return this.options.accountId||this.options.params.accountId||getUrlQueryParam(this.options.url,"accountId")}},{key:"checkRequiredParms",value:function(){var e=this;if(["playerPlugin"].forEach(function(t){if(!e.options[t]){var i="missing ".concat(t," parameter");throw e.emit("bridge.error",{type:"fatal",message:i}),Error(i)}}),!(this.options.url||this.options.params.accountId&&(this.options.params.projectId||this.options.params.programId))){var t="accountId or url parameter must be set";
166throw this.emit("bridge.error",{type:"fatal",message:t}),Error(t)}}},{key:"getPlayer",value:function(){return this.player}},{key:"use",value:function(e){if(this.installedPlugins.indexOf(e)>-1)return this;for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];i.unshift(this);try{"function"==typeof e.install?e.install.apply(e,i):"function"==typeof e&&e.apply(void 0,i),this.installedPlugins.push(e)}catch(e){console.error("Error loading plug-in",e),this.emit("bridge.error",{type:"warning",message:e.message})}return this}},{key:"init",value:function(){var e=this;if(!this.isInitialized){this.isInitialized=!0,this.options.setupTimeout&&setTimeout(function(){!0!==e.isPlayerReady&&e.dispatcher.emit("player.error",{message:"Player setup timed out."})},this.options.setupTimeout);var t=this.options.playerPlugin;this.on("bridge.ready",function(){var t=new UAParser(navigator.userAgent),i="desktop",n=t.getDevice();n&&n.type&&("tablet"===n.type?i="tablet":"mobile"===n.type?i="phone":("smarttv"===n.type||"console"===n.type)&&(i="tv"));var r={},o=t.getOS();o&&o.name&&(r.name=o.name.toLowerCase().replace(" ",""),r.version=o.version),setTimeout(function(){var t={type:i,orientation:window.innerHeight>window.innerWidth?"portrait":"landscape",model:navigator.userAgent,sdk:"web-".concat(version),protocol:"2.0",os:r};e.options.keymapping&&(t.keymapping=e.options.keymapping),e.dispatcher.emit("app.deviceinfo",t),e.isPlayerReady&&e.dispatcher.emit("easelive.ready")},0),e.addGlobalDebugInfo(e.options)}),this.once("player.ready",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.isPlayerReady=!0,t.player&&(e.player=t.player),e._loadView(t)}),this.player=Array.isArray(t)?t[0](this,t[1]):t(this)}}},{key:"_loadView",value:function(e){var t=this,i=this.options.viewPlugin||xcomponent,n=function(){try{t.view=Array.isArray(i)?i[0](t,_objectSpread(_objectSpread({},i[1]),e)):i(t,e)}catch(e){console.error(e),t.emit("view.error",{type:"fatal",message:"Error creating view"})}},r=function(){if(t.options.createView||t.options.viewPlugin)n();else{var e=t.options.url.split("index.html")[0];loadScript("".concat(_trim(e,"/"),"/js/webbridge.js"),function(){n()},function(){loadScript("".concat(e.split("/live/")[0],"/js/webbridge.js"),function(){n()},function(){loadScript("https://studio.easelive.tv/live/js/webbridge.js",function(){n()},function(){t.emit("view.error",{type:"fatal",message:"Error loading bridge script"})})})})}};if(this.api){var o=function(){t.options.url?r():t.api.getProject(t.options.projectId,t.options.env).then(function(e){t.options.url=e.webappUrl,r()}).catch(function(){t.emit("view.error",{type:"fatal",message:"Error loading project"})})};this.options.projectId?o():this.api.getProgram(this.options.params.programId).then(function(e){t.options.projectId=e.projectId,o()}).catch(function(){t.emit("view.error",{type:"fatal",message:"Error loading project"})})}else r()}},{key:"destroy",value:function(){var e=this;return this.view&&this.view.destroy?this.view.destroy().then(function(){return e._cleanup()}):this._cleanup()}},{key:"_shouldDestroyBridgeHost",value:function(){return!!window&&!!window.__easeLive&&0===Object.keys(window.__easeLive.instances).length&&"function"==typeof window.__easeLive.destroyEaseLiveWebBridgeHost}},{key:"_cleanup",value:function(){if(this.isInitialized=!1,this.dispatcher.emit("destroy"),this.dispatcher.removeAllListeners(),this.player=null,this.view=null,window&&window.__easeLive&&(delete window.__easeLive.instances[this.instanceId],this._shouldDestroyBridgeHost())){var e=window.__easeLive.destroyEaseLiveWebBridgeHost();return delete window.__easeLive,e}return Promise.resolve()}},{key:"addGlobalDebugInfo",value:function(){return!!window&&(window.__easeLive||(window.__easeLive={instances:{}}),window.__easeLive.instances[this.instanceId]=this.options,!0)}},{key:"focus",value:function(){return!!this.view&&!!this.view.focus&&this.view.focus()}},{key:"hasFocus",value:function(){return!!this.view&&!!this.view.hasFocus&&this.view.hasFocus()}},{key:"setProgram",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options.url=null,this.options=_objectSpread(_objectSpread({},this.options),t),t.url&&(this.options.url=t.url),t.projectId&&(this.options.params.projectId=t.projectId),t.programId&&(this.options.params.programId=t.programId),this.view&&this.view.destroy?this.view.destroy().then(function(){return window.__easeLive.destroyEaseLiveWebBridgeHost()}).then(function(){e._loadView()}).catch(function(){}):this._loadView()}}
166,{key:"setStream",value:function(e){this.emit("app.update",{params:e})}}]),e}();EaseLive.xcomponent=xcomponent;let log$2=loglevelExports.getLogger("EaseLive");function mapPlayerStatus(e){switch(e){case"PLAYING":return"playing";case"BUFFERING":return"buffering";case"PAUSED":return"paused";case"IDLE":case"ENDED":case"ERROR":return"stopped";default:throw Error(`unknown player status ${e}`)}}let En=class En{static getInstance(e,t,i,n,r){if(En.instance)return En.instance;En.playerCoordinator=t,En.divElement=r,En.instance=new EaseLive({accountId:e.accountId,projectId:e.projectId,params:{programId:e.programId,language:e.language},playerPlugin:(e,t)=>{}}),En.lastTimestamp=0;let o=En.instance;return t.addEventListener(En.playerCoordinatorEventHandler),o.on("bridge.ready",()=>{log$2.info("EaseLive bridge ready",o.view);let e=t.getPlayerStatus();En.emitEaseLiveEvent("player.state",{state:mapPlayerStatus(e)})}),o.on("*.error",async e=>{log$2.warn("EaseLive error",e),i(),await En.destroy()}),o.on("view.mouseenter",e=>{log$2.debug("EaseLive view mouse enter",e)}),o.on("stage.clicked",e=>{log$2.debug("EaseLive stage clicked",e),n.current(e)}),o.on("player.time",e=>{let i=En.lastTimestamp;if(null===i)return;let n=e.timecode-i;Math.abs(n)>0&&t.seekOrTimeshiftRelative(n/1e3)}),En.instance.init(),t.isVideoLoaded&&(log$2.info("EaseLive player loaded"),En.emitEaseLiveEvent("player.ready",{playerContainer:r,player:t}),En.emitEaseLiveEvent("stage.clicked",{controls:"visible"})),o}static emitEaseLiveEvent(e,...t){var i;"player.time"!==e&&log$2.debug("EaseLive emit event",e,t),null==(i=En.instance)||i.emit(e,...t)}static async destroy(){var e;En.instance&&(null==(e=En.playerCoordinator)||e.removeEventListener(En.playerCoordinatorEventHandler),await En.instance.destroy(),En.instance=null,En.playerCoordinator=null,En.divElement=null,En.lastTimestamp=null)}};Si(En,"instance",null),Si(En,"playerCoordinator",null),Si(En,"divElement",null),Si(En,"lastTimestamp",null),Si(En,"playerCoordinatorEventHandler",e=>{var t;let i=En.playerCoordinator,n=En.divElement;if(!(!i||!n))switch(e.type){case"timeChanged":if(!(null!=(t=i.getPlayerData())&&t.isShowingAd())){let t=getPlayerTimestamp(e,i);En.lastTimestamp=t,En.emitEaseLiveEvent("player.time",{timecode:t})}break;case"loaded":En.emitEaseLiveEvent("player.ready",{playerContainer:n,player:i}),En.emitEaseLiveEvent("player.time",{timecode:(e.data.duration??0)*1e3});break;case"playing":En.emitEaseLiveEvent("player.state",{state:"playing"});break;case"paused":En.emitEaseLiveEvent("player.state",{state:"paused"})}});let EaseLiveInstance=En;function getPlayerTimestamp(e,t){let i=1e3*e.playbackPosition;return"VOD"===t.getPlaybackMode()?t.getLatestSegmentStartTimestamp():i}let styles$3=".ease-live-overlay{color:#fff;pointer-events:all}.ease-live-overlay__wrapper{top:0;left:0;height:100%;width:100%;position:absolute}",log$1=loglevelExports.getLogger("EaseLive");typeof window.global>"u"&&(window.global=window),typeof process>"u"&&(global.process={env:{}});let EaseLiveOverlay=({playerCoordinator:e,config:t,onBackgroundClick:i,onError:n})=>{let r=useControlsVisibilityContext().controlsVisibility,o=_$3(null),a=o.current,s=_$3(i);return s.current=i,p$6(()=>a?(log$1.info("creating EaseLive",a),EaseLiveInstance.getInstance(t,e,n,s,a),async()=>{log$1.info("Destroying existing EaseLive instance"),await EaseLiveInstance.destroy()}):void log$1.debug("EaseLive div not ready"),[a,t,e,n]),p$6(()=>{EaseLiveInstance.emitEaseLiveEvent("player.controls",{controls:"fade-in"===r?"visible":"hidden"})},[r]),o$i(k$5,{children:[o$i("style",{children:styles$3}),o$i("div",{onPointerUpCapture:()=>i(),class:"ease-live-overlay__wrapper",children:o$i("div",{class:"ease-live-overlay rbup-video-core-container","data-rbup-ease-live-overlay":!0,ref:o})})]})};function shouldShowControls(e,t){return(null==e?void 0:e.controls)==="visible"||(null==e?void 0:e.controls)!=="hidden"&&"disallow"===t}let useEaseLiveOverlay=(e,t)=>{let{allowControlsRendering:i,setAllowControlsRendering:n,showControlsTemporarily:r,fadeControlsAway:o}=useControlsVisibilityContext();return p$6(()=>{t&&e&&t("ACTIVE")}
166,[e,t]),{onEaseLiveBackgroundClick:T$4(e=>{shouldShowControls(e,i)?(n("allow"),r()):(n("disallow"),o())},[i,o,n,r]),onEaseLiveError:T$4(()=>{n("allow"),null==t||t("INACTIVE")},[t,n])}};function resolveCurrentlyPlayedAsset(e){if(!e)return;let t=new Date;return e.cards.find(e=>{let i=new Date(e.start_time),n=new Date(e.end_time);return t>=i&&t<=n})}function resolveMaturityRating(e){if(!e)return;let t=e.value;if(!t)return;let i=e.advisories;return{rating:t,advisory:i&&i.length>0?i.join(", "):void 0,ratingFormat:e.display}}let FETCH_DATA_INTERVAL=3e4,useGetCurrentlyPlayedAssetInfos=(e,t)=>{var i,n;let r=null==e?void 0:e.getMediaMetaData(),o=null==r?void 0:r.tvApiGuidesUrl,[a,s]=h$3(),[l,c]=h$3(),[u,d]=h$3(),h=_$3(!0),p=T$4(()=>{o&&fetchTvApiGuidesMetadata(o,!0).then(e=>{s(e)})},[o]);return p$6(()=>{p();let e=window.setInterval(()=>{p()},FETCH_DATA_INTERVAL);return()=>{window.clearInterval(e)}},[p]),p$6(()=>{let e=resolveCurrentlyPlayedAsset(a);c(t=>(null==t?void 0:t.id)!==(null==e?void 0:e.id)?e:t)},[a]),p$6(()=>{if(!l)return;if(h.current){h.current=!1,d(resolveMaturityRating(l.maturity_data));return}let e=window.setTimeout(()=>{d(resolveMaturityRating(l.maturity_data))},1e4);return()=>{window.clearTimeout(e)}},[l]),{assetId:null==l?void 0:l.id,image:(null==(n=null==(i=null==l?void 0:l.media_resources)?void 0:i.rbtv_display_art_landscape)?void 0:n.url)??(null==t?void 0:t.defaultImage),title:(null==l?void 0:l.title)??(null==t?void 0:t.defaultTitle),description:(null==l?void 0:l.short_description)??(null==t?void 0:t.defaultDescription),maturityRating:u}};function isLinearAsset(e){return"LIVE"===e.getPlaybackMode()&&"LINEAR"===e.getLiveVariant()}let CustomTvStreamingEaseLiveOverlayWrapperWithNextUp=({playerCoordinator:e,onEaseLiveActivated:t,showProductPlacement:i,sizeBreakpoints:n,productPlacementDefinition:r,playNextUp:o})=>{var a,s,l,c;let u=e.getMediaMetaData(),{nextUp:d,easeLiveConfig:h,maturityRatingChimeUrl:p}=u??{},f=_$3(null),m=_$3(()=>{}),g=_$3(useControlsVisibilityContext()),[v,y]=h$3(!0),b=(null==(a=e.getPlayerData())?void 0:a.getMainMediaDurationInSec())??0,S=(null==(s=e.getPlayerData())?void 0:s.getLastMainMediaPositionInSec())??0,_=(null==(l=e.getPlayerData())?void 0:l.isShowingAd())??!1,E=e.getPlayerStatus(),T=usePlayerWidth({current:(null==(c=e.getPlayerData())?void 0:c.getVideoElement())??null}),[w,A]=h$3(!1),[P,I]=h$3(null==u?void 0:u.maturityRating),C=F$4(()=>{let e=!P&&!i,t=!!(null!=n&&n.mediumOrBigger);return e||t},[P,i,null==n?void 0:n.mediumOrBigger]),M=isLinearAsset(e),[R,k]=h$3(C),[x,O]=h$3(i),D=T$4(t=>{switch(t){case"DISPLAYED":g.current.setAllowControlsRendering("disallow");break;case"CANCELLED_BY_REPLAY":case"CANCELLED_BY_USER_INTERACTION":A("CANCELLED_BY_USER_INTERACTION"===t),y(!1),g.current.setAllowControlsRendering("allow");break;case"TRIGGERED_AUTOMATICALLY":case"TRIGGERED_BY_USER_INTERACTION":d&&(e.setNextUpTransitioning(!0),g.current.setAllowControlsRendering("allow"),o(d,"TRIGGERED_AUTOMATICALLY"===t))}dispatchNextUpPlayerEvent(t,e,null==d?void 0:d.assetId)},[d,o,e]);m.current=T$4(e=>{f.current&&("seekingDone"===e.type||"seeking"===e.type)&&"RESTART"===e.issuer&&D("CANCELLED_BY_REPLAY")},[D]),p$6(()=>{let t=m.current;return e.addEventListener(t),()=>{e.removeEventListener(t)}},[e]),p$6(()=>{if("ENDED"===E&&(void 0===d||w)){let{playerId:t}=e;e.dispatchPlayerEvent({type:"playerModalClose",playerId:t})}},[w,d,E,e]);let{onEaseLiveBackgroundClick:L,onEaseLiveError:N}=useEaseLiveOverlay(h,t);p$6(()=>{hasValidProductPlacementComponentDefinition(r)&&hasValidDuration(b)&&isWithinDisplayTimeWindowBeforeVideoEnds(S,b,r.displayTimeInSec)&&O(!0)},[b,S,r]);let U=T$4(()=>{I(void 0),i||k(!0)},[i]),F=T$4(()=>{O(!1),k(!0)},[]),B=T$4(e=>{let{animationName:t}=e;switch(t){case"rating-sequence":U();break;case"product-placement-fade-out":F()}},[U,F]),{maturityRating:V}=useGetCurrentlyPlayedAssetInfos(e);return p$6(()=>{V&&I(V)},[V]),o$i(k$5,{children:[h&&o$i(EaseLiveOverlay,{playerCoordinator:e,config:h,onBackgroundClick:L,onError:N}),P&&o$i(MaturityRatingOverlay,{rating:P.rating,advisory:P.advisory,ratingFormat:P.ratingFormat,playerWidth:T,onAnimationEnd:B,chimeUrl:p,playChime:M}),x&&!P&&o$i(RbupVideoProductPlacement,{onAnimationEnd:B,productPlacementDefinition:r}),n&&R&&o$i(SubtitlesAvailable,{playerCoordinator:e,sizeBreakpoints:n}),o$i(TvStreamingNextUpToastWrapper,{allowRenderNextUp:v,nextUp:d,onNextVideoCallback:D,duration:b,posInSec:S,isShowingAd:_,playerStatus:E,nextUpToastRef:f})]})},styles$2=".animated-container{overscroll-behavior:contain;overflow:hidden}.animated-container.animated-container__overflowing{grid-row:1/3;align-self:end}.animated-container.animated-container__overflowing.animated-container__reference-wrapper,.animated-container.animated-container__overflowing .fading-content{height:100%}.animated-container.horizontal{width:var(--current-size);transition:width .5s ease,opacity .5s ease}.animated-container.horizontal .animated-container__reference-wrapper,.animated-container.horizontal .fading-content{height:100%}.animated-container.vertical{height:var(--current-size);transition:height .5s ease,opacity .5s ease}.animated-container.vertical:not(.animated-container__overflowing) .animated-container__reference-wrapper,.animated-container.vertical:not(.animated-container__overflowing) .fading-content{height:100%}",FADE_IN_CLASS=" fading-content-fade-in",FADE_OUT_CLASS=" fading-content-fade-out",InternalFadingContent=({children:e,onFadedIn:t,onFadedOut:i},n)=>
166{let r="fading-content",[o,a]=h$3(),s=T$4(e=>{"0"===getComputedStyle(e.target).opacity?null==i||i():null==t||t()},[t,i]),l=F$4(()=>({fadeIn:()=>{a(FADE_IN_CLASS)},fadeOut:()=>{a(FADE_OUT_CLASS)}}),[]);return A$3(n,()=>l,[l]),o$i("div",{class:`${r}${o??""}`,onAnimationEnd:s,children:e})},FadingContent=k$3(InternalFadingContent),AnimatedContainer=({className:e,direction:t,children:i,fixedSize:n})=>{let[r,o]=h$3(i),a=_$3(null),s=_$3(null);y$3(()=>{var e,t;i?(o(i),null==(e=s.current)||e.fadeIn()):null==(t=s.current)||t.fadeOut()},[i]);let{height:l,width:c}=useMeasure(a),u=i?n??("vertical"===t?l:c):0,d=["animated-container",t];return e&&d.push(e),n||d.push("animated-container__overflowing"),o$i(k$5,{children:[o$i("style",{children:styles$2}),o$i("div",{className:d.join(" "),style:{"--current-size":`${u}px`},children:o$i(FadingContent,{onFadedOut:()=>o(null),ref:s,children:o$i("div",{className:"animated-container__reference-wrapper",ref:a,children:r})})})]})},RallytvIcon=()=>o$i("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o$i("path",{d:"M5.70211 15.2624C4.86897 14.112 5.19219 13.2722 5.45888 12.8733C5.94151 12.1524 6.86417 11.8649 7.63063 11.8846V11.884H9.25877C9.30451 11.8834 9.34957 11.8828 9.39467 11.8822H9.41119C10.332 11.8822 11.0812 11.2011 11.0812 10.3642C11.0812 9.5272 10.332 8.84607 9.41119 8.84607H2L2.00064 16.9514C2.00127 19.2972 4.79658 20.761 7.02926 19.5852L10.2742 17.8761C8.5755 17.2965 6.52696 16.4013 5.70211 15.2624Z",fill:"url(#paint0_linear_200_43)"}),o$i("path",{d:"M18.3299 8.36582L7.02927 2.4147C4.79658 1.23891 2.00128 2.70331 2.00064 5.04856V7.04285H9.41184C11.4267 7.04285 13.0663 8.53322 13.0663 10.3647C13.0663 12.194 11.4318 13.682 9.42071 13.6866C8.61807 13.6988 8.18053 13.701 7.93605 13.6993C7.09085 13.7299 7.28519 14.2211 7.47377 14.4064C8.25993 15.2515 10.6628 16.1583 12.5551 16.676L18.3299 13.6347C20.5569 12.4618 20.5569 9.53872 18.3299 8.36582Z",fill:"url(#paint1_linear_200_43)"}),o$i("path",{d:"M7.87701 8.41777C8.1779 8.41777 8.42183 8.19602 8.42183 7.92251C8.42183 7.64899 8.1779 7.42725 7.87701 7.42725C7.57612 7.42725 7.33218 7.64899 7.33218 7.92251C7.33218 8.19602 7.57612 8.41777 7.87701 8.41777Z",fill:"#EA2A28"}),o$i("path",{d:"M7.47312 14.4058C7.28454 14.2205 7.09024 13.7293 7.93544 13.6987C8.17989 13.7004 8.61742 13.6981 9.42006 13.686C11.4312 13.6814 13.0657 12.1933 13.0657 10.3641C13.0657 8.53261 11.4261 7.04224 9.41119 7.04224H2V8.84604H9.41119C10.332 8.84604 11.0812 9.52717 11.0812 10.3641C11.0812 11.2011 10.332 11.8822 9.41119 11.8822H9.39467C9.35021 11.8828 9.30451 11.8834 9.25877 11.8839H7.63063C6.86417 11.8643 5.94212 12.1518 5.45888 12.8733C5.19219 13.2716 4.86897 14.112 5.70211 15.2624C6.52696 16.4007 8.5755 17.2959 10.2742 17.8766L12.5551 16.6754C10.6621 16.1577 8.25928 15.2508 7.47312 14.4058Z",fill:"white"}),o$i("path",{d:"M7.87701 8.41777C8.1779 8.41777 8.42183 8.19602 8.42183 7.92251C8.42183 7.64899 8.1779 7.42725 7.87701 7.42725C7.57612 7.42725 7.33218 7.64899 7.33218 7.92251C7.33218 8.19602 7.57612 8.41777 7.87701 8.41777Z",fill:"#ED2D29"}),o$i("path",{d:"M9.39467 11.8822H9.41119C10.3319 11.8822 11.0812 11.2011 11.0812 10.3642C11.0812 9.5272 10.3319 8.84607 9.41119 8.84607H2V9.17913L8.77746 9.8539C8.77746 9.8539 10.4234 9.98204 9.71536 11.185C9.38322 11.7489 8.49167 11.8644 8.0059 11.8846H9.25816C9.30451 11.884 9.34957 11.8834 9.39467 11.8822Z",fill:"url(#paint2_linear_200_43)"}),o$i("path",{d:"M5.70205 15.2624C4.86893 14.112 5.19215 13.2722 5.45885 12.8733C5.45885 12.8733 5.4595 12.8728 5.4595 12.8722C5.18644 13.2035 4.40284 14.3689 5.46711 15.7987L8.23575 18.9497L10.2659 17.8738C8.56911 17.2937 6.52568 16.3996 5.70205 15.2624Z",fill:"url(#paint3_linear_200_43)"}),o$i("path",{d:"M7.01403 7.92776C7.01403 7.76324 7.07053 7.61029 7.16642 7.48389L2 7.85733V7.98664L7.16516 8.37047C7.06992 8.24349 7.01403 8.09168 7.01403 7.92776Z",fill:"url(#paint4_linear_200_43)"}),o$i("defs",{children:[o$i("linearGradient",{id:"paint0_linear_200_43",x1:"0.808994",y1:"16.2368",x2:"19.9788",y2:"-9.66569",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.0664",stopColor:"#EE3A34"}),o$i("stop",{offset:"0.4709",stopColor:"#ED4730"}),o$i("stop",{offset:"0.9536",stopColor:"#EC5C2A"})]}),o$i("linearGradient",{id:"paint1_linear_200_43",x1:"0.894873",y1:"20.6564",x2:"16.0396",y2:"7.07168",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.0664",stopColor:"#EE3A36"}),o$i("stop",{offset:"0.4709",stopColor:"#ED4731"}),o$i("stop",{offset:"0.9536",stopColor:"#EB5C2A"})]}),o$i("linearGradient",{id:"paint2_linear_200_43",x1:"2",y1:"10.3656",x2:"11.5893",y2:"10.3656",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.206",stopColor:"#3F061B"}),o$i("stop",{offset:"1",stopColor:"#831628",stopOpacity:"0.7"})]}),o$i("linearGradient",{id:"paint3_linear_200_43",x1:"4.92493",y1:"15.9112",x2:"10.2659",y2:"15.9112",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.1161",
166stopColor:"#3F061B"}),o$i("stop",{offset:"1",stopColor:"#831628",stopOpacity:"0.7"})]}),o$i("linearGradient",{id:"paint4_linear_200_43",x1:"2",y1:"7.92744",x2:"7.16642",y2:"7.92744",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.198",stopColor:"#EF4B30",stopOpacity:"0.1"}),o$i("stop",{offset:"0.9996",stopColor:"#F48128",stopOpacity:"0.5"})]})]})]}),RbtvIcon=()=>o$i("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o$i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.4501 6.61792C5.74571 6.61792 5.17482 7.20368 5.17482 7.92805C5.17482 8.65175 5.74603 9.23876 6.4501 9.23876C6.98701 9.23876 7.40702 8.99175 7.62289 8.60562L6.99711 8.31138C6.91696 8.48679 6.73018 8.61027 6.51314 8.61027C6.22349 8.61027 5.98782 8.3911 5.98782 8.12226C5.98782 8.10426 5.98151 8.11102 5.98261 8.09374L7.68709 8.09419C7.69268 8.04146 7.69532 7.98658 7.69507 7.93047C7.70696 7.08269 7.15417 6.61792 6.4501 6.61792V6.61792ZM5.98518 7.64389C5.98518 7.37986 6.19657 7.16561 6.45616 7.16561C6.71716 7.16561 6.92801 7.37986 6.92801 7.64389H5.98518V7.64389Z",fill:"#DB0A40"}),o$i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.04035 6.38635C5.04035 5.74649 4.51951 5.22815 3.87738 5.22815C3.8578 5.22815 3.76748 5.22895 3.74859 5.22971H2.39586V9.15122H3.21696V5.90593L3.70632 5.9016C4.01003 5.9016 4.24 6.13179 4.24 6.41468C4.24 6.69834 3.99419 6.92833 3.69101 6.92833L3.50143 6.93263V7.86606L4.32112 9.15122H5.28854L4.15433 7.51263C4.6634 7.38826 5.04035 6.93146 5.04035 6.38635",fill:"#DB0A40"}),o$i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.98934 6.94691C9.78385 6.7411 9.51112 6.61556 9.2134 6.61556C8.57642 6.61556 8.06029 7.18968 8.06029 7.89735C8.06029 8.60493 8.57642 9.17913 9.2134 9.17913C9.5147 9.17913 9.78715 9.0489 9.9921 8.83888V9.15494H10.759V5H9.98934V6.94691V6.94691ZM9.43257 8.5506C9.12023 8.5506 8.86563 8.2694 8.86563 7.92081C8.86563 7.57298 9.12023 7.29101 9.43257 7.29101C9.74523 7.29101 9.99866 7.57298 9.99866 7.92081C9.99866 8.2694 9.74523 8.5506 9.43257 8.5506V8.5506Z",fill:"#DB0A40"}),o$i("rect",{x:"19.1012",y:"5.03113",width:"0.771733",height:"4.12582",fill:"#DB0A40"}),o$i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6125 8.1656C16.6125 8.40104 16.4151 8.59134 16.1717 8.59134C15.928 8.59134 15.7307 8.40104 15.7307 8.1656V6.75232H14.9648V8.3159C14.9648 8.84482 15.5037 9.27276 16.1692 9.27276C16.8335 9.27276 17.3734 8.84482 17.3734 8.3159V6.75232H16.6125V8.1656V8.1656Z",fill:"#DB0A40"}),o$i("rect",{x:"17.797",y:"5.03113",width:"0.771733",height:"4.12582",fill:"#DB0A40"}),o$i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.0197 7.01533C14.2315 6.81608 14.3602 6.54794 14.3602 6.25377C14.3602 5.98672 14.2599 5.74156 14.0827 5.54871C13.899 5.34341 13.573 5.25244 13.1328 5.25244H11.8145V9.15422H13.5178C14.1697 9.14281 14.6956 8.64025 14.6956 8.02635C14.6956 7.57962 14.5408 7.26062 14.0197 7.01533M13.3748 8.47021H12.6362V5.92591H13.151C13.3772 5.92591 13.5611 6.11251 13.5611 6.34123C13.5611 6.57139 13.3772 6.75712 13.151 6.75712H12.8829V7.46215H13.3748C13.649 7.46215 13.8559 7.68654 13.8559 7.96516C13.8458 8.25251 13.6727 8.45096 13.3748 8.47021",fill:"#DB0A40"}),o$i("path",{d:"M16.219 14.2922H16.9025V11.0864H18.2566V10.4452H14.865V11.0864H16.219V14.2922Z",fill:"#A0A1A1"}),o$i("path",{d:"M19.9975 11.3088C19.9588 10.8312 19.5268 10.4452 19.1141 10.4452C19.7267 10.8312 19.3398 11.6686 19.1141 12.0154L18.2566 13.3108V11.3939H17.6247V14.2922H18.2308V14.2922V14.2922C18.3146 14.2922 18.392 14.2464 18.4371 14.181V14.1744L19.1786 13.0557V13.0557L19.6429 12.3556V12.3556C19.9266 11.9369 20.0168 11.5901 19.9975 11.3088",fill:"#A0A1A1"}),o$i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.63986 15.6574C9.584 15.6771 9.52774 15.6969 9.4698 15.7107L9.47113 15.7114C9.18326 15.7699 9.11403 15.6234 9.07099 15.5323C9.04291 15.4729 9.02597 15.437 8.96677 15.497C8.85387 15.7256 8.77471 15.7796 8.57664 15.7982H8.43836C8.11403 15.9604 7.6885 16.1154 7.51748 16.1154C7.34647 16.1154 7.15908 15.9726 7.04986 15.7507C7.04986 15.7348 7.0188 15.7192 7.0031 15.7192C6.71585 15.7568 6.57523 15.322 6.53548 15.1483C6.57708 14.9704 6.85154 14.9735 7.03778 14.9757C7.08633 14.9762 7.12888 14.9767 7.15975 14.9739C7.18313 15.001 7.2466 14.9949 7.26931 14.9739C7.31474 14.9145 7.38955 14.9105 7.44099 14.9105C7.44623 14.905 7.45334 14.8996 7.46042 14.8943C7.47412 14.8838 7.48775 14.8735 7.48775 14.863C7.50433 14.8211 7.46994 14.7963 7.43361 14.77C7.41283 14.755 7.39141 14.7395 7.37853 14.7202C7.36845 14.7029 7.33731 14.7041 7.31712 14.7049C7.30922 14.7053 7.303 
16614.7055 7.30037 14.7046C7.13669 14.7687 6.95817 14.7568 6.77588 14.7446C6.68066 14.7382 6.58441 14.7318 6.48872 14.7361C6.37074 14.7354 6.25583 14.7556 6.14066 14.7758C6.0341 14.7945 5.92732 14.8132 5.81768 14.8155C5.75267 14.8183 5.69108 14.9624 5.63432 15.0953C5.59397 15.1898 5.55605 15.2785 5.52108 15.3067C5.46291 15.3877 5.40377 15.4163 5.33815 15.448C5.32652 15.4536 5.31469 15.4593 5.30263 15.4655C5.26898 15.4842 5.23524 15.5043 5.20139 15.5244C5.05516 15.6113 4.90699 15.6994 4.75618 15.6873C4.47294 15.6537 4.34267 15.6398 4.27253 15.6398C4.14797 15.658 4.06006 15.7396 3.97044 15.8228C3.85577 15.9293 3.7383 16.0383 3.5377 16.0204C3.52866 16.018 3.50845 16.0143 3.48485 16.01C3.44916 16.0036 3.40571 15.9957 3.38138 15.9885C3.35566 15.9865 3.3403 15.9977 3.31892 16.0204C3.31186 16.0354 3.3026 16.0495 3.29337 16.0636C3.27336 16.0941 3.25349 16.1244 3.25646 16.1629C3.17429 16.2884 3.10014 16.3831 2.86633 16.3851C2.85392 16.3729 2.83673 16.367 2.81957 16.3692C2.77279 16.3757 2.71862 16.3594 2.66779 16.3441C2.63224 16.3334 2.59832 16.3232 2.56973 16.3217C2.56168 16.3196 2.55411 16.3167 2.54681 16.314C2.52287 16.3049 2.50179 16.297 2.4762 16.3217C2.46831 16.3217 2.46439 16.3256 2.46048 16.3295C2.45662 16.3334 2.45278 16.3373 2.44514 16.3373C2.42201 16.3635 2.38367 16.3546 2.32883 16.3419C2.29576 16.3343 2.25669 16.3252 2.21133 16.3217C2.04833 16.2979 1.93677 16.1364 2.03965 16.0045C2.07636 15.9418 2.09777 15.8711 2.10211 15.7982C2.0981 15.7592 2.11046 15.6697 2.13317 15.6714C2.16578 15.5632 2.223 15.5468 2.28845 15.5281C2.32357 15.5181 2.36105 15.5073 2.39838 15.4814C2.49858 15.2521 2.72738 15.1469 2.866 15.1483C2.9445 15.149 2.98711 15.1977 3.02751 15.2438C3.05845 15.2791 3.08808 15.3129 3.13154 15.3226C3.22882 15.276 3.2525 15.1838 3.27717 15.0878C3.28841 15.044 3.29987 14.9994 3.31859 14.958C3.37444 14.7699 3.52622 14.7588 3.67868 14.7477C3.78882 14.7396 3.89931 14.7316 3.97426 14.6567C4.00532 14.6411 4.00532 14.6092 3.98996 14.5777C3.93323 14.5127 3.90791 14.3357 3.88128 14.1496C3.87138 14.0803 3.86129 14.0098 3.84934 13.9433C3.84934 13.9274 3.83364 13.9274 3.81827 13.9274C3.72972 13.9395 3.6404 13.9448 3.55106 13.9433C2.98958 13.962 2.54902 13.5508 2.58242 13.0081C2.59778 12.6115 2.69164 12.469 3.1282 12.12C3.14046 12.1013 3.1459 12.0789 3.14356 12.0565C3.14208 12.031 3.12199 12.0106 3.0968 12.0091C2.48789 11.9334 2.3466 11.1895 2.62918 10.8676C2.64894 10.8802 2.6771 10.9 2.71081 10.9238C2.83783 11.0131 3.04365 11.1579 3.17563 11.1847C3.46422 11.2312 3.92215 11.3208 3.97158 11.6444C4.11544 12.0703 3.73337 12.347 3.42333 12.5715C3.4188 12.5748 3.41428 12.5781 3.40977 12.5813C2.79385 13.2086 3.55808 13.5607 4.1112 13.0729C4.67204 12.6283 4.95897 12.5891 5.19893 12.5564C5.41672 12.5267 5.59581 12.5022 5.90586 12.1848C6.08203 11.9965 6.25163 11.9909 6.40506 11.9857C6.51954 11.9819 6.62503 11.9783 6.71752 11.8995C6.99478 11.637 7.21347 11.5628 7.51701 11.4598C7.57951 11.4386 7.64561 11.4162 7.71655 11.3906C7.84366 11.3486 7.93857 11.2846 8.0329 11.2209C8.18299 11.1196 8.3316 11.0193 8.60604 11.0104C8.97488 10.9811 9.37841 11.3424 9.71704 11.6456C9.83042 11.7471 9.93652 11.8421 10.0316 11.9137C10.8897 12.8937 10.9085 13.0145 10.9697 13.4068C11.0036 13.6238 11.0504 13.9238 11.2594 14.4983C11.2606 14.519 11.289 14.5458 11.3126 14.5681C11.3226 14.5776 11.3318 14.5863 11.3376 14.5933C11.4132 14.6624 11.4556 14.7476 11.4979 14.8327C11.5541 14.9456 11.6101 15.0582 11.7434 15.1323C11.7608 15.143 11.7764 15.1522 11.7902 15.1605C11.8878 15.2187 11.8996 15.2257 11.877 15.3057C11.8694 15.3855 11.8025 15.4094 11.7415 15.4312C11.686 15.451 11.6354 15.4691 11.6392 15.5262C11.6693 15.6642 11.52 15.7287 11.3914 15.7202C11.0689 15.7238 10.8799 15.5954 10.7328 15.4955C10.6974 15.4714 10.6644 15.449 10.6325 15.4305C10.409 15.5774 10.2704 15.6354 9.97783 15.5896C9.86009 15.5799 9.75078 15.6184 9.63986 15.6574ZM9.12353 14.7283C9.13909 14.7159 9.15414 14.7039 9.16919 14.6886H9.16885C9.18451 14.6094 9.21578 14.5778 9.27824 14.5148L9.27874 14.5142C9.21564 14.5232 9.12162 14.5429 9.03537 14.561C8.97187 14.5743 8.91257 14.5867 8.87291 14.5933C8.87485 14.6013 8.87678 14.6105 8.87891 14.6206C8.8937 14.6911 8.91771 14.8055 9.0132 14.847C9.05556 14.7826 9.09071 14.7545 9.12353 14.7283Z",fill:"white"}),o$i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.6087 15.2016C11.466 15.1236 11.385 14.9829 11.306 14.8457L11.306 14.8456L11.306 14.8456L11.306 14.8456L11.306 14.8456L11.306 14.8455C11.2727 14.7878 11.2398 14.7306 11.2028 14.679C10.9194 14.3815 10.8401 13.9007 10.7682 13.465L10.7682 13.4648L10.7682 13.4647C10.7572 13.3982 10.7464 13.3327 10.7351 13.2691C10.6701 12.9175 10.431 12.6349 10.2005 12.3625C10.1253 12.2737 10.0511 12.1859 9.9841 12.0972C9.93003 12.0524 9.85647 11.9873 9.77152 11.9121L9.7715 11.9121L9.77147 11.912L9.77146 11.912C9.47696 11.6514 9.04561 11.2695 8.81487 11.1943C8.51213 11.0665 8.2392 11.2235 7.9803 11.3725C7.9035 11.4167 7.82794 11.4601 7.7532 11.4953C7.67151 11.5294 7.58834 11.556 7.5055 11.5825C7.31934 11.6421 7.13488 11.7011 6.97282 11.8437C6.77717 12.0984 6.62309 12.109 6.45739 12.1204C6.31187 12.1304 6.15739 12.141 5.95792 12.3181C5.65096 12.6446 5.4362 12.6743 5.19751 12.7072C4.94265 12.7424 4.66052 12.7813 4.20975 13.1895L4.17756 13.2091C3.95564 13.3446 3.7441 13.4738 3.4748 13.4586C3.02615 13.4372 2.87348 12.8255 3.22492 12.5557C3.28392 12.4887 3.36362 12.4213 3.44644 12.3513C3.7073 12.1306 3.99907 11.8838 3.77212 11.5427C3.61998 11.4051 3.4547 11.3636 3.28224 11.3203C3.10254 11.2751 2.91504 11.228 2.72649 11.0682C2.55612 11.3394 2.77393 11.7071 3.05421 11.7969C3.09994 11.8258 3.16979 11.8248 3.24078 11.8239C3.34819 11.8225 3.45819 11.821 3.49117 11.9226C3.42799 12.051 3.30634 12.148 3.18361 12.2458C3.07663 12.331 2.96883 12.4169 2.8982 12.5249C2.52037 12.9675 2.89353 13.6931 3.4287 13.727C3.53094 13.7606 3.64774 13.733 3.75434 13.7078C3.85395 13.6843 3.94466 13.6629 4.0063 13.6955C4.01254 13.7584 4.01382 13.8188 4.01507 13.8778C4.01696 13.9672 4.01878 14.0531 4.03771 14.1391C4.04303 14.1969 4.07048 14.2564 4.098 14.3159C4.14467 14.417 4.19155 14.5185 4.13124 14.6136C3.97593 14.7493 3.77461 14.8182 3.57001 14.8057C3.49692 14.891 3.46547 14.9843 3.43267 15.0816C3.41764 15.1262 3.40233 15.1716 3.3826 15.2175C3.3181 15.3355 3.19991 15.3992 3.09896 15.4536L3.09895 15.4536L3.09893 15.4536L3.09891 15.4537L3.09887 15.4537C3.07803 15.4649 3.05792 15.4758 3.03918 15.4866L3.02813 15.5037C2.95948 15.6104 2.88741 15.7224 2.74253 15.7401C2.66342 15.8338 2.63998 15.9503 2.61584 16.0704L2.61584 16.0704C2.61144 16.0923 2.60701 16.1143 2.60222 16.1363C2.99274 16.241 3.07626 16.1878 3.28906 15.8509C3.34981 15.7896 3.42932 
16615.8142 3.49827 15.8355L3.49827 15.8355C3.51805 15.8416 3.53696 15.8474 3.55431 15.8509C3.7688 15.825 3.9305 15.6835 4.08502 15.5482L4.10084 15.5344C4.33087 15.4733 4.46686 15.4989 4.59075 15.5222C4.77273 15.5565 4.92862 15.5858 5.31818 15.3283C5.41361 15.287 5.46141 15.1855 5.50305 15.0971L5.50307 15.0971C5.50923 15.084 5.51527 15.0712 5.5213 15.0589C5.5288 15.0444 5.53812 15.028 5.54812 15.0104L5.54812 15.0104C5.61113 14.8997 5.70133 14.7411 5.537 14.6949C5.27399 15.2351 4.90638 15.2495 4.52094 15.2645C4.18819 15.2775 3.84213 15.291 3.53861 15.6439C3.43839 15.672 3.51623 15.5137 3.53861 15.4852C3.75643 15.1633 4.10289 15.1219 4.44831 15.0806C4.84828 15.0328 5.24687 14.9852 5.44279 14.5024C5.46586 14.4527 5.47593 14.3495 5.48678 14.2382C5.50611 14.04 5.52796 13.816 5.6302 13.8212C5.6459 13.8212 5.69267 13.8371 5.69267 13.8686C5.54101 14.5404 5.64123 14.7488 6.34811 14.6312C6.43233 14.6064 6.5713 14.6206 6.71608 14.6354C6.98711 14.6631 7.2785 14.6929 7.26914 14.4729C7.26914 14.4496 7.26071 14.4307 7.25314 14.4136C7.2401 14.3842 7.22961 14.3606 7.26914 14.3306C7.2845 14.3146 7.33161 14.3306 7.34697 14.3462C7.39107 14.6173 7.62559 14.8162 7.84808 14.9325C8.29673 15.2422 8.11533 15.6466 7.59819 15.6293C7.48828 15.5685 7.42956 15.4752 7.36877 15.3785C7.33458 15.3241 7.29974 15.2687 7.25477 15.2175C7.12304 15.1004 6.94779 15.1394 6.79013 15.1746L6.79006 15.1746C6.77302 15.1784 6.75619 15.1821 6.73964 15.1856C6.68479 15.2698 6.75063 15.3644 6.81427 15.4559C6.84829 15.5048 6.88168 15.5528 6.89565 15.5978C6.9286 15.6178 6.96708 15.6152 7.00524 15.6127C7.05761 15.6093 7.1094 15.6059 7.14553 15.6608C7.16309 15.6875 7.17816 15.7142 7.19284 15.7402L7.19285 15.7402L7.19285 15.7402L7.19285 15.7402L7.19286 15.7402L7.19286 15.7402C7.23043 15.8067 7.26546 15.8687 7.33294 15.9143C7.50965 16.0863 7.81174 15.9486 8.08047 15.8262C8.22324 15.7612 8.3566 15.7004 8.45675 15.6927C8.70897 15.7204 8.82422 15.4873 8.90941 15.2965C8.99637 15.1354 8.88886 14.9754 8.78545 14.8215C8.71963 14.7235 8.65546 14.628 8.64416 14.5363C8.62749 14.5316 8.60978 14.5253 8.59158 14.5188L8.59158 14.5188L8.59157 14.5188C8.51562 14.4918 8.43112 14.4617 8.37857 14.5363C8.39255 14.5708 8.42539 14.6322 8.46437 14.705L8.46438 14.705C8.55859 14.8811 8.68869 15.1243 8.67523 15.2175L8.67369 15.2217C8.63786 15.319 8.55893 15.5335 8.44138 15.5185C8.44719 15.4979 8.45353 15.4769 8.46 15.4554C8.48849 15.3608 8.51955 15.2577 8.51955 15.1541C8.49885 15.1047 8.45235 15.0213 8.40065 14.9285L8.40065 14.9285L8.40064 14.9285C8.31052 14.7668 8.20457 14.5767 8.19183 14.4888C8.21715 14.4207 8.2959 14.4074 8.38028 14.393C8.46176 14.3792 8.54848 14.3645 8.59739 14.2987C8.70696 14.1245 8.73803 13.9503 8.76943 13.7287C8.77614 13.7058 8.7937 13.6879 8.8162 13.6809C8.9682 13.7802 8.81353 14.257 8.72233 14.3621C8.71364 14.5261 9.03234 14.4163 9.09715 14.3621C9.14864 14.3729 9.22271 14.3569 9.29507 14.3413C9.3922 14.3203 9.48625 14.2999 9.51841 14.3462C9.44531 14.4397 9.39218 14.5476 9.3624 14.663C9.33568 14.6947 9.30385 14.7238 9.27203 14.7529C9.19245 14.8256 9.11285 14.8984 9.11285 15.0114C9.12098 15.059 9.15525 15.0473 9.18964 15.0355C9.22735 15.0227 9.26519 15.0098 9.26886 15.0748C9.13895 15.2422 9.14872 15.2884 9.1854 15.4615L9.19069 15.4866C9.30489 15.6494 9.50239 15.5745 9.66798 15.5118C9.70923 15.4962 9.74849 15.4813 9.78399 15.471C9.89701 15.426 10.0154 15.4247 10.1315 15.4235C10.3245 15.4213 10.5115 15.4193 10.6582 15.2175C10.7219 15.223 10.7795 15.2581 10.8143 15.3124C10.9882 15.4978 11.2336 15.5963 11.4854 15.5818C11.5609 15.5285 11.4586 15.4837 11.386 15.4519C11.3604 15.4406 11.3385 15.431 11.3294 15.4232C11.2201 15.3598 11.0795 15.265 11.0484 15.1382C11.021 15.02 10.9556 14.9084 10.8906 14.7974L10.8906 14.7974C10.8583 14.7422 10.826 14.6872 10.7986 14.6315C10.9573 14.6339 11.0542 14.7817 11.157 14.9386C11.2902 15.1419 11.4334 15.3603 11.7339 15.2968C11.76 15.2785 11.7573 15.2589 11.7496 15.2334L11.6087 15.2016ZM8.98625 12.8099C8.97055 12.8258 8.95485 12.8258 8.92378 12.8258C8.91246 12.7825 8.90313 12.7386 8.89386 12.695C8.86894 12.5778 8.8445 12.4629 8.78314 12.3663C8.73937 12.3229 8.68292 12.2663 8.72066 12.1921C8.7441 12.1645 8.78355 12.1578 8.81454 12.1761C8.95752 12.2846 8.98157 12.4357 8.98625 12.6198C9.01732 12.6513 9.00162 12.7465 8.98625 12.8099ZM10.0476 15.0748C10.1214 15.0732 10.1947 15.0626 10.2661 15.0433C10.3242 14.9983 10.3389 14.8454 10.2818 14.8213H10.235C10.1324 14.8159 9.93967 14.9884 10.0322 15.0748H10.0476ZM10.6583 14.1527L10.6582 14.1527C10.6417 14.1887 10.62 14.2359 10.5941 14.2354L10.5815 14.2353C10.5567 14.2355 10.5459 14.2355 10.5473 14.2038C10.5443 14.0974 10.5273 13.9666 10.4378 13.9029C10.3023 13.6892 
16610.2342 13.7954 10.1824 13.8762C10.1563 13.9169 10.1344 13.9511 10.11 13.9344C10.0733 13.8587 10.1167 13.7744 10.1536 13.7029C10.1603 13.6899 10.1668 13.6773 10.1725 13.6653C10.1792 13.6571 10.1843 13.6484 10.1894 13.6398C10.1976 13.626 10.2055 13.6126 10.2193 13.6019C10.2527 13.4071 10.4281 13.5182 10.4692 13.6335L10.48 13.6471C10.585 13.7793 10.7025 13.9271 10.6876 14.0771C10.6719 14.0612 10.6719 14.093 10.6719 14.1245C10.6679 14.1317 10.6633 14.1416 10.6583 14.1526L10.6583 14.1526L10.6583 14.1527ZM2.97605 15.3124C2.92928 15.4077 2.86681 15.5185 2.75757 15.5819H2.7579C2.64465 15.6191 2.5471 15.4836 2.58619 15.3758C2.66767 15.3286 2.7458 15.2757 2.82004 15.2175C2.89937 15.1899 2.9401 15.255 2.97295 15.3075L2.97605 15.3124ZM2.41447 15.5818L2.41435 15.5819L2.41414 15.5818H2.41447ZM2.41435 15.5819C2.47671 15.5979 2.52341 15.6608 2.55478 15.7086C2.52772 15.837 2.4873 15.9946 2.44554 16.1363C2.39408 16.1275 2.35203 16.1139 2.31164 16.1009C2.27862 16.0902 2.24671 16.0799 2.2117 16.0729C2.18975 16.0618 2.19848 16.0428 2.20572 16.0271C2.20885 16.0204 2.2117 16.0142 2.2117 16.0095C2.26131 15.9585 2.27153 15.8866 2.2817 15.8151C2.29522 15.7201 2.30864 15.6258 2.41435 15.5819ZM7.52973 15.3485C7.51456 15.3085 7.49919 15.2679 7.47191 15.2334C7.46379 15.2007 7.43486 15.1848 7.40881 15.1706C7.38449 15.1573 7.36267 15.1453 7.36267 15.1223C7.4226 15.1016 7.48786 15.1022 7.55381 15.1027C7.61027 15.1031 7.66724 15.1036 7.72179 15.0908C7.79234 15.0908 7.80423 15.1436 7.81649 15.1981C7.82322 15.228 7.83005 15.2584 7.84673 15.2809C7.85168 15.2962 7.86151 15.3114 7.87101 15.3262C7.891 15.3573 7.90952 15.386 7.8778 15.4076C7.80467 15.4714 7.70805 15.5001 7.61255 15.4866C7.56852 15.4509 7.54929 15.4001 7.52973 15.3485Z",fill:"#DB0A40"}),o$i("path",{d:"M15.1164 14.1554C15.1087 13.8935 15.0044 13.6093 14.8299 13.4227V13.4227L14.8218 13.4132C14.7326 13.7706 14.6045 14.0859 14.2367 14.654C14.0952 14.8715 13.8441 14.881 13.6886 15.0805C13.6518 15.0602 13.6625 15.0324 13.615 15.0839C13.811 14.8705 13.5869 14.9803 13.6786 14.8776C14.0203 14.4948 14.3333 14.15 14.4657 13.6334C14.4099 13.7042 14.3761 13.7262 14.3199 13.798C14.3835 13.5781 14.4329 13.3915 14.4801 13.1659L14.4199 13.1415C14.2102 13.8593 13.8641 14.4874 13.2308 14.9183C12.4082 15.524 13.1027 15.3214 13.2412 15.1961C12.2046 16.2682 9.91 16.9576 8.59117 15.8668C8.78378 16.0568 9.02019 16.2693 9.2449 16.4088C9.10814 16.3851 9.01083 16.2777 8.88176 16.2367C8.88376 16.2411 9.19541 16.652 10.1257 16.7598C10.1855 16.7665 10.2427 16.7726 10.2979 16.7777C11.5662 16.8794 11.6435 16.6493 12.5286 16.4596C12.5684 16.4769 12.2434 16.647 11.7963 16.775C11.0904 17.0365 10.2708 16.8428 9.67258 16.7798H9.67526V16.7798C9.68897 16.7865 9.78193 16.8299 10.2578 17.0023C10.2243 17.0145 10.0688 17.0362 9.42012 16.7544C11.0118 17.6843 12.7249 16.9803 14.1313 15.9237C14.1313 15.9285 14.1293 15.9352 14.1293 15.941C14.1417 15.943 14.1574 15.9451 14.1701 15.9461C14.1624 15.9688 14.1624 15.9688 14.0534 16.1005C14.2908 15.9064 14.4125 15.6053 14.664 15.423C14.5353 15.6849 14.3707 15.8726 14.0644 16.1761C14.0878 16.158 14.1101 16.1387 14.1313 16.1182C13.6682 16.5565 13.0573 16.9915 12.1093 17.2198C12.1779 17.2117 12.2458 17.1981 12.3123 17.1792C12.1922 17.213 12.1889 17.2171 12.138 17.234C12.1695 17.23 12.1695 17.23 12.333 17.1964C12.2377 17.2439 12.1277 17.2666 11.8615 17.3214C13.4395 17.068 15.0807 15.8241 15.1164 14.1554Z",fill:"url(#paint0_linear_201_273)"}),o$i("path",{d:"M13.5176 16.3448C12.8916 16.7466 12.199 17.097 11.4254 17.1865C12.356 17.2203 13.4603 16.5406 14.0619 15.9839C13.8818 16.1054 13.7017 16.2277 13.5176 16.3448Z",fill:"url(#paint1_linear_201_273)"}),o$i("path",{d:"M12.5129 16.452C11.6223 16.6443 11.5718 16.8739 10.2974 16.7761C10.1972 16.8073 9.66743 16.7744 9.57986 16.7452C9.58421 16.7452 9.62532 16.7634 9.66074 16.7778H9.65841C9.79209 16.7606 10.6734 16.9535 10.9548 16.9151C11.3201 16.9405 12.4665 16.5907 12.5129 16.452Z",fill:"url(#paint2_linear_201_273)"}),o$i("path",{d:"M14.5003 13.1887L14.4688 13.1749C14.4211 13.3978 14.3718 13.5844 14.308 13.8029C14.3644 13.7315 14.3983 13.7096 14.4543 13.6392C14.3201 14.1527 14.0073 14.4955 13.6642 14.8759C13.5723 14.9769 13.7985 14.8689 13.6005 15.081C13.6481 15.0298 13.6374 15.0574 13.6743 15.0776C13.83 14.8793 14.0824 14.8699 14.2244 14.6537C14.5936 14.0887 14.7222 13.7756 14.8114 13.4204C14.8144 13.4234 14.8172 13.4265 14.8198 13.4298V13.4298C14.7299 13.3294 14.6214 13.2475 14.5003 13.1887V13.1887Z",fill:"url(#paint3_linear_201_273)"}),o$i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.1965 15.8634C9.99265 15.7954 9.95937 15.7843 10.3288 15.9968C10.6848 16.1748 9.70787 15.9087 9.48099 15.7018C9.53937 15.688 9.59604 15.6681 9.65232 15.6483C9.74881 15.6143 9.84416 15.5808 9.9451 15.5793C10.2667 15.6157 10.3869 15.5936 10.6424 15.4207C10.6743 15.4393 10.7073 
16615.4618 10.7428 15.486C10.8895 15.5862 11.078 15.7149 11.4005 15.7113C11.5289 15.7208 11.6777 15.6552 11.6481 15.5167C11.6438 15.46 11.6939 15.442 11.7493 15.4221C11.8102 15.4002 11.8776 15.3761 11.8856 15.2955C12.3701 15.1856 12.7765 14.9422 13.01 14.5611C12.9684 14.5905 12.9236 14.6149 12.8766 14.6339C12.8706 14.637 12.4925 14.7398 13.0964 14.3389C13.5239 14.0803 13.6364 13.7693 13.7852 13.3581C13.8248 13.2487 13.8669 13.1322 13.9182 13.0077C14.0911 13.0301 14.2608 13.0723 14.4244 13.1336C14.2158 13.8543 13.8698 14.4846 13.2386 14.9174C12.4235 15.5194 13.1098 15.3258 13.2486 15.1964C12.959 15.5248 12.4378 15.8709 11.8279 16.1091C11.4424 16.1352 11.0553 16.1008 10.6801 16.007C10.4916 15.9618 10.3151 15.903 10.1965 15.8634ZM13.596 14.0885C13.5246 14.1687 13.4545 14.2476 13.4101 14.3464C13.4693 14.375 13.4357 14.4249 13.4004 14.4774C13.3754 14.5144 13.3496 14.5527 13.355 14.5857C13.3976 14.5644 13.4479 14.5667 13.4885 14.5918C13.7968 14.3046 14.0787 13.9575 14.1121 13.5338C14.098 13.5465 14.0882 13.575 14.0766 13.6084C14.0529 13.6771 14.022 13.7667 13.9322 13.7822C13.8989 13.7822 13.8145 13.7656 13.8258 13.7254C13.782 13.8793 13.688 13.985 13.596 14.0885Z",fill:"url(#paint4_linear_201_273)"}),o$i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.196 11.5665C13.4529 11.6405 13.7083 11.7141 13.9451 11.8513C14.7407 12.2911 15.2922 13.3383 15.1638 14.0782C15.1651 14.2705 15.1191 14.4352 15.0667 14.6227C15.064 14.6325 15.0612 14.6424 15.0584 14.6524L15.0621 14.6497C15.0624 14.6521 15.0411 14.7091 15.0394 14.7132C15.2355 13.8561 14.9604 13.4127 14.4686 13.1577C13.6179 12.795 12.8003 13.0354 12.058 13.2537C11.7579 13.342 11.4701 13.4266 11.1973 13.4663C11.1976 13.4637 11.1976 13.4611 11.1973 13.4585C11.1512 13.373 11.4295 13.2859 11.6206 13.226C11.6975 13.2019 11.7603 13.1822 11.7822 13.1689C11.8056 13.1443 11.8377 13.137 11.8703 13.1296C11.8998 13.1229 11.9298 13.1161 11.9539 13.0962C11.9994 13.0499 12.0667 13.0368 12.1289 13.0248C12.1346 13.0237 12.1403 13.0226 12.1459 13.0215C12.3223 12.9301 12.5164 12.9003 12.7128 12.8962C12.7491 12.9017 12.7841 12.8934 12.8192 12.8851C12.8508 12.8777 12.8825 12.8702 12.9151 12.8728C12.9472 12.8575 12.9827 12.8516 13.0178 12.8558C13.2276 12.8402 13.4426 12.8201 13.6237 12.6904C13.6247 12.6898 13.6259 12.6891 13.6272 12.6883C13.6492 12.6753 13.704 12.6428 13.6524 12.6357C13.5165 12.5985 13.4086 12.6133 13.3083 12.6271C13.1554 12.6481 13.0204 12.6666 12.8315 12.4941C12.8365 12.4819 12.7328 12.4374 12.7181 12.4374C12.6567 12.4497 12.5969 12.4678 12.537 12.4858C12.435 12.5165 12.3331 12.5472 12.2246 12.5491C12.18 12.5592 12.1507 12.5505 12.1192 12.5412C12.0955 12.5342 12.0704 12.5267 12.0366 12.5267C11.9962 12.5364 11.9499 12.5524 11.902 12.5689C11.8252 12.5955 11.7445 12.6234 11.6781 12.6286C11.6608 12.6253 11.6197 12.6389 11.5733 12.6543C11.4865 12.6831 11.3811 12.718 11.378 12.6598C11.3763 12.6604 11.3744 12.6604 11.3727 12.6598C11.3464 12.559 12.9111 11.9661 12.267 12.3651C12.2853 12.3813 12.3504 12.365 12.4362 12.3435C12.5156 12.3236 12.6127 12.2993 12.7071 12.2921C12.7865 12.2751 12.8754 12.2855 12.9611 12.2956C13.113 12.3134 13.255 12.3301 13.3166 12.1902C13.3129 12.1542 13.2282 12.1648 13.2076 12.1794C13.1823 12.1932 13.156 12.1933 13.1294 12.1933C13.1117 12.1933 13.0939 12.1933 13.0762 12.1974C13.0361 12.2022 12.9329 12.1887 12.8368 12.1762C12.7565 12.1658 12.681 12.156 12.6514 12.158C12.6122 12.124 12.7983 12.121 12.9035 12.1194C12.937 12.1188 12.9623 12.1184 12.9695 12.1172C13.0809 12.1002 13.2159 12.0751 13.3276 12.0537C13.3772 12.0476 13.4272 12.0466 13.477 12.0507C13.578 12.0748 13.8494 12.0374 13.56 11.9658C13.484 11.9512 13.2432 11.943 13.2049 11.9556C13.1913 11.9574 13.1674 11.9628 13.1369 11.9697C13.0349 11.9929 12.8595 12.0328 12.7548 12.0082C12.6897 11.9882 12.8019 11.9727 12.9121 11.95
16676C13.0091 11.9442 13.1046 11.9311 13.0765 11.9152C12.4503 11.8347 11.7361 11.8547 10.4981 12.4697C10.4445 12.4055 10.3903 12.3343 10.3351 12.2617C10.2059 12.0919 10.071 11.9146 9.92495 11.8021C10.4923 11.5721 11.2729 11.5196 11.8982 11.4775C12.1094 11.4632 12.3028 11.4502 12.4644 11.432C11.6638 11.2364 10.5341 11.4218 9.79191 11.6877L9.7409 11.6439C10.1047 11.4778 10.7035 11.2564 11.0649 11.1827C10.9696 11.1678 9.88761 11.3213 9.62086 11.5413C9.54251 11.4734 9.45848 11.4031 9.38213 11.3433C10.7845 10.5525 13.7321 10.3379 14.7023 12.2663C14.6636 12.2913 14.6296 12.2517 14.5991 12.2161C14.5858 12.2005 14.5731 12.1857 14.561 12.1773C14.5558 12.1759 14.5477 12.1693 14.5403 12.1633C14.5353 12.1592 14.5306 12.1554 14.5276 12.1539C14.0904 11.7032 13.4018 11.5551 12.7994 11.4255C12.7645 11.418 12.73 11.4105 12.6958 11.4031C12.86 11.4696 13.0283 11.5181 13.196 11.5665ZM12.8873 11.1414C12.8647 11.1364 12.8435 11.1317 12.8241 11.1273C12.7994 11.1416 12.9638 11.2013 13.0162 11.2176C13.0118 11.2146 13.1472 11.3348 13.4203 11.3378C13.3279 11.2386 13.0663 11.1809 12.8873 11.1414Z",fill:"#FAD50A"}),o$i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1632 10.4298C14.6803 10.8367 15.1061 11.9442 15.2732 13.2058V13.2062C15.3053 13.6933 15.2406 14.182 15.083 14.6435L15.0794 14.6462C15.4336 13.6631 14.9868 12.4562 13.963 11.8607C13.7264 11.7246 13.4721 11.6519 13.2156 11.5786C13.0467 11.5303 12.8769 11.4817 12.7106 11.4146L12.7986 11.4333C13.4068 11.5625 14.1045 11.7106 14.5469 12.1619C14.5508 12.1636 14.5568 12.1683 14.5627 12.1731C14.5695 12.1785 14.5763 12.1839 14.5803 12.1852C14.5932 12.1938 14.6063 12.209 14.62 12.2248C14.6503 12.2601 14.6833 12.2984 14.7221 12.2737C13.7454 10.3541 10.8092 10.569 9.38632 11.3538C9.19547 11.2044 8.98992 11.0476 8.75595 11.0016C10.0097 9.78867 12.0488 9.32938 13.7454 10.3916C13.0342 9.94549 11.8971 9.91778 11.2052 10.1446C12.3918 9.94008 13.5656 10.1777 14.2942 10.8607C14.2792 10.8506 14.2649 10.84 14.2498 10.8286L14.2498 10.8286C14.1415 10.7477 13.9861 10.6317 13.1632 10.4298ZM9.62998 11.5549L9.74429 11.6513C10.008 11.5387 10.3195 11.4218 10.6023 11.3282C10.7566 11.2732 10.9145 11.2291 11.0749 11.1963C10.9669 11.1852 9.90238 11.3292 9.62998 11.5549ZM11.8236 11.3609C11.1745 11.3609 10.3529 11.4846 9.79977 11.6988L9.92945 11.8097C10.5902 11.5549 11.7009 11.4903 12.2444 11.4694C12.833 11.4511 12.0388 11.3629 11.8236 11.3609ZM13.4363 11.3497C13.1672 11.3484 13.0205 11.2244 13.0312 11.2301H13.0315C12.979 11.2139 12.8142 11.1544 12.8383 11.1402C12.8604 11.1453 12.8848 11.1507 12.9107 11.1564C13.0902 11.1961 13.3443 11.2523 13.4363 11.3497Z",fill:"#F2940A"}),o$i("defs",{children:[o$i("linearGradient",{id:"paint0_linear_201_273",x1:"9.30609",y1:"17.161",x2:"15.3268",y2:"17.161",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{stopColor:"#1885C8"}),o$i("stop",{offset:"0.14",stopColor:"#1881C3"}),o$i("stop",{offset:"0.32",stopColor:"#1A74B3"}),o$i("stop",{offset:"0.52",stopColor:"#1B6099"}),o$i("stop",{offset:"0.73",stopColor:"#1E4475"}),o$i("stop",{offset:"0.96",stopColor:"#212047"}),o$i("stop",{offset:"1",stopColor:"#22183D"}),o$i("stop",{offset:"1",stopColor:"#22183D"})]}),o$i("linearGradient",{id:"paint1_linear_201_273",x1:"11.9605",y1:"17.4248",x2:"13.9434",y2:"15.9571",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.24",stopColor:"#52BCE8"}),o$i("stop",{offset:"1",stopColor:"#3F88B9"})]}),o$i("linearGradient",{id:"paint2_linear_201_273",x1:"9.57986",y1:"16.9199",x2:"12.5129",y2:"16.9199",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{offset:"0.54",stopColor:"#52BCE8"}),o$i("stop",{offset:"1",stopColor:"#49A4D3"})]}),o$i("linearGradient",{id:"paint3_linear_201_273",x1:"13.8932",y1:"14.8117",x2:"14.7137",y2:"14.7382",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{stopColor:"#3A78AC"}),o$i("stop",{offset:"0.29",stopColor:"#34689E"}),o$i("stop",{offset:"0.86",stopColor:"#253E78"}),o$i("stop",{offset:"1",stopColor:"#21336E"})]}),o$i("linearGradient",{id:"paint4_linear_201_273",x1:"10.3332",y1:"16.985",x2:"14.8108",y2:"14.4547",gradientUnits:"userSpaceOnUse",children:[o$i("stop",{stopColor:"#52BCE8"}),o$i("stop",{offset:"0.25",stopColor:"#51B9E6"}),o$i("stop",{offset:"0.41",stopColor:"#4EB0DE"}),o$i("stop",{offset:"0.56",stopColor:"#48A1D0"}),o$i("stop",{offset:"0.69",stopColor:"#418CBD"}),o$i("stop",{offset:"0.78",stopColor:"#3977AB"}),o$i("stop",{offset:"0.85",stopColor:"#33669C"}),o$i("stop",{offset:"0.98",stopColor:"#243B75"}),o$i("stop",{offset:"1",stopColor:"#21336E"})]})]})]}),StvIcon=()=>o$i("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o$i("path",{d:"M18.0563 2.34265H3.9437C3.05963 2.34265 2.34259 3.05969 2.34259 3.94376V18.0543C2.34259 18.9384 3.05963 19.6554 3.9437 19.6554H18.0543C18.9383 19.6554 19.6554 18.9384 19.6554 18.0543V3.94376C19.6574 3.05969 18.9404 2.34265 18.0563 2.34265Z",fill:"#BD1212"}),o$i("path",{d:"M7.52481 10.287C5.63037 10.287 4.09241 11.8229 4.09241 13.7194C4.09241 15.6138 5.62833 17.1518 7.52481 17.1518C9.4213 17.1518 10.9572 15.6159 10.9572 13.7194C10.9572 11.8229 9.4213 10.287 7.52481 10.287ZM9.20333 13.8151L6.70185 15.4774C6.60611 15.5425 6.47574 15.4733 6.47574 15.3572V12.0653C6.47574 11.9492 6.60407 11.8799 6.69981 11.9431L9.19926 13.5727C9.28889 13.6298 9.28889 13.7581 9.20333 13.8151Z",fill:"white"}),o$i("path",{d:"M15.5854 10.3175C14.4324 10.3175 13.7602 10.9938 13.585 11.1975C13.5687 11.2158 13.5382 11.2057 13.5382 11.1812L13.4709 10.5131C13.4709 10.4947 13.4567 10.4805 13.4383 10.4805H11.6356C11.6172 10.4805 11.603 10.4947 11.603 10.5131V17.0214C11.603 17.0397 11.6172 17.054 11.6356 17.054H13.5748C13.5932 17.054 13.6074 17.0397 13.6074 17.0214V12.9127C13.6074 12.8312 13.6319 12.7518 13.6787 12.6845C13.9843 12.2466 14.3448 11.9471 14.8785 11.9471C15.2533 11.9471 15.5609 12.2018 15.5609 12.8434V17.0173C15.5609 17.0357 15.5752 17.0499 15.5935 17.0499H17.5328C17.5511 17.0499 17.5654 17.0357 17.5654 17.0173V12.4951C17.5654 11.0529 16.7628 10.3175 15.5854 10.3175Z",fill:"white"}),o$i("path",{d:"M5.90537 7.4841C5.94407 7.59002 6.00722 7.67762 6.0663 7.77132C6.16611 7.93225 6.31481 8.02799 6.48389 8.09725C6.62241 8.15428 6.765 8.19502 6.90963 8.22965C7.08074 8.27039 7.25389 8.29077 7.43111 8.28465C7.63481 8.27651 7.83444 8.25206 8.03204 8.20114C8.22352 8.15021 8.41296 8.09521 8.59426 8.01169C8.79185 7.92002 8.96296 7.79169 9.10759 7.63077C9.19518 7.53299 9.26444 7.42299 9.3113 7.29873C9.35611 7.17651 9.35611 7.05021 9.34796 6.92391C9.33778 6.78336 9.30315 6.64891 9.22981 6.52465C9.15037 6.39428 9.03833 6.29039 8.94463 6.17021C8.89167 6.10095 8.81018 6.06836 8.74296 6.01743C8.65537 5.95225 8.56574 5.88706 8.48222 5.81577C8.40685 5.75058 8.31518 5.70373 8.24796 5.62836C8.17667 5.54688 8.09722 5.47354 8.07074 5.36354C8.05444 5.29632 8.04426 5.2291 8.02796 5.16188C8.02185 5.13336 8.01167 5.09058 8.03407 5.07021C8.10741 5.00095 8.13185 4.89706 8.2113 4.82577C8.29685 4.74836 8.40074 4.70965 8.49648 4.65262C8.56778 4.60984 8.6513 4.58539 8.7287 4.55484C8.79593 4.53039 8.86315 4.50188 8.93444 4.49373C9.05259 4.48151 9.1687 4.47539 9.28685 4.49169C9.31537 4.49577 9.34185 4.50391 9.36426 4.51817C9.405 4.54465 9.40907 4.59151 9.40907 4.63632C9.40907 4.67299 9.38259 4.67706 9.35611 4.68928C9.32555 4.70354 9.29704 4.72595 9.27056 4.74632C9.14018 4.83799 8.99759 4.90317 8.84278 4.94391C8.73889 4.97243 8.63704 4.98873 8.52907 4.98465C8.49444 4.98262 8.48833 5.01928 8.47815 5.04169C8.46593 5.06614 8.49648 5.06614 8.5087 5.07836C8.53926 5.1028 8.59222 5.10688 8.58815 5.16391C8.58611 5.17614 8.60037 5.17614 8.60852 5.17614C8.71241 5.18428 8.82037 5.19854 8.92018 5.17002C9.06074 5.12928 9.2013 5.08447 9.33574 5.01928C9.52111 4.92965 9.67593 4.80539 9.74111 4.60577C9.76759 4.52836 9.77981 4.43262 9.71667 4.36132C9.66778 4.30836 9.60055 4.27577 9.52926 4.25336C9.49463 4.24317 9.37241 4.21262 9.25018 4.21058C9.13407 4.20854 9.02 4.23095 8.99963 4.23299C8.85296 4.24521 8.71037 4.27373 8.57185 4.32262C8.46185 4.36132 8.35593 4.41225 8.25204 4.46725C8.08093 4.55688 7.93426 4.67299 7.82833 4.83595C7.72037 5.00502 7.67759 5.18836 7.71222 5.38188C7.75093 5.59577 7.87315 5.76077 8.04426 5.89725C8.23167 6.04595 8.43944 6.17021 8.62889 6.31891C8.79796 6.44928 8.94056 6.6041 9.04444 6.79151C9.13611 6.95651 9.13815 7.11132 9.02204 7.26614C8.93852 7.38021 8.8387 7.47595 8.7287 7.56354C8.56574 7.69595 8.3763 7.77539 8.17463 7.82428C8.00963 7.86299 7.83852 7.87521 7.66944 7.84873C7.54722 7.82836 7.43518 7.78558 7.33537 7.70817C7.21722 7.61854 7.14796 7.49836 7.10926 7.3578C7.0787 7.25391 7.07463 7.14188 7.09704 7.04206C7.12352 6.93002 7.16833 6.81391 7.24778 6.72225C7.30074 6.6591 7.32722 6.57762 7.38018 6.51651C7.41074 6.48
166188 7.43722 6.44928 7.46167 6.40854C7.51667 6.31891 7.50241 6.23336 7.48 6.14169C7.45352 6.14984 7.42704 6.15799 7.40463 6.16817C7.17444 6.26595 7.0013 6.42891 6.88722 6.65299C6.82204 6.78132 6.79352 6.91577 6.77315 7.05632C6.75889 7.16632 6.77111 7.27225 6.79352 7.37817C6.82 7.5004 6.875 7.61447 6.94222 7.72039C6.99518 7.80391 7.05426 7.88336 7.14389 7.93632C7.19481 7.96688 7.25389 7.98317 7.30278 8.02391C7.25796 8.0341 7.22333 8.00354 7.18463 8.00354C7.0237 8.00354 6.87907 7.94854 6.74259 7.87317C6.53481 7.7591 6.3963 7.57577 6.30463 7.36188C6.21093 7.14391 6.23333 6.92799 6.33722 6.72021C6.38815 6.61632 6.44926 6.51243 6.52463 6.42688C6.61833 6.32095 6.72222 6.22317 6.83833 6.14373C6.95241 6.06428 7.07463 6.00114 7.21315 5.97465C7.23352 5.97058 7.24167 5.96651 7.2437 5.9441C7.25796 5.83817 7.25796 5.84021 7.15204 5.83817C7.11333 5.83817 7.0787 5.84836 7.04204 5.85854C6.97481 5.87688 6.90963 5.90132 6.84241 5.92169C6.77518 5.94206 6.70593 5.95225 6.64481 5.99299C6.47981 6.10502 6.3087 6.20688 6.17018 6.35558C6.07241 6.46151 5.99093 6.57762 5.93389 6.70799C5.86259 6.87095 5.83204 7.04614 5.85444 7.2254C5.8687 7.31299 5.87481 7.40058 5.90537 7.4841Z",fill:"white"}),o$i("path",{d:"M16.828 8.71045C16.8606 8.71045 16.8911 8.71248 16.9217 8.71859C17.0113 8.73489 17.0989 8.74508 17.1987 8.76137C17.1865 8.74711 17.1844 8.741 17.1804 8.73896C17.0174 8.68193 16.8565 8.61878 16.6915 8.56989C16.5306 8.52304 16.3676 8.4823 16.2026 8.44359C16.003 8.39674 15.8013 8.356 15.5996 8.31933C15.4652 8.29285 15.3287 8.27452 15.1922 8.25415C15.0293 8.22971 14.8683 8.20119 14.7054 8.18489C14.4956 8.16248 14.2878 8.13804 14.0759 8.12378C13.7704 8.10341 13.4628 8.09119 13.1572 8.09119C12.8374 8.09119 12.5176 8.10952 12.1978 8.12989C12.0939 8.136 11.988 8.14415 11.8861 8.16045C11.6967 8.18896 11.5032 8.19915 11.3137 8.2297C11.1446 8.25619 10.9735 8.27452 10.8044 8.29693C10.6985 8.31119 10.5946 8.32952 10.4887 8.34174C10.3461 8.36008 10.2035 8.36822 10.0609 8.39267C9.90204 8.42119 9.73908 8.43748 9.58019 8.46193C9.50686 8.47415 9.43352 8.49045 9.36019 8.49859C9.17482 8.51693 8.99352 8.55767 8.81019 8.58822C8.69815 8.60656 8.58815 8.63711 8.47612 8.65341C8.3213 8.67785 8.16852 8.71859 8.01371 8.74915C7.92408 8.76748 7.83649 8.79193 7.74889 8.8123C7.61241 8.84489 7.47593 8.87545 7.33741 8.906C7.24982 8.92637 7.16019 8.94878 7.0726 8.96915C6.95241 8.99767 6.83019 9.02211 6.71204 9.05878C6.60815 9.09137 6.50426 9.12396 6.40038 9.15656C6.21501 9.21767 6.03371 9.28896 5.85038 9.34804C5.70982 9.39285 5.56926 9.43767 5.42667 9.47026C5.25352 9.50896 5.08038 9.54563 4.9113 9.6047C4.77278 9.65359 4.63223 9.69026 4.50186 9.75952C4.46926 9.77582 4.43056 9.78193 4.40204 9.80433C4.37963 9.82267 4.33482 9.83489 4.35112 9.87156C4.36741 9.90415 4.40815 9.88989 4.43871 9.88582C4.63834 9.85526 4.83186 9.79822 5.02334 9.73711C5.2576 9.66174 5.48575 9.566 5.72 9.48859C5.85649 9.44378 5.995 9.40508 6.1376 9.37452C6.14778 9.37248 6.16815 9.37248 6.17019 9.37452C6.18649 9.42137 6.21297 9.39082 6.23538 9.38471C6.25575 9.37859 6.27612 9.37045 6.30056 9.37045C6.44315 9.37045 6.5776 9.32563 6.71 9.28082C6.80778 9.24822 6.9076 9.22582 7.00538 9.20545C7.10723 9.18304 7.20704 9.16267 7.30889 9.13822C7.40871 9.11378 7.50649 9.0873 7.61038 9.09341C7.64093 9.09545 7.67352 9.08933 7.69389 9.071C7.7326 9.03637 7.77334 9.04452 7.81612 9.05063C7.83241 9.05267 7.84871 9.05674 7.86501 9.05267C7.96075 9.03026 8.05649 9.00582 8.15223 8.98952C8.2663 8.97119 8.37834 8.9447 8.49038 8.9223C8.64926 8.89378 8.81019 8.87341 8.97112 8.851C9.11371 8.83267 9.26038 8.82248 9.39889 8.7797C9.52519 8.73896 9.65352 8.73082 9.78186 8.70841C9.99778 8.6697 10.2198 8.67785 10.4357 8.63304C10.5906 8.60045 10.7515 8.60248 10.9104 8.60248C11.0754 8.60248 11.2404 8.60248 11.4054 8.59433C11.4237 8.59433 11.442 8.5923 11.4604 8.58619C11.5256 8.56378 11.5907 8.55563 11.6539 8.58415C11.6783 8.59433 11.7007 8.59026 11.7211 8.576C11.7741 8.54137 11.8352 8.52915 11.8983 8.52508C12.0633 8.51285 12.2324 8.52304 12.3974 8.49656C12.4524 8.48841 12.5094 8.50063 12.5624 8.47415C12.6032 8.45378 12.6459 8.45378 12.6867 8.47619C12.7132 8.49045 12.7315 8.48433 12.7437 8.45582C12.758 8.42119 12.7722 8.37841 12.815 8.43545C12.8191 8.43952 12.8293 8.43952 12.8374 8.43952C12.8843 8.44156 12.9209 8.46396 12.961
1667 8.4823C13.0004 8.50063 13.0391 8.51693 13.0839 8.50063C13.1389 8.4823 13.1919 8.46396 13.2489 8.49452C13.2693 8.5047 13.2998 8.5047 13.3243 8.49045C13.3976 8.44767 13.4811 8.44156 13.5626 8.4497C13.6828 8.45989 13.803 8.48841 13.9232 8.49248C14.1594 8.50063 14.3937 8.51285 14.628 8.53119C14.742 8.53933 14.8541 8.56174 14.9682 8.56174C15.0782 8.56174 15.1861 8.58008 15.2961 8.59433C15.4 8.60859 15.4998 8.64526 15.6098 8.63304C15.7015 8.62285 15.8013 8.62489 15.8869 8.65952C16.0294 8.71656 16.1782 8.7247 16.3248 8.7573C16.4735 8.78989 16.6222 8.8123 16.7669 8.86526C16.7933 8.87545 16.8198 8.89989 16.8626 8.8897C16.8361 8.85508 16.8137 8.82248 16.7872 8.78989C16.773 8.77156 16.7709 8.75119 16.777 8.73285C16.7872 8.7023 16.8096 8.71045 16.828 8.71045Z",fill:"white"}),o$i("path",{d:"M15.0843 6.56335H15.2859V7.42909H15.5446V6.56335H15.728L15.8746 6.97891L16.0356 7.43113H16.2474L16.61 6.3678H16.3391L16.1822 6.87502C16.1619 6.93613 16.1557 6.99724 16.1415 7.06039H16.1374C16.1252 7.01558 16.117 6.96872 16.1048 6.92391C16.1007 6.90965 16.0967 6.89335 16.0906 6.87909L15.9337 6.3678H15.0822L15.0843 6.56335Z",fill:"white"}),o$i("path",{d:"M11.9717 6.87295C11.9554 6.92999 11.937 6.99314 11.8943 7.04406C11.8759 6.90758 11.9309 6.78129 11.8922 6.64481C11.8617 6.54092 11.9004 6.59388 11.8637 6.47981C11.8454 6.42277 11.8922 6.31277 11.8311 6.26388C11.8209 6.25573 11.8209 6.22925 11.823 6.21092C11.827 6.17629 11.825 6.18851 11.8352 6.15388C11.8413 6.13758 11.8393 6.12943 11.8291 6.11925C11.827 6.11721 11.823 6.11314 11.8209 6.1111C11.7781 6.07851 11.713 6.09684 11.6946 6.1498C11.6356 6.32906 11.6131 6.33518 11.5907 6.52055C11.5561 6.7874 11.5581 7.05425 11.5826 7.3211C11.5907 7.41277 11.6193 7.46777 11.6804 7.49221C11.7069 7.50443 11.7415 7.51055 11.7822 7.51055C11.7965 7.51055 11.8128 7.51055 11.827 7.51258C11.9167 7.52888 11.9757 7.47592 12.0307 7.41888C12.1204 7.32314 12.1631 7.19888 12.212 7.08073C12.2507 6.98906 12.3037 6.80777 12.3506 6.70999C12.3933 6.62036 12.4931 6.45129 12.5054 6.42684C12.5257 6.38203 12.5502 6.34332 12.5767 6.30258C12.65 6.18851 12.707 6.06221 12.7967 5.95629C12.8415 5.90129 12.9209 5.84018 12.8598 5.74647C12.8578 5.74443 12.8578 5.73832 12.8598 5.73629C12.8659 5.71592 12.8639 5.70573 12.8598 5.69758C12.8496 5.68536 12.8293 5.6874 12.8089 5.6874C12.7824 5.68536 12.7641 5.70573 12.7457 5.71795C12.5054 5.88703 12.3567 6.13147 12.2202 6.38406C12.1733 6.47166 12.1244 6.55721 12.0837 6.64684C12.045 6.72629 11.9941 6.79351 11.9717 6.87295Z",fill:"white"}),o$i("path",{d:"M9.7126 6.54296C9.68205 6.58574 9.62705 6.60407 9.58223 6.61426C9.54964 6.6224 9.49871 6.64277 9.52519 6.66926C9.55982 6.70185 9.54556 6.73852 9.57001 6.74666C9.57408 6.7487 9.57816 6.7487 9.58427 6.7487C9.59038 6.7487 9.59649 6.75074 9.60056 6.75277C9.62908 6.76703 9.59649 6.82815 9.58834 6.85259C9.53538 7.04203 9.51093 7.23148 9.55982 7.425C9.58427 7.52277 9.63927 7.59815 9.73297 7.64296C9.74112 7.64703 9.74927 7.65111 9.75742 7.65315C9.88779 7.7 10.0854 7.65926 10.2015 7.6124C10.5111 7.48203 10.8554 6.99926 10.8778 6.91574C10.8452 7.11333 10.7983 7.28037 10.7719 7.4637C10.7637 7.5187 10.8024 7.55129 10.8595 7.5737C10.8778 7.58185 10.9002 7.58796 10.9226 7.59203C10.9572 7.60018 11.0245 7.53296 11.057 7.55333C11.0591 7.55537 11.0611 7.55537 11.0632 7.55944C11.0652 7.56148 11.0652 7.56148 11.0672 7.56148C11.0795 7.56555 11.0998 7.54315 11.0978 7.52481C11.0957 7.48611 11.0896 7.48203 11.0835 7.39037C11.0815 7.35574 11.0917 7.22333 11.0998 7.18463C11.1059 7.15 11.1528 6.91981 11.1507 6.87907C11.1446 6.81592 11.163 6.80981 11.1711 6.72018C11.1956 6.41259 11.3483 6.2374 11.4196 6.17222C11.7782 5.83 12.0857 5.9074 12.102 5.91963C12.1469 5.95222 12.1652 5.85852 12.1407 5.83611C12.1143 5.81166 12.1326 5.78518 12.1265 5.77907C12.1245 5.77703 12.1224 5.775 12.1204 5.77296C12.0613 5.71796 11.7517 5.7037 11.5032 5.82185C11.2913 5.92166 11.22 5.99296 11.2098 6.01537C11.2098 6.01129 11.22 5.96648 11.2119 5.94C11.2119 5.93796 11.2098 5.93592 11.2098 5.93592C11.2017 5.92777 11.1752 5.92981 11.1609 5.93185C11.1345 5.93389 11.1365 5.92166 11.1019 5.94C11.0896 5.94611 11.0509 5.91963 11.0469 5.94C11.0367 5.99703 11.0285 6.16203 10.9796 6.30463C10.8961 6.54703 10.6354 6.94629 10.3848 7.19889C10.3115 7.27222 10.0833 7.49426 9.8939 7.42092C9.88168 7.41685 9.86945 7.41074 9.85723 7.40259C9.81242 7.37407 9.81038 7.30889 9.8063 7.25389C9.79205 7.06648 9.85112 6.94629 9.92445 6.77926C9.93668 
1666.7487 9.9489 6.74666 9.97945 6.73444C10.0243 6.71407 10.0691 6.6937 10.1159 6.67537C10.2443 6.62444 10.3624 6.57148 10.4724 6.49C10.5987 6.39629 10.7006 6.32907 10.8045 6.15796C10.8757 6.03777 10.9002 5.83203 10.7841 5.74648C10.7576 5.72611 10.723 5.71389 10.6802 5.70981C10.4582 5.6874 10.1669 5.86463 10.0161 6.02759C9.83279 6.22722 9.83075 6.31685 9.73093 6.51852C9.72279 6.52666 9.72279 6.5287 9.7126 6.54296ZM10.063 6.38C10.1995 6.08259 10.507 5.89518 10.5824 5.93592C10.5845 5.93796 10.5865 5.93796 10.5885 5.94C10.7719 6.11518 10.1485 6.46555 10.067 6.41666C10.0548 6.41259 10.0548 6.40037 10.063 6.38Z",fill:"white"}),o$i("path",{d:"M12.8191 6.2049C12.7009 6.39231 12.6663 6.5186 12.6215 6.72231C12.5807 6.90157 12.597 7.07064 12.65 7.24175C12.6765 7.32731 12.7376 7.40879 12.8293 7.46175C12.9026 7.50453 12.9841 7.51268 13.037 7.51064C13.2448 7.50453 13.3039 7.47194 13.3548 7.43323C13.4057 7.39453 13.3976 7.36805 13.4445 7.36805C13.4587 7.36805 13.4689 7.37212 13.477 7.38027C13.4933 7.39453 13.5015 7.4149 13.5157 7.42712C13.5178 7.42916 13.5198 7.42916 13.5198 7.4312C13.6176 7.49842 13.9089 7.28657 14.1757 6.60416C14.2185 6.51249 14.2491 6.44731 14.2919 6.35564C14.3082 6.40249 14.3183 6.43305 14.3367 6.46768C14.3489 6.49008 14.3632 6.51249 14.3774 6.5349C14.4406 6.62657 14.5282 6.70194 14.5954 6.79157C14.6932 6.92194 14.7115 7.04212 14.6422 7.14805C14.6096 7.19694 14.575 7.24379 14.5261 7.28046C14.357 7.41083 14.1757 7.52083 13.9761 7.5962C13.913 7.62064 13.8437 7.64305 13.8009 7.70823C13.8437 7.7286 13.8845 7.72453 13.9252 7.71434C13.968 7.70212 14.0087 7.69805 14.0495 7.71842C14.0841 7.73471 14.1228 7.73675 14.1533 7.72453C14.2633 7.68175 14.3774 7.64916 14.4854 7.60638C14.5913 7.5636 14.6993 7.51471 14.7909 7.44546C14.8846 7.3762 14.962 7.28657 14.9763 7.17046C14.9967 7.01157 14.9865 6.85879 14.9009 6.72434C14.8806 6.69379 14.8582 6.66323 14.8296 6.63471C14.7563 6.55934 14.6361 6.45138 14.5709 6.34546C14.5526 6.3149 14.5383 6.28638 14.5302 6.25786C14.4935 6.11934 14.5485 5.94008 14.6524 5.84434C14.7033 5.79546 14.7278 5.75471 14.7196 5.74453C14.7176 5.74249 14.7176 5.74249 14.7135 5.74249C14.6932 5.75064 14.685 5.74453 14.6789 5.73434C14.6707 5.71805 14.6728 5.68749 14.6667 5.6712C14.6646 5.66508 14.6585 5.66101 14.6524 5.66101C14.4406 5.66508 14.3998 5.73638 14.3835 5.75879C14.3163 5.85453 14.2817 5.95231 14.2491 6.04194C14.1819 6.22323 14.0617 6.46768 14.0006 6.6062C13.915 6.79768 13.6645 7.19286 13.585 7.23157C13.5728 7.23768 13.5565 7.24175 13.5483 7.23564C13.5402 7.22953 13.5382 7.21527 13.5483 7.18879C13.6217 6.98508 13.6583 6.87305 13.7663 6.50638C13.8641 6.17842 13.8845 5.80768 13.862 5.77305C13.862 5.77101 13.86 5.77101 13.86 5.77101C13.8356 5.75675 13.807 5.76694 13.7806 5.78731C13.7439 5.81379 13.7256 5.85453 13.693 5.88305C13.6237 5.94416 13.5341 6.02564 13.5198 6.11934C13.5137 6.16212 13.5157 6.21305 13.5096 6.25786C13.4832 6.4412 13.2122 7.31101 13.035 7.3049C12.9943 7.30286 12.9596 7.29268 12.9332 7.27434C12.817 7.19286 12.8252 6.97286 12.8557 6.82416C12.8659 6.77527 12.8659 6.70805 12.8802 6.65916C12.9169 6.53694 12.9759 6.43712 13.0085 6.36583C13.0187 6.34546 13.0146 6.32916 13.0207 6.31897C13.0248 6.31286 13.035 6.28842 13.0391 6.2762C13.0615 6.22731 13.0961 6.21101 13.1002 6.17638C13.1104 6.07249 13.1593 5.98694 13.2326 5.91564C13.2448 5.90342 13.2489 5.8912 13.2489 5.8749C13.2489 5.85249 13.2489 5.83008 13.2346 5.81583C13.2306 5.80971 13.2245 5.80564 13.2183 5.80157C13.1776 5.7812 13.1328 5.77916 13.0941 5.8036C13.037 5.84231 12.982 5.8912 12.9576 5.95434C12.9332 6.02564 12.8843 6.08064 12.8557 6.1499L12.8191 6.2049Z",fill:"white"})]}),tenantConfigs={rbtv:{Icon:RbtvIcon,tenantName:"Red Bull TV"},stv:{Icon:StvIcon,tenantName:"Servus TV"},rallytv:{Icon:RallytvIcon,tenantName:"Rally TV"}},createLinkOutButtonWithTenant=e=>{let t=t=>o$i(LinkOutButton,{tenant:e,...t});return t.displayName="LinkOutButtonWithTenant",t},LinkOutButton=({tenant:e,onTooltipUpdate:t})=>{let[i,n]=h$3(!1),{Icon:r,tenantName:o}=tenantConfigs[e],{playerState:{mediaMetaData:a}}=usePlayerContext();if(!mediaMetaDataHasShareUrl(a))return null;let s=translate("watch-on-linkout-button");return o$i(k$5,{children:o$i(CosmosButton,{className:`linkout-button${i?" linkout-button--expanded":""}`,onPointerEnter:e=>{n(!0),t("",e)}
166,onPointerLeave:()=>n(!1),size:"small",iconPlacement:"after",kind:"bare",appearance:"dark",href:a.shareUrl,target:"_blank","aria-label":`${s} ${o}`,children:[o$i("span",{slot:"icon",className:"linkout-button__icon",children:o$i(r,{})}),o$i(AnimatedContainer,{className:"linkout-button__text-container",direction:"horizontal",children:i&&o$i(CosmosText,{"aria-hidden":"true",size:"small",appearance:"light",children:s})})]})})};function mediaMetaDataHasShareUrl(e){return!!e&&"shareUrl"in e&&void 0!==e.shareUrl}let ReduceAdsComponent=({adsEnabled:e})=>{let{playerState:{playerCoordinator:t}}=usePlayerContext();if("ACTIVE"!==e)return null;let i=null==t?void 0:t.getMediaMetaData(),n=null==i?void 0:i.reduceAdsToastLink;return n?o$i(CosmosBadge,{"data-rbup-reduce-ads-badge":!0,href:n,target:"_blank",appearance:"light",kind:"cover-up",size:"small",shape:"pill",children:translate("stv-reduce-ads")}):null},useAutoUnmuteOnFullscreen=(e,t,i)=>{let n=_$3(!1);p$6(()=>{if("inline"===t){if(!e){n.current=!1;return}i&&(n.current||(i.isMuted()&&i.setMuted(!1),n.current=!0))}},[e,i,t])},MIN_SPACE_FOR_FIXED_PANEL=500;function useLayoutMeasurements(e,t){let{height:i,width:n}=useMeasure(e),r=i-n/t,o=r<MIN_SPACE_FOR_FIXED_PANEL;return{remainingSpace:r,rendersPanelAsHover:o}}let StreamingSidebar=({children:e,closeSidebar:t})=>o$i("div",{class:"streaming-sidebar",children:[o$i("div",{class:"streaming-sidebar__close-button",children:o$i(ControlsButton,{kind:"cover-up",shape:"circle",appearance:"light",Icon:o$i(CosmosIconClose,{slot:"icon",size:.75}),dataAttribute:"data-rbup-close-button",label:"Close sidebar",onPointerUp:e=>{"key"in e&&e.key===KEYCODE_SPACE&&e.preventDefault(),t()}})}),o$i("div",{class:"streaming-sidebar__content",children:e})]});function isArgsWithTime(e){return"object"==typeof e&&null!==e&&"time"in e&&"number"==typeof e.time}function useOnPlayerCallForEventBreakdown(e){return T$4((t,i)=>{switch(t){case"play":e.play();break;case"seek":isArgsWithTime(i)&&("LIVE"===e.getPlaybackMode()?e.timeShift(i.time):e.seek(i.time));break;case"togglePause":e.pause()}},[e])}function getPositionFromEvent(e){switch(e.type){case"seeking":return e.targetPosition;case"play":case"paused":case"timeChanged":return e.playbackPosition;default:return 0}}function getCueTagGotInfoProps(e,t){var i;return"LIVE"===t.getPlaybackMode()?{duration:t.getMaxTimeShiftInSec(),position:t.getTimeShiftInSec()}:{duration:(null==(i=t.getPlayerData())?void 0:i.getMainMediaDurationInSec())??0,position:getPositionFromEvent(e)}}function useOnPlayerEventForEventBreakdown(e,t){p$6(()=>{let i=i=>{if(t.current)switch(i.type){case"play":case"paused":case"timeChanged":case"seeking":t.current.playerEvent("gotInfo",getCueTagGotInfoProps(i,e))}};return e.addEventListener(i),()=>{e.removeEventListener(i)}},[e,t])}let logger=loglevelExports.getLogger("EventBreakdownContent");function isCueTagAvailable(e){return"function"==typeof e.cueTag}let EventBreakdownContent=({cueTag:e,playerCoordinator:t})=>{let i=F$4(()=>`CUETAG-${v4()}`,[]),n=_$3(null),r=_$3(),o=useOnPlayerCallForEventBreakdown(t);return useOnPlayerEventForEventBreakdown(t,r),p$6(()=>{let t=!0;return loadScriptIfNecessaryAsync("cuetag-api-v3","https://redbull.cuetag.tv/js/api_v3.js").then(()=>{if(!(!t||!n.current)){if(!isCueTagAvailable(window))return void logger.error("CueTag API is not available on window object");r.current=new window.cueTag(n.current,{autoInit:!1},{onInit:()=>{},onPlayerCall:o,onTLHeightChange:()=>{}}),r.current.init({configid:e.configId,eq:e.eq})}}).catch(e=>{logger.error("Failed to load CueTag script",e)}),()=>{t=!1,r.current&&(r.current=void 0)}},[e,o]),o$i("div",{ref:n,id:i,"data-configid":e.configId,"data-eq":e.eq,className:"event-breakdown"})},InteractiveStatsContent=x$5(({interactiveStats:e})=>{let t=F$4(()=>0===e.length?[]:1===e.length?e:[...e].sort((e,t)=>e.index-t.index),[e]),[i,n]=h$3(t[0]);return i?o$i("div",{class:"interactive-stats-content",children:[t.length>1&&o$i("div",{class:"interactive-stats-content__tabs",children:t.map(e=>o$i(CosmosButton,{size:"small",onClick:()=>n(e),kind:"cover-up",children:e.title},e.id))}),o$i("iframe",{class:"interactive-stats-content__iframe",src:i.embed,title:i.title})]}):null}),StreamingInfoBadges=({tvApiBadges:e,playApiBadges:t,tvApiHeaderBadges:i})=>o$i("div",{class:"streaming-info-content__badges",children:[null==e?void 0:e.map((e,t)=>"maturity_rating"===e.type&&"url"===e.display?o$i("div",{class:"streaming-info-content__maturity-rating",children:o$i(MaturityRating,{rating:e.value,ratingFormat:"url",size:34,textSize:"small"})},t):o$i(CosmosBadge,{kind:"primary",shape:"rectangle",appearance:"light",children:e.value},t)),null==t?void 0:t.map((e,t)=>o$i(CosmosBadge,{appearance:"light",kind:"secondary",shape:"rectangle",children:e},t)),i&&o$i("div",{class:"tv-api-header-badges",children:i.map((e,t)=>o$i(CosmosText,{class:"tv-api-header-badges__badge",appearance:"light",clamp:1,kind:"subtle",size:"small",tag:"span",children:e.value},t))})]});function shouldRenderStartOverButton(e){return!!e&&("LIVE"!==e.getPlaybackMode()||"DVR"===e.getLiveVariant())}let StreamingInfoContent=({sizeBreakpoints:e,videoDetails:t})=>{let{image:i,title:n,description:r,tvApiBadges:o,playApiBadges:a,tvApiHeaderBadges:s,locale:l}=t,{playerState:{playerCoordinator:c}}=usePlayerContext(),{title:u,description:d,image:h}=useGetCurrentlyPlayedAssetInfos(c,{defaultTitle:n,defaultDescription:r,defaultImage:i}),p=e.largeOrBigger,f=e.mediumOrBigger,m=T$4(()=>{null==c||c.restartPlaybackFromBeginning(),null==c||c.play()},[c]),g=F$4(()=>{if(s)return formatEventDateBadges(s,l)},[s,l]);return o$i("div",{class:"streaming-info-content streaming-info--outside-content",children:o$i("div",{class:"streaming-info-content__content",children:[f&&h&&o$i("img",{class:"streaming-info-content__image",src:h,alt:u}),o$i("div",{class:"streaming-info-content__details",children:[o$i("div",{children:[u&&o$i(CosmosTitle,{appearance:"light",clamp:2,size:p?"medium":"x-small",weight:"bold",dir:"auto",children:addNonBreakingSpaceInBrandName(u)}),d&&o$i(CosmosText,{appearance:"light",kind:"subtle",size:"small",dir:"auto",children:d})]}),o$i(StreamingInfoBadges,{tvApiBadges:o,playApiBadges:a,tvApiHeaderBadges:g})]}),shouldRenderStartOverButton(c)&&o$i("div",{class:"streaming-info-content__buttons",children:o$i(CosmosButton,{"data-rbup-start-over":!0,kind:"cover-up",width:"full",onClick:m,children:[translate("start-over"),o$i(CosmosIconPlay,{slot:"icon"})]})})]})})},tabContentTypes=["info","event-breakdown","interactive-stats","playlist"],tabConfig={info:{label:translate("streaming-tab-info"),visible:()=>!0,tabContent:({sizeBreakpoints:e,coordinator:t})=>{let i=t.getMediaMetaData();return null!=i&&i.videoDetails?o$i(StreamingInfoContent,{sizeBreakpoints:e,videoDetails:i.videoDetails}):null},targetSlot:e=>"panel"},"event-breakdown":{label:translate("streaming-tab-event-breakdown"),visible:e=>void 0!==e.cueTag,tabContent:({coordinator:e})=>{var t;let i=null==(t=e.getMediaMetaData())?void 0:t.cueTag;return i?o$i(EventBreakdownContent,{cueTag:i,playerCoordinator:e}):null},targetSlot:e=>"panel"},"interactive-stats":{label:translate("streaming-tab-interactive-stats"),visible:e=>{var t;return((null==(t=e.interactiveStats)?void 0:t.length)??0)>0},targetSlot:e=>e?"sidebar":"panel",tabContent:({coordinator:e})=>{var t;let i=null==(t=e.getMediaMetaData())?void 0:t.interactiveStats;return i?o$i(InteractiveStatsContent,{interactiveStats:i}):null}},playlist:{label:"playlist",visible:()=>!1,targetSlot:e=>e?"sidebar":"panel",tabContent:({})=>o$i("h1",{children:"Playlist"})}},StreamingButtonBar=({availableTabs:e,onTabClicked:t})=>o$i("div",{class:"streaming-information__buttons streaming-info--outside-content",children:e.map(e=>o$i(CosmosButton,{onClick:i=>{i.stopPropagation(),t(e.id)},kind:"cover-up",children:e.label},e.id))});function useStreamingTabs(e,t){let[i,n]=h$3(null),[r,o]=h$3(null),a=t.largeOrBigger,s=null==e?void 0:e.getMediaMetaData(),l=F$4(()=>getAvailableTabs(s),[s]),c=F$4(()=>e&&i?o$i(StreamingSidebar,{closeSidebar:()=>n(null),children:tabConfig[i].tabContent({coordinator:e,sizeBreakpoints:t})}
166):null,[i,e,t]);p$6(()=>{a?o(e=>"interactive-stats"===e?null:e):n(null)},[a]);let u=T$4(e=>{switch(tabConfig[e].targetSlot(a)){case"sidebar":n(setOrCancel(e));break;case"panel":o(setOrCancel(e))}},[a]),d=F$4(()=>r&&e?tabConfig[r].tabContent({coordinator:e,sizeBreakpoints:t}):null,[r,e,t]),h=T$4(()=>o(null),[]);return{sidePanel:c,bottomPanel:d,streamingButtonBar:o$i(StreamingButtonBar,{availableTabs:l,onTabClicked:u}),closeBottomPanel:h}}let setOrCancel=e=>t=>e===t?null:e;function getAvailableTabs(e){return e?tabContentTypes.filter(t=>tabConfig[t].visible(e)).map(e=>({id:e,label:tabConfig[e].label})):[]}let useTvStreamingControlsVisibility=e=>{let{playerState:{playerCoordinator:t}}=usePlayerContext();return"modal"===e||"inline"===e&&!!(null!=t&&t.isInFullscreenMode())},PanelWithButtonBar=({buttonBar:e,children:t,onClickOutside:i})=>o$i("div",{onClick:e=>{e.target.className.split(" ").includes("streaming-info--outside-content")&&i()},class:"streaming-information__bottom-panel-container",children:[e,t]}),BottomPanel=({streamingButtonBar:e,bottomPanelContent:t,rendersPanelAsHover:i,remainingSpace:n,onClickOutside:r})=>o$i(AnimatedContainer,{className:`root-layout__subbar${i?"":" root-layout--panel-squeezes"}`,direction:"vertical",fixedSize:i?void 0:n,children:t&&o$i(PanelWithButtonBar,{onClickOutside:r,buttonBar:e,children:t})}),styles$1='.streaming-information__bottom-panel-container{height:100%;isolation:isolate;overflow:auto}.root-layout--panel-squeezes .streaming-information__bottom-panel-container{background-color:#000f1e}.root-layout{display:grid;grid-template:"main sidebar" 1fr "subbar sidebar" auto/1fr auto;height:100%;width:100%}.streaming-information--controls-visible{--rbup-menu-extra-bottom-offset: -56px;--rbup-product-placement-top: 28px;--rbup-product-placement-left: 72px;--rbup-maturity-padding-top: 22px;--rbup-maturity-padding-left: 72px;--rbup-subtitles-top: 24px;--rbup-subtitles-left: 72px;--rbup-centered-toast-top: 24px;--rbup-centered-toast-left: 72px;--rbup-subtitles-bottom-650: 146px}.cq-540 .streaming-information--controls-visible{--rbup-maturity-padding-top: 18px}.cq-650 .streaming-information--controls-visible{--rbup-maturity-padding-top: 16px}.themed-player-root:has(.streaming-information--controls-visible){height:100%;width:100%}.root-layout__main{position:relative;grid-area:main}.root-layout__sidebar{grid-area:sidebar;align-self:stretch}.root-layout__subbar{grid-area:subbar;justify-self:stretch;opacity:1;transition:opacity 1s}.streaming-information__panel-hover-hidden .root-layout__subbar{opacity:0}.streaming-information__buttons{overflow-x:scroll;display:flex;gap:16px;padding:8px 24px;scrollbar-width:none;-ms-overflow-style:none}.streaming-information__buttons::-webkit-scrollbar{display:none}.streaming-information__buttons-hidden .streaming-information__buttons{display:none}.root-layout__main--content-click-overlay{position:absolute;top:0;bottom:0;width:100%;height:100%}',styles=".streaming-back-button{position:absolute;top:16px;left:16px;transition:opacity .3s ease-in-out}.streaming-back-button.streaming-back-button--hide,.streaming-back-button.streaming-back-button--fade-out{opacity:0;pointer-events:none}.streaming-back-button.streaming-back-button--fade-in{opacity:1;pointer-events:auto}",BASE_CLASS_NAME="streaming-back-button",resolveClassNames=(e,t,i)=>{var n;return(null==(n=null==i?void 0:i.getPlayerData())?void 0:n.isShowingAd())===!0||"ENDED"===e||"ERROR"===e||"IDLE"===e?BASE_CLASS_NAME:`${BASE_CLASS_NAME} ${BASE_CLASS_NAME}--${t}`},StreamingBackButton=({playerMode:e})=>{let{playerState:{playerCoordinator:t,playerStatus:i}}=usePlayerContext(),{controlsVisibility:n}=useControlsVisibilityContext(),r=resolveClassNames(i,n,t),o=T$4(e=>{if(t){let{playerId:i}=t;t.dispatchPlayerEvent({type:"playerModalClose",playerId:i}),null==e||e.stopPropagation()}},[t]),a=T$4(i=>{"inline"===e?null==t||t.setFullscreen(!1):o(i)},[o,e,t]),s=T$4(e=>{e.key===KEYCODE_ESC&&o()},[o]);return p$6(()=>(document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}),[s]),o$i(k$5,{children:[o$i("style",{children:styles}),o$i("div",{class:r,children:o$i(ControlsButton,{kind:"cover-up",shape:"circle",appearance:"light",Icon:o$i(CosmosIconChevronLeft,{slot:"icon"}),dataAttribute:"data-rbup-back-button",onPointerUp:a})})]})},SIDEBAR_WIDTH=350,StreamingRootLayout=({aspectRatio:e,children:t,playerMode:i,sizeBreakpoints:n})=>{let r=_$3(null),{remainingSpace:o,rendersPanelAsHover:a}=useLayoutMeasurements(r,e),{setAllowControlsRendering:s}=useControlsVisibilityContext(),l=useTvStreamingControlsVisibility(i),{playerState:{playerCoordinator:c,isFullscreenMode:u}}=usePlayerContext();useAutoUnmuteOnFullscreen(u,i,c);let{streamingButtonBar:d,sidePanel:h,bottomPanel:p,closeBottomPanel:f}=useStreamingTabs(c,n);p$6(()=>{s(p&&a&&l?"disallow":"allow")},[p,a,s,l]);
166let{containerClasses:m,mainClasses:g}=resolveRootLayoutClasses(l,a,!!p);return o$i(k$5,{children:["embed"!==i&&o$i("style",{children:styles$1}),o$i("div",{className:`${m.join(" ")}`,ref:r,children:[o$i("div",{className:`${g.join(" ")}`,children:[o$i(StreamingButtonBarProvider,{value:"embed"!==i?d:null,children:[t,l&&o$i(StreamingBackButton,{playerMode:i})]}),p&&a&&o$i("div",{class:"root-layout__main--content-click-overlay",onPointerUp:f})]}),l&&o$i(k$5,{children:[o$i(AnimatedContainer,{className:"root-layout__sidebar",direction:"horizontal",fixedSize:SIDEBAR_WIDTH,children:h}),o$i(BottomPanel,{streamingButtonBar:d,bottomPanelContent:p,rendersPanelAsHover:a,remainingSpace:o,onClickOutside:f})]})]})]})};function resolveRootLayoutClasses(e,t,i){let n=["root-layout"];e&&n.push("streaming-information--controls-visible"),t&&n.push("streaming-information__panel-hover");let r=["root-layout__main"];return(!i||t)&&e||r.push("streaming-information__buttons-hidden"),{containerClasses:n,mainClasses:r}}let log=loglevelExports.getLogger("RbupVideoTvStreaming"),defaultEmptyConfig={},RbupVideoTvStreamingInner=k$3(({_debug:e,accountsSdk:t,adTargeting:i,adsEnabled:n="INACTIVE",aspectRatio:r,assetId:o,autoplay:a,collectionId:s,cornerbug:l,customDataLayer:c,dataZoomBuildVersion:u,dataZoomConfigId:d,deviceGroup:h,dfpAddtlConsent:p,dfpGdpr:f,dfpGdprConsent:m,enableGfk:g=DEFAULT_VALUE_ENABLE_GFK,entitlements:v,environment:y,id:b,internalOnApiAvailable:S,internalTvStreamingOnApiAvailable:_,locale:E,muted:T,overrideAudioLanguage:w,overrideSubtitleLanguage:A,overrideTranslationLanguage:P,playerMode:I="modal",poster:C,"poster-image":M,prNumber:R,productPlacement:k,relatedVideos:x,skipCosmosFontInjection:O,tenant:D,trackingEnvironment:L},N)=>{let[U,F]=h$3(),B=F$4(()=>new TvStreamingDataLoader(D,E,h,I,v,R),[D,E,h,I,v,R]),{hooks:V,adService:j,gfkService:z}=F$4(()=>createTvStreamingPlayerHooks(n,t,{enablement:g},{entitlements:resolveEntitlements(v),consentParams:{gdpr:f,gdprConsent:m,addtlConsent:p},pageId:i||o},D,L),[t,i,n,o,f,p,m,g,v,D,L]),{config:H,urlSharingStrategy:G,setConfig:q}=useTvStreamingConfig({_debug:e,assetId:o,autoplay:a,collectionId:s,customDataLayer:c,dataZoomBuildVersion:u,dataZoomConfigId:d,dfpGdpr:f,dfpGdprConsent:m,entitlements:v,environment:y,hooks:V,locale:E,muted:T,overrideAudioLanguage:w,overrideSubtitleLanguage:A,overrideTranslationLanguage:P,productPlacement:k,poster:C,relatedVideos:x,skipCosmosFontInjection:O,tenant:D}),{playNextUp:W}=useNextUp(q,F$4(()=>({adaptPlayerConfigForNextVideo:(e,t)=>adaptNextUpConfig()({...e,tenant:D},t),isMuted:()=>null==U?void 0:U.isMuted(),onBeforeSwitchToNextVideo(e,t){z&&(z.serviceConfig={enablement:g})}}),[g,z,U,D])),{tvVideoApi:Y}=useTvStreamingVideoApi(U,N);p$6(()=>{null==S||S.then(F).catch(e=>null==_?void 0:_.reject(e))},[S,_,Y]),p$6(()=>{_&&U&&_.resolve(Y)},[_,U,Y]);let[K,X]=h$3("INACTIVE"),Q=T$4((e="ACTIVE")=>{X(e)},[]),Z=null==H?void 0:H.assetId;p$6(()=>{Z&&X("INACTIVE")},[Z]);let J=T$4(e=>o$i(CustomTvStreamingEaseLiveOverlayWrapperWithNextUp,{...e,onEaseLiveActivated:Q,playNextUp:W}),[Q,W]),$=F$4(()=>{if(!entitlementsIncludeLimitedAds(v))return()=>o$i(ReduceAdsComponent,{adsEnabled:n})},[n,v]),ee=F$4(()=>{switch(D){case"rallytv":return rallyTvStyles;case"stv":return stvStyles;default:return}},[D]),et=_$3(I);et.current=I;let ei=F$4(()=>({children:e,sizeBreakpoints:t,resolvedAspectRatio:i})=>o$i(StreamingRootLayout,{playerMode:et.current,aspectRatio:i,sizeBreakpoints:t,children:e}),[]);return o$i(k$5,{children:[o$i(RbupVideoCoreDefaultTheme,{adService:j,allowControlsCaptureAreaInteraction:"INACTIVE"===K,liveStatusDataLoader:F$4(()=>"embed"===I?new TvLiveStatusDataloader(D,E,R):void 0,[D,E,R,I]),config:H??defaultEmptyConfig,CustomOverlayComponent:J,customPosterImage:M,dataLoader:B,id:b,internalOnApiAvailable:S,urlSharingStrategy:G,aspectRatio:r,CenteredToastComponent:$,WrapperComponent:ei,AdditionalButtonComponent:F$4(()=>"embed"===I?createLinkOutButtonWithTenant(D):void 0,[I,D])}),o$i("style",{children:commonStyles}),ee&&o$i("style",{children:ee})]})}),RbupVideoTvStreaming=k$3((e,t)=>{let i=_$3();return e.environment!==i.current&&(i.current=e.environment,playerErrorReporter.configure({environment:e.environment,componentVersion:CORE_VERSION})),o$i(RbupVideoTvStreamingInner,{...e,ref:t})});function initRbupVideoTvStreaming(e,t){let i=createControllablePromise(),n={"internal-tv-streaming-on-api-available":i,...t};return log.info("calling initRbupVideoTvStreaming for",e,"with args",t),initRbupVideo(e,"rbup-video-tv-streaming",n).catch(e=>i.reject(e)),i}let TvStreamingObservedAttributes=["_debug","accounts-sdk","ad-targeting","ads-enabled","aspect-ratio","asset-id","auto
166play","collection-id","cornerbug","custom-data-layer","data-zoom-build-version","data-zoom-config-id","device-group","dfp-addtl-consent","dfp-gdpr","dfp-gdpr-consent","enable-gfk","entitlements","environment","id","internal-on-api-available","internal-tv-streaming-on-api-available","locale","muted","override-audio-language","override-subtitle-language","override-translation-language","player-mode","poster","pr-number","product-placement","related-videos","skip-cosmos-font-injection","tenant","tracking-environment"];try{register(RbupVideoTvStreaming,"rbup-video-tv-streaming",TvStreamingObservedAttributes,{shadow:!0})}catch(ie){console.trace("Double register of rbup-video tags")}window.initRbupVideoTvStreaming=initRbupVideoTvStreaming}}]);

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.