@theoplayer/web-ui 1.11.1 → 1.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  !/*!
2
- * THEOplayer Open Video UI for Web (v1.11.1)
2
+ * THEOplayer Open Video UI for Web (v1.11.2)
3
3
  * License: MIT
4
4
  */function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("theoplayer/chromeless")):"function"==typeof define&&define.amd?define(["exports","theoplayer/chromeless"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).THEOplayerUI={},e.THEOplayer)}(this,function(e,t){"use strict";function r(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow}function a(e){r()&&window.ShadyCSS.styleElement(e)}function i(e,t){void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeCss?window.ShadyCSS.styleSubtree(e,t):null!=t&&/**
5
5
  * @license
@@ -14,7 +14,7 @@ ${t}</style>${e}`}let O=o("theoplayer-button",I("<slot></slot>"));class D extend
14
14
  ${t}`)}customElements.define("theoplayer-button",D);let q=o("theoplayer-link-button",N("<slot></slot>"));class B extends HTMLElement{static get observedAttributes(){return[p.DISABLED]}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(p.ARIA_LIVE)||this.setAttribute(p.ARIA_LIVE,"polite"),this.hasAttribute(p.DISABLED)||this._enable(),this._linkEl.addEventListener("keydown",this._onKeyDown),this._linkEl.addEventListener("click",this._onClick)}disconnectedCallback(){this._linkEl.removeEventListener("keydown",this._onKeyDown),this._linkEl.removeEventListener("click",this._onClick)}get disabled(){return this.hasAttribute(p.DISABLED)}set disabled(e){x(this,p.DISABLED,e)}setLink(e,t){this._linkEl.href=e,this._linkEl.target=t}attributeChangedCallback(e,t,r){e===p.DISABLED&&r!==t&&(null!=r?this._disable():this._enable()),D.observedAttributes.indexOf(e)>=0&&i(this)}_enable(){this.setAttribute("aria-disabled","false"),this.setAttribute("tabindex","0")}_disable(){this.setAttribute("aria-disabled","true"),this.removeAttribute("tabindex"),this.blur()}handleClick(){}constructor(e){var t;super(),this._onKeyDown=e=>{if(!e.metaKey&&!e.altKey){if(e.keyCode===S.SPACE)e.preventDefault(),this._linkEl.click()}},this._onClick=()=>{!this.disabled&&this.handleClick()};let r=null!=(t=null==e?void 0:e.template)?t:q(),a=this.attachShadow({mode:"open",delegatesFocus:!0});a.appendChild(r.content.cloneNode(!0)),this._linkEl=a.querySelector("a"),this._upgradeProperty("disabled")}}customElements.define("theoplayer-link-button",B);let F="theoplayerUiObservedProperties";function U(e){return F in e&&v(e[F])}function H(e,t){return class extends e{get[F](){return t}}}async function V(e,t,r){if(t.contains(e))return;e.nodeName.indexOf("-")>=0&&!U(e)&&(await Promise.resolve(),await customElements.whenDefined(e.nodeName.toLowerCase()),customElements.upgrade(e)),U(e)&&r(e);let a=A(e);a.length>0&&await Promise.all(b(a).map(e=>V(e,t,r)))}let z=o("theoplayer-play-button",I(`<span part="play-icon"><slot name="play-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 90 90" width="24" height="24"><path d="M77.504 50.868c-7.236 5.156-16.584 10.914-28.04 17.269-11.044 6.207-20.729 11.081-29.053 14.625l-9.224 3.43c-.581-2.493-1.125-6.188-1.632-11.08-1.143-9.75-1.715-20.513-1.715-32.288 0-10.781.777-20.858 2.333-30.234l2.251-10.772 9.787 3.29c8.476 3.375 17.663 8.166 27.563 14.373 10.48 6.562 19.472 12.805 26.97 18.73 3.749 2.982 6.449 5.279 8.099 6.891l-7.339 5.766"/></svg>
15
15
  </slot></span><span part="pause-icon"><slot name="pause-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M2.108 1.914Q2.108.5 3.522.5h4.171q1.415 0 1.415 1.414v20.172q0 1.414-1.415 1.414H3.522q-1.414 0-1.414-1.414zm12.784 0Q14.892.5 16.307.5h4.171q1.414 0 1.414 1.414v20.172q0 1.414-1.414 1.414h-4.171q-1.415 0-1.415-1.414z"/></svg>
16
16
  </slot></span><span part="replay-icon"><slot name="replay-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M12 23q-3.725 0-6.438-2.375Q2.85 18.25 2.275 14.7q-.1-.625.325-1.088.425-.462 1.125-.462.6 0 1.087.437.488.438.663 1.113.5 2.225 2.313 3.688Q9.6 19.85 12 19.85q2.8 0 4.75-1.963 1.95-1.962 1.95-4.762t-1.962-4.75q-1.963-1.95-4.763-1.95H11.8l.525.525q.375.375.363.85-.013.475-.363.825t-.85.363q-.5.012-.85-.338l-2.7-2.7q-.225-.225-.337-.513-.113-.287-.113-.587t.113-.588q.112-.287.337-.512L10.6 1.075q.35-.35.875-.363.525-.012.875.363.35.35.338.85-.013.5-.363.85l-.5.5h.15q2.05 0 3.85.775 1.8.775 3.15 2.112Q20.325 7.5 21.1 9.287q.775 1.788.775 3.838t-.775 3.85q-.775 1.8-2.112 3.137-1.338 1.338-3.138 2.113Q14.05 23 12 23Z"/></svg>
17
- </slot></span>`,":host(:not([ended])) [part=replay-icon],:host(:not([paused])) [part=play-icon],:host([ended]) [part=pause-icon],:host([ended]) [part=play-icon],:host([paused]) [part=pause-icon]{display:none!important}")),G=["seeking","seeked","ended","emptied","sourcechange"];class Q extends H(D,["player"]){static get observedAttributes(){return[...D.observedAttributes,p.PAUSED,p.ENDED]}connectedCallback(){super.connectedCallback(),this._updateFromPlayer(),this._updateAriaLabel()}get paused(){return this.hasAttribute(p.PAUSED)}set paused(e){x(this,p.PAUSED,e)}get ended(){return this.hasAttribute(p.ENDED)}set ended(e){x(this,p.ENDED,e)}get player(){return this._player}set player(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener("play",this._onPlay),this._player.removeEventListener("pause",this._onPause),this._player.removeEventListener(G,this._updateFromPlayer)),this._player=e,this._updateFromPlayer(),void 0!==this._player&&(this._player.addEventListener("play",this._onPlay),this._player.addEventListener("pause",this._onPause),this._player.addEventListener(G,this._updateFromPlayer)))}_updateEnded(){var e,t;this.ended=null!=(t=null==(e=this._player)?void 0:e.ended)&&t}handleClick(){void 0!==this._player&&void 0!==this._player.source&&(this._player.paused?this._player.play():this._player.pause())}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),Q.observedAttributes.indexOf(e)>=0&&(i(this),this._updateAriaLabel())}_updateAriaLabel(){let e=this.ended?"replay":this.paused?"play":"pause";this.setAttribute(p.ARIA_LABEL,e)}constructor(){super({template:z()}),this._onPlay=()=>{this.paused=!1,this._updateEnded()},this._onPause=()=>{this.paused=!0,this._updateEnded()},this._updateFromPlayer=()=>{var e,t;this.paused=null==(t=null==(e=this._player)?void 0:e.paused)||t,this._updateEnded(),this._updateDisabled()},this._updateDisabled=()=>{var e;this.disabled=(null==(e=this._player)?void 0:e.source)===void 0},this._upgradeProperty("paused"),this._upgradeProperty("ended"),this._upgradeProperty("player")}}customElements.define("theoplayer-play-button",Q);let $=o("theoplayer-mute-button",I(`<span part="off-icon"><slot name="off-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="m19.225 22.55-2.25-2.275q-.175.1-.35.187-.175.088-.375.163-.525.2-1.075-.138-.55-.337-.55-1.062 0-.225.088-.425.087-.2.287-.325.05-.025.138-.088.087-.062.137-.087l-2.65-2.7v2.425q0 1.05-.962 1.463-.963.412-1.713-.338l-3.5-3.5H3.525q-.65 0-1.112-.463-.463-.462-.463-1.112v-4.55q0-.65.463-1.113.462-.462 1.112-.462H5.2L1.35 4.2Q1 3.85 1 3.375t.35-.825q.35-.35.85-.35t.85.35L20.9 20.9q.35.35.35.825t-.35.825q-.35.35-.838.35-.487 0-.837-.35ZM16.25 3.325q2.6 1.1 4.188 3.425 1.587 2.325 1.587 5.225 0 1.425-.4 2.7-.4 1.275-1.125 2.4L18.775 15.3q.425-.75.638-1.588.212-.837.212-1.737 0-2.125-1.175-3.875t-3.1-2.575q-.325-.125-.525-.4t-.2-.625q0-.65.525-1.038.525-.387 1.1-.137Zm.925 10.35-2.55-2.6V7.65q1.275.6 2.088 1.762.812 1.163.812 2.588 0 .45-.087.875-.088.425-.263.8ZM12.625 9l-3.45-3.575.775-.775q.75-.75 1.713-.338.962.413.962 1.463Z"/></svg>
17
+ </slot></span>`,":host{--theoplayer-icon-color:var(--theoplayer-play-button-icon-color,unset)}:host(:not([ended])) [part=replay-icon],:host(:not([paused])) [part=play-icon],:host([ended]) [part=pause-icon],:host([ended]) [part=play-icon],:host([paused]) [part=pause-icon]{display:none!important}")),G=["seeking","seeked","ended","emptied","sourcechange"];class Q extends H(D,["player"]){static get observedAttributes(){return[...D.observedAttributes,p.PAUSED,p.ENDED]}connectedCallback(){super.connectedCallback(),this._updateFromPlayer(),this._updateAriaLabel()}get paused(){return this.hasAttribute(p.PAUSED)}set paused(e){x(this,p.PAUSED,e)}get ended(){return this.hasAttribute(p.ENDED)}set ended(e){x(this,p.ENDED,e)}get player(){return this._player}set player(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener("play",this._onPlay),this._player.removeEventListener("pause",this._onPause),this._player.removeEventListener(G,this._updateFromPlayer)),this._player=e,this._updateFromPlayer(),void 0!==this._player&&(this._player.addEventListener("play",this._onPlay),this._player.addEventListener("pause",this._onPause),this._player.addEventListener(G,this._updateFromPlayer)))}_updateEnded(){var e,t;this.ended=null!=(t=null==(e=this._player)?void 0:e.ended)&&t}handleClick(){void 0!==this._player&&void 0!==this._player.source&&(this._player.paused?this._player.play():this._player.pause())}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),Q.observedAttributes.indexOf(e)>=0&&(i(this),this._updateAriaLabel())}_updateAriaLabel(){let e=this.ended?"replay":this.paused?"play":"pause";this.setAttribute(p.ARIA_LABEL,e)}constructor(){super({template:z()}),this._onPlay=()=>{this.paused=!1,this._updateEnded()},this._onPause=()=>{this.paused=!0,this._updateEnded()},this._updateFromPlayer=()=>{var e,t;this.paused=null==(t=null==(e=this._player)?void 0:e.paused)||t,this._updateEnded(),this._updateDisabled()},this._updateDisabled=()=>{var e;this.disabled=(null==(e=this._player)?void 0:e.source)===void 0},this._upgradeProperty("paused"),this._upgradeProperty("ended"),this._upgradeProperty("player")}}customElements.define("theoplayer-play-button",Q);let $=o("theoplayer-mute-button",I(`<span part="off-icon"><slot name="off-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="m19.225 22.55-2.25-2.275q-.175.1-.35.187-.175.088-.375.163-.525.2-1.075-.138-.55-.337-.55-1.062 0-.225.088-.425.087-.2.287-.325.05-.025.138-.088.087-.062.137-.087l-2.65-2.7v2.425q0 1.05-.962 1.463-.963.412-1.713-.338l-3.5-3.5H3.525q-.65 0-1.112-.463-.463-.462-.463-1.112v-4.55q0-.65.463-1.113.462-.462 1.112-.462H5.2L1.35 4.2Q1 3.85 1 3.375t.35-.825q.35-.35.85-.35t.85.35L20.9 20.9q.35.35.35.825t-.35.825q-.35.35-.838.35-.487 0-.837-.35ZM16.25 3.325q2.6 1.1 4.188 3.425 1.587 2.325 1.587 5.225 0 1.425-.4 2.7-.4 1.275-1.125 2.4L18.775 15.3q.425-.75.638-1.588.212-.837.212-1.737 0-2.125-1.175-3.875t-3.1-2.575q-.325-.125-.525-.4t-.2-.625q0-.65.525-1.038.525-.387 1.1-.137Zm.925 10.35-2.55-2.6V7.65q1.275.6 2.088 1.762.812 1.163.812 2.588 0 .45-.087.875-.088.425-.263.8ZM12.625 9l-3.45-3.575.775-.775q.75-.75 1.713-.338.962.413.962 1.463Z"/></svg>
18
18
  </slot></span><span part="low-icon"><slot name="low-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M3.55 15.85q-.65 0-1.112-.463-.463-.462-.463-1.112v-4.55q0-.65.463-1.113Q2.9 8.15 3.55 8.15h2.925l3.5-3.5q.75-.75 1.713-.338.962.413.962 1.463v12.45q0 1.05-.962 1.463-.963.412-1.713-.338l-3.5-3.5Zm11.1.45V7.65q1.3.625 2.088 1.8.787 1.175.787 2.55 0 1.375-.787 2.525-.788 1.15-2.088 1.775Z"/></svg>
19
19
  </slot></span><span part="high-icon"><slot name="high-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M16.275 20.625q-.575.25-1.1-.15-.525-.4-.525-1.05 0-.35.188-.613.187-.262.512-.387 1.925-.825 3.113-2.575 1.187-1.75 1.187-3.875T18.463 8.1q-1.188-1.75-3.113-2.575-.325-.125-.512-.4-.188-.275-.188-.625 0-.65.525-1.038.525-.387 1.1-.137 2.6 1.1 4.175 3.425 1.575 2.325 1.575 5.225 0 2.9-1.575 5.225-1.575 2.325-4.175 3.425ZM3.55 15.85q-.65 0-1.112-.463-.463-.462-.463-1.112v-4.55q0-.65.463-1.113Q2.9 8.15 3.55 8.15h2.925l3.5-3.5q.75-.75 1.713-.338.962.413.962 1.463v12.45q0 1.05-.962 1.463-.963.412-1.713-.338l-3.5-3.5Zm11.1.45V7.65q1.3.625 2.088 1.8.787 1.175.787 2.55 0 1.375-.787 2.525-.788 1.15-2.088 1.775Z"/></svg>
20
20
  </slot></span>`,":host(:not([volume-level=high])) [part=high-icon],:host(:not([volume-level=low])) [part=low-icon],:host(:not([volume-level=off])) [part=off-icon]{display:none!important}")),K=["volumechange"];class Y extends H(D,["player"]){static get observedAttributes(){return[...D.observedAttributes,p.VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),this._updateFromPlayer(),this._updateAriaLabel()}get volumeLevel(){return this.getAttribute(p.VOLUME_LEVEL)||"off"}get player(){return this._player}set player(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(K,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(K,this._updateFromPlayer))}handleClick(){void 0!==this._player&&(this._player.muted=!this._player.muted,this._updateFromPlayer())}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),Y.observedAttributes.indexOf(e)>=0&&(i(this),this._updateAriaLabel())}_updateAriaLabel(){let e="off"===this.getAttribute(p.VOLUME_LEVEL)?"unmute":"mute";this.setAttribute(p.ARIA_LABEL,e)}constructor(){super({template:$()}),this._updateFromPlayer=()=>{let e="off";if(void 0!==this._player){let t=this._player.volume;e=this._player.muted?"off":t<.5?"low":"high"}this.setAttribute(p.VOLUME_LEVEL,e)},this._upgradeProperty("player")}}customElements.define("theoplayer-mute-button",Y);let W=o("theoplayer-seek-button",I(`<span part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M12 22.25q-1.925 0-3.6-.738-1.675-.737-2.912-1.974Q4.25 18.3 3.525 16.625q-.725-1.675-.725-3.6 0-1.9.725-3.575.725-1.675 1.963-2.925 1.237-1.25 2.925-1.975Q10.1 3.825 12 3.825h.15l-.7-.7q-.3-.325-.313-.788-.012-.462.313-.812.35-.35.813-.35.462 0 .812.325l2.65 2.675q.325.325.325.8 0 .475-.325.8l-2.65 2.65q-.325.325-.8.325-.475 0-.825-.35-.3-.325-.3-.8 0-.475.3-.8l.7-.7H12q-2.9 0-4.912 2.012-2.013 2.013-2.013 4.913 0 2.9 2.013 4.925Q9.1 19.975 12 19.975q2.6 0 4.55-1.687 1.95-1.688 2.325-4.238.05-.45.4-.738.35-.287.8-.287.45 0 .788.275.337.275.287.7-.375 3.55-2.987 5.9Q15.55 22.25 12 22.25Z"/></svg>
@@ -31,12 +31,12 @@ ${t}</style><div part="container"><div part="background"></div><div part="pointe
31
31
  </slot></span><slot name="spacer"> </slot><span part="text"><slot name="text">LIVE</slot></span>`,"[part=icon] ::slotted(svg),[part=icon] svg{fill:#8c8c8c;fill:var(--theoplayer-live-button-color,#8c8c8c)}:host([live]:not([paused])) [part=icon] ::slotted(svg),:host([live]:not([paused])) [part=icon] svg{fill:red;fill:var(--theoplayer-live-button-active-color,red)}")),rh=["play","pause","playing","emptied"],rd=["seeking","seeked","timeupdate","durationchange","emptied"];class rp extends H(D,["player","streamType"]){static get observedAttributes(){return[...D.observedAttributes,p.STREAM_TYPE,p.LIVE,p.PAUSED,p.LIVE_THRESHOLD]}connectedCallback(){super.connectedCallback(),this.hasAttribute(p.ARIA_LABEL)||this.setAttribute(p.ARIA_LABEL,"seek to live")}get paused(){return this.hasAttribute(p.PAUSED)}set paused(e){x(this,p.PAUSED,e)}get streamType(){return this.getAttribute(p.STREAM_TYPE)||"vod"}set streamType(e){this.setAttribute(p.STREAM_TYPE,e)}get liveThreshold(){var e;return Number(null!=(e=this.getAttribute(p.LIVE_THRESHOLD))?e:10)}set liveThreshold(e){e=Number(e),this.setAttribute(p.LIVE_THRESHOLD,String(isNaN(e)?0:e))}get live(){return this.hasAttribute(p.LIVE)}set live(e){x(this,p.LIVE,e)}get player(){return this._player}set player(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener(rh,this._updatePaused),this._player.removeEventListener(rd,this._updateLive)),this._player=e,this._updatePaused(),this._updateLive(),void 0!==this._player&&(this._player.addEventListener(rh,this._updatePaused),this._player.addEventListener(rd,this._updateLive)))}handleClick(){void 0!==this._player&&(this._player.hesp&&void 0!==this._player.hesp.manifest?this._player.hesp.goLive():(this._player.currentTime=1/0,this._player.play()))}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),r!==t&&(e===p.LIVE_THRESHOLD&&this._updateLive(),rp.observedAttributes.indexOf(e)>=0&&i(this))}constructor(){super({template:rl()}),this._updatePaused=()=>{this.paused=void 0===this._player||this._player.paused},this._updateLive=()=>{let e=void 0!==this._player&&function(e,t){if(e.duration===1/0){let r=e.seekable;return!(r.length>0)||r.end(r.length-1)-e.currentTime<=t}return!1}(this._player,this.liveThreshold);this.live!==e&&(this.live=e)},this._upgradeProperty("paused"),this._upgradeProperty("streamType"),this._upgradeProperty("liveThreshold"),this._upgradeProperty("live"),this._upgradeProperty("player")}}customElements.define("theoplayer-live-button",rp);let ru=o("theoplayer-ad-display",`<style>${j}
32
32
  :host{padding:5px 10px;padding:calc(var(--theoplayer-control-padding, 10px) - var(--theoplayer-ad-display-padding, 5px)) var(--theoplayer-control-padding,10px);pointer-events:none}span{background:#ffc50f;background:var(--theoplayer-ad-display-background,#ffc50f);border-radius:2px;border-radius:var(--theoplayer-ad-display-border-radius,2px);color:#000;color:var(--theoplayer-ad-display-text-color,#000);display:inline-block;padding:5px;padding:var(--theoplayer-ad-display-padding,5px)}</style><span></span>`),rc=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"];class ry extends H(HTMLElement,["player"]){_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this._updateFromPlayer()}get player(){return this._player}set player(e){var t,r;this._player!==e&&(null==(t=this._ads)||t.removeEventListener(rc,this._updateFromPlayer),this._player=e,this._ads=null==e?void 0:e.ads,this._updateFromPlayer(),null==(r=this._ads)||r.addEventListener(rc,this._updateFromPlayer))}constructor(){super(),this._updateFromPlayer=()=>{var e,t,r;let a=null==(e=this._player)?void 0:e.ads,i=(null!=(r=null==a?void 0:null==(t=a.currentAdBreak)?void 0:t.ads)?r:[]).filter(tU);if(void 0===a||!a.playing||0===i.length){w(this._spanEl,""),this.style.display="none";return}if(i.length>1){let e=_(this._player.ads.currentAds||[],tU);if(e){let t=i.indexOf(e);if(t>=0){w(this._spanEl,`Ad ${t+1} of ${i.length}`),this.style.display="";return}}}w(this._spanEl,"Ad"),this.style.display=""};let e=this.attachShadow({mode:"open"});e.appendChild(ru().content.cloneNode(!0)),this._spanEl=e.querySelector("span"),this._upgradeProperty("player")}}customElements.define("theoplayer-ad-display",ry);let rg=o("theoplayer-ad-countdown",`<style>${j}
33
33
  :host{pointer-events:none}</style><span></span>`),rm=["adbreakbegin","adbreakend","adbreakchange","updateadbreak"];class rv extends H(HTMLElement,["player"]){_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this._update()}get player(){return this._player}set player(e){var t,r,a;this._player!==e&&(null==(t=this._player)||t.removeEventListener("timeupdate",this._update),null==(r=this._ads)||r.removeEventListener(rm,this._onAdChange),this._player=e,this._ads=null==e?void 0:e.ads,this._onAdChange(),null==(a=this._ads)||a.addEventListener(rm,this._onAdChange))}constructor(){super(),this._onAdChange=()=>{var e,t,r;(null==(t=this._player)?void 0:null==(e=t.ads)?void 0:e.playing)?(this._player.removeEventListener("timeupdate",this._update),this._player.addEventListener("timeupdate",this._update)):null==(r=this._player)||r.removeEventListener("timeupdate",this._update),this._update()},this._update=()=>{var e,t;let r=null==(e=this._player)?void 0:e.ads,a=null==r?void 0:null==(t=r.currentAdBreak)?void 0:t.maxRemainingDuration;if(void 0===r||!r.playing||void 0===a||a<0){w(this._spanEl,""),this.style.display="none";return}a=Math.ceil(a),w(this._spanEl,`Content will resume in ${a}s`),this.style.display=""};let e=this.attachShadow({mode:"open"});e.appendChild(rg().content.cloneNode(!0)),this._spanEl=e.querySelector("span"),this._upgradeProperty("player")}}customElements.define("theoplayer-ad-countdown",rv);let rb=o("theoplayer-ad-clickthrough-button",N("<slot>Visit Advertiser</slot>")),r_=["adbegin","adend","adloaded","updatead","adskip"];class rf extends H(B,["player"]){static get observedAttributes(){return[...B.observedAttributes,p.CLICKTHROUGH]}connectedCallback(){super.connectedCallback(),this._updateFromPlayer()}get clickThrough(){return this.getAttribute(p.CLICKTHROUGH)}set clickThrough(e){null==e?this.removeAttribute(p.CLICKTHROUGH):this.setAttribute(p.CLICKTHROUGH,e)}get player(){return this._player}set player(e){var t,r;this._player!==e&&(null==(t=this._ads)||t.removeEventListener(r_,this._updateFromPlayer),this._player=e,this._ads=null==e?void 0:e.ads,this._updateFromPlayer(),null==(r=this._ads)||r.addEventListener(r_,this._updateFromPlayer))}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),e===p.CLICKTHROUGH&&r!==t){let e=null!=r,t=r?String(r).trim():"#";this.setLink(t,"_blank"),this.disabled=!e,e?this.style.display="":this.style.display="none"}rf.observedAttributes.indexOf(e)>=0&&i(this)}handleClick(){var e;null==(e=this._player)||e.pause()}constructor(){super({template:rb()}),this._updateFromPlayer=()=>{var e,t;let r=null==(e=this._player)?void 0:e.ads;if(!r||!r.playing){this.clickThrough=null;return}let a=_(null!=(t=r.currentAds)?t:[],tU);if(void 0===a||"google-ima"===a.integration){this.clickThrough=null;return}let i=a.clickThrough;if(!i){this.clickThrough=null;return}this.clickThrough=i},this.disabled=!0,this.style.display="none",this._upgradeProperty("clickThrough"),this._upgradeProperty("player")}}customElements.define("theoplayer-ad-clickthrough-button",rf);let rk=o("theoplayer-ad-skip-button",I(`<span part="countdown">Skip in 0 seconds</span><span part="skip"><span part="skip-text"><slot name="skip-text">Skip Ad</slot></span> <span part="skip-icon"><slot name="skip-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M17.5 18q-.425 0-.712-.288-.288-.287-.288-.712V7q0-.425.288-.713Q17.075 6 17.5 6t.712.287q.288.288.288.713v10q0 .425-.288.712-.287.288-.712.288ZM7.05 16.975q-.5.35-1.025.05-.525-.3-.525-.9v-8.25q0-.6.525-.888.525-.287 1.025.038l6.2 4.15q.45.3.45.825 0 .525-.45.825Z"/></svg>
34
- </slot></span></span>`,":host{background:rgba(0,0,0,.7);background:var(--theoplayer-ad-skip-background,rgba(0,0,0,.7));border:1px solid hsla(0,0%,100%,.5);border:var(--theoplayer-ad-skip-border,1px solid hsla(0,0%,100%,.5));color:#fff;color:var(--theoplayer-ad-skip-color,#fff);display:grid;grid-template-columns:1fr;grid-template-rows:1fr}:host(:hover){background:rgba(0,0,0,.9);background:var(--theoplayer-ad-skip-hover-background,rgba(0,0,0,.9));border:1px solid #fff;border:var(--theoplayer-ad-skip-hover-border,1px solid #fff);color:#fff;color:var(--theoplayer-ad-skip-hover-color,var(--theoplayer-ad-skip-color,#fff))}:host([disabled]){background:transparent;background:var(--theoplayer-ad-skip-countdown-background,transparent);border:1px solid transparent;border:var(--theoplayer-ad-skip-countdown-border,1px solid transparent);color:#fff;color:var(--theoplayer-ad-skip-countdown-color,var(--theoplayer-ad-skip-color,#fff))}[part=countdown],[part=skip]{align-items:center;display:flex;grid-column:1;grid-row:1}[part=skip]{font-size:14px;font-size:var(--theoplayer-ad-skip-font-size,var(--theoplayer-text-font-size,14px));line-height:24px;line-height:var(--theoplayer-ad-skip-line-height,var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px)))}[part=skip-icon]{padding-left:10px;padding-left:var(--theoplayer-control-padding,10px)}[part=skip-icon] ::slotted(svg),[part=skip-icon] svg{height:24px;height:var(--theoplayer-ad-skip-icon-height,var(--theoplayer-control-height,24px));width:24px;width:var(--theoplayer-ad-skip-icon-width,var(--theoplayer-control-height,24px))}")),rE=["adbegin","adend","adloaded","updatead","adskip"];class rw extends H(D,["player"]){static get observedAttributes(){return[...D.observedAttributes]}connectedCallback(){super.connectedCallback(),this._update()}get player(){return this._player}set player(e){var t,r,a;this._player!==e&&(null==(t=this._player)||t.removeEventListener("timeupdate",this._update),null==(r=this._ads)||r.removeEventListener(rE,this._onAdChange),this._player=e,this._ads=null==e?void 0:e.ads,this._onAdChange(),null==(a=this._ads)||a.addEventListener(rE,this._onAdChange))}handleClick(){var e,t;null==(t=this._player)||null==(e=t.ads)||e.skip()}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),rw.observedAttributes.indexOf(e)>=0&&i(this)}constructor(){super({template:rk()}),this._onAdChange=()=>{var e,t,r;(null==(t=this._player)?void 0:null==(e=t.ads)?void 0:e.playing)?(this._player.removeEventListener("timeupdate",this._update),this._player.addEventListener("timeupdate",this._update)):null==(r=this._player)||r.removeEventListener("timeupdate",this._update),this._update()},this._update=()=>{var e,t;let r=null==(e=this._player)?void 0:e.ads;if(!r||!r.playing){this.style.display="none";return}let a=_(null!=(t=r.currentAds)?t:[],tU);if(void 0===a||"google-ima"===a.integration){this.style.display="none";return}let i=a.skipOffset;if(void 0===i||i<0||void 0!==a.duration&&i>=a.duration){this.style.display="none";return}let o=this._player.currentTime;if(o<i){let e=Math.ceil(i-o);w(this._countdownEl,`Skip in ${e}s`),this._countdownEl.style.visibility="visible",this._skipEl.style.visibility="hidden",this._skipEl.style.pointerEvents="none",this.style.display="",this.setAttribute(p.DISABLED,""),this.setAttribute(p.ARIA_LIVE,"off")}else this._countdownEl.style.visibility="hidden",this._skipEl.style.visibility="visible",this._skipEl.style.pointerEvents="",this.style.display="",this.removeAttribute(p.DISABLED),this.setAttribute(p.ARIA_LIVE,"polite")},this._countdownEl=this.shadowRoot.querySelector('[part="countdown"]'),this._skipEl=this.shadowRoot.querySelector('[part="skip"]'),this._upgradeProperty("player")}}customElements.define("theoplayer-ad-skip-button",rw);var rx=((d={}).TopControlBar="top-control-bar",d.BottomControlBar="bottom-control-bar",d.Menu="menu",d);let rA=[],rT=(()=>{if("undefined"!=typeof document){for(let e of[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]])if(e[1]in document)return{requestFullscreen_:e[0],exitFullscreen_:e[1],fullscreenElement_:e[2],fullscreenEnabled_:e[3],fullscreenchange_:e[4],fullscreenerror_:e[5]}}})();function rC(){if("object"!=typeof navigator)return!1;if(navigator.userAgentData)return navigator.userAgentData.mobile;let e=navigator.userAgent;return!!e&&/Android|iPhone|iPad|iPod|Mobile Safari|Windows Phone/i.test(e)}function rL(){if("object"!=typeof navigator)return!1;let e=navigator.userAgent;return!!e&&/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(e)}let rS="theoplayerstreamtypechange",rP="theoplayerready",rR=o("theoplayer-ui",'<style>:host{background:#000;background:var(--theoplayer-background,#000);box-sizing:border-box;container-name:theoplayer-ui-container;container-type:size;display:inline-block;height:0;min-width:300px;padding-bottom:56.25%;position:relative}:host([hidden]){display:none!important}:host([fullscreen]){height:100%!important;padding:0!important;width:100%!important}:host(:-webkit-full-screen){height:100%!important;padding:0!important;width:100%!important}:host(:fullscreen){height:100%!important;padding:0!important;width:100%!important}:host([fluid]){padding-bottom:56.25%;padding-bottom:calc(100%*var(--theoplayer-video-height, 9)/var(--theoplayer-video-width, 16))}[part~=chrome]{position:relative}[part~=layer]{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}[part~=chrome],[part~=layer]:not([part~=media-layer]){display:flex}[part~=chrome],[part~=gesture-layer],[part~=vertical-layer]{pointer-events:none}[part~=chrome] ::slotted(*){pointer-events:auto}[part~=media-layer] video{border-radius:0;border-radius:var(--theoplayer-video-border-radius,0);-o-object-fit:contain;object-fit:contain;-o-object-fit:var(--theoplayer-video-object-fit,contain);object-fit:var(--theoplayer-video-object-fit,contain)}[part~=media-layer] .theoplayer-ad-linear{bottom:0;left:0;position:absolute;right:0;top:0;z-index:10}[part~=media-layer] .theo-ad-remaining-container,[part~=media-layer] .theoplayer-ad-skip,[part~=media-layer] .theoplayer-ad-touch-clickthrough{display:none!important}[part~=chrome],[part~=vertical-layer]{align-items:stretch;flex-flow:column nowrap}[part~=centered]{align-items:center;justify-content:center}[part~=middle]{flex-grow:1}[part~=vertical-layer]:before{background:transparent;background:var(--theoplayer-control-backdrop-background,transparent);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}:host(:not([mobile]):not([tv])) [part~=menu-layer]{bottom:0;bottom:var(--theoplayer-menu-offset-bottom,0);padding:10px;padding:var(--theoplayer-menu-layer-padding,10px);top:0;top:var(--theoplayer-menu-offset-top,0)}[part=menu]{background:rgba(0,0,0,.5);background:var(--theoplayer-menu-backdrop-background,rgba(0,0,0,.5));display:flex;justify-self:stretch}[part=menu] ::slotted(*){align-self:stretch;flex-grow:1;justify-self:stretch}:host(:not([mobile])) [part=menu]{margin:auto 0 0 auto;margin:var(--theoplayer-menu-margin-top,auto) var(--theoplayer-menu-margin-right,0) var(--theoplayer-menu-margin-bottom,0) var(--theoplayer-menu-margin-left,auto);max-height:100%;min-width:200px;min-width:var(--theoplayer-menu-min-width,200px)}:host([mobile]) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([tv]) [part~=menu-layer]{left:auto}:host([tv]) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host(:not([menu-opened])) [part~=menu-layer],:host([menu-opened][mobile]) [part~=vertical-layer],:host([menu-opened][tv]) [part~=vertical-layer]{display:none!important}@container theoplayer-ui-container (max-width: 500px){:host(:not([mobile])) [part~=menu-layer]{bottom:0;left:0;padding:0;right:0;top:0}:host(:not([mobile])) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([menu-opened]) [part~=vertical-layer]{display:none!important}}[part~=error-layer]{align-items:center;background:rgba(0,0,0,.5);background:var(--theoplayer-error-background,rgba(0,0,0,.5));justify-content:center}:host(:not([has-error])) [part~=error-layer],:host([has-error]) [part~=layer]:not([part~=media-layer]):not([part~=error-layer]){display:none!important}[part~=chrome] ::slotted(theoplayer-control-bar){align-self:stretch}theoplayer-gesture-receiver{flex-grow:1}:host(:not([mobile])) [part~=chrome] ::slotted([mobile-only]),:host([mobile]) [part~=chrome] ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [part~=chrome] ::slotted([tv-only]),:host([tv]) [part~=chrome] ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [part~=chrome] ::slotted([live-hidden]),:host([stream-type=vod]) [part~=chrome] ::slotted([live-only]){display:none!important}:host(:not([playing-ad])) [part~=chrome] ::slotted([ad-only]),:host([playing-ad]) [part~=chrome] ::slotted([ad-hidden]){display:none!important}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])){cursor:none}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])) [part~=chrome] ::slotted(:not([no-auto-hide])){opacity:0;transition:opacity 1s}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])) [part~=vertical-layer]:before{opacity:0;transition:opacity 1s}</style><div part="layer media-layer"></div><div part="layer gesture-layer"><theoplayer-gesture-receiver></theoplayer-gesture-receiver></div><div part="layer vertical-layer"><div part="top chrome"><slot name="top-chrome"></slot></div><div part="middle chrome"><slot name="middle-chrome"></slot></div><div part="layer centered-layer centered loading"><slot name="centered-loading"></slot></div><div part="layer centered-layer centered chrome"><slot name="centered-chrome"></slot></div><div part="bottom chrome"><slot></slot></div></div><div part="layer menu-layer"><theoplayer-menu-group part="menu"><slot name="menu"></slot></theoplayer-menu-group></div><div part="layer error-layer"><slot name="error"></slot></div>');class rM extends HTMLElement{static get observedAttributes(){return[p.CONFIGURATION,p.SOURCE,p.MUTED,p.AUTOPLAY,p.FULLSCREEN,p.FLUID,p.DEVICE_TYPE,p.PAUSED,p.ENDED,p.CASTING,p.PLAYING_AD,p.HAS_ERROR,p.HAS_FIRST_PLAY,p.STREAM_TYPE,p.DVR_THRESHOLD,p.USER_IDLE,p.USER_IDLE_TIMEOUT]}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}get player(){return this._player}get configuration(){return this._configuration}set configuration(e){this.removeAttribute(p.CONFIGURATION),this._setConfiguration(e)}_setConfiguration(e){this._configuration=null!=e?e:{},this.tryInitializePlayer_()}get source(){return this._player?this._player.source:this._source}set source(e){this.removeAttribute(p.SOURCE),this._setSource(e)}_setSource(e){this._player?this._player.source=e:this._source=e}get fluid(){return this.hasAttribute(p.FLUID)}set fluid(e){x(this,p.FLUID,e)}get muted(){return this.hasAttribute(p.MUTED)}set muted(e){x(this,p.MUTED,e)}get autoplay(){return this.hasAttribute(p.AUTOPLAY)}set autoplay(e){x(this,p.AUTOPLAY,e)}get fullscreen(){return this.hasAttribute(p.FULLSCREEN)}get paused(){return this.hasAttribute(p.PAUSED)}get ended(){return this.hasAttribute(p.ENDED)}get casting(){return this.hasAttribute(p.CASTING)}get userIdleTimeout(){var e;let t="tv"===this.deviceType?5:2;return Number(null!=(e=this.getAttribute(p.USER_IDLE_TIMEOUT))?e:t)}set userIdleTimeout(e){e=Number(e),this.setAttribute(p.USER_IDLE_TIMEOUT,String(isNaN(e)?0:e))}get deviceType(){return this.getAttribute(p.DEVICE_TYPE)||"desktop"}get streamType(){return this.getAttribute(p.STREAM_TYPE)||"vod"}set streamType(e){this.setAttribute(p.STREAM_TYPE,e)}get dvrThreshold(){var e;return Number(null!=(e=this.getAttribute(p.DVR_THRESHOLD))?e:60)}set dvrThreshold(e){e=Number(e),this.setAttribute(p.DVR_THRESHOLD,String(isNaN(e)?0:e))}connectedCallback(){var e;if(a(this),this._menuGroup instanceof eC||customElements.upgrade(this._menuGroup),!this.hasAttribute(p.DEVICE_TYPE)){let e=rC()?"mobile":rL()?"tv":"desktop";this.setAttribute(p.DEVICE_TYPE,e)}for(let e of(this.hasAttribute(p.PAUSED)||this.setAttribute(p.PAUSED,""),this.tryInitializePlayer_(),this._stateReceivers))this.propagateStateToReceiver_(e);V(this,this._playerEl,this.registerStateReceiver_),this._mutationObserver.observe(this,{childList:!0,subtree:!0}),this.shadowRoot.addEventListener("slotchange",this._onSlotChange),null==(e=this._resizeObserver)||e.observe(this),this._updateTextTrackMargins(),this._menuGroup.addEventListener(e_,this._onCloseMenu),this._menuGroup.addEventListener(ef,this._onMenuChange),void 0!==rT&&(document.addEventListener(rT.fullscreenchange_,this._onFullscreenChange),document.addEventListener(rT.fullscreenerror_,this._onFullscreenChange),this._onFullscreenChange()),this.setUserIdle_(),"tv"===this.deviceType&&window.addEventListener("keydown",this._onTvKeyDown),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointermove",this._onPointerMove),this.addEventListener("mouseleave",this._onMouseLeave)}tryInitializePlayer_(){void 0===this._player&&(void 0!==this._configuration.license||void 0!==this._configuration.licenseUrl)&&(this._player=new t.ChromelessPlayer(this._playerEl,this._configuration),this._source&&(this._player.source=this._source,this._source=void 0),this._player.muted=this.muted,this._player.autoplay=this.autoplay,this._updateAspectRatio(),this._updateError(),this._updatePausedAndEnded(),this._updateCasting(),this.addPlayerListeners_(this._player),this.propagatePlayerToAllReceivers_(),this.dispatchEvent(ed(rP)))}disconnectedCallback(){var e;null==(e=this._resizeObserver)||e.disconnect(),this._mutationObserver.disconnect(),this.shadowRoot.removeEventListener("slotchange",this._onSlotChange),this._menuGroup.removeEventListener(e_,this._onCloseMenu),this._menuGroup.removeEventListener(ef,this._onMenuChange),void 0!==rT&&(document.removeEventListener(rT.fullscreenchange_,this._onFullscreenChange),document.removeEventListener(rT.fullscreenerror_,this._onFullscreenChange)),window.removeEventListener("keydown",this._onTvKeyDown),this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("pointerup",this._onPointerUp),this.removeEventListener("click",this._onClickAfterPointerUp,!0),this.removeEventListener("pointermove",this._onPointerMove),this.removeEventListener("mouseleave",this._onMouseLeave),this._player&&(this.removePlayerListeners_(this._player),this._player.destroy(),this._player=void 0,this.propagatePlayerToAllReceivers_()),this._stateReceivers.length=0}attributeChangedCallback(e,t,r){if(r===t)return;let a=null!=r;if(e===p.CONFIGURATION)this._setConfiguration(r?JSON.parse(r):{});else if(e===p.SOURCE)this._setSource(r?JSON.parse(r):void 0);else if(e===p.MUTED)this._player&&(this._player.muted=a);else if(e===p.AUTOPLAY)this._player&&(this._player.autoplay=a);else if(e===p.FULLSCREEN)for(let e of this._stateReceivers)e[F].indexOf("fullscreen")>=0&&(e.fullscreen=a);else if(e===p.DEVICE_TYPE)for(let e of(x(this,p.MOBILE,"mobile"===r),x(this,p.TV,"tv"===r),window.removeEventListener("keydown",this._onTvKeyDown),"tv"===r&&window.addEventListener("keydown",this._onTvKeyDown),this._stateReceivers))e[F].indexOf("deviceType")>=0&&(e.deviceType=r);else if(e===p.STREAM_TYPE){for(let e of this._stateReceivers)e[F].indexOf("streamType")>=0&&(e.streamType=r);let e=ed(rS,{bubbles:!0,composed:!0,detail:{streamType:r}});this.dispatchEvent(e)}else e===p.FLUID?this._updateAspectRatio():e===p.USER_IDLE||e===p.PAUSED||e===p.CASTING?this._updateTextTrackMargins():e===p.DVR_THRESHOLD&&this._updateStreamType();rM.observedAttributes.indexOf(e)>=0&&i(this)}propagateStateToReceiver_(e){let t=e[F];if(t.indexOf("player")>=0&&(e.player=this._player),t.indexOf("fullscreen")>=0&&(e.fullscreen=this.fullscreen),t.indexOf("deviceType")>=0&&(e.deviceType=this.deviceType),t.indexOf("streamType")>=0&&(e.streamType=this.streamType),void 0!==this._player){if(t.indexOf("playbackRate")>=0&&(e.playbackRate=this._player.playbackRate),t.indexOf("error")>=0&&(e.error=this._player.errorObject),t.indexOf("activeVideoQuality")>=0){var r;e.activeVideoQuality=null==(r=this._activeVideoTrack)?void 0:r.activeQuality}t.indexOf("targetVideoQualities")>=0&&(e.targetVideoQualities=eV(this._activeVideoTrack))}t.indexOf("previewTime")>=0&&(e.previewTime=this._previewTime)}propagatePlayerToAllReceivers_(){for(let e of this._stateReceivers)e[F].indexOf("player")>=0&&(e.player=this._player)}removeStateFromReceiver_(e){e[F].indexOf("player")>=0&&(e.player=void 0)}openMenu_(e,t){let r=ec.fromRect(this._topChromeEl.getBoundingClientRect()),a=ec.fromRect(this._bottomChromeEl.getBoundingClientRect()),o=!0,n=!0;if(void 0!==t){let e=ec.fromRect(this.getBoundingClientRect()),r=ec.fromRect(t.getBoundingClientRect());e.width>0&&e.height>0&&(o=r.top>=e.top+e.height/2,n=r.left>=e.left+e.width/2)}this._menuGroup.openMenu(e,t),this._menuOpener=t,i(this,{"--theoplayer-menu-offset-top":`${Math.round(r.height)}px`,"--theoplayer-menu-offset-bottom":`${Math.round(a.height)}px`,"--theoplayer-menu-margin-top":o?"auto":"0","--theoplayer-menu-margin-bottom":o?"0":"auto","--theoplayer-menu-margin-left":n?"auto":"0","--theoplayer-menu-margin-right":n?"0":"auto"})}closeMenu_(){var e;null==this._menuGroup.closeMenu||this._menuGroup.closeMenu.call(this._menuGroup),null==(e=this._menuOpener)||e.focus(),this._menuOpener=void 0}isUserIdle_(){return this.hasAttribute(p.USER_IDLE)&&!this.paused&&!this.casting&&!this._menuGroup.hasCurrentMenu()}setUserActive_(){clearTimeout(this._userIdleTimer),this.removeAttribute(p.USER_IDLE)}isPlayerOrMedia_(e){return e===this||this._playerEl.contains(e)}addPlayerListeners_(e){var t,r,a;e.addEventListener("destroy",this._onDestroy),e.addEventListener("resize",this._updateAspectRatio),e.addEventListener(["error","sourcechange","emptied"],this._updateError),e.addEventListener("volumechange",this._updateMuted),e.addEventListener("play",this._onPlay),e.addEventListener("pause",this._onPause),e.addEventListener(["ended","emptied"],this._updatePausedAndEnded),e.addEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),e.addEventListener("ratechange",this._updatePlaybackRate),e.addEventListener("sourcechange",this._onSourceChange),e.addEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd),null==(t=e.theoLive)||t.addEventListener("publicationloadstart",this._onSourceChange),e.videoTracks.addEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=e.cast)||r.addEventListener("castingchange",this._updateCasting),null==(a=e.ads)||a.addEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}removePlayerListeners_(e){e.removeEventListener("destroy",this._onDestroy),e.removeEventListener("resize",this._updateAspectRatio),e.removeEventListener(["error","sourcechange","emptied"],this._updateError),e.removeEventListener("volumechange",this._updateMuted),e.removeEventListener("play",this._onPlay),e.removeEventListener("pause",this._onPause),e.removeEventListener(["ended","emptied"],this._updatePausedAndEnded),e.removeEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),e.removeEventListener("ratechange",this._updatePlaybackRate),e.removeEventListener("sourcechange",this._onSourceChange),e.removeEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd);try{var t,r,a;null==(t=e.theoLive)||t.removeEventListener("publicationloadstart",this._onSourceChange),e.videoTracks.removeEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=e.cast)||r.removeEventListener("castingchange",this._updateCasting),null==(a=e.ads)||a.removeEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}catch{}}constructor(e={}){super(),this._configuration={},this._pointerType="",this._lastPointerUpTime=0,this._stateReceivers=[],this._player=void 0,this._source=void 0,this._userIdleTimer=0,this._previewTime=NaN,this._activeVideoTrack=void 0,this._onMutation=e=>{for(let t of e)if("childList"===t.type){let{addedNodes:e,removedNodes:r}=t;for(let t=0;t<e.length;t++){let r=e[t];g(r)&&V(r,this._playerEl,this.registerStateReceiver_)}for(let e=0;e<r.length;e++){let t=r[e];g(t)&&V(t,this._playerEl,this.unregisterStateReceiver_)}}},this._onSlotChange=()=>{V(this,this._playerEl,this.registerStateReceiver_),this._updateTextTrackMargins()},this.registerStateReceiver_=e=>{!(this._stateReceivers.indexOf(e)>=0)&&(this._stateReceivers.push(e),this.propagateStateToReceiver_(e))},this.unregisterStateReceiver_=e=>{(function(e,t){let r=e.indexOf(t);return!(r<0)&&(function(e,t){e.splice(t,1)}(e,r),!0)})(this._stateReceivers,e)&&this.removeStateFromReceiver_(e)},this._onToggleMenu=e=>{e.stopPropagation();let t=e.detail.menu;if(!this._menuGroup.getMenuById(t)){console.error(`<theoplayer-ui>: cannot find menu with ID "${t}"`);return}let r=m(e.target)?e.target:void 0;this._menuGroup.isMenuOpen(t)?this.closeMenu_():(this.closeMenu_(),this.openMenu_(t,r))},this._onCloseMenu=e=>{e.stopPropagation(),this.closeMenu_()},this._onMenuChange=()=>{this._menuEl.removeEventListener("pointerdown",this._onMenuPointerDown),this._menuEl.removeEventListener("click",this._onMenuClick),this._menuGroup.hasCurrentMenu()?(this._menuEl.addEventListener("pointerdown",this._onMenuPointerDown),this._menuEl.addEventListener("click",this._onMenuClick),this.setAttribute(p.MENU_OPENED,"")):this.removeAttribute(p.MENU_OPENED)},this._onMenuPointerDown=e=>{this._pointerType=e.pointerType},this._onMenuClick=e=>{var t;let r=null!=(t=e.pointerType)?t:this._pointerType;e.target===this._menuEl&&"mouse"===r&&this._menuGroup.closeCurrentMenu()&&e.preventDefault()},this._onEnterFullscreen=e=>{if(e.stopPropagation(),rT&&document[rT.fullscreenEnabled_]&&this[rT.requestFullscreen_]){let e=this[rT.requestFullscreen_]();e&&e.then&&e.then(y,y)}else this._player&&this._player.presentation.supportsMode("fullscreen")&&this._player.presentation.requestMode("fullscreen")},this._onExitFullscreen=e=>{if(e.stopPropagation(),rT){let e=document[rT.exitFullscreen_]();e&&e.then&&e.then(y,y)}this._player&&"fullscreen"===this._player.presentation.currentMode&&this._player.presentation.requestMode("inline")},this._onFullscreenChange=()=>{let e=!1;if(void 0!==rT){let t=document[rT.fullscreenElement_];t&&(e=function e(t,r){if(!t||!r)return!1;if(t.contains(r))return!0;let a=r.getRootNode();return!!a.host&&e(t,a.host)}(t,this))}e||void 0===this._player||"fullscreen"!==this._player.presentation.currentMode||(e=!0),x(this,p.FULLSCREEN,e)},this._updateAspectRatio=()=>{if(void 0===this._player)return;let{videoWidth:e,videoHeight:t}=this._player;e>0&&t>0?i(this,{"--theoplayer-video-width":`${e}`,"--theoplayer-video-height":`${t}`}):i(this,{"--theoplayer-video-width":"","--theoplayer-video-height":""})},this._updateError=()=>{var e;let t=null==(e=this._player)?void 0:e.errorObject;for(let e of(x(this,p.HAS_ERROR,void 0!==t),this._stateReceivers))e[F].indexOf("error")>=0&&(e.error=t)},this._onPlay=()=>{this.setAttribute(p.HAS_FIRST_PLAY,""),this.removeAttribute(p.PAUSED),this._updateEnded()},this._onPause=()=>{this.setAttribute(p.PAUSED,""),this._updateEnded()},this._updatePausedAndEnded=()=>{let e=!this._player||this._player.paused;x(this,p.PAUSED,e),this._updateEnded()},this._updateEnded=()=>{let e=!!this._player&&this._player.ended;x(this,p.ENDED,e)},this._updateStreamType=()=>{let e;if(void 0===this._player)return;let t=this._player.duration;if(!isNaN(t)){if(t===1/0){e="live";let t=this.dvrThreshold,r=this._player.seekable;(t<=0||r.length>0&&r.end(r.length-1)-r.start(0)>=t)&&(e="dvr")}else e="vod";this.streamType=e}},this._updatePlaybackRate=()=>{if(void 0===this._player)return;let e=this._player.playbackRate;for(let t of this._stateReceivers)t[F].indexOf("playbackRate")>=0&&(t.playbackRate=e)},this._updateMuted=()=>{void 0!==this._player&&(this.muted=this._player.muted)},this._updateActiveVideoTrack=()=>{if(void 0===this._player)return;let e=_(this._player.videoTracks,e=>e.enabled);if(this._activeVideoTrack!==e){var t,r,a,i;null==(t=this._activeVideoTrack)||t.removeEventListener("activequalitychanged",this._updateActiveVideoQuality),null==(r=this._activeVideoTrack)||r.removeEventListener("targetqualitychanged",this._updateTargetVideoQualities),this._activeVideoTrack=e,this._updateActiveVideoQuality(),this._updateTargetVideoQualities(),null==(a=this._activeVideoTrack)||a.addEventListener("activequalitychanged",this._updateActiveVideoQuality),null==(i=this._activeVideoTrack)||i.addEventListener("targetqualitychanged",this._updateTargetVideoQualities)}},this._updateActiveVideoQuality=()=>{var e;let t=null==(e=this._activeVideoTrack)?void 0:e.activeQuality;for(let e of this._stateReceivers)e[F].indexOf("activeVideoQuality")>=0&&(e.activeVideoQuality=t)},this._updateTargetVideoQualities=()=>{let e=eV(this._activeVideoTrack);for(let t of this._stateReceivers)t[F].indexOf("targetVideoQualities")>=0&&(t.targetVideoQualities=e)},this._updateCasting=()=>{var e,t,r;let a=null!=(r=null==(t=this._player)?void 0:null==(e=t.cast)?void 0:e.casting)&&r;x(this,p.CASTING,a)},this._updatePlayingAd=()=>{var e,t,r;let a=null!=(r=null==(t=this._player)?void 0:null==(e=t.ads)?void 0:e.playing)&&r;x(this,p.PLAYING_AD,a)},this._onSourceChange=()=>{this.closeMenu_();let e=void 0!==this._player&&!this._player.paused;x(this,p.HAS_FIRST_PLAY,e)},this.setUserIdle_=()=>{if(clearTimeout(this._userIdleTimer),this._userIdleTimer=0,!(this.userIdleTimeout<0)&&(this.setAttribute(p.USER_IDLE,""),"tv"==this.deviceType&&this.isUserIdle_())){let e=ey();null!==e&&e.blur()}},this.scheduleUserIdle_=()=>{if(this.setUserActive_(),clearTimeout(this._userIdleTimer),this.userIdleTimeout<0){this._userIdleTimer=0;return}this._userIdleTimer=setTimeout(this.setUserIdle_,1e3*this.userIdleTimeout)},this._onTvKeyDown=e=>{if(R(e.keyCode)){this.setUserIdle_();return}let t=function e(t){if(!m(t)||"none"===getComputedStyle(t).display)return;if(null!==t.getAttribute(p.TV_FOCUS))return C(t);let r=A(t);for(let t=0;t<r.length;t++){let a=e(r[t]);if(a)return a}}(this),r=C(this),a=ey();if(!a){let e=null!=t?t:r;e.length>0&&(e[0].focus(),a=e[0])}!this.isUserIdle_()&&(e.keyCode===S.ENTER?null!==a&&(e.preventDefault(),a.click()):P(e.keyCode)&&eg(this,r,e.keyCode)&&(e.preventDefault(),e.stopPropagation()))},this._onKeyUp=e=>{R(e.keyCode)||this.scheduleUserIdle_()},this._onPointerUp=e=>{"touch"===e.pointerType&&(this.isPlayerOrMedia_(e.target)&&!this.hasAttribute(p.USER_IDLE)?this.setUserIdle_():(this.isUserIdle_()&&(this._lastPointerUpTime=performance.now(),this.addEventListener("click",this._onClickAfterPointerUp,!0)),this.scheduleUserIdle_()))},this._onClickAfterPointerUp=e=>{this.removeEventListener("click",this._onClickAfterPointerUp,!0),performance.now()-this._lastPointerUpTime<10&&(e.preventDefault(),e.stopPropagation())},this._onPointerMove=e=>{"mouse"===e.pointerType&&(this.setUserActive_(),this.isPlayerOrMedia_(e.target)&&this.scheduleUserIdle_())},this._onMouseLeave=()=>{this.setUserIdle_()},this._onChromeSlotTransition=e=>{"opacity"===e.propertyName&&this._updateTextTrackMargins()},this._updateTextTrackMargins=()=>{let e=this._player;if(void 0===e)return;let t=rI(this._topChromeSlot),r=rI(this._bottomChromeSlot);e.textTrackStyle.marginTop=null==t?void 0:t.height,e.textTrackStyle.marginBottom=null==r?void 0:r.height},this._onPreviewTimeChange=e=>{for(let t of(this._previewTime=e.detail.previewTime,this._stateReceivers))t[F].indexOf("previewTime")>=0&&(t.previewTime=this._previewTime)},this._onDestroy=()=>{this._player&&(this.removePlayerListeners_(this._player),this._player=void 0,this.propagatePlayerToAllReceivers_())};let t=this.attachShadow({mode:"open",delegatesFocus:!0});t.appendChild(rR().content.cloneNode(!0)),this._configuration=e,this._playerEl=t.querySelector('[part~="media-layer"]'),this._menuEl=t.querySelector('[part~="menu-layer"]'),this._menuGroup=t.querySelector("theoplayer-menu-group"),this._topChromeEl=t.querySelector('[part~="top"]'),this._topChromeSlot=t.querySelector('slot[name="top-chrome"]'),this._bottomChromeEl=t.querySelector('[part~="bottom"]'),this._bottomChromeSlot=t.querySelector("slot:not([name])"),this._mutationObserver=new MutationObserver(this._onMutation),"undefined"!=typeof ResizeObserver&&(this._resizeObserver=new ResizeObserver(this._updateTextTrackMargins)),t.addEventListener(ex,this._onToggleMenu),t.addEventListener(tM,this._onEnterFullscreen),t.addEventListener(tI,this._onExitFullscreen),t.addEventListener(tF,this._onPreviewTimeChange),this._topChromeSlot.addEventListener("transitionstart",this._onChromeSlotTransition),this._topChromeSlot.addEventListener("transitionend",this._onChromeSlotTransition),this._bottomChromeSlot.addEventListener("transitionstart",this._onChromeSlotTransition),this._bottomChromeSlot.addEventListener("transitionend",this._onChromeSlotTransition),this._upgradeProperty("configuration"),this._upgradeProperty("source"),this._upgradeProperty("fluid"),this._upgradeProperty("muted"),this._upgradeProperty("autoplay"),this._upgradeProperty("userIdleTimeout"),this._upgradeProperty("streamType"),this.tryInitializePlayer_()}}function rI(e){let t;for(let r of T(e).filter(m))if("0"!==getComputedStyle(r).opacity){let e=ec.fromRect(r.getBoundingClientRect());e.width>0&&e.height>0&&(t=t?t.union(e):e)}return t}rM.READY_EVENT=rP,customElements.define("theoplayer-ui",rM);let rO=o("theoplayer-default-ui",'<style>:host{box-sizing:border-box;display:inline-block;position:relative}:host([hidden]){display:none!important}theoplayer-ui{display:block;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}[part=title]{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);text-shadow:0 0 4px rgba(0,0,0,.75);-webkit-user-select:none;-moz-user-select:none;user-select:none}:host(:not([has-title])) [part=title]{display:none}[part=centered-chrome] *{--theoplayer-control-height:var(--theoplayer-centered-chrome-control-height,48px)}[part=middle-chrome]{flex-grow:1;justify-content:flex-end}[part=bottom-chrome],[part=middle-chrome]{display:flex;flex-flow:column nowrap;pointer-events:none;position:relative}[part=bottom-chrome]{align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:var(--theoplayer-mobile-control-backdrop-background,rgba(0,0,0,.5))}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{flex-grow:1}theoplayer-time-range{--theoplayer-control-height:var(--theoplayer-time-range-control-height,12px);--theoplayer-range-track-pointer-background:var(--theoplayer-time-range-track-pointer-background,hsla(0,0%,100%,.5))}[part=ad-chrome]{--theoplayer-control-height:var(--theoplayer-ad-chrome-control-height,12px);align-items:flex-end;pointer-events:none}theoplayer-ad-display,theoplayer-ad-skip-button{flex-shrink:0}theoplayer-ad-countdown,theoplayer-ad-skip-button[disabled]{text-shadow:0 0 4px rgba(0,0,0,.75)}theoplayer-ad-countdown{min-width:0}theoplayer-ad-skip-button{--theoplayer-ad-skip-font-size:calc(var(--theoplayer-text-font-size, 14px)*1.25);--theoplayer-ad-skip-line-height:calc(var(--theoplayer-text-content-height, var(--theoplayer-control-height, 24px))*1.25);--theoplayer-ad-skip-icon-width:24px;--theoplayer-ad-skip-icon-height:24px;align-items:end;border-right:0!important;justify-items:end}:host(:not([mobile])) [mobile-only],:host(:not([mobile])) theoplayer-control-bar ::slotted([mobile-only]),:host([mobile]) [mobile-hidden],:host([mobile]) theoplayer-control-bar ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [tv-only],:host(:not([tv])) theoplayer-control-bar ::slotted([tv-only]),:host([tv]) [tv-hidden],:host([tv]) theoplayer-control-bar ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui:not([playing-ad]) theoplayer-control-bar ::slotted([ad-only]),theoplayer-ui[playing-ad] [ad-hidden],theoplayer-ui[playing-ad] theoplayer-control-bar ::slotted([ad-hidden]){display:none!important}theoplayer-ui:not([has-first-play]) [part=centered-chrome] :not(theoplayer-play-button),theoplayer-ui:not([has-first-play]) theoplayer-control-bar{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part=centered-chrome] theoplayer-play-button{display:none!important}theoplayer-ui:not([mobile]):not([casting]) theoplayer-ad-clickthrough-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:var(--theoplayer-volume-range-track-width,70px);overflow:hidden;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display:not([stream-type=vod]){padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}theoplayer-ui[playing-ad] .theoplayer-ad-control{--theoplayer-control-height:var(--theoplayer-ad-control-height,16px)}</style><theoplayer-ui><theoplayer-control-bar slot="top-chrome" part="top-chrome"><div part="title" ad-hidden><slot name="title"></slot></div><span class="theoplayer-spacer"></span><theoplayer-language-menu-button menu="language-menu" mobile-only ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button mobile-only ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button mobile-only ad-hidden></theoplayer-chromecast-button><slot name="top-control-bar"></slot><theoplayer-settings-menu-button menu="settings-menu" mobile-only ad-hidden></theoplayer-settings-menu-button><theoplayer-ad-clickthrough-button ad-only></theoplayer-ad-clickthrough-button></theoplayer-control-bar><theoplayer-loading-indicator slot="centered-loading" no-auto-hide></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><theoplayer-seek-button seek-offset="-10" mobile-only ad-hidden></theoplayer-seek-button><theoplayer-play-button></theoplayer-play-button><theoplayer-seek-button seek-offset="10" mobile-only ad-hidden></theoplayer-seek-button></div><div slot="middle-chrome" part="middle-chrome"><theoplayer-chromecast-display></theoplayer-chromecast-display></div><div part="bottom-chrome"><theoplayer-control-bar part="ad-chrome" ad-only><theoplayer-ad-display></theoplayer-ad-display><theoplayer-ad-countdown></theoplayer-ad-countdown><span class="theoplayer-spacer"></span><theoplayer-ad-skip-button></theoplayer-ad-skip-button></theoplayer-control-bar><theoplayer-control-bar><theoplayer-play-button mobile-hidden ad-only class="theoplayer-ad-control"></theoplayer-play-button><theoplayer-mute-button ad-only class="theoplayer-ad-control"></theoplayer-mute-button><theoplayer-time-range show-ad-markers tv-focus class="theoplayer-ad-control"></theoplayer-time-range><theoplayer-chromecast-button tv-hidden ad-only class="theoplayer-ad-control"></theoplayer-chromecast-button><theoplayer-fullscreen-button ad-only class="theoplayer-ad-control"></theoplayer-fullscreen-button></theoplayer-control-bar><theoplayer-control-bar ad-hidden><theoplayer-play-button mobile-hidden></theoplayer-play-button><theoplayer-mute-button tv-hidden></theoplayer-mute-button><theoplayer-volume-range mobile-hidden tv-hidden></theoplayer-volume-range><theoplayer-live-button live-only ad-hidden></theoplayer-live-button><theoplayer-time-display show-duration remaining-when-live></theoplayer-time-display><span class="theoplayer-spacer" style="pointer-events: auto"></span><theoplayer-language-menu-button menu="language-menu" mobile-hidden ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button tv-hidden mobile-hidden ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button tv-hidden mobile-hidden ad-hidden></theoplayer-chromecast-button><slot name="bottom-control-bar"></slot><theoplayer-settings-menu-button menu="settings-menu" mobile-hidden ad-hidden></theoplayer-settings-menu-button><theoplayer-fullscreen-button tv-hidden></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-language-menu id="language-menu" slot="menu" hidden></theoplayer-language-menu><theoplayer-settings-menu id="settings-menu" slot="menu" hidden></theoplayer-settings-menu><slot name="error" slot="error"><theoplayer-error-display></theoplayer-error-display></slot><slot name="menu" slot="menu"></slot></theoplayer-ui>');class rD extends HTMLElement{static get observedAttributes(){return[p.CONFIGURATION,p.SOURCE,p.MUTED,p.AUTOPLAY,p.FLUID,p.DEVICE_TYPE,p.STREAM_TYPE,p.USER_IDLE_TIMEOUT,p.DVR_THRESHOLD,p.HAS_TITLE]}initShadowRoot(){let e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(rO().content.cloneNode(!0)),e}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}get player(){return this._ui.player}get configuration(){return this._ui.configuration}set configuration(e){this.removeAttribute(p.CONFIGURATION),this.setConfiguration_(e)}setConfiguration_(e){var t;this._ui.configuration={...e,ads:{...null!=(t=e.ads)?t:{},showCountdown:!1}}}get source(){return this._ui.source}set source(e){this.removeAttribute(p.SOURCE),this._ui.source=e}get fluid(){return this._ui.fluid}set fluid(e){this._ui.fluid=e}get muted(){return this._ui.muted}set muted(e){this._ui.muted=e}get autoplay(){return this._ui.autoplay}set autoplay(e){this._ui.autoplay=e}get streamType(){return this._ui.streamType}set streamType(e){this._ui.streamType=e}get userIdleTimeout(){return this._ui.userIdleTimeout}set userIdleTimeout(e){this._ui.userIdleTimeout=e}get dvrThreshold(){return this._ui.dvrThreshold}set dvrThreshold(e){this._ui.dvrThreshold=e}connectedCallback(){if(a(this),!this.hasAttribute(p.DEVICE_TYPE)){let e=rC()?"mobile":rL()?"tv":"desktop";this.setAttribute(p.DEVICE_TYPE,e)}this._appliedExtensions||(this._appliedExtensions=!0,function(e){for(let t of rA)t(e)}(this),i(this)),this._onTitleSlotChange()}disconnectedCallback(){}attributeChangedCallback(e,t,r){if(r===t)return;let a=null!=r;e===p.SOURCE?this._ui.source=r?JSON.parse(r):void 0:e===p.CONFIGURATION?this.setConfiguration_(r?JSON.parse(r):{}):e===p.MUTED?this.muted=a:e===p.AUTOPLAY?this.autoplay=a:e===p.FLUID?this.fluid=a:e===p.DEVICE_TYPE?(x(this,p.MOBILE,"mobile"===r),x(this,p.TV,"tv"===r),this._ui.setAttribute(p.DEVICE_TYPE,r)):e===p.STREAM_TYPE?this.streamType=r:e===p.USER_IDLE_TIMEOUT?this.userIdleTimeout=Number(r):e===p.DVR_THRESHOLD&&(this.dvrThreshold=Number(r)),rD.observedAttributes.indexOf(e)>=0&&i(this)}constructor(e={}){var t,r,a;super(),this._appliedExtensions=!1,this._updateStreamType=()=>{this.setAttribute(p.STREAM_TYPE,this.streamType),this._timeRange&&x(this._timeRange,p.HIDDEN,"live"===this.streamType)},this._dispatchReadyEvent=()=>{this.dispatchEvent(ed(rP))},this._onTitleSlotChange=()=>{this._titleSlot&&x(this,p.HAS_TITLE,this._titleSlot.assignedNodes().length>0)},this._shadowRoot=this.initShadowRoot(),this._ui=this._shadowRoot.querySelector("theoplayer-ui"),this._ui.addEventListener(rP,this._dispatchReadyEvent),this._ui.addEventListener(rS,this._updateStreamType),this.setConfiguration_(e),this._titleSlot=null!=(r=this._shadowRoot.querySelector('slot[name="title"]'))?r:void 0,null==(t=this._titleSlot)||t.addEventListener("slotchange",this._onTitleSlotChange),this._timeRange=null!=(a=this._shadowRoot.querySelector("theoplayer-time-range"))?a:void 0,this._upgradeProperty("configuration"),this._upgradeProperty("source"),this._upgradeProperty("fluid"),this._upgradeProperty("muted"),this._upgradeProperty("autoplay"),this._upgradeProperty("streamType"),this._upgradeProperty("userIdleTimeout"),this._upgradeProperty("dvrThreshold")}}rD.READY_EVENT=rP,customElements.define("theoplayer-default-ui",rD);let rN=o("theolive-bad-network-button",I(`<span part="icon">${tS}<span part="warning-icon"><svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48">
34
+ </slot></span></span>`,":host{background:rgba(0,0,0,.7);background:var(--theoplayer-ad-skip-background,rgba(0,0,0,.7));border:1px solid hsla(0,0%,100%,.5);border:var(--theoplayer-ad-skip-border,1px solid hsla(0,0%,100%,.5));color:#fff;color:var(--theoplayer-ad-skip-color,#fff);display:grid;grid-template-columns:1fr;grid-template-rows:1fr}:host(:hover){background:rgba(0,0,0,.9);background:var(--theoplayer-ad-skip-hover-background,rgba(0,0,0,.9));border:1px solid #fff;border:var(--theoplayer-ad-skip-hover-border,1px solid #fff);color:#fff;color:var(--theoplayer-ad-skip-hover-color,var(--theoplayer-ad-skip-color,#fff))}:host([disabled]){background:transparent;background:var(--theoplayer-ad-skip-countdown-background,transparent);border:1px solid transparent;border:var(--theoplayer-ad-skip-countdown-border,1px solid transparent);color:#fff;color:var(--theoplayer-ad-skip-countdown-color,var(--theoplayer-ad-skip-color,#fff))}[part=countdown],[part=skip]{align-items:center;display:flex;grid-column:1;grid-row:1}[part=skip]{font-size:14px;font-size:var(--theoplayer-ad-skip-font-size,var(--theoplayer-text-font-size,14px));line-height:24px;line-height:var(--theoplayer-ad-skip-line-height,var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px)))}[part=skip-icon]{padding-left:10px;padding-left:var(--theoplayer-control-padding,10px)}[part=skip-icon] ::slotted(svg),[part=skip-icon] svg{height:24px;height:var(--theoplayer-ad-skip-icon-height,var(--theoplayer-control-height,24px));width:24px;width:var(--theoplayer-ad-skip-icon-width,var(--theoplayer-control-height,24px))}")),rE=["adbegin","adend","adloaded","updatead","adskip"];class rw extends H(D,["player"]){static get observedAttributes(){return[...D.observedAttributes]}connectedCallback(){super.connectedCallback(),this._update()}get player(){return this._player}set player(e){var t,r,a;this._player!==e&&(null==(t=this._player)||t.removeEventListener("timeupdate",this._update),null==(r=this._ads)||r.removeEventListener(rE,this._onAdChange),this._player=e,this._ads=null==e?void 0:e.ads,this._onAdChange(),null==(a=this._ads)||a.addEventListener(rE,this._onAdChange))}handleClick(){var e,t;null==(t=this._player)||null==(e=t.ads)||e.skip()}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),rw.observedAttributes.indexOf(e)>=0&&i(this)}constructor(){super({template:rk()}),this._onAdChange=()=>{var e,t,r;(null==(t=this._player)?void 0:null==(e=t.ads)?void 0:e.playing)?(this._player.removeEventListener("timeupdate",this._update),this._player.addEventListener("timeupdate",this._update)):null==(r=this._player)||r.removeEventListener("timeupdate",this._update),this._update()},this._update=()=>{var e,t;let r=null==(e=this._player)?void 0:e.ads;if(!r||!r.playing){this.style.display="none";return}let a=_(null!=(t=r.currentAds)?t:[],tU);if(void 0===a||"google-ima"===a.integration){this.style.display="none";return}let i=a.skipOffset;if(void 0===i||i<0||void 0!==a.duration&&i>=a.duration){this.style.display="none";return}let o=this._player.currentTime;if(o<i){let e=Math.ceil(i-o);w(this._countdownEl,`Skip in ${e}s`),this._countdownEl.style.visibility="visible",this._skipEl.style.visibility="hidden",this._skipEl.style.pointerEvents="none",this.style.display="",this.setAttribute(p.DISABLED,""),this.setAttribute(p.ARIA_LIVE,"off")}else this._countdownEl.style.visibility="hidden",this._skipEl.style.visibility="visible",this._skipEl.style.pointerEvents="",this.style.display="",this.removeAttribute(p.DISABLED),this.setAttribute(p.ARIA_LIVE,"polite")},this._countdownEl=this.shadowRoot.querySelector('[part="countdown"]'),this._skipEl=this.shadowRoot.querySelector('[part="skip"]'),this._upgradeProperty("player")}}customElements.define("theoplayer-ad-skip-button",rw);var rx=((d={}).TopControlBar="top-control-bar",d.BottomControlBar="bottom-control-bar",d.Menu="menu",d);let rA=[],rT=(()=>{if("undefined"!=typeof document){for(let e of[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]])if(e[1]in document)return{requestFullscreen_:e[0],exitFullscreen_:e[1],fullscreenElement_:e[2],fullscreenEnabled_:e[3],fullscreenchange_:e[4],fullscreenerror_:e[5]}}})();function rC(){if("object"!=typeof navigator)return!1;if(navigator.userAgentData)return navigator.userAgentData.mobile;let e=navigator.userAgent;return!!e&&/Android|iPhone|iPad|iPod|Mobile Safari|Windows Phone/i.test(e)}function rL(){if("object"!=typeof navigator)return!1;let e=navigator.userAgent;return!!e&&/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(e)}let rS="theoplayerstreamtypechange",rP="theoplayerready",rR=o("theoplayer-ui",'<style>:host{background:#000;background:var(--theoplayer-background,#000);box-sizing:border-box;container-name:theoplayer-ui-container;container-type:size;display:inline-block;height:0;min-width:300px;padding-bottom:56.25%;position:relative}:host([hidden]){display:none!important}:host([fullscreen]){height:100%!important;padding:0!important;width:100%!important}:host(:-webkit-full-screen){height:100%!important;padding:0!important;width:100%!important}:host(:fullscreen){height:100%!important;padding:0!important;width:100%!important}:host([fluid]){padding-bottom:56.25%;padding-bottom:calc(100%*var(--theoplayer-video-height, 9)/var(--theoplayer-video-width, 16))}[part~=chrome]{position:relative}[part~=layer]{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}[part~=chrome],[part~=layer]:not([part~=media-layer]){display:flex}[part~=chrome],[part~=gesture-layer],[part~=vertical-layer]{pointer-events:none}[part~=chrome] ::slotted(*){pointer-events:auto}[part~=media-layer] video{border-radius:0;border-radius:var(--theoplayer-video-border-radius,0);-o-object-fit:contain;object-fit:contain;-o-object-fit:var(--theoplayer-video-object-fit,contain);object-fit:var(--theoplayer-video-object-fit,contain)}[part~=media-layer] .theoplayer-ad-linear{bottom:0;left:0;position:absolute;right:0;top:0;z-index:10}[part~=media-layer] .theo-ad-remaining-container,[part~=media-layer] .theoplayer-ad-skip,[part~=media-layer] .theoplayer-ad-touch-clickthrough{display:none!important}[part~=chrome],[part~=vertical-layer]{align-items:stretch;flex-flow:column nowrap}[part~=centered]{align-items:center;justify-content:center}[part~=middle]{flex-grow:1}[part~=vertical-layer]:before{background:transparent;background:var(--theoplayer-control-backdrop-background,transparent);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}:host(:not([mobile]):not([tv])) [part~=menu-layer]{bottom:0;bottom:var(--theoplayer-menu-offset-bottom,0);padding:10px;padding:var(--theoplayer-menu-layer-padding,10px);top:0;top:var(--theoplayer-menu-offset-top,0)}[part=menu]{background:rgba(0,0,0,.5);background:var(--theoplayer-menu-backdrop-background,rgba(0,0,0,.5));display:flex;justify-self:stretch}[part=menu] ::slotted(*){align-self:stretch;flex-grow:1;justify-self:stretch}:host(:not([mobile])) [part=menu]{margin:auto 0 0 auto;margin:var(--theoplayer-menu-margin-top,auto) var(--theoplayer-menu-margin-right,0) var(--theoplayer-menu-margin-bottom,0) var(--theoplayer-menu-margin-left,auto);max-height:100%;min-width:200px;min-width:var(--theoplayer-menu-min-width,200px)}:host([mobile]) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([tv]) [part~=menu-layer]{left:auto}:host([tv]) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host(:not([menu-opened])) [part~=menu-layer],:host([menu-opened][mobile]) [part~=vertical-layer],:host([menu-opened][tv]) [part~=vertical-layer]{display:none!important}@container theoplayer-ui-container (max-width: 500px){:host(:not([mobile])) [part~=menu-layer]{bottom:0;left:0;padding:0;right:0;top:0}:host(:not([mobile])) [part=menu]{align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([menu-opened]) [part~=vertical-layer]{display:none!important}}[part~=error-layer]{align-items:center;background:rgba(0,0,0,.5);background:var(--theoplayer-error-background,rgba(0,0,0,.5));justify-content:center}:host(:not([has-error])) [part~=error-layer],:host([has-error]) [part~=layer]:not([part~=media-layer]):not([part~=error-layer]){display:none!important}[part~=chrome] ::slotted(theoplayer-control-bar){align-self:stretch}theoplayer-gesture-receiver{flex-grow:1}:host(:not([mobile])) [part~=chrome] ::slotted([mobile-only]),:host([mobile]) [part~=chrome] ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [part~=chrome] ::slotted([tv-only]),:host([tv]) [part~=chrome] ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [part~=chrome] ::slotted([live-hidden]),:host([stream-type=vod]) [part~=chrome] ::slotted([live-only]){display:none!important}:host(:not([playing-ad])) [part~=chrome] ::slotted([ad-only]),:host([playing-ad]) [part~=chrome] ::slotted([ad-hidden]){display:none!important}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])){cursor:none}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])) [part~=chrome] ::slotted(:not([no-auto-hide])){opacity:0;transition:opacity 1s}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])) [part~=vertical-layer]:before{opacity:0;transition:opacity 1s}</style><div part="layer media-layer"></div><div part="layer gesture-layer"><theoplayer-gesture-receiver></theoplayer-gesture-receiver></div><div part="layer vertical-layer"><div part="top chrome"><slot name="top-chrome"></slot></div><div part="middle chrome"><slot name="middle-chrome"></slot></div><div part="layer centered-layer centered loading"><slot name="centered-loading"></slot></div><div part="layer centered-layer centered chrome"><slot name="centered-chrome"></slot></div><div part="bottom chrome"><slot></slot></div></div><div part="layer menu-layer"><theoplayer-menu-group part="menu"><slot name="menu"></slot></theoplayer-menu-group></div><div part="layer error-layer"><slot name="error"></slot></div>');class rM extends HTMLElement{static get observedAttributes(){return[p.CONFIGURATION,p.SOURCE,p.MUTED,p.AUTOPLAY,p.FULLSCREEN,p.FLUID,p.DEVICE_TYPE,p.PAUSED,p.ENDED,p.CASTING,p.PLAYING_AD,p.HAS_ERROR,p.HAS_FIRST_PLAY,p.STREAM_TYPE,p.DVR_THRESHOLD,p.USER_IDLE,p.USER_IDLE_TIMEOUT]}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}get player(){return this._player}get configuration(){return this._configuration}set configuration(e){this.removeAttribute(p.CONFIGURATION),this._setConfiguration(e)}_setConfiguration(e){this._configuration=null!=e?e:{},this.tryInitializePlayer_()}get source(){return this._player?this._player.source:this._source}set source(e){this.removeAttribute(p.SOURCE),this._setSource(e)}_setSource(e){this._player?this._player.source=e:this._source=e}get fluid(){return this.hasAttribute(p.FLUID)}set fluid(e){x(this,p.FLUID,e)}get muted(){return this.hasAttribute(p.MUTED)}set muted(e){x(this,p.MUTED,e)}get autoplay(){return this.hasAttribute(p.AUTOPLAY)}set autoplay(e){x(this,p.AUTOPLAY,e)}get fullscreen(){return this.hasAttribute(p.FULLSCREEN)}get paused(){return this.hasAttribute(p.PAUSED)}get ended(){return this.hasAttribute(p.ENDED)}get casting(){return this.hasAttribute(p.CASTING)}get userIdleTimeout(){var e;let t="tv"===this.deviceType?5:2;return Number(null!=(e=this.getAttribute(p.USER_IDLE_TIMEOUT))?e:t)}set userIdleTimeout(e){e=Number(e),this.setAttribute(p.USER_IDLE_TIMEOUT,String(isNaN(e)?0:e))}get deviceType(){return this.getAttribute(p.DEVICE_TYPE)||"desktop"}get streamType(){return this.getAttribute(p.STREAM_TYPE)||"vod"}set streamType(e){this.setAttribute(p.STREAM_TYPE,e)}get dvrThreshold(){var e;return Number(null!=(e=this.getAttribute(p.DVR_THRESHOLD))?e:60)}set dvrThreshold(e){e=Number(e),this.setAttribute(p.DVR_THRESHOLD,String(isNaN(e)?0:e))}connectedCallback(){var e;if(a(this),this._menuGroup instanceof eC||customElements.upgrade(this._menuGroup),!this.hasAttribute(p.DEVICE_TYPE)){let e=rC()?"mobile":rL()?"tv":"desktop";this.setAttribute(p.DEVICE_TYPE,e)}for(let e of(this.hasAttribute(p.PAUSED)||this.setAttribute(p.PAUSED,""),this.tryInitializePlayer_(),this._stateReceivers))this.propagateStateToReceiver_(e);V(this,this._playerEl,this.registerStateReceiver_),this._mutationObserver.observe(this,{childList:!0,subtree:!0}),this.shadowRoot.addEventListener("slotchange",this._onSlotChange),null==(e=this._resizeObserver)||e.observe(this),this._updateTextTrackMargins(),this._menuGroup.addEventListener(e_,this._onCloseMenu),this._menuGroup.addEventListener(ef,this._onMenuChange),void 0!==rT&&(document.addEventListener(rT.fullscreenchange_,this._onFullscreenChange),document.addEventListener(rT.fullscreenerror_,this._onFullscreenChange),this._onFullscreenChange()),this.setUserIdle_(),"tv"===this.deviceType&&window.addEventListener("keydown",this._onTvKeyDown),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointermove",this._onPointerMove),this.addEventListener("mouseleave",this._onMouseLeave)}tryInitializePlayer_(){void 0===this._player&&(void 0!==this._configuration.license||void 0!==this._configuration.licenseUrl)&&(this._player=new t.ChromelessPlayer(this._playerEl,this._configuration),this._source&&(this._player.source=this._source,this._source=void 0),this._player.muted=this.muted,this._player.autoplay=this.autoplay,this._updateAspectRatio(),this._updateError(),this._updatePausedAndEnded(),this._updateCasting(),this.addPlayerListeners_(this._player),this.propagatePlayerToAllReceivers_(),this.dispatchEvent(ed(rP)))}disconnectedCallback(){var e;null==(e=this._resizeObserver)||e.disconnect(),this._mutationObserver.disconnect(),this.shadowRoot.removeEventListener("slotchange",this._onSlotChange),this._menuGroup.removeEventListener(e_,this._onCloseMenu),this._menuGroup.removeEventListener(ef,this._onMenuChange),void 0!==rT&&(document.removeEventListener(rT.fullscreenchange_,this._onFullscreenChange),document.removeEventListener(rT.fullscreenerror_,this._onFullscreenChange)),window.removeEventListener("keydown",this._onTvKeyDown),this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("pointerup",this._onPointerUp),this.removeEventListener("click",this._onClickAfterPointerUp,!0),this.removeEventListener("pointermove",this._onPointerMove),this.removeEventListener("mouseleave",this._onMouseLeave),this._player&&(this.removePlayerListeners_(this._player),this._player.destroy(),this._player=void 0,this.propagatePlayerToAllReceivers_()),this._stateReceivers.length=0}attributeChangedCallback(e,t,r){if(r===t)return;let a=null!=r;if(e===p.CONFIGURATION)this._setConfiguration(r?JSON.parse(r):{});else if(e===p.SOURCE)this._setSource(r?JSON.parse(r):void 0);else if(e===p.MUTED)this._player&&(this._player.muted=a);else if(e===p.AUTOPLAY)this._player&&(this._player.autoplay=a);else if(e===p.FULLSCREEN)for(let e of this._stateReceivers)e[F].indexOf("fullscreen")>=0&&(e.fullscreen=a);else if(e===p.DEVICE_TYPE)for(let e of(x(this,p.MOBILE,"mobile"===r),x(this,p.TV,"tv"===r),window.removeEventListener("keydown",this._onTvKeyDown),"tv"===r&&window.addEventListener("keydown",this._onTvKeyDown),this._stateReceivers))e[F].indexOf("deviceType")>=0&&(e.deviceType=r);else if(e===p.STREAM_TYPE){for(let e of this._stateReceivers)e[F].indexOf("streamType")>=0&&(e.streamType=r);let e=ed(rS,{bubbles:!0,composed:!0,detail:{streamType:r}});this.dispatchEvent(e)}else e===p.FLUID?this._updateAspectRatio():e===p.USER_IDLE||e===p.PAUSED||e===p.CASTING?this._updateTextTrackMargins():e===p.DVR_THRESHOLD&&this._updateStreamType();rM.observedAttributes.indexOf(e)>=0&&i(this)}propagateStateToReceiver_(e){let t=e[F];if(t.indexOf("player")>=0&&(e.player=this._player),t.indexOf("fullscreen")>=0&&(e.fullscreen=this.fullscreen),t.indexOf("deviceType")>=0&&(e.deviceType=this.deviceType),t.indexOf("streamType")>=0&&(e.streamType=this.streamType),void 0!==this._player){if(t.indexOf("playbackRate")>=0&&(e.playbackRate=this._player.playbackRate),t.indexOf("error")>=0&&(e.error=this._player.errorObject),t.indexOf("activeVideoQuality")>=0){var r;e.activeVideoQuality=null==(r=this._activeVideoTrack)?void 0:r.activeQuality}t.indexOf("targetVideoQualities")>=0&&(e.targetVideoQualities=eV(this._activeVideoTrack))}t.indexOf("previewTime")>=0&&(e.previewTime=this._previewTime)}propagatePlayerToAllReceivers_(){for(let e of this._stateReceivers)e[F].indexOf("player")>=0&&(e.player=this._player)}removeStateFromReceiver_(e){e[F].indexOf("player")>=0&&(e.player=void 0)}openMenu_(e,t){let r=ec.fromRect(this._topChromeEl.getBoundingClientRect()),a=ec.fromRect(this._bottomChromeEl.getBoundingClientRect()),o=!0,n=!0;if(void 0!==t){let e=ec.fromRect(this.getBoundingClientRect()),r=ec.fromRect(t.getBoundingClientRect());e.width>0&&e.height>0&&(o=r.top>=e.top+e.height/2,n=r.left>=e.left+e.width/2)}this._menuGroup.openMenu(e,t),this._menuOpener=t,i(this,{"--theoplayer-menu-offset-top":`${Math.round(r.height)}px`,"--theoplayer-menu-offset-bottom":`${Math.round(a.height)}px`,"--theoplayer-menu-margin-top":o?"auto":"0","--theoplayer-menu-margin-bottom":o?"0":"auto","--theoplayer-menu-margin-left":n?"auto":"0","--theoplayer-menu-margin-right":n?"0":"auto"})}closeMenu_(){var e;null==this._menuGroup.closeMenu||this._menuGroup.closeMenu.call(this._menuGroup),null==(e=this._menuOpener)||e.focus(),this._menuOpener=void 0}isUserIdle_(){return this.hasAttribute(p.USER_IDLE)&&!this.paused&&!this.casting&&!this._menuGroup.hasCurrentMenu()}setUserActive_(){clearTimeout(this._userIdleTimer),this.removeAttribute(p.USER_IDLE)}isPlayerOrMedia_(e){return e===this||this._playerEl.contains(e)}addPlayerListeners_(e){var t,r,a;e.addEventListener("destroy",this._onDestroy),e.addEventListener("resize",this._updateAspectRatio),e.addEventListener(["error","sourcechange","emptied"],this._updateError),e.addEventListener("volumechange",this._updateMuted),e.addEventListener("play",this._onPlay),e.addEventListener("pause",this._onPause),e.addEventListener(["ended","emptied"],this._updatePausedAndEnded),e.addEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),e.addEventListener("ratechange",this._updatePlaybackRate),e.addEventListener("sourcechange",this._onSourceChange),e.addEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd),null==(t=e.theoLive)||t.addEventListener("publicationloadstart",this._onSourceChange),e.videoTracks.addEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=e.cast)||r.addEventListener("castingchange",this._updateCasting),null==(a=e.ads)||a.addEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}removePlayerListeners_(e){e.removeEventListener("destroy",this._onDestroy),e.removeEventListener("resize",this._updateAspectRatio),e.removeEventListener(["error","sourcechange","emptied"],this._updateError),e.removeEventListener("volumechange",this._updateMuted),e.removeEventListener("play",this._onPlay),e.removeEventListener("pause",this._onPause),e.removeEventListener(["ended","emptied"],this._updatePausedAndEnded),e.removeEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),e.removeEventListener("ratechange",this._updatePlaybackRate),e.removeEventListener("sourcechange",this._onSourceChange),e.removeEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd);try{var t,r,a;null==(t=e.theoLive)||t.removeEventListener("publicationloadstart",this._onSourceChange),e.videoTracks.removeEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=e.cast)||r.removeEventListener("castingchange",this._updateCasting),null==(a=e.ads)||a.removeEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}catch{}}constructor(e={}){super(),this._configuration={},this._pointerType="",this._lastPointerUpTime=0,this._stateReceivers=[],this._player=void 0,this._source=void 0,this._userIdleTimer=0,this._previewTime=NaN,this._activeVideoTrack=void 0,this._onMutation=e=>{for(let t of e)if("childList"===t.type){let{addedNodes:e,removedNodes:r}=t;for(let t=0;t<e.length;t++){let r=e[t];g(r)&&V(r,this._playerEl,this.registerStateReceiver_)}for(let e=0;e<r.length;e++){let t=r[e];g(t)&&V(t,this._playerEl,this.unregisterStateReceiver_)}}},this._onSlotChange=()=>{V(this,this._playerEl,this.registerStateReceiver_),this._updateTextTrackMargins()},this.registerStateReceiver_=e=>{!(this._stateReceivers.indexOf(e)>=0)&&(this._stateReceivers.push(e),this.propagateStateToReceiver_(e))},this.unregisterStateReceiver_=e=>{(function(e,t){let r=e.indexOf(t);return!(r<0)&&(function(e,t){e.splice(t,1)}(e,r),!0)})(this._stateReceivers,e)&&this.removeStateFromReceiver_(e)},this._onToggleMenu=e=>{e.stopPropagation();let t=e.detail.menu;if(!this._menuGroup.getMenuById(t)){console.error(`<theoplayer-ui>: cannot find menu with ID "${t}"`);return}let r=m(e.target)?e.target:void 0;this._menuGroup.isMenuOpen(t)?this.closeMenu_():(this.closeMenu_(),this.openMenu_(t,r))},this._onCloseMenu=e=>{e.stopPropagation(),this.closeMenu_()},this._onMenuChange=()=>{this._menuEl.removeEventListener("pointerdown",this._onMenuPointerDown),this._menuEl.removeEventListener("click",this._onMenuClick),this._menuGroup.hasCurrentMenu()?(this._menuEl.addEventListener("pointerdown",this._onMenuPointerDown),this._menuEl.addEventListener("click",this._onMenuClick),this.setAttribute(p.MENU_OPENED,"")):this.removeAttribute(p.MENU_OPENED)},this._onMenuPointerDown=e=>{this._pointerType=e.pointerType},this._onMenuClick=e=>{var t;let r=null!=(t=e.pointerType)?t:this._pointerType;e.target===this._menuEl&&"mouse"===r&&this._menuGroup.closeCurrentMenu()&&e.preventDefault()},this._onEnterFullscreen=e=>{if(e.stopPropagation(),rT&&document[rT.fullscreenEnabled_]&&this[rT.requestFullscreen_]){let e=this[rT.requestFullscreen_]();e&&e.then&&e.then(y,y)}else this._player&&this._player.presentation.supportsMode("fullscreen")&&this._player.presentation.requestMode("fullscreen")},this._onExitFullscreen=e=>{if(e.stopPropagation(),rT){let e=document[rT.exitFullscreen_]();e&&e.then&&e.then(y,y)}this._player&&"fullscreen"===this._player.presentation.currentMode&&this._player.presentation.requestMode("inline")},this._onFullscreenChange=()=>{let e=!1;if(void 0!==rT){let t=document[rT.fullscreenElement_];t&&(e=function e(t,r){if(!t||!r)return!1;if(t.contains(r))return!0;let a=r.getRootNode();return!!a.host&&e(t,a.host)}(t,this))}e||void 0===this._player||"fullscreen"!==this._player.presentation.currentMode||(e=!0),x(this,p.FULLSCREEN,e)},this._updateAspectRatio=()=>{if(void 0===this._player)return;let{videoWidth:e,videoHeight:t}=this._player;e>0&&t>0?i(this,{"--theoplayer-video-width":`${e}`,"--theoplayer-video-height":`${t}`}):i(this,{"--theoplayer-video-width":"","--theoplayer-video-height":""})},this._updateError=()=>{var e;let t=null==(e=this._player)?void 0:e.errorObject;for(let e of(x(this,p.HAS_ERROR,void 0!==t),this._stateReceivers))e[F].indexOf("error")>=0&&(e.error=t)},this._onPlay=()=>{this.setAttribute(p.HAS_FIRST_PLAY,""),this.removeAttribute(p.PAUSED),this._updateEnded()},this._onPause=()=>{this.setAttribute(p.PAUSED,""),this._updateEnded()},this._updatePausedAndEnded=()=>{let e=!this._player||this._player.paused;x(this,p.PAUSED,e),this._updateEnded()},this._updateEnded=()=>{let e=!!this._player&&this._player.ended;x(this,p.ENDED,e)},this._updateStreamType=()=>{let e;if(void 0===this._player)return;let t=this._player.duration;if(!isNaN(t)){if(t===1/0){e="live";let t=this.dvrThreshold,r=this._player.seekable;(t<=0||r.length>0&&r.end(r.length-1)-r.start(0)>=t)&&(e="dvr")}else e="vod";this.streamType=e}},this._updatePlaybackRate=()=>{if(void 0===this._player)return;let e=this._player.playbackRate;for(let t of this._stateReceivers)t[F].indexOf("playbackRate")>=0&&(t.playbackRate=e)},this._updateMuted=()=>{void 0!==this._player&&(this.muted=this._player.muted)},this._updateActiveVideoTrack=()=>{if(void 0===this._player)return;let e=_(this._player.videoTracks,e=>e.enabled);if(this._activeVideoTrack!==e){var t,r,a,i;null==(t=this._activeVideoTrack)||t.removeEventListener("activequalitychanged",this._updateActiveVideoQuality),null==(r=this._activeVideoTrack)||r.removeEventListener("targetqualitychanged",this._updateTargetVideoQualities),this._activeVideoTrack=e,this._updateActiveVideoQuality(),this._updateTargetVideoQualities(),null==(a=this._activeVideoTrack)||a.addEventListener("activequalitychanged",this._updateActiveVideoQuality),null==(i=this._activeVideoTrack)||i.addEventListener("targetqualitychanged",this._updateTargetVideoQualities)}},this._updateActiveVideoQuality=()=>{var e;let t=null==(e=this._activeVideoTrack)?void 0:e.activeQuality;for(let e of this._stateReceivers)e[F].indexOf("activeVideoQuality")>=0&&(e.activeVideoQuality=t)},this._updateTargetVideoQualities=()=>{let e=eV(this._activeVideoTrack);for(let t of this._stateReceivers)t[F].indexOf("targetVideoQualities")>=0&&(t.targetVideoQualities=e)},this._updateCasting=()=>{var e,t,r;let a=null!=(r=null==(t=this._player)?void 0:null==(e=t.cast)?void 0:e.casting)&&r;x(this,p.CASTING,a)},this._updatePlayingAd=()=>{var e,t,r;let a=null!=(r=null==(t=this._player)?void 0:null==(e=t.ads)?void 0:e.playing)&&r;x(this,p.PLAYING_AD,a)},this._onSourceChange=()=>{this.closeMenu_();let e=void 0!==this._player&&!this._player.paused;x(this,p.HAS_FIRST_PLAY,e)},this.setUserIdle_=()=>{if(clearTimeout(this._userIdleTimer),this._userIdleTimer=0,!(this.userIdleTimeout<0)&&(this.setAttribute(p.USER_IDLE,""),"tv"==this.deviceType&&this.isUserIdle_())){let e=ey();null!==e&&e.blur()}},this.scheduleUserIdle_=()=>{if(this.setUserActive_(),clearTimeout(this._userIdleTimer),this.userIdleTimeout<0){this._userIdleTimer=0;return}this._userIdleTimer=setTimeout(this.setUserIdle_,1e3*this.userIdleTimeout)},this._onTvKeyDown=e=>{if(R(e.keyCode)){this.setUserIdle_();return}let t=function e(t){if(!m(t)||"none"===getComputedStyle(t).display)return;if(null!==t.getAttribute(p.TV_FOCUS))return C(t);let r=A(t);for(let t=0;t<r.length;t++){let a=e(r[t]);if(a)return a}}(this),r=C(this),a=ey();if(!a){let e=null!=t?t:r;e.length>0&&(e[0].focus(),a=e[0])}!this.isUserIdle_()&&(e.keyCode===S.ENTER?null!==a&&(e.preventDefault(),a.click()):P(e.keyCode)&&eg(this,r,e.keyCode)&&(e.preventDefault(),e.stopPropagation()))},this._onKeyUp=e=>{R(e.keyCode)||this.scheduleUserIdle_()},this._onPointerUp=e=>{"touch"===e.pointerType&&(this.isPlayerOrMedia_(e.target)&&!this.hasAttribute(p.USER_IDLE)?this.setUserIdle_():(this.isUserIdle_()&&(this._lastPointerUpTime=performance.now(),this.addEventListener("click",this._onClickAfterPointerUp,!0)),this.scheduleUserIdle_()))},this._onClickAfterPointerUp=e=>{this.removeEventListener("click",this._onClickAfterPointerUp,!0),performance.now()-this._lastPointerUpTime<10&&(e.preventDefault(),e.stopPropagation())},this._onPointerMove=e=>{"mouse"===e.pointerType&&(this.setUserActive_(),this.isPlayerOrMedia_(e.target)&&this.scheduleUserIdle_())},this._onMouseLeave=()=>{this.setUserIdle_()},this._onChromeSlotTransition=e=>{"opacity"===e.propertyName&&this._updateTextTrackMargins()},this._updateTextTrackMargins=()=>{let e=this._player;if(void 0===e)return;let t=rI(this._topChromeSlot),r=rI(this._bottomChromeSlot);e.textTrackStyle.marginTop=null==t?void 0:t.height,e.textTrackStyle.marginBottom=null==r?void 0:r.height},this._onPreviewTimeChange=e=>{for(let t of(this._previewTime=e.detail.previewTime,this._stateReceivers))t[F].indexOf("previewTime")>=0&&(t.previewTime=this._previewTime)},this._onDestroy=()=>{this._player&&(this.removePlayerListeners_(this._player),this._player=void 0,this.propagatePlayerToAllReceivers_())};let t=this.attachShadow({mode:"open",delegatesFocus:!0});t.appendChild(rR().content.cloneNode(!0)),this._configuration=e,this._playerEl=t.querySelector('[part~="media-layer"]'),this._menuEl=t.querySelector('[part~="menu-layer"]'),this._menuGroup=t.querySelector("theoplayer-menu-group"),this._topChromeEl=t.querySelector('[part~="top"]'),this._topChromeSlot=t.querySelector('slot[name="top-chrome"]'),this._bottomChromeEl=t.querySelector('[part~="bottom"]'),this._bottomChromeSlot=t.querySelector("slot:not([name])"),this._mutationObserver=new MutationObserver(this._onMutation),"undefined"!=typeof ResizeObserver&&(this._resizeObserver=new ResizeObserver(this._updateTextTrackMargins)),t.addEventListener(ex,this._onToggleMenu),t.addEventListener(tM,this._onEnterFullscreen),t.addEventListener(tI,this._onExitFullscreen),t.addEventListener(tF,this._onPreviewTimeChange),this._topChromeSlot.addEventListener("transitionstart",this._onChromeSlotTransition),this._topChromeSlot.addEventListener("transitionend",this._onChromeSlotTransition),this._bottomChromeSlot.addEventListener("transitionstart",this._onChromeSlotTransition),this._bottomChromeSlot.addEventListener("transitionend",this._onChromeSlotTransition),this._upgradeProperty("configuration"),this._upgradeProperty("source"),this._upgradeProperty("fluid"),this._upgradeProperty("muted"),this._upgradeProperty("autoplay"),this._upgradeProperty("userIdleTimeout"),this._upgradeProperty("streamType"),this.tryInitializePlayer_()}}function rI(e){let t;for(let r of T(e).filter(m))if("0"!==getComputedStyle(r).opacity){let e=ec.fromRect(r.getBoundingClientRect());e.width>0&&e.height>0&&(t=t?t.union(e):e)}return t}rM.READY_EVENT=rP,customElements.define("theoplayer-ui",rM);let rO=o("theoplayer-default-ui",'<style>:host{box-sizing:border-box;display:inline-block;position:relative}:host([hidden]){display:none!important}theoplayer-ui{display:block;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}[part=title]{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);text-shadow:0 0 4px rgba(0,0,0,.75);-webkit-user-select:none;-moz-user-select:none;user-select:none}:host(:not([has-title])) [part=title]{display:none}[part=centered-chrome] *{--theoplayer-control-height:var(--theoplayer-centered-chrome-control-height,48px);--theoplayer-play-button-icon-color:var(--theoplayer-center-play-button-icon-color,unset)}[part=middle-chrome]{flex-grow:1;justify-content:flex-end}[part=bottom-chrome],[part=middle-chrome]{display:flex;flex-flow:column nowrap;pointer-events:none;position:relative}[part=bottom-chrome]{align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:var(--theoplayer-mobile-control-backdrop-background,rgba(0,0,0,.5))}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{flex-grow:1}theoplayer-time-range{--theoplayer-control-height:var(--theoplayer-time-range-control-height,12px);--theoplayer-range-track-pointer-background:var(--theoplayer-time-range-track-pointer-background,hsla(0,0%,100%,.5))}[part=ad-chrome]{--theoplayer-control-height:var(--theoplayer-ad-chrome-control-height,12px);align-items:flex-end;pointer-events:none}theoplayer-ad-display,theoplayer-ad-skip-button{flex-shrink:0}theoplayer-ad-countdown,theoplayer-ad-skip-button[disabled]{text-shadow:0 0 4px rgba(0,0,0,.75)}theoplayer-ad-countdown{min-width:0}theoplayer-ad-skip-button{--theoplayer-ad-skip-font-size:calc(var(--theoplayer-text-font-size, 14px)*1.25);--theoplayer-ad-skip-line-height:calc(var(--theoplayer-text-content-height, var(--theoplayer-control-height, 24px))*1.25);--theoplayer-ad-skip-icon-width:24px;--theoplayer-ad-skip-icon-height:24px;align-items:end;border-right:0!important;justify-items:end}:host(:not([mobile])) [mobile-only],:host(:not([mobile])) theoplayer-control-bar ::slotted([mobile-only]),:host([mobile]) [mobile-hidden],:host([mobile]) theoplayer-control-bar ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [tv-only],:host(:not([tv])) theoplayer-control-bar ::slotted([tv-only]),:host([tv]) [tv-hidden],:host([tv]) theoplayer-control-bar ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui:not([playing-ad]) theoplayer-control-bar ::slotted([ad-only]),theoplayer-ui[playing-ad] [ad-hidden],theoplayer-ui[playing-ad] theoplayer-control-bar ::slotted([ad-hidden]){display:none!important}theoplayer-ui:not([has-first-play]) [part=centered-chrome] :not(theoplayer-play-button),theoplayer-ui:not([has-first-play]) theoplayer-control-bar{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part=centered-chrome] theoplayer-play-button{display:none!important}theoplayer-ui:not([mobile]):not([casting]) theoplayer-ad-clickthrough-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:var(--theoplayer-volume-range-track-width,70px);overflow:hidden;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display:not([stream-type=vod]){padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}theoplayer-ui[playing-ad] .theoplayer-ad-control{--theoplayer-control-height:var(--theoplayer-ad-control-height,16px)}</style><theoplayer-ui><theoplayer-control-bar slot="top-chrome" part="top-chrome"><div part="title" ad-hidden><slot name="title"></slot></div><span class="theoplayer-spacer"></span><theoplayer-language-menu-button menu="language-menu" mobile-only ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button mobile-only ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button mobile-only ad-hidden></theoplayer-chromecast-button><slot name="top-control-bar"></slot><theoplayer-settings-menu-button menu="settings-menu" mobile-only ad-hidden></theoplayer-settings-menu-button><theoplayer-ad-clickthrough-button ad-only></theoplayer-ad-clickthrough-button></theoplayer-control-bar><theoplayer-loading-indicator slot="centered-loading" no-auto-hide></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><theoplayer-seek-button seek-offset="-10" mobile-only ad-hidden></theoplayer-seek-button><theoplayer-play-button></theoplayer-play-button><theoplayer-seek-button seek-offset="10" mobile-only ad-hidden></theoplayer-seek-button></div><div slot="middle-chrome" part="middle-chrome"><theoplayer-chromecast-display></theoplayer-chromecast-display></div><div part="bottom-chrome"><theoplayer-control-bar part="ad-chrome" ad-only><theoplayer-ad-display></theoplayer-ad-display><theoplayer-ad-countdown></theoplayer-ad-countdown><span class="theoplayer-spacer"></span><theoplayer-ad-skip-button></theoplayer-ad-skip-button></theoplayer-control-bar><theoplayer-control-bar><theoplayer-play-button mobile-hidden ad-only class="theoplayer-ad-control"></theoplayer-play-button><theoplayer-mute-button ad-only class="theoplayer-ad-control"></theoplayer-mute-button><theoplayer-time-range show-ad-markers tv-focus class="theoplayer-ad-control"></theoplayer-time-range><theoplayer-chromecast-button tv-hidden ad-only class="theoplayer-ad-control"></theoplayer-chromecast-button><theoplayer-fullscreen-button ad-only class="theoplayer-ad-control"></theoplayer-fullscreen-button></theoplayer-control-bar><theoplayer-control-bar ad-hidden><theoplayer-play-button mobile-hidden></theoplayer-play-button><theoplayer-mute-button tv-hidden></theoplayer-mute-button><theoplayer-volume-range mobile-hidden tv-hidden></theoplayer-volume-range><theoplayer-live-button live-only ad-hidden></theoplayer-live-button><theoplayer-time-display show-duration remaining-when-live></theoplayer-time-display><span class="theoplayer-spacer" style="pointer-events: auto"></span><theoplayer-language-menu-button menu="language-menu" mobile-hidden ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button tv-hidden mobile-hidden ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button tv-hidden mobile-hidden ad-hidden></theoplayer-chromecast-button><slot name="bottom-control-bar"></slot><theoplayer-settings-menu-button menu="settings-menu" mobile-hidden ad-hidden></theoplayer-settings-menu-button><theoplayer-fullscreen-button tv-hidden></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-language-menu id="language-menu" slot="menu" hidden></theoplayer-language-menu><theoplayer-settings-menu id="settings-menu" slot="menu" hidden></theoplayer-settings-menu><slot name="error" slot="error"><theoplayer-error-display></theoplayer-error-display></slot><slot name="menu" slot="menu"></slot></theoplayer-ui>');class rD extends HTMLElement{static get observedAttributes(){return[p.CONFIGURATION,p.SOURCE,p.MUTED,p.AUTOPLAY,p.FLUID,p.DEVICE_TYPE,p.STREAM_TYPE,p.USER_IDLE_TIMEOUT,p.DVR_THRESHOLD,p.HAS_TITLE]}initShadowRoot(){let e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(rO().content.cloneNode(!0)),e}_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}get player(){return this._ui.player}get configuration(){return this._ui.configuration}set configuration(e){this.removeAttribute(p.CONFIGURATION),this.setConfiguration_(e)}setConfiguration_(e){var t;this._ui.configuration={...e,ads:{...null!=(t=e.ads)?t:{},showCountdown:!1}}}get source(){return this._ui.source}set source(e){this.removeAttribute(p.SOURCE),this._ui.source=e}get fluid(){return this._ui.fluid}set fluid(e){this._ui.fluid=e}get muted(){return this._ui.muted}set muted(e){this._ui.muted=e}get autoplay(){return this._ui.autoplay}set autoplay(e){this._ui.autoplay=e}get streamType(){return this._ui.streamType}set streamType(e){this._ui.streamType=e}get userIdleTimeout(){return this._ui.userIdleTimeout}set userIdleTimeout(e){this._ui.userIdleTimeout=e}get dvrThreshold(){return this._ui.dvrThreshold}set dvrThreshold(e){this._ui.dvrThreshold=e}connectedCallback(){if(a(this),!this.hasAttribute(p.DEVICE_TYPE)){let e=rC()?"mobile":rL()?"tv":"desktop";this.setAttribute(p.DEVICE_TYPE,e)}this._appliedExtensions||(this._appliedExtensions=!0,function(e){for(let t of rA)t(e)}(this),i(this)),this._onTitleSlotChange()}disconnectedCallback(){}attributeChangedCallback(e,t,r){if(r===t)return;let a=null!=r;e===p.SOURCE?this._ui.source=r?JSON.parse(r):void 0:e===p.CONFIGURATION?this.setConfiguration_(r?JSON.parse(r):{}):e===p.MUTED?this.muted=a:e===p.AUTOPLAY?this.autoplay=a:e===p.FLUID?this.fluid=a:e===p.DEVICE_TYPE?(x(this,p.MOBILE,"mobile"===r),x(this,p.TV,"tv"===r),this._ui.setAttribute(p.DEVICE_TYPE,r)):e===p.STREAM_TYPE?this.streamType=r:e===p.USER_IDLE_TIMEOUT?this.userIdleTimeout=Number(r):e===p.DVR_THRESHOLD&&(this.dvrThreshold=Number(r)),rD.observedAttributes.indexOf(e)>=0&&i(this)}constructor(e={}){var t,r,a;super(),this._appliedExtensions=!1,this._updateStreamType=()=>{this.setAttribute(p.STREAM_TYPE,this.streamType),this._timeRange&&x(this._timeRange,p.HIDDEN,"live"===this.streamType)},this._dispatchReadyEvent=()=>{this.dispatchEvent(ed(rP))},this._onTitleSlotChange=()=>{this._titleSlot&&x(this,p.HAS_TITLE,this._titleSlot.assignedNodes().length>0)},this._shadowRoot=this.initShadowRoot(),this._ui=this._shadowRoot.querySelector("theoplayer-ui"),this._ui.addEventListener(rP,this._dispatchReadyEvent),this._ui.addEventListener(rS,this._updateStreamType),this.setConfiguration_(e),this._titleSlot=null!=(r=this._shadowRoot.querySelector('slot[name="title"]'))?r:void 0,null==(t=this._titleSlot)||t.addEventListener("slotchange",this._onTitleSlotChange),this._timeRange=null!=(a=this._shadowRoot.querySelector("theoplayer-time-range"))?a:void 0,this._upgradeProperty("configuration"),this._upgradeProperty("source"),this._upgradeProperty("fluid"),this._upgradeProperty("muted"),this._upgradeProperty("autoplay"),this._upgradeProperty("streamType"),this._upgradeProperty("userIdleTimeout"),this._upgradeProperty("dvrThreshold")}}rD.READY_EVENT=rP,customElements.define("theoplayer-default-ui",rD);let rN=o("theolive-bad-network-button",I(`<span part="icon">${tS}<span part="warning-icon"><svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48">
35
35
  <path d="m40 936 440-760 440 760H40Zm444.175-117q12.825 0 21.325-8.675 8.5-8.676 8.5-21.5 0-12.825-8.675-21.325-8.676-8.5-21.5-8.5-12.825 0-21.325 8.675-8.5 8.676-8.5 21.5 0 12.825 8.675 21.325 8.676 8.5 21.5 8.5ZM454 708h60V484h-60v224Z"/>
36
36
  </svg></span></span>`,"[part=icon]{display:inline-block;position:relative}[part=warning-icon]{display:none;height:60%;min-width:60%;position:absolute;right:-10%;top:0;width:60%}[part=warning-icon] svg{fill:red;fill:var(--theolive-bad-network-mode,red)}"));class rq extends H(eP,["player"]){connectedCallback(){var e;super.connectedCallback(),this.hasAttribute(p.ARIA_LABEL)||this.setAttribute(p.ARIA_LABEL,"open settings menu"),this._warningIcon=null!=(e=this.shadowRoot.querySelector('[part="warning-icon"]'))?e:void 0}get player(){return this._player}set player(e){this._player!==e&&(this._theoLive&&(this._theoLive.removeEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.removeEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this._player=e,this._theoLive=null==e?void 0:e.theoLive,this._theoLive&&(this._theoLive.addEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.addEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)))}constructor(){super({template:rN()}),this.handleEnterBadNetworkMode_=()=>{this._warningIcon&&(this._warningIcon.style.display="block")},this.handleExitBadNetworkMode_=()=>{this._warningIcon&&(this._warningIcon.style.display="none")}}}customElements.define("theolive-bad-network-button",rq);class rB extends H(eu,["player"]){get player(){return this._player}set player(e){var t,r;this._player!==e&&(this._theoLive&&(this._theoLive.removeEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.removeEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this._player=e,this._theoLive=null==e?void 0:e.theoLive,this._badNetworkMode=null!=(r=null==(t=this._theoLive)?void 0:t.badNetworkMode)&&r,this._theoLive&&(this._theoLive.addEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.addEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this.handlePlayer())}handleEnterBadNetworkMode(){}handleExitBadNetworkMode(){}attributeChangedCallback(e,t,r){r!==t&&e===p.ARIA_CHECKED&&t!==r&&this.handleChecked(this.checked)}constructor(e){super(e),this._badNetworkMode=!1,this.handleEnterBadNetworkMode_=()=>{this._badNetworkMode=!0,this.handleEnterBadNetworkMode()},this.handleExitBadNetworkMode_=()=>{this._badNetworkMode=!1,this.handleExitBadNetworkMode()},this._slotEl=this.shadowRoot.querySelector("slot")}}let rF=o("theolive-automatic-quality-selector",I("<slot></slot>"));customElements.define("theolive-automatic-quality-selector",class extends rB{handleEnterBadNetworkMode(){this.update_()}handleExitBadNetworkMode(){this.update_()}handlePlayer(){this.update_()}update_(){var e,t;let r=(null==(t=this.player)?void 0:null==(e=t.theoLive)?void 0:e.badNetworkMode)!==!0;this.checked!==r&&(this.checked=r)}handleChecked(e){e&&this.player&&this.player.theoLive&&(this.player.theoLive.badNetworkMode=!1)}constructor(){super({template:rF()}),w(this._slotEl,"High Quality")}});let rU=o("theolive-bad-network-quality-selector",I("<slot></slot>"));customElements.define("theolive-bad-network-quality-selector",class extends rB{handleEnterBadNetworkMode(){this.update_()}handleExitBadNetworkMode(){this.update_()}handlePlayer(){this.update_()}update_(){var e,t;let r=(null==(t=this.player)?void 0:null==(e=t.theoLive)?void 0:e.badNetworkMode)===!0;this.checked!==r&&(this.checked=r)}handleChecked(e){e&&this.player&&this.player.theoLive&&(this.player.theoLive.badNetworkMode=!0)}constructor(){super({template:rU()}),w(this._slotEl,"Low Quality")}});let rH=o("theolive-bad-network-menu",`<style>${eN}</style>
37
37
  <theoplayer-radio-group>
38
38
  <theolive-automatic-quality-selector></theolive-automatic-quality-selector>
39
39
  <theolive-bad-network-quality-selector></theolive-bad-network-quality-selector>
40
40
  </theoplayer-radio-group>
41
- `);class rV extends HTMLElement{_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this._radioGroup instanceof ev||customElements.upgrade(this._radioGroup),this.shadowRoot.addEventListener("change",this._onChange)}disconnectedCallback(){this.shadowRoot.removeEventListener("change",this._onChange)}constructor(){super(),this._onChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))};let e=this.attachShadow({mode:"open"});e.appendChild(rH().content.cloneNode(!0)),this._radioGroup=e.querySelector("theoplayer-radio-group")}}customElements.define("theolive-bad-network-menu",rV);let rz=o("theolive-default-ui",'<style>:host{box-sizing:border-box;display:inline-block;font-family:Helvetica,Arial,sans-serif;position:relative;width:100%}:host([hidden]){display:none!important}theoplayer-ui{--theoplayer-loading-delay:0.1s;display:block;font-family:Helvetica,Arial,sans-serif;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}theoplayer-menu::part(heading){display:none!important}[part=centered-chrome] *{--theoplayer-control-height:48px}[part=middle-chrome]{flex-grow:1;justify-content:flex-end;pointer-events:none}[part=bottom-chrome],[part=middle-chrome]{display:flex;flex-flow:column nowrap;position:relative}[part=bottom-chrome]{align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:rgba(0,0,0,.5)}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{flex-grow:1}theoplayer-time-range{--theoplayer-control-height:12px;--theoplayer-range-track-pointer-background:hsla(0,0%,100%,.5)}:host(:not([mobile])) [mobile-only],:host([mobile]) [mobile-hidden]{display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([has-first-play]) [part=centered-chrome] :not(theoplayer-play-button),theoplayer-ui:not([has-first-play]) theoplayer-control-bar,theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui[playing-ad] [ad-hidden]{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part=centered-chrome] theoplayer-play-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:70px;overflow:hidden;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display{padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}p{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:20px;font-size:var(--theoplayer-text-font-size,20px)}#announcement,#loading-announcement,#offline-announcement{display:none}theolive-bad-network-button{display:none;display:var(--theolive-bad-network-button-display,none)}theoplayer-settings-menu-button{display:inline-flex;display:var(--theolive-quality-button-display,inline-flex)}</style><theoplayer-ui><p id="loading-announcement" no-auto-hide slot="centered-chrome"><slot name="loading-announcement">Loading...</slot></p><p id="offline-announcement" no-auto-hide slot="centered-chrome"><slot name="offline-announcement">The live stream hasn\'t started yet</slot></p><p id="announcement" no-auto-hide slot="centered-chrome"></p><theoplayer-loading-indicator slot="centered-loading" no-auto-hide part="loading-indicator"></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><theoplayer-play-button part="center-play-button"></theoplayer-play-button></div><div part="bottom-chrome"><theoplayer-control-bar><theoplayer-play-button mobile-hidden part="play-button"></theoplayer-play-button><theoplayer-mute-button part="mute-button"></theoplayer-mute-button><theoplayer-volume-range mobile-hidden part="volume-range"></theoplayer-volume-range><theoplayer-live-button ad-hidden live-only part="live-button"></theoplayer-live-button><span class="theoplayer-spacer"></span><theoplayer-settings-menu-button ad-hidden menu="all-quality-menu" part="quality-button"></theoplayer-settings-menu-button><theolive-bad-network-button ad-hidden menu="quality-menu" part="theolive-bad-network-button"></theolive-bad-network-button><theoplayer-fullscreen-button part="fullscreen-button"></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-menu id="quality-menu" slot="menu" menu-close-on-input hidden><theolive-bad-network-menu></theolive-bad-network-menu></theoplayer-menu><theoplayer-menu id="all-quality-menu" slot="menu" menu-close-on-input hidden><theoplayer-quality-radio-group></theoplayer-quality-radio-group></theoplayer-menu><theoplayer-error-display slot="error" part="error-display"></theoplayer-error-display></theoplayer-ui>');class rG extends rD{initShadowRoot(){let e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(rz().content.cloneNode(!0)),e}hidePlayerError(){this._root.removeAttribute("has-error"),this._errorDisplay.style.display="none"}stopHidingPlayerError(){this._root.setAttribute("has-error",""),this._errorDisplay.style.display="flex"}hidePlayerPlayButton_(){this._playButton.style.display="none"}stopHidingPlayerPlayButton(){this._playButton.style.display="inline-flex"}showMessage_(e,t){this.hidePlayerError(),this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none","loading"===e?this._loading.style.display="block":"offline"===e?this._offline.style.display="block":(this._announcement.textContent=null!=t?t:"",this._announcement.style.display="block"),this.hidePlayerPlayButton_()}hideMessage_(){this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none",this.stopHidingPlayerPlayButton()}constructor(e={}){super(e),this.onReady=()=>{this._ui.removeEventListener(rP,this.onReady);let e=this.player;if(e){var t,r,a;null==(t=e.theoLive)||t.addEventListener("publicationloadstart",this.onLoadChannelStart),null==(r=e.theoLive)||r.addEventListener("publicationoffline",this.onChannelOffline),null==(a=e.theoLive)||a.addEventListener("publicationloaded",this.onChannelLoaded),e.addEventListener("error",this.onError)}},this.onLoadChannelStart=()=>{this.showMessage_("loading",void 0)},this.onChannelOffline=()=>{this.showMessage_("offline",void 0)},this.onChannelLoaded=()=>{this.hidePlayerError(),this.hideMessage_()},this.onError=e=>{let t=e.errorObject.code;if(t<13e3||t>=14e3){this.showMessage_("offline",void 0);return}this.stopHidingPlayerError(),this.hideMessage_()},this._loading=this._shadowRoot.querySelector("#loading-announcement"),this._offline=this._shadowRoot.querySelector("#offline-announcement"),this._announcement=this._shadowRoot.querySelector("#announcement"),this._errorDisplay=this._shadowRoot.querySelector("theoplayer-error-display"),this._playButton=this._shadowRoot.querySelector("theoplayer-play-button"),this._root=this._shadowRoot.querySelector("theoplayer-ui"),this._ui.addEventListener(rP,this.onReady)}}customElements.define("theolive-default-ui",rG),e.ActiveQualityDisplay=tv,e.AdClickThroughButton=rf,e.AdCountdown=rv,e.AdDisplay=ry,e.AdSkipButton=rw,e.AirPlayButton=rr,e.Attribute=p,e.Button=D,e.CastButton=t2,e.ChromecastButton=t7,e.ChromecastDisplay=re,e.CloseMenuButton=eM,e.ColorStops=tN,e.ControlBar=s,e.DefaultUI=rD,e.DurationDisplay=el,e.ErrorDisplay=t5,e.ExtensionSlot=rx,e.FullscreenButton=tD,e.GestureReceiver=rs,e.LanguageMenu=tn,e.LanguageMenuButton=th,e.LinkButton=B,e.LiveButton=rp,e.LoadingIndicator=ro,e.MediaTrackRadioButton=eD,e.Menu=ew,e.MenuButton=eP,e.MenuGroup=eC,e.MuteButton=Y,e.PlayButton=Q,e.PlaybackRateDisplay=tm,e.PlaybackRateMenu=tg,e.PlaybackRateMenuButton=tc,e.PlaybackRateRadioGroup=tp,e.PreviewThumbnail=tz,e.PreviewTimeDisplay=tK,e.QualityRadioButton=tk,e.QualityRadioGroup=tx,e.RadioButton=eu,e.RadioGroup=ev,e.Range=tB,e.SeekButton=Z,e.SettingsMenu=tL,e.SettingsMenuButton=tR,e.SlotContainer=c,e.StateReceiverMixin=H,e.THEOliveDefaultUI=rG,e.TextTrackOffRadioButton=e$,e.TextTrackRadioButton=eF,e.TextTrackStyleDisplay=e4,e.TextTrackStyleMenu=ta,e.TextTrackStyleRadioGroup=e9,e.TextTrackStyleResetButton=tT,e.TimeDisplay=eo,e.TimeRange=tJ,e.TrackRadioGroup=eW,e.UIContainer=rM,e.VolumeRange=t0,e.buttonTemplate=I,e.linkButtonTemplate=N,e.menuGroupTemplate=eA,e.menuTemplate=ek,e.rangeTemplate=tq,e.registerExtension=function(e){rA.push(e)},e.version="1.11.1"});
41
+ `);class rV extends HTMLElement{_upgradeProperty(e){if(this.hasOwnProperty(e)){let t=this[e];delete this[e],this[e]=t}}connectedCallback(){a(this),this._radioGroup instanceof ev||customElements.upgrade(this._radioGroup),this.shadowRoot.addEventListener("change",this._onChange)}disconnectedCallback(){this.shadowRoot.removeEventListener("change",this._onChange)}constructor(){super(),this._onChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))};let e=this.attachShadow({mode:"open"});e.appendChild(rH().content.cloneNode(!0)),this._radioGroup=e.querySelector("theoplayer-radio-group")}}customElements.define("theolive-bad-network-menu",rV);let rz=o("theolive-default-ui",'<style>:host{box-sizing:border-box;display:inline-block;font-family:Helvetica,Arial,sans-serif;position:relative;width:100%}:host([hidden]){display:none!important}theoplayer-ui{--theoplayer-loading-delay:0.1s;display:block;font-family:Helvetica,Arial,sans-serif;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}theoplayer-menu::part(heading){display:none!important}[part=centered-chrome] *{--theoplayer-control-height:48px}[part=middle-chrome]{flex-grow:1;justify-content:flex-end;pointer-events:none}[part=bottom-chrome],[part=middle-chrome]{display:flex;flex-flow:column nowrap;position:relative}[part=bottom-chrome]{align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:rgba(0,0,0,.5)}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{flex-grow:1}theoplayer-time-range{--theoplayer-control-height:12px;--theoplayer-range-track-pointer-background:hsla(0,0%,100%,.5)}:host(:not([mobile])) [mobile-only],:host([mobile]) [mobile-hidden]{display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([has-first-play]) [part=centered-chrome] :not(theoplayer-play-button),theoplayer-ui:not([has-first-play]) theoplayer-control-bar,theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui[playing-ad] [ad-hidden]{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part=centered-chrome] theoplayer-play-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:70px;overflow:hidden;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display{padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}p{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:20px;font-size:var(--theoplayer-text-font-size,20px)}#announcement,#loading-announcement,#offline-announcement{display:none}theolive-bad-network-button{display:none;display:var(--theolive-bad-network-button-display,none)}theoplayer-settings-menu-button{display:inline-flex;display:var(--theolive-quality-button-display,inline-flex)}</style><theoplayer-ui><p id="loading-announcement" no-auto-hide slot="centered-chrome"><slot name="loading-announcement">Loading...</slot></p><p id="offline-announcement" no-auto-hide slot="centered-chrome"><slot name="offline-announcement">The live stream hasn\'t started yet</slot></p><p id="announcement" no-auto-hide slot="centered-chrome"></p><theoplayer-loading-indicator slot="centered-loading" no-auto-hide part="loading-indicator"></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><theoplayer-play-button part="center-play-button"></theoplayer-play-button></div><div part="bottom-chrome"><theoplayer-control-bar><theoplayer-play-button mobile-hidden part="play-button"></theoplayer-play-button><theoplayer-mute-button part="mute-button"></theoplayer-mute-button><theoplayer-volume-range mobile-hidden part="volume-range"></theoplayer-volume-range><theoplayer-live-button ad-hidden live-only part="live-button"></theoplayer-live-button><span class="theoplayer-spacer"></span><theoplayer-settings-menu-button ad-hidden menu="all-quality-menu" part="quality-button"></theoplayer-settings-menu-button><theolive-bad-network-button ad-hidden menu="quality-menu" part="theolive-bad-network-button"></theolive-bad-network-button><theoplayer-fullscreen-button part="fullscreen-button"></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-menu id="quality-menu" slot="menu" menu-close-on-input hidden><theolive-bad-network-menu></theolive-bad-network-menu></theoplayer-menu><theoplayer-menu id="all-quality-menu" slot="menu" menu-close-on-input hidden><theoplayer-quality-radio-group></theoplayer-quality-radio-group></theoplayer-menu><theoplayer-error-display slot="error" part="error-display"></theoplayer-error-display></theoplayer-ui>');class rG extends rD{initShadowRoot(){let e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(rz().content.cloneNode(!0)),e}hidePlayerError(){this._root.removeAttribute("has-error"),this._errorDisplay.style.display="none"}stopHidingPlayerError(){this._root.setAttribute("has-error",""),this._errorDisplay.style.display="flex"}hidePlayerPlayButton_(){this._playButton.style.display="none"}stopHidingPlayerPlayButton(){this._playButton.style.display="inline-flex"}showMessage_(e,t){this.hidePlayerError(),this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none","loading"===e?this._loading.style.display="block":"offline"===e?this._offline.style.display="block":(this._announcement.textContent=null!=t?t:"",this._announcement.style.display="block"),this.hidePlayerPlayButton_()}hideMessage_(){this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none",this.stopHidingPlayerPlayButton()}constructor(e={}){super(e),this.onReady=()=>{this._ui.removeEventListener(rP,this.onReady);let e=this.player;if(e){var t,r,a;null==(t=e.theoLive)||t.addEventListener("publicationloadstart",this.onLoadChannelStart),null==(r=e.theoLive)||r.addEventListener("publicationoffline",this.onChannelOffline),null==(a=e.theoLive)||a.addEventListener("publicationloaded",this.onChannelLoaded),e.addEventListener("error",this.onError)}},this.onLoadChannelStart=()=>{this.showMessage_("loading",void 0)},this.onChannelOffline=()=>{this.showMessage_("offline",void 0)},this.onChannelLoaded=()=>{this.hidePlayerError(),this.hideMessage_()},this.onError=e=>{let t=e.errorObject.code;if(t<13e3||t>=14e3){this.showMessage_("offline",void 0);return}this.stopHidingPlayerError(),this.hideMessage_()},this._loading=this._shadowRoot.querySelector("#loading-announcement"),this._offline=this._shadowRoot.querySelector("#offline-announcement"),this._announcement=this._shadowRoot.querySelector("#announcement"),this._errorDisplay=this._shadowRoot.querySelector("theoplayer-error-display"),this._playButton=this._shadowRoot.querySelector("theoplayer-play-button"),this._root=this._shadowRoot.querySelector("theoplayer-ui"),this._ui.addEventListener(rP,this.onReady)}}customElements.define("theolive-default-ui",rG),e.ActiveQualityDisplay=tv,e.AdClickThroughButton=rf,e.AdCountdown=rv,e.AdDisplay=ry,e.AdSkipButton=rw,e.AirPlayButton=rr,e.Attribute=p,e.Button=D,e.CastButton=t2,e.ChromecastButton=t7,e.ChromecastDisplay=re,e.CloseMenuButton=eM,e.ColorStops=tN,e.ControlBar=s,e.DefaultUI=rD,e.DurationDisplay=el,e.ErrorDisplay=t5,e.ExtensionSlot=rx,e.FullscreenButton=tD,e.GestureReceiver=rs,e.LanguageMenu=tn,e.LanguageMenuButton=th,e.LinkButton=B,e.LiveButton=rp,e.LoadingIndicator=ro,e.MediaTrackRadioButton=eD,e.Menu=ew,e.MenuButton=eP,e.MenuGroup=eC,e.MuteButton=Y,e.PlayButton=Q,e.PlaybackRateDisplay=tm,e.PlaybackRateMenu=tg,e.PlaybackRateMenuButton=tc,e.PlaybackRateRadioGroup=tp,e.PreviewThumbnail=tz,e.PreviewTimeDisplay=tK,e.QualityRadioButton=tk,e.QualityRadioGroup=tx,e.RadioButton=eu,e.RadioGroup=ev,e.Range=tB,e.SeekButton=Z,e.SettingsMenu=tL,e.SettingsMenuButton=tR,e.SlotContainer=c,e.StateReceiverMixin=H,e.THEOliveDefaultUI=rG,e.TextTrackOffRadioButton=e$,e.TextTrackRadioButton=eF,e.TextTrackStyleDisplay=e4,e.TextTrackStyleMenu=ta,e.TextTrackStyleRadioGroup=e9,e.TextTrackStyleResetButton=tT,e.TimeDisplay=eo,e.TimeRange=tJ,e.TrackRadioGroup=eW,e.UIContainer=rM,e.VolumeRange=t0,e.buttonTemplate=I,e.linkButtonTemplate=N,e.menuGroupTemplate=eA,e.menuTemplate=ek,e.rangeTemplate=tq,e.registerExtension=function(e){rA.push(e)},e.version="1.11.2"});
42
42
  //# sourceMappingURL=THEOplayerUI.js.map