@theoplayer/web-ui 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -7
- package/dist/THEOplayerUI.d.ts +3 -2
- package/dist/THEOplayerUI.es5.js +2 -2
- package/dist/THEOplayerUI.es5.mjs +1 -1
- package/dist/THEOplayerUI.js +9 -9
- package/dist/THEOplayerUI.js.map +1 -1
- package/dist/THEOplayerUI.mjs +25 -8
- package/dist/THEOplayerUI.mjs.map +1 -1
- package/package.json +20 -18
package/dist/THEOplayerUI.es5.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* THEOplayer Web UI v1.
|
|
2
|
+
* THEOplayer Web UI v1.4.0
|
|
3
3
|
* License: MIT
|
|
4
|
-
*/!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("theoplayer/THEOplayer.chromeless")):"function"==typeof define&&define.amd?define(["exports","theoplayer/THEOplayer.chromeless"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).THEOplayerUI={},t.THEOplayer)}(this,function(t,e){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}function n(t,e,a){return(n=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}()?function(t,e,a){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return a&&r(o,a.prototype),o}:Reflect.construct).apply(null,arguments)}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t){var e="function"==typeof Map?new Map:void 0;return(i=function(t){var a=function(){return n(t,arguments,o(this).constructor)};if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,a)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r(a,t)})(t)}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function s(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(t,e)}}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=s(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var a=0;return function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow}function h(t,e){p()&&window.ShadyCSS.prepareTemplate(t,e)}function d(t){p()&&window.ShadyCSS.styleElement(t)}function c(t,e){void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeCss?window.ShadyCSS.styleSubtree(t,e):null!=e&&function(t,e){for(var r,a=t.style,n=u(Object.entries(e));!(r=n()).done;){var o=r.value,i=o[0],l=o[1];a.setProperty(i,l)}}(t,e)}var y,b,m,v,f=document.createElement("template");f.innerHTML="<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}:host([hidden]){display:none!important}::slotted(theoplayer-time-range){-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}</style><slot></slot>",h(f,"theoplayer-control-bar");var g=function(t){function e(){var e;return(e=t.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0}).appendChild(f.content.cloneNode(!0)),e}return a(e,t),e.prototype.connectedCallback=function(){d(this)},e}(i(HTMLElement));function _(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function k(t,e,r){return e&&_(t.prototype,e),r&&_(t,r),t}function A(t,e){return void 0===e&&(e=""),"<style>:host{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-button-text-color,var(--theoplayer-text-color,#fff));display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);justify-content:center;line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}:host([hidden]){display:none!important}:host(:not([disabled])){cursor:pointer}:host(:focus){-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}:host(:focus:not(:focus-visible)){-webkit-box-shadow:none;box-shadow:none}:host(:hover){background:transparent;background:var(--theoplayer-control-hover-background,var(--theoplayer-control-background,transparent))}:host([aria-checked=true]){background:#fff;background:var(--theoplayer-button-checked-background,#fff);color:#000;color:var(--theoplayer-button-checked-color,#000)}:host([disabled]){background:transparent;background:var(--theoplayer-control-background,transparent);color:#ccc;color:var(--theoplayer-button-disabled-text-color,#ccc)}[part$=icon],[part~=icon]{font-size:0}::slotted(img),::slotted(svg),img,svg{fill:currentColor;color:#fff;color:var(--theoplayer-icon-color,#fff);height:24px;height:var(--theoplayer-button-icon-height,var(--theoplayer-control-height,24px));max-height:100%;max-width:100%;min-width:100%;-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-button-icon-transition,none);transition:var(--theoplayer-button-icon-transition,none);vertical-align:middle;width:24px;width:var(--theoplayer-button-icon-width,var(--theoplayer-control-height,24px))}::slotted(img),img{-webkit-box-shadow:none;box-shadow:none;-webkit-box-shadow:var(--theoplayer-button-icon-shadow,none);box-shadow:var(--theoplayer-button-icon-shadow,none)}::slotted(svg),svg{-webkit-filter:drop-shadow(none);filter:drop-shadow(none);-webkit-filter:drop-shadow(var(--theoplayer-button-icon-shadow,none));filter:drop-shadow(var(--theoplayer-button-icon-shadow,none))}:host(:hover) ::slotted(img),:host(:hover) img{-webkit-box-shadow:0 0 4px hsla(0,0%,100%,.5);box-shadow:0 0 4px hsla(0,0%,100%,.5);-webkit-box-shadow:var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5));box-shadow:var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5))}:host(:hover) ::slotted(svg),:host(:hover) svg{-webkit-filter:drop-shadow(0 0 4px hsla(0,0%,100%,.5));filter:drop-shadow(0 0 4px rgba(255,255,255,.5));-webkit-filter:drop-shadow(var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5)));filter:drop-shadow(var(--theoplayer-button-hover-icon-shadow,0 0 4px rgba(255,255,255,.5)))}\n"+e+"</style>"+t}customElements.define("theoplayer-control-bar",g),(b=y||(y={}))[b.DOWN=40]="DOWN",b[b.LEFT=37]="LEFT",b[b.RIGHT=39]="RIGHT",b[b.SPACE=32]="SPACE",b[b.ENTER=13]="ENTER",b[b.UP=38]="UP",b[b.HOME=36]="HOME",b[b.END=35]="END",b[b.ESCAPE=27]="ESCAPE",t.Attribute=void 0,(m=t.Attribute||(t.Attribute={})).CONFIGURATION="configuration",m.SOURCE="source",m.AUTOPLAY="autoplay",m.MUTED="muted",m.FULLSCREEN="fullscreen",m.FLUID="fluid",m.MOBILE="mobile",m.MOBILE_ONLY="mobile-only",m.MOBILE_HIDDEN="mobile-hidden",m.USER_IDLE="user-idle",m.USER_IDLE_TIMEOUT="user-idle-timeout",m.NO_AUTO_HIDE="no-auto-hide",m.DISABLED="disabled",m.HIDDEN="hidden",m.PAUSED="paused",m.ENDED="ended",m.VOLUME_LEVEL="volume-level",m.CASTING="casting",m.LOADING="loading",m.STREAM_TYPE="stream-type",m.LIVE="live",m.LIVE_ONLY="live-only",m.LIVE_HIDDEN="live-hidden",m.LIVE_THRESHOLD="live-threshold",m.DVR_THRESHOLD="dvr-threshold",m.REMAINING="remaining",m.REMAINING_WHEN_LIVE="remaining-when-live",m.SHOW_DURATION="show-duration",m.SEEK_OFFSET="seek-offset",m.MENU="menu",m.MENU_OPENED="menu-opened",m.MENU_CLOSE_ON_INPUT="menu-close-on-input",m.ARIA_LABEL="aria-label",m.ARIA_LIVE="aria-live",m.ARIA_CHECKED="aria-checked",m.HAS_AUDIO="has-audio",m.HAS_SUBTITLES="has-subtitles",m.HAS_ERROR="has-error",m.HAS_FIRST_PLAY="has-first-play",m.HAS_TITLE="has-title",m.CAST_STATE="cast-state",m.TRACK_TYPE="track-type",m.SHOW_OFF="show-off",m.PLAYING_AD="playing-ad",m.SHOW_AD_MARKERS="show-ad-markers",m.CLICKTHROUGH="clickthrough",m.PROPERTY="property",m.VALUE="value";var w=document.createElement("template");w.innerHTML=A("<slot></slot>"),h(w,"theoplayer-button");var E=function(e){function r(t){(r=e.call(this)||this)._onKeyDown=function(t){if(!t.altKey)switch(t.keyCode){case y.SPACE:case y.ENTER:t.preventDefault(),r._onClick();break;default:return}},r._onClick=function(){r.disabled||r.handleClick()};var r,a,n=null!=(a=null==t?void 0:t.template)?a:w;return r.attachShadow({mode:"open"}).appendChild(n.content.cloneNode(!0)),r._upgradeProperty("disabled"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(t.Attribute.ARIA_LIVE)||this.setAttribute(t.Attribute.ARIA_LIVE,"polite"),this.addEventListener("keydown",this._onKeyDown),this.addEventListener("click",this._onClick)},n.disconnectedCallback=function(){this.removeEventListener("keydown",this._onKeyDown),this.removeEventListener("click",this._onClick)},n.attributeChangedCallback=function(e,a,n){if(e===t.Attribute.DISABLED&&n!==a){var o=null!=n;this.setAttribute("aria-disabled",o?"true":"false"),o?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}r.observedAttributes.indexOf(e)>=0&&c(this)},n.handleClick=function(){},k(r,[{key:"disabled",get:function(){return this.hasAttribute(t.Attribute.DISABLED)},set:function(e){e?this.setAttribute(t.Attribute.DISABLED,""):this.removeAttribute(t.Attribute.DISABLED)}}],[{key:"observedAttributes",get:function(){return[t.Attribute.DISABLED]}}]),r}(i(HTMLElement));function x(t,e){return void 0===e&&(e=""),A("<a>"+t+"</a>",":host{padding:0}a{color:#fff;color:var(--theoplayer-button-text-color,var(--theoplayer-text-color,#fff));padding:10px;padding:var(--theoplayer-control-padding,10px);-webkit-text-decoration:none;text-decoration:none}:host(:focus){-webkit-box-shadow:none;box-shadow:none;outline:0}a:focus{-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}a:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}:host([aria-checked=true]) a{color:#000;color:var(--theoplayer-button-checked-color,#000)}:host([disabled]) a{color:#ccc;color:var(--theoplayer-button-disabled-text-color,#ccc)}\n"+e)}customElements.define("theoplayer-button",E);var T=document.createElement("template");T.innerHTML=x("<slot></slot>"),h(T,"theoplayer-link-button");var C=function(e){function r(t){(r=e.call(this)||this)._onKeyDown=function(t){!t.altKey&&t.keyCode===y.SPACE&&(t.preventDefault(),r._linkEl.click())},r._onClick=function(){r.disabled||r.handleClick()};var r,a,n=null!=(a=null==t?void 0:t.template)?a:T,o=r.attachShadow({mode:"open",delegatesFocus:!0});return o.appendChild(n.content.cloneNode(!0)),r._linkEl=o.querySelector("a"),r._upgradeProperty("disabled"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(t.Attribute.ARIA_LIVE)||this.setAttribute(t.Attribute.ARIA_LIVE,"polite"),this._linkEl.addEventListener("keydown",this._onKeyDown),this._linkEl.addEventListener("click",this._onClick)},n.disconnectedCallback=function(){this._linkEl.removeEventListener("keydown",this._onKeyDown),this._linkEl.removeEventListener("click",this._onClick)},n.setLink=function(t,e){this._linkEl.href=t,this._linkEl.target=e},n.attributeChangedCallback=function(e,r,a){if(e===t.Attribute.DISABLED&&a!==r){var n=null!=a;this.setAttribute("aria-disabled",n?"true":"false"),n?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}E.observedAttributes.indexOf(e)>=0&&c(this)},n.handleClick=function(){},k(r,[{key:"disabled",get:function(){return this.hasAttribute(t.Attribute.DISABLED)},set:function(e){e?this.setAttribute(t.Attribute.DISABLED,""):this.removeAttribute(t.Attribute.DISABLED)}}],[{key:"observedAttributes",get:function(){return[t.Attribute.DISABLED]}}]),r}(i(HTMLElement));function L(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t,e,r,a,n,o,i){try{var l=t[o](i),s=l.value}catch(t){r(t);return}l.done?e(s):Promise.resolve(s).then(a,n)}function P(){}function M(t){return t.nodeType===Node.ELEMENT_NODE}function R(t){return t instanceof HTMLElement}customElements.define("theoplayer-link-button",C);var I="function"==typeof Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},O="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){return Array.prototype.slice.call(t)},D="function"==typeof Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){for(var r=0;r<t.length;r++)if(e(t[r],r,t))return t[r]},N="function"==typeof Array.prototype.findIndex?function(t,e){return t.findIndex(e)}:function(t,e){for(var r=0;r<t.length;r++)if(e(t[r],r,t))return r;return -1},q="function"==typeof String.prototype.startsWith?function(t,e){return t.startsWith(e)}:function(t,e){return t.substring(0,e.length)===e},F="undefined"!=typeof Intl&&Intl.DisplayNames?function(t){var e=new Intl.DisplayNames([t,"en"],{type:"language",fallback:"none"}).of(t);if(e)return e.slice(0,1).toUpperCase()+e.slice(1)}:function(t){};function B(t,e){void 0===t.textContent?t.innerText=e:t.textContent=e}var H="theoplayerUiObservedProperties";function U(t){return H in t&&I(t[H])}function z(t,e){return function(t){function r(){return t.apply(this,arguments)}return a(r,t),k(r,[{key:H,get:function(){return e}}]),r}(t)}function V(t,e,r){return G.apply(this,arguments)}function G(){var t;return t=function(t,e,r){var a,n,o,i,l,s,u,p,h,d;return n=this,o=function(n){switch(n.label){case 0:if(e.contains(t))return[2];if(!(t.nodeName.indexOf("-")>=0&&!U(t)))return[3,3];return[4,Promise.resolve()];case 1:return n.sent(),[4,customElements.whenDefined(t.nodeName.toLowerCase())];case 2:n.sent(),customElements.upgrade(t),n.label=3;case 3:if(U(t)&&r(t),!((a=L(R(t)?O(t.children):[]).concat(L(t.shadowRoot?O(t.shadowRoot.children):[]),L("slot"===t.localName.toLowerCase()?t.assignedNodes().filter(M):[]))).length>0))return[3,5];return[4,Promise.all(a.map(function(t){return V(t,e,r)}))];case 4:n.sent(),n.label=5;case 5:return[2]}},i=function(t){return function(e){return l([t,e])}},l=function(t){if(s)throw TypeError("Generator is already executing.");for(;h&&(h=0,t[0]&&(d=0)),d;)try{if(s=1,u&&(p=2&t[0]?u.return:t[0]?u.throw||((p=u.return)&&p.call(u),0):u.next)&&!(p=p.call(u,t[1])).done)return p;switch(u=0,p&&(t=[2&t[0],p.value]),t[0]){case 0:case 1:p=t;break;case 4:return d.label++,{value:t[1],done:!1};case 5:d.label++,u=t[1],t=[0];continue;case 7:t=d.ops.pop(),d.trys.pop();continue;default:if(!(p=(p=d.trys).length>0&&p[p.length-1])&&(6===t[0]||2===t[0])){d=0;continue}if(3===t[0]&&(!p||t[1]>p[0]&&t[1]<p[3])){d.label=t[1];break}if(6===t[0]&&d.label<p[1]){d.label=p[1],p=t;break}if(p&&d.label<p[2]){d.label=p[2],d.ops.push(t);break}p[2]&&d.ops.pop(),d.trys.pop();continue}t=o.call(n,d)}catch(e){t=[6,e],u=0}finally{s=p=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}},d={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]},h={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(h[Symbol.iterator]=function(){return this}),h},(G=function(){var e=this,r=arguments;return new Promise(function(a,n){var o=t.apply(e,r);function i(t){S(o,a,n,i,l,"next",t)}function l(t){S(o,a,n,i,l,"throw",t)}i(void 0)})}).apply(this,arguments)}var Q=document.createElement("template");Q.innerHTML=A('<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>\n</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>\n</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>\n</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}"),h(Q,"theoplayer-play-button");var Y=["seeking","seeked","ended","emptied"],K=function(e){function r(){var t;return(t=e.call(this,{template:Q})||this)._onPlay=function(){t.paused=!1,t._updateEnded()},t._onPause=function(){t.paused=!0,t._updateEnded()},t._updateFromPlayer=function(){var e,r;t.paused=null==(r=null==(e=t._player)?void 0:e.paused)||r,t._updateEnded()},t._upgradeProperty("paused"),t._upgradeProperty("ended"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},n._updateEnded=function(){var t,e;this.ended=null!=(e=null==(t=this._player)?void 0:t.ended)&&e},n.handleClick=function(){void 0!==this._player&&(this._player.paused?this._player.play():this._player.pause())},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&(c(this),this._updateAriaLabel())},n._updateAriaLabel=function(){var e=this.ended?"replay":this.paused?"play":"pause";this.setAttribute(t.Attribute.ARIA_LABEL,e)},k(r,[{key:"paused",get:function(){return this.hasAttribute(t.Attribute.PAUSED)},set:function(e){e?this.setAttribute(t.Attribute.PAUSED,""):this.removeAttribute(t.Attribute.PAUSED)}},{key:"ended",get:function(){return this.hasAttribute(t.Attribute.ENDED)},set:function(e){e?this.setAttribute(t.Attribute.ENDED,""):this.removeAttribute(t.Attribute.ENDED)}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&(this._player.removeEventListener("play",this._onPlay),this._player.removeEventListener("pause",this._onPause),this._player.removeEventListener(Y,this._updateFromPlayer)),this._player=t,this._updateFromPlayer(),void 0!==this._player&&(this._player.addEventListener("play",this._onPlay),this._player.addEventListener("pause",this._onPause),this._player.addEventListener(Y,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return L(E.observedAttributes).concat([t.Attribute.PAUSED,t.Attribute.ENDED])}}]),r}(z(E,["player"]));customElements.define("theoplayer-play-button",K);var W=document.createElement("template");W.innerHTML=A('<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>\n</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>\n</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>\n</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}"),h(W,"theoplayer-mute-button");var Z=["volumechange"],j=function(e){function r(){var r;return(r=e.call(this,{template:W})||this)._updateFromPlayer=function(){var e="off";if(void 0!==r._player){var a=r._player.volume;e=r._player.muted?"off":a<.5?"low":"high"}r.setAttribute(t.Attribute.VOLUME_LEVEL,e)},r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},n.handleClick=function(){void 0!==this._player&&(this._player.muted=!this._player.muted,this._updateFromPlayer())},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&(c(this),this._updateAriaLabel())},n._updateAriaLabel=function(){var e="off"===this.getAttribute(t.Attribute.VOLUME_LEVEL)?"unmute":"mute";this.setAttribute(t.Attribute.ARIA_LABEL,e)},k(r,[{key:"volumeLevel",get:function(){return this.getAttribute(t.Attribute.VOLUME_LEVEL)||"off"}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener(Z,this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(Z,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return L(E.observedAttributes).concat([t.Attribute.VOLUME_LEVEL])}}]),r}(z(E,["player"]));customElements.define("theoplayer-mute-button",j);var X=document.createElement("template");X.innerHTML=A('<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>\n</slot></span><span part="offset"></span>',':host{position:relative}:host([seek-offset^="-"]) [part=icon]{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[part=offset]{color:#fff;color:var(--theoplayer-icon-color,#fff);font-size:7.2px;font-size:var(--theoplayer-seek-button-font-size,calc(var(--theoplayer-button-icon-height, var(--theoplayer-control-height, 24px))*.3));left:50%;position:absolute;top:52.5%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}'),h(X,"theoplayer-seek-button");var J=function(e){function r(){var t;return(t=e.call(this,{template:X})||this)._offsetEl=t.shadowRoot.querySelector('[part="offset"]'),t._upgradeProperty("player"),t._upgradeProperty("seekOffset"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},n.handleClick=function(){if(void 0!==this._player){var t=this._player.duration;isNaN(t)||(this._player.currentTime=Math.max(0,Math.min(t,this._player.currentTime+this.seekOffset)))}},n.attributeChangedCallback=function(a,n,o){e.prototype.attributeChangedCallback.call(this,a,n,o),o!==n&&(a===t.Attribute.SEEK_OFFSET&&B(this._offsetEl,String(Math.abs(this.seekOffset))),r.observedAttributes.indexOf(a)>=0&&(c(this),this._updateAriaLabel()))},n._updateAriaLabel=function(){var e=this.seekOffset;this.setAttribute(t.Attribute.ARIA_LABEL,e>=0?"seek forward by "+e+" seconds":"seek backward by "+-e+" seconds")},k(r,[{key:"seekOffset",get:function(){var e;return Number(null!=(e=this.getAttribute(t.Attribute.SEEK_OFFSET))?e:10)},set:function(e){this.setAttribute(t.Attribute.SEEK_OFFSET,String(e))}},{key:"player",get:function(){return this._player},set:function(t){this._player=t}}],[{key:"observedAttributes",get:function(){return L(E.observedAttributes).concat([t.Attribute.SEEK_OFFSET])}}]),r}(z(E,["player"]));customElements.define("theoplayer-seek-button",J);var $=":host{background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-text-color,#fff);display:inline-block;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));overflow:hidden;padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:auto;text-align:center;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}";function tt(t){return!isNaN(t)&&isFinite(t)}function te(t,e,r){void 0===e&&(e=0);var a,n=t<0||r&&0===t,o=Math.floor(e/60%60),i=Math.floor(e/3600);if(tt(t=Math.abs(t))){var l=Math.floor(t%60),s=Math.floor(t/60%60),u=Math.floor(t/3600),p=u>0||i>0;a=[p?""+u:"",(p||o>=0)&&s<10?"0"+s:""+s,l<10?"0"+l:""+l]}else a=[i>0?"--":"","--","--"];return(n?"-":"")+a.filter(function(t){return""!==t}).join(":")}var tr=[["hour","hours"],["minute","minutes"],["second","seconds"]];function ta(t,e){var r=tr[e][1===t?0:1];return t+" "+r}function tn(t,e){if(!tt(t))return"";var r=t<0||e&&0===t,a=Math.floor((t=Math.abs(t))%60),n=Math.floor(t/60)%60,o=Math.floor(t/3600);return""+[0===o?"":ta(o,0),0===n?"":ta(n,1),0===a&&(o>0||n>0)?"":ta(a,2)].filter(function(t){return""!==t}).join(", ")+(r?" remaining":"")}var to=document.createElement("template");to.innerHTML="<style>"+$+"</style><span></span>",h(to,"theoplayer-time-display");var ti=["timeupdate","seeking","seeked","durationchange"],tl=function(e){function r(){(r=e.call(this)||this)._updateFromPlayer=function(){var e,a,n,o=r._player?r._player.currentTime:0,i=r._player?r._player.duration:NaN,l=null==(e=r._player)?void 0:e.seekable,s=isFinite(i)?i:l&&l.length>0?l.end(0):NaN,u=r.hasAttribute(t.Attribute.REMAINING)||r.hasAttribute(t.Attribute.REMAINING_WHEN_LIVE)&&"vod"!==r.streamType,p=o;u&&(p=-((s||0)-o));var h=r.hasAttribute(t.Attribute.SHOW_DURATION);a=h&&!u?te(p,s,u)+" / "+te(s):te(p,s,u),n=isNaN(i)?"video not loaded, unknown time":h?tn(p,u)+" of "+tn(s):tn(p,u),B(r._spanEl,a),r.setAttribute("aria-valuetext",n)};var r,a=r.attachShadow({mode:"open"});return a.appendChild(to.content.cloneNode(!0)),r._spanEl=a.querySelector("span"),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this),this.hasAttribute(t.Attribute.ARIA_LIVE)||this.setAttribute(t.Attribute.ARIA_LIVE,"off"),this._updateFromPlayer()},n.attributeChangedCallback=function(t,e,a){a!==e&&r.observedAttributes.indexOf(t)>=0&&(this._updateFromPlayer(),c(this))},k(r,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener(ti,this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(ti,this._updateFromPlayer))}},{key:"streamType",get:function(){return this.getAttribute(t.Attribute.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(t.Attribute.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[t.Attribute.REMAINING,t.Attribute.REMAINING_WHEN_LIVE,t.Attribute.SHOW_DURATION,t.Attribute.STREAM_TYPE]}}]),r}(z(HTMLElement,["player","streamType"]));customElements.define("theoplayer-time-display",tl);var ts=document.createElement("template");ts.innerHTML="<style>"+$+"</style><span></span>",h(ts,"theoplayer-duration-display");var tu=["durationchange"],tp=function(e){function r(){(t=e.call(this)||this)._updateFromPlayer=function(){var e=te(t._player?t._player.duration:NaN);B(t._spanEl,e)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(ts.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this),this.hasAttribute(t.Attribute.ARIA_LIVE)||this.setAttribute(t.Attribute.ARIA_LIVE,"off"),this._updateFromPlayer()},k(r,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener(tu,this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(tu,this._updateFromPlayer))}}]),r}(z(HTMLElement,["player"]));function th(){return(th=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t}).apply(this,arguments)}customElements.define("theoplayer-duration-display",tp);var td=!function(){try{var t=new Event("change");return"change"===t.type}catch(t){}return!1}()?function(t,e){var r=document.createEvent("Event");return r.initEvent(t,(null==e?void 0:e.bubbles)||!1,(null==e?void 0:e.cancelable)||!1),r}:function(t,e){return new Event(t,e)},tc=!function(){try{var t=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,(null==e?void 0:e.bubbles)||!1,(null==e?void 0:e.cancelable)||!1,null==e?void 0:e.detail),r}:function(t,e){return new CustomEvent(t,e)},ty=document.createElement("template");ty.innerHTML=A("<slot></slot>"),h(ty,"theoplayer-radio-button");var tb=function(e){function r(t){var r;return(r=e.call(this,th({template:ty},t))||this)._value=void 0,r._upgradeProperty("checked"),r}a(r,e);var n=r.prototype;return n.connectedCallback=function(){this.hasAttribute("role")||this.setAttribute("role","radio"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),e.prototype.connectedCallback.call(this)},n.handleClick=function(){this.checked=!0,this.dispatchEvent(td("input",{bubbles:!0,composed:!0}))},n.attributeChangedCallback=function(a,n,o){e.prototype.attributeChangedCallback.call(this,a,n,o),o!==n&&(a===t.Attribute.ARIA_CHECKED?this.dispatchEvent(td("change",{bubbles:!0})):a===t.Attribute.VALUE&&(this.value=o),r.observedAttributes.indexOf(a)>=0&&c(this))},k(r,[{key:"checked",get:function(){return"true"===this.getAttribute(t.Attribute.ARIA_CHECKED)},set:function(e){this.setAttribute(t.Attribute.ARIA_CHECKED,e?"true":"false")}},{key:"value",get:function(){return this._value},set:function(t){this._value=t}}],[{key:"observedAttributes",get:function(){return L(E.observedAttributes).concat([t.Attribute.ARIA_CHECKED,t.Attribute.VALUE])}}]),r}(E);customElements.define("theoplayer-radio-button",tb);var tm=document.createElement("template");tm.innerHTML="<slot></slot>",h(tm,"theoplayer-radio-group");var tv=function(t){function e(){(e=t.call(this)||this)._radioButtons=[],e._onSlotChange=function(){for(var t,r,a=e._slot.assignedNodes({flatten:!0}).filter(M),n=u(a);!(r=n()).done;){var o=r.value;if(!tf(o)){var i=o.nodeName.toLowerCase();i.indexOf("-")>=0&&(customElements.get(i)?customElements.upgrade(o):customElements.whenDefined(i).then(e._onSlotChange,P))}}e._radioButtons=a.filter(tf),e.focusedRadioButton||null==(t=e.firstRadioButton)||t.setAttribute("tabindex","0")},e._onKeyDown=function(t){switch(t.keyCode){case y.UP:case y.LEFT:t.preventDefault(),e._focusPrevButton();break;case y.DOWN:case y.RIGHT:t.preventDefault(),e._focusNextButton();break;case y.HOME:t.preventDefault(),e.setFocusedRadioButton(e.firstRadioButton);break;case y.END:t.preventDefault(),e.setFocusedRadioButton(e.lastRadioButton)}},e._onButtonChange=function(t){var r=t.target;null!==r&&r.checked&&e.setCheckedRadioButton(t.target)};var e,r=e.attachShadow({mode:"open"});return r.appendChild(tm.content.cloneNode(!0)),e._slot=r.querySelector("slot"),e}a(e,t);var r=e.prototype;return r.connectedCallback=function(){d(this),this.hasAttribute("role")||this.setAttribute("role","radiogroup"),this.addEventListener("keydown",this._onKeyDown),this.shadowRoot.addEventListener("change",this._onButtonChange),this._slot.addEventListener("slotchange",this._onSlotChange),this._onSlotChange()},r.disconnectedCallback=function(){this.removeEventListener("keydown",this._onKeyDown),this.shadowRoot.removeEventListener("change",this._onButtonChange),this._slot.removeEventListener("slotchange",this._onSlotChange)},r.allRadioButtons=function(){return this._radioButtons},r._prevRadioButton=function(t){var e=this._radioButtons.indexOf(t);return e>0?this._radioButtons[e-1]:null},r._nextRadioButton=function(t){var e=this._radioButtons.indexOf(t);return e>=0&&e<this._radioButtons.length-1?this._radioButtons[e+1]:null},r._focusPrevButton=function(){var t=this.focusedRadioButton||this.firstRadioButton;t&&(t===this.firstRadioButton?this.setFocusedRadioButton(this.lastRadioButton):this.setFocusedRadioButton(this._prevRadioButton(t)))},r._focusNextButton=function(){var t=this.focusedRadioButton||this.firstRadioButton;t&&(t===this.lastRadioButton?this.setFocusedRadioButton(this.firstRadioButton):this.setFocusedRadioButton(this._nextRadioButton(t)))},r.setFocusedRadioButton=function(t){this._unfocusAll(),t&&(t.tabIndex=0,t.focus())},r._unfocusAll=function(){for(var t,e=u(this.allRadioButtons());!(t=e()).done;)t.value.tabIndex=-1},r.setCheckedRadioButton=function(t){for(var e,r=u(this.allRadioButtons());!(e=r()).done;){var a=e.value;a.checked=a===t}this.dispatchEvent(td("change",{bubbles:!0}))},k(e,[{key:"focusedRadioButton",get:function(){var t;return null!=(t=D(this._radioButtons,function(t){return 0===t.tabIndex}))?t:null}},{key:"checkedRadioButton",get:function(){var t;return null!=(t=D(this._radioButtons,function(t){return t.checked}))?t:null}},{key:"firstRadioButton",get:function(){var t;return null!=(t=this._radioButtons[0])?t:null}},{key:"lastRadioButton",get:function(){var t=this._radioButtons;return t.length>0?t[t.length-1]:null}}]),e}(i(HTMLElement));function tf(t){return t instanceof tb}customElements.define("theoplayer-radio-group",tv);var tg="theoplayermenuclose",t_="theoplayermenuchange";function tk(t,e,r){return void 0===r&&(r=""),"<style>:host{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-menu-color,#fff);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);pointer-events:none}:host([hidden]){display:none!important}[part=heading]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-align:center;-ms-flex-align:center;align-items:center;align-self:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:auto}[part=heading] ::slotted(span),[part=heading]>span{padding:10px;padding:var(--theoplayer-control-padding,10px);padding-left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[part=content],[part=heading]>theoplayer-menu-close-button{pointer-events:auto}[part=content]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-item-align:center;-ms-grid-row-align:center;--theoplayer-control-hover-background:var(--theoplayer-menu-control-hover-background,hsla(0,0%,100%,.3));align-self:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:10px;margin:var(--theoplayer-menu-margin,10px);max-height:100%;max-width:100%;max-width:var(--theoplayer-menu-max-width,100%);min-height:0;min-width:80%;min-width:var(--theoplayer-menu-min-width,80%);overflow-y:auto}"+r+'</style><div part="heading"><theoplayer-menu-close-button></theoplayer-menu-close-button>'+t+'</div><div part="content">'+e+"</div>"}var tA=document.createElement("template");tA.innerHTML=tk('<slot name="heading"></slot>',"<slot></slot>"),h(tA,"theoplayer-menu");var tw=function(e){function r(r){(a=e.call(this)||this)._onContentInput=function(){if(a.hasAttribute(t.Attribute.MENU_CLOSE_ON_INPUT)){var e=tc(tg,{bubbles:!0,composed:!0});a.dispatchEvent(e)}};var a,n,o=null!=(n=null==r?void 0:r.template)?n:tA,i=a.attachShadow({mode:"open",delegatesFocus:!0});return i.appendChild(o.content.cloneNode(!0)),a._contentEl=i.querySelector('[part="content"]'),a}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this),this.hasAttribute(t.Attribute.MENU_OPENED)||this.setAttribute("hidden",""),this._contentEl.addEventListener("input",this._onContentInput)},n.disconnectedCallback=function(){this._contentEl.removeEventListener("input",this._onContentInput)},n.openMenu=function(){this.setAttribute(t.Attribute.MENU_OPENED,"")},n.closeMenu=function(){this.removeAttribute(t.Attribute.MENU_OPENED)},n.attributeChangedCallback=function(e,a,n){if(n!==a){if(e===t.Attribute.MENU_OPENED){null!=n?this.removeAttribute("hidden"):this.setAttribute("hidden","");var o=tc(t_,{bubbles:!0});this.dispatchEvent(o)}r.observedAttributes.indexOf(e)>=0&&c(this)}},k(r,null,[{key:"observedAttributes",get:function(){return[t.Attribute.MENU_OPENED,t.Attribute.MENU_CLOSE_ON_INPUT]}}]),r}(i(HTMLElement));customElements.define("theoplayer-menu",tw);var tE="theoplayermenutoggle";function tx(t,e){return void 0===e&&(e=""),"<style>:host{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;pointer-events:none}:host([hidden]){display:none!important}::slotted(*),:host>*{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-ms-grid-column-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;justify-self:stretch;min-height:0}"+e+"</style>"+t}var tT=document.createElement("template");tT.innerHTML=tx("<slot></slot>"),h(tT,"theoplayer-menu-group");var tC=function(e){function r(t){(a=e.call(this)||this)._menus=[],a._openMenuStack=[],a._onMenuListChange=function(){for(var t,e=L(O(a.shadowRoot.children)).concat(L(a._menuSlot?a._menuSlot.assignedNodes({flatten:!0}).filter(M):[])),r=u(e);!(t=r()).done;){var n=t.value;if(!tL(n)){var o=n.nodeName.toLowerCase();o.indexOf("-")>=0&&(customElements.get(o)?customElements.upgrade(n):customElements.whenDefined(o).then(a._onMenuListChange,P))}}for(var i,l=e.filter(tL),s=u(a._menus);!(i=s()).done;){var p=i.value;0>l.indexOf(p)&&a.closeMenu(p.id)}for(var h,d=u(l);!(h=d()).done;){var c=h.value;0>a._menus.indexOf(c)&&c.closeMenu()}a._menus=l},a._onToggleMenu=function(t){var e=t.detail.menu;if(a.getMenuById(e)){t.stopPropagation();var r=R(t.target)?t.target:void 0;a.isMenuOpen(e)?a.closeMenu(e):a.openMenu(e,r)}},a._onCloseMenu=function(t){a.closeCurrentMenu()&&(t.preventDefault(),t.stopPropagation())},a._onMenuChange=function(t){var e=a.getCurrentMenu_();e&&e.menu===t.target&&e.menu instanceof r&&!e.menu.hasCurrentMenu()&&a.closeCurrentMenu()},a._onKeyDown=function(t){!t.altKey&&t.keyCode===y.ESCAPE&&a.closeCurrentMenu()&&(t.preventDefault(),t.stopPropagation())};var a,n,o=null!=(n=null==t?void 0:t.template)?n:tT,i=a.attachShadow({mode:"open",delegatesFocus:!0});return i.appendChild(o.content.cloneNode(!0)),a._menuSlot=i.querySelector("slot"),a}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){var e;d(this),this.hasAttribute(t.Attribute.MENU_OPENED)||this.setAttribute("hidden",""),this._onMenuListChange(),this.shadowRoot.addEventListener(tE,this._onToggleMenu),this.shadowRoot.addEventListener(tg,this._onCloseMenu),this.shadowRoot.addEventListener(t_,this._onMenuChange),null==(e=this._menuSlot)||e.addEventListener("slotchange",this._onMenuListChange)},n.disconnectedCallback=function(){var t;this.shadowRoot.removeEventListener(tE,this._onToggleMenu),this.shadowRoot.removeEventListener(tg,this._onCloseMenu),this.shadowRoot.removeEventListener(t_,this._onMenuChange),null==(t=this._menuSlot)||t.removeEventListener("slotchange",this._onMenuListChange)},n.attributeChangedCallback=function(e,a,n){if(n!==a){if(e===t.Attribute.MENU_OPENED){null!=n?(this.removeAttribute("hidden"),this.removeEventListener("keydown",this._onKeyDown),this.addEventListener("keydown",this._onKeyDown)):(this.setAttribute("hidden",""),this.removeEventListener("keydown",this._onKeyDown));var o=tc(t_,{bubbles:!0});this.dispatchEvent(o)}r.observedAttributes.indexOf(e)>=0&&c(this)}},n.getMenuById=function(t){return t&&t!==this.id?D(this._menus,function(e){return e.id===t}):this},n.openMenu=function(e,r){var a=this.getMenuById(e);if(a===this&&(a=this._menus[0]),!a)return!1;var n=this.getCurrentMenu_(),o=N(this._openMenuStack,function(t){return t.menu===a});return o>=0?this.closeMenusFromIndex_(o+1):this._openMenuStack.push({menu:a,opener:r}),n&&n.menu.closeMenu(),a.openMenu(),this.setAttribute(t.Attribute.MENU_OPENED,""),a.focus(),!0},n.closeMenu=function(e){var r,a,n=this.getMenuById(e);if(n===this&&(n=null==(a=this._openMenuStack[0])?void 0:a.menu),!n)return!1;var o=N(this._openMenuStack,function(t){return t.menu===n});if(o<0)return!1;var i=this._openMenuStack[o];this.closeMenusFromIndex_(o);var l=this.getCurrentMenu_();return void 0!==l?(l.menu.openMenu(),this.setAttribute(t.Attribute.MENU_OPENED,""),i.opener&&l.menu.contains(i.opener)?i.opener.focus():l.menu.focus(),!0):(this.removeAttribute(t.Attribute.MENU_OPENED),null==(r=i.opener)||r.focus(),!0)},n.closeMenusFromIndex_=function(t){for(var e=this._openMenuStack.length-t,r=this._openMenuStack.length-1;r>=t;r--)this._openMenuStack[r].menu.closeMenu();this._openMenuStack.splice(t,e)},n.hasCurrentMenu=function(){return this._openMenuStack.length>0},n.getCurrentMenu_=function(){return this._openMenuStack.length>0?this._openMenuStack[this._openMenuStack.length-1]:void 0},n.closeCurrentMenu=function(){var t=this.getCurrentMenu_();return void 0!==t&&(this.closeMenu(t.menu.id),!0)},n.isMenuOpen=function(t){var e=this.getMenuById(t);return!!e&&this._openMenuStack.some(function(t){return t.menu===e})},k(r,null,[{key:"observedAttributes",get:function(){return[t.Attribute.MENU_OPENED]}}]),r}(i(HTMLElement));function tL(t){return!!R(t)&&(t instanceof tw||t instanceof tC)}customElements.define("theoplayer-menu-group",tC);var tS=document.createElement("template");tS.innerHTML=A("<slot></slot>"),h(tS,"theoplayer-menu-button");var tP=function(e){function r(t){var r;return(r=e.call(this,th({template:tS},t))||this)._upgradeProperty("menu"),r}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute("aria-haspopup")||this.setAttribute("aria-haspopup","true")},n.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),r!==t.Attribute.MENU||this.hasAttribute("aria-controls")&&this.getAttribute("aria-controls")!==a||this.setAttribute("aria-controls",n)},n.handleClick=function(){var t=this.menu;if(t){var e=tc(tE,{bubbles:!0,composed:!0,detail:{menu:t}});this.dispatchEvent(e)}},k(r,[{key:"menu",get:function(){return this.getAttribute(t.Attribute.MENU)},set:function(e){e?this.setAttribute(t.Attribute.MENU,e):this.removeAttribute(t.Attribute.MENU)}}],[{key:"observedAttributes",get:function(){return L(E.observedAttributes).concat([t.Attribute.MENU])}}]),r}(E);customElements.define("theoplayer-menu-button",tP);var tM=document.createElement("template");tM.innerHTML=A('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="m10.525 19.275-6.375-6.35q-.175-.2-.262-.437Q3.8 12.25 3.8 12t.088-.488q.087-.237.262-.437l6.375-6.35q.375-.375.925-.388.55-.012.95.388.375.4.388.937.012.538-.363.938l-4.1 4.075H18.35q.55 0 .938.387.387.388.387.938 0 .55-.387.938-.388.387-.938.387H8.325l4.1 4.075q.35.375.363.925.012.55-.363.95-.4.4-.95.4-.55 0-.95-.4Z"/></svg>\n</slot></span>'),h(tM,"theoplayer-menu-close-button");var tR=function(e){function r(){return e.call(this,{template:tM})}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.ARIA_LABEL)||this.setAttribute(t.Attribute.ARIA_LABEL,"close menu")},n.handleClick=function(){var t=tc(tg,{bubbles:!0,composed:!0});this.dispatchEvent(t)},k(r,null,[{key:"observedAttributes",get:function(){return[].concat(E.observedAttributes)}}]),r}(E);customElements.define("theoplayer-menu-close-button",tR);var tI=document.createElement("template");tI.innerHTML=A("<slot></slot>"),h(tI,"theoplayer-media-track-radio-button");var tO=["change","update"],tD=function(e){function r(){var t;return(t=e.call(this,{template:tI})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}a(r,e);var n=r.prototype;return n._updateFromTrack=function(){B(this._slotEl,this._track?function(t){var e=t.label;if(e)return e;var r=t.language;return r&&(F(r)||r)||""}(this._track):""),this.checked=!!this._track&&this._track.enabled},n._updateTrack=function(){this._track&&(this._track.enabled=this.checked)},n.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),r===t.Attribute.ARIA_CHECKED&&a!==n&&this._updateTrack()},k(r,[{key:"track",get:function(){return this._track},set:function(t){this._track!==t&&(this._track&&this._track.removeEventListener(tO,this._onTrackChange),this._track=t,this._updateFromTrack(),t&&t.addEventListener(tO,this._onTrackChange))}}]),r}(tb);customElements.define("theoplayer-media-track-radio-button",tD);var tN=":host,theoplayer-radio-group{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host([hidden]){display:none!important}",tq=document.createElement("template");tq.innerHTML=A("<slot></slot>"),h(tq,"theoplayer-text-track-radio-button");var tF=["change","update"],tB=function(e){function r(){var t;return(t=e.call(this,{template:tq})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}a(r,e);var n=r.prototype;return n._updateFromTrack=function(){B(this._slotEl,this._track?function(t){var e=t.label;if(e)return e;var r=t.language;return r&&(F(r)||r)||""}(this._track):""),this.checked=!!this._track&&"showing"===this._track.mode},n._updateTrack=function(){this._track&&(this._track.mode=this.checked?"showing":"disabled")},n.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),r===t.Attribute.ARIA_CHECKED&&a!==n&&this._updateTrack()},k(r,[{key:"track",get:function(){return this._track},set:function(t){this._track!==t&&(this._track&&this._track.removeEventListener(tF,this._onTrackChange),this._track=t,this._updateFromTrack(),t&&t.addEventListener(tF,this._onTrackChange))}}]),r}(tb);function tH(t){return"subtitles"===t.kind||"captions"===t.kind}function tU(t){var e=null==t?void 0:t.targetQuality;return void 0===e||Array.isArray(e)||(e=[e]),e}function tz(t){return t?t.label&&""!==t.label?t.label:t.height?""+t.height+"p":t.bandwidth?function(t){if(t.bandwidth)return t.bandwidth>1e7?""+(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?""+(t.bandwidth/1e6).toFixed(1)+"Mbps":""+(t.bandwidth/1e3).toFixed(0)+"kbps"}(t):void 0:void 0}customElements.define("theoplayer-text-track-radio-button",tB);var tV=document.createElement("template");tV.innerHTML=A("<slot>Off</slot>"),h(tV,"theoplayer-text-track-off-radio-button");var tG=["change"],tQ=function(e){function r(){var t;return(t=e.call(this,{template:tV})||this)._trackList=void 0,t._onTrackChange=function(){t._updateFromTrackList()},t._upgradeProperty("trackList"),t}a(r,e);var n=r.prototype;return n._updateFromTrackList=function(){this.checked=!this._trackList||!this._trackList.filter(tH).some(function(t){return"showing"===t.mode})},n._updateTrackList=function(){this._trackList&&this.checked&&function(t){for(var e,r=u(t);!(e=r()).done;){var a=e.value;tH(a)&&"showing"===a.mode&&(a.mode="disabled")}}(this._trackList)},n.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),r===t.Attribute.ARIA_CHECKED&&a!==n&&this._updateTrackList()},k(r,[{key:"trackList",get:function(){return this._trackList},set:function(t){this._trackList&&this._trackList.removeEventListener(tG,this._onTrackChange),this._trackList=t,this._updateFromTrackList(),t&&t.addEventListener(tG,this._onTrackChange)}}]),r}(tb);customElements.define("theoplayer-text-track-off-radio-button",tQ);var tY=document.createElement("template");tY.innerHTML="<style>"+tN+"</style><theoplayer-radio-group></theoplayer-radio-group>",h(tY,"theoplayer-track-radio-group");var tK=["addtrack","removetrack"],tW=function(e){function r(){(t=e.call(this)||this)._updateTracks=function(){var e=O(t._radioGroup.children),r=t._getTracks();void 0!==t._offButton&&(e=e.slice(1));for(var a,n=u(e);!(a=n()).done;){var o=a.value;(!o.track||0>r.indexOf(o.track))&&t._radioGroup.removeChild(o)}for(var i,l=u(r);!(i=l()).done;){var s=i.value;if(!function(t,e){for(var r=0;r<t.length;r++)if(t[r].track===e)return!0;return!1}(e,s)){var p=t._createTrackButton(s);t._radioGroup.appendChild(p)}}},t._onChange=function(){t.dispatchEvent(td("change",{bubbles:!0}))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tY.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._upgradeProperty("trackType"),t._upgradeProperty("showOffButton"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this),this._radioGroup instanceof tv||customElements.upgrade(this._radioGroup),this._updateOffButton(),this._updateTracks(),this.shadowRoot.addEventListener("change",this._onChange)},n.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},n._getTracksList=function(){if(void 0!==this._player){var t=this.trackType;return"audio"===t?this._player.audioTracks:"video"===t?this._player.videoTracks:"subtitles"===t?this._player.textTracks:void 0}},n._updateTracksList=function(){var t=this._tracksList,e=this._getTracksList();t!==e&&(null==t||t.removeEventListener(tK,this._updateTracks),null==e||e.addEventListener(tK,this._updateTracks),this._tracksList=e,this._updateOffButton())},n._getTracks=function(){if(void 0===this._player)return[];var t=this.trackType;return"audio"===t?this._player.audioTracks:"video"===t?this._player.videoTracks:"subtitles"===t?this._player.textTracks.filter(tH):[]},n._createTrackButton=function(t){if("subtitles"===this.trackType){var e=new tB;return e.track=t,e}var r=new tD;return r.track=t,r},n._updateOffButton=function(){"subtitles"===this.trackType&&this.showOffButton?(void 0===this._offButton&&(this._offButton=new tQ,this._radioGroup.insertBefore(this._offButton,this._radioGroup.firstChild)),this._offButton.trackList=this._tracksList):void 0!==this._offButton&&(this._radioGroup.removeChild(this._offButton),this._offButton=void 0)},n.attributeChangedCallback=function(e,a,n){n!==a&&(e===t.Attribute.TRACK_TYPE?(this._updateTracksList(),this._updateTracks()):e===t.Attribute.SHOW_OFF&&(this._updateOffButton(),this._updateTracks()),r.observedAttributes.indexOf(e)>=0&&c(this))},k(r,[{key:"trackType",get:function(){return this.getAttribute(t.Attribute.TRACK_TYPE)||"audio"},set:function(e){this.setAttribute(t.Attribute.TRACK_TYPE,e||"audio")}},{key:"showOffButton",get:function(){return this.hasAttribute(t.Attribute.SHOW_OFF)},set:function(e){e?this.setAttribute(t.Attribute.SHOW_OFF,""):this.removeAttribute(t.Attribute.SHOW_OFF)}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(this._player=t,this._updateTracksList(),this._updateTracks())}}],[{key:"observedAttributes",get:function(){return[t.Attribute.TRACK_TYPE,t.Attribute.SHOW_OFF]}}]),r}(z(HTMLElement,["player"]));customElements.define("theoplayer-track-radio-group",tW);var tZ=".theoplayer-menu-table{-ms-grid-columns:-webkit-max-content 1fr;-ms-grid-columns:max-content 1fr;-ms-grid-rows:auto auto;display:-ms-grid;display:grid;grid-template-columns:-webkit-max-content 1fr;grid-template-columns:max-content 1fr;grid-template-rows:auto auto}.theoplayer-menu-table>:first-child{-ms-grid-column:1;-ms-grid-row:1}.theoplayer-menu-table>:nth-child(2){-ms-grid-column:2;-ms-grid-row:1}.theoplayer-menu-table>:nth-child(3){-ms-grid-column:1;-ms-grid-row:2}.theoplayer-menu-table>:nth-child(4){-ms-grid-column:2;-ms-grid-row:2}.theoplayer-menu-table>*{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;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)}.theoplayer-menu-table>span{display:block}";function tj(t){var e,r;return t?q(t,"rgb")?(e=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/i))?{r_:parseInt(e[1],10),g_:parseInt(e[2],10),b_:parseInt(e[3],10),a_:e[4]?parseFloat(e[4]):1}:null:q(t,"#")&&(r=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i))?{r_:parseInt(r[1],16),g_:parseInt(r[2],16),b_:parseInt(r[3],16),a_:1}:null:null}function tX(t){return"rgba("+t.r_+","+t.g_+","+t.b_+","+t.a_+")"}function tJ(t){return"rgb("+t.r_+","+t.g_+","+t.b_+")"}function t$(t,e){return{r_:t.r_,g_:t.g_,b_:t.b_,a_:e}}var t0=tj("#ffffff"),t1=tj("#000000"),t5=[["White","rgb(255,255,255)"],["Yellow","rgb(255,255,0)"],["Green","rgb(0,255,0)"],["Cyan","rgb(0,255,255)"],["Blue","rgb(0,0,255)"],["Magenta","rgb(255,0,255)"],["Red","rgb(255,0,0)"],["Black","rgb(0,0,0)"]],t2=[["Monospace Serif",'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace'],["Proportional Serif",'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif'],["Monospace Sans",'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace'],["Proportional Sans",'Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif']],t3=[["None","none"],["Drop shadow","dropshadow"],["Raised","raised"],["Depressed","depressed"],["Uniform","uniform"]],t4=function(e){function r(){(t=e.call(this)||this)._updateFromPlayer=function(){if(void 0!==t._player){var e=t.property;switch(e){case"fontFamily":B(t._spanEl,function(t){if(!t)return"Default";var e=D(t2,function(e){return e[0],e[1]===t});return e?e[0]:"Custom"}(t._player.textTrackStyle.fontFamily));break;case"fontColor":case"backgroundColor":case"windowColor":B(t._spanEl,function(t){if(!t)return"Default";var e=tj(t);if(e){var r=tJ(e),a=D(t5,function(t){return t[0],t[1]===r});if(a)return a[0]}return"Custom"}(t._player.textTrackStyle[e]));break;case"fontOpacity":B(t._spanEl,t8(t._player.textTrackStyle.fontColor));break;case"backgroundOpacity":B(t._spanEl,t8(t._player.textTrackStyle.backgroundColor));break;case"windowOpacity":B(t._spanEl,t8(t._player.textTrackStyle.windowColor));break;case"edgeStyle":B(t._spanEl,function(t){if(!t)return"Default";var e=D(t3,function(e){return e[0],e[1]===t});return e?e[0]:"Custom"}(t._player.textTrackStyle.edgeStyle));break;default:var r=t._player.textTrackStyle[e];B(t._spanEl,r||"Default")}}};var t,r=t.attachShadow({mode:"open"});return t._spanEl=document.createElement("span"),r.appendChild(t._spanEl),t._upgradeProperty("property"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){d(this),this.hasAttribute(t.Attribute.PROPERTY)||(this.property="fontColor")},n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.attributeChangedCallback=function(e,a,n){n!==a&&(e===t.Attribute.PROPERTY&&this._updateFromPlayer(),r.observedAttributes.indexOf(e)>=0&&c(this))},k(r,[{key:"property",get:function(){return this.getAttribute(t.Attribute.PROPERTY)},set:function(e){this.setAttribute(t.Attribute.PROPERTY,e)}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.textTrackStyle.removeEventListener("change",this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.textTrackStyle.addEventListener("change",this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[t.Attribute.PROPERTY]}}]),r}(z(HTMLElement,["player"]));function t8(t){if(!t)return"Default";var e=tj(t);return e?""+100*e.a_+"%":"Custom"}customElements.define("theoplayer-text-track-style-display",t4);var t7=document.createElement("template");t7.innerHTML="<style>"+tN+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>",h(t7,"theoplayer-text-track-style-radio-group");var t6=function(e){function r(){(t=e.call(this)||this)._updateChecked=function(){for(var e,r=t._radioGroup.allRadioButtons(),a=u(r);!(e=a()).done;){var n=e.value;n.checked=n.value===t.value}},t._onChange=function(){var e=t._radioGroup.checkedRadioButton;null!==e&&t.value!==e.value&&(t.value=e.value)},t._updateFromPlayer=function(){if(void 0!==t._player)switch(t.property){case"fontColor":var e,r,a=t._player.textTrackStyle.fontColor;t.value=a?tJ(null!=(r=tj(a))?r:t0):"";break;case"backgroundColor":var n,o=t._player.textTrackStyle.backgroundColor;t.value=o?tJ(null!=(n=tj(o))?n:t1):"";break;case"windowColor":var i,l=t._player.textTrackStyle.windowColor;t.value=l?tJ(null!=(i=tj(l))?i:t1):"";break;case"fontOpacity":var s,u,p=t._player.textTrackStyle.fontColor;t.value=p?String((null!=(u=null==(s=tj(p))?void 0:s.a_)?u:1)*100):"";break;case"backgroundOpacity":var h,d,c=t._player.textTrackStyle.backgroundColor;t.value=c?String((null!=(d=null==(h=tj(c))?void 0:h.a_)?d:1)*100):"";break;case"windowOpacity":var y,b,m=t._player.textTrackStyle.windowColor;t.value=m?String((null!=(b=null==(y=tj(m))?void 0:y.a_)?b:1)*100):"";break;default:t.value=null!=(e=t._player.textTrackStyle[t.property])?e:""}};var t,r=t.attachShadow({mode:"open"});return r.appendChild(t7.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._optionsSlot=r.querySelector("slot"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){d(this),this._radioGroup instanceof tv||customElements.upgrade(this._radioGroup),this._upgradeProperty("property"),this._upgradeProperty("value"),this._upgradeProperty("player"),this.hasAttribute(t.Attribute.PROPERTY)||(this.property="fontColor"),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},n.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n._updateToPlayer=function(){if(void 0!==this._player)switch(this.property){case"fontColor":this._player.textTrackStyle.fontColor=t9(this.value,this._player.textTrackStyle.fontColor,t0);break;case"backgroundColor":this._player.textTrackStyle.backgroundColor=t9(this.value,this._player.textTrackStyle.backgroundColor,t1);break;case"windowColor":this._player.textTrackStyle.windowColor=t9(this.value,this._player.textTrackStyle.windowColor,t1);break;case"fontOpacity":this._player.textTrackStyle.fontColor=et(this.value,this._player.textTrackStyle.fontColor,t0);break;case"backgroundOpacity":this._player.textTrackStyle.backgroundColor=et(this.value,this._player.textTrackStyle.backgroundColor,t1);break;case"windowOpacity":this._player.textTrackStyle.windowColor=et(this.value,this._player.textTrackStyle.windowColor,t1);break;default:this._player.textTrackStyle[this.property]=""==this.value?void 0:this.value}},n.attributeChangedCallback=function(e,a,n){n!==a&&(e===t.Attribute.PROPERTY&&this._updateFromPlayer(),r.observedAttributes.indexOf(e)>=0&&c(this))},k(r,[{key:"property",get:function(){return this.getAttribute(t.Attribute.PROPERTY)},set:function(e){this.setAttribute(t.Attribute.PROPERTY,e)}},{key:"value",get:function(){return this._value},set:function(t){this._value!==t&&(this._value=t,this._updateToPlayer(),this._updateChecked(),this.dispatchEvent(td("change",{bubbles:!0})))}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.textTrackStyle.removeEventListener("change",this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.textTrackStyle.addEventListener("change",this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[t.Attribute.PROPERTY]}}]),r}(z(HTMLElement,["player"]));function t9(t,e,r){var a,n,o,i=null!=(n=null==(a=tj(e))?void 0:a.a_)?n:1;if(""!==t||1!==i)return tX(t$(null!=(o=tj(t))?o:r,i))}function et(t,e,r){var a,n=null!=(a=tj(e))?a:r;if(""!==t||n.r_!==r.r_||n.g_!==r.g_||n.b_!==r.b_)return tX(t$(n,""==t?1:Number(t)/100))}customElements.define("theoplayer-text-track-style-radio-group",t6);var ee=document.createElement("template");ee.innerHTML=tx('<theoplayer-menu class="theoplayer-text-track-style-menu"><span class="theoplayer-menu-heading" slot="heading"><slot name="heading">Subtitle options</slot></span><theoplayer-text-track-style-reset-button class="theoplayer-menu-heading-button" slot="heading"></theoplayer-text-track-style-reset-button><div class="theoplayer-menu-table"><span>Font family</span><theoplayer-menu-button menu="font-family-menu"><theoplayer-text-track-style-display property="fontFamily"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font color</span><theoplayer-menu-button menu="font-color-menu"><theoplayer-text-track-style-display property="fontColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font opacity</span><theoplayer-menu-button menu="font-opacity-menu"><theoplayer-text-track-style-display property="fontOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font size</span><theoplayer-menu-button menu="font-size-menu"><theoplayer-text-track-style-display property="fontSize"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Background color</span><theoplayer-menu-button menu="background-color-menu"><theoplayer-text-track-style-display property="backgroundColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Background opacity</span><theoplayer-menu-button menu="background-opacity-menu"><theoplayer-text-track-style-display property="backgroundOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Window color</span><theoplayer-menu-button menu="window-color-menu"><theoplayer-text-track-style-display property="windowColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Window opacity</span><theoplayer-menu-button menu="window-opacity-menu"><theoplayer-text-track-style-display property="windowOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Character edge style</span><theoplayer-menu-button menu="edge-style-menu"><theoplayer-text-track-style-display property="edgeStyle"></theoplayer-text-track-style-display></theoplayer-menu-button></div></theoplayer-menu><theoplayer-menu id="font-family-menu" menu-close-on-input hidden><span slot="heading">Font family</span><theoplayer-text-track-style-radio-group property="fontFamily"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value=\'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace\'>Monospace Serif</theoplayer-radio-button><theoplayer-radio-button value=\'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif\'>Proportional Serif</theoplayer-radio-button><theoplayer-radio-button value=\'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace\'>Monospace Sans</theoplayer-radio-button><theoplayer-radio-button value=\'Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif\'>Proportional Sans</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-color-menu" menu-close-on-input hidden><span slot="heading">Font color</span><theoplayer-text-track-style-radio-group property="fontColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-opacity-menu" menu-close-on-input hidden><span slot="heading">Font opacity</span><theoplayer-text-track-style-radio-group property="fontOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-size-menu" menu-close-on-input hidden><span slot="heading">Font size</span><theoplayer-text-track-style-radio-group property="fontSize"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="50%">50%</theoplayer-radio-button><theoplayer-radio-button value="75%">75%</theoplayer-radio-button><theoplayer-radio-button value="100%">100%</theoplayer-radio-button><theoplayer-radio-button value="150%">150%</theoplayer-radio-button><theoplayer-radio-button value="200%">200%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="background-color-menu" menu-close-on-input hidden><span slot="heading">Background color</span><theoplayer-text-track-style-radio-group property="backgroundColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="background-opacity-menu" menu-close-on-input hidden><span slot="heading">Background opacity</span><theoplayer-text-track-style-radio-group property="backgroundOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="window-color-menu" menu-close-on-input hidden><span slot="heading">Window color</span><theoplayer-text-track-style-radio-group property="windowColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="window-opacity-menu" menu-close-on-input hidden><span slot="heading">Window opacity</span><theoplayer-text-track-style-radio-group property="windowOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="edge-style-menu" menu-close-on-input hidden><span slot="heading">Character edge style</span><theoplayer-text-track-style-radio-group property="edgeStyle"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="none">None</theoplayer-radio-button><theoplayer-radio-button value="dropshadow">Drop shadow</theoplayer-radio-button><theoplayer-radio-button value="raised">Raised</theoplayer-radio-button><theoplayer-radio-button value="depressed">Depressed</theoplayer-radio-button><theoplayer-radio-button value="uniform">Uniform</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu>',tZ+"\n.theoplayer-menu-heading{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.theoplayer-menu-heading-button{-ms-flex-item-align:end;align-self:flex-end}"),h(ee,"theoplayer-text-track-style-menu");var er=function(t){function e(){return t.call(this,{template:ee})}return a(e,t),e}(tC);customElements.define("theoplayer-text-track-style-menu",er);var ea=document.createElement("template");ea.innerHTML=tx('<theoplayer-menu><span class="theoplayer-menu-heading" slot="heading"><slot name="heading">Language</slot></span><theoplayer-settings-menu-button class="theoplayer-menu-heading-button" menu="subtitle-options-menu" slot="heading"></theoplayer-settings-menu-button><div part="content"><div part="audio"><h2>Audio</h2><theoplayer-track-radio-group track-type="audio"></theoplayer-track-radio-group></div><div part="subtitles"><h2>Subtitles</h2><theoplayer-track-radio-group track-type="subtitles" show-off></theoplayer-track-radio-group></div></div></theoplayer-menu><theoplayer-text-track-style-menu id="subtitle-options-menu"></theoplayer-text-track-style-menu>',".theoplayer-menu-heading{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.theoplayer-menu-heading-button{-ms-flex-item-align:end;align-self:flex-end}[part=audio],[part=subtitles],theoplayer-track-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:0}[part=content]{-ms-grid-columns:1fr;display:-ms-grid;display:grid;grid-template-columns:1fr;min-height:0}:host([has-audio][has-subtitles]) [part=content]{-ms-grid-columns:1fr 10px 1fr;grid-template-columns:1fr 10px 1fr}:host([has-audio][has-subtitles]) [part=audio]{-ms-grid-column:1;grid-column:1}:host([has-audio][has-subtitles]) [part=subtitles]{-ms-grid-column:3;grid-column:3}:host(:not([has-audio])) [part=audio],:host(:not([has-subtitles])) [part=subtitles]{display:none!important}[part=audio],[part=subtitles]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;align-self:stretch;-ms-flex-direction:column;flex-direction:column;text-align:center}h2{margin:0 0 .5em}theoplayer-track-radio-group{overflow-y:auto}"),h(ea,"theoplayer-language-menu");var en=["addtrack","removetrack"],eo=function(e){function r(){var r;return(r=e.call(this,{template:ea})||this)._updateAudioTracks=function(){var e,a;(null!=(a=null==(e=r._player)?void 0:e.audioTracks)?a:[]).length<2?r.removeAttribute(t.Attribute.HAS_AUDIO):r.setAttribute(t.Attribute.HAS_AUDIO,"")},r._updateTextTracks=function(){var e,a;0===(null!=(a=null==(e=r._player)?void 0:e.textTracks.filter(tH))?a:[]).length?r.removeAttribute(t.Attribute.HAS_SUBTITLES):r.setAttribute(t.Attribute.HAS_SUBTITLES,"")},r._upgradeProperty("player"),r}return a(r,e),r.prototype.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&c(this)},k(r,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&(this._player.audioTracks.removeEventListener(en,this._updateAudioTracks),this._player.textTracks.removeEventListener(en,this._updateTextTracks)),this._player=t,this._updateAudioTracks(),this._updateTextTracks(),void 0!==this._player&&(this._player.audioTracks.addEventListener(en,this._updateAudioTracks),this._player.textTracks.addEventListener(en,this._updateTextTracks)))}}],[{key:"observedAttributes",get:function(){return L(tC.observedAttributes).concat([t.Attribute.HAS_AUDIO,t.Attribute.HAS_SUBTITLES])}}]),r}(z(tC,["player"]));customElements.define("theoplayer-language-menu",eo);var ei=document.createElement("template");ei.innerHTML=A('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M17.469 15.446a6.892 6.892 310 1 0-4.772 3.342l2.872.986q1.9.626 1.9-1.374v-2.954l2.598 1.5V22q0 2-1.899 1.374l-4.95-1.632a9.892 9.892 310 1 1 6.849-4.796zM7 10a1 1 180 1 0 0 2 1 1 180 1 0 0-2zm4 0a1 1 180 1 0 0 2h5a1 1 180 1 0 0-2zm-3 4a1 1 180 1 0 0 2h3a1 1 180 1 0 0-2zm7 0a1 1 180 1 0 0 2 1 1 180 1 0 0-2z"/></svg>\n</slot></span>'),h(ei,"theoplayer-language-menu-button");var el=["addtrack","removetrack"],es=function(e){function r(){var t;return(t=e.call(this,{template:ei})||this)._updateTracks=function(){void 0!==t._player&&(t._player.audioTracks.length>=2||t._player.textTracks.some(tH))?t.removeAttribute("hidden"):t.setAttribute("hidden","")},t._upgradeProperty("player"),t}return a(r,e),r.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.ARIA_LABEL)||this.setAttribute(t.Attribute.ARIA_LABEL,"open language menu")},k(r,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&(this._player.audioTracks.removeEventListener(el,this._updateTracks),this._player.textTracks.removeEventListener(el,this._updateTracks)),this._player=t,this._updateTracks(),void 0!==this._player&&(this._player.audioTracks.addEventListener(el,this._updateTracks),this._player.textTracks.addEventListener(el,this._updateTracks)))}}]),r}(z(tP,["player"]));customElements.define("theoplayer-language-menu-button",es);var eu=document.createElement("template");eu.innerHTML="<style>"+tN+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>",h(eu,"theoplayer-playback-rate-radio-group");var ep=function(t){function e(){(e=t.call(this)||this)._value=1,e._updateChecked=function(){for(var t,r=e._radioGroup.allRadioButtons(),a=u(r);!(t=a()).done;){var n=t.value;n.checked=Number(n.value)===e.value}},e._onChange=function(){var t=e._radioGroup.checkedRadioButton;null!==t&&e.value!==Number(t.value)&&(e.value=t.value)},e._updateFromPlayer=function(){void 0!==e._player&&(e.value=e._player.playbackRate)};var e,r=e.attachShadow({mode:"open"});return r.appendChild(eu.content.cloneNode(!0)),e._radioGroup=r.querySelector("theoplayer-radio-group"),e._optionsSlot=r.querySelector("slot"),e._upgradeProperty("value"),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){d(this),this._radioGroup instanceof tv||customElements.upgrade(this._radioGroup),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},k(e,[{key:"value",get:function(){return this._value},set:function(t){t=Number(t),this._value!==t&&(this._value=t,void 0!==this._player&&(this._player.playbackRate=t),this._updateChecked(),this.dispatchEvent(td("change",{bubbles:!0})))}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener("ratechange",this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener("ratechange",this._updateFromPlayer))}}]),e}(z(HTMLElement,["player"]));customElements.define("theoplayer-playback-rate-radio-group",ep);var eh=document.createElement("template");eh.innerHTML=A('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 96 960 960" height="24" width="24"><path d="M418 716q24 24 61.435 23.5T536 712l171.826-250.174q12.392-19.087-1.652-32.283-14.044-13.195-33.131-.804L424 600q-27 19.13-28.5 55.565T418 716ZM204 915.218q-25.522 0-49.609-12.826-24.087-12.826-36.783-34.783-26.565-46.696-41.696-100.022Q60.782 714.261 60.782 656q0-86.391 32.913-162.566 32.913-76.174 89.956-133.217 57.044-57.044 133.436-90.24Q393.478 236.782 480 236.782q43.87 0 85.87 8.934 42 8.935 81 26.239 28.913 12.696 33.826 38.762 4.913 26.065-13.044 48.153-10.261 12.391-28.217 15.521-17.957 3.131-32.914-3.565-31.434-14.869-62.043-21.456-30.608-6.587-64.478-6.587-129.043 0-221.13 91.522Q166.783 525.826 166.783 656q0 42 10.935 79.891 10.934 37.891 30.804 73.326h542.956q23-38 32.37-75.608Q793.217 696 793.217 652q0-31.609-6.804-62.565-6.804-30.956-20.543-60.826-7.566-16.957-3.718-35.196 3.848-18.239 17.674-29.5 21.653-18.522 47.153-10.261t36.761 35.609q16.305 38 25.457 78.217 9.152 40.218 10.021 82.522 0 58.696-14.348 113.522-14.347 54.826-42.478 104.087-14.391 23.087-37.631 35.348-23.239 12.261-48.761 12.261H204ZM480 576Z"/></svg>\n</slot></span>'),h(eh,"theoplayer-playback-rate-button");var ed=function(e){function r(){return e.call(this,{template:eh})}return a(r,e),r.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.ARIA_LABEL)||this.setAttribute(t.Attribute.ARIA_LABEL,"open playback speed menu")},r}(tP);customElements.define("theoplayer-playback-rate-menu-button",ed);var ec=document.createElement("template");ec.innerHTML=tk('<span slot="heading"><slot name="heading">Playback speed</slot></span>','<theoplayer-playback-rate-radio-group><theoplayer-radio-button value="0.25">0.25x</theoplayer-radio-button><theoplayer-radio-button value="0.5">0.5x</theoplayer-radio-button><theoplayer-radio-button value="1">Normal</theoplayer-radio-button><theoplayer-radio-button value="1.25">1.25x</theoplayer-radio-button><theoplayer-radio-button value="1.5">1.5x</theoplayer-radio-button><theoplayer-radio-button value="2">2x</theoplayer-radio-button></theoplayer-playback-rate-radio-group>'),h(ec,"theoplayer-playback-rate-menu");var ey=function(t){function e(){return t.call(this,{template:ec})}return a(e,t),e}(tw);customElements.define("theoplayer-playback-rate-menu",ey);var eb=function(t){function e(){(e=t.call(this)||this)._playbackRate=1;var e,r=e.attachShadow({mode:"open"});return e._spanEl=document.createElement("span"),r.appendChild(e._spanEl),e._upgradeProperty("playbackRate"),e}a(e,t);var r=e.prototype;return r.connectedCallback=function(){d(this)},r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},k(e,[{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,B(this._spanEl,1===t?"Normal":""+t+"x")}}]),e}(z(HTMLElement,["playbackRate"]));customElements.define("theoplayer-playback-rate-display",eb);var em=function(t){function e(){(e=t.call(this)||this)._activeVideoQuality=void 0,e._targetVideoQualities=void 0;var e,r=e.attachShadow({mode:"open"});return e._spanEl=document.createElement("span"),r.appendChild(e._spanEl),e._upgradeProperty("activeVideoQuality"),e._upgradeProperty("targetVideoQualities"),e}a(e,t);var r=e.prototype;return r.connectedCallback=function(){d(this)},r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.update_=function(){var t=void 0!==this._targetVideoQualities&&1===this._targetVideoQualities.length,e=t?this._targetVideoQualities[0]:void 0,r=tz(null!=e?e:this._activeVideoQuality);B(this._spanEl,t?null!=r?r:"Unknown":"Automatic"+(r?" ("+r+")":""))},k(e,[{key:"activeVideoQuality",get:function(){return this._activeVideoQuality},set:function(t){this._activeVideoQuality=t,this.update_()}},{key:"targetVideoQualities",get:function(){return this._targetVideoQualities},set:function(t){this._targetVideoQualities=t,this.update_()}}]),e}(z(HTMLElement,["activeVideoQuality","targetVideoQualities"]));customElements.define("theoplayer-active-quality-display",em);var ev=document.createElement("template");ev.innerHTML=A("<slot></slot>"),h(ev,"theoplayer-quality-radio-button");var ef=["activequalitychanged","targetqualitychanged"],eg=["update"],e_=function(e){function r(){var t;return(t=e.call(this,{template:ev})||this)._track=void 0,t._quality=void 0,t._updateFromTrack=function(){if(void 0!==t._track){var e=t._track.targetQuality;void 0===t._quality?t.checked=void 0===e:t.checked=Array.isArray(e)?e.indexOf(t._quality)>=0:e===t._quality}t._updateFromQuality()},t._updateFromQuality=function(){var e;B(t._slotEl,null!=(e=tz(t._quality))?e:"Automatic")},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t._upgradeProperty("quality"),t}a(r,e);var n=r.prototype;return n._updateTargetQuality=function(){this._track&&this.checked&&(this._track.targetQuality=this._quality)},n.attributeChangedCallback=function(a,n,o){e.prototype.attributeChangedCallback.call(this,a,n,o),o!==n&&(a===t.Attribute.ARIA_CHECKED&&this._updateTargetQuality(),r.observedAttributes.indexOf(a)>=0&&c(this))},k(r,[{key:"track",get:function(){return this._track},set:function(t){this._track!==t&&(this._track&&this._track.removeEventListener(ef,this._updateFromTrack),this._track=t,this._updateFromTrack(),t&&t.addEventListener(ef,this._updateFromTrack))}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality!==t&&(this._quality&&this._quality.removeEventListener(eg,this._updateFromQuality),this._quality=t,this._updateFromTrack(),t&&t.addEventListener(eg,this._updateFromQuality))}}]),r}(tb);customElements.define("theoplayer-quality-radio-button",e_);var ek=document.createElement("template");ek.innerHTML="<style>"+tN+"</style><theoplayer-radio-group></theoplayer-radio-group>",h(ek,"theoplayer-quality-radio-group");var eA=["addtrack","removetrack","change"],ew=function(t){function e(){(e=t.call(this)||this)._onChange=function(){e.dispatchEvent(td("change",{bubbles:!0}))},e._updateTrack=function(){var t=e._player?D(e._player.videoTracks,function(t){return t.enabled}):void 0;e._track!==t&&(e._track=t,e._update())},e._update=function(){for(var t=O(e._radioGroup.children),r=e._track?e._track.qualities:[],a=1===r.length?[void 0]:[void 0].concat(L(r)),n=0;n<t.length&&n<a.length;){var o=t[n];o.track=e._track,o.quality=a[n],n++}for(;n<t.length;)e._radioGroup.removeChild(t[n]),n++;for(;n<a.length;){var i=new e_;i.track=e._track,i.quality=a[n],e._radioGroup.appendChild(i),n++}};var e,r=e.attachShadow({mode:"open"});return r.appendChild(ek.content.cloneNode(!0)),e._radioGroup=r.querySelector("theoplayer-radio-group"),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){d(this),this._radioGroup instanceof tv||customElements.upgrade(this._radioGroup),this._updateTrack(),this.shadowRoot.addEventListener("change",this._onChange)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},k(e,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.videoTracks.removeEventListener(eA,this._updateTrack),this._player=t,this._updateTrack(),void 0!==this._player&&this._player.videoTracks.addEventListener(eA,this._updateTrack))}}]),e}(z(HTMLElement,["player"]));customElements.define("theoplayer-quality-radio-group",ew);var eE=document.createElement("template");eE.innerHTML=A("<slot>Reset</slot>"),h(eE,"theoplayer-text-track-style-reset-button");var ex=function(t){function e(){return t.call(this,{template:eE})}return a(e,t),e.prototype.handleClick=function(){if(void 0!==this._player){var t=this._player.textTrackStyle;t.fontFamily=void 0,t.fontColor=void 0,t.fontSize=void 0,t.backgroundColor=void 0,t.windowColor=void 0,t.edgeStyle=void 0}},k(e,[{key:"player",get:function(){return this._player},set:function(t){this._player=t}}],[{key:"observedAttributes",get:function(){return[].concat(E.observedAttributes)}}]),e}(z(E,["player"]));customElements.define("theoplayer-text-track-style-reset-button",ex);var eT=document.createElement("template");eT.innerHTML=tx('<theoplayer-menu><span slot="heading"><slot name="heading">Settings</slot></span><div class="theoplayer-menu-table"><span>Quality</span><theoplayer-menu-button menu="quality-menu"><theoplayer-active-quality-display></theoplayer-active-quality-display></theoplayer-menu-button><span>Playback speed</span><theoplayer-menu-button menu="playback-rate-menu"><theoplayer-playback-rate-display></theoplayer-playback-rate-display></theoplayer-menu-button></div></theoplayer-menu><theoplayer-menu id="quality-menu" menu-close-on-input hidden><span slot="heading">Quality</span><theoplayer-quality-radio-group></theoplayer-quality-radio-group></theoplayer-menu><theoplayer-playback-rate-menu id="playback-rate-menu" menu-close-on-input hidden><span slot="heading">Playback speed</span></theoplayer-playback-rate-menu>',tZ),h(eT,"theoplayer-settings-menu");var eC=function(t){function e(){return t.call(this,{template:eT})}return a(e,t),e}(tC);customElements.define("theoplayer-settings-menu",eC);var eL=document.createElement("template");eL.innerHTML=A('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M14 22.475h-4q-.475 0-.863-.337-.387-.338-.437-.813l-.3-2.2q-.2-.075-.4-.2t-.375-.25l-2.05.85q-.475.2-.937.05-.463-.15-.738-.6l-1.975-3.45q-.25-.45-.162-.95.087-.5.487-.775l1.775-1.35Q4 12.325 4 12.225v-.45q0-.1.025-.225L2.25 10.2q-.4-.3-.487-.8-.088-.5.162-.925L3.9 5.025q.25-.45.725-.588.475-.137.95.038l2.075.875q.175-.15.363-.263.187-.112.387-.187l.3-2.225q.05-.5.425-.825.375-.325.875-.325h4q.5 0 .875.325t.425.825l.3 2.225q.2.075.4.187.2.113.375.263l2.05-.875q.475-.175.938-.025.462.15.737.575l2 3.45q.25.45.15.95-.1.5-.5.775l-1.775 1.35v.675q0 .1-.025.225l1.775 1.35q.4.275.487.775.088.5-.162.95l-2 3.45q-.25.425-.725.587-.475.163-.95-.037l-2.025-.85q-.175.125-.362.25-.188.125-.388.2l-.3 2.2q-.05.475-.425.813-.375.337-.875.337ZM12 15.5q1.45 0 2.475-1.025Q15.5 13.45 15.5 12q0-1.45-1.025-2.475Q13.45 8.5 12 8.5q-1.45 0-2.475 1.025Q8.5 10.55 8.5 12q0 1.45 1.025 2.475Q10.55 15.5 12 15.5Z"/></svg>\n</slot></span>'),h(eL,"theoplayer-settings-menu-button");var eS=function(e){function r(){return e.call(this,{template:eL})}return a(r,e),r.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.ARIA_LABEL)||this.setAttribute(t.Attribute.ARIA_LABEL,"open settings menu")},r}(tP);customElements.define("theoplayer-settings-menu-button",eS);var eP="theoplayerfullscreenenter",eM="theoplayerfullscreenexit",eR=document.createElement("template");eR.innerHTML=A('<span part="enter-icon"><slot name="enter-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M5.9 19.225q-.475 0-.8-.325-.325-.325-.325-.8V15q0-.475.325-.812.325-.338.8-.338.5 0 .825.338.325.337.325.812v1.95H9q.475 0 .812.325.338.325.338.825 0 .475-.338.8-.337.325-.812.325Zm0-9.075q-.475 0-.8-.338-.325-.337-.325-.812V5.9q0-.475.325-.8.325-.325.8-.325H9q.475 0 .812.325.338.325.338.8 0 .5-.338.825-.337.325-.812.325H7.05V9q0 .475-.325.812-.325.338-.825.338Zm9.1 9.075q-.475 0-.812-.325-.338-.325-.338-.8 0-.5.338-.825.337-.325.812-.325h1.95V15q0-.475.325-.812.325-.338.825-.338.475 0 .8.338.325.337.325.812v3.1q0 .475-.325.8-.325.325-.8.325Zm3.1-9.075q-.5 0-.825-.338-.325-.337-.325-.812V7.05H15q-.475 0-.812-.325-.338-.325-.338-.825 0-.475.338-.8.337-.325.812-.325h3.1q.475 0 .8.325.325.325.325.8V9q0 .475-.325.812-.325.338-.8.338Z"/></svg>\n</slot></span><span part="exit-icon"><slot name="exit-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M9 19.225q-.475 0-.812-.325-.338-.325-.338-.8v-1.95H5.9q-.475 0-.8-.338-.325-.337-.325-.812 0-.475.325-.812.325-.338.8-.338H9q.475 0 .812.338.338.337.338.812v3.1q0 .475-.338.8-.337.325-.812.325ZM5.9 10.15q-.475 0-.8-.338-.325-.337-.325-.812 0-.475.325-.813.325-.337.8-.337h1.95V5.9q0-.475.338-.8.337-.325.812-.325.475 0 .812.325.338.325.338.8V9q0 .475-.338.812-.337.338-.812.338Zm9.1 9.075q-.475 0-.812-.325-.338-.325-.338-.8V15q0-.475.338-.812.337-.338.812-.338h3.1q.475 0 .8.338.325.337.325.812 0 .475-.325.812-.325.338-.8.338h-1.95v1.95q0 .475-.337.8-.338.325-.813.325Zm0-9.075q-.475 0-.812-.338-.338-.337-.338-.812V5.9q0-.475.338-.8.337-.325.812-.325.475 0 .813.325.337.325.337.8v1.95h1.95q.475 0 .8.337.325.338.325.813 0 .475-.325.812-.325.338-.8.338Z"/></svg>\n</slot></span>',":host(:not([fullscreen])) [part=exit-icon],:host([fullscreen]) [part=enter-icon]{display:none!important}"),h(eR,"theoplayer-fullscreen-button");var eI=function(e){function r(){var t;return(t=e.call(this,{template:eR})||this)._upgradeProperty("fullscreen"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},n.handleClick=function(){if(this.fullscreen){var t=tc(eM,{bubbles:!0,composed:!0});this.dispatchEvent(t)}else{var e=tc(eP,{bubbles:!0,composed:!0});this.dispatchEvent(e)}},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&(c(this),this._updateAriaLabel())},n._updateAriaLabel=function(){var e=this.fullscreen?"exit fullscreen":"enter fullscreen";this.setAttribute(t.Attribute.ARIA_LABEL,e)},k(r,[{key:"fullscreen",get:function(){return this.hasAttribute(t.Attribute.FULLSCREEN)},set:function(e){e?this.setAttribute(t.Attribute.FULLSCREEN,""):this.removeAttribute(t.Attribute.FULLSCREEN)}}],[{key:"observedAttributes",get:function(){return L(E.observedAttributes).concat([t.Attribute.FULLSCREEN])}}]),r}(z(E,["fullscreen"]));customElements.define("theoplayer-fullscreen-button",eI);var eO=function(){function t(){this._stops=[["transparent",100]]}var e=t.prototype;return e.add=function(t,e,r){if(!((e=Math.max(e,0))>=(r=Math.min(r,100)))){var a=N(this._stops,function(t){return e<=t[1]});if(!(a<0)){var n=this._stops[a],o=n[0],i=n[1],l=[];if(e>0&&l.push([o,e]),l.push([t,r]),r<i)l.push([o,i]),(s=this._stops).splice.apply(s,[a,1].concat(L(l)));else{for(var s,u,p=a+1;p<this._stops.length&&!(r<this._stops[p][1]);)p++;(u=this._stops).splice.apply(u,[a,p-a].concat(L(l)))}}}},e.toGradientStops=function(){for(var t,e=[],r=0,a=u(this._stops);!(t=a()).done;){var n=t.value,o=n[0],i=n[1];i<r||(e.push(o+" "+r+"%"),e.push(o+" "+i+"%"),r=i)}return e.join(", ")},t}();function eD(t,e){return void 0===e&&(e=""),"<style>:host{--thumb-height:var(--theoplayer-range-thumb-height,10px);--track-height:var(--theoplayer-range-track-height,4px);--theoplayer-range-padding:var(--theoplayer-control-padding,10px);background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;font-size:0;height:44px;height:calc(var(--theoplayer-control-height, 24px) + var(--theoplayer-range-padding)*2);padding-left:10px;padding-left:var(--theoplayer-range-padding-left,var(--theoplayer-range-padding));padding-right:10px;padding-right:var(--theoplayer-range-padding-right,var(--theoplayer-range-padding));pointer-events:auto;position:relative;-webkit-transition:background .15s linear;transition:background .15s linear;vertical-align:middle;width:100px}:host([hidden]){display:none!important}:host(:hover:not([disabled])){background:transparent;background:var(--theoplayer-control-hover-background,var(--theoplayer-control-background,transparent))}[part=container]{height:100%;position:relative}[part=background],[part=pointer]{border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);height:var(--track-height);position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transform:translate(var(--theoplayer-range-track-translate-x,0),calc(var(--theoplayer-range-track-translate-y, 0px) - 50%));transform:translate(var(--theoplayer-range-track-translate-x,0),calc(var(--theoplayer-range-track-translate-y, 0px) - 50%))}[part=background]{background:hsla(0,0%,100%,.2);background:var(--theoplayer-range-track-background,hsla(0,0%,100%,.2));min-width:40px;width:100%;width:var(--theoplayer-range-track-width,100%)}[part=pointer]{background:transparent;background:var(--theoplayer-range-track-pointer-background,transparent);border-right:none;border-right:var(--theoplayer-range-track-pointer-border-right,none);opacity:0;-webkit-transition:visibility .25s,opacity .25s;transition:visibility .25s,opacity .25s;visibility:hidden}:host(:hover:not([disabled])) [part=pointer]{opacity:1;-webkit-transition:visibility .5s,opacity .5s;transition:visibility .5s,opacity .5s;visibility:visible}input[type=range]{-webkit-appearance:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;min-height:100%;padding:0;position:relative;width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);-webkit-box-shadow:1px 1px 1px transparent;box-shadow:1px 1px 1px transparent;-webkit-box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);margin-top:calc(0px - var(--thumb-height)/2 + var(--track-height)/2);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);-webkit-transform:none;transform:none;-webkit-transform:var(--theoplayer-range-thumb-transform,none);transform:var(--theoplayer-range-thumb-transform,none);-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);width:10px;width:var(--theoplayer-range-thumb-width,10px)}input[type=range]::-moz-range-thumb{background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);box-shadow:1px 1px 1px transparent;box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);transform:none;transform:var(--theoplayer-range-thumb-transform,none);-moz-transition:none;transition:none;-moz-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);translate:0 0;translate:var(--theoplayer-range-track-translate-x,0) var(--theoplayer-range-track-translate-y,0);width:10px;width:var(--theoplayer-range-thumb-width,10px)}input[type=range]::-ms-thumb{background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);box-shadow:1px 1px 1px transparent;box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);transform:none;transform:var(--theoplayer-range-thumb-transform,none);-ms-transition:none;transition:none;-ms-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);width:10px;width:var(--theoplayer-range-thumb-width,10px)}:host([disabled]) input[type=range]::-webkit-slider-thumb{display:none}:host([disabled]) input[type=range]::-moz-range-thumb{display:none}:host([disabled]) input[type=range]::-ms-thumb{display:none}input[type=range]::-webkit-slider-runnable-track{background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);-webkit-box-shadow:none;box-shadow:none;-webkit-box-shadow:var(--theoplayer-range-track-box-shadow,none);box-shadow:var(--theoplayer-range-track-box-shadow,none);cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);-webkit-transform:translate(0);transform:translate(0);-webkit-transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-moz-range-track{background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);box-shadow:none;box-shadow:var(--theoplayer-range-track-box-shadow,none);cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);transform:translate(0);transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-moz-transition:none;transition:none;-moz-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-ms-track{background:transparent;background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);box-shadow:none;box-shadow:var(--theoplayer-range-track-box-shadow,none);color:transparent;cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);transform:translate(0);transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-ms-transition:none;transition:none;-ms-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-ms-fill-lower,input[type=range]::-ms-fill-upper,input[type=range]::-ms-tooltip{display:none}:host([disabled]) input[type=range]::-webkit-slider-runnable-track{cursor:default}:host([disabled]) input[type=range]::-moz-range-track{cursor:default}:host([disabled]) input[type=range]::-ms-track{cursor:default}input[type=range]:focus{-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}input[type=range]:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}input[type=range]:focus::-webkit-slider-runnable-track{outline:0}\n"+e+'</style><div part="container"><div part="background"></div><div part="pointer"></div>'+t+"</div>"}var eN=function(e){function r(t){(r=e.call(this)||this)._lastRangeWidth=0,r._onInput=function(){r.handleInput()},r._updatePointerBar=function(t){if(!r.disabled){var e=r._rangeEl.getBoundingClientRect(),a=(t.clientX-e.left)/e.width;a=Math.max(0,Math.min(1,a)),r.updatePointer_(a,e)}};var r,a=r.attachShadow({mode:"open"});return a.appendChild(t.template.content.cloneNode(!0)),r._rangeEl=a.querySelector('input[type="range"]'),r._rangeEl.addEventListener("input",r._onInput),r._rangeEl.addEventListener("change",r._onInput),r._pointerEl=a.querySelector('[part="pointer"]'),r._upgradeProperty("disabled"),r._upgradeProperty("value"),r._upgradeProperty("min"),r._upgradeProperty("max"),r._upgradeProperty("step"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this),this._rangeEl.setAttribute(t.Attribute.ARIA_LABEL,this.getAriaLabel()),this.update(),this.addEventListener("pointermove",this._updatePointerBar)},n.disconnectedCallback=function(){this.removeEventListener("pointermove",this._updatePointerBar)},n.attributeChangedCallback=function(e,a,n){if(n!==a){var o=null!=n;e===t.Attribute.DISABLED?(this.setAttribute("aria-disabled",o?"true":"false"),o?this._rangeEl.setAttribute(e,n):this._rangeEl.removeAttribute(e)):e!==t.Attribute.HIDDEN||o||this.update(),r.observedAttributes.indexOf(e)>=0&&c(this)}},n.handleInput=function(){this.update()},n.update=function(){this.hasAttribute(t.Attribute.HIDDEN)||(this._rangeEl.setAttribute("aria-valuetext",this.getAriaValueText()),this.updateBar_())},n.updateBar_=function(){c(this,{"--theoplayer-range-track-progress-internal":"linear-gradient(to right, "+this.getBarColors().toGradientStops()+")"})},n.getBarColors=function(){var t=(this.value-this.min)/(this.max-this.min)*100;isNaN(t)&&(t=0);var e=this._rangeEl.offsetWidth;e>0&&(this._lastRangeWidth=e);var r=0;this.min<this.value&&this.value<this.max&&(r=parseInt(getComputedStyle(this).getPropertyValue("--theoplayer-range-thumb-width")||"10px")*(.5-t/100)/this._lastRangeWidth*100);var a=new eO;return a.add("var(--theoplayer-range-bar-color, #fff)",0,t+r),a},n.updatePointer_=function(t,e){this._pointerEl.style.width=""+t*e.width+"px"},k(r,[{key:"disabled",get:function(){return this.hasAttribute(t.Attribute.DISABLED)},set:function(e){e?this.setAttribute(t.Attribute.DISABLED,""):this.removeAttribute(t.Attribute.DISABLED)}},{key:"value",get:function(){return this._rangeEl.valueAsNumber},set:function(t){this._rangeEl.valueAsNumber=t,this.handleInput()}},{key:"min",get:function(){return Number(this._rangeEl.min)},set:function(t){this._rangeEl.min=String(t),this.update()}},{key:"max",get:function(){return Number(this._rangeEl.max)},set:function(t){this._rangeEl.max=String(t),this.update()}},{key:"step",get:function(){var t=this._rangeEl.step;return"any"===t?t:Number(t)},set:function(t){this._rangeEl.step=String(t)}}],[{key:"observedAttributes",get:function(){return[t.Attribute.DISABLED,t.Attribute.HIDDEN]}}]),r}(i(HTMLElement)),eq="theoplayerpreviewtimechange",eF=document.createElement("template");eF.innerHTML="<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}:host([hidden]){display:none!important}canvas{background:#fff;background:var(--theoplayer-preview-thumbnail-background,#fff);border-radius:2px;border-radius:var(--theoplayer-preview-thumbnail-padding,2px);display:none;padding:2px;padding:var(--theoplayer-preview-thumbnail-padding,2px)}</style><canvas></canvas>",h(eF,"theoplayer-preview-thumbnail");var eB=["addtrack","removetrack"],eH=function(t){function e(){(e=t.call(this)||this)._previewTime=NaN,e._updateThumbnailTextTrack=function(){var t=e._thumbnailTextTrack,r=e._player?D(e._player.textTracks,eU):void 0;t!==r&&(e._thumbnailTextTrack=r,e.updateThumbnail_())};var e,r=e.attachShadow({mode:"open"});return r.appendChild(eF.content.cloneNode(!0)),e._canvasEl=r.querySelector("canvas"),e._canvasContext=e._canvasEl.getContext("2d"),e._thumbnailImageSource=document.createElement("img"),e._thumbnailImageSource.decoding="async",e._upgradeProperty("previewTime"),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){d(this)},r.updateThumbnail_=function(){var t=this._thumbnailTextTrack;if(void 0===t){this.hideThumbnail_();return}"disabled"===t.mode&&(t.mode="hidden");var e=function(t,e){if(0!==t.length){for(var r,a=t[0],n=u(t);!(r=n()).done;){var o=r.value;if(o.startTime<=e)a=o;else if(e>=o.endTime)break}return a}}(t.cues,this._previewTime);if(void 0===e){this.hideThumbnail_();return}var r=e.content.trim(),a=function(t){var e=t.match(/^(.+)#xywh=(\d+),(\d+),(\d+),(\d+)$/);if(e)return{url:e[1],x:+e[2],y:+e[3],w:+e[4],h:+e[5]}}(r),n=a?a.url:r;if(n=new URL(n,t.src||location.href).href,this._lastLoadedThumbnailUrl!==n){this.loadThumbnailImage_(n);return}this.showThumbnail_(a)},r.loadThumbnailImage_=function(t){var e=this;if(this._thumbnailImageSource.src!==t){var r=function(){e._lastLoadedThumbnailUrl=t,e.updateThumbnail_()};"function"==typeof this._thumbnailImageSource.decode?(this._thumbnailImageSource.src=t,this._thumbnailImageSource.decode().then(r,P)):(this._thumbnailImageSource.onload=r,this._thumbnailImageSource.src="",this._thumbnailImageSource.src=t)}},r.showThumbnail_=function(t){t?(this._canvasEl.width=t.w,this._canvasEl.height=t.h,this._canvasContext.drawImage(this._thumbnailImageSource,t.x,t.y,t.w,t.h,0,0,t.w,t.h)):(this._canvasEl.width=this._thumbnailImageSource.naturalWidth,this._canvasEl.height=this._thumbnailImageSource.naturalHeight,this._canvasContext.drawImage(this._thumbnailImageSource,0,0)),this._canvasEl.style.display="block"},r.hideThumbnail_=function(){this._canvasEl.style.display="none"},k(e,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.textTracks.removeEventListener(eB,this._updateThumbnailTextTrack),this._player=t,this._updateThumbnailTextTrack(),void 0!==this._player&&this._player.textTracks.addEventListener(eB,this._updateThumbnailTextTrack))}},{key:"previewTime",get:function(){return this._previewTime},set:function(t){this._previewTime=t,this.updateThumbnail_()}}]),e}(z(HTMLElement,["player","previewTime"]));function eU(t){return"metadata"===t.kind&&"thumbnails"===t.label}customElements.define("theoplayer-preview-thumbnail",eH);var ez=document.createElement("template");ez.innerHTML="<style>"+$+"</style><span></span>",h(ez,"theoplayer-preview-time-display");var eV=["timeupdate","seeking","seeked","durationchange"],eG=function(e){function r(){(r=e.call(this)||this)._previewTime=NaN,r._update=function(){var e,a=r._previewTime,n=r._player?r._player.duration:NaN,o=null==(e=r._player)?void 0:e.seekable,i=isFinite(n)?n:o&&o.length>0?o.end(0):NaN,l=r.hasAttribute(t.Attribute.REMAINING)||r.hasAttribute(t.Attribute.REMAINING_WHEN_LIVE)&&"vod"!==r.streamType;l&&(a=-((i||0)-a)),B(r._spanEl,te(a,i,l))};var r,a=r.attachShadow({mode:"open"});return a.appendChild(ez.content.cloneNode(!0)),r._spanEl=a.querySelector("span"),r._upgradeProperty("previewTime"),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this),this._update()},n.attributeChangedCallback=function(t,e,a){a!==e&&r.observedAttributes.indexOf(t)>=0&&(this._update(),c(this))},k(r,[{key:"previewTime",get:function(){return this._previewTime},set:function(t){this._previewTime=t,this._update()}},{key:"streamType",get:function(){return this.getAttribute(t.Attribute.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(t.Attribute.STREAM_TYPE,e)}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener(eV,this._update),this._player=t,this._update(),void 0!==this._player&&this._player.addEventListener(eV,this._update))}}],[{key:"observedAttributes",get:function(){return[t.Attribute.REMAINING,t.Attribute.REMAINING_WHEN_LIVE,t.Attribute.STREAM_TYPE]}}]),r}(z(HTMLElement,["player","previewTime","streamType"]));function eQ(t){return"linear"===t.type}customElements.define("theoplayer-preview-time-display",eG);var eY=document.createElement("template");eY.innerHTML=eD('<input type="range" min="0" max="1000" step="any" value="0"><div class="theoplayer-time-range-preview-rail"><div part="box preview-box"><slot name="preview"><theoplayer-preview-thumbnail></theoplayer-preview-thumbnail><theoplayer-preview-time-display remaining-when-live></theoplayer-preview-time-display></slot></div></div>',"input[type=range]{direction:ltr}.theoplayer-time-range-preview-rail{bottom:100%;left:0;opacity:0;pointer-events:none;position:absolute;-webkit-transition:visibility .25s,opacity .25s;transition:visibility .25s,opacity .25s;visibility:hidden;width:1%}:host(:hover:not([disabled])) .theoplayer-time-range-preview-rail{opacity:1;-webkit-transition:visibility .5s,opacity .5s;transition:visibility .5s,opacity .5s;visibility:visible}[part~=box]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;align-items:center;bottom:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;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));position:absolute;text-shadow:0 0 4px rgba(0,0,0,.75);text-shadow:var(--theoplayer-preview-text-shadow,0 0 4px rgba(0,0,0,.75));-webkit-transform:translateX(-50%);transform:translateX(-50%)}"),h(eY,"theoplayer-time-range");var eK=["timeupdate","durationchange","ratechange","seeking","seeked"],eW=["play","pause","ended","readystatechange","error"],eZ=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"],ej=function(e){function r(){var r;return(r=e.call(this,{template:eY})||this)._pausedWhileScrubbing=!1,r._autoAdvanceId=0,r._lastUpdateTime=0,r._lastCurrentTime=0,r._lastPlaybackRate=0,r._updateFromPlayer=function(){if(void 0!==r._player){r._lastUpdateTime=performance.now(),r._lastCurrentTime=r._player.currentTime,r._lastPlaybackRate=r._player.playbackRate;var t=r._player.seekable;if(0!==t.length?(r.min=t.start(0),r.max=t.end(0)):(r.min=0,r.max=r._player.duration),!isFinite(r._lastCurrentTime)){var e=r._player.duration===1/0;r._lastCurrentTime=e?r.max:r.min}r._rangeEl.valueAsNumber=r._lastCurrentTime,r.update(),r._updateDisabled()}},r._updateDisabled=function(){var t="live"===r.streamType;void 0!==r._player&&(t||(t=0===r._player.seekable.length)),r.disabled=t},r._pauseOnScrubStart=function(){r._pausedWhileScrubbing||void 0===r._player||r._player.paused||(r._pausedWhileScrubbing=!0,r._player.pause(),document.addEventListener("mouseup",r._playOnScrubEnd),document.addEventListener("touchend",r._playOnScrubEnd))},r._playOnScrubEnd=function(){r._pausedWhileScrubbing&&(r._pausedWhileScrubbing=!1,document.removeEventListener("mouseup",r._playOnScrubEnd),document.removeEventListener("touchend",r._playOnScrubEnd),void 0!==r._player&&r._player.paused&&r._player.play())},r._toggleAutoAdvance=function(){r.shouldAutoAdvance_()?0===r._autoAdvanceId&&(r._updateFromPlayer(),r._autoAdvanceId=requestAnimationFrame(r._autoAdvanceWhilePlaying)):0!==r._autoAdvanceId&&(r._updateFromPlayer(),cancelAnimationFrame(r._autoAdvanceId),r._autoAdvanceId=0)},r._autoAdvanceWhilePlaying=function(){if(!r.shouldAutoAdvance_()){r._autoAdvanceId=0;return}var t=(performance.now()-r._lastUpdateTime)/1e3;r._rangeEl.valueAsNumber=r._lastCurrentTime+t*r._lastPlaybackRate,r.update(),r._autoAdvanceId=requestAnimationFrame(r._autoAdvanceWhilePlaying)},r._onAdChange=function(){r.update()},r._previewRailEl=r.shadowRoot.querySelector(".theoplayer-time-range-preview-rail"),r._previewBoxEl=r._previewRailEl.querySelector('[part~="preview-box"]'),r._rangeEl.setAttribute(t.Attribute.ARIA_LIVE,"off"),r._rangeEl.addEventListener("mousedown",r._pauseOnScrubStart),r._rangeEl.addEventListener("touchstart",r._pauseOnScrubStart),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._toggleAutoAdvance()},n.disconnectedCallback=function(){e.prototype.disconnectedCallback.call(this),this._toggleAutoAdvance()},n.getAriaLabel=function(){return"seek"},n.getAriaValueText=function(){var t=tn(this.value),e=tn(this.max);return t&&e?t+" of "+e:"video not loaded, unknown time"},n.attributeChangedCallback=function(a,n,o){e.prototype.attributeChangedCallback.call(this,a,n,o),o!==n&&(a===t.Attribute.STREAM_TYPE?this._updateDisabled():a===t.Attribute.SHOW_AD_MARKERS&&this.update(),r.observedAttributes.indexOf(a)>=0&&c(this))},n.handleInput=function(){void 0!==this._player&&this._player.currentTime!==this.value&&(this._player.currentTime=this.value),e.prototype.handleInput.call(this)},n.shouldAutoAdvance_=function(){return this.isConnected&&void 0!==this._player&&!this._player.paused&&!this._player.ended&&!this._player.errorObject&&this._player.readyState>=3},n.updatePointer_=function(t,r){e.prototype.updatePointer_.call(this,t,r);var a=r.left+t*r.width,n=this._previewBoxEl.getBoundingClientRect(),o=((a=Math.max(r.left+n.width/2,Math.min(r.right-n.width/2,a)))-r.left)/r.width;if(this._previewRailEl.style.transform="translateX("+(1e4*o).toFixed(6)+"%)",void 0!==this._player){var i=this.min,l=tc(eq,{bubbles:!0,composed:!0,detail:{previewTime:i+t*(this.max-i)}});this.dispatchEvent(l)}},n.getBarColors=function(){var r=e.prototype.getBarColors.call(this);if(!this.hasAttribute(t.Attribute.SHOW_AD_MARKERS)||!this._player||!this._player.ads||this._player.ads.playing)return r;for(var a,n=this.min,o=this.max,i=u(this._player.ads.scheduledAdBreaks);!(a=i()).done;){var l=a.value;if(void 0===l.ads||!(l.ads.length>0)||l.ads.some(eQ)){var s=l.timeOffset;if(s<0&&(s=this._player.duration),n<=s&&s<=o){var p=(s-n)/(o-n)*100,h=void 0,d=void 0;p+1<100?(h=p,d=p+1):(h=99,d=100),r.add("var(--theoplayer-time-range-ad-marker-color, #ffc50f)",h,d)}}}return r},k(r,[{key:"player",get:function(){return this._player},set:function(t){var e,r;this._player!==t&&(void 0!==this._player&&(this._player.removeEventListener(eK,this._updateFromPlayer),this._player.removeEventListener(eW,this._toggleAutoAdvance),null==(e=this._player.ads)||e.removeEventListener(eZ,this._onAdChange)),this._player=t,this._updateFromPlayer(),this._toggleAutoAdvance(),void 0!==this._player&&(this._player.addEventListener(eK,this._updateFromPlayer),this._player.addEventListener(eW,this._toggleAutoAdvance),null==(r=this._player.ads)||r.addEventListener(eZ,this._onAdChange)))}},{key:"streamType",get:function(){return this.getAttribute(t.Attribute.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(t.Attribute.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return L(eN.observedAttributes).concat([t.Attribute.SHOW_AD_MARKERS])}}]),r}(z(eN,["player","streamType"]));customElements.define("theoplayer-time-range",ej);var eX=document.createElement("template");eX.innerHTML=eD('<input type="range" min="0" max="1" step="any" value="0">'),h(eX,"theoplayer-volume-range");var eJ=function(t){function e(){var e;return(e=t.call(this,{template:eX})||this)._updateFromPlayer=function(){void 0!==e._player&&(e.value=e._player.volume)},e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r.getAriaLabel=function(){return"volume"},r.getAriaValueText=function(){return""+Math.round(this.value/this.max*100)+"%"},r.handleInput=function(){void 0!==this._player&&this._player.volume!==this.value&&(this._player.volume=this.value),t.prototype.handleInput.call(this)},k(e,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener("volumechange",this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener("volumechange",this._updateFromPlayer))}}]),e}(z(eN,["player"]));customElements.define("theoplayer-volume-range",eJ);var e$=document.createElement("template");e$.innerHTML='<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;gap:var(--theoplayer-error-icon-gap,10px);max-width:80%;max-width:var(--theoplayer-error-max-width,80%);min-width:0;min-width:var(--theoplayer-error-min-width,0)}:host([hidden]){display:none!important}[part~=icon]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;font-size:0}::slotted(img),::slotted(svg),img,svg{fill:#fff;fill:var(--theoplayer-error-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-error-icon-height,48px);max-height:100%;max-width:100%;min-width:100%;vertical-align:middle;width:48px;width:var(--theoplayer-error-icon-width,48px)}[part~=heading]{color:#fff;color:var(--theoplayer-error-heading-color,#fff);line-height:48px;line-height:var(--theoplayer-error-icon-height,48px);margin:0 0 10px;margin:var(--theoplayer-error-heading-margin,0 0 10px);padding:0}[part~=message]{color:#fff;color:var(--theoplayer-error-message-color,#fff);margin:0;margin:var(--theoplayer-error-message-margin,0);padding:0}[part~=fullscreen-controls]{-webkit-box-pack:end;-ms-flex-pack:end;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;left:0;position:absolute;right:0}:host(:not([fullscreen])) [part~=fullscreen-controls]{display:none!important}</style><div part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" height="48" width="48"><path d="M24.15 26.4q.85 0 1.425-.575.575-.575.575-1.425v-9.2q0-.8-.6-1.375t-1.4-.575q-.85 0-1.425.575-.575.575-.575 1.425v9.2q0 .8.6 1.375t1.4.575ZM24 34.7q1 0 1.625-.625t.625-1.625q0-.95-.625-1.625T24 30.15q-1 0-1.625.675t-.625 1.625q0 1 .625 1.625T24 34.7Zm0 10q-4.4 0-8.175-1.575Q12.05 41.55 9.25 38.75q-2.8-2.8-4.375-6.575Q3.3 28.4 3.3 24q0-4.35 1.575-8.125Q6.45 12.1 9.25 9.3q2.8-2.8 6.575-4.425Q19.6 3.25 24 3.25q4.35 0 8.125 1.625Q35.9 6.5 38.7 9.3q2.8 2.8 4.425 6.575Q44.75 19.65 44.75 24q0 4.4-1.625 8.175Q41.5 35.95 38.7 38.75q-2.8 2.8-6.575 4.375Q28.35 44.7 24 44.7Z"/></svg>\n</slot></div><div part="text"><h1 part="heading"><slot name="heading">An error occurred</slot></h1><p part="message"><slot name="message"></slot></p></div><div part="fullscreen-controls"><slot name="fullscreen-controls"><theoplayer-fullscreen-button></theoplayer-fullscreen-button></slot></div>',h(e$,"theoplayer-error-display");var e0=function(e){function r(){var t,r=(t=e.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0});return r.appendChild(e$.content.cloneNode(!0)),t._messageSlot=r.querySelector('slot[name="message"]'),t._upgradeProperty("error"),t}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this)},n.attributeChangedCallback=function(t,e,a){r.observedAttributes.indexOf(t)>=0&&c(this)},k(r,[{key:"error",get:function(){return this._error},set:function(t){this._error=t,B(this._messageSlot,t?t.message:"")}},{key:"fullscreen",get:function(){return this.hasAttribute(t.Attribute.FULLSCREEN)},set:function(e){e?this.setAttribute(t.Attribute.FULLSCREEN,""):this.removeAttribute(t.Attribute.FULLSCREEN)}}],[{key:"observedAttributes",get:function(){return[t.Attribute.FULLSCREEN]}}]),r}(z(HTMLElement,["error","fullscreen"]));customElements.define("theoplayer-error-display",e0);var e1=function(e){function r(r){var a;return(a=e.call(this,r)||this)._updateCastState=function(){var e=a._castApi?a._castApi.state:"unavailable";a.setAttribute(t.Attribute.CAST_STATE,e)},a._upgradeProperty("castState"),a._upgradeProperty("castApi"),a}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.CAST_STATE)||this.setAttribute(t.Attribute.CAST_STATE,"unavailable"),this._updateCastState()},n.handleClick=function(){if(this._castApi){this._updateCastState();var t=this.castState;"available"===t?this._castApi.start():("connecting"===t||"connected"===t)&&this._castApi.stop()}},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&c(this)},k(r,[{key:"castApi",get:function(){return this._castApi},set:function(t){void 0!==this._castApi&&this._castApi.removeEventListener("statechange",this._updateCastState),this._castApi=t,this._updateCastState(),void 0!==this._castApi&&this._castApi.addEventListener("statechange",this._updateCastState)}},{key:"castState",get:function(){return this.getAttribute(t.Attribute.CAST_STATE)}}],[{key:"observedAttributes",get:function(){return L(E.observedAttributes).concat([t.Attribute.CAST_STATE])}}]),r}(E),e5=document.createElement("template");e5.innerHTML=A('<span part="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" height="24" width="24"><defs><clipPath id="theoplayer-chromecast-rings-mask"><path d="M0-36h44V0H0z"/></clipPath></defs><path class="theoplayer-chromecast-outer" d="M2 10a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H28v-4h14V10H6v6H2z"/><path class="theoplayer-chromecast-inner" d="M10 14h28v20H26.74A26 26 0 0 0 10 17.26z"/><g class="theoplayer-chromecast-rings" fill="none" stroke="currentColor" stroke-width="4" transform="translate(2 42)" clip-path="url(#theoplayer-chromecast-rings-mask)"><circle stroke="none" cx="0" cy="0" r="30"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring1" stroke-width="6" cx="0" cy="0" r="3"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring2" cx="0" cy="0" r="12"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring3" cx="0" cy="0" r="20"/><path class="theoplayer-chromecast-ring theoplayer-chromecast-ring4" stroke-linecap="round" d="M0-20A20 20 0 0 1 20 0"/></g></svg></span>',":host([cast-state=unavailable]){display:none!important}:host([cast-state=connecting]) .theoplayer-chromecast-ring{-webkit-animation:.9s linear infinite;animation:.9s linear infinite}:host([cast-state=connecting]) .theoplayer-chromecast-ring1{-webkit-animation-name:theoplayer-chromecast-connecting-ring1;animation-name:theoplayer-chromecast-connecting-ring1}:host([cast-state=connecting]) .theoplayer-chromecast-ring2{-webkit-animation-name:theoplayer-chromecast-connecting-ring2;animation-name:theoplayer-chromecast-connecting-ring2}:host([cast-state=connecting]) .theoplayer-chromecast-ring3{-webkit-animation-name:theoplayer-chromecast-connecting-ring3;animation-name:theoplayer-chromecast-connecting-ring3}:host([cast-state=connecting]) .theoplayer-chromecast-ring4{-webkit-animation-name:theoplayer-chromecast-connecting-ring4;animation-name:theoplayer-chromecast-connecting-ring4}.theoplayer-chromecast-inner{opacity:0;-webkit-transition:opacity .5s ease-in-out;transition:opacity .5s ease-in-out}:host([cast-state=connected]) .theoplayer-chromecast-inner{opacity:1}.theoplayer-chromecast-rings{-webkit-clip-path:polygon(50% -100%,50% 50%,100% 50%,100% -100%);clip-path:polygon(50% -100%,50% 50%,100% 50%,100% -100%)}@-webkit-keyframes theoplayer-chromecast-connecting-ring1{0%,37.5%{-webkit-transform:scale(0);transform:scale(0)}62.5%,to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring1{0%,37.5%{-webkit-transform:scale(0);transform:scale(0)}62.5%,to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring2{0%,20%{stroke-width:24;-webkit-transform:scale(.25);transform:scale(.25)}35%{stroke-width:10;-webkit-transform:scale(.5);transform:scale(.5)}55%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring2{0%,20%{stroke-width:24;-webkit-transform:scale(.25);transform:scale(.25)}35%{stroke-width:10;-webkit-transform:scale(.5);transform:scale(.5)}55%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring3{0%,15%{stroke-width:6.66667;-webkit-transform:scale(.6);transform:scale(.6)}45%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring3{0%,15%{stroke-width:6.66667;-webkit-transform:scale(.6);transform:scale(.6)}45%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring4{0%{stroke-width:4;stroke-dashoffset:0;stroke-dasharray:32,99;opacity:1;-webkit-transform:scale(1);transform:scale(1)}35%{stroke-width:2.8571;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.4);transform:scale(1.4)}50%{stroke-width:0;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.5);transform:scale(1.5)}50.001%,to{opacity:0}}@keyframes theoplayer-chromecast-connecting-ring4{0%{stroke-width:4;stroke-dashoffset:0;stroke-dasharray:32,99;opacity:1;-webkit-transform:scale(1);transform:scale(1)}35%{stroke-width:2.8571;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.4);transform:scale(1.4)}50%{stroke-width:0;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.5);transform:scale(1.5)}50.001%,to{opacity:0}}"),h(e5,"theoplayer-chromecast-button");var e2="theoplayer-chromecast-rings-mask",e3=0,e4=function(e){function r(){t=e.call(this,{template:e5})||this;var t,r=++e3,a=t.shadowRoot.querySelector("svg clipPath#"+e2),n=t.shadowRoot.querySelector("svg .theoplayer-chromecast-rings"),o=e2+"-"+r;return a.setAttribute("id",o),n.setAttribute("clip-path",o),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&this._updateAriaLabel()},n._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop casting to Chromecast":"start casting to Chromecast";this.setAttribute(t.Attribute.ARIA_LABEL,e)},k(r,[{key:"player",get:function(){return this._player},set:function(t){var e;this._player=t,this.castApi=null==t?void 0:null==(e=t.cast)?void 0:e.chromecast}}]),r}(z(e1,["player"]));customElements.define("theoplayer-chromecast-button",e4);var e8=document.createElement("template");e8.innerHTML='<style>:host{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;gap:var(--theoplayer-chromecast-display-icon-gap,10px);padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:none}:host([hidden]){display:none!important}[part~=icon]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;font-size:0}::slotted(img),::slotted(svg),img,svg{fill:#fff;fill:var(--theoplayer-chromecast-display-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-chromecast-display-icon-height,48px);max-height:100%;max-width:100%;min-width:100%;vertical-align:middle;width:48px;width:var(--theoplayer-chromecast-display-icon-width,48px)}[part=text]{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap}[part=heading]{color:#fff;color:var(--theoplayer-chromecast-display-heading-color,#fff);font-size:14px;font-size:var(--theoplayer-chromecast-display-heading-font-size,var(--theoplayer-text-font-size,14px));margin:0;margin:var(--theoplayer-chromecast-display-heading-margin,0);padding:0}[part=receiver]{color:#fff;color:var(--theoplayer-chromecast-display-receiver-color,#fff);font-size:17.5px;font-size:var(--theoplayer-chromecast-display-receiver-font-size,calc(var(--theoplayer-text-font-size, 14px)*1.25));margin:0;margin:var(--theoplayer-chromecast-display-receiver-margin,0);padding:0}</style><div part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M86.956 910.131h65.699q9.171 0 14.801-6.413 5.631-6.413 4.076-14.067-6.099-32.801-29.132-57.242-23.033-24.442-55.051-30.941-7.654-1.555-14.067 4.076-6.413 5.63-6.413 15.164v69.336q0 8.487 5.8 14.287 5.8 5.8 14.287 5.8Zm179.365 0q14.288 0 23.635-9.565 9.348-9.565 7.348-23.261-10.944-78.191-65.681-134.428-54.737-56.237-131.928-67.181-13.696-2-23.26 7.415-9.566 9.416-9.566 23.411 0 12.13 9.311 23.059 9.312 10.929 24.08 13.332 49.566 9.566 84.913 46.696 35.348 37.131 44.914 87.131 2.403 14.768 12.595 24.08 10.192 9.311 23.639 9.311Zm127.147 0q13.904 0 23.261-9.563 9.358-9.563 8.358-23.444-5.819-64.393-33.105-122.128-27.286-57.735-70.589-101.784-43.303-44.049-100.088-71.892-56.784-27.842-121.43-33.407-13.88-1-23.443 8.53-9.563 9.531-9.563 23.377 0 13.615 9.072 23.615 9.072 10 23.62 12.19 103.526 11.636 174.956 85.018 71.43 73.382 82.858 176.796 1.801 14.298 11.995 23.495 10.195 9.197 24.098 9.197ZM123.477 241.304h692.436q31.74 0 55.762 24.021 24.021 24.022 24.021 55.762v509.826q0 31.507-24.021 55.362-24.022 23.856-55.762 23.856H525.696q-16.706 0-28.158-11.501-11.451-11.502-11.451-28.283 0-16.782 11.451-28.108 11.452-11.326 28.158-11.326h290.217V321.087H146.087v146q-6.783 6.348-16.595 11.674-9.813 5.326-23.514 5.326-16.457 0-27.783-11.452-11.326-11.451-11.326-28.158v-146q0-21.834 16.838-39.504 16.837-17.669 39.77-17.669Zm317.914 363Z"/></svg>\n</slot></div><div part="text"><p part="heading"><slot name="heading">Playing on</slot></p><p part="receiver">Chromecast Receiver</p></div>',h(e8,"theoplayer-chromecast-display");var e7=["statechange"],e6=function(e){function r(){(r=e.call(this)||this)._updateFromPlayer=function(){var e,a,n=null==(e=r._player)?void 0:null==(a=e.cast)?void 0:a.chromecast;if(void 0===n||"connected"!==n.state){r.setAttribute(t.Attribute.HIDDEN,"");return}B(r._receiverNameEl,n.receiverName||""),r.removeAttribute(t.Attribute.HIDDEN)};var r,a=r.attachShadow({mode:"open"});return a.appendChild(e8.content.cloneNode(!0)),r._receiverNameEl=a.querySelector('[part="receiver"]'),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this),this.hasAttribute(t.Attribute.HIDDEN)||this.setAttribute(t.Attribute.HIDDEN,""),this._updateFromPlayer()},k(r,[{key:"player",get:function(){return this._player},set:function(t){var e,r,a,n,o,i;this._player!==t&&(null==(e=this._player)||null==(r=e.cast)||null==(a=r.chromecast)||a.removeEventListener(e7,this._updateFromPlayer),this._player=t,this._updateFromPlayer(),null==(n=this._player)||null==(o=n.cast)||null==(i=o.chromecast)||i.addEventListener(e7,this._updateFromPlayer))}}]),r}(z(HTMLElement,["player"]));customElements.define("theoplayer-chromecast-display",e6);var e9=document.createElement("template");e9.innerHTML=A('<span part="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path class="theoplayer-airplay-inner" d="M5 7h14v8H5z"/><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg></span>',":host([cast-state=unavailable]){display:none!important}.theoplayer-airplay-inner{opacity:0;-webkit-transition:opacity .5s ease-in-out;transition:opacity .5s ease-in-out}:host([cast-state=connected]) .theoplayer-airplay-inner{opacity:1}"),h(e9,"theoplayer-airplay-button");var rt=function(e){function r(){var t;return(t=e.call(this,{template:e9})||this)._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&this._updateAriaLabel()},n._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop playing on AirPlay":"start playing on AirPlay";this.setAttribute(t.Attribute.ARIA_LABEL,e)},k(r,[{key:"player",get:function(){return this._player},set:function(t){var e;this._player=t,this.castApi=null==t?void 0:null==(e=t.cast)?void 0:e.airplay}}]),r}(z(e1,["player"]));customElements.define("theoplayer-airplay-button",rt);var re=document.createElement("template");re.innerHTML='<style>:host{pointer-events:none!important}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}[part=icon]{opacity:0;-webkit-transition:visibility .15s,opacity .15s;transition:visibility .15s,opacity .15s;visibility:hidden}:host([loading]) [part=icon]{opacity:1;-webkit-transition:visibility 0s,opacity 0s;transition:visibility 0s,opacity 0s;-webkit-transition-delay:.5s;transition-delay:.5s;-webkit-transition-delay:var(--theoplayer-loading-delay,.5s);transition-delay:var(--theoplayer-loading-delay,.5s);visibility:visible}[part=icon] ::slotted(img),[part=icon] ::slotted(svg){fill:#fff;fill:var(--theoplayer-loading-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-loading-icon-height,var(--theoplayer-loading-icon-width,48px));vertical-align:middle;width:48px;width:var(--theoplayer-loading-icon-width,48px)}.theoplayer-loading-progress{direction:ltr;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:0;height:48px;height:var(--theoplayer-loading-icon-height,var(--theoplayer-loading-icon-width,48px));letter-spacing:0;line-height:0;position:relative;white-space:nowrap;width:48px;width:var(--theoplayer-loading-icon-width,48px)}.theoplayer-loading-progress svg,.theoplayer-loading-spinner{height:100%;position:absolute;width:100%}.theoplayer-loading-progress svg{stroke:#fff;stroke:var(--theoplayer-loading-icon-color,var(--theoplayer-icon-color,#fff))}.theoplayer-loading-gap-patch{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;left:47.5%;overflow:hidden;position:absolute;top:0;width:5%}.theoplayer-loading-gap-patch svg{left:-900%;-webkit-transform:rotate(180deg);transform:rotate(180deg);width:2000%}.theoplayer-loading-circle-clipper{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:100%;overflow:hidden;position:relative;width:50%}.theoplayer-loading-circle-clipper svg{width:200%}.theoplayer-loading-circle-right svg{left:-100%}.theoplayer-loading-progress{-webkit-animation:theoplayer-circular-progress-container-rotate 1568ms linear infinite;animation:theoplayer-circular-progress-container-rotate 1568ms linear infinite}.theoplayer-loading-spinner{-webkit-animation:theoplayer-circular-progress-spinner-layer-rotate 5333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-spinner-layer-rotate 5333ms cubic-bezier(.4,0,.2,1) infinite both}.theoplayer-loading-circle-left svg{-webkit-animation:theoplayer-circular-progress-left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}.theoplayer-loading-circle-right svg{-webkit-animation:theoplayer-circular-progress-right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}@-webkit-keyframes theoplayer-circular-progress-container-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes theoplayer-circular-progress-container-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes theoplayer-circular-progress-spinner-layer-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(3turn);transform:rotate(3turn)}}@keyframes theoplayer-circular-progress-spinner-layer-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(3turn);transform:rotate(3turn)}}@-webkit-keyframes theoplayer-circular-progress-left-spin{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}to{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@keyframes theoplayer-circular-progress-left-spin{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}to{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@-webkit-keyframes theoplayer-circular-progress-right-spin{0%{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}50%{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}to{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}}@keyframes theoplayer-circular-progress-right-spin{0%{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}50%{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}to{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}}</style><div part="icon"><slot name="icon"><div aria-hidden="true" class="theoplayer-loading-progress"><div class="theoplayer-loading-spinner"><div class="theoplayer-loading-circle-clipper theoplayer-loading-circle-left"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="4"/></svg></div><div class="theoplayer-loading-gap-patch"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="3.2"/></svg></div><div class="theoplayer-loading-circle-clipper theoplayer-loading-circle-right"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="4"/></svg></div></div></div></slot></div>',h(re,"theoplayer-loading-indicator");var rr=["readystatechange","play","pause","playing","seeking","seeked"],ra=function(e){function r(){var r;return(r=e.call(this)||this)._updateFromPlayer=function(){void 0!==r._player&&!r._player.paused&&(r._player.seeking||r._player.readyState<3)?r.setAttribute(t.Attribute.LOADING,""):r.removeAttribute(t.Attribute.LOADING)},r.attachShadow({mode:"open"}).appendChild(re.content.cloneNode(!0)),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){d(this),this._updateFromPlayer()},n.attributeChangedCallback=function(t,e,a){r.observedAttributes.indexOf(t)>=0&&c(this)},k(r,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener(rr,this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(rr,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[t.Attribute.LOADING]}}]),r}(z(HTMLElement,["player"]));customElements.define("theoplayer-loading-indicator",ra);var rn=document.createElement("template");rn.innerHTML="<style>:host{pointer-events:none!important}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}</style>",h(rn,"theoplayer-gesture-receiver");var ro=function(t){function e(){var e;return(e=t.call(this)||this)._pointerType="",e._onPointerDown=function(t){e._pointerType=t.pointerType},e._onClick=function(t){var r,a=null!=(r=t.pointerType)?r:e._pointerType;"touch"===a?e.handleTap(t):"mouse"===a&&e.handleMouseClick(t)},e.attachShadow({mode:"open"}).appendChild(rn.content.cloneNode(!0)),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){d(this),this.setAttribute("tabindex","-1"),this.setAttribute("aria-hidden","true")},r.handleTap=function(t){},r.handleMouseClick=function(t){if(void 0!==this._player){var e,r;null!=(e=this._player)&&null!=(r=e.ads)&&r.playing||(this._player.paused?this._player.play():this._player.pause())}},k(e,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&(this._player.element.removeEventListener("pointerdown",this._onPointerDown),this._player.element.removeEventListener("click",this._onClick)),this._player=t,void 0!==this._player&&(this._player.element.addEventListener("pointerdown",this._onPointerDown),this._player.element.addEventListener("click",this._onClick)))}}]),e}(z(HTMLElement,["player"]));customElements.define("theoplayer-gesture-receiver",ro);var ri=document.createElement("template");ri.innerHTML=A('<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"><circle cx="12" cy="12" r="7"/></svg>\n</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)}"),h(ri,"theoplayer-live-button");var rl=["play","pause","playing","emptied"],rs=["seeking","seeked","timeupdate","durationchange","emptied"],ru=function(e){function r(){var t;return(t=e.call(this,{template:ri})||this)._updatePaused=function(){t.paused=void 0===t._player||t._player.paused},t._updateLive=function(){t.live=void 0!==t._player&&function(t,e){if(t.duration===1/0){var r=t.seekable;if(r.length>0)return r.end(r.length-1)-t.currentTime<=e}return!1}(t._player,t.liveThreshold)},t._upgradeProperty("paused"),t._upgradeProperty("streamType"),t._upgradeProperty("liveThreshold"),t._upgradeProperty("live"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.ARIA_LABEL)||this.setAttribute(t.Attribute.ARIA_LABEL,"seek to live")},n.handleClick=function(){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()))},n.attributeChangedCallback=function(a,n,o){e.prototype.attributeChangedCallback.call(this,a,n,o),o!==n&&(a===t.Attribute.LIVE_THRESHOLD&&this._updateLive(),r.observedAttributes.indexOf(a)>=0&&c(this))},k(r,[{key:"paused",get:function(){return this.hasAttribute(t.Attribute.PAUSED)},set:function(e){e?this.setAttribute(t.Attribute.PAUSED,""):this.removeAttribute(t.Attribute.PAUSED)}},{key:"streamType",get:function(){return this.getAttribute(t.Attribute.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(t.Attribute.STREAM_TYPE,e)}},{key:"liveThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(t.Attribute.LIVE_THRESHOLD))?e:10)},set:function(e){e=Number(e),this.setAttribute(t.Attribute.LIVE_THRESHOLD,String(isNaN(e)?0:e))}},{key:"live",get:function(){return this.hasAttribute(t.Attribute.LIVE)},set:function(e){e?this.setAttribute(t.Attribute.LIVE,""):this.removeAttribute(t.Attribute.LIVE)}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&(this._player.removeEventListener(rl,this._updatePaused),this._player.removeEventListener(rs,this._updateLive)),this._player=t,this._updatePaused(),this._updateLive(),void 0!==this._player&&(this._player.addEventListener(rl,this._updatePaused),this._player.addEventListener(rs,this._updateLive)))}}],[{key:"observedAttributes",get:function(){return L(E.observedAttributes).concat([t.Attribute.STREAM_TYPE,t.Attribute.LIVE,t.Attribute.PAUSED,t.Attribute.LIVE_THRESHOLD])}}]),r}(z(E,["player","streamType"]));customElements.define("theoplayer-live-button",ru);var rp=document.createElement("template");rp.innerHTML="<style>"+$+"\n: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>",h(rp,"theoplayer-ad-display");var rh=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"],rd=function(t){function e(){(e=t.call(this)||this)._updateFromPlayer=function(){var t,r,a,n=null==(t=e._player)?void 0:t.ads,o=(null!=(a=null==n?void 0:null==(r=n.currentAdBreak)?void 0:r.ads)?a:[]).filter(eQ);if(void 0===n||!n.playing||0===o.length){B(e._spanEl,""),e.style.display="none";return}if(o.length>1){var i=D(e._player.ads.currentAds||[],eQ);if(i){var l=o.indexOf(i);if(l>=0){B(e._spanEl,"Ad "+(l+1)+" of "+o.length),e.style.display="";return}}}B(e._spanEl,"Ad"),e.style.display=""};var e,r=e.attachShadow({mode:"open"});return r.appendChild(rp.content.cloneNode(!0)),e._spanEl=r.querySelector("span"),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){d(this),this._updateFromPlayer()},k(e,[{key:"player",get:function(){return this._player},set:function(t){var e,r;this._player!==t&&(void 0!==this._player&&(null==(e=this._player.ads)||e.removeEventListener(rh,this._updateFromPlayer)),this._player=t,this._updateFromPlayer(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(rh,this._updateFromPlayer)))}}]),e}(z(HTMLElement,["player"]));customElements.define("theoplayer-ad-display",rd);var rc=document.createElement("template");rc.innerHTML="<style>"+$+"\n:host{pointer-events:none}</style><span></span>",h(rc,"theoplayer-ad-countdown");var ry=["adbreakbegin","adbreakend","adbreakchange","updateadbreak"],rb=function(t){function e(){(e=t.call(this)||this)._onAdChange=function(){var t,r,a;(null==(t=e._player)?void 0:null==(r=t.ads)?void 0:r.playing)?(e._player.removeEventListener("timeupdate",e._update),e._player.addEventListener("timeupdate",e._update)):null==(a=e._player)||a.removeEventListener("timeupdate",e._update),e._update()},e._update=function(){var t,r,a=null==(t=e._player)?void 0:t.ads,n=null==a?void 0:null==(r=a.currentAdBreak)?void 0:r.maxRemainingDuration;if(void 0===a||!a.playing||void 0===n||n<0){B(e._spanEl,""),e.style.display="none";return}n=Math.ceil(n),B(e._spanEl,"Content will resume in "+n+"s"),e.style.display=""};var e,r=e.attachShadow({mode:"open"});return r.appendChild(rc.content.cloneNode(!0)),e._spanEl=r.querySelector("span"),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){d(this),this._update()},k(e,[{key:"player",get:function(){return this._player},set:function(t){var e,r;this._player!==t&&(void 0!==this._player&&(this._player.removeEventListener("timeupdate",this._update),null==(e=this._player.ads)||e.removeEventListener(ry,this._onAdChange)),this._player=t,this._onAdChange(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(ry,this._onAdChange)))}}]),e}(z(HTMLElement,["player"]));customElements.define("theoplayer-ad-countdown",rb);var rm=document.createElement("template");rm.innerHTML=x("<slot>Visit Advertiser</slot>"),h(rm,"theoplayer-ad-clickthrough-button");var rv=["adbegin","adend","adloaded","updatead","adskip"],rf=function(e){function r(){var t;return(t=e.call(this,{template:rm})||this)._updateFromPlayer=function(){var e,r,a=null==(e=t._player)?void 0:e.ads;if(!a||!a.playing){t.clickThrough=null;return}var n=D(null!=(r=a.currentAds)?r:[],eQ);if(void 0===n||"google-ima"===n.integration){t.clickThrough=null;return}var o=n.clickThrough;if(!o){t.clickThrough=null;return}t.clickThrough=o},t.disabled=!0,t.style.display="none",t._upgradeProperty("clickThrough"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer()},n.attributeChangedCallback=function(a,n,o){if(e.prototype.attributeChangedCallback.call(this,a,n,o),a===t.Attribute.CLICKTHROUGH&&o!==n){var i=null!=o,l=o?String(o).trim():"#";this.setLink(l,"_blank"),this.disabled=!i,i?this.style.display="":this.style.display="none"}r.observedAttributes.indexOf(a)>=0&&c(this)},n.handleClick=function(){var t;null==(t=this._player)||t.pause()},k(r,[{key:"clickThrough",get:function(){return this.getAttribute(t.Attribute.CLICKTHROUGH)},set:function(e){null==e?this.removeAttribute(t.Attribute.CLICKTHROUGH):this.setAttribute(t.Attribute.CLICKTHROUGH,e)}},{key:"player",get:function(){return this._player},set:function(t){var e,r;this._player!==t&&(void 0!==this._player&&(null==(e=this._player.ads)||e.removeEventListener(rv,this._updateFromPlayer)),this._player=t,this._updateFromPlayer(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(rv,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return L(C.observedAttributes).concat([t.Attribute.CLICKTHROUGH])}}]),r}(z(C,["player"]));customElements.define("theoplayer-ad-clickthrough-button",rf);var rg=document.createElement("template");rg.innerHTML=A('<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>\n</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)}: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=skip]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}[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))}"),h(rg,"theoplayer-ad-skip-button");var r_=["adbegin","adend","adloaded","updatead","adskip"],rk=function(e){function r(){var r;return(r=e.call(this,{template:rg})||this)._onAdChange=function(){var t,e,a;(null==(t=r._player)?void 0:null==(e=t.ads)?void 0:e.playing)?(r._player.removeEventListener("timeupdate",r._update),r._player.addEventListener("timeupdate",r._update)):null==(a=r._player)||a.removeEventListener("timeupdate",r._update),r._update()},r._update=function(){var e,a,n=null==(e=r._player)?void 0:e.ads;if(!n||!n.playing){r.style.display="none";return}var o=D(null!=(a=n.currentAds)?a:[],eQ);if(void 0===o||"google-ima"===o.integration){r.style.display="none";return}var i=o.skipOffset;if(void 0===i||i<0||void 0!==o.duration&&i>=o.duration){r.style.display="none";return}var l=r._player.currentTime;l<i?(B(r._countdownEl,"Skip in "+Math.ceil(i-l)+"s"),r._countdownEl.style.display="",r._skipEl.style.display="none",r.style.display="",r.setAttribute(t.Attribute.DISABLED,""),r.setAttribute(t.Attribute.ARIA_LIVE,"off")):(r._countdownEl.style.display="none",r._skipEl.style.display="",r.style.display="",r.removeAttribute(t.Attribute.DISABLED),r.setAttribute(t.Attribute.ARIA_LIVE,"polite"))},r._countdownEl=r.shadowRoot.querySelector('[part="countdown"]'),r._skipEl=r.shadowRoot.querySelector('[part="skip"]'),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._update()},n.handleClick=function(){var t,e;null==(t=this._player)||null==(e=t.ads)||e.skip()},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&c(this)},k(r,[{key:"player",get:function(){return this._player},set:function(t){var e,r;this._player!==t&&(void 0!==this._player&&(this._player.removeEventListener("timeupdate",this._update),null==(e=this._player.ads)||e.removeEventListener(r_,this._onAdChange)),this._player=t,this._onAdChange(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(r_,this._onAdChange)))}}],[{key:"observedAttributes",get:function(){return[].concat(E.observedAttributes)}}]),r}(z(E,["player"]));customElements.define("theoplayer-ad-skip-button",rk),t.ExtensionSlot=void 0,(v=t.ExtensionSlot||(t.ExtensionSlot={})).TopControlBar="top-control-bar",v.BottomControlBar="bottom-control-bar",v.Menu="menu";var rA=[];function rw(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var rE=function(){if(document)for(var t,e=u([["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"]]);!(t=e()).done;){var r=t.value;if(r[1]in document)return{requestFullscreen_:r[0],exitFullscreen_:r[1],fullscreenElement_:r[2],fullscreenEnabled_:r[3],fullscreenchange_:r[4],fullscreenerror_:r[5]}}}();function rx(){if("object"!=typeof navigator)return!1;if(navigator.userAgentData)return navigator.userAgentData.mobile;var t=navigator.userAgent;return!!t&&/Android|iPhone|iPad|iPod|Mobile Safari|Windows Phone/i.test(t)}var rT=function(){function t(t,e,r,a){this.x=t,this.y=e,this.width=r,this.height=a}var e=t.prototype;return e.overlaps=function(t){return this.x<t.right&&this.right>t.x&&this.y<t.bottom&&this.bottom>t.y},e.contains=function(t){return this.x<=t.x&&t.right<=this.right&&this.y<=t.y&&t.bottom<=this.bottom},e.union=function(e){var r=Math.min(this.x,e.x),a=Math.min(this.y,e.y),n=Math.max(this.right,e.right)-r,o=Math.max(this.bottom,e.bottom)-a;return new t(r,a,n,o)},e.clone=function(){return new t(this.x,this.y,this.width,this.height)},e.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,left:this.left,right:this.right,top:this.top,bottom:this.bottom}},t.fromRect=function(e){var r,a,n,o,i,l;return new t(null!=(a=null!=(r=e.left)?r:e.x)?a:0,null!=(o=null!=(n=e.top)?n:e.y)?o:0,null!=(i=e.width)?i:0,null!=(l=e.height)?l:0)},k(t,[{key:"left",get:function(){return this.x},set:function(t){this.x=t}},{key:"right",get:function(){return this.x+this.width},set:function(t){this.x=t-this.width}},{key:"top",get:function(){return this.y},set:function(t){this.y=t}},{key:"bottom",get:function(){return this.y+this.height},set:function(t){this.y=t-this.height}}]),t}(),rC="theoplayerstreamtypechange",rL=document.createElement("template");rL.innerHTML='<style>:host{background:#000;background:var(--theoplayer-background,#000);-webkit-box-sizing:border-box;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(:-ms-fullscreen){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:-webkit-box;display:-ms-flexbox;display:flex}[part~=chrome],[part~=gesture-layer],[part~=vertical-layer]{pointer-events:none}[part~=chrome] ::slotted(*){pointer-events:auto}[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]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-ms-flex-flow:column nowrap;flex-flow:column nowrap}[part~=centered]{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;justify-content:center}[part~=middle]{-webkit-box-flex:1;-ms-flex-positive:1;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])) [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]{-ms-grid-column-align:stretch;background:rgba(0,0,0,.5);background:var(--theoplayer-menu-backdrop-background,rgba(0,0,0,.5));display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:stretch}[part=menu] ::slotted(*){-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-ms-grid-column-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;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]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;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]{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]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;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]{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;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){-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch}theoplayer-gesture-receiver{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}:host(:not([mobile])) [part~=chrome] ::slotted([mobile-only]),:host([mobile]) [part~=chrome] ::slotted([mobile-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;-webkit-transition:opacity 1s;transition:opacity 1s}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])) [part~=vertical-layer]:before{opacity:0;-webkit-transition:opacity 1s;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>',h(rL,"theoplayer-ui");var rS=function(r){function n(e){void 0===e&&(e={}),(a=r.call(this)||this)._configuration={},a._pointerType="",a._lastPointerUpTime=0,a._stateReceivers=[],a._player=void 0,a._source=void 0,a._userIdleTimer=0,a._previewTime=NaN,a._activeVideoTrack=void 0,a._onMutation=function(t){for(var e,r=u(t);!(e=r()).done;){var n=e.value;if("childList"===n.type){for(var o=n.addedNodes,i=n.removedNodes,l=0;l<o.length;l++){var s=o[l];M(s)&&V(s,a._playerEl,a.registerStateReceiver_)}for(var p=0;p<i.length;p++){var h=i[p];M(h)&&V(h,a._playerEl,a.unregisterStateReceiver_)}}}},a._onSlotChange=function(){V(rw(a),a._playerEl,a.registerStateReceiver_),a._updateTextTrackMargins()},a.registerStateReceiver_=function(t){a._stateReceivers.indexOf(t)>=0||(a._stateReceivers.push(t),a.propagateStateToReceiver_(t))},a.unregisterStateReceiver_=function(t){var e,r;!((r=(e=a._stateReceivers).indexOf(t))<0)&&(function(t,e){t.splice(e,1)}(e,r),1)&&a.removeStateFromReceiver_(t)},a._onToggleMenu=function(t){t.stopPropagation();var e=t.detail.menu;if(!a._menuGroup.getMenuById(e)){console.error('<theoplayer-ui>: cannot find menu with ID "'+e+'"');return}var r=R(t.target)?t.target:void 0;a._menuGroup.isMenuOpen(e)?a.closeMenu_():(a.closeMenu_(),a.openMenu_(e,r))},a._onCloseMenu=function(t){t.stopPropagation(),a.closeMenu_()},a._onMenuChange=function(){a._menuEl.removeEventListener("pointerdown",a._onMenuPointerDown),a._menuEl.removeEventListener("click",a._onMenuClick),a._menuGroup.hasCurrentMenu()?(a._menuEl.addEventListener("pointerdown",a._onMenuPointerDown),a._menuEl.addEventListener("click",a._onMenuClick),a.setAttribute(t.Attribute.MENU_OPENED,"")):a.removeAttribute(t.Attribute.MENU_OPENED)},a._onMenuPointerDown=function(t){a._pointerType=t.pointerType},a._onMenuClick=function(t){var e,r=null!=(e=t.pointerType)?e:a._pointerType;t.target===a._menuEl&&"mouse"===r&&a._menuGroup.closeCurrentMenu()&&t.preventDefault()},a._onEnterFullscreen=function(t){if(t.stopPropagation(),rE&&document[rE.fullscreenEnabled_]&&a[rE.requestFullscreen_]){var e=a[rE.requestFullscreen_]();e&&e.then&&e.then(P,P)}else a._player&&a._player.presentation.supportsMode("fullscreen")&&a._player.presentation.requestMode("fullscreen")},a._onExitFullscreen=function(t){if(t.stopPropagation(),rE){var e=document[rE.exitFullscreen_]();e&&e.then&&e.then(P,P)}a._player&&"fullscreen"===a._player.presentation.currentMode&&a._player.presentation.requestMode("inline")},a._onFullscreenChange=function(){var e=!1;if(void 0!==rE){var r=document[rE.fullscreenElement_];r&&(e=function t(e,r){if(!e||!r)return!1;if(e.contains(r))return!0;var a=r.getRootNode();return!!a.host&&t(e,a.host)}(r,rw(a)))}e||void 0===a._player||"fullscreen"!==a._player.presentation.currentMode||(e=!0),e?a.setAttribute(t.Attribute.FULLSCREEN,""):a.removeAttribute(t.Attribute.FULLSCREEN)},a._updateAspectRatio=function(){if(void 0!==a._player){var t=a._player,e=t.videoWidth,r=t.videoHeight;e>0&&r>0?c(rw(a),{"--theoplayer-video-width":""+e,"--theoplayer-video-height":""+r}):c(rw(a),{"--theoplayer-video-width":"","--theoplayer-video-height":""})}},a._updateError=function(){var e=null==(r=a._player)?void 0:r.errorObject;e?a.setAttribute(t.Attribute.HAS_ERROR,""):a.removeAttribute(t.Attribute.HAS_ERROR);for(var r,n,o=u(a._stateReceivers);!(n=o()).done;){var i=n.value;i[H].indexOf("error")>=0&&(i.error=e)}},a._onPlay=function(){a.setAttribute(t.Attribute.HAS_FIRST_PLAY,""),a.removeAttribute(t.Attribute.PAUSED),a._updateEnded()},a._onPause=function(){a.setAttribute(t.Attribute.PAUSED,""),a._updateEnded()},a._updatePausedAndEnded=function(){!a._player||a._player.paused?a.setAttribute(t.Attribute.PAUSED,""):a.removeAttribute(t.Attribute.PAUSED),a._updateEnded()},a._updateEnded=function(){a._player&&a._player.ended?a.setAttribute(t.Attribute.ENDED,""):a.removeAttribute(t.Attribute.ENDED)},a._updateStreamType=function(){if(void 0!==a._player){var t,e=a._player.duration;if(!isNaN(e)){if(e===1/0){t="live";var r=a.dvrThreshold,n=a._player.seekable;(r<=0||n.length>0&&n.end(n.length-1)-n.start(0)>=r)&&(t="dvr")}else t="vod";a.streamType=t}}},a._updatePlaybackRate=function(){if(void 0!==a._player)for(var t,e=a._player.playbackRate,r=u(a._stateReceivers);!(t=r()).done;){var n=t.value;n[H].indexOf("playbackRate")>=0&&(n.playbackRate=e)}},a._updateMuted=function(){void 0!==a._player&&(a.muted=a._player.muted)},a._updateActiveVideoTrack=function(){if(void 0!==a._player){var t,e,r,n,o=D(a._player.videoTracks,function(t){return t.enabled});a._activeVideoTrack!==o&&(null==(t=a._activeVideoTrack)||t.removeEventListener("activequalitychanged",a._updateActiveVideoQuality),null==(e=a._activeVideoTrack)||e.removeEventListener("targetqualitychanged",a._updateTargetVideoQualities),a._activeVideoTrack=o,a._updateActiveVideoQuality(),a._updateTargetVideoQualities(),null==(r=a._activeVideoTrack)||r.addEventListener("activequalitychanged",a._updateActiveVideoQuality),null==(n=a._activeVideoTrack)||n.addEventListener("targetqualitychanged",a._updateTargetVideoQualities))}},a._updateActiveVideoQuality=function(){for(var t,e,r=null==(t=a._activeVideoTrack)?void 0:t.activeQuality,n=u(a._stateReceivers);!(e=n()).done;){var o=e.value;o[H].indexOf("activeVideoQuality")>=0&&(o.activeVideoQuality=r)}},a._updateTargetVideoQualities=function(){for(var t,e=tU(a._activeVideoTrack),r=u(a._stateReceivers);!(t=r()).done;){var n=t.value;n[H].indexOf("targetVideoQualities")>=0&&(n.targetVideoQualities=e)}},a._updateCasting=function(){var e,r,n;null!=(n=null==(e=a._player)?void 0:null==(r=e.cast)?void 0:r.casting)&&n?a.setAttribute(t.Attribute.CASTING,""):a.removeAttribute(t.Attribute.CASTING)},a._updatePlayingAd=function(){var e,r,n;null!=(n=null==(e=a._player)?void 0:null==(r=e.ads)?void 0:r.playing)&&n?a.setAttribute(t.Attribute.PLAYING_AD,""):a.removeAttribute(t.Attribute.PLAYING_AD)},a._onSourceChange=function(){a.closeMenu_(),void 0===a._player||a._player.paused?a.removeAttribute(t.Attribute.HAS_FIRST_PLAY):a.setAttribute(t.Attribute.HAS_FIRST_PLAY,"")},a.setUserIdle_=function(){clearTimeout(a._userIdleTimer),a._userIdleTimer=0,a.userIdleTimeout<0||a.setAttribute(t.Attribute.USER_IDLE,"")},a.scheduleUserIdle_=function(){if(a.setUserActive_(),clearTimeout(a._userIdleTimer),a.userIdleTimeout<0){a._userIdleTimer=0;return}a._userIdleTimer=setTimeout(a.setUserIdle_,1e3*a.userIdleTimeout)},a._onKeyUp=function(){a.scheduleUserIdle_()},a._onPointerUp=function(e){"touch"===e.pointerType&&(a.isPlayerOrMedia_(e.target)&&!a.hasAttribute(t.Attribute.USER_IDLE)?a.setUserIdle_():(a.isUserIdle_()&&(a._lastPointerUpTime=performance.now(),a.addEventListener("click",a._onClickAfterPointerUp,!0)),a.scheduleUserIdle_()))},a._onClickAfterPointerUp=function(t){a.removeEventListener("click",a._onClickAfterPointerUp,!0),performance.now()-a._lastPointerUpTime<10&&(t.preventDefault(),t.stopPropagation())},a._onPointerMove=function(t){"mouse"===t.pointerType&&(a.setUserActive_(),a.isPlayerOrMedia_(t.target)&&a.scheduleUserIdle_())},a._onMouseLeave=function(){a.setUserIdle_()},a._onChromeSlotTransition=function(t){"opacity"===t.propertyName&&a._updateTextTrackMargins()},a._updateTextTrackMargins=function(){var t=a._player;if(void 0!==t){var e=rP(a._topChromeSlot),r=rP(a._bottomChromeSlot);t.textTrackStyle.marginTop=null==e?void 0:e.height,t.textTrackStyle.marginBottom=null==r?void 0:r.height}},a._onPreviewTimeChange=function(t){a._previewTime=t.detail.previewTime;for(var e,r=u(a._stateReceivers);!(e=r()).done;){var n=e.value;n[H].indexOf("previewTime")>=0&&(n.previewTime=a._previewTime)}};var a,n=a.attachShadow({mode:"open",delegatesFocus:!0});return n.appendChild(rL.content.cloneNode(!0)),a._configuration=e,a._playerEl=n.querySelector('[part~="media-layer"]'),a._menuEl=n.querySelector('[part~="menu-layer"]'),a._menuGroup=n.querySelector("theoplayer-menu-group"),a._topChromeEl=n.querySelector('[part~="top"]'),a._topChromeSlot=n.querySelector('slot[name="top-chrome"]'),a._bottomChromeEl=n.querySelector('[part~="bottom"]'),a._bottomChromeSlot=n.querySelector("slot:not([name])"),a._mutationObserver=new MutationObserver(a._onMutation),"undefined"!=typeof ResizeObserver&&(a._resizeObserver=new ResizeObserver(a._updateTextTrackMargins)),n.addEventListener(tE,a._onToggleMenu),n.addEventListener(eP,a._onEnterFullscreen),n.addEventListener(eM,a._onExitFullscreen),n.addEventListener(eq,a._onPreviewTimeChange),a._topChromeSlot.addEventListener("transitionstart",a._onChromeSlotTransition),a._topChromeSlot.addEventListener("transitionend",a._onChromeSlotTransition),a._bottomChromeSlot.addEventListener("transitionstart",a._onChromeSlotTransition),a._bottomChromeSlot.addEventListener("transitionend",a._onChromeSlotTransition),a._upgradeProperty("configuration"),a._upgradeProperty("source"),a._upgradeProperty("muted"),a._upgradeProperty("autoplay"),a._upgradeProperty("userIdleTimeout"),a._upgradeProperty("streamType"),a.tryInitializePlayer_(),a}a(n,r);var o=n.prototype;return o._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},o._setConfiguration=function(t){this._configuration=null!=t?t:{},this.tryInitializePlayer_()},o._setSource=function(t){this._player?this._player.source=t:this._source=t},o.connectedCallback=function(){d(this),!this.hasAttribute(t.Attribute.MOBILE)&&rx()&&this.setAttribute(t.Attribute.MOBILE,""),this.hasAttribute(t.Attribute.PAUSED)||this.setAttribute(t.Attribute.PAUSED,""),this.tryInitializePlayer_();for(var e,r,a=u(this._stateReceivers);!(r=a()).done;){var n=r.value;this.propagateStateToReceiver_(n)}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(tg,this._onCloseMenu),this._menuGroup.addEventListener(t_,this._onMenuChange),void 0!==rE&&(document.addEventListener(rE.fullscreenchange_,this._onFullscreenChange),document.addEventListener(rE.fullscreenerror_,this._onFullscreenChange),this._onFullscreenChange()),this.setUserIdle_(),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointermove",this._onPointerMove),this.addEventListener("mouseleave",this._onMouseLeave)},o.tryInitializePlayer_=function(){if(void 0===this._player&&(void 0!==this._configuration.license||void 0!==this._configuration.licenseUrl)){this._player=new e.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;for(var t,r,a,n=u(this._stateReceivers);!(a=n()).done;){var o=a.value;o[H].indexOf("player")>=0&&(o.player=this._player)}this._updateAspectRatio(),this._updateError(),this._updatePausedAndEnded(),this._updateCasting(),this._player.addEventListener("resize",this._updateAspectRatio),this._player.addEventListener(["error","sourcechange","emptied"],this._updateError),this._player.addEventListener("volumechange",this._updateMuted),this._player.addEventListener("play",this._onPlay),this._player.addEventListener("pause",this._onPause),this._player.addEventListener(["ended","emptied"],this._updatePausedAndEnded),this._player.addEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),this._player.addEventListener("ratechange",this._updatePlaybackRate),this._player.addEventListener("sourcechange",this._onSourceChange),this._player.videoTracks.addEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(t=this._player.cast)||t.addEventListener("castingchange",this._updateCasting),this._player.addEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd),null==(r=this._player.ads)||r.addEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}},o.disconnectedCallback=function(){null==(t=this._resizeObserver)||t.disconnect(),this._mutationObserver.disconnect(),this.shadowRoot.removeEventListener("slotchange",this._onSlotChange);for(var t,e,r=u(this._stateReceivers);!(e=r()).done;){var a=e.value;this.removeStateFromReceiver_(a)}this._stateReceivers.length=0,this._menuGroup.removeEventListener(tg,this._onCloseMenu),this._menuGroup.removeEventListener(t_,this._onMenuChange),void 0!==rE&&(document.removeEventListener(rE.fullscreenchange_,this._onFullscreenChange),document.removeEventListener(rE.fullscreenerror_,this._onFullscreenChange)),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._player.destroy(),this._player=void 0)},o.attributeChangedCallback=function(e,r,a){if(a!==r){var o=null!=a;if(e===t.Attribute.CONFIGURATION)this._setConfiguration(a?JSON.parse(a):{});else if(e===t.Attribute.SOURCE)this._setSource(a?JSON.parse(a):void 0);else if(e===t.Attribute.MUTED)this._player&&(this._player.muted=o);else if(e===t.Attribute.AUTOPLAY)this._player&&(this._player.autoplay=o);else if(e===t.Attribute.FULLSCREEN)for(var i,l=u(this._stateReceivers);!(i=l()).done;){var s=i.value;s[H].indexOf("fullscreen")>=0&&(s.fullscreen=o)}else if(e===t.Attribute.STREAM_TYPE){for(var p,h=u(this._stateReceivers);!(p=h()).done;){var d=p.value;d[H].indexOf("streamType")>=0&&(d.streamType=a)}var y=tc(rC,{bubbles:!0,composed:!0,detail:{streamType:a}});this.dispatchEvent(y)}else e===t.Attribute.FLUID?this._updateAspectRatio():e===t.Attribute.USER_IDLE||e===t.Attribute.PAUSED||e===t.Attribute.CASTING?this._updateTextTrackMargins():e===t.Attribute.DVR_THRESHOLD&&this._updateStreamType();n.observedAttributes.indexOf(e)>=0&&c(this)}},o.propagateStateToReceiver_=function(t){var e,r=t[H];r.indexOf("player")>=0&&(t.player=this._player),r.indexOf("fullscreen")>=0&&(t.fullscreen=this.fullscreen),r.indexOf("streamType")>=0&&(t.streamType=this.streamType),void 0!==this._player&&(r.indexOf("playbackRate")>=0&&(t.playbackRate=this._player.playbackRate),r.indexOf("error")>=0&&(t.error=this._player.errorObject),r.indexOf("activeVideoQuality")>=0&&(t.activeVideoQuality=null==(e=this._activeVideoTrack)?void 0:e.activeQuality),r.indexOf("targetVideoQualities")>=0&&(t.targetVideoQualities=tU(this._activeVideoTrack))),r.indexOf("previewTime")>=0&&(t.previewTime=this._previewTime)},o.removeStateFromReceiver_=function(t){t[H].indexOf("player")>=0&&(t.player=void 0)},o.openMenu_=function(t,e){var r=rT.fromRect(this._topChromeEl.getBoundingClientRect()),a=rT.fromRect(this._bottomChromeEl.getBoundingClientRect()),n=!0,o=!0;if(void 0!==e){var i=rT.fromRect(this.getBoundingClientRect()),l=rT.fromRect(e.getBoundingClientRect());i.width>0&&i.height>0&&(n=l.top>=i.top+i.height/2,o=l.left>=i.left+i.width/2)}this._menuGroup.openMenu(t,e),this._menuOpener=e,c(this,{"--theoplayer-menu-offset-top":""+Math.round(r.height)+"px","--theoplayer-menu-offset-bottom":""+Math.round(a.height)+"px","--theoplayer-menu-margin-top":n?"auto":"0","--theoplayer-menu-margin-bottom":n?"0":"auto","--theoplayer-menu-margin-left":o?"auto":"0","--theoplayer-menu-margin-right":o?"0":"auto"})},o.closeMenu_=function(){var t;this._menuGroup.closeMenu(),null==(t=this._menuOpener)||t.focus(),this._menuOpener=void 0},o.isUserIdle_=function(){return this.hasAttribute(t.Attribute.USER_IDLE)&&!this.paused&&!this.casting&&!this._menuGroup.hasCurrentMenu()},o.setUserActive_=function(){clearTimeout(this._userIdleTimer),this.removeAttribute(t.Attribute.USER_IDLE)},o.isPlayerOrMedia_=function(t){return t===this||this._playerEl.contains(t)},k(n,[{key:"player",get:function(){return this._player}},{key:"configuration",get:function(){return this._configuration},set:function(e){this.removeAttribute(t.Attribute.CONFIGURATION),this._setConfiguration(e)}},{key:"source",get:function(){return this._player?this._player.source:this._source},set:function(e){this.removeAttribute(t.Attribute.SOURCE),this._setSource(e)}},{key:"muted",get:function(){return this.hasAttribute(t.Attribute.MUTED)},set:function(e){e?this.setAttribute(t.Attribute.MUTED,""):this.removeAttribute(t.Attribute.MUTED)}},{key:"autoplay",get:function(){return this.hasAttribute(t.Attribute.AUTOPLAY)},set:function(e){e?this.setAttribute(t.Attribute.AUTOPLAY,""):this.removeAttribute(t.Attribute.AUTOPLAY)}},{key:"fullscreen",get:function(){return this.hasAttribute(t.Attribute.FULLSCREEN)}},{key:"paused",get:function(){return this.hasAttribute(t.Attribute.PAUSED)}},{key:"ended",get:function(){return this.hasAttribute(t.Attribute.ENDED)}},{key:"casting",get:function(){return this.hasAttribute(t.Attribute.CASTING)}},{key:"userIdleTimeout",get:function(){var e;return Number(null!=(e=this.getAttribute(t.Attribute.USER_IDLE_TIMEOUT))?e:2)},set:function(e){e=Number(e),this.setAttribute(t.Attribute.USER_IDLE_TIMEOUT,String(isNaN(e)?0:e))}},{key:"streamType",get:function(){return this.getAttribute(t.Attribute.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(t.Attribute.STREAM_TYPE,e)}},{key:"dvrThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(t.Attribute.DVR_THRESHOLD))?e:60)},set:function(e){e=Number(e),this.setAttribute(t.Attribute.DVR_THRESHOLD,String(isNaN(e)?0:e))}}],[{key:"observedAttributes",get:function(){return[t.Attribute.CONFIGURATION,t.Attribute.SOURCE,t.Attribute.MUTED,t.Attribute.AUTOPLAY,t.Attribute.FULLSCREEN,t.Attribute.FLUID,t.Attribute.MOBILE,t.Attribute.PAUSED,t.Attribute.ENDED,t.Attribute.CASTING,t.Attribute.PLAYING_AD,t.Attribute.HAS_ERROR,t.Attribute.HAS_FIRST_PLAY,t.Attribute.STREAM_TYPE,t.Attribute.DVR_THRESHOLD,t.Attribute.USER_IDLE,t.Attribute.USER_IDLE_TIMEOUT]}}]),n}(i(HTMLElement));function rP(t){for(var e,r,a=t.assignedNodes().filter(R),n=u(a);!(r=n()).done;){var o=r.value;if("0"!==getComputedStyle(o).opacity){var i=rT.fromRect(o.getBoundingClientRect());i.width>0&&i.height>0&&(e=e?e.union(i):i)}}return e}customElements.define("theoplayer-ui",rS);var rM=document.createElement("template");rM.innerHTML='<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;position:relative}:host([hidden]){display:none!important}theoplayer-ui{width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:-ms-fullscreen),:host(:-ms-fullscreen) 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;-ms-user-select:none;user-select:none}:host(:not([has-title])) [part=title]{display:none}[part=centered-chrome] *{--theoplayer-control-height:48px}[part=middle-chrome]{-webkit-box-pack:end;-ms-flex-pack:end;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;justify-content:flex-end}[part=bottom-chrome],[part=middle-chrome]{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap;pointer-events:none;position:relative}[part=bottom-chrome]{-webkit-box-align:stretch;-ms-flex-align:stretch;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:-webkit-gradient(linear,left bottom,left top,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:-webkit-gradient(linear,left top,left bottom,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}theoplayer-time-range{--theoplayer-control-height:12px;--theoplayer-range-track-pointer-background:hsla(0,0%,100%,.5)}[part=ad-chrome]{--theoplayer-control-height:12px;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;pointer-events:none}theoplayer-ad-display,theoplayer-ad-skip-button{-ms-flex-negative:0;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{border-right:0!important}theoplayer-ad-skip-button:not([disabled]){--theoplayer-ad-skip-icon-width:24px;--theoplayer-ad-skip-icon-height:24px;font-size:17.5px;font-size:calc(var(--theoplayer-text-font-size, 14px)*1.25);line-height:30px;line-height:calc(var(--theoplayer-text-content-height, var(--theoplayer-control-height, 24px))*1.25)}: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([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-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;-webkit-transition:width .2s ease-in;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: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-ad-clickthrough-button ad-only mobile-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 class="theoplayer-ad-control"></theoplayer-time-range></theoplayer-control-bar><theoplayer-control-bar ad-hidden><theoplayer-play-button mobile-hidden></theoplayer-play-button><theoplayer-mute-button></theoplayer-mute-button><theoplayer-volume-range mobile-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 mobile-hidden ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button mobile-hidden ad-hidden></theoplayer-chromecast-button><slot name="bottom-control-bar"></slot><theoplayer-fullscreen-button></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-language-menu id="language-menu" slot="menu" hidden></theoplayer-language-menu><theoplayer-error-display slot="error"></theoplayer-error-display><slot name="menu" slot="menu"></slot></theoplayer-ui>',h(rM,"theoplayer-default-ui");var rR=function(e){function r(r){void 0===r&&(r={}),(a=e.call(this)||this)._appliedExtensions=!1,a._updateStreamType=function(){a.setAttribute(t.Attribute.STREAM_TYPE,a.streamType),"live"===a.streamType?a._timeRange.setAttribute(t.Attribute.HIDDEN,""):a._timeRange.removeAttribute(t.Attribute.HIDDEN)},a._onTitleSlotChange=function(){a._titleSlot.assignedNodes().length>0?a.setAttribute(t.Attribute.HAS_TITLE,""):a.removeAttribute(t.Attribute.HAS_TITLE)};var a,n=a.attachShadow({mode:"open",delegatesFocus:!0});return n.appendChild(rM.content.cloneNode(!0)),a._ui=n.querySelector("theoplayer-ui"),a._ui.addEventListener(rC,a._updateStreamType),a.setConfiguration_(r),a._titleSlot=n.querySelector('slot[name="title"]'),a._titleSlot.addEventListener("slotchange",a._onTitleSlotChange),a._timeRange=n.querySelector("theoplayer-time-range"),a._upgradeProperty("configuration"),a._upgradeProperty("source"),a._upgradeProperty("muted"),a._upgradeProperty("autoplay"),a._upgradeProperty("streamType"),a._upgradeProperty("userIdleTimeout"),a._upgradeProperty("dvrThreshold"),a}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.setConfiguration_=function(t){var e;this._ui.configuration=th({},t,{ads:th({},null!=(e=t.ads)?e:{},{showCountdown:!1})})},n.connectedCallback=function(){d(this),!this.hasAttribute(t.Attribute.MOBILE)&&rx()&&this.setAttribute(t.Attribute.MOBILE,""),this._appliedExtensions||(this._appliedExtensions=!0,function(t){for(var e,r=u(rA);!(e=r()).done;)(0,e.value)(t)}(this),c(this)),this._onTitleSlotChange()},n.disconnectedCallback=function(){},n.attributeChangedCallback=function(e,a,n){if(n!==a){var o=null!=n;e===t.Attribute.SOURCE?this._ui.source=n?JSON.parse(n):void 0:e===t.Attribute.CONFIGURATION?this.setConfiguration_(n?JSON.parse(n):{}):e===t.Attribute.MUTED?this.muted=o:e===t.Attribute.AUTOPLAY?this.autoplay=o:e===t.Attribute.FLUID?o?this._ui.setAttribute(t.Attribute.FLUID,n):this._ui.removeAttribute(t.Attribute.FLUID):e===t.Attribute.MOBILE?o?this._ui.setAttribute(t.Attribute.MOBILE,n):this._ui.removeAttribute(t.Attribute.MOBILE):e===t.Attribute.STREAM_TYPE?this.streamType=n:e===t.Attribute.USER_IDLE_TIMEOUT?this.userIdleTimeout=Number(n):e===t.Attribute.DVR_THRESHOLD&&(this.dvrThreshold=Number(n)),r.observedAttributes.indexOf(e)>=0&&c(this)}},k(r,[{key:"player",get:function(){return this._ui.player}},{key:"configuration",get:function(){return this._ui.configuration},set:function(e){this.removeAttribute(t.Attribute.CONFIGURATION),this.setConfiguration_(e)}},{key:"source",get:function(){return this._ui.source},set:function(e){this.removeAttribute(t.Attribute.SOURCE),this._ui.source=e}},{key:"muted",get:function(){return this._ui.muted},set:function(t){this._ui.muted=t}},{key:"autoplay",get:function(){return this._ui.autoplay},set:function(t){this._ui.autoplay=t}},{key:"streamType",get:function(){return this._ui.streamType},set:function(t){this._ui.streamType=t}},{key:"userIdleTimeout",get:function(){return this._ui.userIdleTimeout},set:function(t){this._ui.userIdleTimeout=t}},{key:"dvrThreshold",get:function(){return this._ui.dvrThreshold},set:function(t){this._ui.dvrThreshold=t}}],[{key:"observedAttributes",get:function(){return[t.Attribute.CONFIGURATION,t.Attribute.SOURCE,t.Attribute.MUTED,t.Attribute.AUTOPLAY,t.Attribute.FLUID,t.Attribute.MOBILE,t.Attribute.STREAM_TYPE,t.Attribute.USER_IDLE_TIMEOUT,t.Attribute.DVR_THRESHOLD,t.Attribute.HAS_TITLE]}}]),r}(i(HTMLElement));customElements.define("theoplayer-default-ui",rR),t.ActiveQualityDisplay=em,t.AdClickThroughButton=rf,t.AdCountdown=rb,t.AdDisplay=rd,t.AdSkipButton=rk,t.AirPlayButton=rt,t.Button=E,t.CastButton=e1,t.ChromecastButton=e4,t.ChromecastDisplay=e6,t.CloseMenuButton=tR,t.ColorStops=eO,t.ControlBar=g,t.DefaultUI=rR,t.DurationDisplay=tp,t.ErrorDisplay=e0,t.FullscreenButton=eI,t.GestureReceiver=ro,t.LanguageMenu=eo,t.LanguageMenuButton=es,t.LinkButton=C,t.LiveButton=ru,t.LoadingIndicator=ra,t.MediaTrackRadioButton=tD,t.Menu=tw,t.MenuButton=tP,t.MenuGroup=tC,t.MuteButton=j,t.PlayButton=K,t.PlaybackRateDisplay=eb,t.PlaybackRateMenu=ey,t.PlaybackRateMenuButton=ed,t.PlaybackRateRadioGroup=ep,t.PreviewThumbnail=eH,t.PreviewTimeDisplay=eG,t.QualityRadioButton=e_,t.QualityRadioGroup=ew,t.RadioButton=tb,t.RadioGroup=tv,t.Range=eN,t.SeekButton=J,t.SettingsMenu=eC,t.SettingsMenuButton=eS,t.StateReceiverMixin=z,t.TextTrackOffRadioButton=tQ,t.TextTrackRadioButton=tB,t.TextTrackStyleDisplay=t4,t.TextTrackStyleMenu=er,t.TextTrackStyleRadioGroup=t6,t.TextTrackStyleResetButton=ex,t.TimeDisplay=tl,t.TimeRange=ej,t.TrackRadioGroup=tW,t.UIContainer=rS,t.VolumeRange=eJ,t.buttonTemplate=A,t.linkButtonTemplate=x,t.menuGroupTemplate=tx,t.menuTemplate=tk,t.rangeTemplate=eD,t.registerExtension=function(t){rA.push(t)}});
|
|
4
|
+
*/!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("theoplayer/chromeless")):"function"==typeof define&&define.amd?define(["exports","theoplayer/chromeless"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).THEOplayerUI={},t.THEOplayer)}(this,function(t,e){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}function n(t,e,a){return(n=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}()?function(t,e,a){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return a&&r(o,a.prototype),o}:Reflect.construct).apply(null,arguments)}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t){var e="function"==typeof Map?new Map:void 0;return(i=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,a)}function a(){return n(t,arguments,o(this).constructor)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r(a,t)})(t)}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function s(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(t,e)}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var a=0;return function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow}function p(t,e){u()&&window.ShadyCSS.prepareTemplate(t,e)}function h(t){u()&&window.ShadyCSS.styleElement(t)}function d(t,e){void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeCss?window.ShadyCSS.styleSubtree(t,e):null!=e&&function(t,e){for(var r,a=t.style,n=s(Object.entries(e));!(r=n()).done;){var o=r.value,i=o[0],l=o[1];a.setProperty(i,l)}}(t,e)}var c,y,b,m,v=document.createElement("template");v.innerHTML="<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}:host([hidden]){display:none!important}::slotted(theoplayer-time-range){-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}</style><slot></slot>",p(v,"theoplayer-control-bar");var f=function(t){function e(){var e;return(e=t.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0}).appendChild(v.content.cloneNode(!0)),e}return a(e,t),e.prototype.connectedCallback=function(){h(this)},e}(i(HTMLElement));function g(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function _(t,e,r){return e&&g(t.prototype,e),r&&g(t,r),t}function k(t,e){return void 0===e&&(e=""),"<style>:host{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-button-text-color,var(--theoplayer-text-color,#fff));display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);justify-content:center;line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}:host([hidden]){display:none!important}:host(:not([disabled])){cursor:pointer}:host(:focus){-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}:host(:focus:not(:focus-visible)){-webkit-box-shadow:none;box-shadow:none}:host(:hover){background:transparent;background:var(--theoplayer-control-hover-background,var(--theoplayer-control-background,transparent))}:host([aria-checked=true]){background:#fff;background:var(--theoplayer-button-checked-background,#fff);color:#000;color:var(--theoplayer-button-checked-color,#000)}:host([disabled]){background:transparent;background:var(--theoplayer-control-background,transparent);color:#ccc;color:var(--theoplayer-button-disabled-text-color,#ccc)}[part$=icon],[part~=icon]{font-size:0}::slotted(img),::slotted(svg),img,svg{fill:currentColor;color:#fff;color:var(--theoplayer-icon-color,#fff);height:24px;height:var(--theoplayer-button-icon-height,var(--theoplayer-control-height,24px));max-height:100%;max-width:100%;min-width:100%;-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-button-icon-transition,none);transition:var(--theoplayer-button-icon-transition,none);vertical-align:middle;width:24px;width:var(--theoplayer-button-icon-width,var(--theoplayer-control-height,24px))}::slotted(img),img{-webkit-box-shadow:none;box-shadow:none;-webkit-box-shadow:var(--theoplayer-button-icon-shadow,none);box-shadow:var(--theoplayer-button-icon-shadow,none)}::slotted(svg),svg{-webkit-filter:drop-shadow(none);filter:drop-shadow(none);-webkit-filter:drop-shadow(var(--theoplayer-button-icon-shadow,none));filter:drop-shadow(var(--theoplayer-button-icon-shadow,none))}:host(:hover:not([disabled])) ::slotted(img),:host(:hover:not([disabled])) img{-webkit-box-shadow:0 0 4px hsla(0,0%,100%,.5);box-shadow:0 0 4px hsla(0,0%,100%,.5);-webkit-box-shadow:var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5));box-shadow:var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5))}:host(:hover:not([disabled])) ::slotted(svg),:host(:hover:not([disabled])) svg{-webkit-filter:drop-shadow(0 0 4px hsla(0,0%,100%,.5));filter:drop-shadow(0 0 4px rgba(255,255,255,.5));-webkit-filter:drop-shadow(var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5)));filter:drop-shadow(var(--theoplayer-button-hover-icon-shadow,0 0 4px rgba(255,255,255,.5)))}\n"+e+"</style>"+t}customElements.define("theoplayer-control-bar",f),(y=c||(c={}))[y.DOWN=40]="DOWN",y[y.LEFT=37]="LEFT",y[y.RIGHT=39]="RIGHT",y[y.SPACE=32]="SPACE",y[y.ENTER=13]="ENTER",y[y.UP=38]="UP",y[y.HOME=36]="HOME",y[y.END=35]="END",y[y.ESCAPE=27]="ESCAPE",t.Attribute=void 0,(b=t.Attribute||(t.Attribute={})).CONFIGURATION="configuration",b.SOURCE="source",b.AUTOPLAY="autoplay",b.MUTED="muted",b.FULLSCREEN="fullscreen",b.FLUID="fluid",b.MOBILE="mobile",b.MOBILE_ONLY="mobile-only",b.MOBILE_HIDDEN="mobile-hidden",b.USER_IDLE="user-idle",b.USER_IDLE_TIMEOUT="user-idle-timeout",b.NO_AUTO_HIDE="no-auto-hide",b.DISABLED="disabled",b.HIDDEN="hidden",b.PAUSED="paused",b.ENDED="ended",b.VOLUME_LEVEL="volume-level",b.CASTING="casting",b.LOADING="loading",b.STREAM_TYPE="stream-type",b.LIVE="live",b.LIVE_ONLY="live-only",b.LIVE_HIDDEN="live-hidden",b.LIVE_THRESHOLD="live-threshold",b.DVR_THRESHOLD="dvr-threshold",b.REMAINING="remaining",b.REMAINING_WHEN_LIVE="remaining-when-live",b.SHOW_DURATION="show-duration",b.SEEK_OFFSET="seek-offset",b.MENU="menu",b.MENU_OPENED="menu-opened",b.MENU_CLOSE_ON_INPUT="menu-close-on-input",b.ARIA_LABEL="aria-label",b.ARIA_LIVE="aria-live",b.ARIA_CHECKED="aria-checked",b.HAS_AUDIO="has-audio",b.HAS_SUBTITLES="has-subtitles",b.HAS_ERROR="has-error",b.HAS_FIRST_PLAY="has-first-play",b.HAS_TITLE="has-title",b.CAST_STATE="cast-state",b.TRACK_TYPE="track-type",b.SHOW_OFF="show-off",b.PLAYING_AD="playing-ad",b.SHOW_AD_MARKERS="show-ad-markers",b.CLICKTHROUGH="clickthrough",b.PROPERTY="property",b.VALUE="value";var A=document.createElement("template");A.innerHTML=k("<slot></slot>"),p(A,"theoplayer-button");var w=function(e){function r(t){(r=e.call(this)||this)._onKeyDown=function(t){if(!t.altKey)switch(t.keyCode){case c.SPACE:case c.ENTER:t.preventDefault(),r._onClick();break;default:return}},r._onClick=function(){r.disabled||r.handleClick()};var r,a,n=null!=(a=null==t?void 0:t.template)?a:A;return r.attachShadow({mode:"open"}).appendChild(n.content.cloneNode(!0)),r._upgradeProperty("disabled"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(t.Attribute.ARIA_LIVE)||this.setAttribute(t.Attribute.ARIA_LIVE,"polite"),this.addEventListener("keydown",this._onKeyDown),this.addEventListener("click",this._onClick)},n.disconnectedCallback=function(){this.removeEventListener("keydown",this._onKeyDown),this.removeEventListener("click",this._onClick)},n.attributeChangedCallback=function(e,a,n){if(e===t.Attribute.DISABLED&&n!==a){var o=null!=n;this.setAttribute("aria-disabled",o?"true":"false"),o?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}r.observedAttributes.indexOf(e)>=0&&d(this)},n.handleClick=function(){},_(r,[{key:"disabled",get:function(){return this.hasAttribute(t.Attribute.DISABLED)},set:function(e){e?this.setAttribute(t.Attribute.DISABLED,""):this.removeAttribute(t.Attribute.DISABLED)}}],[{key:"observedAttributes",get:function(){return[t.Attribute.DISABLED]}}]),r}(i(HTMLElement));function E(t,e){return void 0===e&&(e=""),k("<a>"+t+"</a>",":host{padding:0}a{color:#fff;color:var(--theoplayer-button-text-color,var(--theoplayer-text-color,#fff));padding:10px;padding:var(--theoplayer-control-padding,10px);-webkit-text-decoration:none;text-decoration:none}:host(:focus){-webkit-box-shadow:none;box-shadow:none;outline:0}a:focus{-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}a:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}:host([aria-checked=true]) a{color:#000;color:var(--theoplayer-button-checked-color,#000)}:host([disabled]) a{color:#ccc;color:var(--theoplayer-button-disabled-text-color,#ccc)}\n"+e)}customElements.define("theoplayer-button",w);var x=document.createElement("template");x.innerHTML=E("<slot></slot>"),p(x,"theoplayer-link-button");var T=function(e){function r(t){(r=e.call(this)||this)._onKeyDown=function(t){!t.altKey&&t.keyCode===c.SPACE&&(t.preventDefault(),r._linkEl.click())},r._onClick=function(){r.disabled||r.handleClick()};var r,a,n=null!=(a=null==t?void 0:t.template)?a:x,o=r.attachShadow({mode:"open",delegatesFocus:!0});return o.appendChild(n.content.cloneNode(!0)),r._linkEl=o.querySelector("a"),r._upgradeProperty("disabled"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(t.Attribute.ARIA_LIVE)||this.setAttribute(t.Attribute.ARIA_LIVE,"polite"),this._linkEl.addEventListener("keydown",this._onKeyDown),this._linkEl.addEventListener("click",this._onClick)},n.disconnectedCallback=function(){this._linkEl.removeEventListener("keydown",this._onKeyDown),this._linkEl.removeEventListener("click",this._onClick)},n.setLink=function(t,e){this._linkEl.href=t,this._linkEl.target=e},n.attributeChangedCallback=function(e,r,a){if(e===t.Attribute.DISABLED&&a!==r){var n=null!=a;this.setAttribute("aria-disabled",n?"true":"false"),n?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}w.observedAttributes.indexOf(e)>=0&&d(this)},n.handleClick=function(){},_(r,[{key:"disabled",get:function(){return this.hasAttribute(t.Attribute.DISABLED)},set:function(e){e?this.setAttribute(t.Attribute.DISABLED,""):this.removeAttribute(t.Attribute.DISABLED)}}],[{key:"observedAttributes",get:function(){return[t.Attribute.DISABLED]}}]),r}(i(HTMLElement));function C(t,e,r,a,n,o,i){try{var l=t[o](i),s=l.value}catch(t){r(t);return}l.done?e(s):Promise.resolve(s).then(a,n)}function L(){}function S(t){return t.nodeType===Node.ELEMENT_NODE}function P(t){return t instanceof HTMLElement}customElements.define("theoplayer-link-button",T),"function"==typeof SuppressedError&&SuppressedError;var M="function"==typeof Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},R="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){return Array.prototype.slice.call(t)},I="function"==typeof Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){for(var r=0;r<t.length;r++)if(e(t[r],r,t))return t[r]},O="function"==typeof Array.prototype.findIndex?function(t,e){return t.findIndex(e)}:function(t,e){for(var r=0;r<t.length;r++)if(e(t[r],r,t))return r;return -1},D="function"==typeof String.prototype.startsWith?function(t,e){return t.startsWith(e)}:function(t,e){return t.substring(0,e.length)===e},N="undefined"!=typeof Intl&&Intl.DisplayNames?function(t){var e=new Intl.DisplayNames([t,"en"],{type:"language",fallback:"none"}).of(t);if(e)return e.slice(0,1).toUpperCase()+e.slice(1)}:function(t){};function q(t,e){void 0===t.textContent?t.innerText=e:t.textContent=e}var F="theoplayerUiObservedProperties";function B(t){return F in t&&M(t[F])}function H(t,e){return function(t){function r(){return t.apply(this,arguments)}return a(r,t),_(r,[{key:F,get:function(){return e}}]),r}(t)}function U(t,e,r){return z.apply(this,arguments)}function z(){var t;return t=function(t,e,r){var a;return function(t,e){var r,a,n,o,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){return function(l){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(r=1,a&&(n=2&l[0]?a.return:l[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,l[1])).done)return n;switch(a=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,a=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(n=(n=i.trys).length>0&&n[n.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){i.label=l[1];break}if(6===l[0]&&i.label<n[1]){i.label=n[1],n=l;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(l);break}n[2]&&i.ops.pop(),i.trys.pop();continue}l=e.call(t,i)}catch(t){l=[6,t],a=0}finally{r=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}(this,function(n){switch(n.label){case 0:if(e.contains(t))return[2];if(!(t.nodeName.indexOf("-")>=0&&!B(t)))return[3,3];return[4,Promise.resolve()];case 1:return n.sent(),[4,customElements.whenDefined(t.nodeName.toLowerCase())];case 2:n.sent(),customElements.upgrade(t),n.label=3;case 3:if(B(t)&&r(t),!((a=[].concat(P(t)?R(t.children):[],t.shadowRoot?R(t.shadowRoot.children):[],"slot"===t.localName.toLowerCase()?t.assignedNodes().filter(S):[])).length>0))return[3,5];return[4,Promise.all(a.map(function(t){return U(t,e,r)}))];case 4:n.sent(),n.label=5;case 5:return[2]}})},(z=function(){var e=this,r=arguments;return new Promise(function(a,n){var o=t.apply(e,r);function i(t){C(o,a,n,i,l,"next",t)}function l(t){C(o,a,n,i,l,"throw",t)}i(void 0)})}).apply(this,arguments)}var V=document.createElement("template");V.innerHTML=k('<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>\n</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>\n</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>\n</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}"),p(V,"theoplayer-play-button");var G=["seeking","seeked","ended","emptied","sourcechange"],Q=function(e){function r(){var t;return(t=e.call(this,{template:V})||this)._onPlay=function(){t.paused=!1,t._updateEnded()},t._onPause=function(){t.paused=!0,t._updateEnded()},t._updateFromPlayer=function(){var e,r;t.paused=null==(r=null==(e=t._player)?void 0:e.paused)||r,t._updateEnded(),t._updateDisabled()},t._updateDisabled=function(){var e;t.disabled=(null==(e=t._player)?void 0:e.source)===void 0},t._upgradeProperty("paused"),t._upgradeProperty("ended"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},n._updateEnded=function(){var t,e;this.ended=null!=(e=null==(t=this._player)?void 0:t.ended)&&e},n.handleClick=function(){void 0!==this._player&&void 0!==this._player.source&&(this._player.paused?this._player.play():this._player.pause())},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&(d(this),this._updateAriaLabel())},n._updateAriaLabel=function(){var e=this.ended?"replay":this.paused?"play":"pause";this.setAttribute(t.Attribute.ARIA_LABEL,e)},_(r,[{key:"paused",get:function(){return this.hasAttribute(t.Attribute.PAUSED)},set:function(e){e?this.setAttribute(t.Attribute.PAUSED,""):this.removeAttribute(t.Attribute.PAUSED)}},{key:"ended",get:function(){return this.hasAttribute(t.Attribute.ENDED)},set:function(e){e?this.setAttribute(t.Attribute.ENDED,""):this.removeAttribute(t.Attribute.ENDED)}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&(this._player.removeEventListener("play",this._onPlay),this._player.removeEventListener("pause",this._onPause),this._player.removeEventListener(G,this._updateFromPlayer)),this._player=t,this._updateFromPlayer(),void 0!==this._player&&(this._player.addEventListener("play",this._onPlay),this._player.addEventListener("pause",this._onPause),this._player.addEventListener(G,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes,[t.Attribute.PAUSED,t.Attribute.ENDED])}}]),r}(H(w,["player"]));customElements.define("theoplayer-play-button",Q);var Y=document.createElement("template");Y.innerHTML=k('<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>\n</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>\n</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>\n</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}"),p(Y,"theoplayer-mute-button");var K=["volumechange"],W=function(e){function r(){var r;return(r=e.call(this,{template:Y})||this)._updateFromPlayer=function(){var e="off";if(void 0!==r._player){var a=r._player.volume;e=r._player.muted?"off":a<.5?"low":"high"}r.setAttribute(t.Attribute.VOLUME_LEVEL,e)},r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},n.handleClick=function(){void 0!==this._player&&(this._player.muted=!this._player.muted,this._updateFromPlayer())},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&(d(this),this._updateAriaLabel())},n._updateAriaLabel=function(){var e="off"===this.getAttribute(t.Attribute.VOLUME_LEVEL)?"unmute":"mute";this.setAttribute(t.Attribute.ARIA_LABEL,e)},_(r,[{key:"volumeLevel",get:function(){return this.getAttribute(t.Attribute.VOLUME_LEVEL)||"off"}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener(K,this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(K,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes,[t.Attribute.VOLUME_LEVEL])}}]),r}(H(w,["player"]));customElements.define("theoplayer-mute-button",W);var Z=document.createElement("template");Z.innerHTML=k('<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>\n</slot></span><span part="offset"></span>',':host{position:relative}:host([seek-offset^="-"]) [part=icon]{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[part=offset]{color:#fff;color:var(--theoplayer-icon-color,#fff);font-size:7.2px;font-size:var(--theoplayer-seek-button-font-size,calc(var(--theoplayer-button-icon-height, var(--theoplayer-control-height, 24px))*.3));left:50%;position:absolute;top:52.5%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}'),p(Z,"theoplayer-seek-button");var j=function(e){function r(){var t;return(t=e.call(this,{template:Z})||this)._offsetEl=t.shadowRoot.querySelector('[part="offset"]'),t._upgradeProperty("player"),t._upgradeProperty("seekOffset"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},n.handleClick=function(){if(void 0!==this._player){var t=this._player.duration;isNaN(t)||(this._player.currentTime=Math.max(0,Math.min(t,this._player.currentTime+this.seekOffset)))}},n.attributeChangedCallback=function(a,n,o){e.prototype.attributeChangedCallback.call(this,a,n,o),o!==n&&(a===t.Attribute.SEEK_OFFSET&&q(this._offsetEl,String(Math.abs(this.seekOffset))),r.observedAttributes.indexOf(a)>=0&&(d(this),this._updateAriaLabel()))},n._updateAriaLabel=function(){var e=this.seekOffset;this.setAttribute(t.Attribute.ARIA_LABEL,e>=0?"seek forward by "+e+" seconds":"seek backward by "+-e+" seconds")},_(r,[{key:"seekOffset",get:function(){var e;return Number(null!=(e=this.getAttribute(t.Attribute.SEEK_OFFSET))?e:10)},set:function(e){this.setAttribute(t.Attribute.SEEK_OFFSET,String(e))}},{key:"player",get:function(){return this._player},set:function(t){this._player=t}}],[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes,[t.Attribute.SEEK_OFFSET])}}]),r}(H(w,["player"]));customElements.define("theoplayer-seek-button",j);var X=":host{background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-text-color,#fff);display:inline-block;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));overflow:hidden;padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:auto;text-align:center;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}";function J(t){return!isNaN(t)&&isFinite(t)}function $(t,e,r){void 0===e&&(e=0);var a,n=t<0||r&&0===t,o=Math.floor(e/60%60),i=Math.floor(e/3600);if(J(t=Math.abs(t))){var l=Math.floor(t%60),s=Math.floor(t/60%60),u=Math.floor(t/3600),p=u>0||i>0;a=[p?""+u:"",(p||o>=0)&&s<10?"0"+s:""+s,l<10?"0"+l:""+l]}else a=[i>0?"--":"","--","--"];return(n?"-":"")+a.filter(function(t){return""!==t}).join(":")}var tt=[["hour","hours"],["minute","minutes"],["second","seconds"]];function te(t,e){var r=tt[e][1===t?0:1];return t+" "+r}function tr(t,e){if(!J(t))return"";var r=t<0||e&&0===t,a=Math.floor((t=Math.abs(t))%60),n=Math.floor(t/60)%60,o=Math.floor(t/3600);return""+[0===o?"":te(o,0),0===n?"":te(n,1),0===a&&(o>0||n>0)?"":te(a,2)].filter(function(t){return""!==t}).join(", ")+(r?" remaining":"")}var ta=document.createElement("template");ta.innerHTML="<style>"+X+"</style><span></span>",p(ta,"theoplayer-time-display");var tn=["timeupdate","seeking","seeked","durationchange"],to=function(e){function r(){(r=e.call(this)||this)._updateFromPlayer=function(){var e,a,n,o=r._player?r._player.currentTime:0,i=r._player?r._player.duration:NaN,l=null==(e=r._player)?void 0:e.seekable,s=isFinite(i)?i:l&&l.length>0?l.end(0):NaN,u=r.hasAttribute(t.Attribute.REMAINING)||r.hasAttribute(t.Attribute.REMAINING_WHEN_LIVE)&&"vod"!==r.streamType,p=o;u&&(p=-((s||0)-o));var h=r.hasAttribute(t.Attribute.SHOW_DURATION);a=h&&!u?$(p,s,u)+" / "+$(s):$(p,s,u),n=isNaN(i)?"video not loaded, unknown time":h?tr(p,u)+" of "+tr(s):tr(p,u),q(r._spanEl,a),r.setAttribute("aria-valuetext",n)};var r,a=r.attachShadow({mode:"open"});return a.appendChild(ta.content.cloneNode(!0)),r._spanEl=a.querySelector("span"),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this),this.hasAttribute(t.Attribute.ARIA_LIVE)||this.setAttribute(t.Attribute.ARIA_LIVE,"off"),this._updateFromPlayer()},n.attributeChangedCallback=function(t,e,a){a!==e&&r.observedAttributes.indexOf(t)>=0&&(this._updateFromPlayer(),d(this))},_(r,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener(tn,this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(tn,this._updateFromPlayer))}},{key:"streamType",get:function(){return this.getAttribute(t.Attribute.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(t.Attribute.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[t.Attribute.REMAINING,t.Attribute.REMAINING_WHEN_LIVE,t.Attribute.SHOW_DURATION,t.Attribute.STREAM_TYPE]}}]),r}(H(HTMLElement,["player","streamType"]));customElements.define("theoplayer-time-display",to);var ti=document.createElement("template");ti.innerHTML="<style>"+X+"</style><span></span>",p(ti,"theoplayer-duration-display");var tl=["durationchange"],ts=function(e){function r(){(t=e.call(this)||this)._updateFromPlayer=function(){var e=$(t._player?t._player.duration:NaN);q(t._spanEl,e)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(ti.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this),this.hasAttribute(t.Attribute.ARIA_LIVE)||this.setAttribute(t.Attribute.ARIA_LIVE,"off"),this._updateFromPlayer()},_(r,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener(tl,this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(tl,this._updateFromPlayer))}}]),r}(H(HTMLElement,["player"]));function tu(){return(tu=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t}).apply(this,arguments)}customElements.define("theoplayer-duration-display",ts);var tp=!function(){try{var t=new Event("change");return"change"===t.type}catch(t){}return!1}()?function(t,e){var r=document.createEvent("Event");return r.initEvent(t,(null==e?void 0:e.bubbles)||!1,(null==e?void 0:e.cancelable)||!1),r}:function(t,e){return new Event(t,e)},th=!function(){try{var t=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,(null==e?void 0:e.bubbles)||!1,(null==e?void 0:e.cancelable)||!1,null==e?void 0:e.detail),r}:function(t,e){return new CustomEvent(t,e)},td=document.createElement("template");td.innerHTML=k("<slot></slot>"),p(td,"theoplayer-radio-button");var tc=function(e){function r(t){var r;return(r=e.call(this,tu({template:td},t))||this)._value=void 0,r._upgradeProperty("checked"),r}a(r,e);var n=r.prototype;return n.connectedCallback=function(){this.hasAttribute("role")||this.setAttribute("role","radio"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),e.prototype.connectedCallback.call(this)},n.handleClick=function(){this.checked=!0,this.dispatchEvent(tp("input",{bubbles:!0,composed:!0}))},n.attributeChangedCallback=function(a,n,o){e.prototype.attributeChangedCallback.call(this,a,n,o),o!==n&&(a===t.Attribute.ARIA_CHECKED?this.dispatchEvent(tp("change",{bubbles:!0})):a===t.Attribute.VALUE&&(this.value=o),r.observedAttributes.indexOf(a)>=0&&d(this))},_(r,[{key:"checked",get:function(){return"true"===this.getAttribute(t.Attribute.ARIA_CHECKED)},set:function(e){this.setAttribute(t.Attribute.ARIA_CHECKED,e?"true":"false")}},{key:"value",get:function(){return this._value},set:function(t){this._value=t}}],[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes,[t.Attribute.ARIA_CHECKED,t.Attribute.VALUE])}}]),r}(w);customElements.define("theoplayer-radio-button",tc);var ty=document.createElement("template");ty.innerHTML="<slot></slot>",p(ty,"theoplayer-radio-group");var tb=function(t){function e(){(e=t.call(this)||this)._radioButtons=[],e._onSlotChange=function(){for(var t,r,a=e._slot.assignedNodes({flatten:!0}).filter(S),n=s(a);!(r=n()).done;){var o=r.value;if(!tm(o)){var i=o.nodeName.toLowerCase();i.indexOf("-")>=0&&(customElements.get(i)?customElements.upgrade(o):customElements.whenDefined(i).then(e._onSlotChange,L))}}e._radioButtons=a.filter(tm),e.focusedRadioButton||null==(t=e.firstRadioButton)||t.setAttribute("tabindex","0")},e._onKeyDown=function(t){switch(t.keyCode){case c.UP:case c.LEFT:t.preventDefault(),e._focusPrevButton();break;case c.DOWN:case c.RIGHT:t.preventDefault(),e._focusNextButton();break;case c.HOME:t.preventDefault(),e.setFocusedRadioButton(e.firstRadioButton);break;case c.END:t.preventDefault(),e.setFocusedRadioButton(e.lastRadioButton)}},e._onButtonChange=function(t){var r=t.target;null!==r&&r.checked&&e.setCheckedRadioButton(t.target)};var e,r=e.attachShadow({mode:"open"});return r.appendChild(ty.content.cloneNode(!0)),e._slot=r.querySelector("slot"),e}a(e,t);var r=e.prototype;return r.connectedCallback=function(){h(this),this.hasAttribute("role")||this.setAttribute("role","radiogroup"),this.addEventListener("keydown",this._onKeyDown),this.shadowRoot.addEventListener("change",this._onButtonChange),this._slot.addEventListener("slotchange",this._onSlotChange),this._onSlotChange()},r.disconnectedCallback=function(){this.removeEventListener("keydown",this._onKeyDown),this.shadowRoot.removeEventListener("change",this._onButtonChange),this._slot.removeEventListener("slotchange",this._onSlotChange)},r.allRadioButtons=function(){return this._radioButtons},r._prevRadioButton=function(t){var e=this._radioButtons.indexOf(t);return e>0?this._radioButtons[e-1]:null},r._nextRadioButton=function(t){var e=this._radioButtons.indexOf(t);return e>=0&&e<this._radioButtons.length-1?this._radioButtons[e+1]:null},r._focusPrevButton=function(){var t=this.focusedRadioButton||this.firstRadioButton;t&&(t===this.firstRadioButton?this.setFocusedRadioButton(this.lastRadioButton):this.setFocusedRadioButton(this._prevRadioButton(t)))},r._focusNextButton=function(){var t=this.focusedRadioButton||this.firstRadioButton;t&&(t===this.lastRadioButton?this.setFocusedRadioButton(this.firstRadioButton):this.setFocusedRadioButton(this._nextRadioButton(t)))},r.setFocusedRadioButton=function(t){this._unfocusAll(),t&&(t.tabIndex=0,t.focus())},r._unfocusAll=function(){for(var t,e=s(this.allRadioButtons());!(t=e()).done;)t.value.tabIndex=-1},r.setCheckedRadioButton=function(t){for(var e,r=s(this.allRadioButtons());!(e=r()).done;){var a=e.value;a.checked=a===t}this.dispatchEvent(tp("change",{bubbles:!0}))},_(e,[{key:"focusedRadioButton",get:function(){var t;return null!=(t=I(this._radioButtons,function(t){return 0===t.tabIndex}))?t:null}},{key:"checkedRadioButton",get:function(){var t;return null!=(t=I(this._radioButtons,function(t){return t.checked}))?t:null}},{key:"firstRadioButton",get:function(){var t;return null!=(t=this._radioButtons[0])?t:null}},{key:"lastRadioButton",get:function(){var t=this._radioButtons;return t.length>0?t[t.length-1]:null}}]),e}(i(HTMLElement));function tm(t){return t instanceof tc}customElements.define("theoplayer-radio-group",tb);var tv="theoplayermenuclose",tf="theoplayermenuchange";function tg(t,e,r){return void 0===r&&(r=""),"<style>:host{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-menu-color,#fff);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);pointer-events:none}:host([hidden]){display:none!important}[part=heading]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-align:center;-ms-flex-align:center;align-items:center;align-self:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:auto}[part=heading] ::slotted(span),[part=heading]>span{padding:10px;padding:var(--theoplayer-control-padding,10px);padding-left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[part=content],[part=heading]>theoplayer-menu-close-button{pointer-events:auto}[part=content]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-item-align:center;-ms-grid-row-align:center;--theoplayer-control-hover-background:var(--theoplayer-menu-control-hover-background,hsla(0,0%,100%,.3));align-self:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:10px;margin:var(--theoplayer-menu-margin,10px);max-height:100%;max-width:100%;max-width:var(--theoplayer-menu-max-width,100%);min-height:0;min-width:80%;min-width:var(--theoplayer-menu-min-width,80%);overflow-y:auto}"+r+'</style><div part="heading"><theoplayer-menu-close-button></theoplayer-menu-close-button>'+t+'</div><div part="content">'+e+"</div>"}var t_=document.createElement("template");t_.innerHTML=tg('<slot name="heading"></slot>',"<slot></slot>"),p(t_,"theoplayer-menu");var tk=function(e){function r(r){(a=e.call(this)||this)._onContentInput=function(){if(a.hasAttribute(t.Attribute.MENU_CLOSE_ON_INPUT)){var e=th(tv,{bubbles:!0,composed:!0});a.dispatchEvent(e)}};var a,n,o=null!=(n=null==r?void 0:r.template)?n:t_,i=a.attachShadow({mode:"open",delegatesFocus:!0});return i.appendChild(o.content.cloneNode(!0)),a._contentEl=i.querySelector('[part="content"]'),a}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this),this.hasAttribute(t.Attribute.MENU_OPENED)||this.setAttribute("hidden",""),this._contentEl.addEventListener("input",this._onContentInput)},n.disconnectedCallback=function(){this._contentEl.removeEventListener("input",this._onContentInput)},n.openMenu=function(){this.setAttribute(t.Attribute.MENU_OPENED,"")},n.closeMenu=function(){this.removeAttribute(t.Attribute.MENU_OPENED)},n.attributeChangedCallback=function(e,a,n){if(n!==a){if(e===t.Attribute.MENU_OPENED){null!=n?this.removeAttribute("hidden"):this.setAttribute("hidden","");var o=th(tf,{bubbles:!0});this.dispatchEvent(o)}r.observedAttributes.indexOf(e)>=0&&d(this)}},_(r,null,[{key:"observedAttributes",get:function(){return[t.Attribute.MENU_OPENED,t.Attribute.MENU_CLOSE_ON_INPUT]}}]),r}(i(HTMLElement));customElements.define("theoplayer-menu",tk);var tA="theoplayermenutoggle";function tw(t,e){return void 0===e&&(e=""),"<style>:host{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;pointer-events:none}:host([hidden]){display:none!important}::slotted(*),:host>*{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-ms-grid-column-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;justify-self:stretch;min-height:0}"+e+"</style>"+t}var tE=document.createElement("template");tE.innerHTML=tw("<slot></slot>"),p(tE,"theoplayer-menu-group");var tx=function(e){function r(t){(a=e.call(this)||this)._menus=[],a._openMenuStack=[],a._onMenuListChange=function(){for(var t,e=[].concat(R(a.shadowRoot.children),a._menuSlot?a._menuSlot.assignedNodes({flatten:!0}).filter(S):[]),r=s(e);!(t=r()).done;){var n=t.value;if(!tT(n)){var o=n.nodeName.toLowerCase();o.indexOf("-")>=0&&(customElements.get(o)?customElements.upgrade(n):customElements.whenDefined(o).then(a._onMenuListChange,L))}}for(var i,l=e.filter(tT),u=s(a._menus);!(i=u()).done;){var p=i.value;0>l.indexOf(p)&&a.closeMenu(p.id)}for(var h,d=s(l);!(h=d()).done;){var c=h.value;0>a._menus.indexOf(c)&&c.closeMenu()}a._menus=l},a._onToggleMenu=function(t){var e=t.detail.menu;if(a.getMenuById(e)){t.stopPropagation();var r=P(t.target)?t.target:void 0;a.isMenuOpen(e)?a.closeMenu(e):a.openMenu(e,r)}},a._onCloseMenu=function(t){a.closeCurrentMenu()&&(t.preventDefault(),t.stopPropagation())},a._onMenuChange=function(t){var e=a.getCurrentMenu_();e&&e.menu===t.target&&e.menu instanceof r&&!e.menu.hasCurrentMenu()&&a.closeCurrentMenu()},a._onKeyDown=function(t){!t.altKey&&t.keyCode===c.ESCAPE&&a.closeCurrentMenu()&&(t.preventDefault(),t.stopPropagation())};var a,n,o=null!=(n=null==t?void 0:t.template)?n:tE,i=a.attachShadow({mode:"open",delegatesFocus:!0});return i.appendChild(o.content.cloneNode(!0)),a._menuSlot=i.querySelector("slot"),a}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){var e;h(this),this.hasAttribute(t.Attribute.MENU_OPENED)||this.setAttribute("hidden",""),this._onMenuListChange(),this.shadowRoot.addEventListener(tA,this._onToggleMenu),this.shadowRoot.addEventListener(tv,this._onCloseMenu),this.shadowRoot.addEventListener(tf,this._onMenuChange),null==(e=this._menuSlot)||e.addEventListener("slotchange",this._onMenuListChange)},n.disconnectedCallback=function(){var t;this.shadowRoot.removeEventListener(tA,this._onToggleMenu),this.shadowRoot.removeEventListener(tv,this._onCloseMenu),this.shadowRoot.removeEventListener(tf,this._onMenuChange),null==(t=this._menuSlot)||t.removeEventListener("slotchange",this._onMenuListChange)},n.attributeChangedCallback=function(e,a,n){if(n!==a){if(e===t.Attribute.MENU_OPENED){null!=n?(this.removeAttribute("hidden"),this.removeEventListener("keydown",this._onKeyDown),this.addEventListener("keydown",this._onKeyDown)):(this.setAttribute("hidden",""),this.removeEventListener("keydown",this._onKeyDown));var o=th(tf,{bubbles:!0});this.dispatchEvent(o)}r.observedAttributes.indexOf(e)>=0&&d(this)}},n.getMenuById=function(t){return t&&t!==this.id?I(this._menus,function(e){return e.id===t}):this},n.openMenu=function(e,r){var a=this.getMenuById(e);if(a===this&&(a=this._menus[0]),!a)return!1;var n=this.getCurrentMenu_(),o=O(this._openMenuStack,function(t){return t.menu===a});return o>=0?this.closeMenusFromIndex_(o+1):this._openMenuStack.push({menu:a,opener:r}),n&&n.menu.closeMenu(),a.openMenu(),this.setAttribute(t.Attribute.MENU_OPENED,""),a.focus(),!0},n.closeMenu=function(e){var r,a,n=this.getMenuById(e);if(n===this&&(n=null==(a=this._openMenuStack[0])?void 0:a.menu),!n)return!1;var o=O(this._openMenuStack,function(t){return t.menu===n});if(o<0)return!1;var i=this._openMenuStack[o];this.closeMenusFromIndex_(o);var l=this.getCurrentMenu_();return void 0!==l?(l.menu.openMenu(),this.setAttribute(t.Attribute.MENU_OPENED,""),i.opener&&l.menu.contains(i.opener)?i.opener.focus():l.menu.focus()):(this.removeAttribute(t.Attribute.MENU_OPENED),null==(r=i.opener)||r.focus()),!0},n.closeMenusFromIndex_=function(t){for(var e=this._openMenuStack.length-t,r=this._openMenuStack.length-1;r>=t;r--)this._openMenuStack[r].menu.closeMenu();this._openMenuStack.splice(t,e)},n.hasCurrentMenu=function(){return this._openMenuStack.length>0},n.getCurrentMenu_=function(){return this._openMenuStack.length>0?this._openMenuStack[this._openMenuStack.length-1]:void 0},n.closeCurrentMenu=function(){var t=this.getCurrentMenu_();return void 0!==t&&(this.closeMenu(t.menu.id),!0)},n.isMenuOpen=function(t){var e=this.getMenuById(t);return!!e&&this._openMenuStack.some(function(t){return t.menu===e})},_(r,null,[{key:"observedAttributes",get:function(){return[t.Attribute.MENU_OPENED]}}]),r}(i(HTMLElement));function tT(t){return!!P(t)&&(t instanceof tk||t instanceof tx)}customElements.define("theoplayer-menu-group",tx);var tC=document.createElement("template");tC.innerHTML=k("<slot></slot>"),p(tC,"theoplayer-menu-button");var tL=function(e){function r(t){var r;return(r=e.call(this,tu({template:tC},t))||this)._upgradeProperty("menu"),r}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute("aria-haspopup")||this.setAttribute("aria-haspopup","true")},n.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),r!==t.Attribute.MENU||this.hasAttribute("aria-controls")&&this.getAttribute("aria-controls")!==a||this.setAttribute("aria-controls",n)},n.handleClick=function(){var t=this.menu;if(t){var e=th(tA,{bubbles:!0,composed:!0,detail:{menu:t}});this.dispatchEvent(e)}},_(r,[{key:"menu",get:function(){return this.getAttribute(t.Attribute.MENU)},set:function(e){e?this.setAttribute(t.Attribute.MENU,e):this.removeAttribute(t.Attribute.MENU)}}],[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes,[t.Attribute.MENU])}}]),r}(w);customElements.define("theoplayer-menu-button",tL);var tS=document.createElement("template");tS.innerHTML=k('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="m10.525 19.275-6.375-6.35q-.175-.2-.262-.437Q3.8 12.25 3.8 12t.088-.488q.087-.237.262-.437l6.375-6.35q.375-.375.925-.388.55-.012.95.388.375.4.388.937.012.538-.363.938l-4.1 4.075H18.35q.55 0 .938.387.387.388.387.938 0 .55-.387.938-.388.387-.938.387H8.325l4.1 4.075q.35.375.363.925.012.55-.363.95-.4.4-.95.4-.55 0-.95-.4Z"/></svg>\n</slot></span>'),p(tS,"theoplayer-menu-close-button");var tP=function(e){function r(){return e.call(this,{template:tS})}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.ARIA_LABEL)||this.setAttribute(t.Attribute.ARIA_LABEL,"close menu")},n.handleClick=function(){var t=th(tv,{bubbles:!0,composed:!0});this.dispatchEvent(t)},_(r,null,[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes)}}]),r}(w);customElements.define("theoplayer-menu-close-button",tP);var tM=document.createElement("template");tM.innerHTML=k("<slot></slot>"),p(tM,"theoplayer-media-track-radio-button");var tR=["change","update"],tI=function(e){function r(){var t;return(t=e.call(this,{template:tM})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}a(r,e);var n=r.prototype;return n._updateFromTrack=function(){q(this._slotEl,this._track?function(t){var e=t.label;if(e)return e;var r=t.language;return r&&(N(r)||r)||""}(this._track):""),this.checked=!!this._track&&this._track.enabled},n._updateTrack=function(){this._track&&(this._track.enabled=this.checked)},n.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),r===t.Attribute.ARIA_CHECKED&&a!==n&&this._updateTrack()},_(r,[{key:"track",get:function(){return this._track},set:function(t){this._track!==t&&(this._track&&this._track.removeEventListener(tR,this._onTrackChange),this._track=t,this._updateFromTrack(),t&&t.addEventListener(tR,this._onTrackChange))}}]),r}(tc);customElements.define("theoplayer-media-track-radio-button",tI);var tO=":host,theoplayer-radio-group{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host([hidden]){display:none!important}",tD=document.createElement("template");tD.innerHTML=k("<slot></slot>"),p(tD,"theoplayer-text-track-radio-button");var tN=["change","update"],tq=function(e){function r(){var t;return(t=e.call(this,{template:tD})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}a(r,e);var n=r.prototype;return n._updateFromTrack=function(){q(this._slotEl,this._track?function(t){var e=t.label;if(e)return e;var r=t.language;return r&&(N(r)||r)||""}(this._track):""),this.checked=!!this._track&&"showing"===this._track.mode},n._updateTrack=function(){this._track&&(this._track.mode=this.checked?"showing":"disabled")},n.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),r===t.Attribute.ARIA_CHECKED&&a!==n&&this._updateTrack()},_(r,[{key:"track",get:function(){return this._track},set:function(t){this._track!==t&&(this._track&&this._track.removeEventListener(tN,this._onTrackChange),this._track=t,this._updateFromTrack(),t&&t.addEventListener(tN,this._onTrackChange))}}]),r}(tc);function tF(t){return"subtitles"===t.kind||"captions"===t.kind}function tB(t){var e=null==t?void 0:t.targetQuality;return void 0===e||Array.isArray(e)||(e=[e]),e}function tH(t){return t?t.label&&""!==t.label?t.label:t.height?""+t.height+"p":t.bandwidth?function(t){if(t.bandwidth)return t.bandwidth>1e7?""+(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?""+(t.bandwidth/1e6).toFixed(1)+"Mbps":""+(t.bandwidth/1e3).toFixed(0)+"kbps"}(t):void 0:void 0}customElements.define("theoplayer-text-track-radio-button",tq);var tU=document.createElement("template");tU.innerHTML=k("<slot>Off</slot>"),p(tU,"theoplayer-text-track-off-radio-button");var tz=["change"],tV=function(e){function r(){var t;return(t=e.call(this,{template:tU})||this)._trackList=void 0,t._onTrackChange=function(){t._updateFromTrackList()},t._upgradeProperty("trackList"),t}a(r,e);var n=r.prototype;return n._updateFromTrackList=function(){this.checked=!this._trackList||!this._trackList.filter(tF).some(function(t){return"showing"===t.mode})},n._updateTrackList=function(){this._trackList&&this.checked&&function(t){for(var e,r=s(t);!(e=r()).done;){var a=e.value;tF(a)&&"showing"===a.mode&&(a.mode="disabled")}}(this._trackList)},n.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),r===t.Attribute.ARIA_CHECKED&&a!==n&&this._updateTrackList()},_(r,[{key:"trackList",get:function(){return this._trackList},set:function(t){this._trackList&&this._trackList.removeEventListener(tz,this._onTrackChange),this._trackList=t,this._updateFromTrackList(),t&&t.addEventListener(tz,this._onTrackChange)}}]),r}(tc);customElements.define("theoplayer-text-track-off-radio-button",tV);var tG=document.createElement("template");tG.innerHTML="<style>"+tO+"</style><theoplayer-radio-group></theoplayer-radio-group>",p(tG,"theoplayer-track-radio-group");var tQ=["addtrack","removetrack"],tY=function(e){function r(){(t=e.call(this)||this)._updateTracks=function(){var e=R(t._radioGroup.children),r=t._getTracks();void 0!==t._offButton&&(e=e.slice(1));for(var a,n=s(e);!(a=n()).done;){var o=a.value;(!o.track||0>r.indexOf(o.track))&&t._radioGroup.removeChild(o)}for(var i,l=s(r);!(i=l()).done;){var u=i.value;if(!function(t,e){for(var r=0;r<t.length;r++)if(t[r].track===e)return!0;return!1}(e,u)){var p=t._createTrackButton(u);t._radioGroup.appendChild(p)}}},t._onChange=function(){t.dispatchEvent(tp("change",{bubbles:!0}))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tG.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._upgradeProperty("trackType"),t._upgradeProperty("showOffButton"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this),this._radioGroup instanceof tb||customElements.upgrade(this._radioGroup),this._updateOffButton(),this._updateTracks(),this.shadowRoot.addEventListener("change",this._onChange)},n.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},n._getTracksList=function(){if(void 0!==this._player){var t=this.trackType;return"audio"===t?this._player.audioTracks:"video"===t?this._player.videoTracks:"subtitles"===t?this._player.textTracks:void 0}},n._updateTracksList=function(){var t=this._tracksList,e=this._getTracksList();t!==e&&(null==t||t.removeEventListener(tQ,this._updateTracks),null==e||e.addEventListener(tQ,this._updateTracks),this._tracksList=e,this._updateOffButton())},n._getTracks=function(){if(void 0===this._player)return[];var t=this.trackType;return"audio"===t?this._player.audioTracks:"video"===t?this._player.videoTracks:"subtitles"===t?this._player.textTracks.filter(tF):[]},n._createTrackButton=function(t){if("subtitles"===this.trackType){var e=new tq;return e.track=t,e}var r=new tI;return r.track=t,r},n._updateOffButton=function(){"subtitles"===this.trackType&&this.showOffButton?(void 0===this._offButton&&(this._offButton=new tV,this._radioGroup.insertBefore(this._offButton,this._radioGroup.firstChild)),this._offButton.trackList=this._tracksList):void 0!==this._offButton&&(this._radioGroup.removeChild(this._offButton),this._offButton=void 0)},n.attributeChangedCallback=function(e,a,n){n!==a&&(e===t.Attribute.TRACK_TYPE?(this._updateTracksList(),this._updateTracks()):e===t.Attribute.SHOW_OFF&&(this._updateOffButton(),this._updateTracks()),r.observedAttributes.indexOf(e)>=0&&d(this))},_(r,[{key:"trackType",get:function(){return this.getAttribute(t.Attribute.TRACK_TYPE)||"audio"},set:function(e){this.setAttribute(t.Attribute.TRACK_TYPE,e||"audio")}},{key:"showOffButton",get:function(){return this.hasAttribute(t.Attribute.SHOW_OFF)},set:function(e){e?this.setAttribute(t.Attribute.SHOW_OFF,""):this.removeAttribute(t.Attribute.SHOW_OFF)}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(this._player=t,this._updateTracksList(),this._updateTracks())}}],[{key:"observedAttributes",get:function(){return[t.Attribute.TRACK_TYPE,t.Attribute.SHOW_OFF]}}]),r}(H(HTMLElement,["player"]));customElements.define("theoplayer-track-radio-group",tY);var tK=".theoplayer-menu-table{-ms-grid-columns:-webkit-max-content 1fr;-ms-grid-columns:max-content 1fr;-ms-grid-rows:auto auto;display:-ms-grid;display:grid;grid-template-columns:-webkit-max-content 1fr;grid-template-columns:max-content 1fr;grid-template-rows:auto auto}.theoplayer-menu-table>:first-child{-ms-grid-column:1;-ms-grid-row:1}.theoplayer-menu-table>:nth-child(2){-ms-grid-column:2;-ms-grid-row:1}.theoplayer-menu-table>:nth-child(3){-ms-grid-column:1;-ms-grid-row:2}.theoplayer-menu-table>:nth-child(4){-ms-grid-column:2;-ms-grid-row:2}.theoplayer-menu-table>*{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;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)}.theoplayer-menu-table>span{display:block}";function tW(t){var e,r;return t?D(t,"rgb")?(e=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/i))?{r_:parseInt(e[1],10),g_:parseInt(e[2],10),b_:parseInt(e[3],10),a_:e[4]?parseFloat(e[4]):1}:null:D(t,"#")&&(r=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i))?{r_:parseInt(r[1],16),g_:parseInt(r[2],16),b_:parseInt(r[3],16),a_:1}:null:null}function tZ(t){return"rgba("+t.r_+","+t.g_+","+t.b_+","+t.a_+")"}function tj(t){return"rgb("+t.r_+","+t.g_+","+t.b_+")"}function tX(t,e){return{r_:t.r_,g_:t.g_,b_:t.b_,a_:e}}var tJ=tW("#ffffff"),t$=tW("#000000"),t0=[["White","rgb(255,255,255)"],["Yellow","rgb(255,255,0)"],["Green","rgb(0,255,0)"],["Cyan","rgb(0,255,255)"],["Blue","rgb(0,0,255)"],["Magenta","rgb(255,0,255)"],["Red","rgb(255,0,0)"],["Black","rgb(0,0,0)"]],t1=[["Monospace Serif",'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace'],["Proportional Serif",'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif'],["Monospace Sans",'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace'],["Proportional Sans",'Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif']],t5=[["None","none"],["Drop shadow","dropshadow"],["Raised","raised"],["Depressed","depressed"],["Uniform","uniform"]],t2=function(e){function r(){(t=e.call(this)||this)._updateFromPlayer=function(){if(void 0!==t._player){var e=t.property;switch(e){case"fontFamily":q(t._spanEl,function(t){if(!t)return"Default";var e=I(t1,function(e){return e[0],e[1]===t});return e?e[0]:"Custom"}(t._player.textTrackStyle.fontFamily));break;case"fontColor":case"backgroundColor":case"windowColor":q(t._spanEl,function(t){if(!t)return"Default";var e=tW(t);if(e){var r=tj(e),a=I(t0,function(t){return t[0],t[1]===r});if(a)return a[0]}return"Custom"}(t._player.textTrackStyle[e]));break;case"fontOpacity":q(t._spanEl,t3(t._player.textTrackStyle.fontColor));break;case"backgroundOpacity":q(t._spanEl,t3(t._player.textTrackStyle.backgroundColor));break;case"windowOpacity":q(t._spanEl,t3(t._player.textTrackStyle.windowColor));break;case"edgeStyle":q(t._spanEl,function(t){if(!t)return"Default";var e=I(t5,function(e){return e[0],e[1]===t});return e?e[0]:"Custom"}(t._player.textTrackStyle.edgeStyle));break;default:var r=t._player.textTrackStyle[e];q(t._spanEl,r||"Default")}}};var t,r=t.attachShadow({mode:"open"});return t._spanEl=document.createElement("span"),r.appendChild(t._spanEl),t._upgradeProperty("property"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){h(this),this.hasAttribute(t.Attribute.PROPERTY)||(this.property="fontColor")},n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.attributeChangedCallback=function(e,a,n){n!==a&&(e===t.Attribute.PROPERTY&&this._updateFromPlayer(),r.observedAttributes.indexOf(e)>=0&&d(this))},_(r,[{key:"property",get:function(){return this.getAttribute(t.Attribute.PROPERTY)},set:function(e){this.setAttribute(t.Attribute.PROPERTY,e)}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.textTrackStyle.removeEventListener("change",this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.textTrackStyle.addEventListener("change",this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[t.Attribute.PROPERTY]}}]),r}(H(HTMLElement,["player"]));function t3(t){if(!t)return"Default";var e=tW(t);return e?""+100*e.a_+"%":"Custom"}customElements.define("theoplayer-text-track-style-display",t2);var t4=document.createElement("template");t4.innerHTML="<style>"+tO+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>",p(t4,"theoplayer-text-track-style-radio-group");var t8=function(e){function r(){(t=e.call(this)||this)._updateChecked=function(){for(var e,r=t._radioGroup.allRadioButtons(),a=s(r);!(e=a()).done;){var n=e.value;n.checked=n.value===t.value}},t._onChange=function(){var e=t._radioGroup.checkedRadioButton;null!==e&&t.value!==e.value&&(t.value=e.value)},t._updateFromPlayer=function(){if(void 0!==t._player)switch(t.property){case"fontColor":var e,r,a=t._player.textTrackStyle.fontColor;t.value=a?tj(null!=(r=tW(a))?r:tJ):"";break;case"backgroundColor":var n,o=t._player.textTrackStyle.backgroundColor;t.value=o?tj(null!=(n=tW(o))?n:t$):"";break;case"windowColor":var i,l=t._player.textTrackStyle.windowColor;t.value=l?tj(null!=(i=tW(l))?i:t$):"";break;case"fontOpacity":var s,u,p=t._player.textTrackStyle.fontColor;t.value=p?String((null!=(u=null==(s=tW(p))?void 0:s.a_)?u:1)*100):"";break;case"backgroundOpacity":var h,d,c=t._player.textTrackStyle.backgroundColor;t.value=c?String((null!=(d=null==(h=tW(c))?void 0:h.a_)?d:1)*100):"";break;case"windowOpacity":var y,b,m=t._player.textTrackStyle.windowColor;t.value=m?String((null!=(b=null==(y=tW(m))?void 0:y.a_)?b:1)*100):"";break;default:t.value=null!=(e=t._player.textTrackStyle[t.property])?e:""}};var t,r=t.attachShadow({mode:"open"});return r.appendChild(t4.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._optionsSlot=r.querySelector("slot"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){h(this),this._radioGroup instanceof tb||customElements.upgrade(this._radioGroup),this._upgradeProperty("property"),this._upgradeProperty("value"),this._upgradeProperty("player"),this.hasAttribute(t.Attribute.PROPERTY)||(this.property="fontColor"),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},n.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n._updateToPlayer=function(){if(void 0!==this._player)switch(this.property){case"fontColor":this._player.textTrackStyle.fontColor=t7(this.value,this._player.textTrackStyle.fontColor,tJ);break;case"backgroundColor":this._player.textTrackStyle.backgroundColor=t7(this.value,this._player.textTrackStyle.backgroundColor,t$);break;case"windowColor":this._player.textTrackStyle.windowColor=t7(this.value,this._player.textTrackStyle.windowColor,t$);break;case"fontOpacity":this._player.textTrackStyle.fontColor=t6(this.value,this._player.textTrackStyle.fontColor,tJ);break;case"backgroundOpacity":this._player.textTrackStyle.backgroundColor=t6(this.value,this._player.textTrackStyle.backgroundColor,t$);break;case"windowOpacity":this._player.textTrackStyle.windowColor=t6(this.value,this._player.textTrackStyle.windowColor,t$);break;default:this._player.textTrackStyle[this.property]=""==this.value?void 0:this.value}},n.attributeChangedCallback=function(e,a,n){n!==a&&(e===t.Attribute.PROPERTY&&this._updateFromPlayer(),r.observedAttributes.indexOf(e)>=0&&d(this))},_(r,[{key:"property",get:function(){return this.getAttribute(t.Attribute.PROPERTY)},set:function(e){this.setAttribute(t.Attribute.PROPERTY,e)}},{key:"value",get:function(){return this._value},set:function(t){this._value!==t&&(this._value=t,this._updateToPlayer(),this._updateChecked(),this.dispatchEvent(tp("change",{bubbles:!0})))}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.textTrackStyle.removeEventListener("change",this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.textTrackStyle.addEventListener("change",this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[t.Attribute.PROPERTY]}}]),r}(H(HTMLElement,["player"]));function t7(t,e,r){var a,n,o,i=null!=(n=null==(a=tW(e))?void 0:a.a_)?n:1;if(""!==t||1!==i)return tZ(tX(null!=(o=tW(t))?o:r,i))}function t6(t,e,r){var a,n=null!=(a=tW(e))?a:r;if(""!==t||n.r_!==r.r_||n.g_!==r.g_||n.b_!==r.b_)return tZ(tX(n,""==t?1:Number(t)/100))}customElements.define("theoplayer-text-track-style-radio-group",t8);var t9=document.createElement("template");t9.innerHTML=tw('<theoplayer-menu class="theoplayer-text-track-style-menu"><span class="theoplayer-menu-heading" slot="heading"><slot name="heading">Subtitle options</slot></span><theoplayer-text-track-style-reset-button class="theoplayer-menu-heading-button" slot="heading"></theoplayer-text-track-style-reset-button><div class="theoplayer-menu-table"><span>Font family</span><theoplayer-menu-button menu="font-family-menu"><theoplayer-text-track-style-display property="fontFamily"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font color</span><theoplayer-menu-button menu="font-color-menu"><theoplayer-text-track-style-display property="fontColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font opacity</span><theoplayer-menu-button menu="font-opacity-menu"><theoplayer-text-track-style-display property="fontOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font size</span><theoplayer-menu-button menu="font-size-menu"><theoplayer-text-track-style-display property="fontSize"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Background color</span><theoplayer-menu-button menu="background-color-menu"><theoplayer-text-track-style-display property="backgroundColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Background opacity</span><theoplayer-menu-button menu="background-opacity-menu"><theoplayer-text-track-style-display property="backgroundOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Window color</span><theoplayer-menu-button menu="window-color-menu"><theoplayer-text-track-style-display property="windowColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Window opacity</span><theoplayer-menu-button menu="window-opacity-menu"><theoplayer-text-track-style-display property="windowOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Character edge style</span><theoplayer-menu-button menu="edge-style-menu"><theoplayer-text-track-style-display property="edgeStyle"></theoplayer-text-track-style-display></theoplayer-menu-button></div></theoplayer-menu><theoplayer-menu id="font-family-menu" menu-close-on-input hidden><span slot="heading">Font family</span><theoplayer-text-track-style-radio-group property="fontFamily"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value=\'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace\'>Monospace Serif</theoplayer-radio-button><theoplayer-radio-button value=\'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif\'>Proportional Serif</theoplayer-radio-button><theoplayer-radio-button value=\'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace\'>Monospace Sans</theoplayer-radio-button><theoplayer-radio-button value=\'Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif\'>Proportional Sans</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-color-menu" menu-close-on-input hidden><span slot="heading">Font color</span><theoplayer-text-track-style-radio-group property="fontColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-opacity-menu" menu-close-on-input hidden><span slot="heading">Font opacity</span><theoplayer-text-track-style-radio-group property="fontOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-size-menu" menu-close-on-input hidden><span slot="heading">Font size</span><theoplayer-text-track-style-radio-group property="fontSize"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="50%">50%</theoplayer-radio-button><theoplayer-radio-button value="75%">75%</theoplayer-radio-button><theoplayer-radio-button value="100%">100%</theoplayer-radio-button><theoplayer-radio-button value="150%">150%</theoplayer-radio-button><theoplayer-radio-button value="200%">200%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="background-color-menu" menu-close-on-input hidden><span slot="heading">Background color</span><theoplayer-text-track-style-radio-group property="backgroundColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="background-opacity-menu" menu-close-on-input hidden><span slot="heading">Background opacity</span><theoplayer-text-track-style-radio-group property="backgroundOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="window-color-menu" menu-close-on-input hidden><span slot="heading">Window color</span><theoplayer-text-track-style-radio-group property="windowColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="window-opacity-menu" menu-close-on-input hidden><span slot="heading">Window opacity</span><theoplayer-text-track-style-radio-group property="windowOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="edge-style-menu" menu-close-on-input hidden><span slot="heading">Character edge style</span><theoplayer-text-track-style-radio-group property="edgeStyle"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="none">None</theoplayer-radio-button><theoplayer-radio-button value="dropshadow">Drop shadow</theoplayer-radio-button><theoplayer-radio-button value="raised">Raised</theoplayer-radio-button><theoplayer-radio-button value="depressed">Depressed</theoplayer-radio-button><theoplayer-radio-button value="uniform">Uniform</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu>',tK+"\n.theoplayer-menu-heading{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.theoplayer-menu-heading-button{-ms-flex-item-align:end;align-self:flex-end}"),p(t9,"theoplayer-text-track-style-menu");var et=function(t){function e(){return t.call(this,{template:t9})}return a(e,t),e}(tx);customElements.define("theoplayer-text-track-style-menu",et);var ee=document.createElement("template");ee.innerHTML=tw('<theoplayer-menu><span class="theoplayer-menu-heading" slot="heading"><slot name="heading">Language</slot></span><theoplayer-settings-menu-button class="theoplayer-menu-heading-button" menu="subtitle-options-menu" slot="heading"></theoplayer-settings-menu-button><div part="content"><div part="audio"><h2>Audio</h2><theoplayer-track-radio-group track-type="audio"></theoplayer-track-radio-group></div><div part="subtitles"><h2>Subtitles</h2><theoplayer-track-radio-group track-type="subtitles" show-off></theoplayer-track-radio-group></div></div></theoplayer-menu><theoplayer-text-track-style-menu id="subtitle-options-menu"></theoplayer-text-track-style-menu>',".theoplayer-menu-heading{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.theoplayer-menu-heading-button{-ms-flex-item-align:end;align-self:flex-end}[part=audio],[part=subtitles],theoplayer-track-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:0}[part=content]{-ms-grid-columns:1fr;display:-ms-grid;display:grid;grid-template-columns:1fr;min-height:0}:host([has-audio][has-subtitles]) [part=content]{-ms-grid-columns:1fr 10px 1fr;grid-template-columns:1fr 10px 1fr}:host([has-audio][has-subtitles]) [part=audio]{-ms-grid-column:1;grid-column:1}:host([has-audio][has-subtitles]) [part=subtitles]{-ms-grid-column:3;grid-column:3}:host(:not([has-audio])) [part=audio],:host(:not([has-subtitles])) [part=subtitles]{display:none!important}[part=audio],[part=subtitles]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;align-self:stretch;-ms-flex-direction:column;flex-direction:column;text-align:center}h2{margin:0 0 .5em}theoplayer-track-radio-group{overflow-y:auto}"),p(ee,"theoplayer-language-menu");var er=["addtrack","removetrack"],ea=function(e){function r(){var r;return(r=e.call(this,{template:ee})||this)._updateAudioTracks=function(){var e,a;(null!=(a=null==(e=r._player)?void 0:e.audioTracks)?a:[]).length<2?r.removeAttribute(t.Attribute.HAS_AUDIO):r.setAttribute(t.Attribute.HAS_AUDIO,"")},r._updateTextTracks=function(){var e,a;0===(null!=(a=null==(e=r._player)?void 0:e.textTracks.filter(tF))?a:[]).length?r.removeAttribute(t.Attribute.HAS_SUBTITLES):r.setAttribute(t.Attribute.HAS_SUBTITLES,"")},r._upgradeProperty("player"),r}return a(r,e),r.prototype.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&d(this)},_(r,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&(this._player.audioTracks.removeEventListener(er,this._updateAudioTracks),this._player.textTracks.removeEventListener(er,this._updateTextTracks)),this._player=t,this._updateAudioTracks(),this._updateTextTracks(),void 0!==this._player&&(this._player.audioTracks.addEventListener(er,this._updateAudioTracks),this._player.textTracks.addEventListener(er,this._updateTextTracks)))}}],[{key:"observedAttributes",get:function(){return[].concat(tx.observedAttributes,[t.Attribute.HAS_AUDIO,t.Attribute.HAS_SUBTITLES])}}]),r}(H(tx,["player"]));customElements.define("theoplayer-language-menu",ea);var en=document.createElement("template");en.innerHTML=k('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M17.469 15.446a6.892 6.892 310 1 0-4.772 3.342l2.872.986q1.9.626 1.9-1.374v-2.954l2.598 1.5V22q0 2-1.899 1.374l-4.95-1.632a9.892 9.892 310 1 1 6.849-4.796zM7 10a1 1 180 1 0 0 2 1 1 180 1 0 0-2zm4 0a1 1 180 1 0 0 2h5a1 1 180 1 0 0-2zm-3 4a1 1 180 1 0 0 2h3a1 1 180 1 0 0-2zm7 0a1 1 180 1 0 0 2 1 1 180 1 0 0-2z"/></svg>\n</slot></span>'),p(en,"theoplayer-language-menu-button");var eo=["addtrack","removetrack"],ei=function(e){function r(){var t;return(t=e.call(this,{template:en})||this)._updateTracks=function(){void 0!==t._player&&(t._player.audioTracks.length>=2||t._player.textTracks.some(tF))?t.removeAttribute("hidden"):t.setAttribute("hidden","")},t._upgradeProperty("player"),t}return a(r,e),r.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.ARIA_LABEL)||this.setAttribute(t.Attribute.ARIA_LABEL,"open language menu")},_(r,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&(this._player.audioTracks.removeEventListener(eo,this._updateTracks),this._player.textTracks.removeEventListener(eo,this._updateTracks)),this._player=t,this._updateTracks(),void 0!==this._player&&(this._player.audioTracks.addEventListener(eo,this._updateTracks),this._player.textTracks.addEventListener(eo,this._updateTracks)))}}]),r}(H(tL,["player"]));customElements.define("theoplayer-language-menu-button",ei);var el=document.createElement("template");el.innerHTML="<style>"+tO+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>",p(el,"theoplayer-playback-rate-radio-group");var es=function(t){function e(){(e=t.call(this)||this)._value=1,e._updateChecked=function(){for(var t,r=e._radioGroup.allRadioButtons(),a=s(r);!(t=a()).done;){var n=t.value;n.checked=Number(n.value)===e.value}},e._onChange=function(){var t=e._radioGroup.checkedRadioButton;null!==t&&e.value!==Number(t.value)&&(e.value=t.value)},e._updateFromPlayer=function(){void 0!==e._player&&(e.value=e._player.playbackRate)};var e,r=e.attachShadow({mode:"open"});return r.appendChild(el.content.cloneNode(!0)),e._radioGroup=r.querySelector("theoplayer-radio-group"),e._optionsSlot=r.querySelector("slot"),e._upgradeProperty("value"),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){h(this),this._radioGroup instanceof tb||customElements.upgrade(this._radioGroup),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},_(e,[{key:"value",get:function(){return this._value},set:function(t){t=Number(t),this._value!==t&&(this._value=t,void 0!==this._player&&(this._player.playbackRate=t),this._updateChecked(),this.dispatchEvent(tp("change",{bubbles:!0})))}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener("ratechange",this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener("ratechange",this._updateFromPlayer))}}]),e}(H(HTMLElement,["player"]));customElements.define("theoplayer-playback-rate-radio-group",es);var eu=document.createElement("template");eu.innerHTML=k('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 96 960 960" height="24" width="24"><path d="M418 716q24 24 61.435 23.5T536 712l171.826-250.174q12.392-19.087-1.652-32.283-14.044-13.195-33.131-.804L424 600q-27 19.13-28.5 55.565T418 716ZM204 915.218q-25.522 0-49.609-12.826-24.087-12.826-36.783-34.783-26.565-46.696-41.696-100.022Q60.782 714.261 60.782 656q0-86.391 32.913-162.566 32.913-76.174 89.956-133.217 57.044-57.044 133.436-90.24Q393.478 236.782 480 236.782q43.87 0 85.87 8.934 42 8.935 81 26.239 28.913 12.696 33.826 38.762 4.913 26.065-13.044 48.153-10.261 12.391-28.217 15.521-17.957 3.131-32.914-3.565-31.434-14.869-62.043-21.456-30.608-6.587-64.478-6.587-129.043 0-221.13 91.522Q166.783 525.826 166.783 656q0 42 10.935 79.891 10.934 37.891 30.804 73.326h542.956q23-38 32.37-75.608Q793.217 696 793.217 652q0-31.609-6.804-62.565-6.804-30.956-20.543-60.826-7.566-16.957-3.718-35.196 3.848-18.239 17.674-29.5 21.653-18.522 47.153-10.261t36.761 35.609q16.305 38 25.457 78.217 9.152 40.218 10.021 82.522 0 58.696-14.348 113.522-14.347 54.826-42.478 104.087-14.391 23.087-37.631 35.348-23.239 12.261-48.761 12.261H204ZM480 576Z"/></svg>\n</slot></span>'),p(eu,"theoplayer-playback-rate-button");var ep=function(e){function r(){return e.call(this,{template:eu})}return a(r,e),r.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.ARIA_LABEL)||this.setAttribute(t.Attribute.ARIA_LABEL,"open playback speed menu")},r}(tL);customElements.define("theoplayer-playback-rate-menu-button",ep);var eh=document.createElement("template");eh.innerHTML=tg('<span slot="heading"><slot name="heading">Playback speed</slot></span>','<theoplayer-playback-rate-radio-group><theoplayer-radio-button value="0.25">0.25x</theoplayer-radio-button><theoplayer-radio-button value="0.5">0.5x</theoplayer-radio-button><theoplayer-radio-button value="1">Normal</theoplayer-radio-button><theoplayer-radio-button value="1.25">1.25x</theoplayer-radio-button><theoplayer-radio-button value="1.5">1.5x</theoplayer-radio-button><theoplayer-radio-button value="2">2x</theoplayer-radio-button></theoplayer-playback-rate-radio-group>'),p(eh,"theoplayer-playback-rate-menu");var ed=function(t){function e(){return t.call(this,{template:eh})}return a(e,t),e}(tk);customElements.define("theoplayer-playback-rate-menu",ed);var ec=function(t){function e(){(e=t.call(this)||this)._playbackRate=1;var e,r=e.attachShadow({mode:"open"});return e._spanEl=document.createElement("span"),r.appendChild(e._spanEl),e._upgradeProperty("playbackRate"),e}a(e,t);var r=e.prototype;return r.connectedCallback=function(){h(this)},r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},_(e,[{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,q(this._spanEl,1===t?"Normal":""+t+"x")}}]),e}(H(HTMLElement,["playbackRate"]));customElements.define("theoplayer-playback-rate-display",ec);var ey=function(t){function e(){(e=t.call(this)||this)._activeVideoQuality=void 0,e._targetVideoQualities=void 0;var e,r=e.attachShadow({mode:"open"});return e._spanEl=document.createElement("span"),r.appendChild(e._spanEl),e._upgradeProperty("activeVideoQuality"),e._upgradeProperty("targetVideoQualities"),e}a(e,t);var r=e.prototype;return r.connectedCallback=function(){h(this)},r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.update_=function(){var t,e=void 0!==this._targetVideoQualities&&1===this._targetVideoQualities.length,r=e?this._targetVideoQualities[0]:void 0,a=tH(null!=r?r:this._activeVideoQuality);t=e?null!=a?a:"Unknown":"Automatic"+(a?" ("+a+")":""),q(this._spanEl,t)},_(e,[{key:"activeVideoQuality",get:function(){return this._activeVideoQuality},set:function(t){this._activeVideoQuality=t,this.update_()}},{key:"targetVideoQualities",get:function(){return this._targetVideoQualities},set:function(t){this._targetVideoQualities=t,this.update_()}}]),e}(H(HTMLElement,["activeVideoQuality","targetVideoQualities"]));customElements.define("theoplayer-active-quality-display",ey);var eb=document.createElement("template");eb.innerHTML=k("<slot></slot>"),p(eb,"theoplayer-quality-radio-button");var em=["activequalitychanged","targetqualitychanged"],ev=["update"],ef=function(e){function r(){var t;return(t=e.call(this,{template:eb})||this)._track=void 0,t._quality=void 0,t._updateFromTrack=function(){if(void 0!==t._track){var e=t._track.targetQuality;void 0===t._quality?t.checked=void 0===e:t.checked=Array.isArray(e)?e.indexOf(t._quality)>=0:e===t._quality}t._updateFromQuality()},t._updateFromQuality=function(){var e;q(t._slotEl,null!=(e=tH(t._quality))?e:"Automatic")},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t._upgradeProperty("quality"),t}a(r,e);var n=r.prototype;return n._updateTargetQuality=function(){this._track&&this.checked&&(this._track.targetQuality=this._quality)},n.attributeChangedCallback=function(a,n,o){e.prototype.attributeChangedCallback.call(this,a,n,o),o!==n&&(a===t.Attribute.ARIA_CHECKED&&this._updateTargetQuality(),r.observedAttributes.indexOf(a)>=0&&d(this))},_(r,[{key:"track",get:function(){return this._track},set:function(t){this._track!==t&&(this._track&&this._track.removeEventListener(em,this._updateFromTrack),this._track=t,this._updateFromTrack(),t&&t.addEventListener(em,this._updateFromTrack))}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality!==t&&(this._quality&&this._quality.removeEventListener(ev,this._updateFromQuality),this._quality=t,this._updateFromTrack(),t&&t.addEventListener(ev,this._updateFromQuality))}}]),r}(tc);customElements.define("theoplayer-quality-radio-button",ef);var eg=document.createElement("template");eg.innerHTML="<style>"+tO+"</style><theoplayer-radio-group></theoplayer-radio-group>",p(eg,"theoplayer-quality-radio-group");var e_=["addtrack","removetrack","change"],ek=function(t){function e(){(e=t.call(this)||this)._onChange=function(){e.dispatchEvent(tp("change",{bubbles:!0}))},e._updateTrack=function(){var t=e._player?I(e._player.videoTracks,function(t){return t.enabled}):void 0;e._track!==t&&(e._track=t,e._update())},e._update=function(){for(var t=R(e._radioGroup.children),r=e._track?e._track.qualities:[],a=1===r.length?[void 0]:[].concat([void 0],r),n=0;n<t.length&&n<a.length;){var o=t[n];o.track=e._track,o.quality=a[n],n++}for(;n<t.length;)e._radioGroup.removeChild(t[n]),n++;for(;n<a.length;){var i=new ef;i.track=e._track,i.quality=a[n],e._radioGroup.appendChild(i),n++}};var e,r=e.attachShadow({mode:"open"});return r.appendChild(eg.content.cloneNode(!0)),e._radioGroup=r.querySelector("theoplayer-radio-group"),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){h(this),this._radioGroup instanceof tb||customElements.upgrade(this._radioGroup),this._updateTrack(),this.shadowRoot.addEventListener("change",this._onChange)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},_(e,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.videoTracks.removeEventListener(e_,this._updateTrack),this._player=t,this._updateTrack(),void 0!==this._player&&this._player.videoTracks.addEventListener(e_,this._updateTrack))}}]),e}(H(HTMLElement,["player"]));customElements.define("theoplayer-quality-radio-group",ek);var eA=document.createElement("template");eA.innerHTML=k("<slot>Reset</slot>"),p(eA,"theoplayer-text-track-style-reset-button");var ew=function(t){function e(){return t.call(this,{template:eA})}return a(e,t),e.prototype.handleClick=function(){if(void 0!==this._player){var t=this._player.textTrackStyle;t.fontFamily=void 0,t.fontColor=void 0,t.fontSize=void 0,t.backgroundColor=void 0,t.windowColor=void 0,t.edgeStyle=void 0}},_(e,[{key:"player",get:function(){return this._player},set:function(t){this._player=t}}],[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes)}}]),e}(H(w,["player"]));customElements.define("theoplayer-text-track-style-reset-button",ew);var eE=document.createElement("template");eE.innerHTML=tw('<theoplayer-menu><span slot="heading"><slot name="heading">Settings</slot></span><div class="theoplayer-menu-table"><span>Quality</span><theoplayer-menu-button menu="quality-menu"><theoplayer-active-quality-display></theoplayer-active-quality-display></theoplayer-menu-button><span>Playback speed</span><theoplayer-menu-button menu="playback-rate-menu"><theoplayer-playback-rate-display></theoplayer-playback-rate-display></theoplayer-menu-button></div></theoplayer-menu><theoplayer-menu id="quality-menu" menu-close-on-input hidden><span slot="heading">Quality</span><theoplayer-quality-radio-group></theoplayer-quality-radio-group></theoplayer-menu><theoplayer-playback-rate-menu id="playback-rate-menu" menu-close-on-input hidden><span slot="heading">Playback speed</span></theoplayer-playback-rate-menu>',tK),p(eE,"theoplayer-settings-menu");var ex=function(t){function e(){return t.call(this,{template:eE})}return a(e,t),e}(tx);customElements.define("theoplayer-settings-menu",ex);var eT=document.createElement("template");eT.innerHTML=k('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M14 22.475h-4q-.475 0-.863-.337-.387-.338-.437-.813l-.3-2.2q-.2-.075-.4-.2t-.375-.25l-2.05.85q-.475.2-.937.05-.463-.15-.738-.6l-1.975-3.45q-.25-.45-.162-.95.087-.5.487-.775l1.775-1.35Q4 12.325 4 12.225v-.45q0-.1.025-.225L2.25 10.2q-.4-.3-.487-.8-.088-.5.162-.925L3.9 5.025q.25-.45.725-.588.475-.137.95.038l2.075.875q.175-.15.363-.263.187-.112.387-.187l.3-2.225q.05-.5.425-.825.375-.325.875-.325h4q.5 0 .875.325t.425.825l.3 2.225q.2.075.4.187.2.113.375.263l2.05-.875q.475-.175.938-.025.462.15.737.575l2 3.45q.25.45.15.95-.1.5-.5.775l-1.775 1.35v.675q0 .1-.025.225l1.775 1.35q.4.275.487.775.088.5-.162.95l-2 3.45q-.25.425-.725.587-.475.163-.95-.037l-2.025-.85q-.175.125-.362.25-.188.125-.388.2l-.3 2.2q-.05.475-.425.813-.375.337-.875.337ZM12 15.5q1.45 0 2.475-1.025Q15.5 13.45 15.5 12q0-1.45-1.025-2.475Q13.45 8.5 12 8.5q-1.45 0-2.475 1.025Q8.5 10.55 8.5 12q0 1.45 1.025 2.475Q10.55 15.5 12 15.5Z"/></svg>\n</slot></span>'),p(eT,"theoplayer-settings-menu-button");var eC=function(e){function r(){return e.call(this,{template:eT})}return a(r,e),r.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.ARIA_LABEL)||this.setAttribute(t.Attribute.ARIA_LABEL,"open settings menu")},r}(tL);customElements.define("theoplayer-settings-menu-button",eC);var eL="theoplayerfullscreenenter",eS="theoplayerfullscreenexit",eP=document.createElement("template");eP.innerHTML=k('<span part="enter-icon"><slot name="enter-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M5.9 19.225q-.475 0-.8-.325-.325-.325-.325-.8V15q0-.475.325-.812.325-.338.8-.338.5 0 .825.338.325.337.325.812v1.95H9q.475 0 .812.325.338.325.338.825 0 .475-.338.8-.337.325-.812.325Zm0-9.075q-.475 0-.8-.338-.325-.337-.325-.812V5.9q0-.475.325-.8.325-.325.8-.325H9q.475 0 .812.325.338.325.338.8 0 .5-.338.825-.337.325-.812.325H7.05V9q0 .475-.325.812-.325.338-.825.338Zm9.1 9.075q-.475 0-.812-.325-.338-.325-.338-.8 0-.5.338-.825.337-.325.812-.325h1.95V15q0-.475.325-.812.325-.338.825-.338.475 0 .8.338.325.337.325.812v3.1q0 .475-.325.8-.325.325-.8.325Zm3.1-9.075q-.5 0-.825-.338-.325-.337-.325-.812V7.05H15q-.475 0-.812-.325-.338-.325-.338-.825 0-.475.338-.8.337-.325.812-.325h3.1q.475 0 .8.325.325.325.325.8V9q0 .475-.325.812-.325.338-.8.338Z"/></svg>\n</slot></span><span part="exit-icon"><slot name="exit-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M9 19.225q-.475 0-.812-.325-.338-.325-.338-.8v-1.95H5.9q-.475 0-.8-.338-.325-.337-.325-.812 0-.475.325-.812.325-.338.8-.338H9q.475 0 .812.338.338.337.338.812v3.1q0 .475-.338.8-.337.325-.812.325ZM5.9 10.15q-.475 0-.8-.338-.325-.337-.325-.812 0-.475.325-.813.325-.337.8-.337h1.95V5.9q0-.475.338-.8.337-.325.812-.325.475 0 .812.325.338.325.338.8V9q0 .475-.338.812-.337.338-.812.338Zm9.1 9.075q-.475 0-.812-.325-.338-.325-.338-.8V15q0-.475.338-.812.337-.338.812-.338h3.1q.475 0 .8.338.325.337.325.812 0 .475-.325.812-.325.338-.8.338h-1.95v1.95q0 .475-.337.8-.338.325-.813.325Zm0-9.075q-.475 0-.812-.338-.338-.337-.338-.812V5.9q0-.475.338-.8.337-.325.812-.325.475 0 .813.325.337.325.337.8v1.95h1.95q.475 0 .8.337.325.338.325.813 0 .475-.325.812-.325.338-.8.338Z"/></svg>\n</slot></span>',":host(:not([fullscreen])) [part=exit-icon],:host([fullscreen]) [part=enter-icon]{display:none!important}"),p(eP,"theoplayer-fullscreen-button");var eM=function(e){function r(){var t;return(t=e.call(this,{template:eP})||this)._upgradeProperty("fullscreen"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},n.handleClick=function(){if(this.fullscreen){var t=th(eS,{bubbles:!0,composed:!0});this.dispatchEvent(t)}else{var e=th(eL,{bubbles:!0,composed:!0});this.dispatchEvent(e)}},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&(d(this),this._updateAriaLabel())},n._updateAriaLabel=function(){var e=this.fullscreen?"exit fullscreen":"enter fullscreen";this.setAttribute(t.Attribute.ARIA_LABEL,e)},_(r,[{key:"fullscreen",get:function(){return this.hasAttribute(t.Attribute.FULLSCREEN)},set:function(e){e?this.setAttribute(t.Attribute.FULLSCREEN,""):this.removeAttribute(t.Attribute.FULLSCREEN)}}],[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes,[t.Attribute.FULLSCREEN])}}]),r}(H(w,["fullscreen"]));customElements.define("theoplayer-fullscreen-button",eM);var eR=function(){function t(){this._stops=[["transparent",100]]}var e=t.prototype;return e.add=function(t,e,r){if(!((e=Math.max(e,0))>=(r=Math.min(r,100)))){var a=O(this._stops,function(t){var r=t[1];return e<=r});if(!(a<0)){var n=this._stops[a],o=n[0],i=n[1],l=[];if(e>0&&l.push([o,e]),l.push([t,r]),r<i)l.push([o,i]),(s=this._stops).splice.apply(s,[].concat([a,1],l));else{for(var s,u,p=a+1;p<this._stops.length&&!(r<this._stops[p][1]);)p++;(u=this._stops).splice.apply(u,[].concat([a,p-a],l))}}}},e.toGradientStops=function(){for(var t,e=[],r=0,a=s(this._stops);!(t=a()).done;){var n=t.value,o=n[0],i=n[1];i<r||(e.push(o+" "+r+"%"),e.push(o+" "+i+"%"),r=i)}return e.join(", ")},t}();function eI(t,e){return void 0===e&&(e=""),"<style>:host{--thumb-height:var(--theoplayer-range-thumb-height,10px);--track-height:var(--theoplayer-range-track-height,4px);--theoplayer-range-padding:var(--theoplayer-control-padding,10px);background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;font-size:0;height:44px;height:calc(var(--theoplayer-control-height, 24px) + var(--theoplayer-range-padding)*2);padding-left:10px;padding-left:var(--theoplayer-range-padding-left,var(--theoplayer-range-padding));padding-right:10px;padding-right:var(--theoplayer-range-padding-right,var(--theoplayer-range-padding));pointer-events:auto;position:relative;-webkit-transition:background .15s linear;transition:background .15s linear;vertical-align:middle;width:100px}:host([hidden]){display:none!important}:host(:hover:not([disabled])){background:transparent;background:var(--theoplayer-control-hover-background,var(--theoplayer-control-background,transparent))}[part=container]{height:100%;position:relative}[part=background],[part=pointer]{border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);height:var(--track-height);position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transform:translate(var(--theoplayer-range-track-translate-x,0),calc(var(--theoplayer-range-track-translate-y, 0px) - 50%));transform:translate(var(--theoplayer-range-track-translate-x,0),calc(var(--theoplayer-range-track-translate-y, 0px) - 50%))}[part=background]{background:hsla(0,0%,100%,.2);background:var(--theoplayer-range-track-background,hsla(0,0%,100%,.2));min-width:40px;width:100%;width:var(--theoplayer-range-track-width,100%)}[part=pointer]{background:transparent;background:var(--theoplayer-range-track-pointer-background,transparent);border-right:none;border-right:var(--theoplayer-range-track-pointer-border-right,none);opacity:0;-webkit-transition:visibility .25s,opacity .25s;transition:visibility .25s,opacity .25s;visibility:hidden}:host(:hover:not([disabled])) [part=pointer]{opacity:1;-webkit-transition:visibility .5s,opacity .5s;transition:visibility .5s,opacity .5s;visibility:visible}input[type=range]{-webkit-appearance:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;min-height:100%;padding:0;position:relative;width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);-webkit-box-shadow:1px 1px 1px transparent;box-shadow:1px 1px 1px transparent;-webkit-box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);margin-top:calc(0px - var(--thumb-height)/2 + var(--track-height)/2);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);-webkit-transform:none;transform:none;-webkit-transform:var(--theoplayer-range-thumb-transform,none);transform:var(--theoplayer-range-thumb-transform,none);-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);width:10px;width:var(--theoplayer-range-thumb-width,10px)}input[type=range]::-moz-range-thumb{background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);box-shadow:1px 1px 1px transparent;box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);transform:none;transform:var(--theoplayer-range-thumb-transform,none);-moz-transition:none;transition:none;-moz-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);translate:0 0;translate:var(--theoplayer-range-track-translate-x,0) var(--theoplayer-range-track-translate-y,0);width:10px;width:var(--theoplayer-range-thumb-width,10px)}input[type=range]::-ms-thumb{background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);box-shadow:1px 1px 1px transparent;box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);transform:none;transform:var(--theoplayer-range-thumb-transform,none);-ms-transition:none;transition:none;-ms-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);width:10px;width:var(--theoplayer-range-thumb-width,10px)}:host([disabled]) input[type=range]::-webkit-slider-thumb{display:none}:host([disabled]) input[type=range]::-moz-range-thumb{display:none}:host([disabled]) input[type=range]::-ms-thumb{display:none}input[type=range]::-webkit-slider-runnable-track{background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);-webkit-box-shadow:none;box-shadow:none;-webkit-box-shadow:var(--theoplayer-range-track-box-shadow,none);box-shadow:var(--theoplayer-range-track-box-shadow,none);cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);-webkit-transform:translate(0);transform:translate(0);-webkit-transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-moz-range-track{background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);box-shadow:none;box-shadow:var(--theoplayer-range-track-box-shadow,none);cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);transform:translate(0);transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-moz-transition:none;transition:none;-moz-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-ms-track{background:transparent;background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);box-shadow:none;box-shadow:var(--theoplayer-range-track-box-shadow,none);color:transparent;cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);transform:translate(0);transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-ms-transition:none;transition:none;-ms-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-ms-fill-lower,input[type=range]::-ms-fill-upper,input[type=range]::-ms-tooltip{display:none}:host([disabled]) input[type=range]::-webkit-slider-runnable-track{cursor:default}:host([disabled]) input[type=range]::-moz-range-track{cursor:default}:host([disabled]) input[type=range]::-ms-track{cursor:default}input[type=range]:focus{-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}input[type=range]:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}input[type=range]:focus::-webkit-slider-runnable-track{outline:0}\n"+e+'</style><div part="container"><div part="background"></div><div part="pointer"></div>'+t+"</div>"}var eO=function(e){function r(t){(r=e.call(this)||this)._lastRangeWidth=0,r._onInput=function(){r.handleInput()},r._updatePointerBar=function(t){if(!r.disabled){var e=r._rangeEl.getBoundingClientRect(),a=(t.clientX-e.left)/e.width;a=Math.max(0,Math.min(1,a)),r.updatePointer_(a,e)}};var r,a=r.attachShadow({mode:"open"});return a.appendChild(t.template.content.cloneNode(!0)),r._rangeEl=a.querySelector('input[type="range"]'),r._rangeEl.addEventListener("input",r._onInput),r._rangeEl.addEventListener("change",r._onInput),r._pointerEl=a.querySelector('[part="pointer"]'),r._upgradeProperty("disabled"),r._upgradeProperty("value"),r._upgradeProperty("min"),r._upgradeProperty("max"),r._upgradeProperty("step"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this),this._rangeEl.setAttribute(t.Attribute.ARIA_LABEL,this.getAriaLabel()),this.update(),this.addEventListener("pointermove",this._updatePointerBar)},n.disconnectedCallback=function(){this.removeEventListener("pointermove",this._updatePointerBar)},n.attributeChangedCallback=function(e,a,n){if(n!==a){var o=null!=n;e===t.Attribute.DISABLED?(this.setAttribute("aria-disabled",o?"true":"false"),o?this._rangeEl.setAttribute(e,n):this._rangeEl.removeAttribute(e)):e!==t.Attribute.HIDDEN||o||this.update(),r.observedAttributes.indexOf(e)>=0&&d(this)}},n.handleInput=function(){this.update()},n.update=function(){this.hasAttribute(t.Attribute.HIDDEN)||(this._rangeEl.setAttribute("aria-valuetext",this.getAriaValueText()),this.updateBar_())},n.updateBar_=function(){d(this,{"--theoplayer-range-track-progress-internal":"linear-gradient(to right, "+this.getBarColors().toGradientStops()+")"})},n.getBarColors=function(){var t=(this.value-this.min)/(this.max-this.min)*100;isNaN(t)&&(t=0);var e=this._rangeEl.offsetWidth;e>0&&(this._lastRangeWidth=e);var r=0;this.min<this.value&&this.value<this.max&&(r=parseInt(getComputedStyle(this).getPropertyValue("--theoplayer-range-thumb-width")||"10px")*(.5-t/100)/this._lastRangeWidth*100);var a=new eR;return a.add("var(--theoplayer-range-bar-color, #fff)",0,t+r),a},n.updatePointer_=function(t,e){this._pointerEl.style.width=""+t*e.width+"px"},_(r,[{key:"disabled",get:function(){return this.hasAttribute(t.Attribute.DISABLED)},set:function(e){e?this.setAttribute(t.Attribute.DISABLED,""):this.removeAttribute(t.Attribute.DISABLED)}},{key:"value",get:function(){return this._rangeEl.valueAsNumber},set:function(t){this._rangeEl.valueAsNumber=t,this.handleInput()}},{key:"min",get:function(){return Number(this._rangeEl.min)},set:function(t){this._rangeEl.min=String(t),this.update()}},{key:"max",get:function(){return Number(this._rangeEl.max)},set:function(t){this._rangeEl.max=String(t),this.update()}},{key:"step",get:function(){var t=this._rangeEl.step;return"any"===t?t:Number(t)},set:function(t){this._rangeEl.step=String(t)}}],[{key:"observedAttributes",get:function(){return[t.Attribute.DISABLED,t.Attribute.HIDDEN]}}]),r}(i(HTMLElement)),eD="theoplayerpreviewtimechange",eN=document.createElement("template");eN.innerHTML="<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}:host([hidden]){display:none!important}canvas{background:#fff;background:var(--theoplayer-preview-thumbnail-background,#fff);border-radius:2px;border-radius:var(--theoplayer-preview-thumbnail-padding,2px);display:none;padding:2px;padding:var(--theoplayer-preview-thumbnail-padding,2px)}</style><canvas></canvas>",p(eN,"theoplayer-preview-thumbnail");var eq=["addtrack","removetrack"],eF=function(t){function e(){(e=t.call(this)||this)._previewTime=NaN,e._updateThumbnailTextTrack=function(){var t=e._thumbnailTextTrack,r=e._player?I(e._player.textTracks,eB):void 0;t!==r&&(e._thumbnailTextTrack=r,e.updateThumbnail_())};var e,r=e.attachShadow({mode:"open"});return r.appendChild(eN.content.cloneNode(!0)),e._canvasEl=r.querySelector("canvas"),e._canvasContext=e._canvasEl.getContext("2d"),e._thumbnailImageSource=document.createElement("img"),e._thumbnailImageSource.decoding="async",e._upgradeProperty("previewTime"),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){h(this)},r.updateThumbnail_=function(){var t=this._thumbnailTextTrack;if(void 0===t){this.hideThumbnail_();return}"disabled"===t.mode&&(t.mode="hidden");var e=function(t,e){if(0!==t.length){for(var r,a=t[0],n=s(t);!(r=n()).done;){var o=r.value;if(o.startTime<=e)a=o;else if(e>=o.endTime)break}return a}}(t.cues,this._previewTime);if(void 0===e){this.hideThumbnail_();return}var r=e.content.trim(),a=function(t){var e=t.match(/^(.+)#xywh=(\d+),(\d+),(\d+),(\d+)$/);if(e)return{url:e[1],x:+e[2],y:+e[3],w:+e[4],h:+e[5]}}(r),n=a?a.url:r;if(n=new URL(n,t.src||location.href).href,this._lastLoadedThumbnailUrl!==n){this.loadThumbnailImage_(n);return}this.showThumbnail_(a)},r.loadThumbnailImage_=function(t){var e=this;if(this._thumbnailImageSource.src!==t){var r=function(){e._lastLoadedThumbnailUrl=t,e.updateThumbnail_()};"function"==typeof this._thumbnailImageSource.decode?(this._thumbnailImageSource.src=t,this._thumbnailImageSource.decode().then(r,L)):(this._thumbnailImageSource.onload=r,this._thumbnailImageSource.src="",this._thumbnailImageSource.src=t)}},r.showThumbnail_=function(t){t?(this._canvasEl.width=t.w,this._canvasEl.height=t.h,this._canvasContext.drawImage(this._thumbnailImageSource,t.x,t.y,t.w,t.h,0,0,t.w,t.h)):(this._canvasEl.width=this._thumbnailImageSource.naturalWidth,this._canvasEl.height=this._thumbnailImageSource.naturalHeight,this._canvasContext.drawImage(this._thumbnailImageSource,0,0)),this._canvasEl.style.display="block"},r.hideThumbnail_=function(){this._canvasEl.style.display="none"},_(e,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.textTracks.removeEventListener(eq,this._updateThumbnailTextTrack),this._player=t,this._updateThumbnailTextTrack(),void 0!==this._player&&this._player.textTracks.addEventListener(eq,this._updateThumbnailTextTrack))}},{key:"previewTime",get:function(){return this._previewTime},set:function(t){this._previewTime=t,this.updateThumbnail_()}}]),e}(H(HTMLElement,["player","previewTime"]));function eB(t){return"metadata"===t.kind&&"thumbnails"===t.label}customElements.define("theoplayer-preview-thumbnail",eF);var eH=document.createElement("template");eH.innerHTML="<style>"+X+"</style><span></span>",p(eH,"theoplayer-preview-time-display");var eU=["timeupdate","seeking","seeked","durationchange"],ez=function(e){function r(){(r=e.call(this)||this)._previewTime=NaN,r._update=function(){var e,a=r._previewTime,n=r._player?r._player.duration:NaN,o=null==(e=r._player)?void 0:e.seekable,i=isFinite(n)?n:o&&o.length>0?o.end(0):NaN,l=r.hasAttribute(t.Attribute.REMAINING)||r.hasAttribute(t.Attribute.REMAINING_WHEN_LIVE)&&"vod"!==r.streamType;l&&(a=-((i||0)-a)),q(r._spanEl,$(a,i,l))};var r,a=r.attachShadow({mode:"open"});return a.appendChild(eH.content.cloneNode(!0)),r._spanEl=a.querySelector("span"),r._upgradeProperty("previewTime"),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this),this._update()},n.attributeChangedCallback=function(t,e,a){a!==e&&r.observedAttributes.indexOf(t)>=0&&(this._update(),d(this))},_(r,[{key:"previewTime",get:function(){return this._previewTime},set:function(t){this._previewTime=t,this._update()}},{key:"streamType",get:function(){return this.getAttribute(t.Attribute.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(t.Attribute.STREAM_TYPE,e)}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener(eU,this._update),this._player=t,this._update(),void 0!==this._player&&this._player.addEventListener(eU,this._update))}}],[{key:"observedAttributes",get:function(){return[t.Attribute.REMAINING,t.Attribute.REMAINING_WHEN_LIVE,t.Attribute.STREAM_TYPE]}}]),r}(H(HTMLElement,["player","previewTime","streamType"]));function eV(t){return"linear"===t.type}customElements.define("theoplayer-preview-time-display",ez);var eG=document.createElement("template");eG.innerHTML=eI('<input type="range" min="0" max="1000" step="any" value="0"><div class="theoplayer-time-range-preview-rail"><div part="box preview-box"><slot name="preview"><theoplayer-preview-thumbnail></theoplayer-preview-thumbnail><theoplayer-preview-time-display remaining-when-live></theoplayer-preview-time-display></slot></div></div>',"input[type=range]{direction:ltr}.theoplayer-time-range-preview-rail{bottom:100%;left:0;opacity:0;pointer-events:none;position:absolute;-webkit-transition:visibility .25s,opacity .25s;transition:visibility .25s,opacity .25s;visibility:hidden;width:1%}:host(:hover:not([disabled])) .theoplayer-time-range-preview-rail{opacity:1;-webkit-transition:visibility .5s,opacity .5s;transition:visibility .5s,opacity .5s;visibility:visible}[part~=box]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;align-items:center;bottom:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;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));position:absolute;text-shadow:0 0 4px rgba(0,0,0,.75);text-shadow:var(--theoplayer-preview-text-shadow,0 0 4px rgba(0,0,0,.75));-webkit-transform:translateX(-50%);transform:translateX(-50%)}"),p(eG,"theoplayer-time-range");var eQ=["timeupdate","durationchange","ratechange","seeking","seeked"],eY=["play","pause","ended","readystatechange","error"],eK=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"],eW=function(e){function r(){var r;return(r=e.call(this,{template:eG})||this)._pausedWhileScrubbing=!1,r._autoAdvanceId=0,r._lastUpdateTime=0,r._lastCurrentTime=0,r._lastPlaybackRate=0,r._updateFromPlayer=function(){if(void 0!==r._player){r._lastUpdateTime=performance.now(),r._lastCurrentTime=r._player.currentTime,r._lastPlaybackRate=r._player.playbackRate;var t=r._player.seekable;if(0!==t.length?(r.min=t.start(0),r.max=t.end(0)):(r.min=0,r.max=r._player.duration),!isFinite(r._lastCurrentTime)){var e=r._player.duration===1/0;r._lastCurrentTime=e?r.max:r.min}r._rangeEl.valueAsNumber=r._lastCurrentTime,r.update(),r._updateDisabled()}},r._updateDisabled=function(){var t="live"===r.streamType;void 0!==r._player&&(t||(t=0===r._player.seekable.length)),r.disabled=t},r._pauseOnScrubStart=function(){r._pausedWhileScrubbing||void 0===r._player||r._player.paused||(r._pausedWhileScrubbing=!0,r._player.pause(),document.addEventListener("mouseup",r._playOnScrubEnd),document.addEventListener("touchend",r._playOnScrubEnd))},r._playOnScrubEnd=function(){r._pausedWhileScrubbing&&(r._pausedWhileScrubbing=!1,document.removeEventListener("mouseup",r._playOnScrubEnd),document.removeEventListener("touchend",r._playOnScrubEnd),void 0!==r._player&&r._player.paused&&r._player.play())},r._toggleAutoAdvance=function(){r.shouldAutoAdvance_()?0===r._autoAdvanceId&&(r._updateFromPlayer(),r._autoAdvanceId=requestAnimationFrame(r._autoAdvanceWhilePlaying)):0!==r._autoAdvanceId&&(r._updateFromPlayer(),cancelAnimationFrame(r._autoAdvanceId),r._autoAdvanceId=0)},r._autoAdvanceWhilePlaying=function(){if(!r.shouldAutoAdvance_()){r._autoAdvanceId=0;return}var t=(performance.now()-r._lastUpdateTime)/1e3;r._rangeEl.valueAsNumber=r._lastCurrentTime+t*r._lastPlaybackRate,r.update(),r._autoAdvanceId=requestAnimationFrame(r._autoAdvanceWhilePlaying)},r._onAdChange=function(){r.update()},r._previewRailEl=r.shadowRoot.querySelector(".theoplayer-time-range-preview-rail"),r._previewBoxEl=r._previewRailEl.querySelector('[part~="preview-box"]'),r._rangeEl.setAttribute(t.Attribute.ARIA_LIVE,"off"),r._rangeEl.addEventListener("mousedown",r._pauseOnScrubStart),r._rangeEl.addEventListener("touchstart",r._pauseOnScrubStart),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._toggleAutoAdvance()},n.disconnectedCallback=function(){e.prototype.disconnectedCallback.call(this),this._toggleAutoAdvance()},n.getAriaLabel=function(){return"seek"},n.getAriaValueText=function(){var t=tr(this.value),e=tr(this.max);return t&&e?t+" of "+e:"video not loaded, unknown time"},n.attributeChangedCallback=function(a,n,o){e.prototype.attributeChangedCallback.call(this,a,n,o),o!==n&&(a===t.Attribute.STREAM_TYPE?this._updateDisabled():a===t.Attribute.SHOW_AD_MARKERS&&this.update(),r.observedAttributes.indexOf(a)>=0&&d(this))},n.handleInput=function(){void 0!==this._player&&this._player.currentTime!==this.value&&(this._player.currentTime=this.value),e.prototype.handleInput.call(this)},n.shouldAutoAdvance_=function(){return this.isConnected&&void 0!==this._player&&!this._player.paused&&!this._player.ended&&!this._player.errorObject&&this._player.readyState>=3},n.updatePointer_=function(t,r){e.prototype.updatePointer_.call(this,t,r);var a=r.left+t*r.width,n=this._previewBoxEl.getBoundingClientRect(),o=((a=Math.max(r.left+n.width/2,Math.min(r.right-n.width/2,a)))-r.left)/r.width;if(this._previewRailEl.style.transform="translateX("+(1e4*o).toFixed(6)+"%)",void 0!==this._player){var i=this.min,l=th(eD,{bubbles:!0,composed:!0,detail:{previewTime:i+t*(this.max-i)}});this.dispatchEvent(l)}},n.getBarColors=function(){var r=e.prototype.getBarColors.call(this);if(!this.hasAttribute(t.Attribute.SHOW_AD_MARKERS)||!this._player||!this._player.ads||this._player.ads.playing)return r;for(var a,n=this.min,o=this.max,i=s(this._player.ads.scheduledAdBreaks);!(a=i()).done;){var l=a.value;if(void 0===l.ads||!(l.ads.length>0)||l.ads.some(eV)){var u=l.timeOffset;if(u<0&&(u=this._player.duration),n<=u&&u<=o){var p=(u-n)/(o-n)*100,h=void 0,d=void 0;p+1<100?(h=p,d=p+1):(h=99,d=100),r.add("var(--theoplayer-time-range-ad-marker-color, #ffc50f)",h,d)}}}return r},_(r,[{key:"player",get:function(){return this._player},set:function(t){var e,r;this._player!==t&&(void 0!==this._player&&(this._player.removeEventListener(eQ,this._updateFromPlayer),this._player.removeEventListener(eY,this._toggleAutoAdvance),null==(e=this._player.ads)||e.removeEventListener(eK,this._onAdChange)),this._player=t,this._updateFromPlayer(),this._toggleAutoAdvance(),void 0!==this._player&&(this._player.addEventListener(eQ,this._updateFromPlayer),this._player.addEventListener(eY,this._toggleAutoAdvance),null==(r=this._player.ads)||r.addEventListener(eK,this._onAdChange)))}},{key:"streamType",get:function(){return this.getAttribute(t.Attribute.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(t.Attribute.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[].concat(eO.observedAttributes,[t.Attribute.SHOW_AD_MARKERS])}}]),r}(H(eO,["player","streamType"]));customElements.define("theoplayer-time-range",eW);var eZ=document.createElement("template");eZ.innerHTML=eI('<input type="range" min="0" max="1" step="any" value="0">'),p(eZ,"theoplayer-volume-range");var ej=function(t){function e(){var e;return(e=t.call(this,{template:eZ})||this)._updateFromPlayer=function(){void 0!==e._player&&(e.value=e._player.volume)},e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r.getAriaLabel=function(){return"volume"},r.getAriaValueText=function(){return""+Math.round(this.value/this.max*100)+"%"},r.handleInput=function(){void 0!==this._player&&this._player.volume!==this.value&&(this._player.volume=this.value),t.prototype.handleInput.call(this)},_(e,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener("volumechange",this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener("volumechange",this._updateFromPlayer))}}]),e}(H(eO,["player"]));customElements.define("theoplayer-volume-range",ej);var eX=document.createElement("template");eX.innerHTML='<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;gap:var(--theoplayer-error-icon-gap,10px);max-width:80%;max-width:var(--theoplayer-error-max-width,80%);min-width:0;min-width:var(--theoplayer-error-min-width,0)}:host([hidden]){display:none!important}[part~=icon]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;font-size:0}::slotted(img),::slotted(svg),img,svg{fill:#fff;fill:var(--theoplayer-error-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-error-icon-height,48px);max-height:100%;max-width:100%;min-width:100%;vertical-align:middle;width:48px;width:var(--theoplayer-error-icon-width,48px)}[part~=heading]{color:#fff;color:var(--theoplayer-error-heading-color,#fff);line-height:48px;line-height:var(--theoplayer-error-icon-height,48px);margin:0 0 10px;margin:var(--theoplayer-error-heading-margin,0 0 10px);padding:0}[part~=message]{color:#fff;color:var(--theoplayer-error-message-color,#fff);margin:0;margin:var(--theoplayer-error-message-margin,0);padding:0}[part~=fullscreen-controls]{-webkit-box-pack:end;-ms-flex-pack:end;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;left:0;position:absolute;right:0}:host(:not([fullscreen])) [part~=fullscreen-controls]{display:none!important}</style><div part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" height="48" width="48"><path d="M24.15 26.4q.85 0 1.425-.575.575-.575.575-1.425v-9.2q0-.8-.6-1.375t-1.4-.575q-.85 0-1.425.575-.575.575-.575 1.425v9.2q0 .8.6 1.375t1.4.575ZM24 34.7q1 0 1.625-.625t.625-1.625q0-.95-.625-1.625T24 30.15q-1 0-1.625.675t-.625 1.625q0 1 .625 1.625T24 34.7Zm0 10q-4.4 0-8.175-1.575Q12.05 41.55 9.25 38.75q-2.8-2.8-4.375-6.575Q3.3 28.4 3.3 24q0-4.35 1.575-8.125Q6.45 12.1 9.25 9.3q2.8-2.8 6.575-4.425Q19.6 3.25 24 3.25q4.35 0 8.125 1.625Q35.9 6.5 38.7 9.3q2.8 2.8 4.425 6.575Q44.75 19.65 44.75 24q0 4.4-1.625 8.175Q41.5 35.95 38.7 38.75q-2.8 2.8-6.575 4.375Q28.35 44.7 24 44.7Z"/></svg>\n</slot></div><div part="text"><h1 part="heading"><slot name="heading">An error occurred</slot></h1><p part="message"><slot name="message"></slot></p></div><div part="fullscreen-controls"><slot name="fullscreen-controls"><theoplayer-fullscreen-button></theoplayer-fullscreen-button></slot></div>',p(eX,"theoplayer-error-display");var eJ=function(e){function r(){var t,r=(t=e.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0});return r.appendChild(eX.content.cloneNode(!0)),t._messageSlot=r.querySelector('slot[name="message"]'),t._upgradeProperty("error"),t}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this)},n.attributeChangedCallback=function(t,e,a){r.observedAttributes.indexOf(t)>=0&&d(this)},_(r,[{key:"error",get:function(){return this._error},set:function(t){this._error=t,q(this._messageSlot,t?t.message:"")}},{key:"fullscreen",get:function(){return this.hasAttribute(t.Attribute.FULLSCREEN)},set:function(e){e?this.setAttribute(t.Attribute.FULLSCREEN,""):this.removeAttribute(t.Attribute.FULLSCREEN)}}],[{key:"observedAttributes",get:function(){return[t.Attribute.FULLSCREEN]}}]),r}(H(HTMLElement,["error","fullscreen"]));customElements.define("theoplayer-error-display",eJ);var e$=function(e){function r(r){var a;return(a=e.call(this,r)||this)._updateCastState=function(){var e=a._castApi?a._castApi.state:"unavailable";a.setAttribute(t.Attribute.CAST_STATE,e)},a._upgradeProperty("castState"),a._upgradeProperty("castApi"),a}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.CAST_STATE)||this.setAttribute(t.Attribute.CAST_STATE,"unavailable"),this._updateCastState()},n.handleClick=function(){if(this._castApi){this._updateCastState();var t=this.castState;"available"===t?this._castApi.start():("connecting"===t||"connected"===t)&&this._castApi.stop()}},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&d(this)},_(r,[{key:"castApi",get:function(){return this._castApi},set:function(t){void 0!==this._castApi&&this._castApi.removeEventListener("statechange",this._updateCastState),this._castApi=t,this._updateCastState(),void 0!==this._castApi&&this._castApi.addEventListener("statechange",this._updateCastState)}},{key:"castState",get:function(){return this.getAttribute(t.Attribute.CAST_STATE)}}],[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes,[t.Attribute.CAST_STATE])}}]),r}(w),e0=document.createElement("template");e0.innerHTML=k('<span part="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" height="24" width="24"><defs><clipPath id="theoplayer-chromecast-rings-mask"><path d="M0-36h44V0H0z"/></clipPath></defs><path class="theoplayer-chromecast-outer" d="M2 10a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H28v-4h14V10H6v6H2z"/><path class="theoplayer-chromecast-inner" d="M10 14h28v20H26.74A26 26 0 0 0 10 17.26z"/><g class="theoplayer-chromecast-rings" fill="none" stroke="currentColor" stroke-width="4" transform="translate(2 42)" clip-path="url(#theoplayer-chromecast-rings-mask)"><circle stroke="none" cx="0" cy="0" r="30"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring1" stroke-width="6" cx="0" cy="0" r="3"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring2" cx="0" cy="0" r="12"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring3" cx="0" cy="0" r="20"/><path class="theoplayer-chromecast-ring theoplayer-chromecast-ring4" stroke-linecap="round" d="M0-20A20 20 0 0 1 20 0"/></g></svg></span>',":host([cast-state=unavailable]){display:none!important}:host([cast-state=connecting]) .theoplayer-chromecast-ring{-webkit-animation:.9s linear infinite;animation:.9s linear infinite}:host([cast-state=connecting]) .theoplayer-chromecast-ring1{-webkit-animation-name:theoplayer-chromecast-connecting-ring1;animation-name:theoplayer-chromecast-connecting-ring1}:host([cast-state=connecting]) .theoplayer-chromecast-ring2{-webkit-animation-name:theoplayer-chromecast-connecting-ring2;animation-name:theoplayer-chromecast-connecting-ring2}:host([cast-state=connecting]) .theoplayer-chromecast-ring3{-webkit-animation-name:theoplayer-chromecast-connecting-ring3;animation-name:theoplayer-chromecast-connecting-ring3}:host([cast-state=connecting]) .theoplayer-chromecast-ring4{-webkit-animation-name:theoplayer-chromecast-connecting-ring4;animation-name:theoplayer-chromecast-connecting-ring4}.theoplayer-chromecast-inner{opacity:0;-webkit-transition:opacity .5s ease-in-out;transition:opacity .5s ease-in-out}:host([cast-state=connected]) .theoplayer-chromecast-inner{opacity:1}.theoplayer-chromecast-rings{-webkit-clip-path:polygon(50% -100%,50% 50%,100% 50%,100% -100%);clip-path:polygon(50% -100%,50% 50%,100% 50%,100% -100%)}@-webkit-keyframes theoplayer-chromecast-connecting-ring1{0%,37.5%{-webkit-transform:scale(0);transform:scale(0)}62.5%,to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring1{0%,37.5%{-webkit-transform:scale(0);transform:scale(0)}62.5%,to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring2{0%,20%{stroke-width:24;-webkit-transform:scale(.25);transform:scale(.25)}35%{stroke-width:10;-webkit-transform:scale(.5);transform:scale(.5)}55%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring2{0%,20%{stroke-width:24;-webkit-transform:scale(.25);transform:scale(.25)}35%{stroke-width:10;-webkit-transform:scale(.5);transform:scale(.5)}55%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring3{0%,15%{stroke-width:6.66667;-webkit-transform:scale(.6);transform:scale(.6)}45%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring3{0%,15%{stroke-width:6.66667;-webkit-transform:scale(.6);transform:scale(.6)}45%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring4{0%{stroke-width:4;stroke-dashoffset:0;stroke-dasharray:32,99;opacity:1;-webkit-transform:scale(1);transform:scale(1)}35%{stroke-width:2.8571;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.4);transform:scale(1.4)}50%{stroke-width:0;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.5);transform:scale(1.5)}50.001%,to{opacity:0}}@keyframes theoplayer-chromecast-connecting-ring4{0%{stroke-width:4;stroke-dashoffset:0;stroke-dasharray:32,99;opacity:1;-webkit-transform:scale(1);transform:scale(1)}35%{stroke-width:2.8571;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.4);transform:scale(1.4)}50%{stroke-width:0;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.5);transform:scale(1.5)}50.001%,to{opacity:0}}"),p(e0,"theoplayer-chromecast-button");var e1="theoplayer-chromecast-rings-mask",e5=0,e2=function(e){function r(){t=e.call(this,{template:e0})||this;var t,r=++e5,a=t.shadowRoot.querySelector("svg clipPath#"+e1),n=t.shadowRoot.querySelector("svg .theoplayer-chromecast-rings"),o=e1+"-"+r;return a.setAttribute("id",o),n.setAttribute("clip-path",o),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&this._updateAriaLabel()},n._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop casting to Chromecast":"start casting to Chromecast";this.setAttribute(t.Attribute.ARIA_LABEL,e)},_(r,[{key:"player",get:function(){return this._player},set:function(t){var e;this._player=t,this.castApi=null==t?void 0:null==(e=t.cast)?void 0:e.chromecast}}]),r}(H(e$,["player"]));customElements.define("theoplayer-chromecast-button",e2);var e3=document.createElement("template");e3.innerHTML='<style>:host{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;gap:var(--theoplayer-chromecast-display-icon-gap,10px);padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:none}:host([hidden]){display:none!important}[part~=icon]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;font-size:0}::slotted(img),::slotted(svg),img,svg{fill:#fff;fill:var(--theoplayer-chromecast-display-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-chromecast-display-icon-height,48px);max-height:100%;max-width:100%;min-width:100%;vertical-align:middle;width:48px;width:var(--theoplayer-chromecast-display-icon-width,48px)}[part=text]{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap}[part=heading]{color:#fff;color:var(--theoplayer-chromecast-display-heading-color,#fff);font-size:14px;font-size:var(--theoplayer-chromecast-display-heading-font-size,var(--theoplayer-text-font-size,14px));margin:0;margin:var(--theoplayer-chromecast-display-heading-margin,0);padding:0}[part=receiver]{color:#fff;color:var(--theoplayer-chromecast-display-receiver-color,#fff);font-size:17.5px;font-size:var(--theoplayer-chromecast-display-receiver-font-size,calc(var(--theoplayer-text-font-size, 14px)*1.25));margin:0;margin:var(--theoplayer-chromecast-display-receiver-margin,0);padding:0}</style><div part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M86.956 910.131h65.699q9.171 0 14.801-6.413 5.631-6.413 4.076-14.067-6.099-32.801-29.132-57.242-23.033-24.442-55.051-30.941-7.654-1.555-14.067 4.076-6.413 5.63-6.413 15.164v69.336q0 8.487 5.8 14.287 5.8 5.8 14.287 5.8Zm179.365 0q14.288 0 23.635-9.565 9.348-9.565 7.348-23.261-10.944-78.191-65.681-134.428-54.737-56.237-131.928-67.181-13.696-2-23.26 7.415-9.566 9.416-9.566 23.411 0 12.13 9.311 23.059 9.312 10.929 24.08 13.332 49.566 9.566 84.913 46.696 35.348 37.131 44.914 87.131 2.403 14.768 12.595 24.08 10.192 9.311 23.639 9.311Zm127.147 0q13.904 0 23.261-9.563 9.358-9.563 8.358-23.444-5.819-64.393-33.105-122.128-27.286-57.735-70.589-101.784-43.303-44.049-100.088-71.892-56.784-27.842-121.43-33.407-13.88-1-23.443 8.53-9.563 9.531-9.563 23.377 0 13.615 9.072 23.615 9.072 10 23.62 12.19 103.526 11.636 174.956 85.018 71.43 73.382 82.858 176.796 1.801 14.298 11.995 23.495 10.195 9.197 24.098 9.197ZM123.477 241.304h692.436q31.74 0 55.762 24.021 24.021 24.022 24.021 55.762v509.826q0 31.507-24.021 55.362-24.022 23.856-55.762 23.856H525.696q-16.706 0-28.158-11.501-11.451-11.502-11.451-28.283 0-16.782 11.451-28.108 11.452-11.326 28.158-11.326h290.217V321.087H146.087v146q-6.783 6.348-16.595 11.674-9.813 5.326-23.514 5.326-16.457 0-27.783-11.452-11.326-11.451-11.326-28.158v-146q0-21.834 16.838-39.504 16.837-17.669 39.77-17.669Zm317.914 363Z"/></svg>\n</slot></div><div part="text"><p part="heading"><slot name="heading">Playing on</slot></p><p part="receiver">Chromecast Receiver</p></div>',p(e3,"theoplayer-chromecast-display");var e4=["statechange"],e8=function(e){function r(){(r=e.call(this)||this)._updateFromPlayer=function(){var e,a,n=null==(a=r._player)?void 0:null==(e=a.cast)?void 0:e.chromecast;if(void 0===n||"connected"!==n.state){r.setAttribute(t.Attribute.HIDDEN,"");return}q(r._receiverNameEl,n.receiverName||""),r.removeAttribute(t.Attribute.HIDDEN)};var r,a=r.attachShadow({mode:"open"});return a.appendChild(e3.content.cloneNode(!0)),r._receiverNameEl=a.querySelector('[part="receiver"]'),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this),this.hasAttribute(t.Attribute.HIDDEN)||this.setAttribute(t.Attribute.HIDDEN,""),this._updateFromPlayer()},_(r,[{key:"player",get:function(){return this._player},set:function(t){var e,r,a,n,o,i;this._player!==t&&(null==(a=this._player)||null==(r=a.cast)||null==(e=r.chromecast)||e.removeEventListener(e4,this._updateFromPlayer),this._player=t,this._updateFromPlayer(),null==(i=this._player)||null==(o=i.cast)||null==(n=o.chromecast)||n.addEventListener(e4,this._updateFromPlayer))}}]),r}(H(HTMLElement,["player"]));customElements.define("theoplayer-chromecast-display",e8);var e7=document.createElement("template");e7.innerHTML=k('<span part="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path class="theoplayer-airplay-inner" d="M5 7h14v8H5z"/><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg></span>',":host([cast-state=unavailable]){display:none!important}.theoplayer-airplay-inner{opacity:0;-webkit-transition:opacity .5s ease-in-out;transition:opacity .5s ease-in-out}:host([cast-state=connected]) .theoplayer-airplay-inner{opacity:1}"),p(e7,"theoplayer-airplay-button");var e6=function(e){function r(){var t;return(t=e.call(this,{template:e7})||this)._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&this._updateAriaLabel()},n._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop playing on AirPlay":"start playing on AirPlay";this.setAttribute(t.Attribute.ARIA_LABEL,e)},_(r,[{key:"player",get:function(){return this._player},set:function(t){var e;this._player=t,this.castApi=null==t?void 0:null==(e=t.cast)?void 0:e.airplay}}]),r}(H(e$,["player"]));customElements.define("theoplayer-airplay-button",e6);var e9=document.createElement("template");e9.innerHTML='<style>:host{pointer-events:none!important}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}[part=icon]{opacity:0;-webkit-transition:visibility .15s,opacity .15s;transition:visibility .15s,opacity .15s;visibility:hidden}:host([loading]) [part=icon]{opacity:1;-webkit-transition:visibility 0s,opacity 0s;transition:visibility 0s,opacity 0s;-webkit-transition-delay:.5s;transition-delay:.5s;-webkit-transition-delay:var(--theoplayer-loading-delay,.5s);transition-delay:var(--theoplayer-loading-delay,.5s);visibility:visible}[part=icon] ::slotted(img),[part=icon] ::slotted(svg){fill:#fff;fill:var(--theoplayer-loading-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-loading-icon-height,var(--theoplayer-loading-icon-width,48px));vertical-align:middle;width:48px;width:var(--theoplayer-loading-icon-width,48px)}.theoplayer-loading-progress{direction:ltr;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:0;height:48px;height:var(--theoplayer-loading-icon-height,var(--theoplayer-loading-icon-width,48px));letter-spacing:0;line-height:0;position:relative;white-space:nowrap;width:48px;width:var(--theoplayer-loading-icon-width,48px)}.theoplayer-loading-progress svg,.theoplayer-loading-spinner{height:100%;position:absolute;width:100%}.theoplayer-loading-progress svg{stroke:#fff;stroke:var(--theoplayer-loading-icon-color,var(--theoplayer-icon-color,#fff))}.theoplayer-loading-gap-patch{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;left:47.5%;overflow:hidden;position:absolute;top:0;width:5%}.theoplayer-loading-gap-patch svg{left:-900%;-webkit-transform:rotate(180deg);transform:rotate(180deg);width:2000%}.theoplayer-loading-circle-clipper{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:100%;overflow:hidden;position:relative;width:50%}.theoplayer-loading-circle-clipper svg{width:200%}.theoplayer-loading-circle-right svg{left:-100%}.theoplayer-loading-progress{-webkit-animation:theoplayer-circular-progress-container-rotate 1568ms linear infinite;animation:theoplayer-circular-progress-container-rotate 1568ms linear infinite}.theoplayer-loading-spinner{-webkit-animation:theoplayer-circular-progress-spinner-layer-rotate 5333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-spinner-layer-rotate 5333ms cubic-bezier(.4,0,.2,1) infinite both}.theoplayer-loading-circle-left svg{-webkit-animation:theoplayer-circular-progress-left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}.theoplayer-loading-circle-right svg{-webkit-animation:theoplayer-circular-progress-right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}@-webkit-keyframes theoplayer-circular-progress-container-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes theoplayer-circular-progress-container-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes theoplayer-circular-progress-spinner-layer-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(3turn);transform:rotate(3turn)}}@keyframes theoplayer-circular-progress-spinner-layer-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(3turn);transform:rotate(3turn)}}@-webkit-keyframes theoplayer-circular-progress-left-spin{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}to{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@keyframes theoplayer-circular-progress-left-spin{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}to{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@-webkit-keyframes theoplayer-circular-progress-right-spin{0%{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}50%{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}to{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}}@keyframes theoplayer-circular-progress-right-spin{0%{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}50%{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}to{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}}</style><div part="icon"><slot name="icon"><div aria-hidden="true" class="theoplayer-loading-progress"><div class="theoplayer-loading-spinner"><div class="theoplayer-loading-circle-clipper theoplayer-loading-circle-left"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="4"/></svg></div><div class="theoplayer-loading-gap-patch"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="3.2"/></svg></div><div class="theoplayer-loading-circle-clipper theoplayer-loading-circle-right"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="4"/></svg></div></div></div></slot></div>',p(e9,"theoplayer-loading-indicator");var rt=["readystatechange","play","pause","playing","seeking","seeked"],re=function(e){function r(){var r;return(r=e.call(this)||this)._updateFromPlayer=function(){void 0!==r._player&&!r._player.paused&&(r._player.seeking||r._player.readyState<3)?r.setAttribute(t.Attribute.LOADING,""):r.removeAttribute(t.Attribute.LOADING)},r.attachShadow({mode:"open"}).appendChild(e9.content.cloneNode(!0)),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.connectedCallback=function(){h(this),this._updateFromPlayer()},n.attributeChangedCallback=function(t,e,a){r.observedAttributes.indexOf(t)>=0&&d(this)},_(r,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&this._player.removeEventListener(rt,this._updateFromPlayer),this._player=t,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(rt,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[t.Attribute.LOADING]}}]),r}(H(HTMLElement,["player"]));customElements.define("theoplayer-loading-indicator",re);var rr=document.createElement("template");rr.innerHTML="<style>:host{pointer-events:none!important}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}</style>",p(rr,"theoplayer-gesture-receiver");var ra=function(t){function e(){var e;return(e=t.call(this)||this)._pointerType="",e._onPointerDown=function(t){e._pointerType=t.pointerType},e._onClick=function(t){var r,a=null!=(r=t.pointerType)?r:e._pointerType;"touch"===a?e.handleTap(t):"mouse"===a&&e.handleMouseClick(t)},e.attachShadow({mode:"open"}).appendChild(rr.content.cloneNode(!0)),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){h(this),this.setAttribute("tabindex","-1"),this.setAttribute("aria-hidden","true")},r.handleTap=function(t){},r.handleMouseClick=function(t){if(void 0!==this._player){var e;void 0===this._player.source||null!=(e=this._player.ads)&&e.playing||(this._player.paused?this._player.play():this._player.pause())}},_(e,[{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&(this._player.element.removeEventListener("pointerdown",this._onPointerDown),this._player.element.removeEventListener("click",this._onClick)),this._player=t,void 0!==this._player&&(this._player.element.addEventListener("pointerdown",this._onPointerDown),this._player.element.addEventListener("click",this._onClick)))}}]),e}(H(HTMLElement,["player"]));customElements.define("theoplayer-gesture-receiver",ra);var rn=document.createElement("template");rn.innerHTML=k('<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"><circle cx="12" cy="12" r="7"/></svg>\n</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)}"),p(rn,"theoplayer-live-button");var ro=["play","pause","playing","emptied"],ri=["seeking","seeked","timeupdate","durationchange","emptied"],rl=function(e){function r(){var t;return(t=e.call(this,{template:rn})||this)._updatePaused=function(){t.paused=void 0===t._player||t._player.paused},t._updateLive=function(){t.live=void 0!==t._player&&function(t,e){if(t.duration===1/0){var r=t.seekable;if(r.length>0)return r.end(r.length-1)-t.currentTime<=e}return!1}(t._player,t.liveThreshold)},t._upgradeProperty("paused"),t._upgradeProperty("streamType"),t._upgradeProperty("liveThreshold"),t._upgradeProperty("live"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(t.Attribute.ARIA_LABEL)||this.setAttribute(t.Attribute.ARIA_LABEL,"seek to live")},n.handleClick=function(){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()))},n.attributeChangedCallback=function(a,n,o){e.prototype.attributeChangedCallback.call(this,a,n,o),o!==n&&(a===t.Attribute.LIVE_THRESHOLD&&this._updateLive(),r.observedAttributes.indexOf(a)>=0&&d(this))},_(r,[{key:"paused",get:function(){return this.hasAttribute(t.Attribute.PAUSED)},set:function(e){e?this.setAttribute(t.Attribute.PAUSED,""):this.removeAttribute(t.Attribute.PAUSED)}},{key:"streamType",get:function(){return this.getAttribute(t.Attribute.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(t.Attribute.STREAM_TYPE,e)}},{key:"liveThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(t.Attribute.LIVE_THRESHOLD))?e:10)},set:function(e){e=Number(e),this.setAttribute(t.Attribute.LIVE_THRESHOLD,String(isNaN(e)?0:e))}},{key:"live",get:function(){return this.hasAttribute(t.Attribute.LIVE)},set:function(e){e?this.setAttribute(t.Attribute.LIVE,""):this.removeAttribute(t.Attribute.LIVE)}},{key:"player",get:function(){return this._player},set:function(t){this._player!==t&&(void 0!==this._player&&(this._player.removeEventListener(ro,this._updatePaused),this._player.removeEventListener(ri,this._updateLive)),this._player=t,this._updatePaused(),this._updateLive(),void 0!==this._player&&(this._player.addEventListener(ro,this._updatePaused),this._player.addEventListener(ri,this._updateLive)))}}],[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes,[t.Attribute.STREAM_TYPE,t.Attribute.LIVE,t.Attribute.PAUSED,t.Attribute.LIVE_THRESHOLD])}}]),r}(H(w,["player","streamType"]));customElements.define("theoplayer-live-button",rl);var rs=document.createElement("template");rs.innerHTML="<style>"+X+"\n: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>",p(rs,"theoplayer-ad-display");var ru=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"],rp=function(t){function e(){(e=t.call(this)||this)._updateFromPlayer=function(){var t,r,a,n=null==(t=e._player)?void 0:t.ads,o=(null!=(a=null==n?void 0:null==(r=n.currentAdBreak)?void 0:r.ads)?a:[]).filter(eV);if(void 0===n||!n.playing||0===o.length){q(e._spanEl,""),e.style.display="none";return}if(o.length>1){var i=I(e._player.ads.currentAds||[],eV);if(i){var l=o.indexOf(i);if(l>=0){q(e._spanEl,"Ad "+(l+1)+" of "+o.length),e.style.display="";return}}}q(e._spanEl,"Ad"),e.style.display=""};var e,r=e.attachShadow({mode:"open"});return r.appendChild(rs.content.cloneNode(!0)),e._spanEl=r.querySelector("span"),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){h(this),this._updateFromPlayer()},_(e,[{key:"player",get:function(){return this._player},set:function(t){var e,r;this._player!==t&&(void 0!==this._player&&(null==(e=this._player.ads)||e.removeEventListener(ru,this._updateFromPlayer)),this._player=t,this._updateFromPlayer(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(ru,this._updateFromPlayer)))}}]),e}(H(HTMLElement,["player"]));customElements.define("theoplayer-ad-display",rp);var rh=document.createElement("template");rh.innerHTML="<style>"+X+"\n:host{pointer-events:none}</style><span></span>",p(rh,"theoplayer-ad-countdown");var rd=["adbreakbegin","adbreakend","adbreakchange","updateadbreak"],rc=function(t){function e(){(e=t.call(this)||this)._onAdChange=function(){var t,r,a;(null==(r=e._player)?void 0:null==(t=r.ads)?void 0:t.playing)?(e._player.removeEventListener("timeupdate",e._update),e._player.addEventListener("timeupdate",e._update)):null==(a=e._player)||a.removeEventListener("timeupdate",e._update),e._update()},e._update=function(){var t,r,a=null==(t=e._player)?void 0:t.ads,n=null==a?void 0:null==(r=a.currentAdBreak)?void 0:r.maxRemainingDuration;if(void 0===a||!a.playing||void 0===n||n<0){q(e._spanEl,""),e.style.display="none";return}n=Math.ceil(n),q(e._spanEl,"Content will resume in "+n+"s"),e.style.display=""};var e,r=e.attachShadow({mode:"open"});return r.appendChild(rh.content.cloneNode(!0)),e._spanEl=r.querySelector("span"),e._upgradeProperty("player"),e}a(e,t);var r=e.prototype;return r._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},r.connectedCallback=function(){h(this),this._update()},_(e,[{key:"player",get:function(){return this._player},set:function(t){var e,r;this._player!==t&&(void 0!==this._player&&(this._player.removeEventListener("timeupdate",this._update),null==(e=this._player.ads)||e.removeEventListener(rd,this._onAdChange)),this._player=t,this._onAdChange(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(rd,this._onAdChange)))}}]),e}(H(HTMLElement,["player"]));customElements.define("theoplayer-ad-countdown",rc);var ry=document.createElement("template");ry.innerHTML=E("<slot>Visit Advertiser</slot>"),p(ry,"theoplayer-ad-clickthrough-button");var rb=["adbegin","adend","adloaded","updatead","adskip"],rm=function(e){function r(){var t;return(t=e.call(this,{template:ry})||this)._updateFromPlayer=function(){var e,r,a=null==(e=t._player)?void 0:e.ads;if(!a||!a.playing){t.clickThrough=null;return}var n=I(null!=(r=a.currentAds)?r:[],eV);if(void 0===n||"google-ima"===n.integration){t.clickThrough=null;return}var o=n.clickThrough;if(!o){t.clickThrough=null;return}t.clickThrough=o},t.disabled=!0,t.style.display="none",t._upgradeProperty("clickThrough"),t._upgradeProperty("player"),t}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer()},n.attributeChangedCallback=function(a,n,o){if(e.prototype.attributeChangedCallback.call(this,a,n,o),a===t.Attribute.CLICKTHROUGH&&o!==n){var i=null!=o,l=o?String(o).trim():"#";this.setLink(l,"_blank"),this.disabled=!i,i?this.style.display="":this.style.display="none"}r.observedAttributes.indexOf(a)>=0&&d(this)},n.handleClick=function(){var t;null==(t=this._player)||t.pause()},_(r,[{key:"clickThrough",get:function(){return this.getAttribute(t.Attribute.CLICKTHROUGH)},set:function(e){null==e?this.removeAttribute(t.Attribute.CLICKTHROUGH):this.setAttribute(t.Attribute.CLICKTHROUGH,e)}},{key:"player",get:function(){return this._player},set:function(t){var e,r;this._player!==t&&(void 0!==this._player&&(null==(e=this._player.ads)||e.removeEventListener(rb,this._updateFromPlayer)),this._player=t,this._updateFromPlayer(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(rb,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return[].concat(T.observedAttributes,[t.Attribute.CLICKTHROUGH])}}]),r}(H(T,["player"]));customElements.define("theoplayer-ad-clickthrough-button",rm);var rv=document.createElement("template");rv.innerHTML=k('<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>\n</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)}: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=skip]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}[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))}"),p(rv,"theoplayer-ad-skip-button");var rf=["adbegin","adend","adloaded","updatead","adskip"],rg=function(e){function r(){var r;return(r=e.call(this,{template:rv})||this)._onAdChange=function(){var t,e,a;(null==(e=r._player)?void 0:null==(t=e.ads)?void 0:t.playing)?(r._player.removeEventListener("timeupdate",r._update),r._player.addEventListener("timeupdate",r._update)):null==(a=r._player)||a.removeEventListener("timeupdate",r._update),r._update()},r._update=function(){var e,a,n=null==(e=r._player)?void 0:e.ads;if(!n||!n.playing){r.style.display="none";return}var o=I(null!=(a=n.currentAds)?a:[],eV);if(void 0===o||"google-ima"===o.integration){r.style.display="none";return}var i=o.skipOffset;if(void 0===i||i<0||void 0!==o.duration&&i>=o.duration){r.style.display="none";return}var l=r._player.currentTime;l<i?(q(r._countdownEl,"Skip in "+Math.ceil(i-l)+"s"),r._countdownEl.style.display="",r._skipEl.style.display="none",r.style.display="",r.setAttribute(t.Attribute.DISABLED,""),r.setAttribute(t.Attribute.ARIA_LIVE,"off")):(r._countdownEl.style.display="none",r._skipEl.style.display="",r.style.display="",r.removeAttribute(t.Attribute.DISABLED),r.setAttribute(t.Attribute.ARIA_LIVE,"polite"))},r._countdownEl=r.shadowRoot.querySelector('[part="countdown"]'),r._skipEl=r.shadowRoot.querySelector('[part="skip"]'),r._upgradeProperty("player"),r}a(r,e);var n=r.prototype;return n.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._update()},n.handleClick=function(){var t,e;null==(e=this._player)||null==(t=e.ads)||t.skip()},n.attributeChangedCallback=function(t,a,n){e.prototype.attributeChangedCallback.call(this,t,a,n),r.observedAttributes.indexOf(t)>=0&&d(this)},_(r,[{key:"player",get:function(){return this._player},set:function(t){var e,r;this._player!==t&&(void 0!==this._player&&(this._player.removeEventListener("timeupdate",this._update),null==(e=this._player.ads)||e.removeEventListener(rf,this._onAdChange)),this._player=t,this._onAdChange(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(rf,this._onAdChange)))}}],[{key:"observedAttributes",get:function(){return[].concat(w.observedAttributes)}}]),r}(H(w,["player"]));customElements.define("theoplayer-ad-skip-button",rg),t.ExtensionSlot=void 0,(m=t.ExtensionSlot||(t.ExtensionSlot={})).TopControlBar="top-control-bar",m.BottomControlBar="bottom-control-bar",m.Menu="menu";var r_=[];function rk(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var rA=function(){if(document)for(var t,e=s([["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"]]);!(t=e()).done;){var r=t.value;if(r[1]in document)return{requestFullscreen_:r[0],exitFullscreen_:r[1],fullscreenElement_:r[2],fullscreenEnabled_:r[3],fullscreenchange_:r[4],fullscreenerror_:r[5]}}}();function rw(){if("object"!=typeof navigator)return!1;if(navigator.userAgentData)return navigator.userAgentData.mobile;var t=navigator.userAgent;return!!t&&/Android|iPhone|iPad|iPod|Mobile Safari|Windows Phone/i.test(t)}var rE=function(){function t(t,e,r,a){this.x=t,this.y=e,this.width=r,this.height=a}var e=t.prototype;return e.overlaps=function(t){return this.x<t.right&&this.right>t.x&&this.y<t.bottom&&this.bottom>t.y},e.contains=function(t){return this.x<=t.x&&t.right<=this.right&&this.y<=t.y&&t.bottom<=this.bottom},e.union=function(e){var r=Math.min(this.x,e.x),a=Math.min(this.y,e.y),n=Math.max(this.right,e.right)-r,o=Math.max(this.bottom,e.bottom)-a;return new t(r,a,n,o)},e.clone=function(){return new t(this.x,this.y,this.width,this.height)},e.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,left:this.left,right:this.right,top:this.top,bottom:this.bottom}},t.fromRect=function(e){var r,a,n,o,i,l;return new t(null!=(a=null!=(r=e.left)?r:e.x)?a:0,null!=(o=null!=(n=e.top)?n:e.y)?o:0,null!=(i=e.width)?i:0,null!=(l=e.height)?l:0)},_(t,[{key:"left",get:function(){return this.x},set:function(t){this.x=t}},{key:"right",get:function(){return this.x+this.width},set:function(t){this.x=t-this.width}},{key:"top",get:function(){return this.y},set:function(t){this.y=t}},{key:"bottom",get:function(){return this.y+this.height},set:function(t){this.y=t-this.height}}]),t}(),rx="theoplayerstreamtypechange",rT=document.createElement("template");rT.innerHTML='<style>:host{background:#000;background:var(--theoplayer-background,#000);-webkit-box-sizing:border-box;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(:-ms-fullscreen){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:-webkit-box;display:-ms-flexbox;display:flex}[part~=chrome],[part~=gesture-layer],[part~=vertical-layer]{pointer-events:none}[part~=chrome] ::slotted(*){pointer-events:auto}[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]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-ms-flex-flow:column nowrap;flex-flow:column nowrap}[part~=centered]{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;justify-content:center}[part~=middle]{-webkit-box-flex:1;-ms-flex-positive:1;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])) [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]{-ms-grid-column-align:stretch;background:rgba(0,0,0,.5);background:var(--theoplayer-menu-backdrop-background,rgba(0,0,0,.5));display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:stretch}[part=menu] ::slotted(*){-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-ms-grid-column-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;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]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;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]{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]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;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]{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;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){-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch}theoplayer-gesture-receiver{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}:host(:not([mobile])) [part~=chrome] ::slotted([mobile-only]),:host([mobile]) [part~=chrome] ::slotted([mobile-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;-webkit-transition:opacity 1s;transition:opacity 1s}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])) [part~=vertical-layer]:before{opacity:0;-webkit-transition:opacity 1s;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>',p(rT,"theoplayer-ui");var rC=function(r){function n(e){void 0===e&&(e={}),(a=r.call(this)||this)._configuration={},a._pointerType="",a._lastPointerUpTime=0,a._stateReceivers=[],a._player=void 0,a._source=void 0,a._userIdleTimer=0,a._previewTime=NaN,a._activeVideoTrack=void 0,a._onMutation=function(t){for(var e,r=s(t);!(e=r()).done;){var n=e.value;if("childList"===n.type){for(var o=n.addedNodes,i=n.removedNodes,l=0;l<o.length;l++){var u=o[l];S(u)&&U(u,a._playerEl,a.registerStateReceiver_)}for(var p=0;p<i.length;p++){var h=i[p];S(h)&&U(h,a._playerEl,a.unregisterStateReceiver_)}}}},a._onSlotChange=function(){U(rk(a),a._playerEl,a.registerStateReceiver_),a._updateTextTrackMargins()},a.registerStateReceiver_=function(t){a._stateReceivers.indexOf(t)>=0||(a._stateReceivers.push(t),a.propagateStateToReceiver_(t))},a.unregisterStateReceiver_=function(t){var e,r;!((r=(e=a._stateReceivers).indexOf(t))<0)&&(function(t,e){t.splice(e,1)}(e,r),1)&&a.removeStateFromReceiver_(t)},a._onToggleMenu=function(t){t.stopPropagation();var e=t.detail.menu;if(!a._menuGroup.getMenuById(e)){console.error('<theoplayer-ui>: cannot find menu with ID "'+e+'"');return}var r=P(t.target)?t.target:void 0;a._menuGroup.isMenuOpen(e)?a.closeMenu_():(a.closeMenu_(),a.openMenu_(e,r))},a._onCloseMenu=function(t){t.stopPropagation(),a.closeMenu_()},a._onMenuChange=function(){a._menuEl.removeEventListener("pointerdown",a._onMenuPointerDown),a._menuEl.removeEventListener("click",a._onMenuClick),a._menuGroup.hasCurrentMenu()?(a._menuEl.addEventListener("pointerdown",a._onMenuPointerDown),a._menuEl.addEventListener("click",a._onMenuClick),a.setAttribute(t.Attribute.MENU_OPENED,"")):a.removeAttribute(t.Attribute.MENU_OPENED)},a._onMenuPointerDown=function(t){a._pointerType=t.pointerType},a._onMenuClick=function(t){var e,r=null!=(e=t.pointerType)?e:a._pointerType;t.target===a._menuEl&&"mouse"===r&&a._menuGroup.closeCurrentMenu()&&t.preventDefault()},a._onEnterFullscreen=function(t){if(t.stopPropagation(),rA&&document[rA.fullscreenEnabled_]&&a[rA.requestFullscreen_]){var e=a[rA.requestFullscreen_]();e&&e.then&&e.then(L,L)}else a._player&&a._player.presentation.supportsMode("fullscreen")&&a._player.presentation.requestMode("fullscreen")},a._onExitFullscreen=function(t){if(t.stopPropagation(),rA){var e=document[rA.exitFullscreen_]();e&&e.then&&e.then(L,L)}a._player&&"fullscreen"===a._player.presentation.currentMode&&a._player.presentation.requestMode("inline")},a._onFullscreenChange=function(){var e=!1;if(void 0!==rA){var r=document[rA.fullscreenElement_];r&&(e=function t(e,r){if(!e||!r)return!1;if(e.contains(r))return!0;var a=r.getRootNode();return!!a.host&&t(e,a.host)}(r,rk(a)))}e||void 0===a._player||"fullscreen"!==a._player.presentation.currentMode||(e=!0),e?a.setAttribute(t.Attribute.FULLSCREEN,""):a.removeAttribute(t.Attribute.FULLSCREEN)},a._updateAspectRatio=function(){if(void 0!==a._player){var t=a._player,e=t.videoWidth,r=t.videoHeight;e>0&&r>0?d(rk(a),{"--theoplayer-video-width":""+e,"--theoplayer-video-height":""+r}):d(rk(a),{"--theoplayer-video-width":"","--theoplayer-video-height":""})}},a._updateError=function(){var e=null==(r=a._player)?void 0:r.errorObject;e?a.setAttribute(t.Attribute.HAS_ERROR,""):a.removeAttribute(t.Attribute.HAS_ERROR);for(var r,n,o=s(a._stateReceivers);!(n=o()).done;){var i=n.value;i[F].indexOf("error")>=0&&(i.error=e)}},a._onPlay=function(){a.setAttribute(t.Attribute.HAS_FIRST_PLAY,""),a.removeAttribute(t.Attribute.PAUSED),a._updateEnded()},a._onPause=function(){a.setAttribute(t.Attribute.PAUSED,""),a._updateEnded()},a._updatePausedAndEnded=function(){!a._player||a._player.paused?a.setAttribute(t.Attribute.PAUSED,""):a.removeAttribute(t.Attribute.PAUSED),a._updateEnded()},a._updateEnded=function(){a._player&&a._player.ended?a.setAttribute(t.Attribute.ENDED,""):a.removeAttribute(t.Attribute.ENDED)},a._updateStreamType=function(){if(void 0!==a._player){var t,e=a._player.duration;if(!isNaN(e)){if(e===1/0){t="live";var r=a.dvrThreshold,n=a._player.seekable;(r<=0||n.length>0&&n.end(n.length-1)-n.start(0)>=r)&&(t="dvr")}else t="vod";a.streamType=t}}},a._updatePlaybackRate=function(){if(void 0!==a._player)for(var t,e=a._player.playbackRate,r=s(a._stateReceivers);!(t=r()).done;){var n=t.value;n[F].indexOf("playbackRate")>=0&&(n.playbackRate=e)}},a._updateMuted=function(){void 0!==a._player&&(a.muted=a._player.muted)},a._updateActiveVideoTrack=function(){if(void 0!==a._player){var t,e,r,n,o=I(a._player.videoTracks,function(t){return t.enabled});a._activeVideoTrack!==o&&(null==(t=a._activeVideoTrack)||t.removeEventListener("activequalitychanged",a._updateActiveVideoQuality),null==(e=a._activeVideoTrack)||e.removeEventListener("targetqualitychanged",a._updateTargetVideoQualities),a._activeVideoTrack=o,a._updateActiveVideoQuality(),a._updateTargetVideoQualities(),null==(r=a._activeVideoTrack)||r.addEventListener("activequalitychanged",a._updateActiveVideoQuality),null==(n=a._activeVideoTrack)||n.addEventListener("targetqualitychanged",a._updateTargetVideoQualities))}},a._updateActiveVideoQuality=function(){for(var t,e,r=null==(t=a._activeVideoTrack)?void 0:t.activeQuality,n=s(a._stateReceivers);!(e=n()).done;){var o=e.value;o[F].indexOf("activeVideoQuality")>=0&&(o.activeVideoQuality=r)}},a._updateTargetVideoQualities=function(){for(var t,e=tB(a._activeVideoTrack),r=s(a._stateReceivers);!(t=r()).done;){var n=t.value;n[F].indexOf("targetVideoQualities")>=0&&(n.targetVideoQualities=e)}},a._updateCasting=function(){var e,r,n;null!=(n=null==(r=a._player)?void 0:null==(e=r.cast)?void 0:e.casting)&&n?a.setAttribute(t.Attribute.CASTING,""):a.removeAttribute(t.Attribute.CASTING)},a._updatePlayingAd=function(){var e,r,n;null!=(n=null==(r=a._player)?void 0:null==(e=r.ads)?void 0:e.playing)&&n?a.setAttribute(t.Attribute.PLAYING_AD,""):a.removeAttribute(t.Attribute.PLAYING_AD)},a._onSourceChange=function(){a.closeMenu_(),void 0===a._player||a._player.paused?a.removeAttribute(t.Attribute.HAS_FIRST_PLAY):a.setAttribute(t.Attribute.HAS_FIRST_PLAY,"")},a.setUserIdle_=function(){clearTimeout(a._userIdleTimer),a._userIdleTimer=0,a.userIdleTimeout<0||a.setAttribute(t.Attribute.USER_IDLE,"")},a.scheduleUserIdle_=function(){if(a.setUserActive_(),clearTimeout(a._userIdleTimer),a.userIdleTimeout<0){a._userIdleTimer=0;return}a._userIdleTimer=setTimeout(a.setUserIdle_,1e3*a.userIdleTimeout)},a._onKeyUp=function(){a.scheduleUserIdle_()},a._onPointerUp=function(e){"touch"===e.pointerType&&(a.isPlayerOrMedia_(e.target)&&!a.hasAttribute(t.Attribute.USER_IDLE)?a.setUserIdle_():(a.isUserIdle_()&&(a._lastPointerUpTime=performance.now(),a.addEventListener("click",a._onClickAfterPointerUp,!0)),a.scheduleUserIdle_()))},a._onClickAfterPointerUp=function(t){a.removeEventListener("click",a._onClickAfterPointerUp,!0),performance.now()-a._lastPointerUpTime<10&&(t.preventDefault(),t.stopPropagation())},a._onPointerMove=function(t){"mouse"===t.pointerType&&(a.setUserActive_(),a.isPlayerOrMedia_(t.target)&&a.scheduleUserIdle_())},a._onMouseLeave=function(){a.setUserIdle_()},a._onChromeSlotTransition=function(t){"opacity"===t.propertyName&&a._updateTextTrackMargins()},a._updateTextTrackMargins=function(){var t=a._player;if(void 0!==t){var e=rL(a._topChromeSlot),r=rL(a._bottomChromeSlot);t.textTrackStyle.marginTop=null==e?void 0:e.height,t.textTrackStyle.marginBottom=null==r?void 0:r.height}},a._onPreviewTimeChange=function(t){a._previewTime=t.detail.previewTime;for(var e,r=s(a._stateReceivers);!(e=r()).done;){var n=e.value;n[F].indexOf("previewTime")>=0&&(n.previewTime=a._previewTime)}};var a,n=a.attachShadow({mode:"open",delegatesFocus:!0});return n.appendChild(rT.content.cloneNode(!0)),a._configuration=e,a._playerEl=n.querySelector('[part~="media-layer"]'),a._menuEl=n.querySelector('[part~="menu-layer"]'),a._menuGroup=n.querySelector("theoplayer-menu-group"),a._topChromeEl=n.querySelector('[part~="top"]'),a._topChromeSlot=n.querySelector('slot[name="top-chrome"]'),a._bottomChromeEl=n.querySelector('[part~="bottom"]'),a._bottomChromeSlot=n.querySelector("slot:not([name])"),a._mutationObserver=new MutationObserver(a._onMutation),"undefined"!=typeof ResizeObserver&&(a._resizeObserver=new ResizeObserver(a._updateTextTrackMargins)),n.addEventListener(tA,a._onToggleMenu),n.addEventListener(eL,a._onEnterFullscreen),n.addEventListener(eS,a._onExitFullscreen),n.addEventListener(eD,a._onPreviewTimeChange),a._topChromeSlot.addEventListener("transitionstart",a._onChromeSlotTransition),a._topChromeSlot.addEventListener("transitionend",a._onChromeSlotTransition),a._bottomChromeSlot.addEventListener("transitionstart",a._onChromeSlotTransition),a._bottomChromeSlot.addEventListener("transitionend",a._onChromeSlotTransition),a._upgradeProperty("configuration"),a._upgradeProperty("source"),a._upgradeProperty("muted"),a._upgradeProperty("autoplay"),a._upgradeProperty("userIdleTimeout"),a._upgradeProperty("streamType"),a.tryInitializePlayer_(),a}a(n,r);var o=n.prototype;return o._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},o._setConfiguration=function(t){this._configuration=null!=t?t:{},this.tryInitializePlayer_()},o._setSource=function(t){this._player?this._player.source=t:this._source=t},o.connectedCallback=function(){h(this),!this.hasAttribute(t.Attribute.MOBILE)&&rw()&&this.setAttribute(t.Attribute.MOBILE,""),this.hasAttribute(t.Attribute.PAUSED)||this.setAttribute(t.Attribute.PAUSED,""),this.tryInitializePlayer_();for(var e,r,a=s(this._stateReceivers);!(r=a()).done;){var n=r.value;this.propagateStateToReceiver_(n)}U(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(tv,this._onCloseMenu),this._menuGroup.addEventListener(tf,this._onMenuChange),void 0!==rA&&(document.addEventListener(rA.fullscreenchange_,this._onFullscreenChange),document.addEventListener(rA.fullscreenerror_,this._onFullscreenChange),this._onFullscreenChange()),this.setUserIdle_(),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointermove",this._onPointerMove),this.addEventListener("mouseleave",this._onMouseLeave)},o.tryInitializePlayer_=function(){if(void 0===this._player&&(void 0!==this._configuration.license||void 0!==this._configuration.licenseUrl)){this._player=new e.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;for(var t,r,a,n=s(this._stateReceivers);!(a=n()).done;){var o=a.value;o[F].indexOf("player")>=0&&(o.player=this._player)}this._updateAspectRatio(),this._updateError(),this._updatePausedAndEnded(),this._updateCasting(),this._player.addEventListener("resize",this._updateAspectRatio),this._player.addEventListener(["error","sourcechange","emptied"],this._updateError),this._player.addEventListener("volumechange",this._updateMuted),this._player.addEventListener("play",this._onPlay),this._player.addEventListener("pause",this._onPause),this._player.addEventListener(["ended","emptied"],this._updatePausedAndEnded),this._player.addEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),this._player.addEventListener("ratechange",this._updatePlaybackRate),this._player.addEventListener("sourcechange",this._onSourceChange),this._player.videoTracks.addEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(t=this._player.cast)||t.addEventListener("castingchange",this._updateCasting),this._player.addEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd),null==(r=this._player.ads)||r.addEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}},o.disconnectedCallback=function(){null==(t=this._resizeObserver)||t.disconnect(),this._mutationObserver.disconnect(),this.shadowRoot.removeEventListener("slotchange",this._onSlotChange);for(var t,e,r=s(this._stateReceivers);!(e=r()).done;){var a=e.value;this.removeStateFromReceiver_(a)}this._stateReceivers.length=0,this._menuGroup.removeEventListener(tv,this._onCloseMenu),this._menuGroup.removeEventListener(tf,this._onMenuChange),void 0!==rA&&(document.removeEventListener(rA.fullscreenchange_,this._onFullscreenChange),document.removeEventListener(rA.fullscreenerror_,this._onFullscreenChange)),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._player.destroy(),this._player=void 0)},o.attributeChangedCallback=function(e,r,a){if(a!==r){var o=null!=a;if(e===t.Attribute.CONFIGURATION)this._setConfiguration(a?JSON.parse(a):{});else if(e===t.Attribute.SOURCE)this._setSource(a?JSON.parse(a):void 0);else if(e===t.Attribute.MUTED)this._player&&(this._player.muted=o);else if(e===t.Attribute.AUTOPLAY)this._player&&(this._player.autoplay=o);else if(e===t.Attribute.FULLSCREEN)for(var i,l=s(this._stateReceivers);!(i=l()).done;){var u=i.value;u[F].indexOf("fullscreen")>=0&&(u.fullscreen=o)}else if(e===t.Attribute.STREAM_TYPE){for(var p,h=s(this._stateReceivers);!(p=h()).done;){var c=p.value;c[F].indexOf("streamType")>=0&&(c.streamType=a)}var y=th(rx,{bubbles:!0,composed:!0,detail:{streamType:a}});this.dispatchEvent(y)}else e===t.Attribute.FLUID?this._updateAspectRatio():e===t.Attribute.USER_IDLE||e===t.Attribute.PAUSED||e===t.Attribute.CASTING?this._updateTextTrackMargins():e===t.Attribute.DVR_THRESHOLD&&this._updateStreamType();n.observedAttributes.indexOf(e)>=0&&d(this)}},o.propagateStateToReceiver_=function(t){var e,r=t[F];r.indexOf("player")>=0&&(t.player=this._player),r.indexOf("fullscreen")>=0&&(t.fullscreen=this.fullscreen),r.indexOf("streamType")>=0&&(t.streamType=this.streamType),void 0!==this._player&&(r.indexOf("playbackRate")>=0&&(t.playbackRate=this._player.playbackRate),r.indexOf("error")>=0&&(t.error=this._player.errorObject),r.indexOf("activeVideoQuality")>=0&&(t.activeVideoQuality=null==(e=this._activeVideoTrack)?void 0:e.activeQuality),r.indexOf("targetVideoQualities")>=0&&(t.targetVideoQualities=tB(this._activeVideoTrack))),r.indexOf("previewTime")>=0&&(t.previewTime=this._previewTime)},o.removeStateFromReceiver_=function(t){t[F].indexOf("player")>=0&&(t.player=void 0)},o.openMenu_=function(t,e){var r=rE.fromRect(this._topChromeEl.getBoundingClientRect()),a=rE.fromRect(this._bottomChromeEl.getBoundingClientRect()),n=!0,o=!0;if(void 0!==e){var i=rE.fromRect(this.getBoundingClientRect()),l=rE.fromRect(e.getBoundingClientRect());i.width>0&&i.height>0&&(n=l.top>=i.top+i.height/2,o=l.left>=i.left+i.width/2)}this._menuGroup.openMenu(t,e),this._menuOpener=e,d(this,{"--theoplayer-menu-offset-top":""+Math.round(r.height)+"px","--theoplayer-menu-offset-bottom":""+Math.round(a.height)+"px","--theoplayer-menu-margin-top":n?"auto":"0","--theoplayer-menu-margin-bottom":n?"0":"auto","--theoplayer-menu-margin-left":o?"auto":"0","--theoplayer-menu-margin-right":o?"0":"auto"})},o.closeMenu_=function(){var t;this._menuGroup.closeMenu(),null==(t=this._menuOpener)||t.focus(),this._menuOpener=void 0},o.isUserIdle_=function(){return this.hasAttribute(t.Attribute.USER_IDLE)&&!this.paused&&!this.casting&&!this._menuGroup.hasCurrentMenu()},o.setUserActive_=function(){clearTimeout(this._userIdleTimer),this.removeAttribute(t.Attribute.USER_IDLE)},o.isPlayerOrMedia_=function(t){return t===this||this._playerEl.contains(t)},_(n,[{key:"player",get:function(){return this._player}},{key:"configuration",get:function(){return this._configuration},set:function(e){this.removeAttribute(t.Attribute.CONFIGURATION),this._setConfiguration(e)}},{key:"source",get:function(){return this._player?this._player.source:this._source},set:function(e){this.removeAttribute(t.Attribute.SOURCE),this._setSource(e)}},{key:"muted",get:function(){return this.hasAttribute(t.Attribute.MUTED)},set:function(e){e?this.setAttribute(t.Attribute.MUTED,""):this.removeAttribute(t.Attribute.MUTED)}},{key:"autoplay",get:function(){return this.hasAttribute(t.Attribute.AUTOPLAY)},set:function(e){e?this.setAttribute(t.Attribute.AUTOPLAY,""):this.removeAttribute(t.Attribute.AUTOPLAY)}},{key:"fullscreen",get:function(){return this.hasAttribute(t.Attribute.FULLSCREEN)}},{key:"paused",get:function(){return this.hasAttribute(t.Attribute.PAUSED)}},{key:"ended",get:function(){return this.hasAttribute(t.Attribute.ENDED)}},{key:"casting",get:function(){return this.hasAttribute(t.Attribute.CASTING)}},{key:"userIdleTimeout",get:function(){var e;return Number(null!=(e=this.getAttribute(t.Attribute.USER_IDLE_TIMEOUT))?e:2)},set:function(e){e=Number(e),this.setAttribute(t.Attribute.USER_IDLE_TIMEOUT,String(isNaN(e)?0:e))}},{key:"streamType",get:function(){return this.getAttribute(t.Attribute.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(t.Attribute.STREAM_TYPE,e)}},{key:"dvrThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(t.Attribute.DVR_THRESHOLD))?e:60)},set:function(e){e=Number(e),this.setAttribute(t.Attribute.DVR_THRESHOLD,String(isNaN(e)?0:e))}}],[{key:"observedAttributes",get:function(){return[t.Attribute.CONFIGURATION,t.Attribute.SOURCE,t.Attribute.MUTED,t.Attribute.AUTOPLAY,t.Attribute.FULLSCREEN,t.Attribute.FLUID,t.Attribute.MOBILE,t.Attribute.PAUSED,t.Attribute.ENDED,t.Attribute.CASTING,t.Attribute.PLAYING_AD,t.Attribute.HAS_ERROR,t.Attribute.HAS_FIRST_PLAY,t.Attribute.STREAM_TYPE,t.Attribute.DVR_THRESHOLD,t.Attribute.USER_IDLE,t.Attribute.USER_IDLE_TIMEOUT]}}]),n}(i(HTMLElement));function rL(t){for(var e,r,a=t.assignedNodes().filter(P),n=s(a);!(r=n()).done;){var o=r.value;if("0"!==getComputedStyle(o).opacity){var i=rE.fromRect(o.getBoundingClientRect());i.width>0&&i.height>0&&(e=e?e.union(i):i)}}return e}customElements.define("theoplayer-ui",rC);var rS=document.createElement("template");rS.innerHTML='<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;position:relative}:host([hidden]){display:none!important}theoplayer-ui{width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:-ms-fullscreen),:host(:-ms-fullscreen) 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;-ms-user-select:none;user-select:none}:host(:not([has-title])) [part=title]{display:none}[part=centered-chrome] *{--theoplayer-control-height:48px}[part=middle-chrome]{-webkit-box-pack:end;-ms-flex-pack:end;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;justify-content:flex-end}[part=bottom-chrome],[part=middle-chrome]{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap;pointer-events:none;position:relative}[part=bottom-chrome]{-webkit-box-align:stretch;-ms-flex-align:stretch;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:-webkit-gradient(linear,left bottom,left top,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:-webkit-gradient(linear,left top,left bottom,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}theoplayer-time-range{--theoplayer-control-height:12px;--theoplayer-range-track-pointer-background:hsla(0,0%,100%,.5)}[part=ad-chrome]{--theoplayer-control-height:12px;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;pointer-events:none}theoplayer-ad-display,theoplayer-ad-skip-button{-ms-flex-negative:0;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{border-right:0!important}theoplayer-ad-skip-button:not([disabled]){--theoplayer-ad-skip-icon-width:24px;--theoplayer-ad-skip-icon-height:24px;font-size:17.5px;font-size:calc(var(--theoplayer-text-font-size, 14px)*1.25);line-height:30px;line-height:calc(var(--theoplayer-text-content-height, var(--theoplayer-control-height, 24px))*1.25)}: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([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-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;-webkit-transition:width .2s ease-in;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: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-ad-clickthrough-button ad-only mobile-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 class="theoplayer-ad-control"></theoplayer-time-range></theoplayer-control-bar><theoplayer-control-bar ad-hidden><theoplayer-play-button mobile-hidden></theoplayer-play-button><theoplayer-mute-button></theoplayer-mute-button><theoplayer-volume-range mobile-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 mobile-hidden ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button mobile-hidden ad-hidden></theoplayer-chromecast-button><slot name="bottom-control-bar"></slot><theoplayer-fullscreen-button></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-language-menu id="language-menu" slot="menu" hidden></theoplayer-language-menu><theoplayer-error-display slot="error"></theoplayer-error-display><slot name="menu" slot="menu"></slot></theoplayer-ui>',p(rS,"theoplayer-default-ui");var rP=function(e){function r(r){void 0===r&&(r={}),(a=e.call(this)||this)._appliedExtensions=!1,a._updateStreamType=function(){a.setAttribute(t.Attribute.STREAM_TYPE,a.streamType),"live"===a.streamType?a._timeRange.setAttribute(t.Attribute.HIDDEN,""):a._timeRange.removeAttribute(t.Attribute.HIDDEN)},a._onTitleSlotChange=function(){a._titleSlot.assignedNodes().length>0?a.setAttribute(t.Attribute.HAS_TITLE,""):a.removeAttribute(t.Attribute.HAS_TITLE)};var a,n=a.attachShadow({mode:"open",delegatesFocus:!0});return n.appendChild(rS.content.cloneNode(!0)),a._ui=n.querySelector("theoplayer-ui"),a._ui.addEventListener(rx,a._updateStreamType),a.setConfiguration_(r),a._titleSlot=n.querySelector('slot[name="title"]'),a._titleSlot.addEventListener("slotchange",a._onTitleSlotChange),a._timeRange=n.querySelector("theoplayer-time-range"),a._upgradeProperty("configuration"),a._upgradeProperty("source"),a._upgradeProperty("muted"),a._upgradeProperty("autoplay"),a._upgradeProperty("streamType"),a._upgradeProperty("userIdleTimeout"),a._upgradeProperty("dvrThreshold"),a}a(r,e);var n=r.prototype;return n._upgradeProperty=function(t){if(this.hasOwnProperty(t)){var e=this[t];delete this[t],this[t]=e}},n.setConfiguration_=function(t){var e;this._ui.configuration=tu({},t,{ads:tu({},null!=(e=t.ads)?e:{},{showCountdown:!1})})},n.connectedCallback=function(){h(this),!this.hasAttribute(t.Attribute.MOBILE)&&rw()&&this.setAttribute(t.Attribute.MOBILE,""),this._appliedExtensions||(this._appliedExtensions=!0,function(t){for(var e,r=s(r_);!(e=r()).done;)(0,e.value)(t)}(this),d(this)),this._onTitleSlotChange()},n.disconnectedCallback=function(){},n.attributeChangedCallback=function(e,a,n){if(n!==a){var o=null!=n;e===t.Attribute.SOURCE?this._ui.source=n?JSON.parse(n):void 0:e===t.Attribute.CONFIGURATION?this.setConfiguration_(n?JSON.parse(n):{}):e===t.Attribute.MUTED?this.muted=o:e===t.Attribute.AUTOPLAY?this.autoplay=o:e===t.Attribute.FLUID?o?this._ui.setAttribute(t.Attribute.FLUID,n):this._ui.removeAttribute(t.Attribute.FLUID):e===t.Attribute.MOBILE?o?this._ui.setAttribute(t.Attribute.MOBILE,n):this._ui.removeAttribute(t.Attribute.MOBILE):e===t.Attribute.STREAM_TYPE?this.streamType=n:e===t.Attribute.USER_IDLE_TIMEOUT?this.userIdleTimeout=Number(n):e===t.Attribute.DVR_THRESHOLD&&(this.dvrThreshold=Number(n)),r.observedAttributes.indexOf(e)>=0&&d(this)}},_(r,[{key:"player",get:function(){return this._ui.player}},{key:"configuration",get:function(){return this._ui.configuration},set:function(e){this.removeAttribute(t.Attribute.CONFIGURATION),this.setConfiguration_(e)}},{key:"source",get:function(){return this._ui.source},set:function(e){this.removeAttribute(t.Attribute.SOURCE),this._ui.source=e}},{key:"muted",get:function(){return this._ui.muted},set:function(t){this._ui.muted=t}},{key:"autoplay",get:function(){return this._ui.autoplay},set:function(t){this._ui.autoplay=t}},{key:"streamType",get:function(){return this._ui.streamType},set:function(t){this._ui.streamType=t}},{key:"userIdleTimeout",get:function(){return this._ui.userIdleTimeout},set:function(t){this._ui.userIdleTimeout=t}},{key:"dvrThreshold",get:function(){return this._ui.dvrThreshold},set:function(t){this._ui.dvrThreshold=t}}],[{key:"observedAttributes",get:function(){return[t.Attribute.CONFIGURATION,t.Attribute.SOURCE,t.Attribute.MUTED,t.Attribute.AUTOPLAY,t.Attribute.FLUID,t.Attribute.MOBILE,t.Attribute.STREAM_TYPE,t.Attribute.USER_IDLE_TIMEOUT,t.Attribute.DVR_THRESHOLD,t.Attribute.HAS_TITLE]}}]),r}(i(HTMLElement));customElements.define("theoplayer-default-ui",rP),t.ActiveQualityDisplay=ey,t.AdClickThroughButton=rm,t.AdCountdown=rc,t.AdDisplay=rp,t.AdSkipButton=rg,t.AirPlayButton=e6,t.Button=w,t.CastButton=e$,t.ChromecastButton=e2,t.ChromecastDisplay=e8,t.CloseMenuButton=tP,t.ColorStops=eR,t.ControlBar=f,t.DefaultUI=rP,t.DurationDisplay=ts,t.ErrorDisplay=eJ,t.FullscreenButton=eM,t.GestureReceiver=ra,t.LanguageMenu=ea,t.LanguageMenuButton=ei,t.LinkButton=T,t.LiveButton=rl,t.LoadingIndicator=re,t.MediaTrackRadioButton=tI,t.Menu=tk,t.MenuButton=tL,t.MenuGroup=tx,t.MuteButton=W,t.PlayButton=Q,t.PlaybackRateDisplay=ec,t.PlaybackRateMenu=ed,t.PlaybackRateMenuButton=ep,t.PlaybackRateRadioGroup=es,t.PreviewThumbnail=eF,t.PreviewTimeDisplay=ez,t.QualityRadioButton=ef,t.QualityRadioGroup=ek,t.RadioButton=tc,t.RadioGroup=tb,t.Range=eO,t.SeekButton=j,t.SettingsMenu=ex,t.SettingsMenuButton=eC,t.StateReceiverMixin=H,t.TextTrackOffRadioButton=tV,t.TextTrackRadioButton=tq,t.TextTrackStyleDisplay=t2,t.TextTrackStyleMenu=et,t.TextTrackStyleRadioGroup=t8,t.TextTrackStyleResetButton=ew,t.TimeDisplay=to,t.TimeRange=eW,t.TrackRadioGroup=tY,t.UIContainer=rC,t.VolumeRange=ej,t.buttonTemplate=k,t.linkButtonTemplate=E,t.menuGroupTemplate=tw,t.menuTemplate=tg,t.rangeTemplate=eI,t.registerExtension=function(t){r_.push(t)}});
|