1/*! For license information please see f2219f22e4ac0dd7d6b78190c101f064861f2105-5113e40d6a6c3842640f.js.LICENSE.txt */ 2"use strict";(self.webpackChunkgatsby_starter_default=self.webpackChunkgatsby_starter_default||[]).push([[832],{5692:function(e,t,n){n.d(t,{Wx:function(){return h}});var i=n(6540),a=Object.defineProperty,r=(e,t,n)=>((e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),s=new Map,o=new WeakMap,l=0,d=void 0;function u(e){return Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{return`${t}_${"root"===t?(n=e.root,n?(o.has(n)||(l+=1,o.set(n,l.toString())),o.get(n)):"0"):e[t]}`;var n}).toString()}function c(e,t,n={},i=d){if(void 0===window.IntersectionObserver&&void 0!==i){const a=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:a,intersectionRect:a,rootBounds:a}),()=>{}}const{id:a,observer:r,elements:o}=function(e){const t=u(e);let n=s.get(t);if(!n){const i=new Map;let a;const r=new IntersectionObserver(t=>{t.forEach(t=>{var n;const r=t.isIntersecting&&a.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=r),null==(n=i.get(t.target))||n.forEach(e=>{e(r,t)})})},e);a=r.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:r,elements:i},s.set(t,n)}return n}(n),l=o.get(e)||[];return o.has(e)||o.set(e,l),l.push(t),r.observe(e),function(){l.splice(l.indexOf(t),1),0===l.length&&(o.delete(e),r.unobserve(e)),0===o.size&&(r.disconnect(),s.delete(a))}}i.Component;function h({threshold:e,delay:t,trackVisibility:n,rootMargin:a,root:r,triggerOnce:s,skip:o,initialInView:l,fallbackInView:d,onChange:u}={}){var h;const[m,p]=i.useState(null),v=i.useRef(u),[b,f]=i.useState({inView:!!l,entry:void 0});v.current=u,i.useEffect(()=>{if(o||!m)return;let i;return i=c(m,(e,t)=>{f({inView:e,entry:t}),v.current&&v.current(e,t),t.isIntersecting&&s&&i&&(i(),i=void 0)},{root:r,rootMargin:a,threshold:e,trackVisibility:n,delay:t},d),()=>{i&&i()}},[Array.isArray(e)?e.toString():e,m,r,a,s,o,n,d,t]);const g=null==(h=b.entry)?void 0:h.target,E=i.useRef(void 0);m||!g||s||o||E.current===g||(E.current=g,f({inView:!!l,entry:void 0}));const y=[p,b.inView,b.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}},9636:function(e,t,n){n.d(t,{l:function(){return G}});var i=n(8601),a=n(6540);var r=n(4942),s=n(6631),o=n(7331),l=n(8104),d=n(6896);const u=(e,t,n)=>{const i=t-e;return((n-e)%i+i)%i+e};var c=n(7795);function h(e,t){return(0,c.h)(e)?e[u(0,e.length,t)]:e}var m=n(1899),p=n(971),v=n(9896);function b(e){return"object"==typeof e&&!Array.isArray(e)}function f(e,t,n,i){return"string"==typeof e&&b(t)?(0,r.KJ)(e,n,i):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function g(e,t,n){return e*(t+1)}function E(e,t,n,i){var a;return"number"==typeof t?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):"<"===t?n:null!==(a=i.get(t))&&void 0!==a?a:e}var y=n(2358),_=n(9713);function A(e,t,n,i,a,r){!function(e,t,n){for(let i=0;i<e.length;i++){const a=e[i];a.at>t&&a.at<n&&((0,y.Ai)(e,a),i--)}}(e,a,r);for(let s=0;s<t.length;s++)e.push({value:t[s],at:(0,_.k)(a,r,i[s]),easing:h(n,s)})}function k(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function w(e,t){return e.at===t.at?null===e.value?1:null===t.value?-1:0:e.at-t.at}const T="easeInOut",I=20;function S(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function C(e,t){return t[e]||(t[e]=[]),t[e]}function R(e){return Array.isArray(e)?e:[e]}function L(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const x=e=>"number"==typeof e,D=e=>e.every(x);var M=n(3379),N=n(5939),O=n(1247),P=n(2159),U=n(3344),W=n(4106),B=n(4373);class H extends B.B{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(function(e,t){return e in t}(t,e)){const n=e[t];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return(0,W.ge)()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}function q(e){const t={presenceContext:null,props:{}
2,visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=(0,O.x)(e)?new P.l(t):new U.M(t);n.mount(e),M.C.set(e,n)}function V(e){const t=new H({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),M.C.set(e,t)}var $=n(2956);function F(e,t,n,i){const a=[];if(function(e,t){return(0,v.S)(e)||"number"==typeof e||"string"==typeof e&&!b(t)}(e,t))a.push((0,$.z)(e,b(t)&&t.default||t,n&&n.default||n));else{const r=f(e,t,i),s=r.length;(0,l.V)(Boolean(s),"No valid elements provided.");for(let e=0;e<s;e++){const i=r[e],o=i instanceof Element?q:V;M.C.has(i)||o(i);const l=M.C.get(i),d={...n};"delay"in d&&"function"==typeof d.delay&&(d.delay=d.delay(e,s)),a.push(...(0,N.$)(l,{...t,transition:d},{}))}}return a}function K(e,t,n){const i=[],a=function(e,{defaultTransition:t={},...n}={},i,a){const s=t.duration||.3,u=new Map,c=new Map,b={},y=new Map;let _=0,x=0,M=0;for(let d=0;d<e.length;d++){const n=e[d];if("string"==typeof n){y.set(n,x);continue}if(!Array.isArray(n)){y.set(n.name,E(x,n.at,_,y));continue}let[u,w,T={}]=n;void 0!==T.at&&(x=E(x,T.at,_,y));let N=0;const O=(e,n,i,d=0,u=0)=>{const c=R(e),{delay:v=0,times:b=(0,m.Z)(c),type:f="keyframes",repeat:E,repeatType:y,repeatDelay:_=0,...w}=n;let{ease:T=t.ease||"easeOut",duration:S}=n;const C="function"==typeof v?v(d,u):v,L=c.length,O=(0,r.WH)(f)?f:null==a?void 0:a[f];if(L<=2&&O){let e=100;if(2===L&&D(c)){const t=c[1]-c[0];e=Math.abs(t)}const t={...w};void 0!==S&&(t.duration=(0,o.f)(S));const n=(0,r.XG)(t,e,O);T=n.ease,S=n.duration}null!=S||(S=s);const P=x+C;1===b.length&&0===b[0]&&(b[1]=1);const U=b.length-c.length;if(U>0&&(0,p.f)(b,U),1===c.length&&c.unshift(null),E){(0,l.V)(E<I,"Repeat count too high, must be less than 20"),S=g(S,E);const e=[...c],t=[...b];T=Array.isArray(T)?[...T]:[T];const n=[...T];for(let i=0;i<E;i++){c.push(...e);for(let a=0;a<e.length;a++)b.push(t[a]+(i+1)),T.push(0===a?"linear":h(n,a-1))}k(b,E)}const W=P+S;A(i,c,T,b,P,W),N=Math.max(C+S,N),M=Math.max(W,M)};if((0,v.S)(u))O(w,T,C("default",S(u,c)));else{const e=f(u,w,i,b),t=e.length;for(let n=0;n<t;n++){const i=S(e[n],c);for(const e in w)O(w[e],L(T,e),C(e,i),n,t)}}_=x,x+=N}return c.forEach((e,i)=>{for(const a in e){const r=e[a];r.sort(w);const s=[],o=[],l=[];for(let e=0;e<r.length;e++){const{at:t,value:n,easing:i}=r[e];s.push(n),o.push((0,d.q)(0,M,t)),l.push(i||"easeOut")}0!==o[0]&&(o.unshift(0),s.unshift(s[0]),l.unshift(T)),1!==o[o.length-1]&&(o.push(1),s.push(null)),u.has(i)||u.set(i,{keyframes:{},transition:{}});const c=u.get(i);c.keyframes[a]=s,c.transition[a]={...t,duration:M,ease:l,times:o,...n}}}),u}(e,t,n,{spring:s.o});return a.forEach(({keyframes:e,transition:t},n)=>{i.push(...F(n,e,t))}),i}function j(e){return function(t,n,i){let a=[];var s;s=t,a=Array.isArray(s)&&s.some(Array.isArray)?K(t,n,e):F(t,n,i,e);const o=new r.P6(a);return e&&e.animations.push(o),o}}j();function G(){const e=(0,i.M)(()=>({current:null,animations:[]})),t=(0,i.M)(()=>j(e));var n;return n=()=>{e.animations.forEach(e=>e.stop())},(0,a.useEffect)(()=>()=>n(),[]),[e,t]}},9726:function(e,t,n){n.d(t,{A:function(){return L_}});var i=n(6540),a=n(5692),r=n(7667),s=Object.create,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,h=function(e,t){return function(){return e&&(t=e(e=0)),t}},m=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},p=function(e,t,n){return n=null!=e?s(u(e)):{},function(e,t,n,i){if(t&&"object"==typeof t||"function"==typeof t)for(var a,r=d(t),s=0,u=r.length;s<u;s++)a=r[s],!c.call(e,a)&&a!==n&&o(e,a,{get:function(e){return t[e]}.bind(null,a),enumerable:!(i=l(t,a))||i.enumerable});return e}(!t&&e&&e.__esModule?n:o(n,"default",{value:e,enumerable:!0}),e)},v=m(function(e,t){var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t.exports=n});function b(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var f=h(function(){}),g=m(function(e,t){f(),function(e,n){"function"==typeof define&&define.amd?define(n):"object"==typeof t&&t.exports?t.exports=n():e.log=n()}(e,function(){var e=function(){},t="undefined",n=("undefined"==typeof window?"undefined":b(window))!==t&&b(window.navigator)!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function a(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(AE){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function r(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(t,n){for(var a=0;a<i.length;a++){var r=i[a];this[r]=a<t?e:this.methodFactory(r,t,n)}this.log=this.debug}function o(e,n,i){return function(){("undefined"==typeof console?"undefined":b(console))!==t&&(s.call(this,n,i),this[e].apply(this,arguments))}}function l(i,s,l){return function(i){return"debug"===i&&(i="log"),("undefined"==typeof console?"undefined":b(console))!==t&&("trace"===i&&n?r:void 0!==console[i]?a(console,i):void 0!==console.log?a(console,"log"):e)}(i)||o.apply(this,arguments)}function d(e,n,a){var r,o=this;
2n=null==n?"WARN":n;var d="loglevel";function u(){var e;if(("undefined"==typeof window?"undefined":b(window))!==t&&d){try{e=window.localStorage[d]}catch(WE){}if((void 0===e?"undefined":b(e))===t)try{var n=window.document.cookie,i=n.indexOf(encodeURIComponent(d)+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i))[1])}catch(WE){}return void 0===o.levels[e]&&(e=void 0),e}}"string"==typeof e?d+=":"+e:"symbol"===(void 0===e?"undefined":b(e))&&(d=void 0),o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=a||l,o.getLevel=function(){return r},o.setLevel=function(n,a){if("string"==typeof n&&void 0!==o.levels[n.toUpperCase()]&&(n=o.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=o.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(r=n,!1!==a&&function(e){var n=(i[e]||"silent").toUpperCase();if(("undefined"==typeof window?"undefined":b(window))!==t&&d){try{return void(window.localStorage[d]=n)}catch($b){}try{window.document.cookie=encodeURIComponent(d)+"="+n+";"}catch($b){}}}(n),s.call(o,n,e),("undefined"==typeof console?"undefined":b(console))===t&&n<o.levels.SILENT)return"No console available for logging"},o.setDefaultLevel=function(e){n=e,u()||o.setLevel(e,!1)},o.resetLevel=function(){o.setLevel(n,!1),function(){if(("undefined"==typeof window?"undefined":b(window))!==t&&d){try{return void window.localStorage.removeItem(d)}catch(NE){}try{window.document.cookie=encodeURIComponent(d)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(NE){}}}()},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)};var c=u();null==c&&(c=n),o.setLevel(c,!1)}var u=new d,c={};u.getLogger=function(e){if("symbol"!==(void 0===e?"undefined":b(e))&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=c[e];return t||(t=c[e]=new d(e,u.getLevel(),u.methodFactory)),t};var h=("undefined"==typeof window?"undefined":b(window))!==t?window.log:void 0;return u.noConflict=function(){return("undefined"==typeof window?"undefined":b(window))!==t&&window.log===u&&(window.log=h),u},u.getLoggers=function(){return c},u.default=u,u})});function E(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):E(e,t)}var y=h(function(){y()}),_=m(function(e){var t=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return null}}function i(e){try{return encodeURIComponent(e)}catch(t){return null}}
2e.stringify=function(e,n){n=n||"";var a,r,s=[];for(r in"string"!=typeof n&&(n="?"),e)if(t.call(e,r)){if(!(a=e[r])&&(null==a||isNaN(a))&&(a=""),r=i(r),a=i(a),null===r||null===a)continue;s.push(r+"="+a)}return s.length?n+s.join("&"):""},e.parse=function(e){for(var t,i=/([^=?#&]+)=?([^&]*)/g,a={};t=i.exec(e);){var r=n(t[1]),s=n(t[2]);null===r||null===s||r in a||(a[r]=s)}return a}}),A=m(function(e,t){!function(n){var i=!1;if("function"==typeof define&&define.amd&&(define(n),i=!0),"object"==typeof e&&(t.exports=n(),i=!0),!i){var a=window.Cookies,r=window.Cookies=n();r.noConflict=function(){return window.Cookies=a,r}}}(function(){var e=function(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var i in n)t[i]=n[i]}return t};return function t(n){function i(t,a,r){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(r=e({path:"/"},i.defaults,r)).expires){var o=new Date;o.setMilliseconds(o.getMilliseconds()+864e5*r.expires),r.expires=o}try{s=JSON.stringify(a),/^[\{\[]/.test(s)&&(a=s)}catch(ln){}return a=n.write?n.write(a,t):encodeURIComponent(String(a)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[t,"=",a,r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("")}t||(s={});for(var l=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<l.length;u++){var c=l[u].split("="),h=c.slice(1).join("=");'"'===h.charAt(0)&&(h=h.slice(1,-1));try{var m=c[0].replace(d,decodeURIComponent);if(h=n.read?n.read(h,m):n(h,m)||h.replace(d,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(ln){}if(t===m){s=h;break}t||(s[m]=h)}catch(ln){}}return s}}return i.set=i,i.get=function(e){return i.call(i,e)},i.getJSON=function(){return i.apply({json:!0},[].slice.call(arguments))},i.defaults={},i.remove=function(t,n){i(t,"",e(n,{expires:-1}))},i.withConverter=t,i}(function(){})})}),k=m(function(e,t){var n=Array.prototype.slice;t.exports=function(e,t){for(("length"in e||(e=[e]),e=n.call(e));e.length;){var i=e.shift(),a=t(i);if(a)return a;i.childNodes&&i.childNodes.length&&(e=n.call(i.childNodes).concat(e))}}}),w=m(function(e,t){function n(e,t){if(!E(this,n))return new n(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}y(),t.exports=n,n.prototype.nodeType=8,n.prototype.nodeName="#comment",n.prototype.toString=function(){return"[object Comment]"}}),T=m(function(e,t){function n(e,t){if(!E(this,n))return new n(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}y(),t.exports=n,n.prototype.type="DOMTextNode",n.prototype.nodeType=3,n.prototype.nodeName="#text",n.prototype.toString=function(){return this.data},n.prototype.replaceData=function(e,t,n){var i=this.data,a=i.substring(0,e),r=i.substring(e+t,i.length);this.data=a+n+r,this.length=this.data.length}}),I=m(function(e,t){t.exports=function(e){var t=this,n=e.type;e.target||(e.target=t),t.listeners||(t.listeners={});var i=t.listeners[n];if(i)return i.forEach(function(n){e.currentTarget=t,"function"==typeof n?n(e):n.handleEvent(e)});t.parentNode&&t.parentNode.dispatchEvent(e)}}),S=m(function(e,t){t.exports=function(e,t){var n=this;n.listeners||(n.listeners={}),n.listeners[e]||(n.listeners[e]=[]),-1===n.listeners[e].indexOf(t)&&n.listeners[e].push(t)}}),C=m(function(e,t){t.exports=function(e,t){var n=this;if(n.listeners&&n.listeners[e]){var i=n.listeners[e],a=i.indexOf(t);-1!==a&&i.splice(a,1)}}}),R=m(function(e,t){f(),t.exports=i;var n=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function i(e){switch(e.nodeType){case 3:return s(e.data);case 8:return"\x3c!--"+e.data+"--\x3e";default:return function(e){var t=[],o=e.tagName;return"http://www.w3.org/1999/xhtml"===e.namespaceURI&&(o=o.toLowerCase()),t.push("<"+o+function(e){var t=[];for(var n in e)a(e,n)&&t.push({name:n,value:e[n]});for(var i in e._attributes)for(var s in e._attributes[i]){var o=e._attributes[i][s],l=(o.prefix?o.prefix+":":"")+s;t.push({name:l,value:o.value})}return e.className&&t.push({name:"class",value:e.className}),t.length?r(t):""}(e)+function(e){var t=e.dataset,n=[];for(var i in t)n.push({name:"data-"+i,value:t[i]});return n.length?r(n):""}(e)),n.indexOf(o)>-1?t.push(" />"):(t.push(">"),e.childNodes.length?t.push.apply(t,e.childNodes.map(i)):e.textContent||e.innerText?t.push(s(e.textContent||e.innerText)):e.innerHTML&&t.push(e.innerHTML),t.push("</"+o+">")),t.join("")}(e)}}function a(e,t){var n=b(e[t]);return"style"===t&&Object.keys(e.style).length>0||e.hasOwnProperty(t)&&("string"===n||"boolean"===n||"number"===n)&&"nodeName"!==t&&"className"!==t&&"tagName"!==t&&"textContent"!==t&&"innerText"!==t&&"namespaceURI"!==t&&"innerHTML"!==t}function r(e){var t=[];return e.forEach(function(e){var n=e.name,i=e.value;"style"===n&&(i=function(e){if("string"==typeof e)return e;var t="";return Object.keys(e).forEach(function(n){var i=e[n];n=n.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}),t+=n+":"+i+";"}),t}(i)),t.push(n+'="'+function(e){return s(e).replace(/"/g,""")}(i)+'"')}),t.length?" "+t.join(" "):""}function s(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}}),L=m(function(e,t){y();var n=k(),i=I(),a=S(),r=C(),s=R(),o="http://www.w3.org/1999/xhtml";function l(e,t,n){if(!E(this,l))return new l(e);var i=void 0===n?o:n||null;
2this.tagName=i===o?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=i,this._attributes={},"INPUT"===this.tagName&&(this.type="text")}t.exports=l,l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e},l.prototype.replaceChild=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var n=this.childNodes.indexOf(t);return t.parentNode=null,this.childNodes[n]=e,e.parentNode=this,t},l.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);return this.childNodes.splice(t,1),e.parentNode=null,e},l.prototype.insertBefore=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var n=null==t?-1:this.childNodes.indexOf(t);return n>-1?this.childNodes.splice(n,0,e):this.childNodes.push(e),e.parentNode=this,e},l.prototype.setAttributeNS=function(e,t,n){var i=null,a=t,r=t.indexOf(":");(r>-1&&(i=t.substr(0,r),a=t.substr(r+1)),"INPUT"===this.tagName&&"type"===t)?this.type=n:(this._attributes[e]||(this._attributes[e]={}))[a]={value:n,prefix:i}},l.prototype.getAttributeNS=function(e,t){var n=this._attributes[e],i=n&&n[t]&&n[t].value;return"INPUT"===this.tagName&&"type"===t?this.type:"string"!=typeof i?null:i},l.prototype.removeAttributeNS=function(e,t){var n=this._attributes[e];n&&delete n[t]},l.prototype.hasAttributeNS=function(e,t){var n=this._attributes[e];return!!n&&t in n},l.prototype.setAttribute=function(e,t){return this.setAttributeNS(null,e,t)},l.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)},l.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)},l.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)},l.prototype.removeEventListener=r,l.prototype.addEventListener=a,l.prototype.dispatchEvent=i,l.prototype.focus=function(){},l.prototype.toString=function(){return s(this)},l.prototype.getElementsByClassName=function(e){var t=e.split(" "),i=[];return n(this,function(e){if(1===e.nodeType){var n=(e.className||"").split(" ");t.every(function(e){return-1!==n.indexOf(e)})&&i.push(e)}}),i},l.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var t=[];return n(this.childNodes,function(n){1===n.nodeType&&("*"===e||n.tagName.toLowerCase()===e)&&t.push(n)}),t},l.prototype.contains=function(e){return n(this,function(t){return e===t})||!1}}),x=m(function(e,t){y();var n=L();function i(e){if(!E(this,i))return new i;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}t.exports=i,i.prototype.type="DocumentFragment",i.prototype.nodeType=11,i.prototype.nodeName="#document-fragment",i.prototype.appendChild=n.prototype.appendChild,i.prototype.replaceChild=n.prototype.replaceChild,i.prototype.removeChild=n.prototype.removeChild,i.prototype.toString=function(){return this.childNodes.map(function(e){return String(e)}).join("")}}),D=m(function(e,t){function n(e){}t.exports=n,n.prototype.initEvent=function(e,t,n){this.type=e,this.bubbles=t,this.cancelable=n},n.prototype.preventDefault=function(){}}),M=m(function(e,t){y();var n=k(),i=w(),a=T(),r=L(),s=x(),o=D(),l=I(),d=S(),u=C();function c(){if(!E(this,c))return new c;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}t.exports=c;var h=c.prototype;h.createTextNode=function(e){return new a(e,this)},h.createElementNS=function(e,t){var n=null===e?null:String(e);return new r(t,this,n)},h.createElement=function(e){return new r(e,this)},h.createDocumentFragment=function(){return new s(this)},h.createEvent=function(e){return new o(e)},h.createComment=function(e){return new i(e,this)},h.getElementById=function(e){e=String(e);var t=n(this.childNodes,function(t){if(String(t.id)===e)return t});return t||null},h.getElementsByClassName=r.prototype.getElementsByClassName,h.getElementsByTagName=r.prototype.getElementsByTagName,h.contains=r.prototype.contains,h.removeEventListener=u,h.addEventListener=d,h.dispatchEvent=l}),N=m(function(e,t){var n=M();t.exports=new n}),O=m(function(e,t){var n,i="undefined"!=typeof global?global:"undefined"!=typeof window?window:{},a=N();"undefined"!=typeof document?n=document:(n=i["__GLOBAL_DOCUMENT_CACHE@4"])||(n=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),t.exports=n});function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,a,r=[],s=!0,o=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);s=!0);}catch(l){o=!0,a=l}finally{try{!s&&null!=n.return&&n.return()}finally{if(o)throw a}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}}
2(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var W=p(v()),B=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},H=function(){return("000000"+(Math.random()*Math.pow(36,6)|0).toString(36)).slice(-6)},q=function(e){if(e&&void 0!==e.nodeName)return e.muxId||(e.muxId=H()),e.muxId;var t;try{t=document.querySelector(e)}catch(I_){}return t&&!t.muxId&&(t.muxId=e),(null==t?void 0:t.muxId)||e},V=function(e){var t;e&&void 0!==e.nodeName?e=q(t=e):t=document.querySelector(e);var n=t&&t.nodeName?t.nodeName.toLowerCase():"";return[t,e,n]},$=p(g()),F=$.default.methodFactory;$.default.methodFactory=function(e,t,n){var i=F(e,t,n);return function(){for(var e=["[mux]"],t=0;t<arguments.length;t++)e.push(arguments[t]);i.apply(void 0,e)}},$.default.setLevel($.default.getLevel());var K=$.default,j=p(v());function G(){return"1"===(j.default.doNotTrack||j.default.navigator&&j.default.navigator.doNotTrack)}var Y=p(v()),Z={now:function(){var e=Y.default.performance,t=e&&e.timing,n=t&&t.navigationStart,i="number"==typeof n&&"function"==typeof e.now?n+e.now():Date.now();return Math.round(i)}},Q=Z;function z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X(e,t){if(!E(e,t))throw new TypeError("Cannot call a class as a function")}function J(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ee(e,t,n){return t&&J(e.prototype,t),n&&J(e,n),e}function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(e,t){return ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ne(e,t)}function ie(e){return(ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ae(e){var t=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(e){return!1}}();return function(){var n,i=ie(e);if(t){var a=ie(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?z(e):t}(this,n)}}y(),f();var re=function(e){return se(e)[0]},se=function(e){if("string"!=typeof e||""===e)return["localhost"];var t,n=(e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return n&&(t=(n.match(/[^\.]+\.[^\.]+$/)||[])[0]),[n,t]},oe=p(v()),le={exists:function(){var e=oe.default.performance;return void 0!==(e&&e.timing)},domContentLoadedEventEnd:function(){var e=oe.default.performance,t=e&&e.timing;return t&&t.domContentLoadedEventEnd},navigationStart:function(){var e=oe.default.performance,t=e&&e.timing;return t&&t.navigationStart}},de=le;function ue(e,t,n){n=void 0===n?1:n,e[t]=e[t]||0,e[t]+=n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){te(e,t,n[t])})}return e}function he(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var me=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],pe=["x-cdn","content-type"].concat(me);function ve(e){var t={};
2return(e=e||"").trim().split(/[\r\n]+/).forEach(function(e){if(e){var n=e.split(": "),i=n.shift();i&&(pe.indexOf(i.toLowerCase())>=0||0===i.toLowerCase().indexOf("x-litix-"))&&(t[i]=n.join(": "))}}),t}function be(e){if(e){var t=me.find(function(t){return void 0!==e[t]});return t?e[t]:void 0}}var fe=function(e){var t={};for(var n in e){var i=e[n];if(-1!==i["DATA-ID"].search("io.litix.data."))t[i["DATA-ID"].replace("io.litix.data.","")]=i.VALUE}return t},ge=function(e){if(!e)return{};var t=de.navigationStart(),n=e.loading,i=n?n.start:e.trequest,a=n?n.first:e.tfirst,r=n?n.end:e.tload;return{bytesLoaded:e.total,requestStart:Math.round(t+i),responseStart:Math.round(t+a),responseEnd:Math.round(t+r)}},Ee=function(e){if(e&&"function"==typeof e.getAllResponseHeaders)return ve(e.getAllResponseHeaders())},ye=function(e,t){if(!e||!e.requestEndDate)return{};var n,i=re(e.url),a=e.url,r=e.bytesLoaded,s=new Date(e.requestStartDate).getTime(),o=new Date(e.firstByteDate).getTime(),l=new Date(e.requestEndDate).getTime(),d=isNaN(e.duration)?0:e.duration,u="function"==typeof t.getMetricsFor?t.getMetricsFor(e.mediaType).HttpList:t.getDashMetrics().getHttpRequests(e.mediaType);return u.length>0&&(n=ve(u[u.length-1]._responseHeaders||"")),{requestStart:s,requestResponseStart:o,requestResponseEnd:l,requestBytesLoaded:r,requestResponseHeaders:n,requestMediaDuration:d,requestHostname:i,requestUrl:a,requestId:n?be(n):void 0}},_e=function(e){var t;return null===(t=e.match(/.*codecs\*?="(.*)"/))||void 0===t?void 0:t[1]},Ae=function(e,t,n){var i=e.log;if(n&&n.on){var a=function(e){try{var t,n,i=null===(n=e.getVersion)||void 0===n||null===(t=n.call(e))||void 0===t?void 0:t.split(".").map(function(e){return parseInt(e)})[0];return i}catch(a){return!1}}(n),r=function(n,i){return e.emit(t,n,i)},s=function(e){var t=e.type,n=(e.data||{}).url;r("requestcompleted",{request_event_type:t,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:re(n),request_url:n})};n.on("manifestLoaded",s);var o={},l=function(e){if("function"!=typeof e.getRequests)return null;var t=e.getRequests({state:"executed"});return 0===t.length?null:t[t.length-1]},d=function(e){var t=e.type,i=e.chunk,a=e.request,s=(i||{}).mediaInfo||{},l=s.type,d=s.bitrateList,u={};(d=d||[]).forEach(function(e,t){u[t]={},u[t].width=e.width,u[t].height=e.height,u[t].bitrate=e.bandwidth,u[t].attrs={}}),"video"===l?o.video=u:"audio"===l?o.audio=u:o.media=u;var c=ye(a,n),h=c.requestStart,m=c.requestResponseStart,p=c.requestResponseEnd,v=c.requestResponseHeaders,b=c.requestMediaDuration,f=c.requestHostname,g=c.requestUrl,E=c.requestId;r("requestcompleted",{request_event_type:t,request_start:h,request_response_start:m,request_response_end:p,request_bytes_loaded:-1,request_type:l+"_init",request_response_headers:v,request_hostname:f,request_id:E,request_url:g,request_media_duration:b,request_rendition_lists:o})};a>=4?n.on("initFragmentLoaded",d):n.on("initFragmentLoaded",function(e){var t=e.type,n=e.fragmentModel,i=e.chunk,a=l(n);d({type:t,request:a,chunk:i})});var u=function(e){var t=e.type,i=e.chunk,a=e.request,s=i||{},o=s.mediaInfo,l=s.start,d=(o||{}).type,u=ye(a,n),c=u.requestStart,h=u.requestResponseStart,m=u.requestResponseEnd,p=u.requestBytesLoaded,v=u.requestResponseHeaders,b=u.requestMediaDuration,f=u.requestHostname,g=u.requestUrl,E=u.requestId,y=function(e,t){var n=t.getQualityFor(e),i=t.getCurrentTrackFor(e).bitrateList;return i?{currentLevel:n,renditionWidth:i[n].width||null,renditionHeight:i[n].height||null,renditionBitrate:i[n].bandwidth}:{}}(d,n),_=y.currentLevel,A=y.renditionWidth,k=y.renditionHeight,w=y.renditionBitrate;r("requestcompleted",{request_event_type:t,request_start:c,request_response_start:h,request_response_end:m,request_bytes_loaded:p,request_type:d,request_response_headers:v,request_hostname:f,request_id:E,request_url:g,request_media_start_time:l,request_media_duration:b,request_current_level:_,request_labeled_bitrate:w,request_video_width:A,request_video_height:k})};a>=4?n.on("mediaFragmentLoaded",u):n.on("mediaFragmentLoaded",function(e){var t=e.type,n=e.fragmentModel,i=e.chunk,a=l(n);u({type:t,request:a,chunk:i})});var c={video:void 0,audio:void 0,totalBitrate:void 0},h=function(e,t,a){if("number"==typeof e.newQuality){var s=e.mediaType;if("audio"===s||"video"===s){var o=n.getBitrateInfoListFor(s).find(function(t){return t.qualityIndex===e.newQuality});if(!o||"number"!=typeof o.bitrate)return void i.warn("missing bitrate info for ".concat(s));c[s]=he(ce({}
vendor: 16,384 bytes, line 2
2,o),{codec:n.getCurrentTrackFor(s).codec});var l=function(){if(c.video&&"number"==typeof c.video.bitrate){if(!c.video.width||!c.video.height)return void i.warn("have bitrate info for video but missing width/height");var e=c.video.bitrate;if(c.audio&&"number"==typeof c.audio.bitrate&&(e+=c.audio.bitrate),e!==c.totalBitrate)return c.totalBitrate=e,{video_source_bitrate:e,video_source_height:c.video.height,video_source_width:c.video.width,video_source_codec:_e(c.video.codec)}}}();l&&r("renditionchange",l)}}else i.warn("missing evt.newQuality in qualityChangeRendered event",e)};n.on("qualityChangeRendered",h);var m=function(e){var t=e.request,n=e.mediaType;r("requestcanceled",{request_event_type:(t=t||{}).type+"_"+t.action,request_url:t.url,request_type:n,request_hostname:re(t.url)})};n.on("fragmentLoadingAbandoned",m);var p=function(e){var t,n,i=e.error,a=(null==i||null===(t=i.data)||void 0===t?void 0:t.request)||{},s=(null==i||null===(n=i.data)||void 0===n?void 0:n.response)||{};27===(null==i?void 0:i.code)&&r("requestfailed",{request_error:a.type+"_"+a.action,request_url:a.url,request_hostname:re(a.url),request_type:a.mediaType,request_error_code:s.status,request_error_text:s.statusText});var o="".concat(null!=a&&a.url?"url: ".concat(a.url,"\n"):"")+"".concat(null!=s&&s.status||null!=s&&s.statusText?"response: ".concat(null==s?void 0:s.status,", ").concat(null==s?void 0:s.statusText,"\n"):"");r("error",{player_error_code:null==i?void 0:i.code,player_error_message:null==i?void 0:i.message,player_error_context:o})};n.on("error",p),n._stopMuxMonitor=function(){n.off("manifestLoaded",s),n.off("initFragmentLoaded",d),n.off("mediaFragmentLoaded",u),n.off("qualityChangeRendered",h),n.off("error",p),n.off("fragmentLoadingAbandoned",m),delete n._stopMuxMonitor}}else i.warn("Invalid dash.js player reference. Monitoring blocked.")},ke=0,we=function(){function e(){X(this,e),te(this,"_listeners",void 0)}return ee(e,[{key:"on",value:function(e,t,n){return t._eventEmitterGuid=t._eventEmitterGuid||++ke,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],n&&(t=t.bind(n)),this._listeners[e].push(t),t}},{key:"off",value:function(e,t){var n=this._listeners&&this._listeners[e];n&&n.forEach(function(e,i){e._eventEmitterGuid===t._eventEmitterGuid&&n.splice(i,1)})}},{key:"one",value:function(e,t,n){var i=this;t._eventEmitterGuid=t._eventEmitterGuid||++ke;var a=function(){i.off(e,a),t.apply(n||this,arguments)};a._eventEmitterGuid=t._eventEmitterGuid,this.on(e,a)}},{key:"emit",value:function(e,t){var n=this;if(this._listeners){t=t||{};var i=this._listeners["before*"]||[],a=this._listeners[e]||[],r=this._listeners["after"+e]||[],s=function(t,i){(t=t.slice()).forEach(function(t){t.call(n,{type:e},i)})};s(i,t),s(a,t),s(r,t)}}}]),e}(),Te=we,Ie=p(v()),Se=function(){function e(t){var n=this;X(this,e),te(this,"_playbackHeartbeatInterval",void 0),te(this,"_playheadShouldBeProgressing",void 0),te(this,"pm",void 0),this.pm=t,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,t.on("playing",function(){n._playheadShouldBeProgressing=!0}),t.on("play",this._startPlaybackHeartbeatInterval.bind(this)),t.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),t.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),t.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("seeked",function(){t.data.player_is_paused?n._stopPlaybackHeartbeatInterval():n._startPlaybackHeartbeatInterval()}),t.on("timeupdate",function(){null!==n._playbackHeartbeatInterval&&t.emit("playbackheartbeat")}),t.on("devicesleep",function(e,i){null!==n._playbackHeartbeatInterval&&(Ie.default.clearInterval(n._playbackHeartbeatInterval),t.emit("playbackheartbeatend",{viewer_time:i.viewer_time}),n._playbackHeartbeatInterval=null)})}return ee(e,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;null===this._playbackHeartbeatInterval&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=Ie.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(Ie.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),e}(),Ce=Se,Re=function e(t){var n=this;X(this,e),te(this,"viewErrored",void 0),t.on("viewinit",function(){n.viewErrored=!1}),t.on("error",function(e,i){try{var a=t.errorTranslator({player_error_code:i.player_error_code,player_error_message:i.player_error_message,player_error_context:i.player_error_context,player_error_severity:i.player_error_severity,player_error_business_exception:i.player_error_business_exception});a&&(t.data.player_error_code=a.player_error_code||i.player_error_code,t.data.player_error_message=a.player_error_message||i.player_error_message,t.data.player_error_context=a.player_error_context||i.player_error_context,t.data.player_error_severity=a.player_error_severity||i.player_error_severity,t.data.player_error_business_exception=a.player_error_business_exception||i.player_error_business_exception,n.viewErrored=!0)}catch(r){t.mux.log.warn("Exception in error translator callback.",r),n.viewErrored=!0}}),t.on("aftererror",function(){var e,n,i,a,r;null===(e=t.data)||void 0===e||delete e.player_error_code,null===(n=t.data)||void 0===n||delete n.player_error_message,null===(i=t.data)||void 0===i||delete i.player_error_context,null===(a=t.data)||void 0===a||delete a.player_error_severity,null===(r=t.data)||void 0===r||delete r.player_error_business_exception})},Le=function(){function e(t){X(this,e),te(this,"_watchTimeTrackerLastCheckedTime",void 0),te(this,"pm",void 0),this.pm=t,this._watchTimeTrackerLastCheckedTime=null,t.on("playbackheartbeat",this._updateWatchTime.bind(this)),t.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return ee(e,[{key:"_updateWatchTime",value:function(e,t){var n=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=n),ue(this.pm.data,"view_watch_time",n-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=n}},{key:"_clearWatchTimeState",value:function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null}}]),e}(),xe=Le,De=function(){function e(t){var n=this;X(this,e),te(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),te(this,"_lastTime",void 0),te(this,"_isAdPlaying",void 0),te(this,"_callbackUpdatePlaybackTime",void 0),te(this,"pm",void 0),this.pm=t,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=Q.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null;var i=this._startPlaybackTimeTracking.bind(this);t.on("playing",i),t.on("adplaying",i),t.on("seeked",i);var a=this._stopPlaybackTimeTracking.bind(this);t.on("playbackheartbeatend",a),t.on("seeking",a),t.on("adplaying",function(){n._isAdPlaying=!0}),t.on("adended",function(){n._isAdPlaying=!1}),t.on("adpause",function(){n._isAdPlaying=!1}),t.on("adbreakstart",function(){n._isAdPlaying=!1}),t.on("adbreakend",function(){n._isAdPlaying=!1}),t.on("adplay",function(){n._isAdPlaying=!1}),t.on("viewinit",function(){n._playbackTimeTrackerLastPlayheadPosition=-1,n._lastTime=Q.now(),n._isAdPlaying=!1,n._callbackUpdatePlaybackTime=null})}return ee(e,[{key:"_startPlaybackTimeTracking",value:function(){null===this._callbackUpdatePlaybackTime&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time,t=Q.now(),n=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?n=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(n=t-this._lastTime),n>0&&n<=1e3&&ue(this.pm.data,"view_content_playback_time",n),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=t}}]),e}(),Me=De,Ne=function(){function e(t){X(this,e),te(this,"pm",void 0),this.pm=t;var n=this._updatePlayheadTime.bind(this);t.on("playbackheartbeat",n),t.on("playbackheartbeatend",n),t.on("timeupdate",n),t.on("destroy",function(){t.off("timeupdate",n)})}return ee(e,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=void 0===this.pm.data.view_max_playhead_position?this.pm.data.player_playhead_time:Math.max(this.pm.data.view_max_playhead_position,this.pm.data.player_playhead_time)}},{key:"_updatePlayheadTime",value:function(e,t){var n=this,i=function(){n.pm.currentFragmentPDT&&n.pm.currentFragmentStart&&(n.pm.data.player_program_time=n.pm.currentFragmentPDT+n.pm.data.player_playhead_time-n.pm.currentFragmentStart)};if(t&&t.player_playhead_time)this.pm.data.player_playhead_time=t.player_playhead_time,i(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var a=this.pm.getPlayheadTime();void 0!==a&&(this.pm.data.player_playhead_time=a,i(),this._updateMaxPlayheadPosition())}}}]),e}(),Oe=Ne,Pe=3e5,Ue=function e(t){if(X(this,e),!t.disableRebufferTracking){var n,i=function(e,t){a(t),n=void 0},a=function(e){if(n){var i=e.viewer_time-n;ue(t.data,"view_rebuffer_duration",i),n=e.viewer_time,t.data.view_rebuffer_duration>Pe&&(t.emit("viewend"),t.send("viewend"),t.mux.log.warn("Ending view after rebuffering for longer than ".concat(Pe,"ms, future events will be ignored unless a programchange or videochange occurs.")))}t.data.view_watch_time>=0&&t.data.view_rebuffer_count>0&&(t.data.view_rebuffer_frequency=t.data.view_rebuffer_count/t.data.view_watch_time,t.data.view_rebuffer_percentage=t.data.view_rebuffer_duration/t.data.view_watch_time)};t.on("playbackheartbeat",function(e,t){return a(t)}),t.on("rebufferstart",function(e,a){n||(ue(t.data,"view_rebuffer_count",1),n=a.viewer_time,t.one("rebufferend",i))}),t.on("viewinit",function(){n=void 0,t.off("rebufferend",i)})}},We=function(){function e(t){var n=this;X(this,e),te(this,"_lastCheckedTime",void 0),te(this,"_lastPlayheadTime",void 0),te(this,"_lastPlayheadTimeUpdatedTime",void 0),te(this,"_rebuffering",void 0),te(this,"pm",void 0),this.pm=t,!t.disableRebufferTracking&&!t.disablePlayheadRebufferTracking&&(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,t.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),t.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),t.on("seeking",function(){n._cleanupRebufferTracker(null,{viewer_time:Q.now()})}))}return ee(e,[{key:"_checkIfRebuffering",value:function(e,t){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing)this._cleanupRebufferTracker(e,t);else if(null!==this._lastCheckedTime)if(this._lastPlayheadTime===this.pm.data.player_playhead_time){var n=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.sustainedRebufferThreshold&&n>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=t.viewer_time}else this._cleanupRebufferTracker(e,t,!0);else this._prepareRebufferTrackerState(t.viewer_time)}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e}},{key:"_cleanupRebufferTracker",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:t.viewer_time});else{if(null===this._lastCheckedTime)return;var i=this.pm.data.player_playhead_time-this._lastPlayheadTime,a=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.minimumRebufferDuration&&i>0&&a-i>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+a-i}))}n?this._prepareRebufferTrackerState(t.viewer_time):this._clearRebufferTrackerState()}}]),e}(),Be=We,He=function(){function e(t){var n=this;X(this,e),te(this,"NAVIGATION_START",void 0),te(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){var e=t.data,i=e.view_id;if(!e.view_program_changed){var a=function(e,a){var r=a.viewer_time;("playing"===e.type&&void 0===t.data.view_time_to_first_frame||"adplaying"===e.type&&(void 0===t.data.view_time_to_first_frame||n._inPrerollPosition()))&&n.calculateTimeToFirstFrame(r||Q.now(),i)};t.one("playing",a),t.one("adplaying",a),t.one("viewend",function(){t.off("playing",a),t.off("adplaying",a)})}})}return ee(e,[{key:"_inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,t){t===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.NAVIGATION_START&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.NAVIGATION_START))}}]),e}(),qe=He,Ve=function e(t){var n=this;X(this,e),te(this,"_lastPlayerHeight",void 0),te(this,"_lastPlayerWidth",void 0),te(this,"_lastPlayheadPosition",void 0),te(this,"_lastSourceHeight",void 0),te(this,"_lastSourceWidth",void 0),t.on("viewinit",function(){n._lastPlayheadPosition=-1});["pause","rebufferstart","seeking","error","adbreakstart","hb"].forEach(function(e){t.on(e,function(){if(n._lastPlayheadPosition>=0&&t.data.player_playhead_time>=0&&n._lastPlayerWidth>=0&&n._lastSourceWidth>0&&n._lastPlayerHeight>=0&&n._lastSourceHeight>0){var e=t.data.player_playhead_time-n._lastPlayheadPosition;if(e<0)return void(n._lastPlayheadPosition=-1);var i=Math.min(n._lastPlayerWidth/n._lastSourceWidth,n._lastPlayerHeight/n._lastSourceHeight),a=Math.max(0,i-1),r=Math.max(0,1-i);t.data.view_max_upscale_percentage=Math.max(t.data.view_max_upscale_percentage||0,a),t.data.view_max_downscale_percentage=Math.max(t.data.view_max_downscale_percentage||0,r),ue(t.data,"view_total_content_playback_time",e),ue(t.data,"view_total_upscaling",a*e),ue(t.data,"view_total_downscaling",r*e)}n._lastPlayheadPosition=-1})}),["playing","hb"].forEach(function(e){t.on(e,function(){n._lastPlayheadPosition=t.data.player_playhead_time,n._lastPlayerWidth=t.data.player_width,n._lastPlayerHeight=t.data.player_height,n._lastSourceWidth=t.data.video_source_width,n._lastSourceHeight=t.data.video_source_height})})},$e=function e(t){var n=this;X(this,e),te(this,"isSeeking",void 0),this.isSeeking=!1;var i=-1,a=function(){var e=Q.now(),a=(t.data.viewer_time||e)-(i||e);ue(t.data,"view_seek_duration",a),t.data.view_max_seek_time=Math.max(t.data.view_max_seek_time||0,a),n.isSeeking=!1,i=-1};t.on("seeking",function(e,r){Object.assign(t.data,r),n.isSeeking&&r.viewer_time-i<=2e3?i=r.viewer_time:(n.isSeeking&&
2a(),n.isSeeking=!0,i=r.viewer_time,ue(t.data,"view_seek_count",1),t.send("seeking"))}),t.on("seeked",function(){a()}),t.on("viewend",function(){n.isSeeking&&(a(),t.send("seeked")),n.isSeeking=!1,i=-1})},Fe=function(e,t){e.push(t),e.sort(function(e,t){return e.viewer_time-t.viewer_time})},Ke=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],je=function(){function e(t){var n=this;X(this,e),te(this,"_adHasPlayed",void 0),te(this,"_adRequests",void 0),te(this,"_adResponses",void 0),te(this,"_currentAdRequestNumber",void 0),te(this,"_currentAdResponseNumber",void 0),te(this,"_prerollPlayTime",void 0),te(this,"_wouldBeNewAdPlay",void 0),te(this,"isAdBreak",void 0),te(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){n.isAdBreak=!1,n._currentAdRequestNumber=0,n._currentAdResponseNumber=0,n._adRequests=[],n._adResponses=[],n._adHasPlayed=!1,n._wouldBeNewAdPlay=!0,n._prerollPlayTime=void 0}),Ke.forEach(function(e){return t.on(e,n._updateAdData.bind(n))});var i=function(){n.isAdBreak=!1};t.on("adbreakstart",function(){n.isAdBreak=!0}),t.on("play",i),t.on("playing",i),t.on("viewend",i),t.on("adrequest",function(e,i){i=Object.assign({ad_request_id:"generatedAdRequestId"+n._currentAdRequestNumber++},i),Fe(n._adRequests,i),ue(t.data,"view_ad_request_count"),n.inPrerollPosition()&&(t.data.view_preroll_requested=!0,n._adHasPlayed||ue(t.data,"view_preroll_request_count"))}),t.on("adresponse",function(e,i){i=Object.assign({ad_request_id:"generatedAdRequestId"+n._currentAdResponseNumber++},i),Fe(n._adResponses,i);var a=n.findAdRequest(i.ad_request_id);a&&ue(t.data,"view_ad_request_time",Math.max(0,i.viewer_time-a.viewer_time))}),t.on("adplay",function(e,i){n._adHasPlayed=!0,n._wouldBeNewAdPlay&&(n._wouldBeNewAdPlay=!1,ue(t.data,"view_ad_played_count")),n.inPrerollPosition()&&!t.data.view_preroll_played&&(t.data.view_preroll_played=!0,n._adRequests.length>0&&(t.data.view_preroll_request_time=Math.max(0,i.viewer_time-n._adRequests[0].viewer_time)),t.data.view_start&&(t.data.view_startup_preroll_request_time=Math.max(0,i.viewer_time-t.data.view_start)),n._prerollPlayTime=i.viewer_time)}),t.on("adplaying",function(e,i){n.inPrerollPosition()&&void 0===t.data.view_preroll_load_time&&void 0!==n._prerollPlayTime&&(t.data.view_preroll_load_time=i.viewer_time-n._prerollPlayTime,t.data.view_startup_preroll_load_time=i.viewer_time-n._prerollPlayTime)}),t.on("adclicked",function(e,i){n._wouldBeNewAdPlay||ue(t.data,"view_ad_clicked_count")}),t.on("adskipped",function(e,i){n._wouldBeNewAdPlay||ue(t.data,"view_ad_skipped_count")}),t.on("adended",function(){n._wouldBeNewAdPlay=!0}),t.on("aderror",function(){n._wouldBeNewAdPlay=!0})}return ee(e,[{key:"inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var t=0;t<this._adRequests.length;t++)if(this._adRequests[t].ad_request_id===e)return this._adRequests[t]}},{key:"_updateAdData",value:function(e,t){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&t.ad_tag_url){var n=U(se(t.ad_tag_url),2),i=n[0],a=n[1];this.pm.data.view_preroll_ad_tag_domain=a,this.pm.data.view_preroll_ad_tag_hostname=i}if(!this.pm.data.view_preroll_ad_asset_hostname&&t.ad_asset_url){var r=U(se(t.ad_asset_url),2),s=r[0],o=r[1];this.pm.data.view_preroll_ad_asset_domain=o,this.pm.data.view_preroll_ad_asset_hostname=s}}this.pm.data.ad_asset_url=null==t?void 0:t.ad_asset_url,this.pm.data.ad_tag_url=null==t?void 0:t.ad_tag_url,this.pm.data.ad_creative_id=null==t?void 0:t.ad_creative_id,this.pm.data.ad_id=null==t?void 0:t.ad_id,this.pm.data.ad_universal_id=null==t?void 0:t.ad_universal_id}}]),e}(),Ge=je,Ye=p(v()),Ze=function e(t){X(this,e);var n,i,a=function(){t.disableRebufferTracking||n&&(ue(t.data,"view_waiting_rebuffer_duration",Q.now()-n),n=!1,Ye.default.clearInterval(i))},r=!1,s=function(){r=!1,a()};t.on("waiting",function(){r&&(t.disableRebufferTracking||(ue(t.data,"view_waiting_rebuffer_count",1),n=Q.now(),i=Ye.default.setInterval(function(){if(n){var e=Q.now();ue(t.data,"view_waiting_rebuffer_duration",e-n),n=e}},250)))}),t.on("playing",function(){a(),r=!0}),t.on("pause",s),t.on("seeking",s)},Qe=function e(t){var n=this;X(this,e),te(this,"lastWallClockTime",void 0);var i=function(){n.lastWallClockTime=Q.now(),t.on("before*",a)},a=function(e){var i=Q.now(),a=n.lastWallClockTime;n.lastWallClockTime=i,i-a>3e4&&(t.emit("devicesleep",{viewer_time:a}),Object.assign(t.data,{viewer_time:a}),t.send("devicesleep"),t.emit("devicewake",{viewer_time:i}),Object.assign(t.data,{viewer_time:i}),t.send("devicewake"))};t.one("playbackheartbeat",i),t.on("playbackheartbeatend",function(){t.off("before*",a),t.one("playbackheartbeat",i)})},ze=p(v()),Xe=p(_()),Je=p(A()),et="muxData",tt=function(){var e;try{e=Xe.default.parse(Je.default.get(et)||"")}catch(t){e={}}return e},nt=function(e){try{Je.default.set(et,Xe.default.stringify(e),{expires:365})}catch(t){}};var it=p(v()),at=function(){var e;switch(rt()){case"cellular":e="cellular";break;case"ethernet":e="wired";break;case"wifi":e="wifi";break;case void 0:break;default:e="other"}return e},rt=function(){var e=it.default.navigator,t=e&&(e.connection||e.mozConnection||e.webkitConnection);return t&&t.type};at.getConnectionFromAPI=rt;var st=at,ot=dt({a:"env",b:"beacon",c:"custom",d:"ad",e:"event",f:"experiment",i:"internal",m:"mux",n:"response",p:"player",q:"request",r:"retry",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view",y:"sub"}),lt=dt({ad:"ad",ag:"aggregate",ap:"api",al:"application",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ck:"clicked",cl:"canceled",cn:"config",co:"count",ce:"counter",cp:"complete",cr:"creative",ct:"content",cu:"current",cx:"c
2onnection",cz:"context",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pr:"preload",ps:"position",pt:"part",py:"property",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"});function dt(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function ut(e){var t={},n={};return Object.keys(e).forEach(function(i){var a=!1;if(e.hasOwnProperty(i)&&void 0!==e[i]){var r=i.split("_"),s=r[0],o=ot[s];o||(K.info("Data key word `"+r[0]+"` not expected in "+i),o=s+"_"),r.splice(1).forEach(function(e){"url"===e&&(a=!0),lt[e]?o+=lt[e]:Number(e)&&Math.floor(Number(e))===Number(e)?o+=e:(K.info("Data key word `"+e+"` not expected in "+i),o+="_"+e+"_")}),a?n[o]=e[i]:t[o]=e[i]}}),Object.assign(t,n)}var ct=p(v()),ht={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},mt=["hb","requestcompleted","requestfailed","requestcanceled"],pt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._beaconUrl=e||"https://img.litix.io",this._eventQueue=[],this._postInFlight=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},ht,t)};pt.prototype.queueEvent=function(e,t){var n=Object.assign({},t);return(this._eventQueue.length<=this._options.maxQueueLength||"eventrateexceeded"===e)&&(this._eventQueue.push(n),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength)},pt.prototype.flushEvents=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&1===this._eventQueue.length?this._eventQueue.pop():(this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending())},pt.prototype.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,e?this._clearBeaconQueue():this.flushEvents(),ct.default.clearTimeout(this._sendTimeout)},pt.prototype._clearBeaconQueue=function(){var e=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,t=this._eventQueue.slice(e);e>0&&Object.assign(t[t.length-1],ut({mux_view_message:"event queue truncated"}));var n=this._createPayload(t);bt(this._beaconUrl,n,!0,function(){})},pt.prototype._sendBeaconQueue=function(){var e=this;if(!this._postInFlight){var t=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var n=this._createPayload(t),i=Q.now();bt(this._beaconUrl,n,!1,function(n,a){a?(e._eventQueue=t.concat(e._eventQueue),e._failureCount+=1,K.info("Error sending beacon: "+a)):e._failureCount=0,e._roundTripTime=Q.now()-i,e._postInFlight=!1})}},pt.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var e=Math.pow(2,this._failureCount-1);return(1+(e*=Math.random()))*this._options.baseTimeBetweenBeacons},pt.prototype._startBeaconSending=function(){var e=this;ct.default.clearTimeout(this._sendTimeout),!this.destroyed&&(this._sendTimeout=ct.default.setTimeout(function(){e._eventQueue.length&&e._sendBeaconQueue(),e._startBeaconSending()},this._getNextBeaconTime()))},pt.prototype._createPayload=function(e){var t=this,n={transmission_timestamp:Math.round(Q.now())};this._roundTripTime&&(n.rtt_ms=Math.round(this._roundTripTime));var i,a,r,s=function(){i=JSON.stringify({metadata:n,events:a||e}),r=i.length/1024},o=function(){return r<=t._options.maxPayloadKBSize};return s(),o()||(K.info("Payload size is too big ("+r+" kb). Removing unnecessary events."),a=e.filter(function(e){return-1===mt.indexOf(e.e)}),s()),o()||(K.info("Payload size still too big ("+r+" kb). Cropping fields.."),a.forEach(function(e){for(var t in e){var n=e[t];"string"==typeof n&&n.length>51200&&(e[t]=n.substring(0,51200))}}),s()),i};var vt=function(e){return e.length<=57344},bt=function(e,t,n,i){if(n&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,t))i();else if(ct.default.fetch)ct.default.fetch(e,{method:"POST",body:t,headers:{"Content-Type":"text/plain"},keepalive:vt(t)}).then(function(e){return i(null,e.ok?null:"Error")}).catch(function(e){return i(null,e)});else{if(ct.default.XMLHttpRequest){var a=new ct.default.XMLHttpRequest;return a.onreadystatechange=function(){if(4===a.readyState)return i(null,200!==a.status?"error":void 0)},a.open("POST",e),a.setRequestHeader("Content-Type","text/plain"),void a.send(t)}i()}},ft=pt,gt=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception"],Et=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],yt=["ad_id","ad_creative_id","ad_universal_id"],_t=["viewstart","error","ended","viewend"],At=function(){function e(t,n){var i,a,r,s,o,l,d,u,c,h,m,p,v,b,f,g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};X(this,e),te(this,"mux",void 0),te(this,"envKey",void 0),te(this,"options",void 0),te(this,"eventQueue",void 0),te(this,"sampleRate",void 0),te(this,"disableCookies",void 0),te(this,"respectDoNotTrack",void 0),te(this,"previousBeaconData",void 0),te(this,"lastEventTime",void 0),te(this,"rateLimited",void 0),te(this,"pageLevelData",void 0),te(this,"viewerData",void 0),this.mux=t,this.envKey=n,this.options=g,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new ft(function(e,t){var n=t.beaconCollectionDomain,i=t.beaconDomain;if(n)return"https://"+n;var a=i||"litix.io";return(e=e||"inferred").match(/^[a-z0-9]+$/)?"https://"+e+"."+a:"https://img.litix.io/a.gif"}(this.envKey,this.options)),this.sampleRate=null!==(v=this.options.sampleRate)&&void 0!==v?v:1,this.disableCookies=null!==(b=this.options.disableCookies)&&void 0!==b&&b,this.respectDoNotTrack=null!==(f=this.options.respectDoNotTrack)&&void 0!==f&&f,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:null===(i=this.options.platform)||void 0===i?void 0:i.name,viewer_application_version:null===(a=this.options.platform)||void 0===a?void 0:a.version,viewer_application_engine:null===(r=this.options.platform)||void 0===r?void 0:r.layout,viewer_device_name:null===(s=this.options.platform)||void 0===s?void 0:s.product,viewer_device_category:"",viewer_device_manufacturer:null===(o=this.options.platform)||void 0===o?void 0:o.manufacturer,viewer_os_family:null===(d=this.options.platform)||void 0===d||null===(l=d.os)||void 0===l?void 0:l.family,viewer_os_architecture:null===(c=this.options.platform)||void 0===c||null===(u=c.os)||void 0===u?void 0:u.architecture,viewer_os_version:null===(m=this.options.platform)||void 0===m||null===(h=m.os)||void 0===h?void 0:h.version,viewer_connection_type:st(),page_url:null===ze.default||void 0===ze.default||null===(p=ze.default.location)||void 0===p?void 0:p.href},this.viewerData=this.disableCookies?{}:function(){var e=tt();return e.mux_viewer_id=e.mux_viewer_id||B(),e.msn=e.msn||Math.random(),nt(e),{mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn}}()}return ee(e,[{key:"send",value:function(e,t){if(e&&null!=t&&t.view_id){if(this.respectDoNotTrack&&G())return K.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=typeof t)return K.error("A data object was expected in send() but was not provided");var n=this.disableCookies?{}:function(){var e=tt(),t=Q.now();return e.session_start&&(e.sst=e.session_start,delete e.session_start),e.session_id&&(e.sid=e.session_id,delete e.session_id),e.session_expires&&(e.sex=e.session_expires,delete e.session_expires),(!e.sex||e.sex<t)&&(e.sid=B(),e.sst=t),e.sex=t+15e5,nt(e),{session_id:e.sid,session_start:e.sst,session_expires:e.sex}}(),i=he(ce({},this.pageLevelData,t,n,this.viewerData),{event:e,env_key:this.envKey});
2i.user_id&&(i.viewer_user_id=i.user_id,delete i.user_id);var a,r=(null!==(a=i.mux_sample_number)&&void 0!==a?a:0)>=this.sampleRate,s=ut(this._deduplicateBeaconData(e,i));if(this.lastEventTime=this.mux.utils.now(),r)return K.info("Not sending event due to sample rate restriction",e,i,s);if(this.envKey||K.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,i,s),!this.rateLimited)if(K.info("Sending event",e,i,s),this.rateLimited=!this.eventQueue.queueEvent(e,s),this.mux.WINDOW_UNLOADING&&"viewend"===e)this.eventQueue.destroy(!0);else if(this.mux.WINDOW_HIDDEN&&"hb"===e?this.eventQueue.flushEvents(!0):_t.indexOf(e)>=0&&this.eventQueue.flushEvents(),this.rateLimited)return i.event="eventrateexceeded",s=ut(i),this.eventQueue.queueEvent(i.event,s),K.error("Beaconing disabled due to rate limit.")}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,t){var n=this,i={},a=t.view_id;if("-1"===a||"viewstart"===e||"viewend"===e||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=6e5)i=ce({},t),a&&(this.previousBeaconData=i),a&&"viewend"===e&&(this.previousBeaconData=null);else{var r=0===e.indexOf("request");Object.entries(t).forEach(function(t){var a=U(t,2),s=a[0],o=a[1];n.previousBeaconData&&(o!==n.previousBeaconData[s]||gt.indexOf(s)>-1||n.objectHasChanged(r,s,o,n.previousBeaconData[s])||n.eventRequiresKey(e,s))&&(i[s]=o,n.previousBeaconData[s]=o)})}return i}},{key:"objectHasChanged",value:function(e,t,n,i){return!(!e||0!==t.indexOf("request_"))&&("request_response_headers"===t||"object"!=typeof n||"object"!=typeof i||Object.keys(n||{}).length!==Object.keys(i||{}).length)}},{key:"eventRequiresKey",value:function(e,t){return!!("renditionchange"===e&&0===t.indexOf("video_source_")||yt.includes(t)&&Et.includes(e))}}]),e}(),kt=function e(t){X(this,e);var n=0,i=0,a=0,r=0,s=0,o=0,l=0;t.on("requestcompleted",function(e,o){var l,d,u=o.request_start,c=o.request_response_start,h=o.request_response_end,m=o.request_bytes_loaded;if(r++,c?(l=c-(null!=u?u:0),d=(null!=h?h:0)-c):d=(null!=h?h:0)-(null!=u?u:0),d>0&&m&&m>0){var p=m/d*8e3;s++,i+=m,a+=d,t.data.view_min_request_throughput=Math.min(t.data.view_min_request_throughput||1/0,p),t.data.view_average_request_throughput=i/a*8e3,t.data.view_request_count=r,l>0&&(n+=l,t.data.view_max_request_latency=Math.max(t.data.view_max_request_latency||0,l),t.data.view_average_request_latency=n/s)}}),t.on("requestfailed",function(e,n){r++,o++,t.data.view_request_count=r,t.data.view_request_failed_count=o}),t.on("requestcanceled",function(e,n){r++,l++,t.data.view_request_count=r,t.data.view_request_canceled_count=l})},wt=function e(t){var n=this;X(this,e),te(this,"_lastEventTime",void 0),t.on("before*",function(e,i){var a=i.viewer_time,r=Q.now(),s=n._lastEventTime;if(n._lastEventTime=r,s&&r-s>36e5){var o=Object.keys(t.data).reduce(function(e,n){return 0===n.indexOf("video_")?Object.assign(e,te({},n,t.data[n])):e},{});t.mux.log.info("Received event after at least an hour inactivity, creating a new view"),t.emit("viewinit",Object.assign({viewer_time:a},o)),t.playbackHeartbeat._playheadShouldBeProgressing&&"play"!==e.type&&"adbreakstart"!==e.type&&(t.emit("play",{viewer_time:a}),"playing"!==e.type&&t.emit("playing",{viewer_time:a}))}})},Tt=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange"],It=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ne(e,t)}(n,e);var t=ae(n);function n(e,i,a){var r;X(this,n),te(z(r=t.call(this)),"DOM_CONTENT_LOADED_EVENT_END",void 0),te(z(r),"NAVIGATION_START",void 0),te(z(r),"_destroyed",void 0),te(z(r),"_heartBeatTimeout",void 0),te(z(r),"adTracker",void 0),te(z(r),"dashjs",void 0),te(z(r),"data",void 0),te(z(r),"disablePlayheadRebufferTracking",void 0),te(z(r),"disableRebufferTracking",void 0),te(z(r),"errorTracker",void 0),te(z(r),"errorTranslator",void 0),te(z(r),"getAdData",void 0),te(z(r),"getPlayheadTime",void 0),te(z(r),"getStateData",void 0),te(z(r),"hlsjs",void 0),te(z(r),"id",void 0),te(z(r),"longResumeTracker",void 0),te(z(r),"minimumRebufferDuration",void 0),te(z(r),"mux",void 0),te(z(r),"oldEmit",void 0),te(z(r),"playbackEventDispatcher",void 0),te(z(r),"playbackHeartbeat",void 0),te(z(r),"playbackHeartbeatTime",void 0),te(z(r),"playheadTime",void 0),te(z(r),"seekingTracker",void 0),te(z(r),"sustainedRebufferThreshold",void 0),te(z(r),"watchTimeTracker",void 0),te(z(r),"currentFragmentPDT",void 0),te(z(r),"currentFragmentStart",void 0),r.DOM_CONTENT_LOADED_EVENT_END=de.domContentLoadedEventEnd(),r.NAVIGATION_START=de.navigationStart();r.mux=e,r.id=i,null!=a&&a.beaconDomain&&r.mux.log.warn("The `beaconDomain` setting has been deprecated
2in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),a=Object.assign({debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,errorTranslator:function(e){return e}},a),a.data=a.data||{},a.data.property_key&&(a.data.env_key=a.data.property_key,delete a.data.property_key),K.setLevel(a.debug?"debug":"warn"),r.getPlayheadTime=a.getPlayheadTime,r.getStateData=a.getStateData||function(){return{}},r.getAdData=a.getAdData||function(){},r.minimumRebufferDuration=a.minimumRebufferDuration,r.sustainedRebufferThreshold=a.sustainedRebufferThreshold,r.playbackHeartbeatTime=a.playbackHeartbeatTime,r.disableRebufferTracking=a.disableRebufferTracking,r.disableRebufferTracking&&r.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."),r.disablePlayheadRebufferTracking=a.disablePlayheadRebufferTracking,r.errorTranslator=a.errorTranslator,r.playbackEventDispatcher=new At(e,a.data.env_key,a),r.data={player_instance_id:B(),mux_sample_rate:a.sampleRate,beacon_domain:a.beaconCollectionDomain||a.beaconDomain},r.data.view_sequence_number=1,r.data.player_sequence_number=1,r.oldEmit=r.emit,r.emit=function(e,t){t=Object.assign({viewer_time:this.mux.utils.now()},t),this.oldEmit(e,t)};var s=function(){void 0===this.data.view_start&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"))}.bind(z(r));r.on("viewinit",function(e,t){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,t),this._initializeViewData(),this.one("play",s),this.one("adbreakstart",s)});var o=function(e){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",e)}.bind(z(r));if(r.on("videochange",function(e,t){o(t)}),r.on("programchange",function(e,t){this.data.player_is_paused&&this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."),o(Object.assign(t,{view_program_changed:!0})),s(),this.emit("play"),this.emit("playing")}),r.on("fragmentchange",function(e,t){this.currentFragmentPDT=t.currentFragmentPDT,this.currentFragmentStart=t.currentFragmentStart}),r.on("destroy",r.destroy),"undefined"!=typeof window&&"function"==typeof window.addEventListener&&"function"==typeof window.removeEventListener){var l=function(){var e=void 0!==r.data.view_start;r.mux.WINDOW_HIDDEN="hidden"===document.visibilityState,e&&r.mux.WINDOW_HIDDEN&&(r.data.player_is_paused||r.emit("hb"))};window.addEventListener("visibilitychange",l,!1);var d=function(e){e.persisted||r.destroy()};window.addEventListener("pagehide",d,!1),r.on("destroy",function(){window.removeEventListener("visibilitychange",l),window.removeEventListener("pagehide",d)})}r.on("playerready",function(e,t){Object.assign(this.data,t)}),Tt.forEach(function(e){r.on(e,function(t,n){0!==e.indexOf("ad")&&this._updateStateData(),Object.assign(this.data,n),this._sanitizeData()}),r.on("after"+e,function(){("error"!==e||this.errorTracker.viewErrored)&&this.send(e)})}),r.on("viewend",function(e,t){Object.assign(r.data,t)});return r.one("playerready",function(e){var t=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=t-this.data.player_init_time),!this.mux.PLAYER_TRACKED&&this.NAVIGATION_START&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.DOM_CONTENT_LOADED_EVENT_END)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.DOM_CONTENT_LOADED_EVENT_END||1/0)-this.NAVIGATION_START)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),r.longResumeTracker=new wt(z(r)),r.errorTracker=new Re(z(r)),new Qe(z(r)),r.seekingTracker=new $e(z(r)),r.playheadTime=new Oe(z
2(r)),r.playbackHeartbeat=new Ce(z(r)),new Ve(z(r)),r.watchTimeTracker=new xe(z(r)),new Me(z(r)),r.adTracker=new Ge(z(r)),new Be(z(r)),new Ue(z(r)),new qe(z(r)),new Ze(z(r)),new kt(z(r)),a.hlsjs&&r.addHLSJS(a),a.dashjs&&r.addDashJS(a),r.emit("viewinit",a.data),r}return ee(n,[{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,void 0!==this.data.view_start&&(this.emit("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(e){if(this.data.view_id){var t=Object.assign({},this.data);if(void 0===t.video_source_is_live&&(t.player_source_duration===1/0||t.video_source_duration===1/0?t.video_source_is_live=!0:(t.player_source_duration>0||t.video_source_duration>0)&&(t.video_source_is_live=!1)),t.video_source_is_live||["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"].forEach(function(e){t[e]=void 0}),t.video_source_url=t.video_source_url||t.player_source_url,t.video_source_url){var n=U(se(t.video_source_url),2),i=n[0],a=n[1];t.video_source_domain=a,t.video_source_hostname=i}delete t.ad_request_id,this.playbackEventDispatcher.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,this._restartHeartBeat(),"viewend"===e&&delete this.data.view_id}}},{key:"_updateStateData",value:function(){Object.assign(this.data,this.getStateData()),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var e=this;["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"].forEach(function(t){var n=parseInt(e.data[t],10);e.data[t]=isNaN(n)?void 0:n});["player_source_url","video_source_url"].forEach(function(t){if(e.data[t]){var n=e.data[t].toLowerCase();(0===n.indexOf("data:")||0===n.indexOf("blob:"))&&(e.data[t]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("video_")&&delete e.data[t]})}},{key:"_resetViewData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var e=this,t=this.data.view_id=B(),n=function(){t===e.data.view_id&&ue(e.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",n):n()}},{key:"_restartHeartBeat",value:function(){var e=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){e.data.player_is_paused||e.emit("hb")},1e4)}},{key:"addHLSJS",value:function(e){e.hlsjs?this.hlsjs?this.mux.log.warn("An instance of HLS.js is already being monitored for this player."):(this.hlsjs=e.hlsjs,function(e,t,n){var i=arguments.length>4?arguments[4]:void 0,a=e.log,r=e.utils.secondsToMs,s=function(e){var t,n=parseInt(i.version);return 1===n&&null!==e.programDateTime&&(t=e.programDateTime),0===n&&null!==e.pdt&&(t=e.pdt),t};if(de.exists()){var o=function(n,i){return e.emit(t,n,i)},l=function(e,t){var n=t.levels,i=t.audioTracks,a=t.url,r=t.stats,s=t.networkDetails,l=t.sessionData,d={},u={};n.forEach(function(e,t){d[t]={width:e.width,height:e.height,bitrate:e.bitrate,attrs:e.attrs}}
vendor: 7,146 bytes, line 2
2),i.forEach(function(e,t){u[t]={name:e.name,language:e.lang,bitrate:e.bitrate}});var c=ge(r),h=c.bytesLoaded,m=c.requestStart,p=c.responseStart,v=c.responseEnd;o("requestcompleted",he(ce({},fe(l)),{request_event_type:e,request_bytes_loaded:h,request_start:m,request_response_start:p,request_response_end:v,request_type:"manifest",request_hostname:re(a),request_response_headers:Ee(s),request_rendition_lists:{media:d,audio:u,video:{}}}))};n.on(i.Events.MANIFEST_LOADED,l);var d=function(e,t){var n=t.details,i=t.level,a=t.networkDetails,l=t.stats,d=ge(l),u=d.bytesLoaded,c=d.requestStart,h=d.responseStart,m=d.responseEnd,p=n.fragments[n.fragments.length-1],v=s(p)+r(p.duration);o("requestcompleted",{request_event_type:e,request_bytes_loaded:u,request_start:c,request_response_start:h,request_response_end:m,request_current_level:i,request_type:"manifest",request_hostname:re(n.url),request_response_headers:Ee(a),video_holdback:n.holdBack&&r(n.holdBack),video_part_holdback:n.partHoldBack&&r(n.partHoldBack),video_part_target_duration:n.partTarget&&r(n.partTarget),video_target_duration:n.targetduration&&r(n.targetduration),video_source_is_live:n.live,player_manifest_newest_program_time:isNaN(v)?void 0:v})};n.on(i.Events.LEVEL_LOADED,d);var u=function(e,t){var n=t.details,i=t.networkDetails,a=t.stats,r=ge(a),s=r.bytesLoaded,l=r.requestStart,d=r.responseStart,u=r.responseEnd;o("requestcompleted",{request_event_type:e,request_bytes_loaded:s,request_start:l,request_response_start:d,request_response_end:u,request_type:"manifest",request_hostname:re(n.url),request_response_headers:Ee(i)})};n.on(i.Events.AUDIO_TRACK_LOADED,u);var c=function(e,t){var i=t.stats,a=t.networkDetails,r=t.frag;i=i||r.stats;var s=ge(i),l=s.bytesLoaded,d=s.requestStart,u=s.responseStart,c=s.responseEnd,h=a?Ee(a):void 0,m={request_event_type:e,request_bytes_loaded:l,request_start:d,request_response_start:u,request_response_end:c,request_hostname:a?re(a.responseURL):void 0,request_id:h?be(h):void 0,request_response_headers:h,request_media_duration:r.duration,request_url:null==a?void 0:a.responseURL};"main"===r.type?(m.request_type="media",m.request_current_level=r.level,m.request_video_width=(n.levels[r.level]||{}).width,m.request_video_height=(n.levels[r.level]||{}).height,m.request_labeled_bitrate=(n.levels[r.level]||{}).bitrate):m.request_type=r.type,o("requestcompleted",m)};n.on(i.Events.FRAG_LOADED,c);var h=function(e,t){var n=t.frag,i=n.start,a={currentFragmentPDT:s(n),currentFragmentStart:r(i)};o("fragmentchange",a)};n.on(i.Events.FRAG_CHANGED,h);var m=function(e,t){var n=t.type,a=t.details,r=t.response,s=t.fatal,l=t.frag,d=t.networkDetails,u=(null==l?void 0:l.url)||t.url||"",c=d?Ee(d):void 0;if((a===i.ErrorDetails.MANIFEST_LOAD_ERROR||a===i.ErrorDetails.MANIFEST_LOAD_TIMEOUT||a===i.ErrorDetails.FRAG_LOAD_ERROR||a===i.ErrorDetails.FRAG_LOAD_TIMEOUT||a===i.ErrorDetails.LEVEL_LOAD_ERROR||a===i.ErrorDetails.LEVEL_LOAD_TIMEOUT||a===i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||a===i.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||a===i.ErrorDetails.SUBTITLE_LOAD_ERROR||a===i.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||a===i.ErrorDetails.KEY_LOAD_ERROR||a===i.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:a,request_url:u,request_hostname:re(u),request_id:c?be(c):void 0,request_type:a===i.ErrorDetails.FRAG_LOAD_ERROR||a===i.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":a===i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||a===i.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":a===i.ErrorDetails.SUBTITLE_LOAD_ERROR||a===i.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":a===i.ErrorDetails.KEY_LOAD_ERROR||a===i.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:null==r?void 0:r.code,request_error_text:null==r?void 0:r.text}),s){var h,m="".concat(u?"url: ".concat(u,"\n"):"")+"".concat(r&&(r.code||r.text)?"response: ".concat(r.code,", ").concat(r.text,"\n"):"")+"".concat(t.reason?"failure reason: ".concat(t.reason,"\n"):"")+"".concat(t.level?"level: ".concat(t.level,"\n"):"")+"".concat(t.parent?"parent stream controller: ".concat(t.parent,"\n"):"")+"".concat(t.buffer?"buffer length: ".concat(t.buffer,"\n"):"")+"".concat(t.error?"error: ".concat(t.error,"\n"):"")+"".concat(t.event?"event: ".concat(t.event,"\n"):"")+"".concat(t.err?"error message: ".concat(null===(h=t.err)||void 0===h?void 0:h.message,"\n"):"");o("error",{player_error_code:n,player_error_message:a,player_error_context:m})}};n.on(i.Events.ERROR,m);var p=function(e,t){var n=t.frag,i=n&&n._url||"";o("requestcanceled",{request_event_type:e,request_url:i,request_type:"media",request_hostname:re(i)})};n.on(i.Events.FRAG_LOAD_EMERGENCY_ABORTED,p);var v=function(e,t){var i=t.level,r=n.levels[i];if(r&&r.attrs&&r.attrs.BANDWIDTH){var s,l=r.attrs.BANDWIDTH,d=parseFloat(r.attrs["FRAME-RATE"]);isNaN(d)||(s=d),l?o("renditionchange",{video_source_fps:s,video_source_bitrate:l,video_source_width:r.width,video_source_height:r.height,video_source_rendition_name:r.name,video_source_codec:null==r?void 0:r.videoCodec}):a.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};n.on(i.Events.LEVEL_SWITCHED,v),n._stopMuxMonitor=function(){n.off(i.Events.MANIFEST_LOADED,l),n.off(i.Events.LEVEL_LOADED,d),n.off(i.Events.AUDIO_TRACK_LOADED,u),n.off(i.Events.FRAG_LOADED,c),n.off(i.Events.FRAG_CHANGED,h),n.off(i.Events.ERROR,m),n.off(i.Events.FRAG_LOAD_EMERGENCY_ABORTED,p),n.off(i.Events.LEVEL_SWITCHED,v),n.off(i.Events.DESTROYING,n._stopMuxMonitor),delete n._stopMuxMonitor},n.on(i.Events.DESTROYING,n._stopMuxMonitor)}else a.warn("performance timing not supported. Not tracking HLS.js.")}(this.mux,this.id,e.hlsjs,{},e.Hls||window.Hls)):this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.")}},{key:"removeHLSJS",value:function(){this.hlsjs&&(function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()}(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(e){e.dashjs?this.dashjs?this.mux.log.warn("An instance of Dash.js is already being monitored for this player."):(this.dashjs=e.dashjs,Ae(this.mux,this.id,e.dashjs)):this.mux.log.warn("You must pass a valid dashjs instance in order to track it.")}},{key:"removeDashJS",value:function(){this.dashjs&&(function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()}(this.dashjs),this.dashjs=void 0)}}]),n}(Te),St=It;f();var Ct=p(O());var Rt=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],Lt={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};var xt,Dt=p(v());Dt.default&&Dt.default.WeakMap&&(xt=new WeakMap);var Mt="#EXT-X-TARGETDURATION",Nt="#EXT-X-PART-INF",Ot="#EXT-X-SERVER-CONTROL",Pt="#EXTINF",Ut="#EXT-X-PROGRAM-DATE-TIME",Wt="#EXT-X-VERSION",Bt="#EXT-X-SESSION-DATA",Ht=function(e){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(e),this.manifest};Ht.prototype.process=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.processLine(this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}
2,Ht.prototype.processLine=function(e){var t=e.indexOf(":"),n=Gt(e,t),i=n[0],a=2===n.length?$t(n[1]):void 0;if("#"!==i[0])this.currentUri.uri=i,this.manifest.segments.push(this.currentUri),this.manifest.targetDuration&&!("duration"in this.currentUri)&&(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(i){case Mt:if(!isFinite(a)||a<0)return;this.manifest.targetDuration=a,this.setHoldBack();break;case Nt:qt(this.manifest,n),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case Ot:qt(this.manifest,n),this.setHoldBack();break;case Pt:0===a?this.currentUri.duration=.01:a>0&&(this.currentUri.duration=a);break;case Ut:var r=a,s=new Date(r);this.manifest.dateTimeString||(this.manifest.dateTimeString=r,this.manifest.dateTimeObject=s),this.currentUri.dateTimeString=r,this.currentUri.dateTimeObject=s;break;case Wt:qt(this.manifest,n);break;case Bt:var o=Yt(n[1]),l=fe(o);Object.assign(this.manifest.sessionData,l)}},Ht.prototype.setHoldBack=function(){var e=this.manifest,t=e.serverControl,n=e.targetDuration,i=e.partTargetDuration;if(t){var a="holdBack",r="partHoldBack",s=n&&3*n,o=i&&2*i;n&&!t.hasOwnProperty(a)&&(t[a]=s),s&&t[a]<s&&(t[a]=s),i&&!t.hasOwnProperty(r)&&(t[r]=3*i),i&&t[r]<o&&(t[r]=o)}};var qt=function(e,t){var n,i=Vt(t[0].replace("#EXT-X-",""));jt(t[1])?(n={},n=Object.assign(Kt(t[1]),n)):n=$t(t[1]),e[i]=n},Vt=function(e){return e.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},$t=function(e){if("yes"===e.toLowerCase()||"no"===e.toLowerCase())return"yes"===e.toLowerCase();var t=-1!==e.indexOf(":")?e:parseFloat(e);return isNaN(t)?e:t},Ft=function(e){var t={},n=e.split("=");n.length>1&&(t[Vt(n[0])]=$t(n[1]));return t},Kt=function(e){for(var t=e.split(","),n={},i=0;t.length>i;i++){var a=t[i],r=Ft(a);n=Object.assign(r,n)}return n},jt=function(e){return e.indexOf("=")>-1},Gt=function(e,t){return-1===t?[e]:[e.substring(0,t),e.substring(t+1)]},Yt=function(e){var t={};if(e){var n=e.search(",");return[e.slice(0,n),e.slice(n+1)].forEach(function(e,n){for(var i=e.replace(/['"]+/g,"").split("="),a=0;a<i.length;a++)"DATA-ID"===i[a]&&(t["DATA-ID"]=i[1-a]),"VALUE"===i[a]&&(t.VALUE=i[1-a])}),{data:t}}},Zt=Ht,Qt={safeCall:function(e,t,n,i){var a=i;if(e&&"function"==typeof e[t])try{a=e[t].apply(e,n)}catch(Wy){K.info("safeCall error",Wy)}return a},safeIncrement:ue,getComputedStyle:function(e,t){return e&&t&&Dt.default&&"function"==typeof Dt.default.getComputedStyle?(xt&&xt.has(e)&&(n=xt.get(e)),n||(n=Dt.default.getComputedStyle(e,null),xt&&xt.set(e,n)),n.getPropertyValue(t)):"";var n},secondsToMs:function(e){return Math.floor(1e3*e)},assign:Object.assign,headersStringToObject:ve,cdnHeadersToRequestId:be,extractHostnameAndDomain:se,extractHostname:re,manifestParser:Zt,generateShortID:H,generateUUID:B,now:Q.now},zt=Qt,Xt={PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled"},Jt={},en=function(e){var t=arguments;"string"==typeof e?en.hasOwnProperty(e)?W.default.setTimeout(function(){t=Array.prototype.splice.call(t,1),en[e].apply(null,t)},0):K.warn("`"+e+"` is an unknown task"):"function"==typeof e?W.default.setTimeout(function(){e(en)},0):K.warn("`"+e+"` is invalid.")},tn={loaded:Q.now(),NAME:"mux-embed",VERSION:"5.2.1",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(e,t){return function(e,t,n){var i=U(V(t),3),a=i[0],r=i[1],s=i[2],o=e.log,l=e.utils.getComputedStyle,d=e.utils.secondsToMs;if(!a)return o.error("No element was found with the `"+r+"` query selector.");if("video"!==s&&"audio"!==s)return o.error("The element of `"+r+"` was not a media element.");a.mux&&(a.mux.destroy(),delete a.mux,o.warn("Already monitoring this video element, replacing existing event listeners")),(n=Object.assign({automaticErrorTracking:!0},n)).data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:e.VERSION},n.data),n.getPlayheadTime=function(){return d(a.currentTime)},n.getStateData=function(){var e,t=this.hlsjs&&this.hlsjs.url,i=this.dashjs&&b("function"===this.dashjs.getSource)&&this.dashjs.getSource(),r
2={player_is_paused:a.paused,player_playhead_time:d(a.currentTime),player_width:parseInt(l(a,"width")),player_height:parseInt(l(a,"height")),player_autoplay_on:a.autoplay,player_preload_on:a.preload,player_language_code:a.lang,player_is_fullscreen:Ct.default&&!!(Ct.default.fullscreenElement||Ct.default.webkitFullscreenElement||Ct.default.mozFullScreenElement||Ct.default.msFullscreenElement),video_poster_url:a.poster,video_source_url:t||i||a.currentSrc,video_source_duration:d(a.duration),video_source_height:a.videoHeight,video_source_width:a.videoWidth,view_dropped_frame_count:null==a||null===(e=a.getVideoPlaybackQuality)||void 0===e?void 0:e.call(a).droppedVideoFrames},s=n.getPlayheadTime();if(a.getStartDate&&s>0){var o=a.getStartDate();if(o&&"function"==typeof o.getTime&&o.getTime()){var u=o.getTime();if(r.player_program_time=u+s,a.seekable.length>0){var c=u+a.seekable.end(a.seekable.length-1);r.player_live_edge_program_time=c}}}return r},a.mux=a.mux||{},a.mux.deleted=!1,a.mux.emit=function(t,n){e.emit(r,t,n)};var u=function(){o.error("The monitor for this video element has already been destroyed.")};a.mux.destroy=function(){Object.keys(a.mux.listeners).forEach(function(e){a.removeEventListener(e,a.mux.listeners[e],!1)}),delete a.mux.listeners,a.mux.destroy=u,a.mux.swapElement=u,a.mux.emit=u,a.mux.addHLSJS=u,a.mux.addDashJS=u,a.mux.removeHLSJS=u,a.mux.removeDashJS=u,a.mux.deleted=!0,e.emit(r,"destroy")},a.mux.swapElement=function(t){var n=U(V(t),3),i=n[0],r=n[1],s=n[2];return i?"video"!==s&&"audio"!==s?e.log.error("The element of `"+r+"` was not a media element."):(i.muxId=a.muxId,delete a.muxId,i.mux=i.mux||{},i.mux.listeners=Object.assign({},a.mux.listeners),delete a.mux.listeners,Object.keys(i.mux.listeners).forEach(function(e){a.removeEventListener(e,i.mux.listeners[e],!1),i.addEventListener(e,i.mux.listeners[e],!1)}),i.mux.swapElement=a.mux.swapElement,i.mux.destroy=a.mux.destroy,delete a.mux,void(a=i)):e.log.error("No element was found with the `"+r+"` query selector.")},a.mux.addHLSJS=function(t){e.addHLSJS(r,t)},a.mux.addDashJS=function(t){e.addDashJS(r,t)},a.mux.removeHLSJS=function(){e.removeHLSJS(r)},a.mux.removeDashJS=function(){e.removeDashJS(r)},e.init(r,n),e.emit(r,"playerready"),a.paused||(e.emit(r,"play"),a.readyState>2&&e.emit(r,"playing")),a.mux.listeners={},Rt.forEach(function(t){"error"===t&&!n.automaticErrorTracking||(a.mux.listeners[t]=function(){var n={};if("error"===t){if(!a.error||1===a.error.code)return;n.player_error_code=a.error.code,n.player_error_message=Lt[a.error.code]||a.error.message}e.emit(r,t,n)},a.addEventListener(t,a.mux.listeners[t],!1))})}(en,e,t)},destroyMonitor:function(e){var t=U(V(e),1)[0];t&&t.mux&&"function"==typeof t.mux.destroy?t.mux.destroy():K.error("A video element monitor for `"+e+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(e,t){var n=q(e);Jt[n]?Jt[n].addHLSJS(t):K.error("A monitor for `"+n+"` has not been initialized.")},addDashJS:function(e,t){var n=q(e);Jt[n]?Jt[n].addDashJS(t):K.error("A monitor for `"+n+"` has not been initialized.")},removeHLSJS:function(e){var t=q(e);Jt[t]?Jt[t].removeHLSJS():K.error("A monitor for `"+t+"` has not been initialized.")},removeDashJS:function(e){var t=q(e);Jt[t]?Jt[t].removeDashJS():K.error("A monitor for `"+t+"` has not been initialized.")},init:function(e,t){G()&&t&&t.respectDoNotTrack&&K.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var n=q(e);Jt[n]=new St(en,n,t)},emit:function(e,t,n){var i=q(e);Jt[i]?(Jt[i].emit(t,n),"destroy"===t&&delete Jt[i]):K.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:G,log:K,utils:zt,events:Xt,WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(en,tn),void 0!==W.default&&"function"==typeof W.default.addEventListener&&W.default.addEventListener("pagehide",function(e){e.persisted||(en.WINDOW_UNLOADING=!0)},!1);var nn=en,an=n(4945).Ay,rn=class e extends Error{constructor(t,n=e.MEDIA_ERR_CUSTOM,i,a){var r;super(t),this.name="MediaError",this.code=n,this.context=a,this.fatal=null!=i?i:n>=e.MEDIA_ERR_NETWORK&&n<=e.MEDIA_ERR_ENCRYPTED,this.message||(this.message=null!=(r=e.defaultMessages[this.code])?r:"")}};rn.MEDIA_ERR_ABORTED=1,rn.MEDIA_ERR_NETWORK=2,rn.MEDIA_ERR_DECODE=3,rn.MEDIA_ERR_SRC_NOT_SUPPORTED=4,rn.MEDIA_ERR_ENCRYPTED=5,rn.MEDIA_ERR_CUSTOM=100,rn.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail.",3:"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.",4:"An unsupported error occurred. The server or network failed, or your browser does not support this format.",5:"The media is encrypted and there are no keys to decrypt it."};var sn=rn,on=(e,t)=>!(e=>null==e)(t)&&e in t,ln={ANY:"any",MUTED:"muted"},dn={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},un="mse",cn="native",hn={HEADER:"header",QUERY:"query",NONE:"none"},mn=Object.values(hn),pn={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},vn={HLS:pn.M3U8},bn=(Object.keys(vn),Object.values(pn),(e,t,n,i,a=e)=>
2{a.addEventListener(t,n,i),e.addEventListener("teardown",()=>{a.removeEventListener(t,n)},{once:!0})});var fn=e=>{let t=e.type;if(t){let e=t.toUpperCase();return on(e,vn)?vn[e]:t}let{src:n}=e;return n?yn(n):""},gn=e=>"VOD"===e?dn.ON_DEMAND:dn.LIVE,En=e=>"EVENT"===e?Number.POSITIVE_INFINITY:"VOD"===e?Number.NaN:0,yn=e=>{let t="";try{t=new URL(e).pathname}catch{console.error("invalid url")}let n=t.lastIndexOf(".");if(n<0)return"";let i=t.slice(n+1).toUpperCase();return on(i,pn)?pn[i]:""},_n=Object.values(ln),An=e=>"boolean"==typeof e||"string"==typeof e&&_n.includes(e),kn=(e,t)=>{if(!t)return;let n=e.muted,i=()=>e.muted=n;switch(t){case ln.ANY:e.play().catch(()=>{e.muted=!0,e.play().catch(i)});break;case ln.MUTED:e.muted=!0,e.play().catch(i);break;default:e.play().catch(()=>{})}};function wn(e,t){var n;if(!("videoTracks"in e))return;let i=new WeakMap;t.on(an.Events.MANIFEST_PARSED,function(t,n){s();let a=e.addVideoTrack("main");a.selected=!0;for(let[e,r]of n.levels.entries()){let t=a.addRendition(r.url[0],r.width,r.height,r.videoCodec,r.bitrate);i.set(r,`${e}`),t.id=`${e}`}}),t.on(an.Events.AUDIO_TRACKS_UPDATED,function(t,n){r();for(let i of n.audioTracks){let t=i.default?"main":"alternative",n=e.addAudioTrack(t,i.name,i.lang);n.id=`${i.id}`,i.default&&(n.enabled=!0)}}),e.audioTracks.addEventListener("change",()=>{var n;let i=+(null==(n=[...e.audioTracks].find(e=>e.enabled))?void 0:n.id),a=t.audioTracks.map(e=>e.id);i!=t.audioTrack&&a.includes(i)&&(t.audioTrack=i)}),t.on(an.Events.LEVELS_UPDATED,function(t,n){var a;let r=e.videoTracks[null!=(a=e.videoTracks.selectedIndex)?a:0];if(!r)return;let s=n.levels.map(e=>i.get(e));for(let i of e.videoRenditions)i.id&&!s.includes(i.id)&&r.removeRendition(i)});let a=n=>{let i=e.currentTime,a=!1,r=(e,t)=>{a||(a=!Number.isFinite(t.endOffset))};t.on(an.Events.BUFFER_FLUSHING,r),t.nextLevel=n,t.off(an.Events.BUFFER_FLUSHING,r),a||t.trigger(an.Events.BUFFER_FLUSHING,{startOffset:i+10,endOffset:1/0,type:"video"})};null==(n=e.videoRenditions)||n.addEventListener("change",e=>{let n=e.target.selectedIndex;n!=t.nextLevel&&a(n)});let r=()=>{for(let t of e.audioTracks)e.removeAudioTrack(t)},s=()=>{(()=>{for(let t of e.videoTracks)e.removeVideoTrack(t)})(),r()};t.once(an.Events.DESTROYING,s)}var Tn=e=>"time"in e?e.time:e.startTime;function In(e,t,n,i,a){let r=document.createElement("track");return r.kind=t,r.label=n,i&&(r.srclang=i),a&&(r.id=a),r.track.mode=["subtitles","captions"].includes(t)?"disabled":"hidden",r.setAttribute("data-removeondestroy",""),e.append(r),r.track}function Sn(e,t,n){var i;return null==(i=Array.from(e.querySelectorAll("track")).find(e=>e.track.label===t&&e.track.kind===n))?void 0:i.track}async function Cn(e,t,n,i){let a=Sn(e,n,i);return a||(a=In(e,i,n),a.mode="hidden",await new Promise(e=>setTimeout(()=>e(void 0),0))),"hidden"!==a.mode&&(a.mode="hidden"),[...t].sort((e,t)=>Tn(t)-Tn(e)).forEach(t=>{var n,r;let s=t.value,o=Tn(t);if("endTime"in t&&null!=t.endTime)null==a||a.addCue(new VTTCue(o,t.endTime,"chapters"===i?s:JSON.stringify(null!=s?s:null)));else{let t=Array.prototype.findIndex.call(null==a?void 0:a.cues,e=>e.startTime>=o),l=null==(n=null==a?void 0:a.cues)?void 0:n[t],d=l?l.startTime:Number.isFinite(e.duration)?e.duration:Number.MAX_SAFE_INTEGER,u=null==(r=null==a?void 0:a.cues)?void 0:r[t-1];u&&(u.endTime=o),null==a||a.addCue(new VTTCue(o,d,"chapters"===i?s:JSON.stringify(null!=s?s:null)))}}),e.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a}var Rn="cuepoints",Ln=Object.freeze({label:Rn});async function xn(e,t,n=Ln){return Cn(e,t,n.label,"metadata")}var Dn=e=>({time:e.startTime,value:JSON.parse(e.text)});function Mn(e,t={label:Rn}){var n,i;let a=Sn(e,t.label,"metadata");if(null==(n=null==a?void 0:a.activeCues)||!n.length)return;if(1===a.activeCues.length)return Dn(a.activeCues[0]);let{currentTime:r}=e,s=Array.prototype.find.call(null!=(i=a.activeCues)?i:[],({startTime:e,endTime:t})=>e<=r&&t>r);return Dn(s||a.activeCues[0])}var Nn="chapters",On=Object.freeze({label:Nn}),Pn=e=>({startTime:e.startTime,endTime:e.endTime,value:e.text});async function Un(e,t,n=On){return Cn(e,t,n.label,"chapters")}function Wn(e,t={label:Nn}){var n,i;let a=Sn(e,t.label,"chapters");if(null==(n=null==a?void 0:a.activeCues)||!n.length)return;if(1===a.activeCues.length)return Pn(a.activeCues[0]);let{currentTime:r}=e,s=Array.prototype.find.call(null!=(i=a.activeCues)?i:[],({startTime:e,endTime:t})=>e<=r&&t>r);return Pn(s||a.activeCues[0])}var Bn,Hn,qn,Vn,$n=async(e,t)=>{if(t===pn.MP4)return{streamType:dn.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0};if(t===pn.M3U8){let t=await(async e=>fetch(e).then(e=>e.text()).then(e=>{let t=e.split("\n").find((e,t,n)=>t&&n[t-1].startsWith("#EXT-X-STREAM-INF"));return fetch(t).then(e=>e.text()).then(e=>e.split("\n"))}))(e);return(e=>{var t,n,i;let a,r=null==(n=(null!=(t=e.find(e=>e.startsWith("#EXT-X-PLAYLIST-TYPE")))?t:"").split(":")[1])?void 0:n.trim(),s=gn(r),o=En(r);if(s===dn.LIVE){let t=e.find(e=>e.startsWith("#EXT-X-PART-INF"));if(t)a=2*+t.split(":")[1].split("=")[1];else{let t=e.find(e=>e.startsWith("#EXT-X-TARGETDURATION")),n=null==(i=null==t?void 0:t.split(":"))?void 0:i[1];a=3*+(null!=n?n:6)}}return{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:a}})(t)}return console.error(`Media type ${t} is an unrecognized or unsupported type for src ${e}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0}},Fn=async(e,t,n=fn({src:e}))=>{var i,a,r;let{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:l}=await $n(e,n);(null!=(i=Gn.get(t))?i:{}).liveEdgeStartOffset=l,(null!=(a=Gn.get(t))?a:{}).targetLiveWindow=o,t.dispatchEvent(new CustomEvent("targetlivewindowch
2ange",{composed:!0,bubbles:!0})),(null!=(r=Gn.get(t))?r:{}).streamType=s,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Kn=(e,t,n)=>{var i,a,r,s,o,l,d,u;let{streamType:c,targetLiveWindow:h,liveEdgeStartOffset:m,lowLatency:p}=(e=>{var t;let n,i=e.type,a=gn(i),r=En(i),s=!(null==(t=e.partList)||!t.length);return a===dn.LIVE&&(n=s?2*e.partTarget:3*e.targetduration),{streamType:a,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:s}})(e);if(c===dn.LIVE){p?(n.config.backBufferLength=null!=(i=n.userConfig.backBufferLength)?i:4,n.config.maxFragLookUpTolerance=null!=(a=n.userConfig.maxFragLookUpTolerance)?a:.001,n.config.abrBandWidthUpFactor=null!=(r=n.userConfig.abrBandWidthUpFactor)?r:n.config.abrBandWidthFactor):n.config.backBufferLength=null!=(s=n.userConfig.backBufferLength)?s:8;let e=Object.freeze({get length(){return t.seekable.length},start(e){return t.seekable.start(e)},end(e){var i;return e>this.length||e<0||Number.isFinite(t.duration)?t.seekable.end(e):null!=(i=n.liveSyncPosition)?i:t.seekable.end(e)}});(null!=(o=Gn.get(t))?o:{}).seekable=e}(null!=(l=Gn.get(t))?l:{}).liveEdgeStartOffset=m,(null!=(d=Gn.get(t))?d:{}).targetLiveWindow=h,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(u=Gn.get(t))?u:{}).streamType=c,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},jn=-1!==(null!=(Hn=null==(Bn=null==globalThis?void 0:globalThis.navigator)?void 0:Bn.userAgent)?Hn:"").toLowerCase().indexOf("android"),Gn=new WeakMap,Yn="mux.com",Zn=null==(Vn=(qn=an).isSupported)?void 0:Vn.call(qn),Qn=jn,zn=nn.utils.generateUUID,Xn=({playbackId:e,customDomain:t=Yn,maxResolution:n,minResolution:i,renditionOrder:a,programStartTime:r,programEndTime:s,tokens:{playback:o}={},extraSourceParams:l={}}={})=>{if(!e)return;let[d,u=""]=(e=>{let t=e.indexOf("?");return t<0?[e]:[e.slice(0,t),e.slice(t)]})(e),c=new URL(`https://stream.${t}/${d}.m3u8${u}`);return o||c.searchParams.has("token")?(c.searchParams.forEach((e,t)=>{"token"!=t&&c.searchParams.delete(t)}),o&&c.searchParams.set("token",o)):(n&&c.searchParams.set("max_resolution",n),i&&(c.searchParams.set("min_resolution",i),n&&+n.slice(0,-1)<+i.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",i,"maxResolution",n)),a&&c.searchParams.set("rendition_order",a),r&&c.searchParams.set("program_start_time",`${r}`),s&&c.searchParams.set("program_end_time",`${s}`),Object.entries(l).forEach(([e,t])=>{null!=t&&c.searchParams.set(e,t)})),c.toString()},Jn=e=>{if(!e||!e.startsWith("https://stream."))return;let[t]=new URL(e).pathname.slice(1).split(".m3u8");return t||void 0},ei=e=>{var t,n;return null!=(n=null==(t=Gn.get(e))?void 0:t.streamType)?n:dn.UNKNOWN},ti=e=>{var t,n;return null!=(n=null==(t=Gn.get(e))?void 0:t.seekable)?n:e.seekable},ni=(e,t,n=.034)=>e>t||((e,t,n=.034)=>Math.abs(e-t)<=n)(e,t,n),ii=(e,t)=>{var n,i,a;if(!t||!e.buffered.length)return;if(e.readyState>2)return!1;let r=t.currentLevel>=0?null==(i=null==(n=t.levels)?void 0:n[t.currentLevel])?void 0:i.details:null==(a=t.levels.find(e=>!!e.details))?void 0:a.details;if(!r||r.live)return;let{fragments:s}=r;if(null==s||!s.length)return;if(e.currentTime<e.duration-(r.targetduration+.5))return!1;let o=s[s.length-1];if(e.currentTime<=o.start)return!1;let l=o.start+o.duration/2,d=e.buffered.start(e.buffered.length-1),u=e.buffered.end(e.buffered.length-1);return l>d&&l<u},ai=(e,t)=>e.ended||e.loop?e.ended:!(!t||!ii(e,t))||((e,t=.034)=>e.paused&&ni(e.currentTime,e.duration,t))(e),ri=(e,t,n)=>{si(t,n);let{metadata:i={}}=e,{view_session_id:a=zn()}=i,r=(e=>{var t,n,i;return null!=(t=null==e?void 0:e.metadata)&&t.video_id?e.metadata.video_id:pi(e)&&null!=(i=null!=(n=(e=>{if(!e)return;let[t]=e.split("?");return t||void 0})(e.playbackId))?n:Jn(e.src))?i:e.src})(e);i.view_session_id=a,i.video_id=r,e.metadata=i,Gn.set(t,{});let s=li(e,t),o=(({preload:e,src:t},n,i)=>{let a=e=>{null!=e&&["","none","metadata","auto"].includes(e)?n.setAttribute("preload",e):n.removeAttribute("preload")};if(!i)return a(e),a;let r=!1,s=!1,o=i.config.maxBufferLength,l=i.config.maxBufferSize,d=e=>{a(e);let t=null!=e?e:n.preload;s||"none"===t||("metadata"===t?(i.config.maxBufferLength=1,i.config.maxBufferSize=1):(i.config.maxBufferLength=o,i.config.maxBufferSize=l),u())},u=()=>{!r&&t&&(r=!0,i.loadSource(t))};return bn(n,"play",()=>{s=!0,i.config.maxBufferLength=o,i.config.maxBufferSize=l,u()},{once:!0}),d(e),d})(e,t,s);vi(e,t,s),bi(e,t,s),async function(e,t=Ln){new Promise(n=>{bn(e,"loadstart",async()=>{let i=await xn(e,[],t);bn(e,"cuechange",()=>{let t=Mn(e);if(t){let n=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(n)}},{},i),n(i)})})}(t),async function(e,t=On){new Promise(n=>{bn(e,"loadstart",async()=>{let i=await Un(e,[],t);bn(e,"cuechange",()=>{let t=Wn(e);if(t){let n=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(n)}},{},i),n(i)})})}(t);let l=((e,t,n)=>{let{autoplay:i}=e,a=!1,r=!1,s=An(i)?i:!!i,o=()=>{a||bn(t,"playing",()=>{a=!0},{once:!0})};if(o(),bn(t,"loadstart",()=>{a=!1,o(),kn(t,s)},{once:!0}),bn(t,"loadstart",()=>{n||(r=e.streamType&&e.streamType!==dn.UNKNOWN?e.streamType===dn.LIVE:!Number.isFinite(t.duration)),kn(t,s)},{once:!0}),n&&n.once(an.Events.LEVEL_LOADED,(t,n)=>{var i;r=e.streamType&&e.streamType!==dn.UNKNOWN?e.streamType===dn.LIVE:null!=(i=n.details.live)&&i}),!s){let i=()=>{!r||Number.isFinite(e.startTime)||(null!=n&&n.liveSyncPosition?t.currentTime=n.liveSyncPosition:Number.isFinite(t.seekable.end(0))&&(t.currentTime=t.
2seekable.end(0)))};n&&bn(t,"play",()=>{"metadata"===t.preload?n.once(an.Events.LEVEL_UPDATED,i):i()},{once:!0})}return e=>{a||(s=An(e)?e:!!e,kn(t,s))}})(e,t,s);return{engine:s,setAutoplay:l,setPreload:o}},si=(e,t)=>{let n=null==t?void 0:t.engine;n&&(n.detachMedia(),n.destroy()),null!=e&&e.mux&&!e.mux.deleted&&(e.mux.destroy(),delete e.mux),e&&(e.removeAttribute("src"),e.load(),e.removeEventListener("error",gi),e.removeEventListener("error",Ei),e.removeEventListener("durationchange",fi),Gn.delete(e),e.dispatchEvent(new Event("teardown")))};function oi(e,t){var n;let i=fn(e);if(i!==pn.M3U8)return!0;let a=!i||null==(n=t.canPlayType(i))||n,{preferPlayback:r}=e;return a&&(r===cn||!(Zn&&(r===un||Qn)))}var li=(e,t)=>{let{debug:n,streamType:i,startTime:a=-1,metadata:r,preferCmcd:s,_hlsConfig:o={}}=e,l=fn(e)===pn.M3U8,d=oi(e,t);if(l&&!d&&Zn){let t={backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0},l=di(i),d=ui(e),u=s!==hn.NONE?{useHeaders:s===hn.HEADER,sessionId:null==r?void 0:r.view_session_id,contentId:null==r?void 0:r.video_id}:void 0;return new an({debug:n,startPosition:a,cmcd:u,xhrSetup:(e,t)=>{var n,i;if(s&&s!==hn.QUERY)return;let a=new URL(t);if(!a.searchParams.has("CMCD"))return;let r=(null!=(i=null==(n=a.searchParams.get("CMCD"))?void 0:n.split(","))?i:[]).filter(e=>e.startsWith("sid")||e.startsWith("cid")).join(",");a.searchParams.set("CMCD",r),e.open("GET",a)},...t,...l,...d,...o})}},di=e=>e===dn.LIVE?{backBufferLength:8}:{},ui=e=>{let{drmToken:t,src:n,playbackId:i=Jn(n)}=e;return t&&i?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:hi(e,"fairplay"),serverCertificateUrl:mi(e,"fairplay")},"com.widevine.alpha":{licenseUrl:hi(e,"widevine")},"com.microsoft.playready":{licenseUrl:hi(e,"playready")}},requestMediaKeySystemAccessFunc:(e,t)=>("com.widevine.alpha"===e&&(t=[...t.map(e=>{var t;let n=null==(t=e.videoCapabilities)?void 0:t.map(e=>({...e,robustness:"HW_SECURE_ALL"}));return{...e,videoCapabilities:n}}),...t]),navigator.requestMediaKeySystemAccess(e,t))}:{}},ci=(e,t)=>
2{bn(t,"encrypted",async n=>{try{let i=n.initDataType;if("skd"!==i)return void console.error(`Received unexpected initialization data type "${i}"`);if(!t.mediaKeys){let n=await(await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[i],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}])).createMediaKeys(),a=await(async e=>await(await fetch(e)).arrayBuffer())(mi(e,"fairplay"));await n.setServerCertificate(a),await t.setMediaKeys(n)}let a=n.initData;if(null==a)return void console.error(`Could not start encrypted playback due to missing initData in ${n.type} event`);let r=t.mediaKeys.createSession();r.generateRequest(i,a);let s=await new Promise(e=>{r.addEventListener("message",t=>{e(t.message)},{once:!0})}),o=await(async(e,t)=>{let n=await(await fetch(t,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:e})).arrayBuffer();return new Uint8Array(n)})(s,hi(e,"fairplay"));return await r.update(o),r}catch(db){console.error(`Could not start encrypted playback due to exception "${db}"`)}})},hi=({playbackId:e,drmToken:t,customDomain:n=Yn},i)=>`https://license.${n.toLocaleLowerCase().endsWith(Yn)?n:Yn}/license/${i}/${e}?token=${t}`,mi=({playbackId:e,drmToken:t,customDomain:n=Yn},i)=>`https://license.${n.toLocaleLowerCase().endsWith(Yn)?n:Yn}/appcert/${i}/${e}?token=${t}`,pi=({playbackId:e,src:t,customDomain:n})=>{if(e)return!0;if("string"!=typeof t)return!1;let i=null==window?void 0:window.location.href,a=new URL(t,i).hostname.toLocaleLowerCase();return a.includes(Yn)||!!n&&a.includes(n.toLocaleLowerCase())},vi=(e,t,n)=>{var i;let{envKey:a,disableTracking:r}=e,s=pi(e);if(!r&&(a||s)){let{playerInitTime:r,playerSoftwareName:s,playerSoftwareVersion:o,beaconCollectionDomain:l,debug:d,disableCookies:u}=e,c={...e.metadata,video_title:(null==(i=null==e?void 0:e.metadata)?void 0:i.video_title)||void 0},h=t=>"string"!=typeof t.player_error_code&&("function"==typeof e.errorTranslator?e.errorTranslator(t):t);nn.monitor(t,{debug:d,beaconCollectionDomain:l,hlsjs:n,Hls:n?an:void 0,automaticErrorTracking:!1,errorTranslator:h,disableCookies:u,data:{...a?{env_key:a}:{},player_software_name:s,player_software:s,player_software_version:o,player_init_time:r,...c}})}},bi=(e,t,n)=>{var i;let a,r,s=oi(e,t),{src:o}=e,l=()=>{t.ended||!ai(t,n)||(ii(t,n)?t.currentTime=t.buffered.end(t.buffered.length-1):t.dispatchEvent(new Event("ended")))},d=()=>{var e,n;let i=null==(e=ti(t))?void 0:e.start(0),s=null==(n=ti(t))?void 0:n.end(0);(r!==s||a!==i)&&t.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),a=i,r=s};if(bn(t,"durationchange",d),t&&s){let n=fn(e);if("string"==typeof o){let a=()=>{if(ei(t)!==dn.LIVE||Number.isFinite(t.duration))return;let e=setInterval(d,1e3);t.addEventListener("teardown",()=>{clearInterval(e)},{once:!0}),bn(t,"durationchange",()=>{Number.isFinite(t.duration)&&clearInterval(e)})};if("none"===t.preload){let e=()=>{Fn(o,t,n).then(a),t.removeEventListener("loadedmetadata",i)},i=()=>{Fn(o,t,n).then(a),t.removeEventListener("play",e)};bn(t,"play",e,{once:!0}),bn(t,"loadedmetadata",i,{once:!0})}else Fn(o,t,n).then(a);e.drmToken&&ci(e,t),t.setAttribute("src",o),e.startTime&&((null!=(i=Gn.get(t))?i:{}).startTime=e.startTime,t.addEventListener("durationchange",fi,{once:!0}))}else t.removeAttribute("src");t.addEventListener("error",gi),t.addEventListener("error",Ei),t.addEventListener("emptied",()=>{t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})},{once:!0}),bn(t,"pause",l),bn(t,"seeked",l),bn(t,"play",()=>{t.ended||ni(t.currentTime,t.duration)&&(t.currentTime=t.seekable.length?t.seekable.start(0):0)})}else n&&o?(n.once(an.Events.LEVEL_LOADED,(e,i)=>{Kn(i.details,t,n),d(),ei(t)===dn.LIVE&&!Number.isFinite(t.duration)&&(n.on(an.Events.LEVEL_UPDATED,d),bn(t,"durationchange",()=>{Number.isFinite(t.duration)&&n.off(an.Events.LEVELS_UPDATED,d)}))}),n.on(an.Events.ERROR,(e,n)=>{let i={[an.ErrorTypes.NETWORK_ERROR]:sn.MEDIA_ERR_NETWORK,[an.ErrorTypes.MEDIA_ERROR]:sn.MEDIA_ERR_DECODE},a=new sn("",i[n.type]);a.fatal=n.fatal,a.data=n,t.dispatchEvent(new CustomEvent("error",{detail:a}))}),t.addEventListener("error",Ei),bn(t,"waiting",l),wn(e,n),function(e,t){t.on(an.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(n,{tracks:i})=>
2{i.forEach(n=>{var i;let a=null!=(i=n.subtitleTrack)?i:n.closedCaptions,r=t.subtitleTracks.findIndex(({lang:e,name:t,type:i})=>e==(null==a?void 0:a.lang)&&t===n.label&&i.toLowerCase()===n.kind);In(e,n.kind,n.label,null==a?void 0:a.lang,`${n.kind}${r}`)})});let n=()=>{var n;if(!t.subtitleTracks.length)return;let i=Array.from(e.textTracks).find(e=>e.id&&"showing"===e.mode&&["subtitles","captions"].includes(e.kind)),a=`${null==(n=t.subtitleTracks[t.subtitleTrack])?void 0:n.type.toLowerCase()}${t.subtitleTrack}`;if(i&&(t.subtitleTrack<0||(null==i?void 0:i.id)!==a)){let e=t.subtitleTracks.findIndex(({lang:e,name:t,type:n})=>e==i.language&&t===i.label&&n.toLowerCase()===i.kind);t.subtitleTrack=e}i&&(null==i?void 0:i.id)===a&&i.cues&&Array.from(i.cues).forEach(e=>{i.addCue(e)})};e.textTracks.addEventListener("change",n),t.on(an.Events.CUES_PARSED,(t,{track:n,cues:i})=>{let a=e.textTracks.getTrackById(n);if(!a)return;let r="disabled"===a.mode;r&&(a.mode="hidden"),i.forEach(e=>{var t;null!=(t=a.cues)&&t.getCueById(e.id)||a.addCue(e)}),r&&(a.mode="disabled")}),t.once(an.Events.DESTROYING,()=>{e.textTracks.removeEventListener("change",n),e.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})});let i=()=>
2{Array.from(e.textTracks).forEach(t=>{var n,i;if(!["subtitles","caption"].includes(t.kind)&&"thumbnails"===t.label){if(null==(n=t.cues)||!n.length){let t=e.querySelector('track[label="thumbnails"]'),n=null!=(i=null==t?void 0:t.getAttribute("src"))?i:"";null==t||t.removeAttribute("src"),setTimeout(()=>{null==t||t.setAttribute("src",n)},0)}"hidden"!==t.mode&&(t.mode="hidden")}})};t.once(an.Events.MANIFEST_LOADED,i),t.once(an.Events.MEDIA_ATTACHED,i)}(t,n),n.attachMedia(t)):console.error("It looks like the video you're trying to play will not work on this system! If possible, try upgrading to the newest versions of your browser or software.")};function fi(e){var t;let n=e.target,i=null==(t=Gn.get(n))?void 0:t.startTime;if(i&&function(e,t,n){t&&n>t&&(n=t);for(let i=0;i<e.length;i++)if(e.start(i)<=n&&e.end(i)>=n)return!0;return!1}(n.seekable,n.duration,i)){let e="auto"===n.preload;e&&(n.preload="none"),n.currentTime=i,e&&(n.preload="auto")}}async function gi(e){if(!e.isTrusted)return;e.stopImmediatePropagation();let t=e.target;if(null==t||!t.error)return;let{message:n,code:i}=t.error,a=new sn(n,i);if(t.src&&(i!==sn.MEDIA_ERR_DECODE||void 0!==i))try{let{status:e}=await fetch(t.src);a.data={response:{code:e}}}catch{}t.dispatchEvent(new CustomEvent("error",{detail:a}))}function Ei(e){var t,n;if(!(e instanceof CustomEvent&&e.detail instanceof sn))return;let i=e.target,a=e.detail;!a||!a.fatal||((null!=(t=Gn.get(i))?t:{}).error=a,null==(n=i.mux)||n.emit("error",{player_error_code:a.code,player_error_message:a.message,player_error_context:a.context}))}const yi={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},_i={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},Ai={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_PAUSED:"mediaPaused",MEDIA_HAS_P
2LAYED:"mediaHasPlayed",MEDIA_ENDED:"mediaEnded",MEDIA_MUTED:"mediaMuted",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_IS_PIP:"mediaIsPip",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_CHAPTERS_CUES:"mediaChaptersCues"},ki=Object.entries(Ai),wi=ki.reduce((e,[t,n])=>(e[t]=`${n.toLowerCase()}`,e),{}),Ti=ki.reduce((e,[t,n])=>(e[t]=`${n.toLowerCase()}`,e),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),Ii=(Object.entries(Ti).reduce((e,[t,n])=>{const i=wi[t];return i&&(e[n]=i),e},{userinactivechange:"userinactive"}),Object.entries(wi).reduce((e,[t,n])=>{const i=Ti[t];return i&&(e[n]=i),e},{userinactive:"userinactivechange"})),Si={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Ci="disabled",Ri="showing",Li="mouse",xi="touch",Di="unavailable",Mi="unsupported",Ni={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},Oi="fullscreen",Pi={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:e=1}={})=>`current playback rate ${e}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading",SETTINGS:()=>"settings",AUDIO_TRACKS:()=>"audio tracks",QUALITY:()=>"quality"},Ui={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",ENTER_AIRPLAY:()=>"start airplay",EXIT_AIRPLAY:()=>"stop airplay",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:e=30}={})=>`seek forward ${e} seconds`,SEEK_BACK_N_SECS:({seekOffset:e=30}={})=>`seek back ${e} seconds`,SEEK_LIVE:()=>"seek to live",PLAYING_LIVE:()=>"playing live"};function Wi(e){return null==e?void 0:e.split(/\s+/).map(Hi)}function Bi(e){if(e){const{id:t,width:n,height:i}=e;return[t,n,i].filter(e=>null!=e).join(":")}}function Hi(e){if(e){const[t,n,i]=e.split(":");return{id:t,width:n,height:i}}}function qi(e){return null==e?void 0:e.split(/\s+/).map($i)}function Vi(e){if(e){const{id:t,kind:n,language:i,label:a}=e;return[t,n,i,a].filter(e=>null!=e).join(":")}}function $i(e){if(e){const[t,n,i,a]=e.split(":");return{id:t,kind:n,language:i,label:a}}}function Fi(e){return e.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Ki(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}const ji=e=>new Promise(t=>setTimeout(t,e)),Gi=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],Yi=e=>{if(!function(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}(e))return"";const t=Math.abs(e),n=t!==e,i=new Date(0,0,0,0,0,t,0),a=[i.getHours(),i.getMinutes(),i.getSeconds()].map((e,t)=>e&&((e,t)=>`${e} ${1===e?Gi[t].singular:Gi[t].plural}`)(e,t)).filter(e=>e).join(", ");return`${a}${n?" remaining":""}`};function Zi(e,t){let n=!1;e<0&&(n=!0,e=0-e),e=e<0?0:e;let i=Math.floor(e%60),a=Math.floor(e/60%60),r=Math.floor(e/3600);const s=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=a=i="0"),r=r>0||o>0?r+":":"",a=((r||s>=10)&&a<10?"0"+a:a)+":",i=i<10?"0"+i:i,(n?"-":"")+r+a+i}Object.freeze({length:0,start(e){const t=e>>>0;
2if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){const t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});class Qi{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class zi extends Qi{}const Xi={createElement:function(){return new Ji.HTMLElement},createElementNS:function(){return new Ji.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(e){return!1}},Ji={ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},document:Xi,Node:zi,HTMLElement:class extends zi{},DocumentFragment:class extends Qi{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(e){return null},setItem(e,t){},removeItem(e){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(e){return{matches:!1,media:e}}},ea="undefined"==typeof window||void 0===window.customElements,ta=Object.keys(Ji).every(e=>e in globalThis),na=ea&&!ta?Ji:globalThis,ia=ea&&!ta?Xi:globalThis.document,aa=new WeakMap,ra=e=>{let t=aa.get(e);return t||aa.set(e,t=new Set),t},sa=new na.ResizeObserver(e=>{for(let t of e)for(let e of ra(t.target))e(t)});function oa(e,t){ra(e).add(t),sa.observe(e)}function la(e,t){const n=ra(e);n.delete(t),n.size||sa.unobserve(e)}function da(e){var t;return null!=(t=ua(e))?t:pa(e,"media-controller")}function ua(e){var t;const{MEDIA_CONTROLLER:n}=_i,i=e.getAttribute(n);if(i)return null==(t=ba(e))?void 0:t.getElementById(i)}const ca=(e,t,n=".value")=>{const i=e.querySelector(n);i&&(i.textContent=t)},ha=(e,t)=>((e,t)=>{const n=`slot[name="${t}"]`,i=e.shadowRoot.querySelector(n);return i?i.children:[]})(e,t)[0],ma=(e,t)=>!(!e||!t)&&(!!(null==e?void 0:e.contains(t))||ma(e,t.getRootNode().host)),pa=(e,t)=>{if(!e)return null;const n=e.closest(t);return n||pa(e.getRootNode().host,t)};function va(e=document){var t;const n=null==e?void 0:e.activeElement;return n?null!=(t=va(n.shadowRoot))?t:n:null}function ba(e){var t;const n=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e);return n instanceof ShadowRoot||n instanceof Document?n:null}function fa(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ga(e,t){const n=function(e,t){var n;let i;for(i of e.querySelectorAll("style")){let e;try{e=null==(n=i.sheet)?void 0:n.cssRules}catch{continue}for(let n of null!=e?e:[])if(t(n.selectorText))return n}}(e,e=>e===t);return n||Ea(e,t)}function Ea(e,t){var n,i;const a=null!=(n=e.querySelectorAll("style"))?n:[],r=null==a?void 0:a[a.length-1];return(null==r?void 0:r.sheet)?(null==r||r.sheet.insertRule(`${t}{}`,r.sheet.cssRules.length),null==(i=r.sheet.cssRules)?void 0:i[r.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function ya(e,t,n=Number.NaN){const i=e.getAttribute(t);return null!=i?+i:n}function _a(e,t,n){const i=+n;null==n||Number.isNaN(i)?e.hasAttribute(t)&&e.removeAttribute(t):ya(e,t,void 0)!==i&&e.setAttribute(t,`${i}`)}function Aa(e,t){return e.hasAttribute(t)}function ka(e,t,n){null!=n?Aa(e,t)!=n&&e.toggleAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function wa(e,t,n=null){var i;return null!=(i=e.getAttribute(t))?i:n}function Ta(e,t,n){if(null==n)return void(e.hasAttribute(t)&&e.removeAttribute(t));const i=`${n}`;wa(e,t,void 0)!==i&&e.setAttribute(t,i)}var Ia,Sa=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ca=(e,t,n)=>(Sa(e,t,"read from private field"),n?n.call(e):t.get(e)),Ra=(e,t,n,i)=>(Sa(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const La=ia.createElement("template");La.innerHTML="\n<style>\n :host {\n display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));\n box-sizing: border-box;\n }\n</style>\n";class xa extends na.HTMLElement{constructor(e={}){if(super(),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,Ia,void 0),!this.shadowRoot){const t=this.attachShadow({mode:"open"}),n=La.content.cloneNode(!0);this.nativeEl=n;let i=e.slotTemplate;i||(i=ia.createElement("template"),i.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(i.content.cloneNode(!0)),t.appendChild(n)}}static get observedAttributes(){return[_i.MEDIA_CONTROLLER,wi.MEDIA_PAUSED]}attributeChangedCallback(e,t,n){var i,a,r,s,o;e===_i.MEDIA_CONTROLLER&&(t&&(null==(a=null==(i=Ca(this,Ia))?void 0:i.unassociateElement)||a.call(i,this),Ra(this,Ia,null)),n&&this.isConnected&&(Ra(this,Ia,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(o=null==(s=Ca(this,Ia))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,n,i;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),Ra(this,Ia,function(e){var t;const n=e.getAttribute(_i.MEDIA_CONTROLLER);if(n)return null==(t=e.getRootNode())?void 0:t.getElementById(n);return pa(e,"media-controller")}(this)),this.getAttribute(_i.MEDIA_CONTROLLER)&&(null==(t=null==(e=Ca(this,Ia))?void 0:e.associateElement)||t.call(e,this)),null==(n=Ca(this,Ia))||n.addEventListener("pointerdown",this),null==(i=Ca(this,Ia))||i.addEventListener("click",this)}disconnectedCallback(){var e,t,n,i;this.getAttribute(_i.MEDIA_CONTROLLER)&&(null==(t=null==(e=Ca(this,Ia))?void 0:e.unassociateElement)||t.call(e,this)),null==(n=Ca(this,Ia))||n.removeEventListener("pointerdown",this),null==(i=Ca(this,Ia))||i.removeEventListener("click",this),Ra(this,Ia,null)}handleEvent(e){var t;const n=null==(t=e.composedPath())?void 0:t[0];if(["video","media-controller"].includes(null==n?void 0:n.localName))if("pointerdown"===e.type)this._pointerType=e.pointerType;else if("click"===e.type){const{clientX:t,clientY:n}=e,{left:i,top:a,width:r,height:s}=this.getBoundingClientRect(),o=t-i,l=n-a;if(o<0||l<0||o>r||l>s||0===r&&0===s)return;const{pointerType:d=this._pointerType}=e;if(this._pointerType=void 0,d===xi)return void this.handleTap(e);if(d===Li)return void this.handleMouseClick(e)}}get mediaPaused(){return Aa(this,wi.MEDIA_PAUSED)}set mediaPaused(e){ka(this,wi.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){const t=this.mediaPaused?yi.MEDIA_PLAY_REQUEST:yi.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new na.CustomEvent(t,{composed:!0,bubbles:!0}))}}Ia=new WeakMap,na.customElements.get("media-gesture-receiver")||na.customElements.define("media-gesture-receiver",xa);var Da,Ma,Na,Oa,Pa,Ua,Wa,Ba,Ha,qa,Va,$a,Fa=Object.defineProperty,Ka=(e,t,n)=>(((e,t,n)=>{t in e?Fa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),ja=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ga=(e,t,n)=>(ja(e,t,"read from private field"),n?n.call(e):t.get(e)),Ya=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Za=(e,t,n,i)=>(ja(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Qa=(e,t,n)=>(ja(e,t,"access private method"),n);const za={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive"},Xa=ia.createElement("template");Xa.innerHTML=`\n <style>\n \n :host([${wi.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {\n outline: none;\n }\n\n :host {\n box-sizing: border-box;\n position: relative;\n display: inline-block;\n line-height: 0;\n background-color: var(--media-background-color, #000);\n }\n\n :host(:not([${za.AUDIO}])) [part~=layer]:not([part~=media-layer]) {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: flex;\n flex-flow: column nowrap;\n align-items: start;\n pointer-events: none;\n background: none;\n }\n\n slot[name=media] {\n display: var(--media-slot-display, contents);\n }\n\n \n :host([${za.AUDIO}]) slot[name=media] {\n display: var(--media-slot-display, none);\n }\n\n \n :host([${za.AUDIO}]) [part~=layer][part~=gesture-layer] {\n height: 0;\n display: block;\n }\n\n \n :host(:not([${za.AUDIO}])[${za.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),\n :host(:not([${za.AUDIO}])[${za.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {\n display: none;\n }\n\n \n ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([hidden])) {\n pointer-events: auto;\n }\n\n :host(:not([${za.AUDIO}])) *[part~=layer][part~=centered-layer] {\n align-items: center;\n justify-content: center;\n }\n\n :host(:not([${za.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),\n :host(:not([${za.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {\n align-self: stretch;\n flex-grow: 1;\n }\n\n slot[name=middle-chrome] {\n display: inline;\n flex-grow: 1;\n pointer-events: none;\n background: none;\n }\n\n \n ::slotted([slot=media]),\n ::slotted([slot=poster]) {\n width: 100%;\n height: 100%;\n }\n\n \n :host(:not([${za.AUDIO}])) .spacer {\n flex-grow: 1;\n }\n\n \n :host(:-webkit-full-screen) {\n \n width: 100% !important;\n height: 100% !important;\n }\n\n \n ::slotted(:not([slot=media]):not([slot=poster]):not([${za.NO_AUTOHIDE}]):not([hidden])) {\n opacity: 1;\n transition: opacity 0.25s;\n }\n\n \n :host([${za.USER_INACTIVE}]:not([${wi.MEDIA_PAUSED}]):not([${wi.MEDIA_IS_AIRPLAYING}
2]):not([${wi.MEDIA_IS_CASTING}]):not([${za.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${za.NO_AUTOHIDE}])) {\n opacity: 0;\n transition: opacity 1s;\n }\n\n :host([${za.USER_INACTIVE}]:not([${wi.MEDIA_PAUSED}]):not([${wi.MEDIA_IS_CASTING}]):not([${za.AUDIO}])) ::slotted([slot=media]) {\n cursor: none;\n }\n\n ::slotted(media-control-bar) {\n align-self: stretch;\n }\n\n \n :host(:not([${za.AUDIO}])[${wi.MEDIA_HAS_PLAYED}]) slot[name=poster] {\n display: none;\n }\n\n ::slotted([role="menu"]) {\n align-self: end;\n }\n\n ::slotted([role="dialog"]) {\n align-self: center;\n }\n </style>\n\n <slot name="media" part="layer media-layer"></slot>\n <slot name="poster" part="layer poster-layer"></slot>\n <slot name="gestures-chrome" part="layer gesture-layer">\n <media-gesture-receiver slot="gestures-chrome"></media-gesture-receiver>\n </slot>\n <span part="layer vertical-layer">\n <slot name="top-chrome" part="top chrome"></slot>\n <slot name="middle-chrome" part="middle chrome"></slot>\n <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>\n \n <slot part="bottom chrome"></slot>\n </span>\n`;const Ja=Object.values(wi),er="sm:384 md:576 lg:768 xl:960";function tr(e){!function(e,t){var n;if(!e.isConnected)return;const i=null!=(n=e.getAttribute(za.BREAKPOINTS))?n:er,a=function(e){const t=e.split(/\s+/);return Object.fromEntries(t.map(e=>e.split(":")))}(i),r=function(e,t){return Object.keys(e).filter(n=>t>=e[n])}(a,t);let s=!1;if(Object.keys(a).forEach(t=>{r.includes(t)?e.hasAttribute(`breakpoint${t}`)||(e.setAttribute(`breakpoint${t}`,""),s=!0):e.hasAttribute(`breakpoint${t}`)&&(e.removeAttribute(`breakpoint${t}`),s=!0)}),s){const t=new CustomEvent(Ti.BREAKPOINTS_CHANGE,{detail:r});e.dispatchEvent(t)}}(e.target,e.contentRect.width)}class nr extends na.HTMLElement{constructor(){super(),Ya(this,Na),Ya(this,Pa),Ya(this,Wa),Ya(this,Ha),Ya(this,Va),Ya(this,Da,0),Ya(this,Ma,void 0),Ka(this,"breakpointsComputed",!1),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Xa.content.cloneNode(!0)));new MutationObserver(e=>{const t=this.media;for(let n of e)"childList"===n.type&&(n.removedNodes.forEach(e=>{if("media"==e.slot&&n.target==this){let i=n.previousSibling&&n.previousSibling.previousElementSibling;if(i&&t){let t="media"!==i.slot;for(;null!==(i=i.previousSibling);)"media"==i.slot&&(t=!1);t&&this.mediaUnsetCallback(e)}else this.mediaUnsetCallback(e)}}),t&&n.addedNodes.forEach(e=>{e===t&&this.handleMediaUpdated(t)}))}).observe(this,{childList:!0,subtree:!0});let e=!1;oa(this,t=>{e||(setTimeout(()=>{tr(t),e=!1,this.breakpointsComputed||(this.breakpointsComputed=!0,this.dispatchEvent(new CustomEvent(Ti.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))},0),e=!0)});let t=this.querySelector(":scope > slot[slot=media]");t&&t.addEventListener("slotchange",()=>{t.assignedElements({flatten:!0}).length?this.handleMediaUpdated(this.media):Ga(this,Ma)&&this.mediaUnsetCallback(Ga(this,Ma))})}static get observedAttributes(){return[za.AUTOHIDE,za.GESTURES_DISABLED].concat(Ja).filter(e=>![wi.MEDIA_RENDITION_LIST,wi.MEDIA_AUDIO_TRACK_LIST,wi.MEDIA_CHAPTERS_CUES].includes(e))}attributeChangedCallback(e,t,n){e.toLowerCase()==za.AUTOHIDE&&(this.autohide=n)}get media(){let e=this.querySelector(":scope > [slot=media]");return"SLOT"==(null==e?void 0:e.nodeName)&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(Za(this,Ma,e),e.localName.includes("-")&&await na.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;const t=null!=this.getAttribute(za.AUDIO)?Pi.AUDIO_PLAYER():Pi.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.handleMediaUpdated(this.media),this.setAttribute(za.USER_INACTIVE,""),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=na.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;this.media&&this.mediaUnsetCallback(this.media),null==(e=na.window)||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){Za(this,Ma,null)}handleEvent(e){switch(e.type){case"pointerdown":Za(this,Da,e.timeStamp);break;case"pointermove":Qa(this,Na,Oa).call(this,e);break;case"pointerup":Qa(this,Pa,Ua).call(this,e);break;case"mouseleave":Qa(this,Wa,Ba).call(this);break;case"mouseup":this.removeAttribute(za.KEYBOARD_CONTROL);break;case"keyup":Qa(this,Va,$a).call(this),this.setAttribute(za.KEYBOARD_CONTROL,"")}}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return void 0===this._autohide?2:this._autohide}}Da=new WeakMap,Ma=new WeakMap,Na=new WeakSet,Oa=function(e){if("mouse"!==e.pointerType){const t=250;if(e.timeStamp-Ga(this,Da)<t)return}Qa(this,Ha,qa).call(this),clearTimeout(this._inactiveTimeout),[this,this.media].includes(e.target)&&Qa(this,Va,$a).call(this)},Pa=new WeakSet,Ua=function(e){if("touch"===e.pointerType){const t=!this.hasAttribute(za.USER_INACTIVE);[this,this.media].includes(e.target)&&t?Qa(this,Wa,Ba).call(this):Qa(this,Va,$a).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&Qa(this,Va,$a).call(this)},Wa=new WeakSet,Ba=function(){if(this.autohide<0)return;if(this.hasAttribute(za.USER_INACTIVE))return;this.setAttribute(za.USER_INACTIVE,"");const e=new na.CustomEvent(Ti.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},Ha=new WeakSet,qa=function(){if(!this.hasAttribute(za.USER_INACTIVE))return;this.removeAttribute(za.USER_INACTIVE);const e=new na.CustomEvent(Ti.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},Va=new WeakSet,$a=function(){Qa(this,Ha,qa).call(this),clearTimeout(this._inactiveTimeout),this.autohide<0||(this._inactiveTimeout=setTimeout(()=>{Qa(this,Wa,Ba).call(this)},1e3*this.autohide))},na.customElements.get("media-container")||na.customElements.define("media-container",nr);
2var ir,ar,rr,sr,or,lr,dr=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ur=(e,t,n)=>(dr(e,t,"read from private field"),n?n.call(e):t.get(e)),cr=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},hr=(e,t,n,i)=>(dr(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class mr{constructor(e,t,{defaultValue:n}={defaultValue:void 0}){cr(this,or),cr(this,ir,void 0),cr(this,ar,void 0),cr(this,rr,void 0),cr(this,sr,new Set),hr(this,ir,e),hr(this,ar,t),hr(this,rr,new Set(n))}[Symbol.iterator](){return ur(this,or,lr).values()}get length(){return ur(this,or,lr).size}get value(){var e;return null!=(e=[...ur(this,or,lr)].join(" "))?e:""}set value(e){var t;e!==this.value&&(hr(this,sr,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...ur(this,or,lr)][e]}values(){return ur(this,or,lr).values()}forEach(e){ur(this,or,lr).forEach(e)}add(...e){var t,n;e.forEach(e=>ur(this,sr).add(e)),(""!==this.value||(null==(t=ur(this,ir))?void 0:t.hasAttribute(`${ur(this,ar)}`)))&&(null==(n=ur(this,ir))||n.setAttribute(`${ur(this,ar)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>ur(this,sr).delete(e)),null==(t=ur(this,ir))||t.setAttribute(`${ur(this,ar)}`,`${this.value}`)}contains(e){return ur(this,or,lr).has(e)}toggle(e,t){return void 0!==t?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){return this.remove(e),this.add(t),e===t}}ir=new WeakMap,ar=new WeakMap,rr=new WeakMap,sr=new WeakMap,or=new WeakSet,lr=function(){return ur(this,sr).size?ur(this,sr):ur(this,rr)};const pr=(e="")=>{let[t,n,i]=e.split(":");return t="cc"===t?"captions":"subtitles",{kind:t,language:n,label:i?decodeURIComponent(i):void 0}},vr=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{const n=pr(e);return{...t,...n}}),br=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?pr(e):e):"string"==typeof e?vr(e):[e]:[],fr=({kind:e,label:t,language:n}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${n}:${encodeURIComponent(t)}`:n,gr=(e=[])=>Array.prototype.map.call(e,fr).join(" "),Er=e=>{const t=Object.entries(e).map(([e,t])=>((e,t)=>n=>n[e]===t)(e,t));return e=>t.every(t=>t(e))},yr=(e,t=[],n=[])=>{const i=br(n).map(Er);Array.from(t).filter(e=>i.some(t=>t(e))).forEach(t=>{t.mode=e})},_r=(e,t=()=>!0)=>{if(!(null==e?void 0:e.textTracks))return[];const n="function"==typeof t?t:Er(t);return Array.from(e.textTracks).filter(n)},Ar=e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(wi.MEDIA_SUBTITLES_SHOWING)},kr="exitFullscreen"in ia?"exitFullscreen":"webkitExitFullscreen"in ia?"webkitExitFullscreen":"webkitCancelFullScreen"in ia?"webkitCancelFullScreen":void 0,wr="fullscreenElement"in ia?"fullscreenElement":"webkitFullscreenElement"in ia?"webkitFullscreenElement":void 0,Tr=e=>{var t;const{media:n,documentElement:i,fullscreenElement:a=n}=e;if(!n||!i)return!1;const r=(e=>{const{documentElement:t,media:n}=e,i=null==t?void 0:t[wr];return!i&&"webkitDisplayingFullscreen"in n&&"webkitPresentationMode"in n&&n.webkitDisplayingFullscreen&&n.webkitPresentationMode===Oi?n:i})(e);if(!r)return!1;if(r===a||r===n)return!0;if(r.localName.includes("-")){let e=r.shadowRoot;if(!(wr in e))return ma(r,a);for(;null==e?void 0:e[wr];){if(e[wr]===a)return!0;e=null==(t=e[wr])?void 0:t.shadowRoot}}return!1},Ir="fullscreenEnabled"in ia?"fullscreenEnabled":"webkitFullscreenEnabled"in ia?"webkitFullscreenEnabled":void 0;let Sr;const Cr=()=>{var e,t;return Sr||(Sr=null==(t=null==(e=ia)?void 0:e.createElement)?void 0:t.call(e,"video"),Sr)},Rr=/.*Version\/.*Safari\/.*/.test(na.navigator.userAgent),Lr=(e=Cr())=>(!na.matchMedia("(display-mode: standalone)").matches||!Rr)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),xr=(e=Cr())=>(e=>{const{documentElement:t,media:n}=e;return!!(null==t?void 0:t[Ir])||n&&"webkitSupportsFullscreen"in n})({documentElement:ia,media:e}),Dr=xr(),Mr=Lr(),Nr=!!na.WebKitPlaybackTargetAvailabilityEvent,Or=!!na.chrome,Pr=e=>_r(e.media,e=>[Si.SUBTITLES,Si.CAPTIONS].includes(e.kind)).sort((e,t)=>
2e.kind>=t.kind?1:-1),Ur=e=>_r(e.media,e=>e.mode===Ri&&[Si.SUBTITLES,Si.CAPTIONS].includes(e.kind)),Wr=(e,t)=>{const n=Pr(e),i=Ur(e),a=!!i.length;if(n.length)if(!1===t||a&&!0!==t)yr(Ci,n,i);else if(!0===t||!a&&!1!==t){let t=n[0];const{options:a}=e;if(!(null==a?void 0:a.noSubtitlesLangPref)){const e=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),i=e?[e,...globalThis.navigator.languages]:globalThis.navigator.languages,a=n.filter(e=>i.some(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))).sort((e,t)=>i.findIndex(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))-i.findIndex(e=>t.language.toLowerCase().startsWith(e.split("-")[0])));a[0]&&(t=a[0])}const{language:r,label:s,kind:o}=t;yr(Ci,n,i),yr(Ri,n,[{language:r,label:s,kind:o}])}},Br=(e,t)=>e===t||typeof e==typeof t&&(!("number"!=typeof e||!Number.isNaN(e)||!Number.isNaN(t))||"object"==typeof e&&(Array.isArray(e)?Hr(e,t):Object.entries(e).every(([e,n])=>e in t&&Br(n,t[e])))),Hr=(e,t)=>{const n=Array.isArray(e),i=Array.isArray(t);return n===i&&(!n&&!i||e.length===t.length&&e.every((e,n)=>Br(e,t[n])))},qr=Object.values(Ni);let Vr;const $r=(async(e=Cr())=>{if(!e)return!1;const t=e.volume;return e.volume=t/2+.1,await ji(0),e.volume!==t})().then(e=>(Vr=e,Vr)),Fr={mediaPaused:{get(e){var t;const{media:n}=e;return null==(t=null==n?void 0:n.paused)||t},set(e,t){var n;const{media:i}=t;i&&(e?i.pause():null==(n=i.play())||n.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(e,t){const{media:n}=e;return!!n&&(t?"playing"===t.type:!n.paused)},mediaEvents:["playing","emptied"]},mediaEnded:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.ended)&&t},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.playbackRate)?t:1},set(e,t){const{media:n}=t;n&&Number.isFinite(+e)&&(n.playbackRate=+e)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.muted)&&t},set(e,t){const{media:n}=t;n&&(n.muted=e)},mediaEvents:["volumechange"]},mediaVolume:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.volume)?t:1},set(e,t){const{media:n}=t;if(n){try{null==e?na.localStorage.removeItem("media-chrome-pref-volume"):na.localStorage.setItem("media-chrome-pref-volume",e.toString())}catch(i){}Number.isFinite(+e)&&(n.volume=+e)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{const{options:{noVolumePref:n}}=t;if(!n)try{const n=na.localStorage.getItem("media-chrome-pref-volume");if(null==n)return;Fr.mediaVolume.set(+n,t),e(n)}catch(i){console.debug("Error getting volume pref",i)}}]},mediaVolumeLevel:{get(e){const{media:t}=e;return void 0===(null==t?void 0:t.volume)?"high":t.muted||0===t.volume?"off":t.volume<.5?"low":t.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.currentTime)?t:0},set(e,t){const{media:n}=t;n&&0!==n.readyState&&(n.currentTime=e)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(e){const{media:t,options:{defaultDuration:n}={}}=e;return!n||t&&t.duration&&!Number.isNaN(t.duration)&&Number.isFinite(t.duration)?Number.isFinite(null==t?void 0:t.duration)?t.duration:Number.NaN:n},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(e){const{media:t}=e;return(null==t?void 0:t.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(e){var t;const{media:n}=e;if(!(null==(t=null==n?void 0:n.seekable)?void 0:t.length))return;const i=n.seekable.start(0),a=n.seekable.end(n.seekable.length-1);return i||a?[Number(i.toFixed(3)),Number(a.toFixed(3))]:void 0},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(e){var t;const{media:n}=e,i=null!=(t=null==n?void 0:n.buffered)?t:[];return Array.from(i).map((e,t)=>[Number(i.start(t).toFixed(3)),Number(i.end(t).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(e){const{media:t,options:{defaultStreamType:n}={}}=e,i=[Ni.LIVE,Ni.ON_DEMAND].includes(n)?n:void 0;if(!t)return i;const{streamType:a}=t;if(qr.includes(a))return a===Ni.UNKNOWN?i:a;const r=t.duration;return r===1/0?Ni.LIVE:Number.isFinite(r)?Ni.ON_DEMAND:i}
2,mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(e){const{media:t}=e;if(!t)return Number.NaN;const{targetLiveWindow:n}=t,i=Fr.mediaStreamType.get(e);return null!=n&&!Number.isNaN(n)||i!==Ni.LIVE?n:0},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(e){const{media:t,options:{liveEdgeOffset:n=10}={}}=e;if(!t)return!1;if("number"==typeof t.liveEdgeStart)return!Number.isNaN(t.liveEdgeStart)&&t.currentTime>=t.liveEdgeStart;if(!(Fr.mediaStreamType.get(e)===Ni.LIVE))return!1;const i=t.seekable;if(!i)return!0;if(!i.length)return!1;const a=i.end(i.length-1)-n;return t.currentTime>=a},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(e){return Pr(e).map(({kind:e,label:t,language:n})=>({kind:e,label:t,language:n}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(e){return Ur(e).map(({kind:e,label:t,language:n})=>({kind:e,label:t,language:n}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var n,i;const{media:a,options:r}=t;if(!a)return;const s=e=>{var n;if(!r.defaultSubtitles)return;e&&![Si.CAPTIONS,Si.SUBTITLES].includes(null==(n=null==e?void 0:e.track)?void 0:n.kind)||Wr(t,!0)};return null==(n=a.textTracks)||n.addEventListener("addtrack",s),null==(i=a.textTracks)||i.addEventListener("removetrack",s),s(),()=>{var e,t;null==(e=a.textTracks)||e.removeEventListener("addtrack",s),null==(t=a.textTracks)||t.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(e){var t;const{media:n}=e;if(!n)return[];const[i]=_r(n,{kind:Si.CHAPTERS});return Array.from(null!=(t=null==i?void 0:i.cues)?t:[]).map(({text:e,startTime:t,endTime:n})=>({text:e,startTime:t,endTime:n}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{const{media:n}=t;if(!n)return;const i=n.querySelector('track[kind="chapters"][default][src]');return null==i||i.addEventListener("load",e),()=>{null==i||i.removeEventListener("load",e)}}]},mediaIsPip:{get(e){var t,n;const{media:i,documentElement:a}=e;if(!i||!a)return!1;if(!a.pictureInPictureElement)return!1;if(a.pictureInPictureElement===i)return!0;if(a.pictureInPictureElement instanceof HTMLMediaElement)return!!(null==(t=i.localName)?void 0:t.includes("-"))&&ma(i,a.pictureInPictureElement);if(a.pictureInPictureElement.localName.includes("-")){let e=a.pictureInPictureElement.shadowRoot;for(;null==e?void 0:e.pictureInPictureElement;){if(e.pictureInPictureElement===i)return!0;e=null==(n=e.pictureInPictureElement)?void 0:n.shadowRoot}}return!1},set(e,t){const{media:n}=t;if(n)if(e){if(!ia.pictureInPictureEnabled)return void console.warn("MediaChrome: Picture-in-picture is not enabled");if(!n.requestPictureInPicture)return void console.warn("MediaChrome: The current media does not support picture-in-picture");const e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};n.requestPictureInPicture().catch(t=>{if(11!==t.code)throw t;if(n.src){if(0!==n.readyState||"none"!==n.preload)throw t;{const t=()=>{n.removeEventListener("loadedmetadata",i),n.preload="none"},i=()=>{n.requestPictureInPicture().catch(e),t()};n.addEventListener("loadedmetadata",i),n.preload="metadata",setTimeout(()=>{0===n.readyState&&e(),t()},1e3)}}else console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.")})}else ia.pictureInPictureElement&&ia.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(e){var t;const{media:n}=e;return[...null!=(t=null==n?void 0:n.videoRenditions)?t:[]].map(e=>({...e}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(e){var t,n,i;const{media:a}=e;return null==(i=null==(n=null==a?void 0:a.videoRenditions)?void 0:n[null==(t=a.videoRenditions)?void 0:t.selectedIndex])?void 0:i.id},set(e,t){const{media:n}=t;if(!(null==n?void 0:n.videoRenditions))return void console.warn("MediaController: Rendition selection not supported by this media.");const i=e,a=Array.prototype.findIndex.call(n.videoRenditions,e=>e.id==i);n.videoRenditions.selectedIndex!=a&&(n.videoRenditions.selectedIndex=a)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(e){var t;const{media:n}=e;return[...null!=(t=null==n?void 0:n.audioTracks)?t:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(e){var t,n;const{media:i}=e;return null==(n=[...null!=(t=null==i?void 0:i.audioTracks)?t:[]].find(e=>e.enabled))?void 0:n.id},set(e,t){const{media:n}=t;if(!(null==n?void 0:n.audioTracks))return void console.warn("MediaChrome: Audio track selection not supported by this media.");const i=e;for(let a of n.audioTracks)a.enabled=i==a.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(e){return Tr(e)},set(e,t){e?(e=>{var t;const{media:n,fullscreenElement:i}=e,a=i&&"requestFullscreen"in i?"requestFullscreen":i&&"webkitRequestFullScreen"in i?"webkitRequestFullScreen":void 0;if(a){const e=null==(t=i[a])?void 0:t.call(i);if(e instanceof Promise)e.catch(()=>{})}else(null==n?void 0:n.webkitEnterFullscreen)?n.webkitEnterFullscreen():(null==n?void 0:n.requestFullscreen)&&n.requestFullscreen()})(t):(e=>{var t;const{documentElement:n}=e;if(kr){const e=null==(t=null==n?void 0:n[kr])?void 0:t.call(n);if(e instanceof Promise)e.catch(()=>{})}})(t)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(e){var t;const{media:n}=e;return!(!(null==n?void 0:n.remote)||"disconnected"===(null==(t=n.remote)?void 0:t.state))&&!!n.remote.state},set(e,t){var n,i;const{media:a}=t;a&&(e&&"disconnected"!==(null==(n=a.remote)?void 0:n.state)||(e||"connected"===(null==(i=a.remote)?void 0:i.state))&&("function"==typeof a.remote.prompt?a.remote.prompt().catch(()=>{}):console.warn("MediaChrome: Casting is not supported in this environment")))},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(e,t){const{media:n}=t;n&&(n.webkitShowPlaybackTargetPicker&&na.WebKitPlaybackTargetAvailabilityEvent?n.webkitShowPlaybackTargetPicker():console.warn("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment"))},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(e){const{media:t}=e;if(!Dr||!xr(t))return Mi}},mediaPipUnavailable:{get(e){const{media:t}=e;if(!Mr||!Lr(t))return Mi}},mediaVolumeUnavailable:{get(e){const{media:t}=e;if(!1===Vr||null==(null==t?void 0:t.volume))return Mi},stateOwnersUpdateHandlers:[e=>{null==Vr&&$r.then(t=>e(t?void 0:Mi))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var n;const{media:i}=e;return Or&&(null==(n=null==i?void 0:i.remote)?void 0:n.state)?null!=t&&"available"!==t?Di:void 0:Mi},stateOwnersUpdateHandlers:[(e,t)=>{var n;const{media:i}=t;if(!i)return;return i.disableRemotePlayback||i.hasAttribute("disableremoteplayback")||null==(n=null==i?void 0:i.remote)||n.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==i?void 0:i.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaAirplayUnavailable:{get(e,t){return Nr?"not-available"===(null==t?void 0:t.availability)?Di:void 0:Mi},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(e,t)=>{var n;const{media:i}=t;if(!i)return;return i.disableRemotePlayback||i.hasAttribute("disableremoteplayback")||null==(n=null==i?void 0:i.remote)||n.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==i?void 0:i.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaRenditionUnavailable:{get(e){var t;const{media:n}=e;return(null==n?void 0:n.videoRenditions)?(null==(t=n.videoRenditions)?void 0:t.length)?void 0:Di:Mi},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(e){var t,n;const{media:i}=e;return(null==i?void 0:i.audioTracks)?(null!=(n=null==(t=i.audioTracks)?void 0:t.length)?n:0)<=1?Di:void 0:Mi},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]}},Kr={[yi.MEDIA_PREVIEW_REQUEST](e,t,{detail:n}){var i,a,r;const{media:s}=t,o=null!=n?n:void 0;let l,d;if(s&&null!=o){const[e]=_r(s,{kind:Si.METADATA,label:"thumbnails"}),t=Array.prototype.find.call(null!=(i=null==e?void 0:e.cues)?i:[],(e,t,n)=>0===t?e.endTime>
2o:t===n.length-1?e.startTime<=o:e.startTime<=o&&e.endTime>o);if(t){const e=/'^(?:[a-z]+:)?\/\//i.test(t.text)||null==(a=null==s?void 0:s.querySelector('track[label="thumbnails"]'))?void 0:a.src,n=new URL(t.text,e);d=new URLSearchParams(n.hash).get("#xywh").split(",").map(e=>+e),l=n.href}}const u=e.mediaDuration.get(t);let c=null==(r=e.mediaChaptersCues.get(t).find((e,t,n)=>t===n.length-1&&u===e.endTime?e.startTime<=o&&e.endTime>=o:e.startTime<=o&&e.endTime>o))?void 0:r.text;return null!=n&&null==c&&(c=""),{mediaPreviewTime:o,mediaPreviewImage:l,mediaPreviewCoords:d,mediaPreviewChapter:c}},[yi.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[yi.MEDIA_PLAY_REQUEST](e,t){var n;if(e.mediaStreamType.get(t)===Ni.LIVE){const i=!(e.mediaTargetLiveWindow.get(t)>0),a=null==(n=e.mediaSeekable.get(t))?void 0:n[1];i&&a&&e.mediaCurrentTime.set(a,t)}e.mediaPaused.set(!1,t)},[yi.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:n}){const i=n;e.mediaPlaybackRate.set(i,t)},[yi.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[yi.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[yi.MEDIA_VOLUME_REQUEST](e,t,{detail:n}){const i=n;i&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(i,t)},[yi.MEDIA_SEEK_REQUEST](e,t,{detail:n}){const i=n;e.mediaCurrentTime.set(i,t)},[yi.MEDIA_SEEK_TO_LIVE_REQUEST](e,t){var n;const i=null==(n=e.mediaSeekable.get(t))?void 0:n[1];Number.isNaN(Number(i))&&e.mediaCurrentTime.set(i,t)},[yi.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:n}){var i;const{options:a}=t,r=Pr(t),s=br(n),o=null==(i=s[0])?void 0:i.language;o&&!a.noSubtitlesLangPref&&na.localStorage.setItem("media-chrome-pref-subtitles-lang",o),yr(Ri,r,s)},[yi.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:n}){const i=Pr(t);yr(Ci,i,null!=n?n:[])},[yi.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:n}){Wr(t,n)},[yi.MEDIA_RENDITION_REQUEST](e,t,{detail:n}){const i=n;e.mediaRenditionSelected.set(i,t)},[yi.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:n}){const i=n;e.mediaAudioTrackEnabled.set(i,t)},[yi.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[yi.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[yi.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t)},[yi.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[yi.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[yi.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[yi.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}};var jr,Gr,Yr,Zr,Qr,zr,Xr,Jr,es,ts,ns,is,as=({media:e,fullscreenElement:t,documentElement:n,stateMediator:i=Fr,requestMap:a=Kr,options:r={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{const o=[],l={options:{...r}};let d=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0});const u=e=>{null!=e&&(Br(e,d)||(d=Object.freeze({...d,...e}),o.forEach(e=>e(d))))},c=()=>{const e=Object.entries(i).reduce((e,[t,{get:n}])=>(e[t]=n(l),e),{});u(e)},h={};let m;const p=async(e,t)=>{var n,a,r,d,p,v,b,f,g,E,y,_,A,k,w,T;const I=!!m;if(m={...l,...null!=m?m:{},...e},I)return;await(async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof na.HTMLElement))return;const t=e.localName;if(!t.includes("-"))return;const n=na.customElements.get(t);n&&e instanceof n||(await na.customElements.whenDefined(t),na.customElements.upgrade(e))}))})(...Object.values(e));const S=o.length>0&&0===t&&s,C=l.media!==m.media,R=(null==(n=l.media)?void 0:n.textTracks)!==(null==(a=m.media)?void 0:a.textTracks),L=(null==(r=l.media)?void 0:r.videoRenditions)!==(null==(d=m.media)?void 0:d.videoRenditions),x=(null==(p=l.media)?void 0:p.audioTracks)!==(null==(v=m.media)?void 0:v.audioTracks),D=(null==(b=l.media)?void 0:b.remote)!==(null==(f=m.media)?void 0:f.remote),M=l.documentElement!==m.documentElement,N=!!l.media&&(C||S),O=!!(null==(g=l.media)?void 0:g.textTracks)&&(R||S),P=!!(null==(E=l.media)?void 0:E.videoRenditions)&&(L||S),U=!!(null==(y=l.media)?void 0:y.audioTracks)&&(x||S),W=!!(null==(_=l.media)?void 0:_.remote)&&(D||S),B=!!l.documentElement&&(M||S),H=N||O||P||U||W||B,q=0===o.length&&1===t&&s,V=!!m.media&&(C||q),$=!!(null==(A=m.media)?void 0:A.textTracks)&&(R||q),F=!!(null==(k=m.media)?void 0:k.videoRenditions)&&(L||q),K=!!(null==(w=m.media)?void 0:w.audioTracks)&&(x||q),j=!!(null==(T=m.media)?void 0:T.remote)&&(D||q),G=!!m.documentElement&&(M||q),Y=V||$||F||K||j||G;if(!(H||Y))return Object.entries(m).forEach(([e,t])=>{l[e]=t}),c(),void(m=void 0);
2Object.entries(i).forEach(([e,{get:t,mediaEvents:n=[],textTracksEvents:i=[],videoRenditionsEvents:a=[],audioTracksEvents:r=[],remoteEvents:s=[],rootEvents:o=[],stateOwnersUpdateHandlers:d=[]}])=>{h[e]||(h[e]={});const c=n=>{const i=t(l,n);u({[e]:i})};let p;p=h[e].mediaEvents,n.forEach(t=>{p&&N&&(l.media.removeEventListener(t,p),h[e].mediaEvents=void 0),V&&(m.media.addEventListener(t,c),h[e].mediaEvents=c)}),p=h[e].textTracksEvents,i.forEach(t=>{var n,i;p&&O&&(null==(n=l.media.textTracks)||n.removeEventListener(t,p),h[e].textTracksEvents=void 0),$&&(null==(i=m.media.textTracks)||i.addEventListener(t,c),h[e].textTracksEvents=c)}),p=h[e].videoRenditionsEvents,a.forEach(t=>{var n,i;p&&P&&(null==(n=l.media.videoRenditions)||n.removeEventListener(t,p),h[e].videoRenditionsEvents=void 0),F&&(null==(i=m.media.videoRenditions)||i.addEventListener(t,c),h[e].videoRenditionsEvents=c)}),p=h[e].audioTracksEvents,r.forEach(t=>{var n,i;p&&U&&(null==(n=l.media.audioTracks)||n.removeEventListener(t,p),h[e].audioTracksEvents=void 0),K&&(null==(i=m.media.audioTracks)||i.addEventListener(t,c),h[e].audioTracksEvents=c)}),p=h[e].remoteEvents,s.forEach(t=>{var n,i;p&&W&&(null==(n=l.media.remote)||n.removeEventListener(t,p),h[e].remoteEvents=void 0),j&&(null==(i=m.media.remote)||i.addEventListener(t,c),h[e].remoteEvents=c)}),p=h[e].rootEvents,o.forEach(t=>{p&&B&&(l.documentElement.removeEventListener(t,p),h[e].rootEvents=void 0),G&&(m.documentElement.addEventListener(t,c),h[e].rootEvents=c)});const v=h[e].stateOwnersUpdateHandlers;d.forEach(t=>{v&&H&&v(),Y&&(h[e].stateOwnersUpdateHandlers=t(c,m))})}),Object.entries(m).forEach(([e,t])=>{l[e]=t}),c(),m=void 0};return p({media:e,fullscreenElement:t,documentElement:n,options:r}),{dispatch(e){const{type:t,detail:n}=e;a[t]?u(a[t](i,l,e)):"mediaelementchangerequest"===t?p({media:n}):"fullscreenelementchangerequest"===t?p({fullscreenElement:n}):"documentelementchangerequest"===t?p({documentElement:n}):"optionschangerequest"===t&&Object.entries(null!=n?n:{}).forEach(([e,t])=>{l.options[e]=t})},getState(){return d},subscribe(e){return p({},o.length+1),o.push(e),e(d),()=>{const t=o.indexOf(e);t>=0&&(p({},o.length-1),o.splice(t,1))}}}},rs=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ss=(e,t,n)=>(rs(e,t,"read from private field"),n?n.call(e):t.get(e)),os=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ls=(e,t,n,i)=>(rs(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),ds=(e,t,n)=>(rs(e,t,"access private method"),n);const us=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],cs="defaultsubtitles",hs="defaultstreamtype",ms="defaultduration",ps="fullscreenelement",vs="hotkeys",bs="keysused",fs="liveedgeoffset",gs="nohotkeys",Es="novolumepref",ys="nosubtitleslangpref",_s="nodefaultstore",As="keyboardforwardseekoffset",ks="keyboardbackwardseekoffset";class ws extends nr{constructor(){super(),os(this,Xr),os(this,es),os(this,ns),os(this,jr,new mr(this,vs)),os(this,Gr,void 0),os(this,Yr,void 0),os(this,Zr,void 0),os(this,Qr,void 0),os(this,zr,e=>{var t;null==(t=ss(this,Yr))||t.dispatch(e)}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this);let e={};ls(this,Zr,t=>{Object.entries(t).forEach(([t,n])=>{if(t in e&&e[t]===n)return;this.propagateMediaState(t,n);const i=t.toLowerCase(),a=new na.CustomEvent(Ii[i],{composed:!0,detail:n});this.dispatchEvent(a)}),e=t}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(gs,vs,hs,cs,ms)}get mediaStore(){return ss(this,Yr)}set mediaStore(e){var t,n;ss(this,Yr)&&(null==(t=ss(this,Qr))||t.call(this),ls(this,Qr,void 0)),ls(this,Yr,e),ss(this,Yr)||this.hasAttribute(_s)?ls(this,Qr,null==(n=ss(this,Yr))?void 0:n.subscribe(ss(this,Zr))):ds(this,Xr,Jr).call(this)}get fullscreenElement(){var e;return null!=(e=ss(this,Gr))?e:this}set fullscreenElement(e){var t;this.hasAttribute(ps)&&this.removeAttribute(ps),ls(this,Gr,e),null==(t=ss(this,Yr))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}attributeChangedCallback(e,t,n){var i,a,r,s,o,l;if(super.attributeChangedCallback(e,t,n),e===gs)n!==t&&""===n?(this.hasAttribute(vs)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):n!==t&&null===n&&this.enableHotkeys();else if(e===vs)ss(this,jr).value=n;else if(e===cs&&n!==t)null==(i=ss(this,Yr))||i.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(cs)}});else if(e===hs)null==(r=ss(this,Yr))||r.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(a=this.getAttribute(hs))?a:void 0}});else if(e===fs)null==(s=ss(this,Yr))||s.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(fs)?+this.getAttribute(fs):void 0}});else if(e===ps){const e=n?null==(o=this.getRootNode())?void 0:o.getElementById(n):void 0;ls(this,Gr,e),null==(l=ss(this,Yr))||l.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}}connectedCallback(){var e,t;ss(this,Yr)||this.hasAttribute(_s)||ds(this,Xr,Jr).call(this),null==(e=ss(this,Yr))||e.dispatch({type:"documentelementchangerequest",detail:ia}),super.connectedCallback(),ss(this,Yr)&&!ss(this,Qr)&&ls(this,Qr,null==(t=ss(this,Yr))?void 0:t.subscribe(ss(this,Zr))),this.enableHotkeys()}disconnectedCallback(){var e,t,n,i;null==(e=super.disconnectedCallback)||e.call(this),ss(this,Yr)&&(null==(t=ss(this,Yr))||t.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(n=ss(this,Yr))||n.dispatch({type:yi.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),ss(this,Qr)&&(null==(i=ss(this,Qr))||i.call(this),ls(this,Qr,void 0))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=ss(this,Yr))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=ss(this,Yr))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){Ds(this.mediaStateReceivers,e,t)}associateElement(e){if(!e)return;const{associatedElementSubscriptions:t}=this;if(t.has(e))return;const n=this.registerMediaStateReceiver.bind(this),i=this.unregisterMediaStateReceiver.bind(this),a=Ms(e,n,i);
2Object.values(yi).forEach(t=>{e.addEventListener(t,ss(this,zr))}),t.set(e,a)}unassociateElement(e){if(!e)return;const{associatedElementSubscriptions:t}=this;if(!t.has(e))return;t.get(e)(),t.delete(e),Object.values(yi).forEach(t=>{e.removeEventListener(t,ss(this,zr))})}registerMediaStateReceiver(e){if(!e)return;const t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),ss(this,Yr)&&Object.entries(ss(this,Yr).getState()).forEach(([t,n])=>{Ds([e],t,n)}))}unregisterMediaStateReceiver(e){const t=this.mediaStateReceivers,n=t.indexOf(e);n<0||t.splice(n,1)}enableHotkeys(){this.addEventListener("keydown",ds(this,ns,is))}disableHotkeys(){this.removeEventListener("keydown",ds(this,ns,is)),this.removeEventListener("keyup",ds(this,es,ts))}get hotkeys(){return ss(this,jr)}keyboardShortcutHandler(e){var t,n,i,a,r,s;if((null!=(a=null!=(i=null==(t=e.target.getAttribute(bs))?void 0:t.split(" "))?i:null==(n=e.target)?void 0:n.keysUsed)?a:[]).map(e=>"Space"===e?" ":e).filter(Boolean).includes(e.key))return;let o,l,d;if(!(ss(this,jr).contains(`no${e.key.toLowerCase()}`)||" "===e.key&&ss(this,jr).contains("nospace")))switch(e.key){case" ":case"k":o=ss(this,Yr).getState().mediaPaused?yi.MEDIA_PLAY_REQUEST:yi.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new na.CustomEvent(o,{composed:!0,bubbles:!0}));break;case"m":o="off"===this.mediaStore.getState().mediaVolumeLevel?yi.MEDIA_UNMUTE_REQUEST:yi.MEDIA_MUTE_REQUEST,this.dispatchEvent(new na.CustomEvent(o,{composed:!0,bubbles:!0}));break;case"f":o=this.mediaStore.getState().mediaIsFullscreen?yi.MEDIA_EXIT_FULLSCREEN_REQUEST:yi.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new na.CustomEvent(o,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new na.CustomEvent(yi.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":{const e=this.hasAttribute(ks)?+this.getAttribute(ks):10;l=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-e,0),d=new na.CustomEvent(yi.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:l}),this.dispatchEvent(d);break}case"ArrowRight":{const e=this.hasAttribute(As)?+this.getAttribute(As):10;l=Math.max((null!=(s=this.mediaStore.getState().mediaCurrentTime)?s:0)+e,0),d=new na.CustomEvent(yi.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:l}),this.dispatchEvent(d);break}}}}jr=new WeakMap,Gr=new WeakMap,Yr=new WeakMap,Zr=new WeakMap,Qr=new WeakMap,zr=new WeakMap,Xr=new WeakSet,Jr=function(){var e;this.mediaStore=as({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(cs),defaultDuration:this.hasAttribute(ms)?+this.getAttribute(ms):void 0,defaultStreamType:null!=(e=this.getAttribute(hs))?e:void 0,liveEdgeOffset:this.hasAttribute(fs)?+this.getAttribute(fs):void 0,noVolumePref:this.hasAttribute(Es),noSubtitlesLangPref:this.hasAttribute(ys)}})},es=new WeakSet,ts=function(e){const{key:t}=e;us.includes(t)?this.keyboardShortcutHandler(e):this.removeEventListener("keyup",ds(this,es,ts))},ns=new WeakSet,is=function(e){const{metaKey:t,altKey:n,key:i}=e;t||n||!us.includes(i)?this.removeEventListener("keyup",ds(this,es,ts)):([" ","ArrowLeft","ArrowRight"].includes(i)&&!(ss(this,jr).contains(`no${i.toLowerCase()}`)||" "===i&&ss(this,jr).contains("nospace"))&&e.preventDefault(),this.addEventListener("keyup",ds(this,es,ts),{once:!0}))};const Ts=Object.values(wi),Is=Object.values(Ai),Ss=e=>{var t,n,i,a;let{observedAttributes:r}=e.constructor;!r&&(null==(t=e.nodeName)?void 0:t.includes("-"))&&(na.customElements.upgrade(e),({observedAttributes:r}=e.constructor));const s=null==(a=null==(i=null==(n=null==e?void 0:e.getAttribute)?void 0:n.call(e,_i.MEDIA_CHROME_ATTRIBUTES))?void 0:i.split)?void 0:a.call(i,/\s+/);return Array.isArray(r||s)?(r||s).filter(e=>Ts.includes(e)):[]},Cs=e=>(e=>{var t,n;return!(null==(t=e.nodeName)?void 0:t.includes("-"))||!na.customElements.get(null==(n=e.nodeName)?void 0:n.toLowerCase())||e instanceof na.customElements.get(e.nodeName.toLowerCase())||na.customElements.upgrade(e),Is.some(t=>t in e)})(e)||!!Ss(e).length,Rs=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},Ls={[wi.MEDIA_SUBTITLES_LIST]:gr,[wi.MEDIA_SUBTITLES_SHOWING]:gr,[wi.MEDIA_SEEKABLE]:Rs,[wi.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(Rs).join(" "),[wi.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[wi.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(Bi).join(" ")},[wi.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(Vi).join(" ")}},xs=(e,t)=>
2{if((e=>{var t;return!!(null==(t=e.closest)?void 0:t.call(e,'*[slot="media"]'))})(e))return;const n=(e,t)=>{var n,i;Cs(e)&&t(e);const{children:a=[]}=null!=e?e:{};[...a,...null!=(i=null==(n=null==e?void 0:e.shadowRoot)?void 0:n.children)?i:[]].forEach(e=>xs(e,t))},i=null==e?void 0:e.nodeName.toLowerCase();!i.includes("-")||Cs(e)?n(e,t):na.customElements.whenDefined(i).then(()=>{n(e,t)})},Ds=(e,t,n)=>{e.forEach(e=>{if(t in e)return void(e[t]=n);const i=Ss(e),a=t.toLowerCase();i.includes(a)&&(async(e,t,n)=>{var i,a;if(e.isConnected||await ji(0),"boolean"==typeof n||null==n)return ka(e,t,n);if("number"==typeof n)return _a(e,t,n);if("string"==typeof n)return Ta(e,t,n);if(Array.isArray(n)&&!n.length)return e.removeAttribute(t);const r=null!=(a=null==(i=Ls[t])?void 0:i.call(Ls,n))?a:n;e.setAttribute(t,r)})(e,a,n)})},Ms=(e,t,n)=>{xs(e,t);const i=e=>{var n;const i=null!=(n=null==e?void 0:e.composedPath()[0])?n:e.target;t(i)},a=e=>{var t;const i=null!=(t=null==e?void 0:e.composedPath()[0])?t:e.target;n(i)};e.addEventListener(yi.REGISTER_MEDIA_STATE_RECEIVER,i),e.addEventListener(yi.UNREGISTER_MEDIA_STATE_RECEIVER,a);let r=[];const s=e=>{const i=e.target;"media"!==i.name&&(r.forEach(e=>xs(e,n)),r=[...i.assignedElements({flatten:!0})],r.forEach(e=>xs(e,t)))};e.addEventListener("slotchange",s);const o=new MutationObserver(e=>{e.forEach(e=>{const{addedNodes:i=[],removedNodes:a=[],type:r,target:s,attributeName:o}=e;"childList"===r?(Array.prototype.forEach.call(i,e=>xs(e,t)),Array.prototype.forEach.call(a,e=>xs(e,n))):"attributes"===r&&o===_i.MEDIA_CHROME_ATTRIBUTES&&(Cs(s)?t(s):n(s))})});o.observe(e,{childList:!0,attributes:!0,subtree:!0});return()=>{xs(e,n),e.removeEventListener("slotchange",s),o.disconnect(),e.removeEventListener(yi.REGISTER_MEDIA_STATE_RECEIVER,i),e.removeEventListener(yi.UNREGISTER_MEDIA_STATE_RECEIVER,a)}};na.customElements.get("media-controller")||na.customElements.define("media-controller",ws);var Ns,Os,Ps,Us,Ws=ws,Bs=Object.defineProperty,Hs=(e,t,n)=>(((e,t,n)=>{t in e?Bs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),qs=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Vs=(e,t,n)=>(qs(e,t,"read from private field"),n?n.call(e):t.get(e)),$s=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Fs=(e,t,n,i)=>(qs(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const Ks=ia.createElement("template");Ks.innerHTML="\n<style>\n :host {\n font: var(--media-font,\n var(--media-font-weight, bold)\n var(--media-font-size, 14px) /\n var(--media-text-content-height, var(--media-control-height, 24px))\n var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n padding: var(--media-button-padding, var(--media-control-padding, 10px));\n justify-content: var(--media-button-justify-content, center);\n display: inline-flex;\n align-items: center;\n vertical-align: middle;\n box-sizing: border-box;\n transition: background .15s linear;\n pointer-events: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n\n \n :host(:focus-visible) {\n box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9);\n outline: 0;\n }\n \n :host(:where(:focus)) {\n box-shadow: none;\n outline: 0;\n }\n\n :host(:hover) {\n background: var(--media-control-hover-background, rgba(50 50 70 / .7));\n }\n\n svg, img, ::slotted(svg), ::slotted(img) {\n width: var(--media-button-icon-width);\n height: var(--media-button-icon-height, var(--media-control-height, 24px));\n transform: var(--media-button-icon-transform);\n transition: var(--media-button-icon-transition);\n fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n vertical-align: middle;\n max-width: 100%;\n max-height: 100%;\n min-width: 100%;\n }\n</style>\n";class js extends na.HTMLElement{constructor(e={}){if(super(),$s(this,Ns,void 0),Hs(this,"preventClick",!1),$s(this,Os,e=>{this.preventClick||this.handleClick(e)}),$s(this,Ps,e=>{const{key:t}=e;this.keysUsed.includes(t)?this.preventClick||this.handleClick(e):this.removeEventListener("keyup",Vs(this,Ps))}),$s(this,Us,e=>{const{metaKey:t,altKey:n,key:i}=e;
2t||n||!this.keysUsed.includes(i)?this.removeEventListener("keyup",Vs(this,Ps)):this.addEventListener("keyup",Vs(this,Ps),{once:!0})}),!this.shadowRoot){this.attachShadow({mode:"open"});const t=Ks.content.cloneNode(!0);this.nativeEl=t;let n=e.slotTemplate;n||(n=ia.createElement("template"),n.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(n.content.cloneNode(!0)),this.shadowRoot.appendChild(t)}}static get observedAttributes(){return["disabled",_i.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",Vs(this,Os)),this.addEventListener("keydown",Vs(this,Us)),this.tabIndex=0}disable(){this.removeEventListener("click",Vs(this,Os)),this.removeEventListener("keydown",Vs(this,Us)),this.removeEventListener("keyup",Vs(this,Ps)),this.tabIndex=-1}attributeChangedCallback(e,t,n){var i,a,r,s,o;e===_i.MEDIA_CONTROLLER?(t&&(null==(a=null==(i=Vs(this,Ns))?void 0:i.unassociateElement)||a.call(i,this),Fs(this,Ns,null)),n&&this.isConnected&&(Fs(this,Ns,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(o=null==(s=Vs(this,Ns))?void 0:s.associateElement)||o.call(s,this))):"disabled"===e&&n!==t&&(null==n?this.enable():this.disable())}connectedCallback(){var e,t,n;const{style:i}=ga(this.shadowRoot,":host");i.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","button");const a=this.getAttribute(_i.MEDIA_CONTROLLER);a&&(Fs(this,Ns,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(n=null==(t=Vs(this,Ns))?void 0:t.associateElement)||n.call(t,this))}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=Vs(this,Ns))?void 0:e.unassociateElement)||t.call(e,this),Fs(this,Ns,null)}get keysUsed(){return["Enter"," "]}handleClick(e){}}Ns=new WeakMap,Os=new WeakMap,Ps=new WeakMap,Us=new WeakMap,na.customElements.get("media-chrome-button")||na.customElements.define("media-chrome-button",js);const Gs='<svg aria-hidden="true" viewBox="0 0 26 24">\n <path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>\n</svg>\n',Ys=ia.createElement("template");Ys.innerHTML=`\n <style>\n :host([${wi.MEDIA_IS_AIRPLAYING}]) slot:not([name=exit]):not([name=icon]) {\n display: none !important;\n }\n\n \n :host(:not([${wi.MEDIA_IS_AIRPLAYING}])) slot:not([name=enter]):not([name=icon]) {\n display: none !important;\n }\n </style>\n\n <slot name="icon">\n <slot name="enter">${Gs}</slot>\n <slot name="exit">${Gs}</slot>\n </slot>\n`;const Zs=e=>{const t=e.mediaIsAirplaying?Ui.EXIT_AIRPLAY():Ui.ENTER_AIRPLAY();e.setAttribute("aria-label",t)};class Qs extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_IS_AIRPLAYING,wi.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Ys,...e})}connectedCallback(){super.connectedCallback(),Zs(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_IS_AIRPLAYING&&Zs(this)}get mediaIsAirplaying(){return Aa(this,wi.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){ka(this,wi.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return wa(this,wi.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){Ta(this,wi.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){const e=new na.CustomEvent(yi.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}na.customElements.get("media-airplay-button")||na.customElements.define("media-airplay-button",Qs);function zs({anchor:e,floating:t,placement:n}){let i=function({anchor:e,floating:t}){return{anchor:Xs(e,t.offsetParent),floating:{x:0,y:0,width:t.offsetWidth,height:t.offsetHeight}}}({anchor:e,floating:t}),{x:a,y:r}=function({anchor:e,floating:t},n){const i="x"===function(e){return["top","bottom"].includes(Js(e))?"y":"x"}(n)?"y":"x",a="y"===i?"height":"width",r=Js(n),s=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l=e[a]/2-t[a]/2;let d;switch(r){case"top":d={x:s,y:e.y-t.height};break;case"bottom":d={x:s,y:e.y+e.height};break;case"right":d={x:e.x+e.width,y:o};break;case"left":d={x:e.x-t.width,y:o};break;default:d={x:e.x,y:e.y}}switch(n.split("-")[1]){case"start":d[i]-=l;break;case"end":d[i]+=l}return d}(i,n);return{x:a,y:r}}function Xs(e,t){let n=e.getBoundingClientRect(),i=t.getBoundingClientRect();return{x:n.x-i.x,y:n.y-i.y,width:n.width,height:n.height}}function Js(e){return e.split("-")[0]}var eo=Object.defineProperty,to=(e,t,n)=>(((e,t,n)=>{t in e?eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);
2class no extends Event{constructor({action:e="auto",relatedTarget:t,...n}){super("invoke",n),to(this,"action"),to(this,"relatedTarget"),this.action=e,this.relatedTarget=t}}class io extends Event{constructor({newState:e,oldState:t,...n}){super("toggle",n),to(this,"newState"),to(this,"oldState"),this.newState=e,this.oldState=t}}var ao,ro,so,oo,lo,uo,co,ho,mo,po,vo,bo,fo,go,Eo,yo,_o,Ao,ko,wo,To,Io,So,Co,Ro,Lo,xo,Do,Mo,No,Oo,Po,Uo,Wo,Bo,Ho,qo,Vo,$o,Fo,Ko,jo,Go,Yo,Zo,Qo=Object.defineProperty,zo=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Xo=(e,t,n)=>(zo(e,t,"read from private field"),n?n.call(e):t.get(e)),Jo=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},el=(e,t,n,i)=>(zo(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),tl=(e,t,n)=>(zo(e,t,"access private method"),n);function nl({type:e,text:t,value:n,checked:i}){const a=ia.createElement("media-chrome-menu-item");a.type=null!=e?e:"",a.part.add("menu-item"),e&&a.part.add(e),a.value=n,a.checked=i;const r=ia.createElement("span");return r.textContent=t,a.append(r),a}function il(e,t){let n=e.querySelector(`:scope > [slot="${t}"]`);if("SLOT"==(null==n?void 0:n.nodeName)&&(n=n.assignedElements({flatten:!0})[0]),n)return n=n.cloneNode(!0),n;let i=e.shadowRoot.querySelector(`[name="${t}"] > svg`);return i?i.cloneNode(!0):""}const al=ia.createElement("template");al.innerHTML='\n <style>\n :host {\n font: var(--media-font,\n var(--media-font-weight, normal)\n var(--media-font-size, 14px) /\n var(--media-text-content-height, var(--media-control-height, 24px))\n var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8))));\n border-radius: var(--media-menu-border-radius);\n border: var(--media-menu-border, none);\n display: var(--media-menu-display, inline-flex);\n transition: var(--media-menu-transition-in,\n visibility 0s,\n opacity .2s ease-out,\n transform .15s ease-out,\n left .2s ease-in-out,\n min-width .2s ease-in-out,\n min-height .2s ease-in-out\n ) !important;\n \n visibility: var(--media-menu-visibility, visible);\n opacity: var(--media-menu-opacity, 1);\n max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));\n transform: var(--media-menu-transform-in, translateY(0) scale(1));\n flex-direction: column;\n \n min-height: 0;\n position: relative;\n box-sizing: border-box;\n }\n\n :host([hidden]) {\n transition: var(--media-menu-transition-out,\n visibility .15s ease-in,\n opacity .15s ease-in,\n transform .15s ease-in\n ) !important;\n visibility: var(--media-menu-hidden-visibility, hidden);\n opacity: var(--media-menu-hidden-opacity, 0);\n max-height: var(--media-menu-hidden-max-height,\n var(--media-menu-max-height, var(--_menu-max-height, 300px)));\n transform: var(--media-menu-transform-out, translateY(2px) scale(.99));\n pointer-events: none;\n }\n\n :host([slot="submenu"]) {\n background: none;\n width: 100%;\n min-height: 100%;\n position: absolute;\n bottom: 0;\n right: -100%;\n }\n\n #container {\n display: flex;\n flex-direction: column;\n min-height: 0;\n transition: transform .2s ease-out;\n transform: translate(0, 0);\n }\n\n #container.has-expanded {\n transition: transform .2s ease-in;\n transform: translate(-100%, 0);\n }\n\n slot[name="header"] {\n display: flex;\n padding: .4em .7em;\n border-bottom: 1px solid rgb(255 255 255 / .25);\n cursor: default;\n }\n\n slot[name="header"][hidden] {\n display: none;\n }\n\n button[part~="back"] {\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n }\n\n svg[part~="back"] {\n height: var(--media-menu-icon-height, var(--media-control-height, 24px));\n fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n display: block;\n margin-right: .5ch;\n }\n\n slot:not([name]) {\n gap: var(--media-menu-gap);\n flex-direction: var(--media-menu-flex-direction, column);\n overflow: var(--media-menu-overflow, hidden auto);\n display: flex;\n min-height: 0;\n }\n\n :host([role="menu"]) slot:not([name]) {\n padding-block: .4em;\n }
2\n\n slot:not([name])::slotted([role="menu"]) {\n background: none;\n }\n\n media-chrome-menu-item > span {\n margin-right: .5ch;\n max-width: var(--media-menu-item-max-width);\n text-overflow: ellipsis;\n overflow: hidden;\n }\n </style>\n <style id="layout-row" media="width:0">\n\n slot[name="header"] {\n padding: .4em .5em;\n }\n\n slot:not([name]) {\n gap: var(--media-menu-gap, .25em);\n flex-direction: var(--media-menu-flex-direction, row);\n padding-inline: .5em;\n }\n\n media-chrome-menu-item {\n padding: .3em .5em;\n }\n\n media-chrome-menu-item[aria-checked="true"] {\n background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));\n }\n\n \n media-chrome-menu-item::part(checked-indicator) {\n display: var(--media-menu-item-checked-indicator-display, none);\n }\n </style>\n <div id="container">\n <slot name="header" hidden>\n <button part="back button" aria-label="Back to previous menu">\n <slot name="back-icon">\n <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">\n <path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/>\n </svg>\n </slot>\n <slot name="title"></slot>\n </button>\n </slot>\n <slot></slot>\n </div>\n <slot name="checked-indicator" hidden></slot>\n';const rl="style",sl="hidden",ol="disabled",ll="anchor";class dl extends na.HTMLElement{constructor(){super(),Jo(this,mo),Jo(this,bo),Jo(this,go),Jo(this,yo),Jo(this,Ao),Jo(this,Io),Jo(this,Co),Jo(this,Lo),Jo(this,Do),Jo(this,No),Jo(this,Po),Jo(this,Wo),Jo(this,Ho),Jo(this,Vo),Jo(this,Fo),Jo(this,jo),Jo(this,Yo),Jo(this,ao,void 0),Jo(this,ro,void 0),Jo(this,so,void 0),Jo(this,oo,""),Jo(this,lo,null),Jo(this,uo,new Set),Jo(this,co,void 0),Jo(this,ho,!1),Jo(this,vo,()=>{const e=Xo(this,uo),t=new Set(this.items);for(const n of e)t.has(n)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:n}));for(const n of t)e.has(n)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:n}));el(this,uo,t)}),Jo(this,wo,()=>{tl(this,Io,So).call(this,!1),tl(this,Co,Ro).call(this,!1)}),Jo(this,To,()=>{tl(this,Io,So).call(this,!1)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=this.constructor.template.content.cloneNode(!0),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),el(this,co,new MutationObserver(Xo(this,vo))),Xo(this,co).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[ol,sl,rl,ll,_i.MEDIA_CONTROLLER]}static formatMenuItemText(e){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":tl(this,mo,po).call(this,e);break;case"invoke":tl(this,go,Eo).call(this,e);break;case"click":tl(this,Lo,xo).call(this,e);break;case"toggle":tl(this,No,Oo).call(this,e);break;case"focusout":tl(this,Wo,Bo).call(this,e);break;case"keydown":tl(this,Ho,qo).call(this,e)}}connectedCallback(){var e,t;tl(this,bo,fo).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),el(this,ao,ua(this)),null==(t=null==(e=Xo(this,ao))?void 0:e.associateElement)||t.call(e,this),this.hidden||(oa(hl(this),Xo(this,wo)),oa(this,Xo(this,To)))}disconnectedCallback(){var e,t;la(hl(this),Xo(this,wo)),la(this,Xo(this,To)),this.disable(),null==(t=null==(e=Xo(this,ao))?void 0:e.unassociateElement)||t.call(e,this),el(this,ao,null)}attributeChangedCallback(e,t,n){var i,a,r,s;e===sl&&n!==t?(Xo(this,ho)||el(this,ho,!0),this.hidden?tl(this,Ao,ko).call(this):tl(this,yo,_o).call(this),this.dispatchEvent(new io({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===_i.MEDIA_CONTROLLER?(t&&(null==(a=null==(i=Xo(this,ao))?void 0:i.unassociateElement)||a.call(i,this),el(this,ao,null)),n&&this.isConnected&&(el(this,ao,ua(this)),null==(s=null==(r=Xo(this,ao))?void 0:r.associateElement)||s.call(r,this))):e===ol&&n!==t?null==n?this.enable():this.disable():e===rl&&n!==t&&tl(this,bo,fo).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}
2set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?null==(e=ba(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(cl)}get radioGroupItems(){return this.items.filter(e=>"menuitemradio"===e.role)}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,t;return null!=(t=null==(e=this.checkedItems[0])?void 0:e.value)?t:""}set value(e){const t=this.items.find(t=>t.value===e);t&&tl(this,Yo,Zo).call(this,t)}focus(){if(el(this,ro,va()),this.items.length)return tl(this,jo,Go).call(this,this.items[0]),void this.items[0].focus();const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==e||e.focus()}handleSelect(e){var t;const n=tl(this,Vo,$o).call(this,e);n&&(tl(this,Yo,Zo).call(this,n,"checkbox"===n.type),Xo(this,so)&&!this.hidden&&(null==(t=Xo(this,ro))||t.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var t,n;const{key:i}=e,a=this.items,r=null!=(n=null!=(t=tl(this,Vo,$o).call(this,e))?t:tl(this,Fo,Ko).call(this))?n:a[0],s=a.indexOf(r);let o=Math.max(0,s);"ArrowDown"===i?o++:"ArrowUp"===i?o--:"Home"===e.key?o=0:"End"===e.key&&(o=a.length-1),o<0&&(o=a.length-1),o>a.length-1&&(o=0),tl(this,jo,Go).call(this,a[o]),a[o].focus()}}var ul;function cl(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function hl(e){var t;return null!=(t=e.getAttribute("bounds")?pa(e,`#${e.getAttribute("bounds")}`):da(e)||e.parentElement)?t:e}ao=new WeakMap,ro=new WeakMap,so=new WeakMap,oo=new WeakMap,lo=new WeakMap,uo=new WeakMap,co=new WeakMap,ho=new WeakMap,mo=new WeakSet,po=function(e){const t=e.target;for(let n of t.assignedNodes({flatten:!0}))3===n.nodeType&&""===n.textContent.trim()&&n.remove();if(["header","title"].includes(t.name)){this.shadowRoot.querySelector('slot[name="header"]').hidden=0===t.assignedNodes().length}t.name||Xo(this,vo).call(this)},vo=new WeakMap,bo=new WeakSet,fo=function(){var e;const t=this.shadowRoot.querySelector("#layout-row"),n=null==(e=getComputedStyle(this).getPropertyValue("--media-menu-layout"))?void 0:e.trim();t.setAttribute("media","row"===n?"":"width:0")},go=new WeakSet,Eo=function(e){el(this,so,e.relatedTarget),ma(this,e.relatedTarget)||(this.hidden=!this.hidden)},yo=new WeakSet,_o=function(){var e;null==(e=Xo(this,so))||e.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>tl(this,Io,So).call(this,!1)),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),oa(hl(this),Xo(this,wo)),oa(this,Xo(this,To))},Ao=new WeakSet,ko=function(){var e;null==(e=Xo(this,so))||e.setAttribute("aria-expanded","false"),la(hl(this),Xo(this,wo)),la(this,Xo(this,To))},wo=new WeakMap,To=new WeakMap,Io=new WeakSet,So=function(e,t){if(this.hasAttribute("mediacontroller")&&!this.anchor)return;if(this.hidden||!this.anchorElement)return;const{x:n,y:i}=zs({anchor:this.anchorElement,floating:this,placement:"top-start"});null!=t||(t=this.offsetWidth);const a=hl(this).getBoundingClientRect(),r=this.anchorElement.getBoundingClientRect(),s=a.width-n-t,o=a.height-i-this.offsetHeight,l=a.height-r.height,{style:d}=ga(this.shadowRoot,":host");e||d.setProperty("--media-menu-transition-in","none"),d.setProperty("position","absolute"),d.setProperty("right",`${Math.max(0,s)}px`),d.setProperty("bottom",`${o}px`),d.setProperty("--_menu-max-height",`${l}px`),d.removeProperty("--media-menu-transition-in")}
2,Co=new WeakSet,Ro=function(e){const t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),n=null==t?void 0:t.querySelector('[role="menu"]'),{style:i}=ga(this.shadowRoot,":host");if(e||i.setProperty("--media-menu-transition-in","none"),n){const i=n.offsetHeight,a=Math.max(n.offsetWidth,t.offsetWidth);this.style.setProperty("min-width",`${a}px`),this.style.setProperty("min-height",`${i}px`),tl(this,Io,So).call(this,e,a)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),tl(this,Io,So).call(this,e);i.removeProperty("--media-menu-transition-in")},Lo=new WeakSet,xo=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(Xo(this,Do,Mo)))return null==(t=Xo(this,ro))||t.focus(),void(this.hidden=!0);const n=tl(this,Vo,$o).call(this,e);n&&!n.hasAttribute("disabled")&&(tl(this,jo,Go).call(this,n),this.handleSelect(e))},Do=new WeakSet,Mo=function(){var e;return null==(e=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))?void 0:e.find(e=>e.part.contains("back")&&e.part.contains("button"))},No=new WeakSet,Oo=function(e){if(e.target===this)return;tl(this,Po,Uo).call(this);const t=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(const n of t)n.invokeTargetElement!=e.target&&("open"!=e.newState||"true"!=n.getAttribute("aria-expanded")||n.invokeTargetElement.hidden||n.invokeTargetElement.dispatchEvent(new no({relatedTarget:n})));for(const n of t)n.setAttribute("aria-expanded",`${!n.submenuElement.hidden}`);tl(this,Co,Ro).call(this,!0)},Po=new WeakSet,Uo=function(){const e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},Wo=new WeakSet,Bo=function(e){var t;ma(this,e.relatedTarget)||(Xo(this,ho)&&(null==(t=Xo(this,ro))||t.focus()),Xo(this,so)&&Xo(this,so)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},Ho=new WeakSet,qo=function(e){var t,n,i,a,r;const{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;if(!(o||l||d)&&this.keysUsed.includes(s))if(e.preventDefault(),e.stopPropagation(),"Tab"===s){if(Xo(this,ho)
2)return void(this.hidden=!0);e.shiftKey?null==(n=null==(t=this.previousElementSibling)?void 0:t.focus)||n.call(t):null==(a=null==(i=this.nextElementSibling)?void 0:i.focus)||a.call(i),this.blur()}else"Escape"===s?(null==(r=Xo(this,ro))||r.focus(),Xo(this,ho)&&(this.hidden=!0)):"Enter"===s||" "===s?this.handleSelect(e):this.handleMove(e)},Vo=new WeakSet,$o=function(e){return e.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},Fo=new WeakSet,Ko=function(){return this.items.find(e=>0===e.tabIndex)},jo=new WeakSet,Go=function(e){for(const t of this.items)t.tabIndex=t===e?0:-1},Yo=new WeakSet,Zo=function(e,t){const n=[...this.checkedItems];"radio"===e.type&&this.radioGroupItems.forEach(e=>e.checked=!1),e.checked=!t||!e.checked,this.checkedItems.some((e,t)=>e!=n[t])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},((e,t,n)=>{t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(dl,"symbol"!=typeof(ul="template")?ul+"":ul,al),na.customElements.get("media-chrome-menu")||na.customElements.define("media-chrome-menu",dl);var ml,pl,vl,bl,fl,gl,El=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},yl=(e,t,n)=>(El(e,t,"read from private field"),n?n.call(e):t.get(e)),_l=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Al=(e,t,n,i)=>(El(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),kl=(e,t,n)=>(El(e,t,"access private method"),n);class wl extends dl{constructor(){super(...arguments),_l(this,vl),_l(this,fl),_l(this,ml,[]),_l(this,pl,void 0)}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_AUDIO_TRACK_LIST,wi.MEDIA_AUDIO_TRACK_ENABLED,wi.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_AUDIO_TRACK_ENABLED&&t!==n?this.value=n:e===wi.MEDIA_AUDIO_TRACK_LIST&&t!==n&&(Al(this,ml,qi(n)),kl(this,vl,bl).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",kl(this,fl,gl))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",kl(this,fl,gl))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:da(this).querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return yl(this,ml)}set mediaAudioTrackList(e){Al(this,ml,e),kl(this,vl,bl).call(this)}get mediaAudioTrackEnabled(){return wa(this,wi.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){Ta(this,wi.MEDIA_AUDIO_TRACK_ENABLED,e)}}ml=new WeakMap,pl=new WeakMap,vl=new WeakSet,bl=function(){if(yl(this,pl)===JSON.stringify(this.mediaAudioTrackList))return;Al(this,pl,JSON.stringify(this.mediaAudioTrackList));const e=this.mediaAudioTrackList;this.defaultSlot.textContent="";for(const t of e){const e=nl({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});
2e.prepend(il(this,"checked-indicator")),this.defaultSlot.append(e)}},fl=new WeakSet,gl=function(){if(null==this.value)return;const e=new na.CustomEvent(yi.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},na.customElements.get("media-audio-track-menu")||na.customElements.define("media-audio-track-menu",wl);class Tl extends js{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=ba(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){this.invokeTargetElement.dispatchEvent(new no({relatedTarget:this}))}}na.customElements.get("media-chrome-menu-button")||na.customElements.define("media-chrome-menu-button",Tl);const Il=ia.createElement("template");Il.innerHTML='\n <slot name="icon"><svg aria-hidden="true" viewBox="0 0 24 24">\n <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>\n <path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/>\n</svg></slot>\n';class Sl extends Tl{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_AUDIO_TRACK_ENABLED,wi.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:Il})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",Pi.AUDIO_TRACKS())}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:da(this).querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){return wa(this,wi.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){Ta(this,wi.MEDIA_AUDIO_TRACK_ENABLED,e)}}na.customElements.get("media-audio-track-menu-button")||na.customElements.define("media-audio-track-menu-button",Sl);const Cl=ia.createElement("template");Cl.innerHTML='\n <style>\n :host([aria-checked="true"]) slot[name=off] {\n display: none !important;\n }\n\n \n :host(:not([aria-checked="true"])) slot[name=on] {\n display: none !important;\n }\n </style>\n\n <slot name="icon">\n <slot name="on"><svg aria-hidden="true" viewBox="0 0 26 24">\n <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>\n</svg></slot>\n <slot name="off"><svg aria-hidden="true" viewBox="0 0 26 24">\n <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>\n</svg></slot>\n </slot>\n';const Rl=e=>{e.setAttribute("aria-checked",Ar(e))};class Ll extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_SUBTITLES_LIST,wi.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:Cl,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",Pi.CLOSED_CAPTIONS()),Rl(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_SUBTITLES_SHOWING&&Rl(this)}get mediaSubtitlesList(){return xl(this,wi.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Dl(this,wi.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return xl(this,wi.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Dl(this,wi.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new na.CustomEvent(yi.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}const xl=(e,t)=>{const n=e.getAttribute(t);return n?vr(n):[]},Dl=(e,t,n)=>{if(!(null==n?void 0:n.length))return void e.removeAttribute(t);const i=gr(n);e.getAttribute(t)!==i&&e.setAttribute(t,i)};na.customElements.get("media-captions-button")||na.customElements.define("media-captions-button",Ll);var Ml,Nl,Ol,Pl,Ul,Wl=Object.defineProperty,Bl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Hl=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)}
2,ql=(e,t,n)=>(Bl(e,t,"access private method"),n);const Vl=ia.createElement("template");Vl.innerHTML=dl.template.innerHTML+'\n <slot name="captions-indicator" hidden>\n <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">\n <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>\n </svg></slot>';class $l extends dl{constructor(){super(...arguments),Hl(this,Nl),Hl(this,Pl),Hl(this,Ml,void 0)}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_SUBTITLES_LIST,wi.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_SUBTITLES_LIST&&t!==n?ql(this,Nl,Ol).call(this):e===wi.MEDIA_SUBTITLES_SHOWING&&t!==n&&(this.value=n)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ql(this,Pl,Ul))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ql(this,Pl,Ul))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:da(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return Fl(this,wi.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Kl(this,wi.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Fl(this,wi.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Kl(this,wi.MEDIA_SUBTITLES_SHOWING,e)}}Ml=new WeakMap,Nl=new WeakSet,Ol=function(){var e;if(((e,t,n)=>(Bl(e,t,"read from private field"),n?n.call(e):t.get(e)))(this,Ml)===JSON.stringify(this.mediaSubtitlesList))return;((e,t,n,i)=>{Bl(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,Ml,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";const t=!this.value,n=nl({type:"radio",text:this.formatMenuItemText("Off"),value:"off",checked:t});n.prepend(il(this,"checked-indicator")),this.defaultSlot.append(n);const i=this.mediaSubtitlesList;for(const a of i){const t=nl({type:"radio",text:this.formatMenuItemText(a.label,a),value:fr(a),checked:this.value==fr(a)});t.prepend(il(this,"checked-indicator"));"captions"===(null!=(e=a.kind)?e:"subs")&&t.append(il(this,"captions-indicator")),this.defaultSlot.append(t)}},Pl=new WeakSet,Ul=function(){const e=this.mediaSubtitlesShowing,t=this.getAttribute(wi.MEDIA_SUBTITLES_SHOWING),n=this.value!==t;if((null==e?void 0:e.length)&&n&&this.dispatchEvent(new na.CustomEvent(yi.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e})),!this.value||!n)return;const i=new na.CustomEvent(yi.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)},((e,t,n)=>{((e,t,n)=>{t in e?Wl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n)})($l,"template",Vl);const Fl=(e,t)=>{const n=e.getAttribute(t);return n?vr(n):[]},Kl=(e,t,n)=>{if(!(null==n?void 0:n.length))return void e.removeAttribute(t);const i=gr(n);e.getAttribute(t)!==i&&e.setAttribute(t,i)};na.customElements.get("media-captions-menu")||na.customElements.define("media-captions-menu",$l);const jl=ia.createElement("template");jl.innerHTML='\n <style>\n :host([aria-checked="true"]) slot[name=off] {\n display: none !important;\n }\n\n \n :host(:not([aria-checked="true"])) slot[name=on] {\n display: none !important;\n }\n </style>\n\n <slot name="icon">\n <slot name="on"><svg aria-hidden="true" viewBox="0 0 26 24">\n <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79
20 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>\n</svg></slot>\n <slot name="off"><svg aria-hidden="true" viewBox="0 0 26 24">\n <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>\n</svg></slot>\n </slot>\n';const Gl=e=>{e.setAttribute("aria-checked",Ar(e))};class Yl extends Tl{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_SUBTITLES_LIST,wi.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:jl,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",Pi.CLOSED_CAPTIONS()),Gl(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_SUBTITLES_SHOWING&&Gl(this)}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:da(this).querySelector("media-captions-menu")}get mediaSubtitlesList(){return Zl(this,wi.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Ql(this,wi.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Zl(this,wi.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Ql(this,wi.MEDIA_SUBTITLES_SHOWING,e)}}const Zl=(e,t)=>{const n=e.getAttribute(t);return n?vr(n):[]},Ql=(e,t,n)=>{if(!(null==n?void 0:n.length))return void e.removeAttribute(t);const i=gr(n);e.getAttribute(t)!==i&&e.setAttribute(t,i)};na.customElements.get("media-captions-menu-button")||na.customElements.define("media-captions-menu-button",Yl);const zl=ia.createElement("template");zl.innerHTML=`\n <style>\n :host([${wi.MEDIA_IS_CASTING}]) slot:not([name=exit]):not([name=icon]) {\n display: none !important;\n }\n\n \n :host(:not([${wi.MEDIA_IS_CASTING}])) slot:not([name=enter]):not([name=icon]) {\n display: none !important;\n }\n </style>\n\n <slot name="icon">\n <slot name="enter"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg></slot>\n <slot name="exit"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg></slot>\n </slot>\n`;const Xl=e=>{const t=e.mediaIsCasting?Ui.EXIT_CAST():Ui.ENTER_CAST();e.setAttribute("aria-label",t)};class Jl extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_IS_CASTING,wi.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:zl,...e})}connectedCallback(){super.connectedCallback(),Xl(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_IS_CASTING&&Xl(this)}get mediaIsCasting(){return Aa(this,wi.MEDIA_IS_CASTING)}set mediaIsCasting(e){ka(this,wi.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return wa(this,wi.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){Ta(this,wi.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){const e=this.mediaIsCasting?yi.MEDIA_EXIT_CAST_REQUEST:yi.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new na.CustomEvent(e,{composed:!0,bubbles:!0}))}}na.customElements.get("media-cast-button")||na.customElements.define("media-cast-button",Jl);var ed,td,nd,id,ad,rd,sd,od,ld,dd,ud,cd,hd=Object.defineProperty,md=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},pd=(e,t,n)=>(md(e,t,"read from private field"),n?n.call(e):t.get(e)),vd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},bd=(e,t,n,i)=>(md(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),fd=(e,t,n)=>(md(e,t,"access private method"),n);const gd=ia.createElement("template");
2gd.innerHTML="\n <style>\n :host {\n font: var(--media-font,\n var(--media-font-weight, normal)\n var(--media-font-size, 14px) /\n var(--media-text-content-height, var(--media-control-height, 24px))\n var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n background: var(--media-dialog-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8))));\n border-radius: var(--media-dialog-border-radius);\n border: var(--media-dialog-border, none);\n display: var(--media-dialog-display, inline-flex);\n transition: var(--media-dialog-transition-in,\n visibility 0s,\n opacity .2s ease-out,\n transform .15s ease-out\n ) !important;\n \n visibility: var(--media-dialog-visibility, visible);\n opacity: var(--media-dialog-opacity, 1);\n transform: var(--media-dialog-transform-in, translateY(0) scale(1));\n }\n\n :host([hidden]) {\n transition: var(--media-dialog-transition-out,\n visibility .15s ease-in,\n opacity .15s ease-in,\n transform .15s ease-in\n ) !important;\n visibility: var(--media-dialog-hidden-visibility, hidden);\n opacity: var(--media-dialog-hidden-opacity, 0);\n transform: var(--media-dialog-transform-out, translateY(2px) scale(.99));\n pointer-events: none;\n }\n </style>\n <slot></slot>\n";const Ed="hidden",yd="anchor";class _d extends na.HTMLElement{constructor(){super(),vd(this,nd),vd(this,ad),vd(this,sd),vd(this,ld),vd(this,ud),vd(this,ed,void 0),vd(this,td,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=this.constructor.template.content.cloneNode(!0),this.shadowRoot.append(this.nativeEl)),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[Ed,yd]}handleEvent(e){switch(e.type){case"invoke":fd(this,sd,od).call(this,e);break;case"focusout":fd(this,ld,dd).call(this,e);break;case"keydown":fd(this,ud,cd).call(this,e)}}connectedCallback(){this.role||(this.role="dialog")}attributeChangedCallback(e,t,n){e===Ed&&n!==t&&(this.hidden?fd(this,ad,rd).call(this):fd(this,nd,id).call(this))}focus(){bd(this,ed,va());const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==e||e.focus()}get keysUsed(){return["Escape","Tab"]}}ed=new WeakMap,td=new WeakMap,nd=new WeakSet,id=function(){var e;null==(e=pd(this,td))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},ad=new WeakSet,rd=function(){var e;null==(e=pd(this,td))||e.setAttribute("aria-expanded","false")},sd=new WeakSet,od=function(e){bd(this,td,e.relatedTarget),ma(this,e.relatedTarget)||(this.hidden=!this.hidden)},ld=new WeakSet,dd=function(e){var t;ma(this,e.relatedTarget)||(null==(t=pd(this,ed))||t.focus(),pd(this,td)&&pd(this,td)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},ud=new WeakSet,cd=function(e){var t,n,i,a,r;const{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;o||l||d||this.keysUsed.includes(s)&&(e.preventDefault(),e.stopPropagation(),"Tab"===s?(e.shiftKey?null==(n=null==(t=this.previousElementSibling)?void 0:t.focus)||n.call(t):null==(a=null==(i=this.nextElementSibling)?void 0:i.focus)||a.call(i),this.blur()):"Escape"===s&&(null==(r=pd(this,ed))||r.focus(),this.hidden=!0))},((e,t,n)=>{((e,t,n)=>{t in e?hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n)})(_d,"template",gd),na.customElements.get("media-chrome-dialog")||na.customElements.define("media-chrome-dialog",_d);var Ad,kd,wd,Td,Id,Sd,Cd,Rd,Ld,xd,Dd,Md,Nd,Od,Pd,Ud=Object.defineProperty,Wd=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Bd=(e,t,n)=>(Wd(e,t,"read from private field"),n?n.call(e):t.get(e)),Hd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},qd=(e,t,n,i)=>(Wd(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Vd=(e,t,n)=>(Wd(e,t,"access private method"),n);const $d=ia.createElement("template");$d.innerHTML='\n <style>\n :host {\n transition: var(--media-menu-item-transition,\n background .15s linear,\n opacity .2s ease-in-out\n );\n outline: var(--media-menu-item-outline, 0);\n outline-offset: var(--media-menu-item-outline-offset, -1px);\n cursor: pointer;\n display: flex;\n align-items: center;\n align-self: stretch;\n justify-self: stretch;\n white-space: nowrap;\n white-space-collapse: collapse;\n text-wrap: nowrap;\n padding: .4em .8em .4em 1em;\n }\n\n :host(:focus-visible) {\n box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n outline: var(--media-menu-item-hover-outline, 0);\n outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px));\n }\n\n :host(:hover) {\n cursor: pointer;\n background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5));\n outline: var(--media-menu-item-hover-outline);\n outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px));\n }\n\n :host([aria-checked="true"]) {\n background: var(--media-menu-item-checked-background);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n :host([disabled]) {\n pointer-events: none;\n color: rgba(255, 255, 255, .3);\n }\n\n slot:not([name]) {\n width: 100%;\n }
2\n\n slot:not([name="submenu"]) {\n display: inline-flex;\n align-items: center;\n transition: inherit;\n opacity: var(--media-menu-item-opacity, 1);\n }\n\n slot[name="description"] {\n justify-content: end;\n }\n\n slot[name="description"] > span {\n display: inline-block;\n margin-inline: 1em .2em;\n max-width: var(--media-menu-item-description-max-width, 100px);\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: .8em;\n font-weight: 400;\n text-align: right;\n position: relative;\n top: .04em;\n }\n\n slot[name="checked-indicator"] {\n display: none;\n }\n\n :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] {\n display: var(--media-menu-item-checked-indicator-display, inline-block);\n }\n\n \n svg, img, ::slotted(svg), ::slotted(img) {\n height: var(--media-menu-item-icon-height, var(--media-control-height, 24px));\n fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n display: block;\n }\n\n \n [part~="indicator"],\n ::slotted([part~="indicator"]) {\n fill: var(--media-menu-item-indicator-fill,\n var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));\n height: var(--media-menu-item-indicator-height, 1.25em);\n margin-right: .5ch;\n }\n\n [part~="checked-indicator"] {\n visibility: hidden;\n }\n\n :host([aria-checked="true"]) [part~="checked-indicator"] {\n visibility: visible;\n }\n </style>\n <slot name="checked-indicator">\n <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">\n <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>\n </svg>\n </slot>\n <slot name="prefix"></slot>\n <slot></slot>\n <slot name="description"></slot>\n <slot name="suffix"></slot>\n <slot name="submenu"></slot>\n';const Fd="type",Kd="value",jd="checked",Gd="disabled";class Yd extends na.HTMLElement{constructor(){super(),Hd(this,wd),Hd(this,Id),Hd(this,Cd),Hd(this,xd),Hd(this,Md),Hd(this,Od),Hd(this,Ad,!1),Hd(this,kd,void 0),Hd(this,Ld,()=>{var e,t;this.setAttribute("submenusize",`${this.submenuElement.items.length}`);const n=this.shadowRoot.querySelector('slot[name="description"]'),i=null==(t=null==(e=this.submenuElement.checkedItems)?void 0:e[0])?void 0:t.text,a=ia.createElement("span");a.textContent=null!=i?i:"",n.replaceChildren(a)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.append(this.constructor.template.content.cloneNode(!0))),this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[Fd,Gd,jd,Kd]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),Zd(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":Vd(this,wd,Td).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":Vd(this,Md,Nd).call(this,e);break;case"keyup":Vd(this,xd,Dd).call(this,e)}}attributeChangedCallback(e,t,n){e===jd&&Zd(this)&&!Bd(this,Ad)?this.setAttribute("aria-checked",null!=n?"true":"false"):e===Fd&&n!==t?this.role="menuitem"+n:e===Gd&&n!==t&&(null==n?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Gd)||this.enable(),this.role="menuitem"+this.type,qd(this,kd,Qd(this,this.parentNode)),Vd(this,Od,Pd).call(this)}disconnectedCallback(){this.disable(),Vd(this,Od,Pd).call(this),qd(this,kd,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=ba(this))?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return null!=(e=this.getAttribute(Fd))?e:""}set type(e){this.setAttribute(Fd,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(Kd))?e:this.text}set value(e){this.setAttribute(Kd,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(Zd(this))return"true"===this.getAttribute("aria-checked")}set checked(e){Zd(this)&&(qd(this,Ad,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){Zd(this)||this.invokeTargetElement&&ma(this,e.target)&&this.invokeTargetElement.dispatchEvent(new no({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function Zd(e){return"radio"===e.type||"checkbox"===e.type}function Qd(e,t){if(!e)return null;const{host:n}=e.getRootNode();return!t&&n?Qd(e,n):(null==t?void 0:t.items)?t:Qd(t,null==t?void 0:t.parentNode)}Ad=new WeakMap,kd=new WeakMap,wd=new WeakSet,Td=function(e){const t=e.target;if(!(null==t?void 0:t.name))for(let n of t.assignedNodes({flatten:!0}))n instanceof Text&&""===n.textContent.trim()&&n.remove();"submenu"===t.name&&(this.submenuElement?Vd(this,Id,Sd).call(this):Vd(this,Cd,Rd).call(this))},Id=new WeakSet,Sd=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",Bd(this,Ld)),this.submenuElement.addEventListener("addmenuitem",Bd(this,Ld)),this.submenuElement.addEventListener("removemenuitem",Bd(this,Ld)),Bd(this,Ld).call(this)},Cd=new WeakSet,Rd=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",Bd(this,Ld)),this.submenuElement.removeEventListener("addmenuitem",Bd(this,Ld)),this.submenuElement.removeEventListener("removemenuitem",Bd(this,Ld)),Bd(this,Ld).call(this)},Ld=new WeakMap,xd=new WeakSet,Dd=function(e){const{key:t}=e;this.keysUsed.includes(t)?this.handleClick(e):this.removeEventListener("keyup",Vd(this,xd,Dd))},Md=new WeakSet,Nd=function(e){const{metaKey:t,altKey:n,key:i}=e;
2t||n||!this.keysUsed.includes(i)?this.removeEventListener("keyup",Vd(this,xd,Dd)):this.addEventListener("keyup",Vd(this,xd,Dd),{once:!0})},Od=new WeakSet,Pd=function(){var e;const t=null==(e=Bd(this,kd))?void 0:e.radioGroupItems;if(!t)return;let n=t.filter(e=>"true"===e.getAttribute("aria-checked")).pop();n||(n=t[0]);for(const i of t)i.setAttribute("aria-checked","false");null==n||n.setAttribute("aria-checked","true")},((e,t,n)=>{((e,t,n)=>{t in e?Ud(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n)})(Yd,"template",$d),na.customElements.get("media-chrome-menu-item")||na.customElements.define("media-chrome-menu-item",Yd);var zd,Xd,Jd,eu,tu,nu,iu,au,ru,su,ou,lu,du,uu,cu,hu,mu,pu,vu,bu,fu,gu,Eu,yu,_u,Au=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ku=(e,t,n)=>(Au(e,t,"read from private field"),n?n.call(e):t.get(e)),wu=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Tu=(e,t,n,i)=>(Au(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Iu=(e,t,n)=>(Au(e,t,"access private method"),n);const Su=ia.createElement("template");Su.innerHTML='\n <style>\n :host {\n --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px));\n\n box-shadow: var(--_focus-visible-box-shadow, none);\n background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding));\n display: inline-flex;\n align-items: center;\n \n vertical-align: middle;\n box-sizing: border-box;\n position: relative;\n width: 100px;\n transition: background .15s linear;\n cursor: pointer;\n pointer-events: auto;\n touch-action: none; \n z-index: 1; \n }\n\n \n input[type=range]:focus {\n outline: 0;\n }\n input[type=range]:focus::-webkit-slider-runnable-track {\n outline: 0;\n }\n\n :host(:hover) {\n background: var(--media-control-hover-background, rgb(50 50 70 / .7));\n }\n\n #leftgap {\n padding-left: var(--media-range-padding-left, var(--_media-range-padding));\n }\n\n #rightgap {\n padding-right: var(--media-range-padding-right, var(--_media-range-padding));\n }\n\n #startpoint,\n #endpoint {\n position: absolute;\n }\n\n #endpoint {\n right: 0;\n }\n\n #container {\n \n width: var(--media-range-track-width, 100%);\n transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));\n position: relative;\n height: 100%;\n display: flex;\n align-items: center;\n min-width: 40px;\n }\n\n #range {\n \n display: var(--media-time-range-hover-display, block);\n bottom: var(--media-time-range-hover-bottom, -7px);\n height: var(--media-time-range-hover-height, max(100% + 7px, 25px));\n width: 100%;\n position: absolute;\n cursor: pointer;\n\n -webkit-appearance: none; \n -webkit-tap-highlight-color: transparent;\n background: transparent; \n margin: 0;\n z-index: 1;\n }\n\n @media (hover: hover) {\n #range {\n bottom: var(--media-time-range-hover-bottom, -5px);\n height: var(--media-time-range-hover-height, max(100% + 5px, 20px));\n }\n }\n\n \n \n #range::-webkit-slider-thumb {\n -webkit-appearance: none;\n background: transparent;\n width: .1px;\n height: .1px;\n }\n\n \n #range::-moz-range-thumb {\n background: transparent;\n border: transparent;\n width: .1px;\n height: .1px;\n }\n\n #appearance {\n height: var(--media-range-track-height, 4px);\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: 100%;\n position: absolute;\n \n will-change: transform;\n }
2\n\n #background,\n #track {\n border-radius: var(--media-range-track-border-radius, 1px);\n position: absolute;\n width: 100%;\n height: 100%;\n }\n\n #background {\n background: var(--media-range-track-background, rgb(255 255 255 / .2));\n backdrop-filter: var(--media-range-track-background-backdrop-filter);\n -webkit-backdrop-filter: var(--media-range-track-background-backdrop-filter);\n }\n\n #track {\n border: var(--media-range-track-border, none);\n outline: var(--media-range-track-outline);\n outline-offset: var(--media-range-track-outline-offset);\n backdrop-filter: var(--media-range-track-backdrop-filter);\n -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);\n box-shadow: var(--media-range-track-box-shadow, none);\n overflow: hidden;\n }\n\n #progress,\n #highlight,\n #pointer {\n position: absolute;\n height: 100%;\n will-change: width;\n }\n\n #progress {\n background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)));\n transition: var(--media-range-track-transition);\n }\n\n #pointer {\n background: var(--media-range-track-pointer-background);\n border-right: var(--media-range-track-pointer-border-right);\n transition: visibility .25s, opacity .25s;\n visibility: hidden;\n opacity: 0;\n }\n\n @media (hover: hover) {\n :host(:hover) #pointer {\n transition: visibility .5s, opacity .5s;\n visibility: visible;\n opacity: 1;\n }\n }\n\n #thumb {\n width: var(--media-range-thumb-width, 10
2px);\n height: var(--media-range-thumb-height, 10px);\n margin-left: calc(var(--media-range-thumb-width, 10px) / -2);\n border: var(--media-range-thumb-border, none);\n border-radius: var(--media-range-thumb-border-radius, 10px);\n background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238)));\n box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);\n transition: var(--media-range-thumb-transition);\n transform: var(--media-range-thumb-transform, none);\n opacity: var(--media-range-thumb-opacity, 1);\n position: absolute;\n left: 0;\n cursor: pointer;\n }\n\n :host([disabled]) #thumb {\n background-color: #777;\n }\n\n .segments #appearance {\n height: var(--media-range-segment-hover-height, 7px);\n }\n\n #background,\n #track {\n clip-path: url(#segments-clipping);\n }\n\n #segments {\n --segments-gap: var(--media-range-segments-gap, 2px);\n position: absolute;\n width: 100%;\n height: 100%;\n }\n\n #segments-clipping {\n transform: translateX(calc(var(--segments-gap) / 2));\n }\n\n #segments-clipping:empty {\n display: none;\n }\n\n #segments-clipping rect {\n height: var(--media-range-track-height, 4px);\n y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2);\n transition: var(--media-range-segment-transition, transform .1s ease-in-out);\n transform: var(--media-range-segment-transform, scaleY(1));\n transform-origin: center;\n }\n </style>\n <div id="leftgap"></div>\n <div id="container">\n <div id="startpoint"></div>\n <div id="endpoint"></div>\n <div id="appearance" part="appearance">\n <div id="background"></div>\n <div id="track">\n <div id="highlight"></div>\n <div id="pointer"></div>\n <div id="progress"></div>\n </div>\n <div id="thumb"></div>\n <svg id="segments"><clipPath id="segments-clipping"></clipPath></svg>\n </div>
2\n <input id="range" type="range" min="0" max="1" step="any" value="0">\n </div>\n <div id="rightgap"></div>\n';class Cu extends na.HTMLElement{constructor(){super(),wu(this,su),wu(this,lu),wu(this,uu),wu(this,hu),wu(this,pu),wu(this,bu),wu(this,gu),wu(this,yu),wu(this,zd,void 0),wu(this,Xd,void 0),wu(this,Jd,void 0),wu(this,eu,void 0),wu(this,tu,{}),wu(this,nu,[]),wu(this,iu,()=>{if(this.range.matches(":focus-visible")){const{style:e}=ga(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),wu(this,au,()=>{const{style:e}=ga(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),wu(this,ru,()=>{const e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Su.content.cloneNode(!0))),this.container=this.shadowRoot.querySelector("#container"),Tu(this,Jd,this.shadowRoot.querySelector("#startpoint")),Tu(this,eu,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",_i.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,n){var i,a,r,s,o;e===_i.MEDIA_CONTROLLER?(t&&(null==(a=null==(i=ku(this,zd))?void 0:i.unassociateElement)||a.call(i,this),Tu(this,zd,null)),n&&this.isConnected&&(Tu(this,zd,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(o=null==(s=ku(this,zd))?void 0:s.associateElement)||o.call(s,this))):("disabled"===e||"aria-disabled"===e&&t!==n)&&(null==n?(this.range.removeAttribute(e),Iu(this,lu,du).call(this)):(this.range.setAttribute(e,n),Iu(this,uu,cu).call(this)))}connectedCallback(){var e,t,n;const{style:i}=ga(this.shadowRoot,":host");i.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),ku(this,tu).pointer=ga(this.shadowRoot,"#pointer"),ku(this,tu).progress=ga(this.shadowRoot,"#progress"),ku(this,tu).thumb=ga(this.shadowRoot,"#thumb");const a=this.getAttribute(_i.MEDIA_CONTROLLER);a&&(Tu(this,zd,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(n=null==(t=ku(this,zd))?void 0:t.associateElement)||n.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",ku(this,iu)),this.shadowRoot.addEventListener("focusout",ku(this,au)),Iu(this,lu,du).call(this),oa(this.container,ku(this,ru))}disconnectedCallback(){var e,t;Iu(this,uu,cu).call(this),null==(t=null==(e=ku(this,zd))?void 0:e.unassociateElement)||t.call(e,this),Tu(this,zd,null),this.shadowRoot.removeEventListener("focusin",ku(this,iu)),this.shadowRoot.removeEventListener("focusout",ku(this,au)),la(this.container,ku(this,ru))}updatePointerBar(e){var t;null==(t=ku(this,tu).pointer)||t.style.setProperty("width",100*this.getPointerRatio(e)+"%")}updateBar(){var e,t;const n=100*this.range.valueAsNumber;null==(e=ku(this,tu).progress)||e.style.setProperty("width",`${n}%`),null==(t=ku(this,tu).thumb)||t.style.setProperty("left",`${n}%`)}updateSegments(e){const t=this.shadowRoot.querySelector("#segments-clipping");if(t.textContent="",this.container.classList.toggle("segments",!!(null==e?void 0:e.length)),!(null==e?void 0:e.length))return;ku(this,tu).activeSegment=Ea(this.shadowRoot,"#segments-clipping rect:nth-child(0)");const n=[...new Set([+this.range.min,...e.flatMap(e=>[e.start,e.end]),+this.range.max])];Tu(this,nu,[...n]);const i=n.pop();for(const[a,r]of n.entries()){const[e,s]=[0===a,a===n.length-1],o=e?"calc(var(--segments-gap) / -1)":100*r+"%",l=`calc(${100*((s?i:n[a+1])-r)}%${e||s?"":" - var(--segments-gap)"})`,d=ia.createElementNS("http://www.w3.org/2000/svg","rect"),u=ga(this.shadowRoot,`#segments-clipping rect:nth-child(${a+1})`);u.style.setProperty("x",o),u.style.setProperty("width",l),t.append(d)}}getPointerRatio(e){let t=function(e,t,n,i){const a=fa(n,i),r=fa(n,{x:e,y:t}),s=fa(i,{x:e,y:t});return r>a||s>a?r>s?1:0:r/a}(e.clientX,e.clientY,ku(this,Jd).getBoundingClientRect(),ku(this,eu).getBoundingClientRect());return Math.max(0,Math.min(1,t))}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":Iu(this,yu,_u).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":Iu(this,pu,vu).call(this,e);break;case"pointerdown":Iu(this,hu,mu).call(this,e);break;case"pointerup":Iu(this,bu,fu).call(this);break;
2case"pointerleave":Iu(this,gu,Eu).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}zd=new WeakMap,Xd=new WeakMap,Jd=new WeakMap,eu=new WeakMap,tu=new WeakMap,nu=new WeakMap,iu=new WeakMap,au=new WeakMap,ru=new WeakMap,su=new WeakSet,ou=function(e){const t=ku(this,tu).activeSegment;if(!t)return;const n=this.getPointerRatio(e),i=ku(this,nu).findIndex((e,t,i)=>{const a=i[t+1];return null!=a&&n>=e&&n<=a}),a=`#segments-clipping rect:nth-child(${i+1})`;t.selectorText==a&&t.style.transform||(t.selectorText=a,t.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))},lu=new WeakSet,du=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},uu=new WeakSet,cu=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),null==(e=na.window)||e.removeEventListener("pointerup",this),null==(t=na.window)||t.removeEventListener("pointermove",this)},hu=new WeakSet,mu=function(e){var t;Tu(this,Xd,e.composedPath().includes(this.range)),null==(t=na.window)||t.addEventListener("pointerup",this)},pu=new WeakSet,vu=function(e){var t;"mouse"!==e.pointerType&&Iu(this,hu,mu).call(this,e),this.addEventListener("pointerleave",this),null==(t=na.window)||t.addEventListener("pointermove",this)},bu=new WeakSet,fu=function(){var e;null==(e=na.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},gu=new WeakSet,Eu=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=na.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=ku(this,tu).activeSegment)||t.style.removeProperty("transform")},yu=new WeakSet,_u=function(e){this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),Iu(this,su,ou).call(this,e),!this.dragging||"mouse"===e.pointerType&&ku(this,Xd)||(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))},na.customElements.get("media-chrome-range")||na.customElements.define("media-chrome-range",Cu);var Ru,Lu=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},xu=(e,t,n)=>(Lu(e,t,"read from private field"),n?n.call(e):t.get(e)),Du=(e,t,n,i)=>(Lu(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const Mu=ia.createElement("template");
2Mu.innerHTML="\n <style>\n :host {\n \n box-sizing: border-box;\n display: var(--media-control-display, var(--media-control-bar-display, inline-flex));\n color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n --media-loading-indicator-icon-height: 44px;\n }\n\n ::slotted(media-time-range),\n ::slotted(media-volume-range) {\n min-height: 100%;\n }\n\n ::slotted(media-time-range),\n ::slotted(media-clip-selector) {\n flex-grow: 1;\n }\n </style>\n\n <slot></slot>\n";class Nu extends na.HTMLElement{constructor(){super(),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,Ru,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Mu.content.cloneNode(!0)))}static get observedAttributes(){return[_i.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,n){var i,a,r,s,o;e===_i.MEDIA_CONTROLLER&&(t&&(null==(a=null==(i=xu(this,Ru))?void 0:i.unassociateElement)||a.call(i,this),Du(this,Ru,null)),n&&this.isConnected&&(Du(this,Ru,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(o=null==(s=xu(this,Ru))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,n;const i=this.getAttribute(_i.MEDIA_CONTROLLER);i&&(Du(this,Ru,null==(e=this.getRootNode())?void 0:e.getElementById(i)),null==(n=null==(t=xu(this,Ru))?void 0:t.associateElement)||n.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=xu(this,Ru))?void 0:e.unassociateElement)||t.call(e,this),Du(this,Ru,null)}}Ru=new WeakMap,na.customElements.get("media-control-bar")||na.customElements.define("media-control-bar",Nu);var Ou,Pu=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Uu=(e,t,n)=>(Pu(e,t,"read from private field"),n?n.call(e):t.get(e)),Wu=(e,t,n,i)=>(Pu(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const Bu=ia.createElement("template");
2Bu.innerHTML="\n <style>\n :host {\n font: var(--media-font,\n var(--media-font-weight, normal)\n var(--media-font-size, 14px) /\n var(--media-text-content-height, var(--media-control-height, 24px))\n var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))));\n padding: var(--media-control-padding, 10px);\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: middle;\n box-sizing: border-box;\n text-align: center;\n pointer-events: auto;\n }\n\n \n :host(:focus-visible) {\n box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9);\n outline: 0;\n }\n\n \n :host(:where(:focus)) {\n box-shadow: none;\n outline: 0;\n }\n </style>\n <slot></slot>\n";class Hu extends na.HTMLElement{constructor(){super(),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,Ou,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Bu.content.cloneNode(!0)))}static get observedAttributes(){return[_i.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,n){var i,a,r,s,o;e===_i.MEDIA_CONTROLLER&&(t&&(null==(a=null==(i=Uu(this,Ou))?void 0:i.unassociateElement)||a.call(i,this),Wu(this,Ou,null)),n&&this.isConnected&&(Wu(this,Ou,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(o=null==(s=Uu(this,Ou))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,n;const{style:i}=ga(this.shadowRoot,":host");i.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const a=this.getAttribute(_i.MEDIA_CONTROLLER);a&&(Wu(this,Ou,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(n=null==(t=Uu(this,Ou))?void 0:t.associateElement)||n.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=Uu(this,Ou))?void 0:e.unassociateElement)||t.call(e,this),Wu(this,Ou,null)}}Ou=new WeakMap,na.customElements.get("media-text-display")||na.customElements.define("media-text-display",Hu);var qu,Vu=Hu,$u=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Fu=(e,t,n)=>($u(e,t,"read from private field"),n?n.call(e):t.get(e));class Ku extends Hu{constructor(){super(),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,qu,void 0),((e,t,n,i)=>{$u(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,qu,this.shadowRoot.querySelector("slot")),Fu(this,qu).textContent=Zi(0)}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_DURATION]}attributeChangedCallback(e,t,n){e===wi.MEDIA_DURATION&&(Fu(this,qu).textContent=Zi(+n)),super.attributeChangedCallback(e,t,n)}get mediaDuration(){return ya(this,wi.MEDIA_DURATION)}set mediaDuration(e){_a(this,wi.MEDIA_DURATION,e)}}qu=new WeakMap,na.customElements.get("media-duration-display")||na.customElements.define("media-duration-display",Ku);const ju=ia.createElement("template");ju.innerHTML=`\n <style>\n :host([${wi.MEDIA_IS_FULLSCREEN}]) slot:not([name=exit]):not([name=icon]) {\n display: none !important;\n }\n\n \n :host(:not([${wi.MEDIA_IS_FULLSCREEN}])) slot:not([name=enter]):not([name=icon]) {\n display: none !important;\n }\n </style>\n\n <slot name="icon">\n <slot name="enter"><svg aria-hidden="true" viewBox="0 0 26 24">\n <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>\n</svg></slot>\n <slot name="exit"><svg aria-hidden="true" viewBox="0 0 26 24">\n <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>\n</svg></slot>\n </slot>\n`;const Gu=e=>{const t=e.mediaIsFullscreen?Ui.EXIT_FULLSCREEN():Ui.ENTER_FULLSCREEN();e.setAttribute("aria-label",t)};class Yu extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_IS_FULLSCREEN,wi.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:ju,...e})}connectedCallback(){super.connectedCallback(),Gu(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_IS_FULLSCREEN&&Gu(this)}get mediaFullscreenUnavailable(){return wa(this,wi.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){Ta(this,wi.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return Aa(this,wi.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){ka(this,wi.MEDIA_IS_FULLSCREEN,e)}handleClick(){const e=this.mediaIsFullscreen?yi.MEDIA_EXIT_FULLSCREEN_REQUEST:yi.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new na.CustomEvent(e,{composed:!0,bubbles:!0}))}}na.customElements.get("media-fullscreen-button")||na.customElements.define("media-fullscreen-button",Yu);const{MEDIA_TIME_IS_LIVE:Zu,MEDIA_PAUSED:Qu}=wi,{MEDIA_SEEK_TO_LIVE_REQUEST:zu,MEDIA_PLAY_REQUEST:Xu}=yi,Ju=ia.createElement("template");Ju.innerHTML=`\n <style>\n\n slot[name=indicator] > *,\n :host ::slotted([slot=indicator]) {\n \n min-width: auto;\n fill: var(--media-live-button-icon-color, rgb(140, 140, 140));\n color: var(--media-live-button-icon-color, rgb(140, 140, 140));\n }\n\n :host([${Zu}]:not([${Qu}])) slot[name=indicator] > *,\n :host([${Zu}]:not([${Qu}])) ::slotted([slot=indicator]) {\n fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));\n color: var(--media-live-button-indicator-color, rgb(255, 0, 0));\n }\n\n :host([${Zu}]:not([${Qu}
2])) {\n cursor: not-allowed;\n }\n\n </style>\n\n <slot name="indicator"><svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg></slot>\n \n <slot name="spacer"> </slot><slot name="text">LIVE</slot>\n`;const ec=e=>{const t=e.mediaPaused||!e.mediaTimeIsLive,n=t?Ui.SEEK_LIVE():Ui.PLAYING_LIVE();e.setAttribute("aria-label",n),t?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class tc extends js{static get observedAttributes(){return[...super.observedAttributes,Qu,Zu]}constructor(e={}){super({slotTemplate:Ju,...e})}connectedCallback(){ec(this),super.connectedCallback()}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),ec(this)}get mediaPaused(){return Aa(this,wi.MEDIA_PAUSED)}set mediaPaused(e){ka(this,wi.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return Aa(this,wi.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){ka(this,wi.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new na.CustomEvent(zu,{composed:!0,bubbles:!0})),this.hasAttribute(Qu)&&this.dispatchEvent(new na.CustomEvent(Xu,{composed:!0,bubbles:!0})))}}na.customElements.get("media-live-button")||na.customElements.define("media-live-button",tc);var nc,ic,ac=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},rc=(e,t,n)=>(ac(e,t,"read from private field"),n?n.call(e):t.get(e)),sc=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},oc=(e,t,n,i)=>(ac(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const lc="loadingdelay",dc=ia.createElement("template");dc.innerHTML=`\n<style>\n:host {\n display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));\n vertical-align: middle;\n box-sizing: border-box;\n --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms);\n}\n\n#status {\n color: rgba(0,0,0,0);\n width: 0px;\n height: 0px;\n}\n\n:host slot[name=icon] > *,\n:host ::slotted([slot=icon]) {\n opacity: var(--media-loading-indicator-opacity, 0);\n transition: opacity 0.15s;\n}\n\n:host([${wi.MEDIA_LOADING}]:not([${wi.MEDIA_PAUSED}])) slot[name=icon] > *,\n:host([${wi.MEDIA_LOADING}]:not([${wi.MEDIA_PAUSED}])) ::slotted([slot=icon]) {\n opacity: var(--media-loading-indicator-opacity, 1);\n transition: opacity 0.15s var(--_loading-indicator-delay);\n}\n\n:host #status {\n visibility: var(--media-loading-indicator-opacity, hidden);\n transition: visibility 0.15s;\n}\n\n:host([${wi.MEDIA_LOADING}]:not([${wi.MEDIA_PAUSED}])) #status {\n visibility: var(--media-loading-indicator-opacity, visible);\n transition: visibility 0.15s var(--_loading-indicator-delay);\n}\n\nsvg, img, ::slotted(svg), ::slotted(img) {\n width: var(--media-loading-indicator-icon-width);\n height: var(--media-loading-indicator-icon-height, 100px);\n fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n vertical-align: middle;\n}\n</style>\n\n<slot name="icon">\n<svg aria-hidden="true" viewBox="0 0 100 100">\n <path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">\n <animateTransform\n attributeName="transform"\n attributeType="XML"\n type="rotate"\n dur="1s"\n from="0 50 50"\n to="360 50 50"\n repeatCount="indefinite" />\n </path>\n</svg>\n</slot>\n<div id="status" role="status" aria-live="polite">${Pi.MEDIA_LOADING()}</div>\n`;class uc extends na.HTMLElement{constructor(){if(super(),sc(this,nc,void 0),sc(this,ic,500),!this.shadowRoot){const e=this.attachShadow({mode:"open"}),t=dc.content.cloneNode(!0);e.appendChild(t)}}static get observedAttributes(){return[_i.MEDIA_CONTROLLER,wi.MEDIA_PAUSED,wi.MEDIA_LOADING,lc]}attributeChangedCallback(e,t,n){var i,a,r,s,o;e===lc&&t!==n?this.loadingDelay=Number(n):e===_i.MEDIA_CONTROLLER&&(t&&(null==(a=null==(i=rc(this,nc))?void 0:i.unassociateElement)||a.call(i,this),oc(this,nc,null)),n&&this.isConnected&&(oc(this,nc,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(o=null==(s=rc(this,nc))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,n;const i=this.getAttribute(_i.MEDIA_CONTROLLER);i&&(oc(this,nc,null==(e=this.getRootNode())?void 0:e.getElementById(i)),null==(n=null==(t=rc(this,nc))?void 0:t.associateElement)||n.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=rc(this,nc))?void 0:e.unassociateElement)||t.call(e,this),oc(this,nc,null)}get loadingDelay(){return rc(this,ic)}set loadingDelay(e){oc(this,ic,e);const{style:t}=ga(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return Aa(this,wi.MEDIA_PAUSED)}set mediaPaused(e){ka(this,wi.MEDIA_PAUSED,e)}get mediaLoading(){return Aa(this,wi.MEDIA_LOADING)}set mediaLoading(e){ka(this,wi.MEDIA_LOADING,e)}}nc=new WeakMap,ic=new WeakMap,na.customElements.get("media-loading-indicator")||na.customElements.define("media-loading-indicator",uc);const{MEDIA_VOLUME_LEVEL:cc}=wi,hc='<svg aria-hidden="true" viewBox="0 0 24 24">\n <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4Z"/>\n</svg>',mc=ia.createElement("template");mc.innerHTML=`\n <style>\n \n :host(:not([${cc}
2])) slot:not([name=high]):not([name=icon]), \n :host([${cc}=high]) slot:not([name=high]):not([name=icon]) {\n display: none !important;\n }\n\n :host([${cc}=off]) slot:not([name=off]):not([name=icon]) {\n display: none !important;\n }\n\n :host([${cc}=low]) slot:not([name=low]):not([name=icon]) {\n display: none !important;\n }\n\n :host([${cc}=medium]) slot:not([name=medium]):not([name=icon]) {\n display: none !important;\n }\n </style>\n\n <slot name="icon">\n <slot name="off"><svg aria-hidden="true" viewBox="0 0 24 24">\n <path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/>\n</svg></slot>\n <slot name="low">${hc}</slot>\n <slot name="medium">${hc}</slot>\n <slot name="high"><svg aria-hidden="true" viewBox="0 0 24 24">\n <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4ZM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54Z"/>\n</svg></slot>\n </slot>\n`;const pc=e=>{const t="off"===e.mediaVolumeLevel?Ui.UNMUTE():Ui.MUTE();e.setAttribute("aria-label",t)};class vc extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:mc,...e})}connectedCallback(){pc(this),super.connectedCallback()}attributeChangedCallback(e,t,n){e===wi.MEDIA_VOLUME_LEVEL&&pc(this),super.attributeChangedCallback(e,t,n)}get mediaVolumeLevel(){return wa(this,wi.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){Ta(this,wi.MEDIA_VOLUME_LEVEL,e)}handleClick(){const e="off"===this.mediaVolumeLevel?yi.MEDIA_UNMUTE_REQUEST:yi.MEDIA_MUTE_REQUEST;this.dispatchEvent(new na.CustomEvent(e,{composed:!0,bubbles:!0}))}}na.customElements.get("media-mute-button")||na.customElements.define("media-mute-button",vc);const bc='<svg aria-hidden="true" viewBox="0 0 28 24">\n <path d="M24 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Zm-1 16H5V5h18v14Zm-3-8h-7v5h7v-5Z"/>\n</svg>',fc=ia.createElement("template");fc.innerHTML=`\n <style>\n :host([${wi.MEDIA_IS_PIP}]) slot:not([name=exit]):not([name=icon]) {\n display: none !important;\n }\n\n \n :host(:not([${wi.MEDIA_IS_PIP}])) slot:not([name=enter]):not([name=icon]) {\n display: none !important;\n }\n </style>\n\n <slot name="icon">\n <slot name="enter">${bc}</slot>\n <slot name="exit">${bc}</slot>\n </slot>\n`;const gc=e=>{const t=e.mediaIsPip?Ui.EXIT_PIP():Ui.ENTER_PIP();e.setAttribute("aria-label",t)};class Ec extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_IS_PIP,wi.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:fc,...e})}connectedCallback(){gc(this),super.connectedCallback()}attributeChangedCallback(e,t,n){e===wi.MEDIA_IS_PIP&&gc(this),super.attributeChangedCallback(e,t,n)}get mediaPipUnavailable(){return wa(this,wi.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){Ta(this,wi.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return Aa(this,wi.MEDIA_IS_PIP)}set mediaIsPip(e){ka(this,wi.MEDIA_IS_PIP,e)}handleClick(){const e=this.mediaIsPip?yi.MEDIA_EXIT_PIP_REQUEST:yi.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new na.CustomEvent(e,{composed:!0,bubbles:!0}))}}na.customElements.get("media-pip-button")||na.customElements.define("media-pip-button",Ec);var yc,_c=(e,t,n)=>(((e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)})(e,t,"read from private field"),n?n.call(e):t.get(e));const Ac="rates",kc=[1,1.2,1.5,1.7,2],wc=ia.createElement("template");wc.innerHTML='\n <style>\n :host {\n min-width: 5ch;\n padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n }\n </style>\n <slot name="icon"></slot>\n';class Tc extends js{constructor(e={}){super({slotTemplate:wc,...e}),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,yc,new mr(this,Ac,{defaultValue:kc})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML="1x"}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_PLAYBACK_RATE,Ac]}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),e===Ac&&(_c(this,yc).value=n),e===wi.MEDIA_PLAYBACK_RATE){const e=n?+n:Number.NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",Pi.PLAYBACK_RATE({playbackRate:t}))}}get rates(){return _c(this,yc)}set rates(e){e?Array.isArray(e)&&(_c(this,yc).value=e.join(" ")):_c(this,yc).value=""}get mediaPlaybackRate(){return ya(this,wi.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){_a(this,wi.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;const n=Array.from(this.rates.values(),e=>+e).sort((e,t)=>
2e-t),i=null!=(t=null!=(e=n.find(e=>e>this.mediaPlaybackRate))?e:n[0])?t:1,a=new na.CustomEvent(yi.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:i});this.dispatchEvent(a)}}yc=new WeakMap,na.customElements.get("media-playback-rate-button")||na.customElements.define("media-playback-rate-button",Tc);var Ic,Sc,Cc,Rc,Lc,xc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Dc=(e,t,n)=>(xc(e,t,"read from private field"),n?n.call(e):t.get(e)),Mc=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Nc=(e,t,n)=>(xc(e,t,"access private method"),n);const Oc="rates";class Pc extends dl{constructor(){super(),Mc(this,Sc),Mc(this,Rc),Mc(this,Ic,new mr(this,Oc,{defaultValue:kc})),Nc(this,Sc,Cc).call(this)}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_PLAYBACK_RATE,Oc]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_PLAYBACK_RATE&&t!=n?this.value=n:e===Oc&&t!=n&&(Dc(this,Ic).value=n,Nc(this,Sc,Cc).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Nc(this,Rc,Lc))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Nc(this,Rc,Lc))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:da(this).querySelector("media-playback-rate-menu-button")}get rates(){return Dc(this,Ic)}set rates(e){e?Array.isArray(e)&&(Dc(this,Ic).value=e.join(" ")):Dc(this,Ic).value="",Nc(this,Sc,Cc).call(this)}get mediaPlaybackRate(){return ya(this,wi.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){_a(this,wi.MEDIA_PLAYBACK_RATE,e)}}Ic=new WeakMap,Sc=new WeakSet,Cc=function(){this.defaultSlot.textContent="";for(const e of this.rates){const t=nl({type:"radio",text:this.formatMenuItemText(`${e}x`,e),value:e,checked:this.mediaPlaybackRate==e});t.prepend(il(this,"checked-indicator")),this.defaultSlot.append(t)}},Rc=new WeakSet,Lc=function(){if(!this.value)return;const e=new na.CustomEvent(yi.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},na.customElements.get("media-playback-rate-menu")||na.customElements.define("media-playback-rate-menu",Pc);var Uc,Wc=(e,t,n)=>(((e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)})(e,t,"read from private field"),n?n.call(e):t.get(e));const Bc="rates",Hc=[1,1.2,1.5,1.7,2],qc=ia.createElement("template");qc.innerHTML='\n <style>\n :host {\n min-width: 5ch;\n padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n }\n </style>\n <slot name="icon"></slot>\n';class Vc extends Tl{constructor(e={}){super({slotTemplate:qc,...e}),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,Uc,new mr(this,Bc,{defaultValue:Hc})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML="1x"}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_PLAYBACK_RATE,Bc]}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),e===Bc&&(Wc(this,Uc).value=n),e===wi.MEDIA_PLAYBACK_RATE){const e=n?+n:Number.NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",Pi.PLAYBACK_RATE({playbackRate:t}))}}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:da(this).querySelector("media-playback-rate-menu")}get rates(){return Wc(this,Uc)}set rates(e){e?Array.isArray(e)&&(Wc(this,Uc).value=e.join(" ")):Wc(this,Uc).value=""}get mediaPlaybackRate(){return ya(this,wi.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){_a(this,wi.MEDIA_PLAYBACK_RATE,e)}}Uc=new WeakMap,na.customElements.get("media-playback-rate-menu-button")||na.customElements.define("media-playback-rate-menu-button",Vc);const $c=ia.createElement("template");$c.innerHTML=`\n <style>\n :host([${wi.MEDIA_PAUSED}]) slot[name=pause] {\n display: none !important;\n }\n\n :host(:not([${wi.MEDIA_PAUSED}])) slot[name=play] {\n display: none !important;\n }\n </style>\n\n <slot name="icon">\n <slot name="play"><svg aria-hidden="true" viewBox="0 0 24 24">\n <path d="m6 21 15-9L6 3v18Z"/>\n</svg></slot>\n <slot name="pause"><svg aria-hidden="true" viewBox="0 0 24 24">\n <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>\n</svg></slot>\n </slot>\n`;const Fc=e=>{const t=e.mediaPaused?Ui.PLAY():Ui.PAUSE();e.setAttribute("aria-label",t)};class Kc extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_PAUSED,wi.MEDIA_ENDED]}constructor(e={}){super({slotTemplate:$c,...e})}connectedCallback(){Fc(this),super.connectedCallback()}attributeChangedCallback(e,t,n){e===wi.MEDIA_PAUSED&&Fc(this),super.attributeChangedCallback(e,t,n)}get mediaPaused(){return Aa(this,wi.MEDIA_PAUSED)}set mediaPaused(e){ka(this,wi.MEDIA_PAUSED,e)}handleClick(){const e=this.mediaPaused?yi.MEDIA_PLAY_REQUEST:yi.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new na.CustomEvent(e,{composed:!0,bubbles:!0}))}}na.customElements.get("media-play-button")||na.customElements.define("media-play-button",Kc);const jc="placeholdersrc",Gc="src",Yc=ia.createElement("template");Yc.innerHTML='\n <style>\n :host {\n pointer-events: none;\n display: var(--media-poster-image-display, inline-block);\n box-sizing: border-box;\n }\n\n img {\n max-width: 100%;\n max-height: 100%;\n min-width: 100%;\n min-height: 100%;\n background-repeat: no-repeat;\n background-position: var(--media-poster-image-background-position, var(--media-object-position, center));\n background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain));\n object-fit: var(--media-object-fit, contain);\n object-position: var(--media-object-position, center);\n }\n </style>\n\n <img part="poster img" aria-hidden="true" id="image"/>\n';class Zc extends na.HTMLElement{static get observedAttributes(){return[jc,Gc]}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Yc.content.cloneNode(!0))),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,n){e===Gc&&(null==n?this.image.removeAttribute(G
2c):this.image.setAttribute(Gc,n)),e===jc&&(null==n?this.image.style.removeProperty("background-image"):((e,t)=>{e.style["background-image"]=`url('${t}')`})(this.image,n))}get placeholderSrc(){return wa(this,jc)}set placeholderSrc(e){Ta(this,Gc,e)}get src(){return wa(this,Gc)}set src(e){Ta(this,Gc,e)}}na.customElements.get("media-poster-image")||na.customElements.define("media-poster-image",Zc);var Qc,zc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};class Xc extends Vu{constructor(){super(),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,Qc,void 0),((e,t,n,i)=>{zc(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,Qc,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_PREVIEW_CHAPTER]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_PREVIEW_CHAPTER&&n!==t&&null!=n&&(((e,t,n)=>(zc(e,t,"read from private field"),n?n.call(e):t.get(e)))(this,Qc).textContent=n,""!==n?this.setAttribute("aria-valuetext",`chapter: ${n}`):this.removeAttribute("aria-valuetext"))}get mediaPreviewChapter(){return wa(this,wi.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){Ta(this,wi.MEDIA_PREVIEW_CHAPTER,e)}}Qc=new WeakMap,na.customElements.get("media-preview-chapter-display")||na.customElements.define("media-preview-chapter-display",Xc);var Jc,eh=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},th=(e,t,n)=>(eh(e,t,"read from private field"),n?n.call(e):t.get(e)),nh=(e,t,n,i)=>(eh(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const ih=ia.createElement("template");ih.innerHTML='\n <style>\n :host {\n box-sizing: border-box;\n display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block));\n overflow: hidden;\n }\n\n img {\n display: none;\n position: relative;\n }\n </style>\n <img crossorigin loading="eager" decoding="async">\n';class ah extends na.HTMLElement{constructor(){super(),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,Jc,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(ih.content.cloneNode(!0)))}static get observedAttributes(){return[_i.MEDIA_CONTROLLER,wi.MEDIA_PREVIEW_IMAGE,wi.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,n;const i=this.getAttribute(_i.MEDIA_CONTROLLER);i&&(nh(this,Jc,null==(e=this.getRootNode())?void 0:e.getElementById(i)),null==(n=null==(t=th(this,Jc))?void 0:t.associateElement)||n.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=th(this,Jc))?void 0:e.unassociateElement)||t.call(e,this),nh(this,Jc,null)}attributeChangedCallback(e,t,n){var i,a,r,s,o;[wi.MEDIA_PREVIEW_IMAGE,wi.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===_i.MEDIA_CONTROLLER&&(t&&(null==(a=null==(i=th(this,Jc))?void 0:i.unassociateElement)||a.call(i,this),nh(this,Jc,null)),n&&this.isConnected&&(nh(this,Jc,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(o=null==(s=th(this,Jc))?void 0:s.associateElement)||o.call(s,this)))}get mediaPreviewImage(){return wa(this,wi.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){Ta(this,wi.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){const e=this.getAttribute(wi.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){e?this.setAttribute(wi.MEDIA_PREVIEW_COORDS,e.join(" ")):this.removeAttribute(wi.MEDIA_PREVIEW_COORDS)}update(){const e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!e||!t)return;const[n,i,a,r]=e,s=t.split("#")[0],o=getComputedStyle(this),{maxWidth:l,maxHeight:d,minWidth:u,minHeight:c}=o,h=Math.min(parseInt(l)/a,parseInt(d)/r),m=Math.max(parseInt(u)/a,parseInt(c)/r),p=h<1,v=p?h:m>1?m:1,{style:b}=ga(this.shadowRoot,":host"),f=ga(this.shadowRoot,"img").style,g=this.shadowRoot.querySelector("img"),E=p?"min":"max";b.setProperty(`${E}-width`,"initial","important"),b.setProperty(`${E}-height`,"initial","important"),b.width=a*v+"px",b.height=r*v+"px";const y=()=>{f.width=this.imgWidth*v+"px",f.height=this.imgHeight*v+"px",f.display="block"};g.src!==s&&(g.onload=()=>
2{this.imgWidth=g.naturalWidth,this.imgHeight=g.naturalHeight,y()},g.src=s,y()),y(),f.transform=`translate(-${n*v}px, -${i*v}px)`}}Jc=new WeakMap,na.customElements.get("media-preview-thumbnail")||na.customElements.define("media-preview-thumbnail",ah);var rh,sh=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},oh=(e,t,n)=>(sh(e,t,"read from private field"),n?n.call(e):t.get(e));class lh extends Hu{constructor(){super(),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,rh,void 0),((e,t,n,i)=>{sh(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,rh,this.shadowRoot.querySelector("slot")),oh(this,rh).textContent=Zi(0)}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_PREVIEW_TIME&&null!=n&&(oh(this,rh).textContent=Zi(n))}get mediaPreviewTime(){return ya(this,wi.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){_a(this,wi.MEDIA_PREVIEW_TIME,e)}}rh=new WeakMap,na.customElements.get("media-preview-time-display")||na.customElements.define("media-preview-time-display",lh);var dh,uh,ch,hh,mh,ph,vh=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},bh=(e,t,n)=>(vh(e,t,"read from private field"),n?n.call(e):t.get(e)),fh=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},gh=(e,t,n,i)=>(vh(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Eh=(e,t,n)=>(vh(e,t,"access private method"),n);class yh extends dl{constructor(){super(...arguments),fh(this,ch),fh(this,mh),fh(this,dh,[]),fh(this,uh,void 0)}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_RENDITION_LIST,wi.MEDIA_RENDITION_SELECTED,wi.MEDIA_RENDITION_UNAVAILABLE]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_RENDITION_SELECTED&&t!==n?this.value=null!=n?n:"auto":e===wi.MEDIA_RENDITION_LIST&&t!==n&&(gh(this,dh,Wi(n)),Eh(this,ch,hh).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Eh(this,mh,ph))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Eh(this,mh,ph))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:da(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return bh(this,dh)}set mediaRenditionList(e){gh(this,dh,e),Eh(this,ch,hh).call(this)}get mediaRenditionSelected(){return wa(this,wi.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){Ta(this,wi.MEDIA_RENDITION_SELECTED,e)}}dh=new WeakMap,uh=new WeakMap,ch=new WeakSet,hh=function(){if(bh(this,uh)===JSON.stringify(this.mediaRenditionList))return;gh(this,uh,JSON.stringify(this.mediaRenditionList));const e=this.mediaRenditionList.sort((e,t)=>t.height-e.height);this.defaultSlot.textContent="";let t=!this.mediaRenditionSelected;for(const i of e){const e=nl({type:"radio",text:this.formatMenuItemText(`${Math.min(i.width,i.height)}p`,i),value:`${i.id}`,checked:i.selected&&!t});e.prepend(il(this,"checked-indicator")),this.defaultSlot.append(e)}const n=nl({type:"radio",text:this.formatMenuItemText("Auto"),value:"auto",checked:t});n.prepend(il(this,"checked-indicator")),this.defaultSlot.append(n)},mh=new WeakSet,ph=function(){if(null==this.value)return;const e=new na.CustomEvent(yi.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},na.customElements.get("media-rendition-menu")||na.customElements.define("media-rendition-menu",yh);const _h=ia.createElement("template");_h.innerHTML='\n <slot name="icon"><svg aria-hidden="true" viewBox="0 0 24 24">\n <path d="M13.5 2.5h2v6h-2v-2h-11v-2h11v-2Zm4 2h4v2h-4v-2Zm-12 4h2v6h-2v-2h-3v-2h3v-2Zm4 2h12v2h-12v-2Zm1 4h2v6h-2v-2h-8v-2h8v-2Zm4 2h7v2h-7v-2Z" />\n</svg></slot>\n';class Ah extends Tl{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_RENDITION_SELECTED,wi.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:_h})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",Pi.QUALITY())}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:da(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return wa(this,wi.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){Ta(this,wi.MEDIA_RENDITION_SELECTED,e)}}na.customElements.get("media-rendition-menu-button")||na.customElements.define("media-rendition-menu-button",Ah);const kh="seekoffset",wh=ia.createElement("template");wh.innerHTML='\n <slot name="icon"><svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(2.18 19.87)">30</text><path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/></svg></slot>\n';class Th extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_CURRENT_TIME,kh]}constructor(e={}){super({slotTemplate:wh,...e})}connectedCallback(){this.seekOffset=ya(this,kh,30),super.connectedCallback()}attributeChangedCallback(e,t,n){e===kh&&(this.seekOffset=ya(this,kh,30)),super.attributeChangedCallback(e,t,n)}get seekOffset(){return ya(this,kh,30)}set seekOffset(e){_a(this,kh,e),this.setAttribute("aria-label",Ui.SEEK_BACK_N_SECS({seekOffset:this.seekOffset})),ca(ha(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ya(this,wi.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){_a(this,wi.MEDIA_CURRENT_TIME,e)}handleClick(){const e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new na.CustomEvent(yi.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}na.customElements.get("media-seek-backward-button")||na.customElements.define("media-seek-backward-button",Th);const Ih="seekoffset",Sh=ia.createElement("template");Sh.innerHTML='\n <slot name="icon"><svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(8.9 19.87)">30</text><path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/></svg></slot>\n';class Ch extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_CURRENT_TIME,Ih]}constructor(e={}){super({slotTemplate:Sh,...e})}
2connectedCallback(){this.seekOffset=ya(this,Ih,30),super.connectedCallback()}attributeChangedCallback(e,t,n){e===Ih&&(this.seekOffset=ya(this,Ih,30)),super.attributeChangedCallback(e,t,n)}get seekOffset(){return ya(this,Ih,30)}set seekOffset(e){_a(this,Ih,e),this.setAttribute("aria-label",Ui.SEEK_FORWARD_N_SECS({seekOffset:this.seekOffset})),ca(ha(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ya(this,wi.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){_a(this,wi.MEDIA_CURRENT_TIME,e)}handleClick(){const e=this.mediaCurrentTime+this.seekOffset,t=new na.CustomEvent(yi.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}na.customElements.get("media-seek-forward-button")||na.customElements.define("media-seek-forward-button",Ch);var Rh=Object.defineProperty;const Lh=ia.createElement("template");Lh.innerHTML=dl.template.innerHTML+'\n <style>\n :host {\n background: var(--media-settings-menu-background,\n var(--media-menu-background,\n var(--media-control-background,\n var(--media-secondary-color, rgb(20 20 30 / .8)))));\n min-width: var(--media-settings-menu-min-width, 160px);\n border-radius: 2px 2px 0 0;\n overflow: hidden;\n }\n\n :host([role="menu"]) {\n \n justify-content: end;\n }\n\n slot:not([name]) {\n justify-content: var(--media-settings-menu-justify-content);\n flex-direction: var(--media-settings-menu-flex-direction, column);\n overflow: visible;\n }\n\n #container.has-expanded {\n --media-settings-menu-item-opacity: 0;\n }\n </style>\n';class xh extends dl{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:da(this).querySelector("media-settings-menu-button")}}((e,t,n)=>{((e,t,n)=>{t in e?Rh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n)})(xh,"template",Lh),na.customElements.get("media-settings-menu")||na.customElements.define("media-settings-menu",xh);const Dh=ia.createElement("template");Dh.innerHTML='\n <slot name="icon">\n <svg aria-hidden="true" viewBox="0 0 24 24">\n <path d="M4.5 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/>\n </svg>\n </slot>\n';class Mh extends Tl{static get observedAttributes(){return[...super.observedAttributes,"target"]}constructor(){super({slotTemplate:Dh})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",Pi.SETTINGS())}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:da(this).querySelector("media-settings-menu")}}na.customElements.get("media-settings-menu-button")||na.customElements.define("media-settings-menu-button",Mh);var Nh,Oh=Object.defineProperty;const Ph=ia.createElement("template");Ph.innerHTML=Yd.template.innerHTML+'\n <style>\n slot:not([name="submenu"]) {\n opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity));\n }\n\n :host([aria-expanded="true"]:hover) {\n background: transparent;\n }\n </style>\n',(null==(Nh=Ph.content)?void 0:Nh.querySelector)&&(Ph.content.querySelector('slot[name="suffix"]').innerHTML='\n <svg aria-hidden="true" viewBox="0 0 20 24">\n <path d="m8.12 17.585-.742-.669 4.2-4.665-4.2-4.666.743-.669 4.803 5.335-4.803 5.334Z"/>\n </svg>\n ');class Uh extends Yd{}((e,t,n)=>{((e,t,n)=>{t in e?Oh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n)})(Uh,"template",Ph),na.customElements.get("media-settings-menu-item")||na.customElements.define("media-settings-menu-item",Uh);var Wh,Bh=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Hh=(e,t,n)=>(Bh(e,t,"read from private field"),n?n.call(e):t.get(e));const qh={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Vh=[...Object.values(qh),wi.MEDIA_CURRENT_TIME,wi.MEDIA_DURATION,wi.MEDIA_SEEKABLE],$h=["Enter"," "],Fh=(e,{timesSep:t=" / "}={})=>{var n,i;const a=e.hasAttribute(qh.REMAINING),r=e.hasAttribute(qh.SHOW_DURATION),s=null!=(n=e.mediaCurrentTime)?n:0,[,o]=null!=(i=e.mediaSeekable)?i:[];let l=0;Number.isFinite(e.mediaDuration)?l=e.mediaDuration:Number.isFinite(o)&&
2(l=o);const d=Zi(a?0-(l-s):s);return r?`${d}${t}${Zi(l)}`:d};class Kh extends Hu{constructor(){super(),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,Wh,void 0),((e,t,n,i)=>{Bh(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,Wh,this.shadowRoot.querySelector("slot")),Hh(this,Wh).innerHTML=`${Fh(this)}`}static get observedAttributes(){return[...super.observedAttributes,...Vh,"disabled"]}connectedCallback(){const{style:e}=ga(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","pointer"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",Pi.PLAYBACK_TIME());const t=e=>{const{key:n}=e;$h.includes(n)?this.toggleTimeDisplay():this.removeEventListener("keyup",t)};this.addEventListener("keydown",e=>{const{metaKey:n,altKey:i,key:a}=e;n||i||!$h.includes(a)?this.removeEventListener("keyup",t):this.addEventListener("keyup",t)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,t,n){Vh.includes(e)?this.update():"disabled"===e&&n!==t&&(null==n?this.enable():this.disable()),super.attributeChangedCallback(e,t,n)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return Aa(this,qh.REMAINING)}set remaining(e){ka(this,qh.REMAINING,e)}get showDuration(){return Aa(this,qh.SHOW_DURATION)}set showDuration(e){ka(this,qh.SHOW_DURATION,e)}get noToggle(){return Aa(this,qh.NO_TOGGLE)}set noToggle(e){ka(this,qh.NO_TOGGLE,e)}get mediaDuration(){return ya(this,wi.MEDIA_DURATION)}set mediaDuration(e){_a(this,wi.MEDIA_DURATION,e)}get mediaCurrentTime(){return ya(this,wi.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){_a(this,wi.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){const e=this.getAttribute(wi.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null!=e?this.setAttribute(wi.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(wi.MEDIA_SEEKABLE)}update(){const e=Fh(this);(e=>{var t;const n=e.mediaCurrentTime,[,i]=null!=(t=e.mediaSeekable)?t:[];let a=null;if(Number.isFinite(e.mediaDuration)?a=e.mediaDuration:Number.isFinite(i)&&(a=i),null==n||null===a)return void e.setAttribute("aria-valuetext","video not loaded, unknown time.");const r=e.hasAttribute(qh.REMAINING),s=e.hasAttribute(qh.SHOW_DURATION),o=Yi(r?0-(a-n):n);if(!s)return void e.setAttribute("aria-valuetext",o);const l=`${o} of ${Yi(a)}`;e.setAttribute("aria-valuetext",l)})(this),e!==Hh(this,Wh).innerHTML&&(Hh(this,Wh).innerHTML=e)}}Wh=new WeakMap,na.customElements.get("media-time-display")||na.customElements.define("media-time-display",Kh);var jh,Gh,Yh,Zh,Qh,zh,Xh,Jh,em,tm,nm=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},im=(e,t,n)=>(nm(e,t,"read from private field"),n?n.call(e):t.get(e)),am=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},rm=(e,t,n,i)=>(nm(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class sm{constructor(e,t,n){am(this,jh,void 0),am(this,Gh,void 0),am(this,Yh,void 0),am(this,Zh,void 0),am(this,Qh,void 0),am(this,zh,void 0),am(this,Xh,void 0),am(this,Jh,void 0),am(this,em,0),am(this,tm,(e=performance.now())=>{rm(this,em,requestAnimationFrame(im(this,tm))),rm(this,Zh,performance.now()-im(this,Yh));const t=1e3/this.fps;if(im(this,Zh)>t){rm(this,Yh,e-im(this,Zh)%t);const n=1e3/((e-im(this,Gh))/++((e,t,n,i)=>({set _(i){rm(e,t,i,n)},get _(){return im(e,t,i)}}))(this,Qh)._),i=(e-im(this,zh))/1e3/this.duration;let a=im(this,Xh)+i*this.playbackRate;a-im(this,jh).valueAsNumber>0?rm(this,Jh,this.playbackRate/this.duration/n):(rm(this,Jh,.995*im(this,Jh)),a=im(this,jh).valueAsNumber+im(this,Jh)),this.callback(a)}}),rm(this,jh,e),this.callback=t,this.fps=n}start(){0===im(this,em)&&(rm(this,Yh,performance.now()),rm(this,Gh,im(this,Yh)),rm(this,Qh,0),im(this,tm).call(this))}stop(){0!==im(this,em)&&(cancelAnimationFrame(im(this,em)),rm(this,em,0))}update({start:e,duration:t,playbackRate:n}){const i=e-im(this,jh).valueAsNumber,a=Math.abs(t-this.duration);(i>0||i<-.03||a>=.5)&&this.callback(e),rm(this,Xh,e),rm(this,zh,performance.now()),this.duration=t,this.playbackRate=n}}jh=new WeakMap,Gh=new WeakMap,Yh=new WeakMap,Zh=new WeakMap,Qh=new WeakMap,zh=new WeakMap,Xh=new WeakMap,Jh=new WeakMap,em=new WeakMap,tm=new WeakMap;var om,lm,dm,um,cm,hm,mm,pm,vm,bm,fm,gm,Em,ym,_m,Am,km,wm,Tm,Im,Sm,Cm,Rm,Lm,xm,Dm,Mm=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Nm=(e,t,n)=>(Mm(e,t,"read from private field"),n?n.call(e):t.get(e)),Om=(e,t,n
2)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Pm=(e,t,n,i)=>(Mm(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Um=(e,t,n)=>(Mm(e,t,"access private method"),n);const Wm=ia.createElement("template");Wm.innerHTML=`\n <style>\n :host {\n --media-box-border-radius: 4px;\n --media-box-padding-left: 10px;\n --media-box-padding-right: 10px;\n --media-preview-border-radius: var(--media-box-border-radius);\n --media-box-arrow-offset: var(--media-box-border-radius);\n --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n --_preview-background: var(--media-preview-background, var(--_control-background));\n\n \n contain: layout;\n }\n\n #highlight {\n background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));\n }\n\n #preview-rail,\n #current-rail {\n width: 100%;\n position: absolute;\n left: 0;\n bottom: 100%;\n pointer-events: none;\n will-change: transform;\n }\n\n [part~="box"] {\n width: min-content;\n \n position: absolute;\n bottom: 100%;\n flex-direction: column;\n align-items: center;\n transform: translateX(-50%);\n }\n\n [part~="current-box"] {\n display: var(--media-current-box-display, var(--media-box-display, flex));\n margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));\n visibility: hidden;\n }\n\n [part~="preview-box"] {\n display: var(--media-preview-box-display, var(--media-box-display, flex));\n margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));\n transition-property: var(--media-preview-transition-property, visibility, opacity);\n transition-duration: var(--media-preview-transition-duration-out, .25s);\n transition-delay: var(--media-preview-transition-delay-out, 0s);\n visibility: hidden;\n opacity: 0;\n }\n\n :host(:is([${wi.MEDIA_PREVIEW_IMAGE}], [${wi.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {\n transition-duration: var(--media-preview-transition-duration-in, .5s);\n transition-delay: var(--media-preview-transition-delay-in, .25s);\n visibility: visible;\n opacity: 1;\n }\n\n @media (hover: hover) {\n :host(:is([${wi.MEDIA_PREVIEW_IMAGE}], [${wi.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {\n transition-duration: var(--media-preview-transition-duration-in, .5s);\n transition-delay: var(--media-preview-transition-delay-in, .25s);\n visibility: visible;\n opacity: 1;\n }\n }\n\n media-preview-thumbnail,\n ::slotted(media-preview-thumbnail) {\n visibility: hidden;\n \n transition: visibility 0s .25s;\n transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n background: var(--media-preview-thumbnail-background, var(--_preview-background));\n box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));\n max-width: var(--media-preview-thumbnail-max-width, 180px);\n max-height: var(--media-preview-thumbnail-max-height, 160px);\n min-width: var(--media-preview-thumbnail-min-width, 120px);\n min-height: var(--media-preview-thumbnail-min-height, 80px);\n border: var(--media-preview-thumbnail-border);\n border-radius: var(--media-preview-thumbnail-border-radius,\n var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);\n }\n\n :host([${wi.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,\n :host([${wi.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {\n transition-delay: var(--media-preview-transition-delay-in, .25s);\n visibility: visible;\n }\n\n @media (hover: hover) {\n :host([${wi.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,\n :host([${wi.MEDIA_PREVIEW_IMAGE}
2]:hover) ::slotted(media-preview-thumbnail) {\n transition-delay: var(--media-preview-transition-delay-in, .25s);\n visibility: visible;\n }\n\n :host([${wi.MEDIA_PREVIEW_TIME}]:hover) {\n --media-time-range-hover-display: block;\n }\n }\n\n media-preview-chapter-display,\n ::slotted(media-preview-chapter-display) {\n font-size: var(--media-font-size, 13px);\n line-height: 17px;\n min-width: 0;\n visibility: hidden;\n \n transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;\n transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n background: var(--media-preview-chapter-background, var(--_preview-background));\n border-radius: var(--media-preview-chapter-border-radius,\n var(--media-preview-border-radius) var(--media-preview-border-radius)\n var(--media-preview-border-radius) var(--media-preview-border-radius));\n padding: var(--media-preview-chapter-padding, 3.5px 9px);\n margin: var(--media-preview-chapter-margin, 0 0 5px);\n text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));\n }\n\n :host([${wi.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,\n :host([${wi.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {\n transition-delay: var(--media-preview-transition-delay-in, .25s);\n border-radius: var(--media-preview-chapter-border-radius, 0);\n padding: var(--media-preview-chapter-padding, 3.5px 9px 0);\n margin: var(--media-preview-chapter-margin, 0);\n min-width: 100%;\n }\n\n media-preview-chapter-display[${wi.MEDIA_PREVIEW_CHAPTER}],\n ::slotted(media-preview-chapter-display[${wi.MEDIA_PREVIEW_CHAPTER}]) {\n visibility: visible;\n }\n\n media-preview-chapter-display:not([aria-valuetext]),\n ::slotted(media-preview-chapter-display:not([aria-valuetext])) {\n display: none;\n }\n\n media-preview-time-display,\n ::slotted(media-preview-time-display),\n media-time-display,\n ::slotted(media-time-display) {\n font-size: var(--media-font-size, 13px);\n line-height: 17px;\n min-width: 0;\n \n transition: min-width 0s, border-radius 0s;\n transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n background: var(--media-preview-time-background, var(--_preview-background));\n border-radius: var(--media-preview-time-border-radius,\n var(--media-preview-border-radius) var(--media-preview-border-radius)\n var(--media-preview-border-radius) var(--media-preview-border-radius));\n padding: var(--media-preview-time-padding, 3.5px 9px);\n margin: var(--media-preview-time-margin, 0);\n text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));\n transform: translateX(min(\n max(calc(50% - var(--_box-width) / 2),\n calc(var(--_box-shift, 0))),\n calc(var(--_box-width) / 2 - 50%)\n ));\n }\n\n :host([${wi.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,\n :host([${wi.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {\n transition-delay: var(--media-preview-transition-delay-in, .25s);\n border-radius: var(--media-preview-time-border-radius,\n 0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));\n min-width: 100%;\n }\n\n :host([${wi.MEDIA_PREVIEW_TIME}]:hover) {\n --media-time-range-hover-display: block;\n }\n\n [part~="arrow"],\n ::slotted([part~="arrow"]) {\n display: var(--media-box-arrow-display, inline-block);\n transform: translateX(min(\n max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),\n calc(var(--_box-shift, 0))),\n calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))\n ));\n \n border-color: transparent;\n border-top-color: var(--media-box-arrow-background, var(--_control-background));\n border-width: var(--media-box-arrow-border-width,\n var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);\n border-style: solid;\n justify-content: center;\n height: 0;\n }\n </style>\n <div id="preview-rail">\n <slot name="preview" part="box preview-box">
2\n <media-preview-thumbnail></media-preview-thumbnail>\n <media-preview-chapter-display></media-preview-chapter-display>\n <media-preview-time-display></media-preview-time-display>\n <slot name="preview-arrow"><div part="arrow"></div></slot>\n </slot>\n </div>\n <div id="current-rail">\n <slot name="current" part="box current-box">\n \n </slot>\n </div>\n`;const Bm=(e,t=e.mediaCurrentTime)=>{const n=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,i=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;if(Number.isNaN(i))return 0;const a=(t-n)/(i-n);return Math.max(0,Math.min(a,1))},Hm=(e,t=e.range.valueAsNumber)=>{const n=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,i=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(i)?0:t*(i-n)+n};class qm extends Cu{constructor(){super(),Om(this,bm),Om(this,gm),Om(this,_m),Om(this,km),Om(this,Tm),Om(this,Sm),Om(this,Rm),Om(this,xm),Om(this,om,void 0),Om(this,lm,void 0),Om(this,dm,void 0),Om(this,um,void 0),Om(this,cm,void 0),Om(this,hm,void 0),Om(this,mm,void 0),Om(this,pm,void 0),Om(this,vm,void 0),Om(this,ym,e=>{this.dragging||(this.range.valueAsNumber=e,this.updateBar())}),this.container.appendChild(Wm.content.cloneNode(!0)),Pm(this,dm,this.shadowRoot.querySelectorAll('[part~="box"]')),Pm(this,cm,this.shadowRoot.querySelector('[part~="preview-box"]')),Pm(this,hm,this.shadowRoot.querySelector('[part~="current-box"]'));const e=getComputedStyle(this);Pm(this,mm,parseInt(e.getPropertyValue("--media-box-padding-left"))),Pm(this,pm,parseInt(e.getPropertyValue("--media-box-padding-right"))),Pm(this,lm,new sm(this.range,Nm(this,ym),60))}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_PAUSED,wi.MEDIA_DURATION,wi.MEDIA_SEEKABLE,wi.MEDIA_CURRENT_TIME,wi.MEDIA_PREVIEW_IMAGE,wi.MEDIA_PREVIEW_TIME,wi.MEDIA_PREVIEW_CHAPTER,wi.MEDIA_BUFFERED,wi.MEDIA_PLAYBACK_RATE,wi.MEDIA_LOADING,wi.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",Pi.SEEK()),Um(this,bm,fm).call(this),Pm(this,om,this.getRootNode()),null==(e=Nm(this,om))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),Um(this,bm,fm).call(this),null==(e=Nm(this,om))||e.removeEventListener("transitionstart",this),Pm(this,om,null)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),t!=n&&(e===wi.MEDIA_CURRENT_TIME||e===wi.MEDIA_PAUSED||e===wi.MEDIA_ENDED||e===wi.MEDIA_LOADING||e===wi.MEDIA_DURATION||e===wi.MEDIA_SEEKABLE?(Nm(this,lm).update({start:Bm(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),Um(this,bm,fm).call(this),(e=>{const t=e.range,n=Yi(+Hm(e)),i=Yi(+e.mediaSeekableEnd),a=n&&i?`${n} of ${i}`:"video not loaded, unknown time.";t.setAttribute("aria-valuetext",a)})(this)):e===wi.MEDIA_BUFFERED&&this.updateBufferedBar(),e!==wi.MEDIA_DURATION&&e!==wi.MEDIA_SEEKABLE||(this.mediaChaptersCues=Nm(this,vm),this.updateBar()))}get mediaChaptersCues(){return Nm(this,vm)}set mediaChaptersCues(e){var t;Pm(this,vm,e),this.updateSegments(null==(t=Nm(this,vm))?void 0:t.map(e=>({start:Bm(this,e.startTime),end:Bm(this,e.endTime)})))}get mediaPaused(){return Aa(this,wi.MEDIA_PAUSED)}set mediaPaused(e){ka(this,wi.MEDIA_PAUSED,e)}get mediaLoading(){return Aa(this,wi.MEDIA_LOADING)}set mediaLoading(e){ka(this,wi.MEDIA_LOADING,e)}get mediaDuration(){return ya(this,wi.MEDIA_DURATION)}set mediaDuration(e){_a(this,wi.MEDIA_DURATION,e)}get mediaCurrentTime(){return ya(this,wi.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){_a(this,wi.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return ya(this,wi.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){_a(this,wi.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){const e=this.getAttribute(wi.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(wi.MEDIA_BUFFERED);const t=e.map(e=>e.join(":")).join(" ");this.setAttribute(wi.MEDIA_BUFFERED,t)}get mediaSeekable(){const e=this.getAttribute(wi.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null!=e?this.setAttribute(wi.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(wi.MEDIA_SEEKABLE)}get mediaSeekableEnd(){var e;const[,t=this.mediaDuration]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaSeekableStart(){var e;const[t=0]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaPreviewImage(){return wa(this,wi.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){Ta(this,wi.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return ya(this,wi.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){_a(this,wi.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return Aa(this,wi.MEDIA_ENDED)}set mediaEnded(e){ka(this,wi.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;const t=this.mediaBuffered;if(!t.length)return;let n;if(this.mediaEnded)n=1;else{const i=this.mediaCurrentTime,[,a=this.mediaSeekableStart]=null!=(e=t.find(([e,t])=>e<=i&&i<=t))?e:[];n=Bm(this,a)}const{style:i}=ga(this.shadowRoot,"#highlight");i.setProperty("width",100*n+"%")}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;const e=ga(this.shadowRoot,"#current-rail"),t=ga(this.shadowRoot,'[part~="current-box"]'),n=Um(this,_m,Am).call(this,Nm(this,hm)),i=Um(this,km,wm).
2call(this,n,this.range.valueAsNumber),a=Um(this,Tm,Im).call(this,n,this.range.valueAsNumber);e.style.transform=`translateX(${i})`,e.style.setProperty("--_range-width",`${n.range.width}`),t.style.setProperty("--_box-shift",`${a}`),t.style.setProperty("--_box-width",`${n.box.width}px`),t.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":Um(this,xm,Dm).call(this);break;case"pointermove":Um(this,Sm,Cm).call(this,e);break;case"pointerup":case"pointerleave":Um(this,Rm,Lm).call(this,null);break;case"transitionstart":ma(e.target,this)&&setTimeout(()=>Um(this,bm,fm).call(this),0)}}}om=new WeakMap,lm=new WeakMap,dm=new WeakMap,um=new WeakMap,cm=new WeakMap,hm=new WeakMap,mm=new WeakMap,pm=new WeakMap,vm=new WeakMap,bm=new WeakSet,fm=function(){Um(this,gm,Em).call(this)?Nm(this,lm).start():Nm(this,lm).stop()},gm=new WeakSet,Em=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&function(e,t=3){if(e.checkVisibility)return e.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0});let n=e;for(;n&&t>0;){const e=getComputedStyle(n);if("0"===e.opacity||"hidden"===e.visibility||"none"===e.display)return!1;n=n.parentElement,t--}return!0}(this)},ym=new WeakMap,_m=new WeakSet,Am=function(e){var t;const n=(null!=(t=this.getAttribute("bounds")?pa(this,`#${this.getAttribute("bounds")}`):this.parentElement)?t:this).getBoundingClientRect(),i=this.range.getBoundingClientRect(),a=e.offsetWidth;return{box:{width:a,min:-(i.left-n.left-a/2),max:n.right-i.left-a/2},bounds:n,range:i}},km=new WeakSet,wm=function(e,t){let n=100*t+"%";const{width:i,min:a,max:r}=e.box;if(!i)return n;if(!Number.isNaN(a)){n=`max(${`calc(1 / var(--_range-width) * 100 * ${a}% + ${"var(--media-box-padding-left)"})`}, ${n})`}if(!Number.isNaN(r)){n=`min(${n}, ${`calc(1 / var(--_range-width) * 100 * ${r}% - ${"var(--media-box-padding-right)"})`})`}return n},Tm=new WeakSet,Im=function(e,t){const{width:n,min:i,max:a}=e.box,r=t*e.range.width;if(r<i+Nm(this,mm)){return`${r-n/2+(e.range.left-e.bounds.left-Nm(this,mm))}px`}if(r>a-Nm(this,pm)){return r+n/2-(e.bounds.right-e.range.right-Nm(this,pm))-e.range.width+"px"}return 0},Sm=new WeakSet,Cm=function(e){const t=[...Nm(this,dm)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void Um(this,Rm,Lm).call(this,null);const n=this.mediaSeekableEnd;if(!n)return;const i=ga(this.shadowRoot,"#preview-rail"),a=ga(this.shadowRoot,'[part~="preview-box"]'),r=Um(this,_m,Am).call(this,Nm(this,cm));let s=(e.clientX-r.range.left)/r.range.width;s=Math.max(0,Math.min(1,s));const o=Um(this,km,wm).call(this,r,s),l=Um(this,Tm,Im).call(this,r,s);i.style.transform=`translateX(${o})`,i.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${l}`),a.style.setProperty("--_box-width",`${r.box.width}px`);const d=Math.round(Nm(this,um))-Math.round(s*n);Math.abs(d)<1&&s>.01&&s<.99||(Pm(this,um,s*n),Um(this,Rm,Lm).call(this,Nm(this,um)))},Rm=new WeakSet,Lm=function(e){this.dispatchEvent(new na.CustomEvent(yi.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))},xm=new WeakSet,Dm=function(){Nm(this,lm).stop();const e=Hm(this);this.dispatchEvent(new na.CustomEvent(yi.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},na.customElements.get("media-time-range")||na.customElements.define("media-time-range",qm);class Vm extends Cu{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_VOLUME,wi.MEDIA_MUTED,wi.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{const e=this.range.value,t=new na.CustomEvent(yi.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",Pi.VOLUME())}attributeChangedCallback(e,t,n){var i;super.attributeChangedCallback(e,t,n),e!==wi.MEDIA_VOLUME&&e!==wi.MEDIA_MUTED||(this.range.valueAsNumber=(i=this).mediaMuted?0:i.mediaVolume,this.range.setAttribute("aria-valuetext",(({value:e})=>`${Math.round(100*e)}%`)(this.range)),this.updateBar())}
2get mediaVolume(){return ya(this,wi.MEDIA_VOLUME,1)}set mediaVolume(e){_a(this,wi.MEDIA_VOLUME,e)}get mediaMuted(){return Aa(this,wi.MEDIA_MUTED)}set mediaMuted(e){ka(this,wi.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return wa(this,wi.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){Ta(this,wi.MEDIA_VOLUME_UNAVAILABLE,e)}}na.customElements.get("media-volume-range")||na.customElements.define("media-volume-range",Vm);var $m,Fm,Km,jm,Gm,Ym,Zm,Qm,zm,Xm,Jm,ep,tp,np,ip,ap,rp,sp,op,lp=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},dp=(e,t,n)=>(lp(e,t,"read from private field"),n?n.call(e):t.get(e)),up=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},cp=(e,t,n,i)=>(lp(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),hp=(e,t,n)=>(lp(e,t,"access private method"),n);function mp(e,t,n){const i=ia.createElement("media-chrome-option");i.part.add("option"),i.value=t,i.selected=n;const a=ia.createElement("span");return a.textContent=e,i.append(a),i}function pp(e,t){let n=e.querySelector(`:scope > [slot="${t}"]`);return"SLOT"==(null==n?void 0:n.nodeName)&&(n=n.assignedElements({flatten:!0})[0]),n?(n=n.cloneNode(!0),n.removeAttribute("slot"),n):e.shadowRoot.querySelector(`[name="${t}"] > svg`).cloneNode(!0)}const vp=ia.createElement("template");vp.innerHTML='\n<style>\n :host {\n font: var(--media-font,\n var(--media-font-weight, normal)\n var(--media-font-size, 15px) /\n var(--media-text-content-height, var(--media-control-height, 24px))\n var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n background: var(--media-listbox-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8))));\n border-radius: var(--media-listbox-border-radius);\n display: inline-flex;\n flex-direction: column;\n position: relative;\n box-sizing: border-box;\n }\n\n ::slotted([slot="header"]) {\n padding: .4em 1.4em;\n border-bottom: 1px solid rgb(255 255 255 / .25);\n }\n\n #container {\n gap: var(--media-listbox-gap);\n display: flex;\n flex-direction: var(--media-listbox-flex-direction, column);\n overflow: hidden auto;\n padding-block: .5em;\n }\n\n media-chrome-option {\n padding-inline: .7em 1.4em;\n }\n\n media-chrome-option > span {\n margin-inline: .5ch;\n }\n\n [part~="indicator"] {\n fill: var(--media-option-indicator-fill, var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));\n height: var(--media-option-indicator-height, 1.25em);\n vertical-align: var(--media-option-indicator-vertical-align, text-top);\n }\n\n [part~="select-indicator"] {\n display: var(--media-option-select-indicator-display);\n visibility: hidden;\n }\n\n [aria-selected="true"] > [part~="select-indicator"] {\n visibility: visible;\n }\n</style>\n<style id="layout-row" media="width:0">\n\n ::slotted([slot="header"]) {\n padding: .4em .5em;\n }\n\n #container {\n gap: var(--media-listbox-gap, .25em);\n flex-direction: var(--media-listbox-flex-direction, row);\n padding-inline: .5em;\n }\n\n media-chrome-option {\n padding: .3em .24em;\n }\n\n media-chrome-option[aria-selected="true"] {\n background: var(--media-option-selected-background, rgb(255 255 255 / .2));\n }\n\n [part~="select-indicator"] {\n display: var(--media-option-select-indicator-display, none);\n }\n</style>\n<slot name="header"></slot>\n<slot id="container"></slot>\n<slot name="select-indicator" hidden>\n<svg aria-hidden="true" viewBox="0 1 24 24" part="select-indicator indicator">\n <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>\n</svg></slot>\n';class bp extends na.HTMLElement{constructor(e={}){super(),up(this,Ym),up(this,Xm),up(this,ep),up(this,np),up(this,ap),up(this,sp),up(this,$m,void 0),up(this,Fm,""),up(this,Km,null),up(this,jm,!1),up(this,Gm,e=>{this.handleClick(e)}),up(this,Qm,e=>{const{key:t}=e;"Escape"!==t?"Meta"!==t?hp(this,Ym,Zm).call(this,e):cp(this,jm,!1):this.removeEventListener("keyup",dp(this,Qm))}),up(this,zm,e=>{const{key:t,altKey:n}=e;n?this.removeEventListener("keyup",dp(this,Qm)):"Meta"!==t?(this.keysUsed.includes(t)&&e.preventDefault(),dp(this,jm)&&this.keysUsed.includes(t)?hp(this,Ym,Zm).call(this,e):this.addEventListener("keyup",dp(this,Qm),{once:!0})):cp(this,jm,!0)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=vp.content.cloneNode(!0),e.slotTemplate&&this.nativeEl.append(e.slotTemplate.content.cloneNode(!0)),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.container.addEventListener("slotchange",e=>{for(let t of e.target.assignedNodes({flatten:!0}))3===t.nodeType&&""===t.textContent.trim()&&t.remove()})}static get observedAttributes(){return["disabled","style",_i.MEDIA_CONTROLLER]}static formatOptionText(e){return e}formatOptionText(e,t){return this.constructor.formatOptionText(e,t)}get options(){var e;let t=this.querySelectorAll("media-chrome-option");return t.length||(t=null==(e=this.container)?void 0:e.querySelectorAll("media-chrome-option")),Array.from(t)}get selectedOptions(){return this.options.filter(e=>e.selected)}get value(){var e,t;return null!=(t=null==(e=this.selectedOptions[0])?void 0:e.value)?t:""}set value(e){const t=this.options.find(t=>t.value===e);t&&hp(this,np,ip).call(this,t)}focus(){var e;null==(e=this.selectedOptions[0])||e.focus()}enable(){this.addEventListener("click",dp(this,Gm)),this.addEventListener("keydown",dp(this,zm))}disable(){this.removeEventListener("click",dp(this,Gm)),this.removeEventListener("keyup",dp(this,Qm))}attributeChangedCallback(e,t,n){var i,a,r,s,o;"style"===e&&n!==t?hp(this,Xm,Jm).call(this):e===_i.MEDIA_CONTROLLER?(t&&(null==(a=null==(i=dp(this,$m))?void 0:i.unassociateElement)||a.call(i,this),cp(this,$m,null)),n&&this.isConnected&&(cp(this,$m,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(o=null==(s=dp(this,$m))?void 0:s.associateElement)||o.call(s,this))):"disabled"===e&&n!==t&&(null==n?this.enable():this.disable())}connectedCallback(){var e,t,n;hp(this,Xm,Jm).call(this),this.hasAttribute("disabled")||this.enable(),this.hasAttribute("role")||this.setAttribute("role","listbox");const i=this.getAttribute(_i.MEDIA_CONTROLLER);i&&(cp(this,$m,null==(e=this.getRootNode())?void 0:e.getElementById(i)),null==(n=null==(t=dp(this,$m))?void 0:t.associateElement)||n.call(t,this))}disconnectedCallback(){var e,t;
2this.disable(),null==(t=null==(e=dp(this,$m))?void 0:e.unassociateElement)||t.call(e,this),cp(this,$m,null)}get keysUsed(){return["Enter"," ","ArrowDown","ArrowUp","Home","End"]}handleSelection(e,t){const n=hp(this,ep,tp).call(this,e);n&&hp(this,np,ip).call(this,n,t)}handleMovement(e){const{key:t}=e,n=this.options;let i,a=hp(this,ep,tp).call(this,e);switch(a||(a=n.filter(e=>"0"===e.getAttribute("tabindex"))[0]),t){case"ArrowDown":i=a.nextElementSibling,(null==i?void 0:i.hasAttribute("disabled"))&&(i=i.nextElementSibling);break;case"ArrowUp":i=a.previousElementSibling,(null==i?void 0:i.hasAttribute("disabled"))&&(i=i.previousElementSibling);break;case"Home":i=n[0];break;case"End":i=n[n.length-1];break;default:i=hp(this,ap,rp).call(this,t)}i&&(n.forEach(e=>e.setAttribute("tabindex","-1")),i.setAttribute("tabindex","0"),i.focus())}handleClick(e){const t=hp(this,ep,tp).call(this,e);t&&!t.hasAttribute("disabled")&&(this.options.forEach(e=>e.setAttribute("tabindex","-1")),t.setAttribute("tabindex","0"),this.handleSelection(e,this.hasAttribute("aria-multiselectable")&&"true"===this.getAttribute("aria-multiselectable")))}}$m=new WeakMap,Fm=new WeakMap,Km=new WeakMap,jm=new WeakMap,Gm=new WeakMap,Ym=new WeakSet,Zm=function(e){const{key:t}=e;"Enter"===t||" "===t?this.handleSelection(e,this.hasAttribute("aria-multiselectable")&&"true"===this.getAttribute("aria-multiselectable")):this.handleMovement(e)},Qm=new WeakMap,zm=new WeakMap,Xm=new WeakSet,Jm=function(){var e;const t=this.shadowRoot.querySelector("#layout-row"),n="row"===(null==(e=getComputedStyle(this).getPropertyValue("--media-listbox-layout"))?void 0:e.trim());t.setAttribute("media",n?"":"width:0")},ep=new WeakSet,tp=function(e){const t=e.composedPath(),n=t.findIndex(e=>"MEDIA-CHROME-OPTION"===e.nodeName);return t[n]},np=new WeakSet,ip=function(e,t){const n=[...this.selectedOptions];this.hasAttribute("aria-multiselectable")&&"true"===this.getAttribute("aria-multiselectable")||this.options.forEach(e=>e.selected=!1),e.selected=!t||!e.selected,this.selectedOptions.some((e,t)=>e!=n[t])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},ap=new WeakSet,rp=function(e){hp(this,sp,op).call(this);const t=this.options,n=t.findIndex(e=>"0"===e.getAttribute("tabindex"));cp(this,Fm,dp(this,Fm)+e);const i=dp(this,Fm).split("").every(t=>t===e),a=t.slice(n+(i?1:0)).filter(e=>e.textContent.toLowerCase().startsWith(dp(this,Fm))),r=t.slice(0,n-(i?1:0)).filter(e=>e.textContent.toLowerCase().startsWith(dp(this,Fm)));let s=[],o=[];i&&(s=t.slice(n+(i?1:0)).filter(t=>t.textContent.startsWith(e)),o=t.slice(0,n-(i?1:0)).filter(t=>t.textContent.startsWith(e)));return[...a,...r,...s,...o][0]},sp=new WeakSet,op=function(){clearTimeout(dp(this,Km)),cp(this,Km,null),cp(this,Km,setTimeout(()=>{cp(this,Fm,""),cp(this,Km,null)},500))},na.customElements.get("media-chrome-listbox")||na.customElements.define("media-chrome-listbox",bp);var fp,gp,Ep,yp,_p=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ap=(e,t,n)=>(_p(e,t,"read from private field"),n?n.call(e):t.get(e)),kp=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},wp=(e,t,n,i)=>(_p(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Tp=(e,t,n)=>(_p(e,t,"access private method"),n);const Ip=ia.createElement("template");Ip.innerHTML='\n<style>\n :host {\n cursor: pointer;\n display: block;\n line-height: revert;\n white-space: nowrap;\n white-space-collapse: collapse;\n text-wrap: nowrap;\n padding: .4em .5em;\n transition: var(--media-option-transition);\n outline: var(--media-option-outline, 0);\n outline-offset: var(--media-option-outline-offset, -1px);\n }\n\n :host(:focus-visible) {\n box-shadow: var(--media-option-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n outline: var(--media-option-hover-outline, 0);\n outline-offset: var(--media-option-hover-outline-offset, var(--media-option-outline-offset, -1px));\n }\n\n :host(:hover) {\n cursor: pointer;\n background: var(--media-option-hover-background, rgb(82 82 122 / .8));\n outline: var(--media-option-hover-outline);\n outline-offset: var(--media-option-hover-outline-offset, var(--media-option-outline-offset, -1px));\n }\n\n :host([aria-selected="true"]) {\n background: var(--media-option-selected-background);\n }\n\n :host([disabled]) {\n pointer-events: none;\n color: rgba(255, 255, 255, .3);\n }\n</style>\n<slot></slot>\n';const Sp="value",Cp="selected",Rp="disabled";class Lp extends na.HTMLElement{constructor(){super(),kp(this,Ep),kp(this,fp,!1),kp(this,gp,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ip.content.cloneNode(!0)))}static get observedAttributes(){return[Rp,Cp,Sp]}get value(){var e;return null!=(e=this.getAttribute(Sp))?e:this.text}set value(e){this.setAttribute(Sp,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get selected(){return"true"===this.getAttribute("aria-selected")}set selected(e){wp(this,fp,!0),this.setAttribute("aria-selected",e?"true":"false"),e?this.part.add("option-selected"):this.part.remove("option-selected")}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex",-1),this.hasAttribute("aria-selected")||this.setAttribute("aria-selected","false")}disable(){this.removeAttribute("tabindex")}attributeChangedCallback(e,t,n){e!==Cp||Ap(this,fp)?e===Rp&&n!==t&&(null==n?this.enable():this.disable()):this.setAttribute("aria-selected",null!=n?"true":"false")}connectedCallback(){this.hasAttribute(Rp)||this.enable(),this.setAttribute("role","option"),wp(this,gp,xp(this,this.parentNode)),Tp(this,Ep,yp).call(this)}disconnectedCallback(){this.disable(),Tp(this,Ep,yp).call(this),wp(this,gp,null)}handleClick(){}}function xp(e,t){if(!e)return null;const{host:n}=e.getRootNode();return!t&&n?xp(e,n):(null==t?void 0:t.options)?t:xp(t,null==t?void 0:t.parentNode)}fp=new WeakMap,gp=new WeakMap,Ep=new WeakSet,yp=function(){var e;const t=null==(e=Ap(this,gp))?void 0:e.options;if(!t)return;let n=t.filter(e=>"true"===e.getAttribute("aria-selected")).pop();n||(n=t[0]),"true"!==Ap(this,gp).getAttribute("aria-multiselectable")&&t.forEach(e
2=>{e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected","false")}),null==n||n.setAttribute("tabindex","0"),null==n||n.setAttribute("aria-selected","true")},na.customElements.get("media-chrome-option")||na.customElements.define("media-chrome-option",Lp);var Dp,Mp,Np,Op,Pp,Up,Wp,Bp,Hp,qp,Vp,$p,Fp,Kp,jp,Gp,Yp,Zp=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Qp=(e,t,n)=>(Zp(e,t,"read from private field"),n?n.call(e):t.get(e)),zp=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Xp=(e,t,n,i)=>(Zp(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Jp=(e,t,n)=>(Zp(e,t,"access private method"),n);const ev=ia.createElement("template");ev.innerHTML='\n <style>\n :host {\n font: var(--media-font,\n var(--media-font-weight, normal)\n var(--media-font-size, 15px) /\n var(--media-text-content-height, var(--media-control-height, 24px))\n var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n display: inline-flex;\n position: relative;\n flex-shrink: .5;\n }\n\n [name=listbox]::slotted(*),\n [part=listbox] {\n position: absolute;\n bottom: 100%;\n max-height: 300px;\n transition: var(--media-selectmenu-transition-in,\n visibility 0s, transform .15s ease-out, opacity .15s ease-out);\n transform: var(--media-listbox-transform-in, translateY(0) scale(1));\n visibility: visible;\n opacity: 1;\n }\n\n [name=listbox][hidden]::slotted(*),\n [hidden] [part=listbox] {\n transition: var(--media-selectmenu-transition-out,\n visibility .15s ease-out, transform .15s ease-out, opacity .15s ease-out);\n transform: var(--media-listbox-transform-out, translateY(2px) scale(.99));\n visibility: hidden;\n opacity: 0;\n pointer-events: none;\n }\n\n slot[name=listbox][hidden] {\n display: block;\n }\n </style>\n\n <slot name="button">\n <media-chrome-button aria-haspopup="listbox" part="button">\n <slot name="button-content"></slot>\n </media-chrome-button>\n </slot>\n <slot name="listbox" hidden>\n <media-chrome-listbox id="listbox" part="listbox">\n <slot></slot>\n </media-chrome-listbox>\n </slot>\n';class tv extends na.HTMLElement{constructor(){var e;super(),zp(this,Vp),zp(this,Fp),zp(this,jp),zp(this,Dp,void 0),zp(this,Mp,void 0),zp(this,Np,void 0),zp(this,Op,void 0),zp(this,Pp,void 0),zp(this,Up,e=>{const{key:t}=e;if(!this.keysUsed.includes(t))return void this.removeEventListener("keyup",Qp(this,Up));!e.composedPath().includes(Qp(this,Mp))||"Enter"!==t&&" "!==t?"Escape"===t&&Jp(this,jp,Gp).call(this):Jp(this,Vp,$p).call(this)}),zp(this,Wp,e=>{const{metaKey:t,altKey:n,key:i}=e;t||n||!this.keysUsed.includes(i)?this.removeEventListener("keyup",Qp(this,Up)):(e.preventDefault(),this.addEventListener("keyup",Qp(this,Up),{once:!0}))}),zp(this,Bp,e=>{e.composedPath().includes(this)||Jp(this,jp,Gp).call(this)}),zp(this,Hp,e=>{e.composedPath().includes(Qp(this,Mp))&&Jp(this,Vp,$p).call(this)}),zp(this,qp,()=>{Jp(this,jp,Gp).call(this)}),zp(this,Yp,()=>{if(0===Qp(this,Op).offsetWidth)return;const e=Qp(this,Op).offsetWidth,t=Qp(this,Mp).getBoundingClientRect();if(this.hasAttribute("mediacontroller")||Qp(this,Mp).hasAttribute("mediacontroller")||Qp(this,Op).hasAttribute("mediacontroller"))return Qp(this,Op).style.zIndex="1",Qp(this,Op).style.bottom="unset",Qp(this,Op).style.right=null,Qp(this,Op).style.left="0",void(Qp(this,Op).style.top=`${t.height}px`);const n=nv(this).getBoundingClientRect(),i=t.x+e,a=Math.max(t.right-i,t.right-n.right);Qp(this,Op).style.left=null,Qp(this,Op).style.right=`${a}px`,Qp(this,Op).style.maxHeight=n.height-t.height+"px"}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(ev.content.cloneNode(!0))),null==(e=this.init)||e.call(this),Xp(this,Mp,this.shadowRoot.querySelector("[part=button]")),Xp(this,Op,this.shadowRoot.querySelector("[part=listbox]")),Xp(this,Np,this.shadowRoot.querySelector("slot[name=button]")),Qp(this,Np).addEventListener("slotchange",()=>{const e=Qp(this,Np).assignedElements()[0];if(!e)return;Xp(this,Mp,e),Qp(this,Mp).preventClick=!0;this.hasAttribute("disabled")||Qp(this,Mp).hasAttribute("disabled")?this.disable():(this.enable(),Qp(this,Mp).setAttribute("aria-haspopup","listbox"))}),Xp(this,Pp,this.shadowRoot.querySelector("slot[name=listbox]")),Qp(this,Pp).addEventListener("slotchange",()=>
2{Xp(this,Op,Qp(this,Pp).assignedElements()[0]||Qp(this,Op))})}static get observedAttributes(){return["disabled",_i.MEDIA_CONTROLLER]}enable(){Qp(this,Mp).toggleAttribute("disabled",!1),this.addEventListener("change",Qp(this,qp)),this.addEventListener("keydown",Qp(this,Wp)),this.addEventListener("click",Qp(this,Hp)),ia.addEventListener("click",Qp(this,Bp))}disable(){Qp(this,Mp).toggleAttribute("disabled",!0),this.removeEventListener("change",Qp(this,qp)),this.removeEventListener("keydown",Qp(this,Wp)),this.removeEventListener("keyup",Qp(this,Up)),this.removeEventListener("click",Qp(this,Hp)),ia.removeEventListener("click",Qp(this,Bp))}attributeChangedCallback(e,t,n){var i,a,r,s,o;e===_i.MEDIA_CONTROLLER?(t&&(null==(a=null==(i=Qp(this,Dp))?void 0:i.unassociateElement)||a.call(i,this),Xp(this,Dp,null),Qp(this,Op).removeAttribute(_i.MEDIA_CONTROLLER)),n&&this.isConnected&&(Xp(this,Dp,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(o=null==(s=Qp(this,Dp))?void 0:s.associateElement)||o.call(s,this),Qp(this,Op).setAttribute(_i.MEDIA_CONTROLLER,n))):"disabled"===e&&n!==t&&(null==n?this.enable():this.disable())}connectedCallback(){var e,t,n;const{style:i}=ga(this.shadowRoot,":host");i.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const a=this.getAttribute(_i.MEDIA_CONTROLLER);a&&(Xp(this,Dp,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(n=null==(t=Qp(this,Dp))?void 0:t.associateElement)||n.call(t,this),Qp(this,Op).setAttribute(_i.MEDIA_CONTROLLER,a)),this.hasAttribute("disabled")||this.enable(),Qp(this,Pp).hidden||oa(nv(this),Qp(this,Yp))}disconnectedCallback(){var e,t;la(nv(this),Qp(this,Yp)),this.disable(),null==(t=null==(e=Qp(this,Dp))?void 0:e.unassociateElement)||t.call(e,this),Xp(this,Dp,null),Qp(this,Op).removeAttribute(_i.MEDIA_CONTROLLER)}get keysUsed(){return["Enter","Escape"," ","ArrowUp","ArrowDown","f","c","k","m"]}}function nv(e){var t;return null!=(t=e.getAttribute("bounds")?pa(e,`#${e.getAttribute("bounds")}`):function(e){var t;const n=e.getAttribute(_i.MEDIA_CONTROLLER);if(n)return null==(t=e.getRootNode())?void 0:t.getElementById(n);return pa(e,"media-controller")}(e)||e.parentElement)?t:e}Dp=new WeakMap,Mp=new WeakMap,Np=new WeakMap,Op=new WeakMap,Pp=new WeakMap,Up=new WeakMap,Wp=new WeakMap,Bp=new WeakMap,Hp=new WeakMap,qp=new WeakMap,Vp=new WeakSet,$p=function(){Qp(this,Pp).hidden?Jp(this,Fp,Kp).call(this):Jp(this,jp,Gp).call(this)},Fp=new WeakSet,Kp=function(){Qp(this,Pp).hidden&&(Qp(this,Pp).hidden=!1,Qp(this,Mp).setAttribute("aria-expanded","true"),Qp(this,Yp).call(this),Qp(this,Op).focus(),oa(nv(this),Qp(this,Yp)))},jp=new WeakSet,Gp=function(){if(Qp(this,Pp).hidden)return;la(nv(this),Qp(this,Yp));const e=va();Qp(this,Pp).hidden=!0,Qp(this,Mp).setAttribute("aria-expanded","false"),ma(Qp(this,Op),e)&&Qp(this,Mp).focus()},Yp=new WeakMap,na.customElements.get("media-chrome-selectmenu")||na.customElements.define("media-chrome-selectmenu",tv);var iv,av,rv,sv,ov,lv=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},dv=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},uv=(e,t,n)=>(lv(e,t,"access private method"),n);const cv=ia.createElement("template");cv.innerHTML='\n <slot name="captions-indicator" hidden>\n<svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">\n <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79
20 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>\n</svg></slot>\n';class hv extends bp{constructor(){super({slotTemplate:cv}),dv(this,av),dv(this,sv),dv(this,iv,void 0)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",wi.MEDIA_SUBTITLES_LIST,wi.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_SUBTITLES_LIST&&t!==n?uv(this,av,rv).call(this):e===wi.MEDIA_SUBTITLES_SHOWING&&t!==n?this.value=n:"aria-multiselectable"===e&&(this.removeAttribute("aria-multiselectable"),console.warn("Captions List doesn't currently support multiple selections. You can enable multiple items via the media.textTracks API."))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",uv(this,sv,ov))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",uv(this,sv,ov))}get mediaSubtitlesList(){return mv(this,wi.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){pv(this,wi.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return mv(this,wi.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){pv(this,wi.MEDIA_SUBTITLES_SHOWING,e)}}iv=new WeakMap,av=new WeakSet,rv=function(){var e;if(((e,t,n)=>(lv(e,t,"read from private field"),n?n.call(e):t.get(e)))(this,iv)===JSON.stringify(this.mediaSubtitlesList))return;((e,t,n,i)=>{lv(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,iv,JSON.stringify(this.mediaSubtitlesList));const t=this.shadowRoot.querySelector("#container");t.textContent="";const n=!this.value,i=mp(this.formatOptionText("Off"),"off",n);i.prepend(pp(this,"select-indicator")),t.append(i);const a=this.mediaSubtitlesList;for(const r of a){const n=mp(this.formatOptionText(r.label,r),fr(r),this.value==fr(r));n.prepend(pp(this,"select-indicator"));"captions"===(null!=(e=r.kind)?e:"subs")&&n.append(pp(this,"captions-indicator")),t.append(n)}},sv=new WeakSet,ov=function(){const e=this.mediaSubtitlesShowing,t=this.getAttribute(wi.MEDIA_SUBTITLES_SHOWING),n=this.value!==t;if((null==e?void 0:e.length)&&n&&this.dispatchEvent(new na.CustomEvent(yi.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e})),!this.value||!n)return;const i=new na.CustomEvent(yi.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};const mv=(e,t)=>
2{const n=e.getAttribute(t);return n?vr(n):[]},pv=(e,t,n)=>{if(!(null==n?void 0:n.length))return void e.removeAttribute(t);const i=gr(n);e.getAttribute(t)!==i&&e.setAttribute(t,i)};na.customElements.get("media-captions-listbox")||na.customElements.define("media-captions-listbox",hv);class vv extends tv{init(){const e=ia.createElement("media-captions-button");e.part.add("button"),e.preventClick=!0;const t=ia.createElement("media-captions-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");const n=this.shadowRoot.querySelector("slot[name=button]"),i=this.shadowRoot.querySelector("slot[name=listbox]");n.textContent="",i.textContent="",n.append(e),i.append(t)}}na.customElements.get("media-captions-selectmenu")||na.customElements.define("media-captions-selectmenu",vv);var bv,fv,gv,Ev,yv,_v=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Av=(e,t,n)=>(_v(e,t,"read from private field"),n?n.call(e):t.get(e)),kv=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},wv=(e,t,n)=>(_v(e,t,"access private method"),n);const Tv="rates";class Iv extends bp{constructor(){super(),kv(this,fv),kv(this,Ev),kv(this,bv,new mr(this,Tv,{defaultValue:kc})),wv(this,fv,gv).call(this)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",wi.MEDIA_PLAYBACK_RATE,Tv]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_PLAYBACK_RATE&&t!=n?this.value=n:e===Tv&&t!=n&&(Av(this,bv).value=n,wv(this,fv,gv).call(this))}get rates(){return Av(this,bv)}set rates(e){e?Array.isArray(e)&&(Av(this,bv).value=e.join(" ")):Av(this,bv).value="",wv(this,fv,gv).call(this)}get mediaPlaybackRate(){return ya(this,wi.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){_a(this,wi.MEDIA_PLAYBACK_RATE,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",wv(this,Ev,yv))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",wv(this,Ev,yv))}}bv=new WeakMap,fv=new WeakSet,gv=function(){const e=this.shadowRoot.querySelector("#container");e.textContent="";for(const t of this.rates){const n=mp(this.formatOptionText(`${t}x`,t),t,this.mediaPlaybackRate==t);n.prepend(pp(this,"select-indicator")),e.append(n)}},Ev=new WeakSet,yv=function(){if(!this.value)return;const e=new na.CustomEvent(yi.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},na.customElements.get("media-playback-rate-listbox")||na.customElements.define("media-playback-rate-listbox",Iv);class Sv extends tv{init(){const e=ia.createElement("media-playback-rate-button");e.part.add("button"),e.preventClick=!0;const t=ia.createElement("media-playback-rate-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");const n=this.shadowRoot.querySelector("slot[name=button]"),i=this.shadowRoot.querySelector("slot[name=listbox]");n.textContent="",i.textContent="",n.append(e),i.append(t)}}na.customElements.get("media-playback-rate-selectmenu")||na.customElements.define("media-playback-rate-selectmenu",Sv);var Cv,Rv,Lv,xv,Dv,Mv,Nv=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ov=(e,t,n)=>(Nv(e,t,"read from private field"),n?n.call(e):t.get(e)),Pv=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Uv=(e,t,n,i)=>(Nv(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Wv=(e,t,n)=>(Nv(e,t,"access private method"),n);class Bv extends bp{constructor(){super(...arguments),Pv(this,Lv),Pv(this,Dv),Pv(this,Cv,[]),Pv(this,Rv,void 0)}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_RENDITION_LIST,wi.MEDIA_RENDITION_SELECTED]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_RENDITION_SELECTED&&t!==n?this.value=null!=n?n:"auto":e===wi.MEDIA_RENDITION_LIST&&t!==n&&(Uv(this,Cv,Wi(n)),Wv(this,Lv,xv).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Wv(this,Dv,Mv))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Wv(this,Dv,Mv))}get mediaRenditionList(){return Ov(this,Cv)}set mediaRenditionList(e){Uv(this,Cv,e),Wv(this,Lv,xv).call(this)}get mediaRenditionSelected(){return wa(this,wi.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){Ta(this,wi.MEDIA_RENDITION_SELECTED,e)}}Cv=new WeakMap,Rv=new WeakMap,Lv=new WeakSet,xv=function(){if(Ov(this,Rv)===JSON.stringify(this.mediaRenditionList))return;Uv(this,Rv,JSON.stringify(this.mediaRenditionList));const e=this.mediaRenditionList.sort((e,t)=>
2t.height-e.height),t=this.shadowRoot.querySelector("#container");t.textContent="";let n=!this.mediaRenditionSelected;for(const a of e){const e=mp(this.formatOptionText(`${Math.min(a.width,a.height)}p`,a),`${a.id}`,a.selected&&!n);e.prepend(pp(this,"select-indicator")),t.append(e)}const i=mp(this.formatOptionText("Auto"),"auto",n);i.prepend(pp(this,"select-indicator")),t.append(i)},Dv=new WeakSet,Mv=function(){if(null==this.value)return;const e=new na.CustomEvent(yi.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},na.customElements.get("media-rendition-listbox")||na.customElements.define("media-rendition-listbox",Bv);const Hv=ia.createElement("template");Hv.innerHTML='\n <slot name="icon"><svg aria-hidden="true" viewBox="0 0 24 24">\n <path d="M13.5 2.5h2v6h-2v-2h-11v-2h11v-2Zm4 2h4v2h-4v-2Zm-12 4h2v6h-2v-2h-3v-2h3v-2Zm4 2h12v2h-12v-2Zm1 4h2v6h-2v-2h-8v-2h8v-2Zm4 2h7v2h-7v-2Z" />\n</svg></slot>\n';class qv extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_RENDITION_SELECTED,wi.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:Hv})}get mediaRenditionSelected(){return wa(this,wi.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){Ta(this,wi.MEDIA_RENDITION_SELECTED,e)}}na.customElements.get("media-rendition-button")||na.customElements.define("media-rendition-button",qv);class Vv extends tv{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_RENDITION_SELECTED,wi.MEDIA_RENDITION_UNAVAILABLE]}init(){const e=ia.createElement("media-rendition-button");e.part.add("button"),e.preventClick=!0;const t=ia.createElement("media-rendition-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");const n=this.shadowRoot.querySelector("slot[name=button]"),i=this.shadowRoot.querySelector("slot[name=listbox]");n.textContent="",i.textContent="",n.append(e),i.append(t)}}na.customElements.get("media-rendition-selectmenu")||na.customElements.define("media-rendition-selectmenu",Vv);var $v,Fv,Kv,jv,Gv,Yv,Zv=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Qv=(e,t,n)=>(Zv(e,t,"read from private field"),n?n.call(e):t.get(e)),zv=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Xv=(e,t,n,i)=>(Zv(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Jv=(e,t,n)=>(Zv(e,t,"access private method"),n);class eb extends bp{constructor(){super(...arguments),zv(this,Kv),zv(this,Gv),zv(this,$v,[]),zv(this,Fv,void 0)}static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_AUDIO_TRACK_LIST,wi.MEDIA_AUDIO_TRACK_ENABLED]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===wi.MEDIA_AUDIO_TRACK_ENABLED&&t!==n?this.value=n:e===wi.MEDIA_AUDIO_TRACK_LIST&&t!==n&&(Xv(this,$v,qi(n)),Jv(this,Kv,jv).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Jv(this,Gv,Yv))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Jv(this,Gv,Yv))}get mediaAudioTrackList(){return Qv(this,$v)}set mediaAudioTrackList(e){Xv(this,$v,e),Jv(this,Kv,jv).call(this)}get mediaAudioTrackEnabled(){return wa(this,wi.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){Ta(this,wi.MEDIA_AUDIO_TRACK_ENABLED,e)}}$v=new WeakMap,Fv=new WeakMap,Kv=new WeakSet,jv=function(){if(Qv(this,Fv)===JSON.stringify(this.mediaAudioTrackList))return;Xv(this,Fv,JSON.stringify(this.mediaAudioTrackList));const e=this.mediaAudioTrackList,t=this.shadowRoot.querySelector("#container");t.textContent="";for(const n of e){const e=mp(this.formatOptionText(n.label,n),`${n.id}`,n.enabled);e.prepend(pp(this,"select-indicator")),t.append(e)}},Gv=new WeakSet,Yv=function(){if(null==this.value)return;const e=new na.CustomEvent(yi.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},na.customElements.get("media-audio-track-listbox")||na.customElements.define("media-audio-track-listbox",eb);const tb=ia.createElement("template");tb.innerHTML='\n <slot name="icon"><svg aria-hidden="true" viewBox="0 0 24 24">\n <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>\n <path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/>\n</svg></slot>\n';class nb extends js{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_AUDIO_TRACK_ENABLED,wi.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:tb})}get mediaAudioTrackEnabled(){return wa(this,wi.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){Ta(this,wi.MEDIA_AUDIO_TRACK_ENABLED,e)}}na.customElements.get("media-audio-track-button")||na.customElements.define("media-audio-track-button",nb);class ib extends tv{static get observedAttributes(){return[...super.observedAttributes,wi.MEDIA_AUDIO_TRACK_ENABLED,wi.MEDIA_AUDIO_TRACK_UNAVAILABLE]}init(){const e=ia.createElement("media-audio-track-button");e.part.add("button"),e.preventClick=!0;const t=ia.createElement("media-audio-track-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");const n=this.shadowRoot.querySelector("slot[name=button]"),i=this.shadowRoot.querySelector("slot[name=listbox]");n.textContent="",i.textContent="",n.append(e),i.append(t)}}na.customElements.get("media-audio-track-selectmenu")||na.customElements.define("media-audio-track-selectmenu",ib);var ab=Object.defineProperty,rb=Object.getPrototypeOf,sb=Reflect.get,ob=(e,t,n
2)=>(((e,t,n)=>{t in e?ab(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),lb=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},db=(e,t,n)=>(lb(e,t,"read from private field"),n?n.call(e):t.get(e)),ub=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},cb=(e,t,n,i)=>(lb(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),hb=(e,t,n)=>(lb(e,t,"access private method"),n),mb=(e,t,n)=>sb(rb(e),n,t),pb=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends pb{}globalThis.DocumentFragment=e}var vb,bb=class extends pb{},fb={get(e){},define(e,t,n){},upgrade(e){},whenDefined(e){return Promise.resolve(bb)}};vb=new WeakMap;var gb={document:{createElement:function(e,t){return new bb}},DocumentFragment:DocumentFragment,customElements:fb,CustomEvent:class{constructor(e,t={}){ub(this,vb,void 0),cb(this,vb,null==t?void 0:t.detail)}get detail(){return db(this,vb)}initCustomEvent(){}},EventTarget:pb,HTMLElement:bb,HTMLVideoElement:class extends pb{}},Eb="undefined"==typeof window||void 0===globalThis.customElements,yb=Eb?gb:globalThis,_b=(Eb||globalThis.document,(()=>{try{return"0.20.2"}catch{}return"UNKNOWN"})()),Ab=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"];function kb(e){return`\n <style>\n :host {\n display: inline-flex;\n line-height: 0;\n flex-direction: column;\n justify-content: end;\n }\n\n audio {\n width: 100%;\n }\n </style>\n <slot name="media">\n <audio${Ib(e)}></audio>\n </slot>\n <slot></slot>\n `}function wb(e){return`\n <style>\n :host {\n display: inline-block;\n line-height: 0;\n }\n\n video {\n max-width: 100%;\n max-height: 100%;\n min-width: 100%;\n min-height: 100%;\n object-fit: var(--media-object-fit, contain);\n object-position: var(--media-object-position, 50% 50%);\n }\n\n video::-webkit-media-text-track-container {\n transform: var(--media-webkit-text-track-transform);\n transition: var(--media-webkit-text-track-transition);\n }\n </style>\n <slot name="media">\n <video${Ib(e)}></video>\n </slot>\n <slot></slot>\n `}var Tb=(e,{tag:t,is:n})=>{var i,a,r,s,o,l,d,u,c,h,m,p,v,b,f,g,E;let y=null==(a=null==(i=globalThis.document)?void 0:i.createElement)?void 0:a.call(i,t,{is:n}),_=y?function(e){let t=[];for(let n=Object.getPrototypeOf(e);n&&n!==HTMLElement.prototype;n=Object.getPrototypeOf(n))t.push(...Object.getOwnPropertyNames(n));return t}(y):[];return r=class extends e{constructor(){super(),ub(this,h),ub(this,p),ub(this,b),ub(this,g),ub(this,d,void 0),ub(this,u,void 0),ub(this,c,new Map)}static get observedAttributes(){var e,t,n;return hb(e=r,o,l).call(e),[...null!=(n=null==(t=null==y?void 0:y.constructor)?void 0:t.observedAttributes)?n:[],"autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"]}get nativeEl(){var e,n,i;return hb(this,h,m).call(this),null!=(i=null!=(n=null!=(e=db(this,u))?e:this.shadowRoot.querySelector(t))?n:this.querySelector(":scope > [slot=media]"))?i:this.querySelector(t)}set nativeEl(e){cb(this,u,e)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(e){this.toggleAttribute("muted",!!e)}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",`${e}`)}get preload(){var e,t;return null!=(t=this.getAttribute("preload"))?t:null==(e=this.nativeEl)?void 0:e.preload}set preload(e){this.setAttribute("preload",`${e}`)}init(){var e,i;if(!this.shadowRoot){this.attachShadow({mode:"open"});let e=function(e){let t={};for(let n of e)t[n.name]=n.value;return t}(this.attributes);n&&(e.is=n),t&&(e.part=t),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.nativeEl.muted=this.hasAttribute("muted");for(let t of _)hb(this,b,f).call(this,t);this.shadowRoot.addEventListener("slotchange",this),hb(this,p,v).call(this);for(let t of this.constructor.Events)null==(i=(e=this.shadowRoot).addEventListener)||i.call(e,t,this,!0)}handleEvent(e){"slotchange"!==e.type?e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail})):hb(this,p,v).call(this)}attributeChangedCallback(e,t,n){hb(this,h,m).call(this),hb(this,g,E).call(this,e,t,n)}connectedCallback(){hb(this,h,m).call(this)}},s=new WeakMap,o=new WeakSet,l=function(){if(db(this,s))return;cb(this,s,!0);let e=new Set(this.observedAttributes);e.delete("muted");for(let t of _)if(!(t in this.prototype))if("function"==typeof y[t])this.prototype[t]=function(...e){return hb(this,h,m).call(this),this.call?this.call(t,...e):this.nativeEl[t].apply(this.nativeEl,e)};else{let n={get(){var n,i,a;hb(this,h,m).call(this);let r=t.toLowerCase();if(e.has(r)){let e=this.getAttribute(r);return null!==e&&(""===e||e)}return null!=(a=null==(n=this.get)?void 0:n.call(this,t))?a:null==(i=this.nativeEl)?void 0:i[t]}};t!==t.toUpperCase()&&(n.set=function(n){hb(this,h,m).call(this);let i=t.toLowerCase();e.has(i)?!0===n||!1===n||null==n?this.toggleAttribute(i,!!n):this.setAttribute(i,n):this.set?this.set(t,n):this.nativeEl[t]=n}),Object.defineProperty(this.prototype,t,n)}},d=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakSet,m=function(){db(this,d)||(cb(this,d,!0),this.init())},p=new WeakSet,v=function(){let e=new Map(db(this,c));this.shadowRoot.querySelector("slot:not([name])").assignedElements({flatten:!0}).filter(e=>
2["track","source"].includes(e.localName)).forEach(t=>{var n,i;e.delete(t);let a=db(this,c).get(t);a||(a=t.cloneNode(),db(this,c).set(t,a)),null==(i=(n=this.nativeEl).append)||i.call(n,a),"track"===a.localName&&a.default&&("chapters"===a.kind||"metadata"===a.kind)&&"disabled"===a.track.mode&&(a.track.mode="hidden")}),e.forEach(e=>e.remove())},b=new WeakSet,f=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},g=new WeakSet,E=function(e,t,n){var i,a,s,o,l,d;["id","class"].includes(e)||!r.observedAttributes.includes(e)&&this.constructor.observedAttributes.includes(e)||(null===n?null==(a=(i=this.nativeEl).removeAttribute)||a.call(i,e):(null==(o=(s=this.nativeEl).getAttribute)?void 0:o.call(s,e))!=n&&(null==(d=(l=this.nativeEl).setAttribute)||d.call(l,e,n)))},ub(r,o),ob(r,"getTemplateHTML",t.endsWith("audio")?kb:wb),ob(r,"shadowRootOptions",{mode:"open"}),ob(r,"Events",Ab),ub(r,s,void 0),r};function Ib(e){let t="";for(let n in e){let i=e[n];t+=""===i?` ${n}`:` ${n}="${i}"`}return t}var Sb,Cb,Rb=Tb(null!=(Sb=globalThis.HTMLElement)?Sb:class{},{tag:"video"}),Lb=(Tb(null!=(Cb=globalThis.HTMLElement)?Cb:class{},{tag:"audio"}),new WeakMap),xb=class extends Error{},Db=class extends Error{},Mb=globalThis.WeakRef?class extends Set{add(e){super.add(new WeakRef(e))}forEach(e){super.forEach(t=>{let n=t.deref();n&&e(n)})}}:Set;function Nb(){var e,t;return null==(t=null==(e=globalThis.cast)?void 0:e.framework)?void 0:t.CastContext.getInstance()}function Ob(){var e;return null==(e=Nb())?void 0:e.getCurrentSession()}function Pb(){var e;return null==(e=Ob())?void 0:e.getSessionObj().media[0]}function Ub(e){return Nb().setOptions({receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0,...e})}var Wb,Bb=new Mb,Hb=new WeakSet;!function(e){var t,n,i;null!=(n=null==(t=globalThis.chrome)?void 0:t.cast)&&n.isAvailable?null!=(i=globalThis.cast)&&i.framework?e():customElements.whenDefined("google-cast-button").then(e):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(e)}}(()=>{var e,t,n,i;null!=(t=null==(e=globalThis.chrome)?void 0:e.cast)&&t.isAvailable?Wb||(Wb=cast.framework,Nb().addEventListener(Wb.CastContextEventType.CAST_STATE_CHANGED,e=>{Bb.forEach(t=>{var n,i;return null==(i=(n=Lb.get(t)).onCastStateChanged)?void 0:i.call(n,e)})}),Nb().addEventListener(Wb.CastContextEventType.SESSION_STATE_CHANGED,e=>{Bb.forEach(t=>{var n,i;return null==(i=(n=Lb.get(t)).onSessionStateChanged)?void 0:i.call(n,e)})}),Bb.forEach(e=>{var t,n;return null==(n=(t=Lb.get(e)).init)?void 0:n.call(t)})):console.debug("chrome.cast.isAvailable",null==(i=null==(n=globalThis.chrome)?void 0:n.cast)?void 0:i.isAvailable)});var qb,Vb,$b,Fb,Kb,jb,Gb,Yb,Zb,Qb,zb,Xb,Jb,ef,tf,nf,af,rf,sf,of,lf,df,uf=0,cf=class extends EventTarget{constructor(e){super(),ub(this,Zb),ub(this,zb),ub(this,Jb),ub(this,tf),ub(this,af),ub(this,sf),ub(this,lf),ub(this,qb,void 0),ub(this,Vb,void 0),ub(this,$b,void 0),ub(this,Fb,void 0),ub(this,Kb,"disconnected"),ub(this,jb,!1),ub(this,Gb,new Set),ub(this,Yb,new WeakMap),cb(this,qb,e),Bb.add(this),Lb.set(this,{init:()=>hb(this,af,rf).call(this),onCastStateChanged:()=>hb(this,Jb,ef).call(this),onSessionStateChanged:()=>hb(this,tf,nf).call(this),getCastPlayer:()=>db(this,Zb,Qb)}),hb(this,af,rf).call(this)}get state(){return db(this,Kb)}async watchAvailability(e){if(db(this,qb).disableRemotePlayback)throw new xb("disableRemotePlayback attribute is present.");return db(this,Yb).set(e,++uf),db(this,Gb).add(e),uf}async cancelWatchAvailability(e){if(db(this,qb).disableRemotePlayback)throw new xb("disableRemotePlayback attribute is present.");e?db(this,Gb).delete(e):db(this,Gb).clear()}async prompt(){var e,t,n,i;if(db(this,qb).disableRemotePlayback)throw new xb("disableRemotePlayback attribute is present.");if(null==(t=null==(e=globalThis.chrome)?void 0:e.cast)||!t.isAvailable)throw new Db("The RemotePlayback API is disabled on this platform.");let a=Hb.has(db(this,qb));Hb.add(db(this,qb)),Ub(db(this,qb).castOptions),Object.entries(db(this,Fb)).forEac
2h(([e,t])=>{db(this,$b).controller.addEventListener(e,t)});try{await Nb().requestSession()}catch(AE){if("cancel"===AE)return void(a||Hb.delete(db(this,qb)));throw new Error(AE)}null==(i=null==(n=Lb.get(db(this,qb)))?void 0:n.loadOnPrompt)||i.call(n)}};qb=new WeakMap,Vb=new WeakMap,$b=new WeakMap,Fb=new WeakMap,Kb=new WeakMap,jb=new WeakMap,Gb=new WeakMap,Yb=new WeakMap,Zb=new WeakSet,Qb=function(){if(Hb.has(db(this,qb)))return db(this,$b)},zb=new WeakSet,Xb=function(){Hb.has(db(this,qb))&&(Object.entries(db(this,Fb)).forEach(([e,t])=>{db(this,$b).controller.removeEventListener(e,t)}),Hb.delete(db(this,qb)),db(this,qb).muted=db(this,$b).isMuted,db(this,qb).currentTime=db(this,$b).savedPlayerState.currentTime,!1===db(this,$b).savedPlayerState.isPaused&&db(this,qb).play())},Jb=new WeakSet,ef=function(){let e=Nb().getCastState();if(Hb.has(db(this,qb))&&"CONNECTING"===e&&(cb(this,Kb,"connecting"),this.dispatchEvent(new Event("connecting"))),!db(this,jb)&&null!=e&&e.includes("CONNECT")){cb(this,jb,!0);for(let e of db(this,Gb))e(!0)}else if(db(this,jb)&&(!e||"NO_DEVICES_AVAILABLE"===e)){cb(this,jb,!1);for(let e of db(this,Gb))e(!1)}},tf=new WeakSet,nf=async function(){var e;let{SESSION_RESUMED:t}=Wb.SessionState;if(Nb().getSessionState()===t&&db(this,qb).castSrc===(null==(e=Pb())?void 0:e.media.contentId)){Hb.add(db(this,qb)),Object.entries(db(this,Fb)).forEach(([e,t])=>{db(this,$b).controller.addEventListener(e,t)});try{await(n=new chrome.cast.media.GetStatusRequest,new Promise((e,t)=>{Pb().getStatus(n,e,t)}))}catch(Wy){console.error(Wy)}db(this,Fb)[Wb.RemotePlayerEventType.IS_PAUSED_CHANGED](),db(this,Fb)[Wb.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}var n},af=new WeakSet,rf=function(){!Wb||db(this,Vb)||(cb(this,Vb,!0),Ub(db(this,qb).castOptions),db(this,qb).textTracks.addEventListener("change",()=>hb(this,lf,df).call(this)),hb(this,Jb,ef).call(this),cb(this,$b,new Wb.RemotePlayer),new Wb.RemotePlayerController(db(this,$b)),cb(this,Fb,{[Wb.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{!0===e?(cb(this,Kb,"connected"),this.dispatchEvent(new Event("connect"))):(hb(this,zb,Xb).call(this),cb(this,Kb,"disconnected"),this.dispatchEvent(new Event("disconnect")))},[Wb.RemotePlayerEventType.DURATION_CHANGED]:()=>{db(this,qb).dispatchEvent(new Event("durationchange"))},[Wb.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{db(this,qb).dispatchEvent(new Event("volumechange"))},[Wb.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{db(this,qb).dispatchEvent(new Event("volumechange"))},[Wb.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{var e;null!=(e=db(this,Zb,Qb))&&e.isMediaLoaded&&db(this,qb).dispatchEvent(new Event("timeupdate"))},[Wb.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{db(this,qb).dispatchEvent(new Event("resize"))},[Wb.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{db(this,qb).dispatchEvent(new Event(this.paused?"pause":"play"))},[Wb.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var e,t;(null==(e=db(this,Zb,Qb))?void 0:e.playerState)!==chrome.cast.media.PlayerState.PAUSED&&db(this,qb).dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[null==(t=db(this,Zb,Qb))?void 0:t.playerState]))},[Wb.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{var e;null!=(e=db(this,Zb,Qb))&&e.isMediaLoaded&&(await Promise.resolve(),hb(this,sf,of).call(this))}}))},sf=new WeakSet,of=function(){hb(this,lf,df).call(this)},lf=new WeakSet,df=async function(){var e,t,n,i,a;if(!db(this,Zb,Qb))return;let r=(null!=(t=null==(e=db(this,$b).mediaInfo)?void 0:e.tracks)?t:[]).filter(({type:e})=>e===chrome.cast.media.TrackType.TEXT),s=[...db(this,qb).textTracks].filter(({kind:e})=>"subtitles"===e||"captions"===e),o=r.map(({language:e,name:t,trackId:n})=>{var i;let{mode:a}=null!=(i=s.find(n=>n.language===e&&n.label===t))?i:{};return!!a&&{mode:a,trackId:n}}).filter(Boolean),l=o.filter(({mode:e})=>"showing"!==e).map(({trackId:e})=>e),d=o.find(({mode:e})=>"showing"===e),u=null!=(a=null==(i=null==(n=Ob())?void 0:n.getSessionObj().media[0])?void 0:i.activeTrackIds)?a:[],c=u;if(u.length&&(c=c.filter(e=>!l.includes(e))),null!=d&&d.trackId&&(c=[...c,d.trackId]),c=[...new Set(c)],!((e,t)=>e.length===t.length&&e.every(e=>t.includes(e)))(u,c))try{let e=new chrome.cast.media.EditTracksInfoRequest(c);await(h=e,new Promise((e,t)=>
2{Pb().editTracksInfo(h,e,t)}))}catch(Pn){console.error(Pn)}var h};var hf=e=>{var t,n,i,a,r,s,o,l,d;return n=class extends e{constructor(){super(...arguments),ub(this,s),ub(this,l),ub(this,i,{paused:!1}),ub(this,a,{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}),ub(this,r,void 0)}get remote(){return db(this,r)?db(this,r):globalThis.chrome?(function(){var e;let t="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(null!=(e=globalThis.chrome)&&e.cast||document.querySelector(`script[src="${t}"]`))return;let n=document.createElement("script");n.src=t,document.head.append(n)}(),Lb.set(this,{loadOnPrompt:()=>hb(this,l,d).call(this)}),cb(this,r,new cf(this))):super.remote}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),"cast-receiver"===e&&n)db(this,a).receiverApplicationId=n;else if(db(this,s,o))switch(e){case"cast-stream-type":case"cast-src":this.load()}}async load(){var e,t;if(!db(this,s,o))return super.load();let n=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType),a=[...this.querySelectorAll("track")].filter(({kind:e,src:t})=>t&&("subtitles"===e||"captions"===e)),r=[],l=0;a.length&&(n.tracks=a.map(e=>{let t=++l;0===r.length&&"showing"===e.track.mode&&r.push(t);let n=new chrome.cast.media.Track(t,chrome.cast.media.TrackType.TEXT);return n.trackContentId=e.src,n.trackContentType="text/vtt",n.subtype="captions"===e.kind?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,n.name=e.label,n.language=e.srclang,n})),"live"===this.castStreamType?n.streamType=chrome.cast.media.StreamType.LIVE:n.streamType=chrome.cast.media.StreamType.BUFFERED,n.metadata=new chrome.cast.media.GenericMediaMetadata,n.metadata.title=this.title,n.metadata.images=[{url:this.poster}];let d=new chrome.cast.media.LoadRequest(n);d.currentTime=null!=(e=super.currentTime)?e:0,d.autoplay=!db(this,i).paused,d.activeTrackIds=r,await(null==(t=Ob())?void 0:t.loadMedia(d)),this.dispatchEvent(new Event("volumechange"))}play(){var e;if(!db(this,s,o))return super.play();db(this,s,o).isPaused&&(null==(e=db(this,s,o).controller)||e.playOrPause())}pause(){var e;db(this,s,o)?db(this,s,o).isPaused||null==(e=db(this,s,o).controller)||e.playOrPause():super.pause()}get castOptions(){return db(this,a)}get castReceiver(){var e;return null!=(e=this.getAttribute("cast-receiver"))?e:void 0}set castReceiver(e){this.castReceiver!=e&&this.setAttribute("cast-receiver",`${e}`)}get castSrc(){var e,t,n;return null!=(n=null!=(t=this.getAttribute("cast-src"))?t:null==(e=this.querySelector("source"))?void 0:e.src)?n:this.currentSrc}set castSrc(e){this.castSrc!=e&&this.setAttribute("cast-src",`${e}`)}get castContentType(){var e;return null!=(e=this.getAttribute("cast-content-type"))?e:void 0}set castContentType(e){this.setAttribute("cast-content-type",`${e}`)}get castStreamType(){var e,t;return null!=(t=null!=(e=this.getAttribute("cast-stream-type"))?e:this.streamType)?t:void 0}set castStreamType(e){this.setAttribute("cast-stream-type",`${e}`)}get readyState(){if(db(this,s,o))switch(db(this,s,o).playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return db(this,s,o)?db(this,s,o).isPaused:super.paused}get muted(){var e;return db(this,s,o)?null==(e=db(this,s,o))?void 0:e.isMuted:super.muted}set muted(e){var t;db(this,s,o)?(e&&!db(this,s,o).isMuted||!e&&db(this,s,o).isMuted)&&(null==(t=db(this,s,o).controller)||t.muteOrUnmute()):super.muted=e}get volume(){var e,t;return db(this,s,o)?null!=(t=null==(e=db(this,s,o))?void 0:e.volumeLevel)?t:1:super.volume}set volume(e){var t;if(db(this,s,o))return db(this,s,o).volumeLevel=+e,void(null==(t=db(this,s,o).controller)||t.setVolumeLevel());super.volume=e}get duration(){var e,t,n;return db(this,s,o)&&null!=(e=db(this,s,o))&&e.isMediaLoaded?null!=(n=null==(t=db(this,s,o))?void 0:t.duration)?n:NaN:super.duration}get currentTime(){var e,t,n;return db(this,s,o)&&null!=(e=db(this,s,o))&&e.isMediaLoaded?null!=(n=null==(t=db(this,s,o))?void 0:t.currentTime)?n:0:super.currentTime}set currentTime(e){var t;if(db(this,s,o))return db(this,s,o).currentTime=e,void(null==(t=db(this,s,o).controller)||t.seek());super.currentTime=e}},i=new WeakMap,a=new WeakMap,r=new WeakMap,s=new WeakSet,o=function(){var e,t;return null==(t=null==(e=Lb.get(this.remote))?void 0:e.getCastPlayer)?void 0:t.call(e)},l=new WeakSet,d=async function(){db(this,i).paused=mb(n.prototype,this,"paused"),mb(n.prototype,this,"pause").call(this),this.muted=mb(n.prototype,this,"muted");try{await this.load()}catch(e){console.error(e)}},ob(n,"observedAttributes",[...null!=(t=e.observedAttributes)?t:[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"]),n}
2,mf=class extends Event{constructor(e,t){super(e),ob(this,"track"),this.track=t.track}},pf=new WeakMap;function vf(e){var t;return null!=(t=pf.get(e))?t:function(e,t){let n=pf.get(e);return n||pf.set(e,n={}),Object.assign(n,t)}(e,{})}function bf(e,t){let n=e.videoTracks;vf(t).media=e,vf(t).renditionSet||(vf(t).renditionSet=new Set);let i=vf(n).trackSet;i.add(t);let a=i.size-1;a in kf.prototype||Object.defineProperty(kf.prototype,a,{get(){return[...vf(this).trackSet][a]}}),queueMicrotask(()=>{n.dispatchEvent(new mf("addtrack",{track:t}))})}function ff(e){var t;let n=null==(t=vf(e).media)?void 0:t.videoTracks;n&&(vf(n).trackSet.delete(e),queueMicrotask(()=>{n.dispatchEvent(new mf("removetrack",{track:e}))}))}var gf,Ef,yf,_f,Af,kf=class extends EventTarget{constructor(){super(),ub(this,_f),ub(this,gf,void 0),ub(this,Ef,void 0),ub(this,yf,void 0),vf(this).trackSet=new Set}[Symbol.iterator](){return db(this,_f,Af).values()}get length(){return db(this,_f,Af).size}getTrackById(e){var t;return null!=(t=[...db(this,_f,Af)].find(t=>t.id===e))?t:null}get selectedIndex(){return[...db(this,_f,Af)].findIndex(e=>e.selected)}get onaddtrack(){return db(this,gf)}set onaddtrack(e){db(this,gf)&&(this.removeEventListener("addtrack",db(this,gf)),cb(this,gf,void 0)),"function"==typeof e&&(cb(this,gf,e),this.addEventListener("addtrack",e))}get onremovetrack(){return db(this,Ef)}set onremovetrack(e){db(this,Ef)&&(this.removeEventListener("removetrack",db(this,Ef)),cb(this,Ef,void 0)),"function"==typeof e&&(cb(this,Ef,e),this.addEventListener("removetrack",e))}get onchange(){return db(this,yf)}set onchange(e){db(this,yf)&&(this.removeEventListener("change",db(this,yf)),cb(this,yf,void 0)),"function"==typeof e&&(cb(this,yf,e),this.addEventListener("change",e))}};gf=new WeakMap,Ef=new WeakMap,yf=new WeakMap,_f=new WeakSet,Af=function(){return vf(this).trackSet};var wf=class extends Event{constructor(e,t){super(e),ob(this,"rendition"),this.rendition=t.rendition}};function Tf(e){return[...vf(e).media.videoTracks].filter(e=>e.selected).flatMap(e=>[...vf(e).renditionSet])}var If,Sf,Cf,Rf=class extends EventTarget{constructor(){super(...arguments),ub(this,If,void 0),ub(this,Sf,void 0),ub(this,Cf,void 0)}[Symbol.iterator](){return Tf(this).values()}get length(){return Tf(this).length}getRenditionById(e){var t;return null!=(t=Tf(this).find(t=>`${t.id}`==`${e}`))?t:null}get selectedIndex(){return Tf(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,n]of Tf(this).entries())n.selected=t===e}get onaddrendition(){return db(this,If)}set onaddrendition(e){db(this,If)&&(this.removeEventListener("addrendition",db(this,If)),cb(this,If,void 0)),"function"==typeof e&&(cb(this,If,e),this.addEventListener("addrendition",e))}get onremoverendition(){return db(this,Sf)}set onremoverendition(e){db(this,Sf)&&(this.removeEventListener("removerendition",db(this,Sf)),cb(this,Sf,void 0)),"function"==typeof e&&(cb(this,Sf,e),this.addEventListener("removerendition",e))}get onchange(){return db(this,Cf)}set onchange(e){db(this,Cf)&&(this.removeEventListener("change",db(this,Cf)),cb(this,Cf,void 0)),"function"==typeof e&&(cb(this,Cf,e),this.addEventListener("change",e))}};If=new WeakMap,Sf=new WeakMap,Cf=new WeakMap;var Lf,xf=class{constructor(){ob(this,"src"),ob(this,"id"),ob(this,"width"),ob(this,"height"),ob(this,"bitrate"),ob(this,"frameRate"),ob(this,"codec"),ub(this,Lf,!1)}get selected(){return db(this,Lf)}set selected(e){db(this,Lf)!==e&&(cb(this,Lf,e),function(e){let t=vf(e).media.videoRenditions;!t||vf(t).changeRequested||(vf(t).changeRequested=!0,queueMicrotask(()=>{delete vf(t).changeRequested,vf(e).track.selected&&t.dispatchEvent(new Event("change"))}))}(this))}};Lf=new WeakMap;var Df,Mf=class{constructor(){ob(this,"id"),ob(this,"kind"),ob(this,"label",""),ob(this,"language",""),ob(this,"sourceBuffer"),ub(this,Df,!1)}addRendition(e,t,n,i,a,r){let s=new xf;return s.src=e,s.width=t,s.height=n,s.frameRate=r,s.bitrate=a,s.codec=i,function(e,t){let n=vf(e).media.videoRenditions;vf(t).media=vf(e).media,vf(t).track=e;let i=vf(e).renditionSet;i.add(t);let a=i.size-1;
2a in Rf.prototype||Object.defineProperty(Rf.prototype,a,{get(){return Tf(this)[a]}}),queueMicrotask(()=>{e.selected&&n.dispatchEvent(new wf("addrendition",{rendition:t}))})}(this,s),s}removeRendition(e){!function(e){let t=vf(e).media.videoRenditions,n=vf(e).track;vf(n).renditionSet.delete(e),queueMicrotask(()=>{vf(e).track.selected&&t.dispatchEvent(new wf("removerendition",{rendition:e}))})}(e)}get selected(){return db(this,Df)}set selected(e){db(this,Df)!==e&&(cb(this,Df,e),!0===e&&function(e){var t;let n=null!=(t=vf(e).media.videoTracks)?t:[],i=!1;for(let a of n)a!==e&&(a.selected=!1,i=!0);if(i){if(vf(n).changeRequested)return;vf(n).changeRequested=!0,queueMicrotask(()=>{delete vf(n).changeRequested,n.dispatchEvent(new Event("change"))})}}(this))}};function Nf(e){return[...vf(e).media.audioTracks].filter(e=>e.enabled).flatMap(e=>[...vf(e).renditionSet])}Df=new WeakMap;var Of,Pf,Uf,Wf=class extends EventTarget{constructor(){super(...arguments),ub(this,Of,void 0),ub(this,Pf,void 0),ub(this,Uf,void 0)}[Symbol.iterator](){return Nf(this).values()}get length(){return Nf(this).length}getRenditionById(e){var t;return null!=(t=Nf(this).find(t=>`${t.id}`==`${e}`))?t:null}get selectedIndex(){return Nf(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,n]of Nf(this).entries())n.selected=t===e}get onaddrendition(){return db(this,Of)}set onaddrendition(e){db(this,Of)&&(this.removeEventListener("addrendition",db(this,Of)),cb(this,Of,void 0)),"function"==typeof e&&(cb(this,Of,e),this.addEventListener("addrendition",e))}get onremoverendition(){return db(this,Pf)}set onremoverendition(e){db(this,Pf)&&(this.removeEventListener("removerendition",db(this,Pf)),cb(this,Pf,void 0)),"function"==typeof e&&(cb(this,Pf,e),this.addEventListener("removerendition",e))}get onchange(){return db(this,Uf)}set onchange(e){db(this,Uf)&&(this.removeEventListener("change",db(this,Uf)),cb(this,Uf,void 0)),"function"==typeof e&&(cb(this,Uf,e),this.addEventListener("change",e))}};Of=new WeakMap,Pf=new WeakMap,Uf=new WeakMap;var Bf,Hf=class{constructor(){ob(this,"src"),ob(this,"id"),ob(this,"bitrate"),ob(this,"codec"),ub(this,Bf,!1)}get selected(){return db(this,Bf)}set selected(e){db(this,Bf)!==e&&(cb(this,Bf,e),function(e){let t=vf(e).media.audioRenditions;!t||vf(t).changeRequested||(vf(t).changeRequested=!0,queueMicrotask(()=>{delete vf(t).changeRequested,vf(e).track.enabled&&t.dispatchEvent(new Event("change"))}))}(this))}};function qf(e,t){let n=e.audioTracks;vf(t).media=e,vf(t).renditionSet||(vf(t).renditionSet=new Set);let i=vf(n).trackSet;i.add(t);let a=i.size-1;a in Yf.prototype||Object.defineProperty(Yf.prototype,a,{get(){return[...vf(this).trackSet][a]}}),queueMicrotask(()=>{n.dispatchEvent(new mf("addtrack",{track:t}))})}function Vf(e){var t;let n=null==(t=vf(e).media)?void 0:t.audioTracks;n&&(vf(n).trackSet.delete(e),queueMicrotask(()=>{n.dispatchEvent(new mf("removetrack",{track:e}))}))}Bf=new WeakMap;var $f,Ff,Kf,jf,Gf,Yf=class extends EventTarget{constructor(){super(),ub(this,jf),ub(this,$f,void 0),ub(this,Ff,void 0),ub(this,Kf,void 0),vf(this).trackSet=new Set}[Symbol.iterator](){return db(this,jf,Gf).values()}get length(){return db(this,jf,Gf).size}getTrackById(e){var t;return null!=(t=[...db(this,jf,Gf)].find(t=>t.id===e))?t:null}get onaddtrack(){return db(this,$f)}set onaddtrack(e){db(this,$f)&&(this.removeEventListener("addtrack",db(this,$f)),cb(this,$f,void 0)),"function"==typeof e&&(cb(this,$f,e),this.addEventListener("addtrack",e))}get onremovetrack(){return db(this,Ff)}set onremovetrack(e){db(this,Ff)&&(this.removeEventListener("removetrack",db(this,Ff)),cb(this,Ff,void 0)),"function"==typeof e&&(cb(this,Ff,e),this.addEventListener("removetrack",e))}get onchange(){return db(this,Kf)}set onchange(e){db(this,Kf)&&(this.removeEventListener("change",db(this,Kf)),cb(this,Kf,void 0)),"function"==typeof e&&(cb(this,Kf,e),this.addEventListener("change",e))}};$f=new WeakMap,Ff=new WeakMap,Kf=new WeakMap,jf=new WeakSet,Gf=function(){return vf(this).trackSet};var Zf,Qf=class{constructor(){ob(this,"id"),ob(this,"kind"),ob(this,"label",""),ob(this,"language",""),ob(this,"sourceBuffer"),ub(this,Zf,!1)}addRendition(e,t,n){let i=new Hf;return i.src=e,i.codec=t,i.bitrate=n,function(e,t){let n=vf(e).media.audioRenditions;vf(t).media=vf(e).media,vf(t).track=e;let i=vf(e).renditionSet;i.add(t);let a=i.size-1;
2a in Wf.prototype||Object.defineProperty(Wf.prototype,a,{get(){return Nf(this)[a]}}),queueMicrotask(()=>{e.enabled&&n.dispatchEvent(new wf("addrendition",{rendition:t}))})}(this,i),i}removeRendition(e){!function(e){let t=vf(e).media.audioRenditions,n=vf(e).track;vf(n).renditionSet.delete(e),queueMicrotask(()=>{vf(e).track.enabled&&t.dispatchEvent(new wf("removerendition",{rendition:e}))})}(e)}get enabled(){return db(this,Zf)}set enabled(e){db(this,Zf)!==e&&(cb(this,Zf,e),function(e){let t=vf(e).media.audioTracks;!t||vf(t).changeRequested||(vf(t).changeRequested=!0,queueMicrotask(()=>{delete vf(t).changeRequested,t.dispatchEvent(new Event("change"))}))}(this))}};Zf=new WeakMap;var zf=eg(globalThis.HTMLMediaElement,"video"),Xf=eg(globalThis.HTMLMediaElement,"audio");function Jf(e){if(null==e||!e.prototype)return e;let t=eg(e,"video");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"videoTracks",{get(){return function(e){var t;let n=vf(e).videoTracks;if(!n&&(n=new kf,vf(e).videoTracks=n,zf)){let i=zf.call(null!=(t=e.nativeEl)?t:e);for(let t of i)bf(e,t);i.addEventListener("change",()=>{n.dispatchEvent(new Event("change"))}),i.addEventListener("addtrack",t=>{if([...n].some(e=>e instanceof Mf))for(let e of i)ff(e);else bf(e,t.track)}),i.addEventListener("removetrack",e=>{ff(e.track)})}return n}(this)}});let n=eg(e,"audio");(!n||`${n}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"audioTracks",{get(){return function(e){var t;let n=vf(e).audioTracks;
2if(!n&&(n=new Yf,vf(e).audioTracks=n,Xf)){let i=Xf.call(null!=(t=e.nativeEl)?t:e);for(let t of i)qf(e,t);i.addEventListener("change",()=>{n.dispatchEvent(new Event("change"))}),i.addEventListener("addtrack",t=>{if([...n].some(e=>e instanceof Qf))for(let e of i)Vf(e);else qf(e,t.track)}),i.addEventListener("removetrack",e=>{Vf(e.track)})}return n}(this)}}),"addVideoTrack"in e.prototype||(e.prototype.addVideoTrack=function(e,t="",n=""){let i=new Mf;return i.kind=e,i.label=t,i.language=n,bf(this,i),i}),"removeVideoTrack"in e.prototype||(e.prototype.removeVideoTrack=ff),"addAudioTrack"in e.prototype||(e.prototype.addAudioTrack=function(e,t="",n=""){let i=new Qf;return i.kind=e,i.label=t,i.language=n,qf(this,i),i}),"removeAudioTrack"in e.prototype||(e.prototype.removeAudioTrack=Vf),"videoRenditions"in e.prototype||Object.defineProperty(e.prototype,"videoRenditions",{get(){return i(this)}});let i=e=>{let t=vf(e).videoRenditions;return t||(t=new Rf,vf(t).media=e,vf(e).videoRenditions=t),t};"audioRenditions"in e.prototype||Object.defineProperty(e.prototype,"audioRenditions",{get(){return a(this)}});let a=e=>{let t=vf(e).audioRenditions;return t||(t=new Wf,vf(t).media=e,vf(e).audioRenditions=t),t};return e}function eg(e,t){var n;if(null!=e&&e.prototype)return null==(n=Object.getOwnPropertyDescriptor(e.prototype,`${t}Tracks`))?void 0:n.get}Ab.push("castchange","entercast","leavecast");var tg,ng,ig,ag,rg,sg,og,lg,dg,ug,cg={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DRM_TOKEN:"drm-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type"},hg=Object.values(cg),mg=_b,pg=class extends Rb{constructor(){super(),ub(this,dg),ub(this,tg,void 0),ub(this,ng,void 0),ub(this,ig,void 0),ub(this,ag,{}),ub(this,rg,void 0),ub(this,sg,void 0),ub(this,og,void 0),ub(this,lg,void 0),cb(this,ig,nn.utils.now())}static get observedAttributes(){var e;return[...hg,...null!=(e=Rb.observedAttributes)?e:[]]}get preferCmcd(){var e;return null!=(e=this.getAttribute(cg.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?mn.includes(e)?this.setAttribute(cg.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${mn.join()}`):this.removeAttribute(cg.PREFER_CMCD))}get playerInitTime(){return db(this,ig)}get playerSoftwareName(){var e;return null!=(e=db(this,og))?e:"mux-video"}set playerSoftwareName(e){cb(this,og,e)}get playerSoftwareVersion(){var e;return null!=(e=db(this,sg))?e:mg}set playerSoftwareVersion(e){cb(this,sg,e)}get _hls(){var e;return null==(e=db(this,tg))?void 0:e.engine}get mux(){var e;return null==(e=this.nativeEl)?void 0:e.mux}get error(){var e;return null!=(e=(e=>{var t;return null==(t=Gn.get(e))?void 0:t.error})(this.nativeEl))?e:null}get errorTranslator(){return db(this,lg)}set errorTranslator(e){cb(this,lg,e)}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(null==e?this.removeAttribute("src"):this.setAttribute("src",e))}get type(){var e;return null!=(e=this.getAttribute(cg.TYPE))?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(cg.TYPE,e):this.removeAttribute(cg.TYPE))}get autoplay(){let e=this.getAttribute("autoplay");return null!==e&&(""===e||e)}set autoplay(e){e!==this.autoplay&&(e?this.setAttribute("autoplay","string"==typeof e?e:""):this.removeAttribute("autoplay"))}get preload(){let e=this.getAttribute("preload");return""===e?"auto":["none","metadata","auto"].includes(e)?e:super.preload}set preload(e){e!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(e)?this.setAttribute("preload",e):this.removeAttribute("preload"))}get debug(){return null!=this.getAttribute(cg.DEBUG)}set debug(e){e!==this.debug&&(e?this.setAttribute(cg.DEBUG,""):this.removeAttribute(cg.DEBUG))}get disableTracking(){return this.hasAttribute(cg.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(cg.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(cg.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(cg.DISABLE_COOKIES,""):this.removeAttribute(cg.DISABLE_COOKIES))}get startTime(){let e=this.getAttribute(cg.START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set startTime(e){e!==this.startTime&&(null==e?this.removeAttribute(cg.START_TIME):this.setAttribute(cg.START_TIME,`${e}`))}get playbackId(){var e;return this.hasAttribute(cg.PLAYBACK_ID)?this.getAttribute(cg.PLAYBACK_ID):null!=(e=Jn(this.src))?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(cg.PLAYBACK_ID,e):this.removeAttribute(cg.PLAYBACK_ID))}get maxResolution(){var e;return null!=(e=this.getAttribute(cg.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(cg.MAX_RESOLUTION,e):this.removeAttribute(cg.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(cg.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(cg.MIN_RESOLUTION,e):this.removeAttribute(cg.MIN_RESOLUTION))}get renditionOrder(){var e;return null!=(e=this.getAttribute(cg.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(cg.RENDITION_ORDER,e):this.removeAttribute(cg.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(cg.PROGRAM_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programStartTime(e){null==e?this.removeAttribute(cg.PROGRAM_START_TIME):this.setAttribute(cg.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(cg.PROGRAM_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programEndTime(e){null==e?this.removeAttribute(cg.PROGRAM_END_TIME):this.setAttribute(cg.PROGRAM_END_TIME,`${e}`)}get customDomain(){var e;return null!=(e=this.getAttribute(cg.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(cg.CUSTOM_DOMAIN,e):this.removeAttribute(cg.CUSTOM_DOMAIN))}get drmToken(){var e;return null!=(e=this.getAttribute(cg.DRM_TOKEN))?e:void 0}
2set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(cg.DRM_TOKEN,e):this.removeAttribute(cg.DRM_TOKEN))}get ended(){return ai(this.nativeEl,this._hls)}get envKey(){var e;return null!=(e=this.getAttribute(cg.ENV_KEY))?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(cg.ENV_KEY,e):this.removeAttribute(cg.ENV_KEY))}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(cg.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(cg.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(cg.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return null!=(e=this.getAttribute(cg.STREAM_TYPE))?e:ei(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(cg.STREAM_TYPE,e):this.removeAttribute(cg.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(cg.TARGET_LIVE_WINDOW)?+this.getAttribute(cg.TARGET_LIVE_WINDOW):(e=>{var t,n;return null!=(n=null==(t=Gn.get(e))?void 0:t.targetLiveWindow)?n:Number.NaN})(this.nativeEl)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(null==e?this.removeAttribute(cg.TARGET_LIVE_WINDOW):this.setAttribute(cg.TARGET_LIVE_WINDOW,""+ +e))}get liveEdgeStart(){var e,t;if(this.hasAttribute(cg.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:n}=this,i=null!=(e=this.nativeEl.seekable.end(0))?e:0,a=null!=(t=this.nativeEl.seekable.start(0))?t:0;return Math.max(a,i-n)}return(e=>{var t;let n=null==(t=Gn.get(e))?void 0:t.liveEdgeStartOffset;if("number"!=typeof n)return Number.NaN;let i=ti(e);return i.length?i.end(i.length-1)-n:Number.NaN})(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(cg.LIVE_EDGE_OFFSET))return+this.getAttribute(cg.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.targetLiveWindow&&(null==e?this.removeAttribute(cg.LIVE_EDGE_OFFSET):this.setAttribute(cg.LIVE_EDGE_OFFSET,""+ +e))}get seekable(){return ti(this.nativeEl)}async addCuePoints(e){return xn(this.nativeEl,e)}get activeCuePoint(){return Mn(this.nativeEl)}get cuePoints(){return function(e,t={label:Rn}){let n=Sn(e,t.label,"metadata");return null!=n&&n.cues?Array.from(n.cues,e=>Dn(e)):[]}(this.nativeEl)}async addChapters(e){return Un(this.nativeEl,e)}get activeChapter(){return Wn(this.nativeEl)}get chapters(){return function(e,t={label:Nn}){var n;let i=Sn(e,t.label,"chapters");return null!=(n=null==i?void 0:i.cues)&&n.length?Array.from(i.cues,e=>Pn(e)):[]}(this.nativeEl)}getStartDate(){return function(e,t){if(t){let n=t.playingDate;if(null!=n)return new Date(n.getTime()-1e3*e.currentTime)}return"function"==typeof e.getStartDate?e.getStartDate():new Date(NaN)}(this.nativeEl,this._hls)}get currentPdt(){return function(e,t){if(t&&t.playingDate)return t.playingDate;if("function"==typeof e.getStartDate){let t=e.getStartDate();return new Date(t.getTime()+1e3*e.currentTime)}return new Date(NaN)}(this.nativeEl,this._hls)}get preferPlayback(){let e=this.getAttribute(cg.PREFER_PLAYBACK);if(e===un||e===cn)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===un||e===cn?this.setAttribute(cg.PREFER_PLAYBACK,e):this.removeAttribute(cg.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![cg.METADATA_URL].includes(e)).reduce((e,t)=>{let n=this.getAttribute(t);return null!=n&&(e[t.replace(/^metadata-/,"").replace(/-/g,"_")]=n),e},{}),...db(this,ag)}}set metadata(e){cb(this,ag,null!=e?e:{}),this.mux&&this.mux.emit("hb",db(this,ag))}get _hlsConfig(){return db(this,rg)}set _hlsConfig(e){cb(this,rg,e)}load(){cb(this,tg,ri(this,this.nativeEl,db(this,tg)))}unload(){si(this.nativeEl,db(this,tg)),cb(this,tg,void 0)}attributeChangedCallback(e,t,n){var i,a;switch(Rb.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,t,n),e){case cg.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=null!=n?n:void 0;break;case cg.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=null!=n?n:void 0;break;case"src":{let e=!!t,i=!!n;!e&&i?hb(this,dg,ug).call(this):e&&!i?this.unload():e&&i&&(this.unload(),hb(this,dg,ug).call(this));break}
2case"autoplay":if(n===t)break;null==(i=db(this,tg))||i.setAutoplay(this.autoplay);break;case"preload":if(n===t)break;null==(a=db(this,tg))||a.setPreload(n);break;case cg.PLAYBACK_ID:this.src=Xn(this);break;case cg.DEBUG:{let e=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=e);break}case cg.METADATA_URL:n&&fetch(n).then(e=>e.json()).then(e=>this.metadata=e).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${n}!`));break;case cg.STREAM_TYPE:(null==n||n!==t)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case cg.TARGET_LIVE_WINDOW:(null==n||n!==t)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}))}}connectedCallback(){var e;null==(e=super.connectedCallback)||e.call(this),this.nativeEl&&this.src&&!db(this,tg)&&hb(this,dg,ug).call(this)}disconnectedCallback(){this.unload()}};tg=new WeakMap,ng=new WeakMap,ig=new WeakMap,ag=new WeakMap,rg=new WeakMap,sg=new WeakMap,og=new WeakMap,lg=new WeakMap,dg=new WeakSet,ug=async function(){db(this,ng)||(await cb(this,ng,Promise.resolve()),cb(this,ng,null),this.load())};var vg=class extends(hf(Jf(pg))){};yb.customElements.get("mux-video")||(yb.customElements.define("mux-video",vg),yb.MuxVideoElement=vg);var bg,fg,gg,Eg,yg,_g,Ag,kg,wg,Tg,Ig,Sg=vg,Cg=Object.defineProperty,Rg=(e,t,n)=>(((e,t,n)=>{t in e?Cg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),Lg=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},xg=(e,t,n)=>(Lg(e,t,"read from private field"),n?n.call(e):t.get(e)),Dg=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Mg=(e,t,n,i)=>(Lg(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const Ng={processCallback(e,t,n){if(n)for(const[i,a]of t)if(i in n){const e=n[i];"boolean"==typeof e&&a instanceof Vg&&"boolean"==typeof a.element[a.attributeName]?a.booleanValue=e:"function"==typeof e&&a instanceof Vg?a.element[a.attributeName]=e:a.value=e}}};class Og extends na.DocumentFragment{constructor(e,t,n=Ng){var i;super(),Dg(this,bg,void 0),Dg(this,fg,void 0),this.append(e.content.cloneNode(!0)),Mg(this,bg,Pg(this)),Mg(this,fg,n),null==(i=n.createCallback)||i.call(n,this,xg(this,bg),t),n.processCallback(this,xg(this,bg),t)}update(e){xg(this,fg).processCallback(this,xg(this,bg),e)}}bg=new WeakMap,fg=new WeakMap;const Pg=(e,t=[])=>{let n,i;for(let a of e.attributes||[])if(a.value.includes("{{")){const r=new qg;for([n,i]of Wg(a.value))if(n){const n=new Vg(e,a.name,a.namespaceURI);r.append(n),t.push([i,n])}else r.append(i);a.value=r.toString()}for(let a of e.childNodes)if(1!==a.nodeType||a instanceof HTMLTemplateElement){if(1===a.nodeType||a.data.includes("{{")){const r=[];if(a.data)for([n,i]of Wg(a.data))if(n){const n=new $g(e);r.push(n),t.push([i,n])}else r.push(new Text(i));else if(a instanceof HTMLTemplateElement){const n=new Fg(e,a);r.push(n),t.push([n.expression,n])}a.replaceWith(...r.flatMap(e=>e.replacementNodes||[e]))}}else Pg(a,t);return t},Ug={},Wg=e=>{let t,n="",i=0,a=Ug[e],r=0;if(a)return a;for(a=[];t=e[r];r++)"{"===t&&"{"===e[r+1]&&"\\"!==e[r-1]&&e[r+2]&&1==++i?(n&&a.push([0,n]),n="",r++):"}"!==t||"}"!==e[r+1]||"\\"===e[r-1]||--i?n+=t||"":(a.push([1,n.trim()]),n="",r++);return n&&a.push([0,(i>0?"{{":"")+n]),Ug[e]=a};class Bg{get value(){return""}set value(e){}toString(){return this.value}}const Hg=new WeakMap;class qg{constructor(){Dg(this,gg,[])}[Symbol.iterator](){return xg(this,gg).values()}get length(){return xg(this,gg).length}item(e){return xg(this,gg)[e]}append(...e){for(const t of e)t instanceof Vg&&Hg.set(t,this),xg(this,gg).push(t)}toString(){return xg(this,gg).join("")}}gg=new WeakMap;class Vg extends Bg{constructor(e,t,n){super(),Dg(this,kg),Dg(this,Eg,""),Dg(this,yg,void 0),Dg(this,_g,void 0),Dg(this,Ag,void 0),Mg(this,yg,e),Mg(this,_g,t),Mg(this,Ag,n)}get attributeName(){return xg(this,_g)}get attributeNamespace(){return xg(this,Ag)}
2get element(){return xg(this,yg)}get value(){return xg(this,Eg)}set value(e){xg(this,Eg)!==e&&(Mg(this,Eg,e),xg(this,kg,wg)&&1!==xg(this,kg,wg).length?xg(this,yg).setAttributeNS(xg(this,Ag),xg(this,_g),xg(this,kg,wg)):null==e?xg(this,yg).removeAttributeNS(xg(this,Ag),xg(this,_g)):xg(this,yg).setAttributeNS(xg(this,Ag),xg(this,_g),e))}get booleanValue(){return xg(this,yg).hasAttributeNS(xg(this,Ag),xg(this,_g))}set booleanValue(e){if(xg(this,kg,wg)&&1!==xg(this,kg,wg).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}Eg=new WeakMap,yg=new WeakMap,_g=new WeakMap,Ag=new WeakMap,kg=new WeakSet,wg=function(){return Hg.get(this)};class $g extends Bg{constructor(e,t){super(),Dg(this,Tg,void 0),Dg(this,Ig,void 0),Mg(this,Tg,e),Mg(this,Ig,t?[...t]:[new Text])}get replacementNodes(){return xg(this,Ig)}get parentNode(){return xg(this,Tg)}get nextSibling(){return xg(this,Ig)[xg(this,Ig).length-1].nextSibling}get previousSibling(){return xg(this,Ig)[0].previousSibling}get value(){return xg(this,Ig).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){const t=e.flat().flatMap(e=>null==e?[new Text]:e.forEach?[...e]:11===e.nodeType?[...e.childNodes]:e.nodeType?[e]:[new Text(e)]);t.length||t.push(new Text),Mg(this,Ig,function(e,t,n,i=null){let a,r,s,o=0,l=n.length,d=t.length;for(;o<l&&o<d&&t[o]==n[o];)o++;for(;o<l&&o<d&&n[l-1]==t[d-1];)i=n[(--d,--l)];if(o==d)for(;o<l;)e.insertBefore(n[o++],i);if(o==l)for(;o<d;)e.removeChild(t[o++]);else{for(a=t[o];o<l;)s=n[o++],r=a?a.nextSibling:i,a==s?a=r:o<l&&n[o]==r?(e.replaceChild(s,a),a=r):e.insertBefore(s,a);for(;a!=i;)r=a.nextSibling,e.removeChild(a),a=r}return n}(xg(this,Ig)[0].parentNode,xg(this,Ig),t,this.nextSibling))}}Tg=new WeakMap,Ig=new WeakMap;class Fg extends $g{constructor(e,t){let n=t.getAttribute("directive")||t.getAttribute("type"),i=t.getAttribute("expression")||t.getAttribute(n)||"";i.startsWith("{{")&&(i=i.trim().slice(2,-2).trim()),super(e),Rg(this,"directive"),this.expression=i,this.template=t,this.directive=n}}const Kg={string:e=>String(e)};class jg{constructor(e){this.template=e,this.state=void 0}}const Gg=new WeakMap,Yg=new WeakMap,Zg={partial:(e,t)=>{t[e.expression]=new jg(e.template)},if:(e,t)=>{var n;if(Jg(e.expression,t))if(Gg.get(e)!==e.template){Gg.set(e,e.template);const n=new Og(e.template,t,zg);e.replace(n),Yg.set(e,n)}else null==(n=Yg.get(e))||n.update(t);else e.replace(""),Gg.delete(e),Yg.delete(e)}},Qg=Object.keys(Zg),zg={processCallback(e,t,n){var i,a;if(n)for(const[r,s]of t){if(s instanceof Fg){if(!s.directive){const e=Qg.find(e=>s.template.hasAttribute(e));e&&(s.directive=e,s.expression=s.template.getAttribute(e))}null==(i=Zg[s.directive])||i.call(Zg,s,n);continue}let e=Jg(r,n);e instanceof jg?Gg.get(s)!==e.template?(Gg.set(s,e.template),e=new Og(e.template,e.state,zg),s.value=e,Yg.set(s,e)):null==(a=Yg.get(s))||a.update(e.state):e?(s instanceof Vg&&s.attributeName.startsWith("aria-")&&(e=String(e)),s instanceof Vg?"boolean"==typeof e?s.booleanValue=e:"function"==typeof e?s.element[s.attributeName]=e:s.value=e:(s.value=e,Gg.delete(s),Yg.delete(s))):s instanceof Vg?s.value=void 0:(s.value=void 0,Gg.delete(s),Yg.delete(s))}}},Xg={"!":e=>!e,"!!":e=>!!e,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>
2e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"??":(e,t)=>null!=e?e:t,"|":(e,t)=>{var n;return null==(n=Kg[t])?void 0:n.call(Kg,e)}};function Jg(e,t={}){var n,i,a,r,s,o,l;const d=function(e){return function(e,t){let n,i,a,r=[];for(;e;){a=null,n=e.length;for(let r in t)i=t[r].exec(e),i&&i.index<n&&(a={token:i[0],type:r,matches:i.slice(1)},n=i.index);n&&r.push({token:e.substr(0,n),type:void 0}),a&&r.push(a),e=e.substr(n+(a?a.token.length:0))}return r}(e,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>"ws"!==e)}(e);if(0===d.length||d.some(({type:e})=>!e))return eE(e);if(">"===(null==(n=d[0])?void 0:n.token)){const n=t[null==(i=d[1])?void 0:i.token];if(!n)return eE(e);const o={...t};n.state=o;const l=d.slice(2);for(let e=0;e<l.length;e+=3){const n=null==(a=l[e])?void 0:a.token,i=null==(r=l[e+1])?void 0:r.token,d=null==(s=l[e+2])?void 0:s.token;n&&"="===i&&(o[n]=nE(d,t))}return n}if(1===d.length)return tE(d[0])?nE(d[0].token,t):eE(e);if(2===d.length){const n=null==(o=d[0])?void 0:o.token,i=Xg[n];if(!i||!tE(d[1]))return eE(e);return i(nE(d[1].token,t))}if(3===d.length){const n=null==(l=d[1])?void 0:l.token,i=Xg[n];if(!i||!tE(d[0])||!tE(d[2]))return eE(e);const a=nE(d[0].token,t);if("|"===n)return i(a,d[2].token);return i(a,nE(d[2].token,t))}}function eE(e){return console.warn(`Warning: invalid expression \`${e}\``),!1}function tE({type:e}){return["number","boolean","string","param"].includes(e)}function nE(e,t){const n=e[0],i=e.slice(-1);return"true"===e||"false"===e?"true"===e:n===i&&["'",'"'].includes(n)?e.slice(1,-1):Ki(e)?parseFloat(e):t[e]}var iE,aE,rE,sE,oE,lE,dE,uE=Object.defineProperty,cE=(e,t,n)=>(((e,t,n)=>{t in e?uE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),hE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},mE=(e,t,n)=>(hE(e,t,"read from private field"),n?n.call(e):t.get(e)),pE=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},vE=(e,t,n,i)=>(hE(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),bE=(e,t,n)=>(hE(e,t,"access private method"),n);const fE={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},gE=ia.createElement("template");
2gE.innerHTML="\n <style>\n :host {\n display: inline-block;\n line-height: 0;\n }\n\n media-controller {\n width: 100%;\n height: 100%;\n }\n\n media-controller:not([mediasubtitleslist]) media-captions-selectmenu,\n media-captions-button:not([mediasubtitleslist]),\n media-rendition-selectmenu[mediarenditionunavailable],\n media-audio-track-selectmenu[mediaaudiotrackunavailable],\n media-volume-range[mediavolumeunavailable],\n media-airplay-button[mediaairplayunavailable],\n media-fullscreen-button[mediafullscreenunavailable],\n media-cast-button[mediacastunavailable],\n media-pip-button[mediapipunavailable] {\n display: none;\n }\n </style>\n";class EE extends na.HTMLElement{constructor(){super(),pE(this,sE),pE(this,lE),cE(this,"renderRoot"),cE(this,"renderer"),pE(this,iE,void 0),pE(this,aE,void 0),pE(this,rE,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());const e=new MutationObserver(e=>{var t;this.mediaController&&!(null==(t=this.mediaController)?void 0:t.breakpointsComputed)||e.some(e=>{const t=e.target;return t===this||"media-controller"===t.localName&&(!!fE[e.attributeName]||!!e.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(Ti.BREAKPOINTS_COMPUTED,this.render),bE(this,sE,oE).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return null!=(e=mE(this,iE))?e:this.constructor.template}set template(e){vE(this,rE,null),vE(this,iE,e),this.createRenderer()}get props(){var e,t,n;const i=[...Array.from(null!=(t=null==(e=this.mediaController)?void 0:e.attributes)?t:[]).filter(({name:e})=>fE[e]||e.startsWith("breakpoint")),...Array.from(this.attributes)],a={};for(let r of i){const e=null!=(n=fE[r.name])?n:Fi(r.name);let{value:t}=r;null!=t?(Ki(t)&&(t=parseFloat(t)),a[e]=""===t||t):a[e]=!1}return a}
2attributeChangedCallback(e,t,n){"template"===e&&t!=n&&bE(this,lE,dE).call(this)}connectedCallback(){bE(this,lE,dE).call(this)}createRenderer(){this.template&&this.template!==mE(this,aE)&&(vE(this,aE,this.template),this.renderer=new Og(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(gE.content.cloneNode(!0),this.renderer))}render(){var e;null==(e=this.renderer)||e.update(this.props)}}iE=new WeakMap,aE=new WeakMap,rE=new WeakMap,sE=new WeakSet,oE=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){const t=this[e];delete this[e],this[e]=t}},lE=new WeakSet,dE=function(){var e;const t=this.getAttribute("template");if(!t||t===mE(this,rE))return;const n=this.getRootNode(),i=null==(e=null==n?void 0:n.getElementById)?void 0:e.call(n,t);if(i)return vE(this,rE,t),vE(this,iE,i),void this.createRenderer();(function(e){if(!/^(\/|\.\/|https?:\/\/)/.test(e))return!1;const t=/^https?:\/\//.test(e)?void 0:location.origin;try{new URL(e,t)}catch(n){return!1}return!0})(t)&&(vE(this,rE,t),async function(e){const t=await fetch(e);if(200!==t.status)throw new Error(`Failed to load resource: the server responded with a status of ${t.status}`);return t.text()}(t).then(e=>{const t=ia.createElement("template");t.innerHTML=e,vE(this,iE,t),this.createRenderer()}).catch(console.error))},cE(EE,"template"),cE(EE,"observedAttributes",["template"]),cE(EE,"processor",zg),na.customElements.get("media-theme")||na.customElements.define("media-theme",EE);var yE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},_E=(e,t,n)=>(yE(e,t,"read from private field"),n?n.call(e):t.get(e)),AE=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},kE=(e,t,n,i)=>(yE(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),wE=(e,t,n)=>(yE(e,t,"access private method"),n),TE=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends TE{}globalThis.DocumentFragment=e}var IE,SE=class extends TE{},CE={get(e){},define(e,t,n){},upgrade(e){},whenDefined(e){return Promise.resolve(SE)}};IE=new WeakMap;var RE={document:{createElement:function(e,t){return new SE}},DocumentFragment:DocumentFragment,customElements:CE,CustomEvent:class{constructor(e,t={}){AE(this,IE,void 0),kE(this,IE,null==t?void 0:t.detail)}get detail(){return _E(this,IE)}initCustomEvent(){}},EventTarget:TE,HTMLElement:SE,HTMLVideoElement:class extends TE{}},LE="undefined"==typeof window||void 0===globalThis.customElements,xE=LE?RE:globalThis,DE=LE?RE.document:globalThis.document,ME={code:"en"};function NE(e,t=!0){var n,i;let a=t&&null!=(i=null==(n=ME)?void 0:n[e])?i:e;return new OE(a,t?ME.code:"en")}var OE=class{constructor(e,t=(e=>null!=(e=ME.code)?e:"en")()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,n)=>{var i;return null!=(i=e[n])?i:""})}toString(){return this.message}};function PE(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function UE(e){return e.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function WE(e){if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}function BE(e){let t=function(e){let t={};for(let n in e)null!=e[n]&&(t[n]=e[n]);return new URLSearchParams(t)}(e).toString();return t?"?"+t:""}function HE(e){let t=(null!=e?e:"").split(".")[1];if(!t)return{};let n=t.replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(n).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}var qE=(e,t)=>!(!e||!t)&&(!!e.contains(t)||qE(e,t.getRootNode().host)),VE="mux.com",$E=(()=>{try{return"2.9.1"}catch{}return"UNKNOWN"})(),FE=()=>$E,KE=e=>{if(e){if([dn.LIVE,dn.ON_DEMAND].includes(e))return e;if(null!=e&&e.includes("live"))return dn.LIVE}},jE={crossorigin:"crossOrigin",playsinline:"playsInline"};function GE(e){var t;return null!=(t=jE[e])?t:UE(e)}var YE,ZE,QE,zE=class{constructor(e,t){AE(this,YE,void 0),AE(this,ZE,void 0),AE(this,QE,[]),kE(this,YE,e),kE(this,ZE,t)}[Symbol.iterator](){return _E(this,QE).values()}get length(){return _E(this,QE).length}get value(){var e;return null!=(e=_E(this,QE).join(" "))?e:""}set value(e){var t;e!==this.value&&(kE(this,QE,[]),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return _E(this,QE)[e]}values(){return _E(this,QE).values()}keys(){return _E(this,QE).keys()}
2forEach(e){_E(this,QE).forEach(e)}add(...e){var t,n;e.forEach(e=>{this.contains(e)||_E(this,QE).push(e)}),(""!==this.value||null!=(t=_E(this,YE))&&t.hasAttribute(`${_E(this,ZE)}`))&&(null==(n=_E(this,YE))||n.setAttribute(`${_E(this,ZE)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>{_E(this,QE).splice(_E(this,QE).indexOf(e),1)}),null==(t=_E(this,YE))||t.setAttribute(`${_E(this,ZE)}`,`${this.value}`)}contains(e){return _E(this,QE).includes(e)}toggle(e,t){return void 0!==t?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){this.remove(e),this.add(t)}};YE=new WeakMap,ZE=new WeakMap,QE=new WeakMap;var XE=`[mux-player ${FE()}]`;function JE(...e){console.warn(XE,...e)}function ey(...e){console.error(XE,...e)}function ty(e){var t;let n=null!=(t=e.message)?t:"";if(e.context&&(n+=` ${e.context}`),e.file){let t="https://github.com/muxinc/elements/blob/main/errors/";n+=` ${NE("Read more: ")}\n${t}${e.file}`}JE(n)}var ny,iy={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},ay={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},ry=Object.freeze({length:0,start(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),sy=Ab.filter(e=>"error"!==e),oy=Object.values(iy).filter(e=>![iy.PLAYSINLINE].includes(e)),ly=Object.values(ay),dy=class extends xE.HTMLElement{constructor(){super(),AE(this,ny,new WeakMap);new MutationObserver(e=>{for(let t of e)"childList"===t.type&&(t.removedNodes.forEach(e=>{var t;null==(t=_E(this,ny).get(e))||t.remove()}),t.addedNodes.forEach(e=>{var t;null!=e&&e.slot||null==(t=this.media)||t.append(cy(_E(this,ny),e))}))}).observe(this,{childList:!0,subtree:!0})}static get observedAttributes(){return[...oy,...ly]}init(){this.querySelectorAll(":scope > :not([slot])").forEach(e=>{var t;null==(t=this.media)||t.append(cy(_E(this,ny),e))}),sy.forEach(e=>{var t;null==(t=this.media)||t.addEventListener(e,e=>{this.dispatchEvent(new Event(e.type))})})}attributeChangedCallback(e,t,n){var i,a;switch(e){case ay.MUTED:return void(this.media&&(this.media.muted=null!=n,this.media.defaultMuted=null!=n));case ay.VOLUME:{let e=null!=(i=WE(n))?i:1;return void(this.media&&(this.media.volume=e))}case ay.PLAYBACKRATE:{let e=null!=(a=WE(n))?a:1;return void(this.media&&(this.media.playbackRate=e,this.media.defaultPlaybackRate=e))}}}play(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.play())?t:Promise.reject()}pause(){var e;null==(e=this.media)||e.pause()}load(){var e;null==(e=this.media)||e.load()}requestCast(e){var t;return null==(t=this.media)?void 0:t.requestCast(e)}get media(){var e;return null==(e=this.shadowRoot)?void 0:e.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var e,t;return null==(t=null==(e=this.media)?void 0:e.paused)||t}get duration(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.duration)?t:NaN}get ended(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.ended)&&t}get buffered(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.buffered)?t:ry}get seekable(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.seekable)?t:ry}get readyState(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.readyState)?t:0}get videoWidth(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.videoWidth)?t:0}get videoHeight(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.videoHeight)?t:0}get currentSrc(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.currentSrc)?t:""}get currentTime(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.currentTime)?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.volume)?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.playbackRate)?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return null!=(e=WE(this.getAttribute(ay.PLAYBACKRATE)))?e:1}set defaultPlaybackRate(e){null!=e?this.setAttribute(ay.PLAYBACKRATE,`${e}`):this.removeAttribute(ay.PLAYBACKRATE)}get crossOrigin(){return uy(this,iy.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(iy.CROSSORIGIN,`${e}`)}get autoplay(){return null!=uy(this,iy.AUTOPLAY)}set autoplay(e){e?this.setAttribute(iy.AUTOPLAY,"string"==typeof e?e:""):this.removeAttribute(iy.AUTOPLAY)}get loop(){return null!=uy(this,iy.LOOP)}set loop(e){e?this.setAttribute(iy.LOOP,""):this.removeAttribute(iy.LOOP)}get muted(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.muted)&&t}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return null!=uy(this,iy.MUTED)}set defaultMuted(e){e?this.setAttribute(iy.MUTED,""):this.removeAttribute(iy.MUTED)}
2get playsInline(){return null!=uy(this,iy.PLAYSINLINE)}set playsInline(e){ey("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(e){["","none","metadata","auto"].includes(e)?this.setAttribute(iy.PRELOAD,e):this.removeAttribute(iy.PRELOAD)}};function uy(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}function cy(e,t){let n=e.get(t);return n||(n=t.cloneNode(),e.set(t,n)),n}ny=new WeakMap;var hy=dy,my="\n :host {\n z-index: 100;\n display: var(--media-dialog-display, flex);\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n box-sizing: border-box;\n color: #fff;\n line-height: 18px;\n font-family: Arial, sans-serif;\n padding: var(--media-dialog-backdrop-padding, 0);\n background: var(--media-dialog-backdrop-background,\n linear-gradient(to bottom, rgba(20, 20, 30, 0.7) 50%, rgba(20, 20, 30, 0.9))\n );\n /* Needs to use !important to prevent overwrite of media-chrome */\n transition: var(--media-dialog-transition-open, visibility .2s, opacity .2s) !important;\n transform: var(--media-dialog-transform-open, none) !important;\n visibility: visible !important;\n opacity: 1 !important;\n pointer-events: auto !important;\n }\n\n :host(:not([open])) {\n /* Needs to use !important to prevent overwrite of media-chrome */\n transition: var(--media-dialog-transition-close, visibility .1s, opacity .1s) !important;\n transform: var(--media-dialog-transform-close, none) !important;\n visibility: hidden !important;\n opacity: 0 !important;\n pointer-events: none !important;\n }\n\n :focus-visible {\n box-shadow: 0 0 0 2px rgba(27, 127, 204, 0.9);\n }\n\n .dialog {\n position: relative;\n box-sizing: border-box;\n background: var(--media-dialog-background, none);\n padding: var(--media-dialog-padding, 10px);\n width: min(320px, 100%);\n word-wrap: break-word;\n max-height: 100%;\n overflow: auto;\n text-align: center;\n line-height: 1.4;\n }\n",py=DE.createElement("template");py.innerHTML=`\n <style>\n ${my}\n </style>\n\n <div class="dialog">\n <slot></slot>\n </div>\n`;var vy=class extends xE.HTMLElement{constructor(){var e;super(),this.attachShadow({mode:"open"}),null==(e=this.shadowRoot)||e.appendChild(this.constructor.template.content.cloneNode(!0))}show(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("open",{composed:!0,bubbles:!0})),by(this)}close(){var e;this.hasAttribute("open")&&(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),(e=this)._previouslyFocusedElement instanceof HTMLElement&&e._previouslyFocusedElement.focus())}attributeChangedCallback(e,t,n){"open"===e&&t!==n&&(null!=n?this.show():this.close())}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("open")&&by(this)}};function by(e){let t=new CustomEvent("initfocus",{composed:!0,bubbles:!0,cancelable:!0});if(e.dispatchEvent(t),t.defaultPrevented)return;let n=e.querySelector("[autofocus]:not([disabled])");!n&&e.tabIndex>=0&&(n=e),n||(n=fy(e.shadowRoot)),e._previouslyFocusedElement=DE.activeElement,DE.activeElement instanceof HTMLElement&&DE.activeElement.blur(),e.addEventListener("transitionend",()=>{n instanceof HTMLElement&&n.focus({preventScroll:!0})},{once:!0})}function fy(e){let t=["button","input","keygen","select","textarea"].map(function(e){return e+":not([disabled])"});t.push('[tabindex]:not([disabled]):not([tabindex=""])');let n=null==e?void 0:e.querySelector(t.join(", "));if(!n&&"attachShadow"in Element.prototype){let t=(null==e?void 0:e.querySelectorAll("*"))||[];for(let e=0;e<t.length&&!(t[e].tagName&&t[e].shadowRoot&&(n=fy(t[e].shadowRoot),n));e++);}return n}vy.styles=my,vy.template=py,vy.observedAttributes=["open"],xE.customElements.get("media-dialog")||(xE.customElements.define("media-dialog",vy),xE.MediaDialog=vy);var gy=vy,Ey=DE.createElement("template");Ey.innerHTML=`\n <style>\n ${gy.styles}\n\n .close {\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n width: 28px;\n height: 28px;\n position: absolute;\n top: 1rem;\n right: 1rem;\n }\n </style>\n\n <div class="dialog">\n <slot></slot>\n </div>\n\n <slot name="close">\n <button class="close" tabindex="0">\n <svg fill="none" viewBox="0 0 24 24" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />\n </svg>\n </button>\n </slot>\n`;var yy=class extends gy{constructor(){var e,t;super(),null==(t=null==(e=this.shadowRoot)?void 0:e.querySelector(".close"))||t.addEventListener("click",()=>{this.close()})}};yy.template=Ey,xE.customElements.get("mxp-dialog")||(xE.customElements.define("mxp-dialog",yy),xE.MxpDialog=yy);var _y=new WeakMap,Ay=class e{constructor(e,t){this.element=e,this.type=t,this.element.addEventListener(this.type,this);let n=_y.get(this.element);n&&n.set(this.type,this)}set(e){if("function"==typeof e)this.handleEvent=e.bind(this.element);else if("object"==typeof e&&"function"==typeof e.handleEvent)this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let e=_y.get(this.element);
2e&&e.delete(this.type)}}static for(t){_y.has(t.element)||_y.set(t.element,new Map);let n=t.attributeName.slice(2),i=_y.get(t.element);return i&&i.has(n)?i.get(n):new e(t.element,n)}};function ky(e,t){(function(e,t){if(e instanceof Vg&&t instanceof Element){let n=e.element;return n[e.attributeName]!==t&&(e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),n[e.attributeName]=t),!0}return!1})(e,t)||function(e,t){if("boolean"==typeof t&&e instanceof Vg){let n=e.attributeNamespace;return t!==e.element.hasAttributeNS(n,e.attributeName)&&(e.booleanValue=t),!0}return!1}(e,t)||function(e,t){return!!(e instanceof Vg&&e.attributeName.startsWith("on"))&&(Ay.for(e).set(t),e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),!0)}(e,t)||function(e,t){return!1===t&&e instanceof $g&&(e.replace(""),!0)}(e,t)||function(e,t){return t instanceof Sy&&e instanceof $g&&(t.renderInto(e),!0)}(e,t)||function(e,t){return t instanceof DocumentFragment&&e instanceof $g&&(t.childNodes.length&&e.replace(...t.childNodes),!0)}(e,t)||function(e,t){if(e instanceof Vg){let n=e.attributeNamespace,i=e.element.getAttributeNS(n,e.attributeName);return String(t)!==i&&(e.value=String(t)),!0}e.value=String(t)}(e,t)}var wy=new Map,Ty=new WeakMap,Iy=new WeakMap,Sy=class{constructor(e,t,n){this.strings=e,this.values=t,this.processor=n,this.stringsKey=this.strings.join("�")}get template(){if(wy.has(this.stringsKey))return wy.get(this.stringsKey);{let e=DE.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((e,n,i)=>e+n+(i<t?`{{ ${i} }}`:""),""),wy.set(this.stringsKey,e),e}}renderInto(e){var t;let n=this.template;if(Ty.get(e)!==n){Ty.set(e,n);let t=new Og(n,this.values,this.processor);return Iy.set(e,t),void(e instanceof $g?e.replace(...t.children):e.appendChild(t))}let i=Iy.get(e);null==(t=null==i?void 0:i.update)||t.call(i,this.values)}},Cy={processCallback(e,t,n){var i;if(n)for(let[a,r]of t)if(a in n){ky(r,null!=(i=n[a])?i:"")}}};function Ry(e,...t){return new Sy(e,t,Cy)}var Ly=Object.values({TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",DISPLAY:"display",CONTROL_BAR:"control-bar",SELECTMENU:"selectmenu",LISTBOX:"listbox",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"}).join(", "),xy=e=>{var t,n,i,a,r,s,o,l,d,u,c,h,m,p,v,b,f,g,E,y,_,A,k,w,T,I,S,C,R,L,x,D,M,N,O,P,U,W;return Ry` 3 <media-theme 4 template="${e.themeTemplate||!1}" 5 defaultstreamtype="${null!=(t=e.defaultStreamType)&&t}" 6 hotkeys="${(e=>{let t=e.hotKeys?`${e.hotKeys}`:"";return"live"===KE(e.streamType)&&(t+=" noarrowleft noarrowright"),t})(e)||!1}" 7 nohotkeys="${e.noHotKeys||!e.hasSrc||e.isDialogOpen||!1}" 8 noautoseektolive="${!(null==(n=e.streamType)||!n.includes(dn.LIVE))&&0!==e.targetLiveWindow}" 9 novolumepref="${e.novolumepref||!1}" 10 disabled="${!e.hasSrc||e.isDialogOpen}" 11 audio="${null!=(i=e.audio)&&i}" 12 style="${null!=(a=function(e){let t="";return Object.entries(e).forEach(([e,n])=>{null!=n&&(t+=`${PE(e)}: ${n}; `)}),t?t.trim():void 0}({"--media-primary-color":e.primaryColor,"--media-secondary-color":e.secondaryColor,"--media-accent-color":e.accentColor}))&&a}" 13 defaultsubtitles="${!e.defaultHiddenCaptions}" 14 forwardseekoffset="${null!=(r=e.forwardSeekOffset)&&r}" 15 backwardseekoffset="${null!=(s=e.backwardSeekOffset)&&s}" 16 playbackrates="${null!=(o=e.playbackRates)&&o}" 17 defaultshowremainingtime="${null!=(l=e.defaultShowRemainingTime)&&l}" 18 defaultduration="${null!=(d=e.defaultDuration)&&d}" 19 hideduration="${null!=(u=e.hideDuration)&&u}" 20 title="${null!=(c=e.title)&&c}" 21 exportparts="${Ly}" 22 > 23 <mux-video 24 slot="media" 25 target-live-window="${null!=(h=e.targetLiveWindow)&&h}" 26 stream-type="${null!=(m=KE(e.streamType))&&m}" 27 crossorigin="${null!=(p=e.crossOrigin)?p:""}" 28 playsinline 29 autoplay="${null!=(v=e.autoplay)&&v}" 30 muted="${null!=(b=e.muted)&&b}" 31 loop="${null!=(f=e.loop)&&f}" 32 preload="${null!=(g=e.preload)&&g}" 33 debug="${null!=(E=e.debug)&&E}" 34 prefer-cmcd="${null!=(y=e.preferCmcd)&&y}" 35 disable-tracking="${null!=(_=e.disableTracking)&&_}" 36 disable-cookies="${null!=(A=e.disableCookies)&&A}" 37 prefer-playback="${null!=(k=e.preferPlayback)&&k}" 38 start-time="${null!=e.startTime&&e.startTime}" 39 beacon-collection-domain="${null!=(w=e.beaconCollectionDomain)&&w}" 40 player-software-name="${null!=(T=e.playerSoftwareName)&&T}" 41 player-software-version="${null!=(I=e.playerSoftwareVersion)&&I}" 42 env-key="${null!=(S=e.envKey)&&S}" 43 custom-domain="${null!=(C=e.customDomain)&&C}" 44 src="${e.src?e.src:!!e.playbackId&&Xn(e)}" 45 cast-src="${e.src?e.src:!!e.playbackId&&Xn(e)}" 46 drm-token="${null!=(L=null==(R=e.tokens)?void 0:R.drm)&&L}" 47 exportparts="video" 48 > 49 ${e.storyboard?Ry`<track label="thumbnails" default kind="metadata" src="${e.storyboard}" />`:Ry``} 50 </mux-video> 51 <slot name="poster" slot="poster"> 52 <media-poster-image 53 part="poster" 54 exportparts="poster, img" 55 src="${""!==e.poster&&(null!=(x=e.poster)&&x)}" 56 placeholdersrc="${null!=(D=e.placeholder)&&D}" 57 ></media-poster-image> 58 </slot> 59 <mxp-dialog 60 no-auto-hide 61 open="${null!=(M=e.isDialogOpen)&&M}"
62 onclose="${e.onCloseErrorDialog}" 63 oninitfocus="${e.onInitFocusDialog}" 64 > 65 ${null!=(N=e.dialog)&&N.title?Ry`<h3>${e.dialog.title}</h3>`:Ry``} 66 <p> 67 ${null==(O=e.dialog)?void 0:O.message} 68 ${null!=(P=e.dialog)&&P.linkUrl?Ry`<a 69 href="${e.dialog.linkUrl}" 70 target="_blank" 71 rel="external noopener" 72 aria-label="${null!=(U=e.dialog.linkText)?U:""} ${NE("(opens in a new window)")}" 73 >${null!=(W=e.dialog.linkText)?W:e.dialog.linkUrl}</a 74 >`:Ry``} 75 </p> 76 </mxp-dialog> 77 </media-theme> 78`};function Dy(e,t,n,i,a){var r,s,o;let l={},d={};switch(e.code){case sn.MEDIA_ERR_NETWORK:switch(l.title=NE("Network Error",a),l.message=e.message,null==(r=e.data)?void 0:r.response.code){case 412:l.title=NE("Video is not currently available",a),l.message=NE("The live stream or video file are not yet ready.",a),d.message=NE("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",a),d.file="412-not-playable.md";break;case 404:l.title=NE("Video does not exist",a),l.message="",d.message=NE("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",a),d.file="404-not-found.md";break;case 403:{if(l.title=NE("Invalid playback URL",a),l.message=NE("The video URL or playback-token are formatted with incorrect or incomplete information.",a),d.message=NE("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",a),d.file="missing-signed-tokens.md",!i)break;let{exp:e,aud:t,sub:r}=HE(i),s=r!==n,o="v"!==t,u={timeStyle:"medium",dateStyle:"medium"};if(Date.now()>1e3*e){l.title=NE("Video URL has expired",a),l.message=NE("The video’s secured playback-token has expired.",a),d.message=NE("The video’s secured playback-token has expired.",a),d.context=NE("Expired at: {expiredDate}. Current time: {currentDate}.",a).format({expiredDate:new Intl.DateTimeFormat(ME.code,u).format(1e3*e),currentDate:new Intl.DateTimeFormat(ME.code,u).format(Date.now())}),d.file="403-expired-token.md";break}if(s){l.title=NE("Video URL is formatted incorrectly",a),l.message=NE("The video’s playback ID does not match the one encoded in the playback-token.",a),d.message=NE("The video’s playback ID does not match the one encoded in the playback-token.",a),d.context=NE("Specified playback ID: {playbackId} and the playback ID encoded in the playback-token: {tokenPlaybackId}",a).format({playbackId:n,tokenPlaybackId:r}),d.file="403-playback-id-mismatch.md";break}if(o){l.title=NE("Video URL is formatted incorrectly",a),l.message=NE("The playback-token is formatted with incorrect information.",a),d.message=NE("The playback-token is formatted with incorrect information.",a),d.context=NE("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",a).format({tokenType:t}),d.file="403-incorrect-aud-value.md";break}d.message=NE("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",a),d.file="403-malformatted-token.md";break}}break;case sn.MEDIA_ERR_DECODE:{let{message:t}=e;l={title:NE("Media Error",a),message:t},d.file="media-decode-error.md";break}case sn.MEDIA_ERR_SRC_NOT_SUPPORTED:{let r=null==(o=null==(s=e.data)?void 0:s.response)?void 0:o.code;if(r>=400&&r<500){e.code=sn.MEDIA_ERR_NETWORK,e.data={response:{code:r}},({dialog:l,devlog:d}=Dy(e,t,n,i));break}l={title:NE("Source Not Supported",a),message:e.message},d.file="media-src-not-supported.md";break}default:l={title:NE("Error",a),message:e.message}}return t&&(l={title:NE("Your device appears to be offline",a),message:NE("Check your internet connection and try reloading this video.",a)}),{dialog:l,devlog:d}}var My=DE.createElement("template");"innerHTML"in My&&(My.innerHTML='<template id="media-theme-gerwig">\n <style>\n @keyframes pre-play-hide {\n 0% {\n transform: scale(1);\n opacity: 1;\n }\n\n 30% {\n transform: scale(0.7);\n }\n\n 100% {\n transform: scale(1.5);\n opacity: 0;\n }\n }\n\n :host {\n --_primary-color: var(--media-primary-color, #fff);\n --_secondary-color: var(--media-secondary-color, transparent);\n --_accent-color: var(--media-accent-color, #fa50b5);\n --_text-color: var(--media-text-color, #000);\n\n --media-icon-color: var(--_primary-color);\n --media-control-background: var(--_secondary-color);\n --media-control-hover-background: var(--_accent-color);\n --media-time-buffered-color: rgba(255, 255, 255, 0.4);\n --media-preview-time-text-shadow: none;\n --media-control-height: 14px;\n --media-control-padding: 6px;\n\n color: var(--_primary-color);\n display: inline-block;\n width: 100%;\n height: 100%;\n }\n\n :host([audio]) {\n --_secondary-color: var(--media-secondary-color, black);\n --media-preview-time-text-shadow: none;\n }\n\n :host([audio]) ::slotted([slot=\'media\']) {\n height: 0px;\n }\n\n :host([audio]) media-loading-indicator {\n display: none;\n }\n\n :host([audio]) media-controller {\n background: transparent;\n }\n\n :host([audio]) media-controller::part(vertical-layer) {\n background: transparent;\n }\n\n :host([audio]) media-control-bar {\n width: 100%;\n background-color: var(--media-control-background);\n }\n\n /*\n * 0.433s is the transition duration for VTT Regions.\n * Borrowed here, so the captions don\'t move too fast.\n */\n media-controller {\n --media-webkit-text-track-transform: translateY(0) scale(0.98);\n --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s;\n }\n media-controller:is([mediapaused], :not([userinactive])) {\n --media-webkit-text-track-transform: translateY(-50px) scale(0.98);\n --media-webkit-text-track-transition: transform 0.15s ease;\n }\n\n /*\n * CSS specific to iOS devices.\n * See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757\n */\n @supports (-webkit-touch-callout: none) {\n /* Disable subtitle adjusting for iOS Safari */\n media-controller[mediaisfullscreen] {\n --media-webkit-text-track-transform: unset;\n --media-webkit-text-track-transition: unset;\n }\n }\n\n media-time-range {\n --media-box-padding-left: 6px;\n --media-box-padding-right: 6px;\n --media-range-bar-color: var(--_accent-color);\n --media-time-range-buffered-color: var(--_primary-color);\n --media-range-track-color: transparent;\n --media-range-track-background: rgba(255, 255, 255, 0.4);\n --media-range-thumb-background: radial-gradient(\n circle,\n #000 0%,\n #000 25%,\n var(--_accent-color) 25%,\n var(--_accent-color)\n );\n --media-range-thumb-width: 12px;\n --media-range-thumb-height: 12px;\n --media-range-thumb-transform: scale(0);\n --media-range-thumb-transition: transform 0.3s;\n --media-range-thumb-opacity: 1;\n --media-preview-background: var(--_primary-color);\n --media-box-arrow-background: var(--_primary-color);
78\n --media-preview-thumbnail-border: 5px solid var(--_primary-color);\n --media-preview-border-radius: 5px;\n --media-text-color: var(--_text-color);\n --media-control-hover-background: transparent;\n --media-preview-chapter-text-shadow: none;\n color: var(--_accent-color);\n padding: 0 6px;\n }\n\n :host([audio]) media-time-range {\n --media-preview-time-padding: 1.5px 6px;\n --media-preview-box-margin: 0 0 -5px;\n }\n\n media-time-range:hover {\n --media-range-thumb-transform: scale(1);\n }\n\n media-preview-thumbnail {\n border-bottom-width: 0;\n }\n\n [part~=\'listbox\'] {\n border-radius: 2px;\n border: 1px solid rgba(0, 0, 0, 0.1);\n bottom: calc(100% + 16px);\n padding: 2.5px 10px;\n }\n\n [part~=\'listbox\']::part(indicator) {\n fill: var(--_accent-color);\n }\n\n [part~=\'listbox\']::part(option) {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 6px 10px;\n min-height: 34px;\n }\n\n [part~=\'listbox\']::part(option-selected) {\n font-weight: 700;\n }\n\n media-captions-selectmenu,\n media-rendition-selectmenu,\n media-audio-track-selectmenu,\n media-playback-rate-listbox[part~=\'listbox\'] {\n --media-listbox-background: var(--_primary-color);\n --media-option-selected-background: transparent;\n --media-option-hover-background: transparent;\n --media-option-hover-outline: var(--_accent-color) solid 1px;\n --media-text-color: var(--_text-color);\n }\n\n /* The icon is a circle so make it 16px high instead of 14px for more balance. */\n media-audio-track-selectmenu {\n --media-control-padding: 5px;\n --media-control-height: 16px;\n }\n\n media-playback-rate-button {\n --media-control-padding: 6px 3px;\n min-width: 4.4ch;\n }\n\n media-playback-rate-listbox[part~=\'listbox\'] {\n --media-listbox-layout: row;\n --media-option-selected-background: var(--_accent-color);\n margin-right: 6px;\n padding: 0;\n }\n\n media-playback-rate-listbox[part~=\'listbox\']::part(option) {\n padding: 6px 4px;\n }\n\n media-playback-rate-listbox[part~=\'listbox\']::part(option-selected) {\n color: #fff;\n }\n\n :host(:not([audio])) media-time-range {\n /* Adding px is required here for calc() */\n --media-range-padding: 0px;\n background: transparent;\n z-index: 10;\n height: 10px;\n bottom: -3px;\n width: 100%;\n }\n\n media-control-bar :is([role=\'button\'], [role=\'switch\'], button) {\n line-height: 0;\n }\n\n media-control-bar :is([part*=\'button\'], [part*=\'range\'], [part*=\'display\']) {\n border-radius: 3px;\n }\n\n .spacer {\n flex-grow: 1;\n background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));\n }\n\n media-control-bar[slot~=\'top-chrome\'] {\n min-height: 42px;\n pointer-events: none;\n }\n\n media-control-bar {\n --gradient-steps: hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.013) 8.1%, hsl(0 0% 0% / 0.049) 15.5%,\n hsl(0 0% 0% / 0.104) 22.5%, hsl(0 0% 0% / 0.175) 29%, hsl(0 0% 0% / 0.259) 35.3%, hsl(0 0% 0% / 0.352) 41.2%,\n hsl(0 0% 0% / 0.45) 47.1%, hsl(0 0% 0% / 0.55) 52.9%, hsl(0 0% 0% / 0.648) 58.8%, hsl(0 0% 0% / 0.741) 64.7%,\n hsl(0 0% 0% / 0.825) 71%, hsl(0 0% 0% / 0.896) 77.5%, hsl(0 0% 0% / 0.951) 84.5%, hsl(0 0% 0% / 0.987) 91.9%,\n hsl(0 0% 0%) 100%;\n }\n\n :host([title]:not([audio])) media-control-bar[slot=\'top-chrome\']::before {\n content: \'\';\n position: absolute;\n width: 100%;\n padding-bottom: min(100px, 25%);\n background: linear-gradient(to top, var(--gradient-steps));\n opacity: 0.8;\n pointer-events: none;\n }\n\n :host(:not([audio])) media-control-bar[part~=\'bottom\']::before {\n content: \'\';\n position: absolute;\n width: 100%;\n bottom: 0;\n left: 0;\n padding-bottom: min(100px, 25%);\n background: linear-gradient(to bottom, var(--gradient-steps));\n opacity: 0.8;\n z-index: 1;\n pointer-events: none;\n }\n\n media-control-bar[part~=\'bottom\'] > * {\n z-index: 2;\n }\n\n media-control-bar[part~=\'bottom\'] {\n padding: 6px 6px;\n }\n\n media-control-bar[slot~=\'top-chrome\'] > * {\n --media-control-background: transparent;\n --media-control-hover-background: transparent;\n position: relative;\n }\n\n media-controller::part(vertical-layer) {\n transition: background-color 1s;\n }\n\n media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) {\n background-color: var(--controls-backdrop-color, var(--controls, transparent));\n transition: background-color 0.25s;\n }
78\n\n .center-controls {\n --media-button-icon-width: 100%;\n --media-button-icon-height: auto;\n pointer-events: none;\n width: 100%;\n display: flex;\n flex-flow: row;\n align-items: center;\n justify-content: center;\n filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));\n paint-order: stroke;\n stroke: rgba(102, 102, 102, 1);\n stroke-width: 0.3px;\n text-shadow:\n 0 0 2px rgb(0 0 0 / 0.25),\n 0 0 6px rgb(0 0 0 / 0.25);\n }\n\n .center-controls media-play-button {\n --media-control-background: transparent;\n --media-control-hover-background: transparent;\n --media-control-padding: 0;\n width: 40px;\n }\n\n [breakpointsm] .center-controls media-play-button {\n width: 90px;\n height: 90px;\n border-radius: 50%;\n transition: background 0.4s;\n padding: 24px;\n --media-control-background: #000;\n --media-control-hover-background: var(--_accent-color);\n }\n\n .center-controls media-seek-backward-button,\n .center-controls media-seek-forward-button {\n --media-control-background: transparent;\n --media-control-hover-background: transparent;\n padding: 0;\n margin: 0 20px;\n width: max(33px, min(8%, 40px));\n }\n\n [breakpointsm]:not([audio]) .center-controls.pre-playback {\n display: grid;\n align-items: initial;\n justify-content: initial;\n height: 100%;\n overflow: hidden;\n }\n\n [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button {\n place-self: var(--_pre-playback-place, center);\n grid-area: 1 / 1;\n margin: 16px;\n }\n\n /* Show and hide controls or pre-playback state */\n\n [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio])\n .center-controls.pre-playback\n media-play-button {\n /* Using `forwards` would lead to a laggy UI after the animation got in the end state */\n animation: 0.3s linear pre-play-hide;\n opacity: 0;\n pointer-events: none;\n }\n\n .autoplay-unmute {\n --media-control-hover-background: transparent;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));\n }\n\n .autoplay-unmute-btn {\n --media-control-height: 16px;\n border-radius: 8px;\n background: #000;\n color: var(--_primary-color);\n display: flex;\n align-items: center;\n padding: 8px 16px;\n font-size: 18px;\n font-weight: 500;\n cursor: pointer;\n }\n\n .autoplay-unmute-btn:hover {\n background: var(--_accent-color);\n }\n\n [breakpointsm] .autoplay-unmute-btn {\n --media-control-height: 30px;\n padding: 14px 24px;\n font-size: 26px;\n }\n\n .autoplay-unmute-btn svg {\n margin: 0 6px 0 0;\n }\n\n [breakpointsm] .autoplay-unmute-btn svg {\n margin: 0 10px 0 0;\n }\n\n media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) {\n display: none;\n }\n\n media-loading-indicator {\n --media-loading-icon-width: 100%;\n --media-button-icon-height: auto;\n display: var(--media-control-display, var(--media-loading-indicator-display, flex));\n pointer-events: none;\n position: absolute;\n width: min(15%, 150px);\n flex-flow: row;\n align-items: center;\n justify-content: center;\n }\n\n /* Intentionally don\'t target the div for transition but the children\n of the div. Prevents messing with media-chrome\'s autohide feature. */\n media-loading-indicator + div * {\n transition: opacity 0.15s;\n opacity: 1;\n }\n\n media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * {\n opacity: 0;\n transition-delay: 400ms;\n }\n\n media-volume-range {\n width: min(100%, 100px);\n --media-range-padding-left: 10px;\n --media-range-padding-right: 10px;\n --media-range-thumb-width: 12px;\n --media-range-thumb-height: 12px;\n --media-range-thumb-background: radial-gradient(\n circle,\n #000 0%,\n #000 25%,\n var(--_primary-color) 25%,\n var(--_primary-color)\n );\n --media-control-hover-background: none;\n }\n\n media-time-display {\n white-space: nowrap;\n }\n\n /* Generic style for explicitly disabled controls */\n media-control-bar[part~=\'bottom\'] [disabled],\n media-control-bar[part~=\'bottom\'] [aria-disabled=\'true\'] {\n opacity: 60%;
78\n cursor: not-allowed;\n }\n\n media-text-display {\n --media-font-size: 16px;\n --media-control-padding: 14px;\n font-weight: 500;\n }\n\n media-play-button.animated *:is(g, path) {\n transition: all 0.3s;\n }\n\n media-play-button.animated[mediapaused] .pause-icon-pt1 {\n opacity: 0;\n }\n\n media-play-button.animated[mediapaused] .pause-icon-pt2 {\n transform-origin: center center;\n transform: scaleY(0);\n }\n\n media-play-button.animated[mediapaused] .play-icon {\n clip-path: inset(0 0 0 0);\n }\n\n media-play-button.animated:not([mediapaused]) .play-icon {\n clip-path: inset(0 0 0 100%);\n }\n\n media-seek-forward-button,\n media-seek-backward-button {\n --media-font-weight: 400;\n }\n\n .mute-icon {\n display: inline-block;\n }\n\n .mute-icon :is(path, g) {\n transition: opacity 0.5s;\n }\n\n .muted {\n opacity: 0;\n }\n\n media-mute-button[mediavolumelevel=\'low\'] :is(.volume-medium, .volume-high),\n media-mute-button[mediavolumelevel=\'medium\'] :is(.volume-high) {\n opacity: 0;\n }\n\n media-mute-button[mediavolumelevel=\'off\'] .unmuted {\n opacity: 0;\n }\n\n media-mute-button[mediavolumelevel=\'off\'] .muted {\n opacity: 1;\n }\n\n /**\n * Our defaults for these buttons are to hide them at small sizes\n * users can override this with CSS\n */\n media-controller:not([breakpointsm]):not([audio]) {\n --bottom-play-button: none;\n --bottom-seek-backward-button: none;\n --bottom-seek-forward-button: none;\n --bottom-time-display: none;\n --bottom-playback-rate-selectmenu: none;\n --bottom-pip-button: none;\n }\n </style>\n\n <template partial="TitleDisplay">\n <template if="title">\n <media-text-display part="top title display" class="title-display">{{title}}</media-text-display>\n </template>\n </template>\n\n <template partial="PlayButton">\n <media-play-button\n part="{{section ?? \'bottom\'}} play button"\n disabled="{{disabled}}"\n aria-disabled="{{disabled}}"\n class="animated"\n >\n <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon">\n <g class="play-icon">\n <path\n d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"\n />\n </g>\n <g class="pause-icon">\n <path\n class="pause-icon-pt1"\n d="M5.90709 0H2.96889C2.46857 0 2.06299 0.405585 2.06299 0.9059V13.0941C2.06299 13.5944 2.46857 14 2.96889 14H5.90709C6.4074 14 6.81299 13.5944 6.81299 13.0941V0.9059C6.81299 0.405585 6.4074 0 5.90709 0Z"\n />\n <path\n class="pause-icon-pt2"\n d="M15.1571 0H12.2189C11.7186 0 11.313 0.405585 11.313 0.9059V13.0941C11.313 13.5944 11.7186 14 12.2189 14H15.1571C15.6574 14 16.063 13.5944 16.063 13.0941V0.9059C16.063 0.405585 15.6574 0 15.1571 0Z"\n />\n </g>\n </svg>\n </media-play-button>\n </template>\n\n <template partial="PrePlayButton">\n <media-play-button\n part="{{section ?? \'center\'}} play button pre-play"\n disabled="{{disabled}}"\n aria-disabled="{{disabled}}"\n >\n <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)">\n <path\n d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"\n />\n </svg>\n </media-play-button>\n </template>\n\n <template partial="SeekBackwardButton">\n <media-seek-backward-button\n seekoffset="{{backwardseekoffset}}"\n part="{{section ?? \'bottom\'}} seek-backward button"\n disabled="{{disabled}}"\n aria-disabled="{{disabled}}"\n >\n <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">\n <path\n d="M3.65 2.07888L0.0864 6.7279C-0.0288 6.87812 -0.0288 7.12188 0.0864 7.2721L3.65 11.9211C3.7792 12.0896 4 11.9703 4 11.7321V2.26787C4 2.02968 3.7792 1.9104 3.65 2.07888Z"\n />\n <text transform="translate(6 12)" style="font-size: 14px; font-family: \'ArialMT\', \'Arial\'">\n {{backwardseekoffset}}\n </text>\n </svg>\n </media-seek-backward-button>\n </template>\n\n <template partial="SeekForwardButton">\n <media-seek-forward-button\n seekoffset="{{forwardseekoffset}}"\n part="{{section ?? \'bottom\'}} seek-forward button"\n disabled="{{disabled}}"\n aria-disabled="{{disabled}}"\n >\n <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">\n <g>\n <text transform="translate(-1 12)" style="font-size: 14px; font-family: \'ArialMT\', \'Arial\'">\n {{forwardseekoffset}}\n </text>\n <path\n d="M18.35 11.9211L21.9136 7.2721C22.0288 7.12188 22.0288 6.87812 21.9136 6.7279L18.35 2.07888C18.2208
781.91041 18 2.02968 18 2.26787V11.7321C18 11.9703 18.2208 12.0896 18.35 11.9211Z"\n />\n </g>\n </svg>\n </media-seek-forward-button>\n </template>\n\n <template partial="MuteButton">\n <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true">\n <g class="unmuted">\n <path\n d="M6.76786 1.21233L3.98606 3.98924H1.19937C0.593146 3.98924 0.101743 4.51375 0.101743 5.1607V6.96412L0 6.99998L0.101743 7.03583V8.83926C0.101743 9.48633 0.593146 10.0108 1.19937 10.0108H3.98606L6.76773 12.7877C7.23561 13.2547 8 12.9007 8 12.2171V1.78301C8 1.09925 7.23574 0.745258 6.76786 1.21233Z"\n />\n <path\n class="volume-low"\n d="M10 3.54781C10.7452 4.55141 11.1393 5.74511 11.1393 6.99991C11.1393 8.25471 10.7453 9.44791 10 10.4515L10.7988 11.0496C11.6734 9.87201 12.1356 8.47161 12.1356 6.99991C12.1356 5.52821 11.6735 4.12731 10.7988 2.94971L10 3.54781Z"\n />\n <path\n class="volume-medium"\n d="M12.3778 2.40086C13.2709 3.76756 13.7428 5.35806 13.7428 7.00026C13.7428 8.64246 13.2709 10.233 12.3778 11.5992L13.2106 12.1484C14.2107 10.6185 14.739 8.83796 14.739 7.00016C14.739 5.16236 14.2107 3.38236 13.2106 1.85156L12.3778 2.40086Z"\n />\n <path\n class="volume-high"\n d="M15.5981 0.75L14.7478 1.2719C15.7937 2.9919 16.3468 4.9723 16.3468 7C16.3468 9.0277 15.7937 11.0082 14.7478 12.7281L15.5981 13.25C16.7398 11.3722 17.343 9.211 17.343 7C17.343 4.789 16.7398 2.6268 15.5981 0.75Z"\n />\n </g>\n <g class="muted">\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M4.39976 4.98924H1.19937C1.19429 4.98924 1.17777 4.98961 1.15296 5.01609C1.1271 5.04369 1.10174 5.09245 1.10174 5.1607V8.83926C1.10174 8.90761 1.12714 8.95641 1.15299 8.984C1.17779 9.01047 1.1943 9.01084 1.19937 9.01084H4.39977L7 11.6066V2.39357L4.39976 4.98924ZM7.47434 1.92006C7.4743 1.9201 7.47439 1.92002 7.47434 1.92006V1.92006ZM6.76773 12.7877L3.98606 10.0108H1.19937C0.593146 10.0108 0.101743 9.48633 0.101743 8.83926V7.03583L0 6.99998L0.101743 6.96412V5.1607C0.101743 4.51375 0.593146 3.98924 1.19937 3.98924H3.98606L6.76786 1.21233C7.23574 0.745258 8 1.09925 8 1.78301V12.2171C8 12.9007 7.23561 13.2547 6.76773 12.7877Z"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M15.2677 9.30323C15.463 9.49849 15.7796 9.49849 15.9749 9.30323C16.1701 9.10796 16.1701 8.79138 15.9749 8.59612L14.2071 6.82841L15.9749 5.06066C16.1702 4.8654 16.1702 4.54882 15.9749 4.35355C15.7796 4.15829 15.4631 4.15829 15.2678 4.35355L13.5 6.1213L11.7322 4.35348C11.537 4.15822 11.2204 4.15822 11.0251 4.35348C10.8298 4.54874 10.8298 4.86532 11.0251 5.06058L12.7929 6.82841L11.0251 8.59619C10.8299 8.79146 10.8299 9.10804 11.0251 9.3033C11.2204 9.49856 11.537 9.49856 11.7323 9.3033L13.5 7.53552L15.2677 9.30323Z"\n />\n </g>\n </svg>\n </media-mute-button>\n </template>\n\n <template partial="PipButton">\n <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">\n <path\n d="M15.9891 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.989C0 13.0996 0.9004 14 2.011 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0ZM17 11.9891C17 12.5465 16.5465 13 15.9891 13H2.011C1.4536 13 1.0001 12.5465 1.0001 11.9891V2.0109C1.0001 1.4535 1.4536 0.9999 2.011 0.9999H15.9891C16.5465 0.9999 17 1.4535 17 2.0109V11.9891Z"\n />\n <path\n d="M15.356 5.67822H8.19523C8.03253 5.67822 7.90063 5.81012 7.90063 5.97282V11.3836C7.90063 11.5463 8.03253 11.6782 8.19523 11.6782H15.356C15.5187 11.6782 15.6506 11.5463 15.6506 11.3836V5.97282C15.6506 5.81012 15.5187 5.67822 15.356 5.67822Z"\n />\n </svg>\n </media-pip-button>\n </template>\n\n <template partial="CaptionsMenuButton">\n <media-captions-selectmenu part="bottom captions selectmenu" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n <media-captions-button\n slot="button"\n part="bottom captions button"\n disabled="{{disabled}}"\n aria-disabled="{{disabled}}"\n >\n <svg aria-hidden="true" viewBox="0 0 18 14" slot="on">\n <path\n d="M15.989 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9004 14 2.011 14H15.989C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.989 0ZM4.2292 8.7639C4.5954 9.1902 5.0935 9.4031 5.7233 9.4031C6.1852 9.4031 6.5544 9.301 6.8302 9.0969C7.1061 8.8933 7.2863 8.614 7.3702 8.26H8.4322C8.3062 8.884 8.0093 9.3733 7.5411 9.7273C7.0733 10.0813 6.4703 10.2581 5.732 10.2581C5.108 10.2581 4.5699 10.1219 4.1168 9.8489C3.6637 9.5759 3.3141 9.1946 3.0685 8.7058C2.8224 8.2165 2.6994 7.6511 2.6994 7.009C2.6994 6.3611 2.8224 5.7927 3.0685 5.3034C3.3141 4.8146 3.6637 4.4323 4.1168 4.1559C4.5699 3.88 5.108 3.7418 5.732 3.7418C6.4703 3.7418 7.0733 3.922 7.5411 4.2818C8.0094 4.6422 8.3062 5.1461 8.4322 5.794H7.3702C7.2862 5.4283 7.106 5.1368 6.8302 4.921C6.5544 4.7052 6.1852 4.5968 5.7233 4.5968C5.0934 4.5968 4.5954 4.8116 4.2292 5.2404C3.8635 5.6696 3.6804 6.259 3.6804 7.
78009C3.6804 7.7531 3.8635 8.3381 4.2292 8.7639ZM11.0974 8.7639C11.4636 9.1902 11.9617 9.4031 12.5915 9.4031C13.0534 9.4031 13.4226 9.301 13.6984 9.0969C13.9743 8.8933 14.1545 8.614 14.2384 8.26H15.3004C15.1744 8.884 14.8775 9.3733 14.4093 9.7273C13.9415 10.0813 13.3385 10.2581 12.6002 10.2581C11.9762 10.2581 11.4381 10.1219 10.985 9.8489C10.5319 9.5759 10.1823 9.1946 9.9367 8.7058C9.6906 8.2165 9.5676 7.6511 9.5676 7.009C9.5676 6.3611 9.6906 5.7927 9.9367 5.3034C10.1823 4.8146 10.5319 4.4323 10.985 4.1559C11.4381 3.88 11.9762 3.7418 12.6002 3.7418C13.3385 3.7418 13.9415 3.922 14.4093 4.2818C14.8776 4.6422 15.1744 5.1461 15.3004 5.794H14.2384C14.1544 5.4283 13.9742 5.1368 13.6984 4.921C13.4226 4.7052 13.0534 4.5968 12.5915 4.5968C11.9616 4.5968 11.4636 4.8116 11.0974 5.2404C10.7317 5.6696 10.5486 6.259 10.5486 7.009C10.5486 7.7531 10.7317 8.3381 11.0974 8.7639Z"\n />\n </svg>\n <svg aria-hidden="true" viewBox="0 0 18 14" slot="off">\n <path\n d="M5.73219 10.258C5.10819 10.258 4.57009 10.1218 4.11699 9.8488C3.66389 9.5758 3.31429 9.1945 3.06869 8.7057C2.82259 8.2164 2.69958 7.651 2.69958 7.0089C2.69958 6.361 2.82259 5.7926 3.06869 5.3033C3.31429 4.8145 3.66389 4.4322 4.11699 4.1558C4.57009 3.8799 5.10819 3.7417 5.73219 3.7417C6.47049 3.7417 7.07348 3.9219 7.54128 4.2817C8.00958 4.6421 8.30638 5.146 8.43238 5.7939H7.37039C7.28639 5.4282 7.10618 5.1367 6.83039 4.9209C6.55459 4.7051 6.18538 4.5967 5.72348 4.5967C5.09358 4.5967 4.59559 4.8115 4.22939 5.2403C3.86369 5.6695 3.68058 6.2589 3.68058 7.0089C3.68058 7.753 3.86369 8.338 4.22939 8.7638C4.59559 9.1901 5.09368 9.403 5.72348 9.403C6.18538 9.403 6.55459 9.3009 6.83039 9.0968C7.10629 8.8932 7.28649 8.6139 7.37039 8.2599H8.43238C8.30638 8.8839 8.00948 9.3732 7.54128 9.7272C7.07348 10.0812 6.47049 10.258 5.73219 10.258Z"\n />\n <path\n d="M12.6003 10.258C11.9763 10.258 11.4382 10.1218 10.9851 9.8488C10.532 9.5758 10.1824 9.1945 9.93685 8.7057C9.69075 8.2164 9.56775 7.651 9.56775 7.0089C9.56775 6.361 9.69075 5.7926 9.93685 5.3033C10.1824 4.8145 10.532 4.4322 10.9851 4.1558C11.4382 3.8799 11.9763 3.7417 12.6003 3.7417C13.3386 3.7417 13.9416 3.9219 14.4094 4.2817C14.8777 4.6421 15.1745 5.146 15.3005 5.7939H14.2385C14.1545 5.4282 13.9743 5.1367 13.6985 4.9209C13.4227 4.7051 13.0535 4.5967 12.5916 4.5967C11.9617 4.5967 11.4637 4.8115 11.0975 5.2403C10.7318 5.6695 10.5487 6.2589 10.5487 7.0089C10.5487 7.753 10.7318 8.338 11.0975 8.7638C11.4637 9.1901 11.9618 9.403 12.5916 9.403C13.0535 9.403 13.4227 9.3009 13.6985 9.0968C13.9744 8.8932 14.1546 8.6139 14.2385 8.2599H15.3005C15.1745 8.8839 14.8776 9.3732 14.4094 9.7272C13.9416 10.0812 13.3386 10.258 12.6003 10.258Z"\n />\n <path\n d="M15.9891 1C16.5465 1 17 1.4535 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H2.0109C1.4535 13 1 12.5465 1 11.9891V2.0109C1 1.4535 1.4535 0.9999 2.0109 0.9999L15.9891 1ZM15.9891 0H2.0109C0.9003 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9003 14 2.0109 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0Z"\n />\n </svg>\n </media-captions-button>\n <media-captions-listbox slot="listbox" exportparts="option" part="bottom captions listbox">\n <div slot="select-indicator">\n <style>\n .listbox-indicator {\n position: relative;\n top: 1px;\n width: 0.9em;\n height: auto;\n fill: var(--_accent-color);\n }\n\n [aria-selected=\'false\'] .listbox-indicator {\n display: none;\n }\n </style>\n <svg viewBox="0 0 14 18" class="listbox-indicator">\n <path\n d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"\n fill-rule="evenodd"\n />\n </svg>\n </div>\n </media-captions-listbox>\n </media-captions-selectmenu>\n </template>\n\n <template partial="AirplayButton">\n <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">\n <path\n d="M16.1383 0H1.8618C0.8335 0 0 0.8335 0 1.8617V10.1382C0 11.1664 0.8335 12 1.8618 12H3.076C3.1204 11.9433 3.1503 11.8785 3.2012 11.826L4.004 11H1.8618C1.3866 11 1 10.6134 1 10.1382V1.8617C1 1.3865 1.3866 0.9999 1.8618 0.9999H16.1383C16.6135 0.9999 17.0001 1.3865 17.0001 1.8617V10.1382C17.0001 10.6134 16.6135 11 16.1383 11H13.9961L14.7989 11.826C14.8499 11.8785 14.8798 11.9432 14.9241 12H16.1383C17.1665 12 18.0001 11.1664 18.0001 10.1382V1.8617C18 0.8335 17.1665 0 16.1383 0Z"\n />\n <path\n d="M9.55061 8.21903C9.39981 8.06383 9.20001 7.98633 9.00011 7.98633C8.80021 7.98633 8.60031 8.06383 8.44951 8.21903L4.09771 12.697C3.62471 13.1838 3.96961 13.9998 4.64831 13.9998H13.3518C14.0304 13.9998 14.3754 13.1838 13.9023 12.697L9.55061 8.21903Z"\n />\n </svg>\n </media-airplay-button>\n </template>\n\n <template partial="FullscreenButton">\n <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">\n <path\n d="M1.00745 4.39539L1.01445 1.98789C1.01605 1.43049 1.47085 0.978289 2.02835 0.979989L6.39375 0.992589L6.39665 -0.007411L2.03125 -0.020011C0.920646 -0.023211 0.0176463 0.874489 0.0144463 1.98509L0.00744629 4.39539H1.00745Z"\n />\n <path\n d="M17.0144 2.03431L17.0076 4.39541H18.0076L18.0144 2.03721C18.0176 0.926712 17.1199 0.0237125 16.0093 0.0205125L11.6439 0.0078125L11.641 1.00781L16.0064 1.02041C16.5638 1.02201 17.016 1.47681 17.0144 2.03431Z"\n />\n <path\n d="M16.9925 9.60498L16.9855 12.0124C16.9839 12.5698 16.5291 13.022 15.9717 13.0204L11.6063 13.0078L11.6034 14.0078L15.9688 14.0204C17.0794 14.0236 17.9823 13.1259 17.9855 12.0153L1
787.9925 9.60498H16.9925Z"\n />\n <path\n d="M0.985626 11.9661L0.992426 9.60498H-0.0074737L-0.0142737 11.9632C-0.0174737 13.0738 0.880226 13.9767 1.99083 13.98L6.35623 13.9926L6.35913 12.9926L1.99373 12.98C1.43633 12.9784 0.983926 12.5236 0.985626 11.9661Z"\n />\n </svg>\n <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">\n <path\n d="M5.39655 -0.0200195L5.38955 2.38748C5.38795 2.94488 4.93315 3.39708 4.37565 3.39538L0.0103463 3.38278L0.00744629 4.38278L4.37285 4.39538C5.48345 4.39858 6.38635 3.50088 6.38965 2.39028L6.39665 -0.0200195H5.39655Z"\n />\n <path\n d="M12.6411 2.36891L12.6479 0.0078125H11.6479L11.6411 2.36601C11.6379 3.47651 12.5356 4.37951 13.6462 4.38271L18.0116 4.39531L18.0145 3.39531L13.6491 3.38271C13.0917 3.38111 12.6395 2.92641 12.6411 2.36891Z"\n />\n <path\n d="M12.6034 14.0204L12.6104 11.613C12.612 11.0556 13.0668 10.6034 13.6242 10.605L17.9896 10.6176L17.9925 9.61759L13.6271 9.60499C12.5165 9.60179 11.6136 10.4995 11.6104 11.6101L11.6034 14.0204H12.6034Z"\n />\n <path\n d="M5.359 11.6315L5.3522 13.9926H6.3522L6.359 11.6344C6.3622 10.5238 5.4645 9.62088 4.3539 9.61758L-0.0115043 9.60498L-0.0144043 10.605L4.351 10.6176C4.9084 10.6192 5.3607 11.074 5.359 11.6315Z"\n />\n </svg>\n </media-fullscreen-button>\n </template>\n\n <template partial="CastButton">\n <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">\n <path\n d="M16.0072 0H2.0291C0.9185 0 0.0181 0.9003 0.0181 2.011V5.5009C0.357 5.5016 0.6895 5.5275 1.0181 5.5669V2.011C1.0181 1.4536 1.4716 1 2.029 1H16.0072C16.5646 1 17.0181 1.4536 17.0181 2.011V11.9891C17.0181 12.5465 16.5646 13 16.0072 13H8.4358C8.4746 13.3286 8.4999 13.6611 8.4999 13.9999H16.0071C17.1177 13.9999 18.018 13.0996 18.018 11.989V2.011C18.0181 0.9003 17.1178 0 16.0072 0ZM0 6.4999V7.4999C3.584 7.4999 6.5 10.4159 6.5 13.9999H7.5C7.5 9.8642 4.1357 6.4999 0 6.4999ZM0 8.7499V9.7499C2.3433 9.7499 4.25 11.6566 4.25 13.9999H5.25C5.25 11.1049 2.895 8.7499 0 8.7499ZM0.0181 11V14H3.0181C3.0181 12.3431 1.675 11 0.0181 11Z"\n />\n </svg>\n <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">\n <path\n d="M15.9891 0H2.01103C0.900434 0 3.35947e-05 0.9003 3.35947e-05 2.011V5.5009C0.338934 5.5016 0.671434 5.5275 1.00003 5.5669V2.011C1.00003 1.4536 1.45353 1 2.01093 1H15.9891C16.5465 1 17 1.4536 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H8.41773C8.45653 13.3286 8.48183 13.6611 8.48183 13.9999H15.989C17.0996 13.9999 17.9999 13.0996 17.9999 11.989V2.011C18 0.9003 17.0997 0 15.9891 0ZM-0.0180664 6.4999V7.4999C3.56593 7.4999 6.48193 10.4159 6.48193 13.9999H7.48193C7.48193 9.8642 4.11763 6.4999 -0.0180664 6.4999ZM-0.0180664 8.7499V9.7499C2.32523 9.7499 4.23193 11.6566 4.23193 13.9999H5.23193C5.23193 11.1049 2.87693 8.7499 -0.0180664 8.7499ZM3.35947e-05 11V14H3.00003C3.00003 12.3431 1.65693 11 3.35947e-05 11Z"\n />\n <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" />\n </svg>\n </media-cast-button>\n </template>\n\n <template partial="LiveButton">\n <media-live-button part="{{section ?? \'top\'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
78\n <span slot="text">Live</span>\n </media-live-button>\n </template>\n\n <template partial="PlaybackRateSelect">\n <media-playback-rate-selectmenu\n part="bottom playback-rate selectmenu"\n disabled="{{disabled}}"\n aria-disabled="{{disabled}}"\n >\n <media-playback-rate-button slot="button" part="bottom playback-rate button"></media-playback-rate-button>\n <media-playback-rate-listbox\n slot="listbox"\n rates="{{playbackrates}}"\n exportparts="option"\n part="bottom playback-rate listbox"\n ></media-playback-rate-listbox>\n </media-playback-rate-selectmenu>\n </template>\n\n <template partial="VolumeRange">\n <media-volume-range\n part="bottom volume range"\n disabled="{{disabled}}"\n aria-disabled="{{disabled}}"\n ></media-volume-range>\n </template>\n\n <template partial="TimeDisplay">\n <media-time-display\n remaining="{{defaultshowremainingtime}}"\n showduration="{{!hideduration}}"\n part="bottom time display"\n disabled="{{disabled}}"\n aria-disabled="{{disabled}}"\n ></media-time-display>\n </template>\n\n <template partial="TimeRange">\n <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n <media-preview-thumbnail slot="preview"></media-preview-thumbnail>\n <media-preview-chapter-display slot="preview"></media-preview-chapter-display>\n <media-preview-time-display slot="preview"></media-preview-time-display>\n <div slot="preview" part="arrow"></div>\n </media-time-range>\n </template>\n\n <template partial="AudioTrackSelect">\n <media-audio-track-selectmenu\n part="bottom audio-track selectmenu"\n disabled="{{disabled}}"\n aria-disabled="{{disabled}}"\n >\n <media-audio-track-button slot="button" part="bottom audio-track button">\n <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16">\n <path d="M9 15A7 7 0 1 1 9 1a7 7 0 0 1 0 14Zm0 1A8 8 0 1 0 9 0a8 8 0 0 0 0 16Z" />\n <path\n d="M5.2 6.3a.5.5 0 0 1 .5.5v2.4a.5.5 0 1 1-1 0V6.8a.5.5 0 0 1 .5-.5Zm2.4-2.4a.5.5 0 0 1 .5.5v7.2a.5.5 0 0 1-1 0V4.4a.5.5 0 0 1 .5-.5ZM10 5.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.4-.8a.5.5 0 0 1 .5.5v5.6a.5.5 0 0 1-1 0V5.2a.5.5 0 0 1 .5-.5Z"\n />\n </svg>\n </media-audio-track-button>\n <media-audio-track-listbox slot="listbox" exportparts="option" part="bottom audio-track listbox">\n <div slot="select-indicator">\n <style>\n .listbox-indicator {\n position: relative;\n top: 1px;\n width: 0.9em;\n height: auto;\n fill: var(--_accent-color);\n }\n\n [aria-selected=\'false\'] .listbox-indicator {\n display: none;\n }\n </style>\n <svg viewBox="0 0 14 18" class="listbox-indicator">\n <path\n d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"\n fill-rule="evenodd"\n />\n </svg>\n </div>\n </media-audio-track-listbox>\n </media-audio-track-selectmenu>\n </template>\n\n <template partial="RenditionSelect">\n <media-rendition-selectmenu part="bottom rendition selectmenu" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n <media-rendition-button slot="button" part="bottom rendition button">\n <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14">\n <path\n d="M2.25 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM9 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6.75 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"\n />\n </svg>\n </media-rendition-button>\n <media-rendition-listbox slot="listbox" exportparts="option" part="bottom rendition listbox">\n <div slot="select-indicator">\n <style>\n .listbox-indicator {\n position: relative;\n top: 1px;\n width: 0.9em;\n height: auto;\n fill: var(--_accent-color);\n }\n\n [aria-selected=\'false\'] .listbox-indicator {\n display: none;\n }\n </style>\n <svg viewBox="0 0 14 18" class="listbox-indicator">\n <path\n d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"\n fill-rule="evenodd"\n />\n </svg>\n </div>\n </media-rendition-listbox>\n </media-rendition-selectmenu>\n </template>\n\n <media-controller\n part="controller"\n defaultstreamtype="{{defaultstreamtype ?? \'on-demand\'}}
78"\n breakpoints="sm:470"\n gesturesdisabled="{{disabled}}"\n hotkeys="{{hotkeys}}"\n nohotkeys="{{nohotkeys}}"\n novolumepref="{{novolumepref}}"\n audio="{{audio}}"\n noautoseektolive="{{noautoseektolive}}"\n defaultsubtitles="{{defaultsubtitles}}"\n defaultduration="{{defaultduration ?? false}}"\n keyboardforwardseekoffset="{{forwardseekoffset}}"\n keyboardbackwardseekoffset="{{backwardseekoffset}}"\n exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"\n style="--_pre-playback-place:{{preplaybackplace ?? \'center\'}}"\n >\n <slot name="media" slot="media"></slot>\n <slot name="poster" slot="poster"></slot>\n\n <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>\n\n <template if="!audio">\n \x3c!-- Pre-playback UI --\x3e\n <div slot="centered-chrome" class="center-controls pre-playback">\n <template if="streamtype == \'on-demand\'">\n <template if="!breakpointsm"> {{>SeekBackwardButton section="center"}} </template>\n <template if="!breakpointsm"> {{>PlayButton section="center"}} </template>\n <template if="breakpointsm"> {{>PrePlayButton section="center"}} </template>\n <template if="!breakpointsm"> {{>SeekForwardButton section="center"}} </template>\n </template>\n\n <template if="streamtype == \'live\'">\n <template if="!breakpointsm">\n <template if="targetlivewindow > 0"> {{>SeekBackwardButton section="center"}} </template>\n </template>\n <template if="!breakpointsm"> {{>PlayButton section="center"}} </template>\n <template if="breakpointsm"> {{>PrePlayButton section="center"}} </template>\n <template if="!breakpointsm">\n <template if="targetlivewindow > 0"> {{>SeekForwardButton section="center"}} </template>\n </template>\n </template>\n </div>\n\n \x3c!-- Auotplay centered unmute button --\x3e\n \x3c!--\n todo: figure out how show this with available state variables\n needs to show when:\n - autoplay is enabled\n - playback has been successful\n - audio is muted\n - in place / instead of the pre-plaback play button\n - not to show again after user has interacted with this button\n - OR user has interacted with the mute button in the control bar\n --\x3e\n \x3c!--\n There should be a >MuteButton to the left of the "Unmute" text, but a templating bug\n makes it appear even if commented out in the markup, add it back when code is un-commented\n --\x3e\n \x3c!-- <div slot="centered-chrome" class="autoplay-unmute">\n <div role="button" class="autoplay-unmute-btn">Unmute</div>\n </div> --\x3e\n\n <template if="streamtype == \'on-demand\'">\n <template if="breakpointsm">\n <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar>\n </template>\n {{>TimeRange}}\n <media-control-bar part="control-bar bottom">\n {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}}\n {{>VolumeRange}}\n <div class="spacer"></div>\n {{>RenditionSelect}} {{>PlaybackRateSelect}} {{>AudioTrackSelect}} {{>CaptionsMenuButton}} {{>AirplayButton}}\n {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}\n </media-control-bar>\n </template>\n\n <template if="streamtype == \'live\'">\n <media-control-bar part="control-bar top" slot="top-chrome">\n {{>LiveButton}}\n <template if="breakpointsm"> {{>TitleDisplay}} </template>\n </media-control-bar>\n <template if="targetlivewindow > 0">{{>TimeRange}}</template>\n <media-control-bar part="control-bar bottom">\n {{>PlayButton}}\n <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template>\n {{>MuteButton}} {{>VolumeRange}}\n <div class="spacer"></div>\n {{>RenditionSelect}} {{>AudioTrackSelect}} {{>CaptionsMenuButton}} {{>AirplayButton}} {{>CastButton}}\n {{>PipButton}} {{>FullscreenButton}}\n </media-control-bar>\n </template>\n </template>\n\n <template if="audio">\n <template if="streamtype == \'on-demand\'">\n <template if="title">\n <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>\n </template>\n <media-control-bar part="control-bar bottom">\n {{>PlayButton}}\n <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>\n {{>MuteButton}}\n <template if="breakpointsm">{{>VolumeRange}}</template>\n {{>TimeDisplay}} {{>TimeRange}}\n <template if="breakpointsm">{{>PlaybackRateSelect}}</template>\n {{>AirplayButton}} {{>CastButton}}\n </media-control-bar>\n </template>\n\n <template if="streamtype == \'live\'">\n <template if="title">\n <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>\n </template>\n <media-control-bar part="control-bar bottom">\n <template if="breakpointsm">\n {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}} {{>VolumeRange}}\n <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>\n </template>\n <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template>\n <template if="!targetlivewindow"><div class="spacer"></div></template>\n {{>AirplayButton}} {{>CastButton}}\n </media-control-bar>\n </template>\n </template>\n\n <slot></slot>\n </media-controller>\n</template>\n');
78var Ny,Oy,Py=class extends EE{};Py.template=null==(Oy=null==(Ny=My.content)?void 0:Ny.children)?void 0:Oy[0],xE.customElements.get("media-theme-gerwig")||xE.customElements.define("media-theme-gerwig",Py);var Uy={SRC:"src",POSTER:"poster"},Wy={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref"},By=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function Hy(e){var t,n;let i=e.theme;if(i){let a=null==(n=null==(t=e.getRootNode())?void 0:t.getElementById)?void 0:n.call(t,i);if(a&&a instanceof HTMLTemplateElement)return a;i.startsWith("media-theme-")||(i=`media-theme-${i}`);let r=xE.customElements.get(i);if(null!=r&&r.template)return r.template}}function qy(e){var t;let n=null==(t=e.mediaController)?void 0:t.querySelector("media-time-display");return n&&"none"===getComputedStyle(n).getPropertyValue("--media-duration-display-display").trim()}function Vy(e){let t=e.hasAttribute(Wy.TITLE)?{video_title:e.getAttribute(Wy.TITLE)}:{};return e.getAttributeNames().filter(e=>e.startsWith("metadata-")).reduce((t,n)=>{let i=e.getAttribute(n);return null!==i&&(t[n.replace(/^metadata-/,"").replace(/-/g,"_")]=i),t},t)}var $y,Fy,Ky,jy,Gy,Yy,Zy,Qy,zy,Xy,Jy,e_,t_,n_,i_,a_,r_,s_,o_,l_,d_,u_=Object.values(cg),c_=Object.values(Uy),h_=Object.values(Wy),m_=FE(),p_={dialog:void 0,isDialogOpen:!1},v_={redundant_streams:!0},b_=class extends hy{constructor(){super(),AE(this,Yy),AE(this,Qy),AE(this,Xy),AE(this,e_),AE(this,n_),AE(this,a_),AE(this,s_),AE(this,l_),AE(this,$y,!1),AE(this,Fy,{}),AE(this,Ky,!0),AE(this,jy,new zE(this,"hotkeys")),AE(this,Gy,{...p_,onCloseErrorDialog:()=>wE(this,Xy,Jy).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:e=>{qE(this,DE.activeElement)||e.preventDefault()}}),this.attachShadow({mode:"open"}),wE(this,Qy,zy).call(this),this.isConnected&&wE(this,Yy,Zy).call(this)}static get observedAttributes(){var e;return[...null!=(e=hy.observedAttributes)?e:[],...c_,...u_,...h_]}get mediaTheme(){var e;return null==(e=this.shadowRoot)?void 0:e.querySelector("media-theme")}get mediaController(){var e,t;return null==(t=null==(e=this.mediaTheme)?void 0:e.shadowRoot)?void 0:t.querySelector("media-controller")}connectedCallback(){var e;let t=null==(e=this.shadowRoot)?void 0:e.querySelector("mux-video");t&&(t.metadata=Vy(this))}attributeChangedCallback(e,t,n){switch(wE(this,Yy,Zy).call(this),super.attributeChangedCallback(e,t,n),e){case Wy.HOTKEYS:_E(this,jy).value=n;break;case Wy.THUMBNAIL_TIME:null!=n&&this.tokens.thumbnail&&JE(NE("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break;case Wy.THUMBNAIL_TOKEN:{let{aud:e}=HE(n);n&&"t"!==e&&JE(NE("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:e}));break}case Wy.STORYBOARD_TOKEN:{let{aud:e}=HE(n);n&&"s"!==e&&JE(NE("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:e}));break}case cg.PLAYBACK_ID:null!=n&&n.includes("?token")&&ey(NE("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:n}));break;case cg.STREAM_TYPE:n&&![dn.LIVE,dn.ON_DEMAND,dn.UNKNOWN].includes(n)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=n.includes("dvr")?Number.POSITIVE_INFINITY:0:ty({file:"invalid-stream-type.md",message:NE("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):n===dn.LIVE?null==this.getAttribute(Wy.TARGET_LIVE_WINDOW)&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN}[cg.PLAYBACK_ID,Uy.SRC,Wy.PLAYBACK_TOKEN].includes(e)&&t!==n&&kE(this,Gy,{..._E(this,Gy),...p_}),wE(this,e_,t_).call(this,{[GE(e)]:n})}get preferCmcd(){var e;return null!=(e=this.getAttribute(cg.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?mn.includes(e)?this.setAttribute(cg.PREFER_CMCD,e):JE(`Invalid value for preferCmcd. Must be one of ${mn.join()}`):this.removeAttribute(cg.PREFER_CMCD))}get hasPlayed(){var e,t;return null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(wi.MEDIA_HAS_P
78LAYED))&&t}get inLiveWindow(){var e;return null==(e=this.mediaController)?void 0:e.hasAttribute(wi.MEDIA_TIME_IS_LIVE)}get _hls(){var e;return null==(e=this.media)?void 0:e._hls}get mux(){var e;return null==(e=this.media)?void 0:e.mux}get theme(){var e;return null!=(e=this.getAttribute(Wy.THEME))?e:"gerwig"}set theme(e){this.setAttribute(Wy.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let n of e.getAttributeNames()){if(By.includes(n))continue;let i=e.getAttribute(n);t[UE(n)]=""===i||i}return t}set themeProps(e){var t,n;wE(this,Yy,Zy).call(this);let i={...this.themeProps,...e};for(let a in i){if(By.includes(a))continue;let i=null==e?void 0:e[a];"boolean"==typeof i||null==i?null==(t=this.mediaTheme)||t.toggleAttribute(PE(a),!!i):null==(n=this.mediaTheme)||n.setAttribute(PE(a),i)}}get playbackId(){var e;return null!=(e=this.getAttribute(cg.PLAYBACK_ID))?e:void 0}set playbackId(e){e?this.setAttribute(cg.PLAYBACK_ID,e):this.removeAttribute(cg.PLAYBACK_ID)}get src(){var e,t;return this.playbackId?null!=(e=f_(this,Uy.SRC))?e:void 0:null!=(t=this.getAttribute(Uy.SRC))?t:void 0}set src(e){e?this.setAttribute(Uy.SRC,e):this.removeAttribute(Uy.SRC)}get poster(){var e;let t=this.getAttribute(Uy.POSTER);return null!=t?t:this.playbackId&&!this.audio?((e,{token:t,customDomain:n=VE,thumbnailTime:i,programTime:a}={})=>{let r=null==t?i:void 0,{aud:s}=HE(t);if(!t||"t"===s)return`https://image.${n}/${e}/thumbnail.webp${BE({token:t,time:r,program_time:a})}`})(this.playbackId,{customDomain:this.customDomain,thumbnailTime:null!=(e=this.thumbnailTime)?e:this.startTime,programTime:this.programStartTime,token:this.tokens.thumbnail}):void 0}set poster(e){e||""===e?this.setAttribute(Uy.POSTER,e):this.removeAttribute(Uy.POSTER)}get storyboardSrc(){var e;return null!=(e=this.getAttribute(Wy.STORYBOARD_SRC))?e:void 0}set storyboardSrc(e){e?this.setAttribute(Wy.STORYBOARD_SRC,e):this.removeAttribute(Wy.STORYBOARD_SRC)}get storyboard(){return this.storyboardSrc&&!this.tokens.storyboard?this.storyboardSrc:!this.audio&&this.playbackId&&this.streamType&&![dn.LIVE,dn.UNKNOWN].includes(this.streamType)?((e,{token:t,customDomain:n=VE,programStartTime:i,programEndTime:a}={})=>{let{aud:r}=HE(t);if(!t||"s"===r)return`https://image.${n}/${e}/storyboard.vtt${BE({token:t,format:"webp",program_start_time:i,program_end_time:a})}`})(this.playbackId,{customDomain:this.customDomain,token:this.tokens.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime}):void 0}get audio(){return this.hasAttribute(Wy.AUDIO)}set audio(e){e?this.setAttribute(Wy.AUDIO,""):this.removeAttribute(Wy.AUDIO)}get hotkeys(){return _E(this,jy)}get nohotkeys(){return this.hasAttribute(Wy.NOHOTKEYS)}set nohotkeys(e){e?this.setAttribute(Wy.NOHOTKEYS,""):this.removeAttribute(Wy.NOHOTKEYS)}get thumbnailTime(){return WE(this.getAttribute(Wy.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(Wy.THUMBNAIL_TIME,`${e}`)}get title(){var e;return null!=(e=this.getAttribute(Wy.TITLE))?e:""}set title(e){e!==this.title&&(e?this.setAttribute(Wy.TITLE,e):this.removeAttribute("title"),super.title=e)}get placeholder(){var e;return null!=(e=f_(this,Wy.PLACEHOLDER))?e:""}set placeholder(e){this.setAttribute(Wy.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let n=this.getAttribute(Wy.PRIMARY_COLOR);if(null!=n||this.mediaTheme&&(n=null==(t=null==(e=xE.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_primary-color"))?void 0:t.trim(),n))return n}set primaryColor(e){this.setAttribute(Wy.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let n=this.getAttribute(Wy.SECONDARY_COLOR);if(null!=n||this.mediaTheme&&(n=null==(t=null==(e=xE.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_secondary-color"))?void 0:t.trim(),n))return n}set secondaryColor(e){this.setAttribute(Wy.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let n=this.getAttribute(Wy.ACCENT_COLOR);if(null!=n||this.mediaTheme&&(n=null==(t=null==(e=xE.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_accent-color"))?void 0:t.trim(),n))return n}set accentColor(e){this.setAttribute(Wy.ACCENT_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute(Wy.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute(Wy.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(Wy.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(Wy.PLAYBACK_RATES))return this.getAttribute(Wy.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(e=>Number(e)).filter(e=>!Number.isNaN(e)).sort((e,t)=>
78e-t)}set playbackRates(e){e?this.setAttribute(Wy.PLAYBACK_RATES,e.join(" ")):this.removeAttribute(Wy.PLAYBACK_RATES)}get forwardSeekOffset(){var e;return null!=(e=WE(this.getAttribute(Wy.FORWARD_SEEK_OFFSET)))?e:10}set forwardSeekOffset(e){this.setAttribute(Wy.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return null!=(e=WE(this.getAttribute(Wy.BACKWARD_SEEK_OFFSET)))?e:10}set backwardSeekOffset(e){this.setAttribute(Wy.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(Wy.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute(Wy.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(Wy.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return WE(this.getAttribute(Wy.DEFAULT_DURATION))}set defaultDuration(e){null==e?this.removeAttribute(Wy.DEFAULT_DURATION):this.setAttribute(Wy.DEFAULT_DURATION,`${e}`)}get playerSoftwareName(){var e;return null!=(e=this.getAttribute(cg.PLAYER_SOFTWARE_NAME))?e:"mux-player"}get playerSoftwareVersion(){var e;return null!=(e=this.getAttribute(cg.PLAYER_SOFTWARE_VERSION))?e:m_}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(cg.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(cg.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(cg.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var e;return null!=(e=this.getAttribute(cg.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(cg.MAX_RESOLUTION,e):this.removeAttribute(cg.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(cg.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(cg.MIN_RESOLUTION,e):this.removeAttribute(cg.MIN_RESOLUTION))}get renditionOrder(){var e;return null!=(e=this.getAttribute(cg.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(cg.RENDITION_ORDER,e):this.removeAttribute(cg.RENDITION_ORDER))}get programStartTime(){return WE(this.getAttribute(cg.PROGRAM_START_TIME))}set programStartTime(e){null==e?this.removeAttribute(cg.PROGRAM_START_TIME):this.setAttribute(cg.PROGRAM_START_TIME,`${e}`)}get programEndTime(){return WE(this.getAttribute(cg.PROGRAM_END_TIME))}set programEndTime(e){null==e?this.removeAttribute(cg.PROGRAM_END_TIME):this.setAttribute(cg.PROGRAM_END_TIME,`${e}`)}get extraSourceParams(){return this.hasAttribute(Wy.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(Wy.EXTRA_SOURCE_PARAMS)).entries()].reduce((e,[t,n])=>(e[t]=n,e),{}):v_}set extraSourceParams(e){null==e?this.removeAttribute(Wy.EXTRA_SOURCE_PARAMS):this.setAttribute(Wy.EXTRA_SOURCE_PARAMS,new URLSearchParams(e).toString())}get customDomain(){var e;return null!=(e=this.getAttribute(cg.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(cg.CUSTOM_DOMAIN,e):this.removeAttribute(cg.CUSTOM_DOMAIN))}get envKey(){var e;return null!=(e=f_(this,cg.ENV_KEY))?e:void 0}set envKey(e){this.setAttribute(cg.ENV_KEY,`${e}`)}get noVolumePref(){return this.hasAttribute(Wy.NO_VOLUME_PREF)}set noVolumePref(e){e?this.setAttribute(Wy.NO_VOLUME_PREF,""):this.removeAttribute(Wy.NO_VOLUME_PREF)}get debug(){return null!=f_(this,cg.DEBUG)}set debug(e){e?this.setAttribute(cg.DEBUG,""):this.removeAttribute(cg.DEBUG)}get disableTracking(){return null!=f_(this,cg.DISABLE_TRACKING)}set disableTracking(e){this.toggleAttribute(cg.DISABLE_TRACKING,!!e)}get disableCookies(){return null!=f_(this,cg.DISABLE_COOKIES)}set disableCookies(e){e?this.setAttribute(cg.DISABLE_COOKIES,""):this.removeAttribute(cg.DISABLE_COOKIES)}get streamType(){var e,t,n;return null!=(n=null!=(t=this.getAttribute(cg.STREAM_TYPE))?t:null==(e=this.media)?void 0:e.streamType)?n:dn.UNKNOWN}set streamType(e){this.setAttribute(cg.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,n;return null!=(n=null!=(t=this.getAttribute(Wy.DEFAULT_STREAM_TYPE))?t:null==(e=this.mediaController)?void 0:e.getAttribute(Wy.DEFAULT_STREAM_TYPE))?n:dn.ON_DEMAND}set defaultStreamType(e){e?this.setAttribute(Wy.DEFAULT_STREAM_TYPE,e):this.removeAttribute(Wy.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var e,t;return this.hasAttribute(Wy.TARGET_LIVE_WINDOW)?+this.getAttribute(Wy.TARGET_LIVE_WINDOW):null!=(t=null==(e=this.media)?void 0:e.targetLiveWindow)?t:Number.NaN}set targetLiveWindow(e){e==this.targetLiveWindow||Number.isNaN(e)&&Number.isNaN(this.targetLiveWindow)||(null==e?this.removeAttribute(Wy.TARGET_LIVE_WINDOW):this.setAttribute(Wy.TARGET_LIVE_WINDOW,""+ +e))}get liveEdgeStart(){var e;return null==(e=this.media)?void 0:e.liveEdgeStart}get startTime(){return WE(f_(this,cg.START_TIME))}set startTime(e){this.setAttribute(cg.START_TIME,`${e}`)}get preferPlayback(){let e=this.getAttribute(cg.PREFER_PLAYBACK);if(e===un||e===cn)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===un||e===cn?this.setAttribute(cg.PREFER_PLAYBACK,e):this.removeAttribute(cg.PREFER_PLAYBACK))}get metadata(){var e;return null==(e=this.media)?void 0:e.metadata}set metadata(e){wE(this,Yy,Zy).call(this),this.media?this.media.metadata={...Vy(this),...e}:ey("underlying media element missing when trying to set metadata. metadata will not be set.")}
78get _hlsConfig(){var e;return null==(e=this.media)?void 0:e._hlsConfig}set _hlsConfig(e){wE(this,Yy,Zy).call(this),this.media?this.media._hlsConfig=e:ey("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.")}async addCuePoints(e){var t;if(wE(this,Yy,Zy).call(this),this.media)return null==(t=this.media)?void 0:t.addCuePoints(e);ey("underlying media element missing when trying to addCuePoints. cuePoints will not be added.")}get activeCuePoint(){var e;return null==(e=this.media)?void 0:e.activeCuePoint}get cuePoints(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.cuePoints)?t:[]}addChapters(e){var t;if(wE(this,Yy,Zy).call(this),this.media)return null==(t=this.media)?void 0:t.addChapters(e);ey("underlying media element missing when trying to addChapters. chapters will not be added.")}get activeChapter(){var e;return null==(e=this.media)?void 0:e.activeChapter}get chapters(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.chapters)?t:[]}getStartDate(){var e;return null==(e=this.media)?void 0:e.getStartDate()}get currentPdt(){var e;return null==(e=this.media)?void 0:e.currentPdt}get tokens(){let e=this.getAttribute(Wy.PLAYBACK_TOKEN),t=this.getAttribute(Wy.DRM_TOKEN),n=this.getAttribute(Wy.THUMBNAIL_TOKEN),i=this.getAttribute(Wy.STORYBOARD_TOKEN);return{..._E(this,Fy),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{},...null!=n?{thumbnail:n}:{},...null!=i?{storyboard:i}:{}}}set tokens(e){kE(this,Fy,null!=e?e:{})}get playbackToken(){var e;return null!=(e=this.getAttribute(Wy.PLAYBACK_TOKEN))?e:void 0}set playbackToken(e){this.setAttribute(Wy.PLAYBACK_TOKEN,`${e}`)}get drmToken(){var e;return null!=(e=this.getAttribute(Wy.DRM_TOKEN))?e:void 0}set drmToken(e){this.setAttribute(Wy.DRM_TOKEN,`${e}`)}get thumbnailToken(){var e;return null!=(e=this.getAttribute(Wy.THUMBNAIL_TOKEN))?e:void 0}set thumbnailToken(e){this.setAttribute(Wy.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return null!=(e=this.getAttribute(Wy.STORYBOARD_TOKEN))?e:void 0}set storyboardToken(e){this.setAttribute(Wy.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,t,n,i){var a;let r=null==(a=this.media)?void 0:a.nativeEl;if(r)return In(r,e,t,n,i)}removeTextTrack(e){var t;let n=null==(t=this.media)?void 0:t.nativeEl;if(n)return function(e,t){let n=Array.prototype.find.call(e.querySelectorAll("track"),e=>e.track===t);null==n||n.remove()}(n,e)}get textTracks(){var e;return null==(e=this.media)?void 0:e.textTracks}};function f_(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}$y=new WeakMap,Fy=new WeakMap,Ky=new WeakMap,jy=new WeakMap,Gy=new WeakMap,Yy=new WeakSet,Zy=function(){var e,t,n,i;if(!_E(this,$y)){kE(this,$y,!0),wE(this,e_,t_).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof xE.HTMLElement))throw""}catch{ey("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof Sg))throw""}catch{ey("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof Ws))throw""}catch{ey("<media-controller> failed to upgrade!")}this.init(),wE(this,n_,i_).call(this),wE(this,a_,r_).call(this),wE(this,s_,o_).call(this),kE(this,Ky,null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(za.USER_INACTIVE))||t),wE(this,l_,d_).call(this),null==(n=this.media)||n.addEventListener("streamtypechange",()=>wE(this,e_,t_).call(this)),null==(i=this.media)||i.addEventListener("loadstart",()=>wE(this,e_,t_).call(this))}},Qy=new WeakSet,zy=function(){var e,t;try{null==(e=null==window?void 0:window.CSS)||e.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),null==(t=null==window?void 0:window.CSS)||t.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},Xy=new WeakSet,Jy=function(e){Object.assign(_E(this,Gy),e),wE(this,e_,t_).call(this)},e_=new WeakSet,t_=function(e={}){var t;!function(e,t){e.renderInto(t)}((t=function(e,t){var n;return{src:!e.playbackId&&e.src,playbackId:e.playbackId,hasSrc:!!e.playbackId||!!e.src||!!e.currentSrc,poster:e.poster,storyboard:e.storyboard,storyboardSrc:e.getAttribute(Wy.STORYBOARD_SRC),placeholder:e.getAttribute("placeholder"),themeTemplate:Hy(e),thumbnailTime:!e.tokens.thumbnail&&e.thumbnailTime,autoplay:e.autoplay,crossOrigin:e.crossOrigin,loop:e.loop,noHotKeys:e.hasAttribute(Wy.NOHOTKEYS),hotKeys:e.getAttribute(Wy.HOTKEYS),muted:e.muted,paused:e.paused,preload:e.preload,envKey:e.envKey,preferCmcd:e.preferCmcd,debug:e.debug,disableTracking:e.disableTracking,disableCookies:e.disableCookies,tokens:e.tokens,beaconCollectionDomain:e.beaconCollectionDomain,maxResolution:e.maxResolution,minResolution:e.minResolution,programStartTime:e.programStartTime,programEndTime:e.programEndTime,renditionOrder:e.renditionOrder,metadata:e.metadata,playerSoftwareName:e.playerSoftwareName,playerSoftwareVersion:e.playerSoftwareVersion,startTime:e.startTime,preferPlayback:e.preferPlayback,audio:e.audio,defaultStreamType:e.defaultStreamType,targetLiveWindow:e.getAttribute(cg.TARGET_LIVE_WINDOW),streamType:KE(e.getAttribute(cg.STREAM_TYPE)),primaryColor:e.getAttribute(Wy.PRIMARY_COLOR),secondaryColor:e.getAttribute(Wy.SECONDARY_COLOR),accentColor:e.getAttribute(Wy.ACCENT_COLOR),forwardSeekOffset:e.forwardSeekOffset,backwardSeekOffset:e.backwardSeekOffset,defaultHiddenCaptions:e.defaultHiddenCaptions,defaultDuration:e.defaultDuration,defaultShowRemainingTime:e.defaultShowRemainingTime,hideDuration:qy(e),playbackRates:e.getAttribute(Wy.PLAYBACK_RATES),customDomain:null!=(n=e.getAttribute(cg.CUSTOM_DOMAIN))?n:void 0,title:e.getAttribute(Wy.TITLE),novolumepref:e.hasAttribute(Wy.NO_VOLUME_PREF),...t,extraSourceParams:e.extraSourceParams}}(this,{..._E(this,Gy),...e}),Ry` 79 <style> 80 ${(e=>{let{tokens:t}=e;return t.drm?":host { --_cast-button-drm-display: none; }":""})(t)} 81 ${":host {\n --media-control-display: var(--controls);\n --media-loading-indicator-display: var(--loading-indicator);\n --media-dialog-display: var(--dialog);\n --media-play-button-display: var(--play-button);\n --media-live-button-display: var(--live-button);\n --media-seek-backward-button-display: var(--seek-backward-button);\n --media-seek-forward-button-display: var(--seek-forward-button);\n --media-mute-button-display: var(--mute-button);\n --media-captions-button-display: var(--captions-button);\n --media-captions-selectmenu-display: var(--captions-selectmenu, var(--media-captions-button-display));\n --media-rendition-selectmenu-display: var(--rendition-selectmenu);\n --media-audio-track-selectmenu-display: var(--audio-track-selectmenu);\n --media-airplay-button-display: var(--airplay-button);\n --media-pip-button-display: var(--pip-button);\n --media-fullscreen-button-display: var(--fullscreen-button);\n --media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display));\n --media-playback-rate-button-display: var(--playback-rate-button);\n --media-playback-rate-selectmenu-display: var(--playback-rate-selectmenu);\n --media-volume-range-display: var(--volume-range);\n --media-time-range-display: var(--time-range);\n --media-time-display-display: var(--time-display);\n --media-duration-display-display: var(--duration-display);\n --media-title-display-display: var(--title-display);\n\n display: inline-block;\n width: 100%;\n line-height: 0;\n}\n\n/* Hide custom elements that are not defined yet */\n:not(:defined) {\n display: none;\n}\n\na {\n color: #fff;\n font-size: 0.9em;\n text-decoration: underline;\n}\n\nmedia-theme {\n width: 100%;\n height: 100%;\n direction: ltr;\n}\n\nmedia-poster-image {\n width: 100%;\n height: 100%;\n}\n\nmedia-poster-image:not([src]):not([placeholdersrc]) {\n display: none;\n}
81\n\n::part(top),\n[part~='top'] {\n --media-control-display: var(--controls, var(--top-controls));\n --media-play-button-display: var(--play-button, var(--top-play-button));\n --media-live-button-display: var(--live-button, var(--top-live-button));\n --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button));\n --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button));\n --media-mute-button-display: var(--mute-button, var(--top-mute-button));\n --media-captions-button-display: var(--captions-button, var(--top-captions-button));\n --media-captions-selectmenu-display: var(\n --captions-selectmenu,\n var(--media-captions-button-display, var(--top-captions-selectmenu))\n );\n --media-rendition-selectmenu-display: var(--rendition-selectmenu, var(--top-rendition-selectmenu));\n --media-audio-track-selectmenu-display: var(--audio-track-selectmenu, var(--top-audio-track-selectmenu));\n --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button));\n --media-pip-button-display: var(--pip-button, var(--top-pip-button));\n --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button));\n --media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display)));\n --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button));\n --media-playback-rate-selectmenu-display: var(\n --captions-selectmenu,\n var(--media-playback-rate-button-display, var(--top-playback-rate-selectmenu))\n );\n --media-volume-range-display: var(--volume-range, var(--top-volume-range));\n --media-time-range-display: var(--time-range, var(--top-time-range));\n --media-time-display-display: var(--time-display, var(--top-time-display));\n --media-duration-display-display: var(--duration-display, var(--top-duration-display));\n --media-title-display-display: var(--title-display, var(--top-title-display));\n}\n\n::part(center),\n[part~='center'] {\n --media-control-display: var(--controls, var(--center-controls));\n --media-play-button-display: var(--play-button, var(--center-play-button));\n --media-live-button-display: var(--live-button, var(--center-live-button));\n --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button));\n --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button));\n --media-mute-button-display: var(--mute-button, var(--center-mute-button));\n --media-captions-button-display: var(--captions-button, var(--center-captions-button));\n --media-captions-selectmenu-display: var(\n --captions-selectmenu,\n var(--media-captions-button-display, var(--center-captions-selectmenu))\n );\n --media-rendition-selectmenu-display: var(--rendition-selectmenu, var(--center-rendition-selectmenu));\n --media-audio-track-selectmenu-display: var(--audio-track-selectmenu, var(--center-audio-track-selectmenu));\n --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button));\n --media-pip-button-display: var(--pip-button, var(--center-pip-button));\n --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button));\n --media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display)));\n --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button));\n --media-playback-rate-selectmenu-display: var(\n --playback-rate-selectmenu,\n var(--media-playback-rate-button-display, var(--center-playback-rate-selectmenu))\n );\n --media-volume-range-display: var(--volume-range, var(--center-volume-range));\n --media-time-range-display: var(--time-range, var(--center-time-range));\n --media-time-display-display: var(--time-display, var(--center-time-display));\n --media-duration-display-display: var(--duration-display, var(--center-duration-display));\n}\n\n::part(bottom),\n[part~='bottom'] {\n --media-control-display: var(--controls, var(--bottom-control
81s));\n --media-play-button-display: var(--play-button, var(--bottom-play-button));\n --media-live-button-display: var(--live-button, var(--bottom-live-button));\n --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button));\n --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button));\n --media-mute-button-display: var(--mute-button, var(--bottom-mute-button));\n --media-captions-button-display: var(--captions-button, var(--bottom-captions-button));\n --media-captions-selectmenu-display: var(\n --captions-selectmenu,\n var(--media-captions-button-display, var(--bottom-captions-selectmenu))\n );\n --media-rendition-selectmenu-display: var(--rendition-selectmenu, var(--bottom-rendition-selectmenu));\n --media-audio-track-selectmenu-display: var(--audio-track-selectmenu, var(--bottom-audio-track-selectmenu));\n --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button));\n --media-pip-button-display: var(--pip-button, var(--bottom-pip-button));\n --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button));\n --media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display)));\n --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button));\n --media-playback-rate-selectmenu-display: var(\n --playback-rate-selectmenu,\n var(--media-playback-rate-button-display, var(--bottom-playback-rate-selectmenu))\n );\n --media-volume-range-display: var(--volume-range, var(--bottom-volume-range));\n --media-time-range-display: var(--time-range, var(--bottom-time-range));\n --media-time-display-display: var(--time-display, var(--bottom-time-display));\n --media-duration-display-display: var(--duration-display, var(--bottom-duration-display));\n --media-title-display-display: var(--title-display, var(--bottom-title-display));\n}\n"} 82 </style> 83 ${xy(t)} 84`),this.shadowRoot)},n_=new WeakSet,i_=function(){let e=e=>{var t,n;if(null==e||!e.startsWith("theme-"))return;let i=e.replace(/^theme-/,"");if(By.includes(i))return;let a=this.getAttribute(e);null!=a?null==(t=this.mediaTheme)||t.setAttribute(i,a):null==(n=this.mediaTheme)||n.removeAttribute(i)};new MutationObserver(t=>{for(let{attributeName:n}of t)e(n)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(e)},a_=new WeakSet,r_=function(){var e;this.addEventListener("error",e=>{let{detail:t}=e;if(t instanceof sn||(t=new sn(t.message,t.code,t.fatal)),null==t||!t.fatal)return JE(t),void(t.data&&JE(`${t.name} data:`,t.data));let{dialog:n,devlog:i}=Dy(t,!window.navigator.onLine,this.playbackId,this.playbackToken);i.message&&ty(i),ey(t),t.data&&ey(`${t.name} data:`,t.data),wE(this,Xy,Jy).call(this,{isDialogOpen:!0,dialog:n})}),this.media&&(this.media.errorTranslator=(e={})=>{var t,n,i;if(!((null==(t=this.media)?void 0:t.error)instanceof sn))return e;let{devlog:a}=Dy(null==(n=this.media)?void 0:n.error,!window.navigator.onLine,this.playbackId,this.playbackToken,!1);return{player_error_code:null==(i=this.media)?void 0:i.error.code,player_error_message:a.message?String(a.message):e.player_error_message,player_error_context:a.context?String(a.context):e.player_error_context}}),null==(e=this.media)||e.addEventListener("error",e=>{var t,n;let{detail:i}=e;if(!i){let{message:e,code:a}=null!=(n=null==(t=this.media)?void 0:t.error)?n:{};i=new sn(e,a)}null!=i&&i.fatal&&this.dispatchEvent(new CustomEvent("error",{detail:i}))})},s_=new WeakSet,o_=function(){var e,t,n,i;let a=()=>wE(this,e_,t_).call(this);null==(t=null==(e=this.media)?void 0:e.textTracks)||t.addEventListener("addtrack",a),null==(i=null==(n=this.media)?void 0:n.textTracks)||i.addEventListener("removetrack",a)},l_=new WeakSet,d_=function(){var e,t;if(!/Firefox/i.test(navigator.userAgent))return;let n,i=new WeakMap,a=()=>this.streamType===dn.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,r=(e,t,n=!1)=>{a()||Array.from(e&&e.activeCues||[]).forEach(e=>{if(!(!e.snapToLines||e.line<-5||e.line>=0&&e.line<10))if(!t||this.paused){let t=e.text.split("\n").length,a=-3;this.streamType===dn.LIVE&&(a=-2);let r=a-t;if(e.line===r&&!n)return;i.has(e)||i.set(e,e.line),e.line=r}else setTimeout(()=>{e.line=i.get(e)||"auto"},500)})},s=()=>{var e,t;r(n,null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(za.USER_INACTIVE))&&t)},o=()=>{var e,t;let i=Array.from((null==(t=null==(e=this.mediaController)?void 0:e.media)?void 0:t.textTracks)||[]).filter(e=>["subtitles","captions"].includes(e.kind)&&"showing"===e.mode)[0];i!==n&&(null==n||n.removeEventListener("cuechange",s)),n=i,null==n||n.addEventListener("cuechange",s),r(n,_E(this,Ky))};o(),null==(e=this.textTracks)||e.addEventListener("change",o),null==(t=this.textTracks)||t.addEventListener("addtrack",o),this.addEventListener("userinactivechange",()=>{var e,t;let i=null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(za.USER_INACTIVE))||t;_E(this,Ky)!==i&&(kE(this,Ky,i),r(n,_E(this,Ky)))})},xE.customElements.get("mux-player")||(xE.customElements.define("mux-player",b_),xE.MuxPlayerElement=b_);
84var g_={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},E_=(e={})=>Object.entries(e).reduce((e,[t,n])=>{let i=((e,t)=>{if("boolean"!=typeof t||t){if(((e,t)=>!(e=>null==e)(t)&&e in t)(e,g_))return g_[e];if(null!=typeof t)return/[A-Z]/.test(e)?(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`))(e):e}})(t,n);if(!i)return e;let a=(e=>"boolean"==typeof e?"":e)(n);return e[i]=a,e},{}),y_=Object.prototype.hasOwnProperty,__=(e,t,n)=>!((e,t)=>{if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(Array.isArray(e))return!(!Array.isArray(t)||e.length!==t.length)&&e.some((e,n)=>t[n]===e);let n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(let a=0;a<n.length;a++)if(!y_.call(t,n[a])||!Object.is(e[n[a]],t[n[a]]))return!1;return!0})(t,e[n]),A_=(e,t,n)=>{e[n]=t},k_=(e,t,n,a=A_,r=__)=>(0,i.useEffect)(()=>{let i=null==n?void 0:n.current;i&&r(i,t,e)&&a(i,t,e)},[null==n?void 0:n.current,t]),w_=(()=>{try{return"2.9.1"}catch{}return"UNKNOWN"})(),T_=i.forwardRef(({children:e,...t},n)=>i.createElement("mux-player",E_({...t,ref:n}),e)),I_=(e,t,n)=>(0,i.useEffect)(()=>{let i=null==t?void 0:t.current;if(i&&n)return i.addEventListener(e,n),()=>{i.removeEventListener(e,n)}},[null==t?void 0:t.current,n]),S_=w_,C_=i.forwardRef((e,t)=>{let n=(0,i.useRef)(null),a=((...e)=>{let t=(0,i.useRef)(null);return(0,i.useEffect)(()=>{e.forEach(e=>{e&&("function"==typeof e?e(t.current):e.current=t.current)})},[e]),t})(n,t),[r]=((e,t)=>{let{onAbort:n,onCanPlay:i,onCanPlayThrough:a,onEmptied:r,onLoadStart:s,onLoadedData:o,onLoadedMetadata:l,onProgress:d,onDurationChange:u,onVolumeChange:c,onRateChange:h,onResize:m,onWaiting:p,onPlay:v,onPlaying:b,onTimeUpdate:f,onPause:g,onSeeking:E,onSeeked:y,onStalled:_,onSuspend:A,onEnded:k,onError:w,onCuePointChange:T,onCuePointsChange:I,onChapterChange:S,metadata:C,tokens:R,paused:L,playbackId:x,playbackRates:D,currentTime:M,themeProps:N,extraSourceParams:O,_hlsConfig:P,...U}=t;return k_("playbackRates",D,e),k_("metadata",C,e),k_("extraSourceParams",O,e),k_("_hlsConfig",P,e),k_("themeProps",N,e),k_("tokens",R,e),k_("playbackId",x,e),k_("paused",L,e,(e,t)=>{null!=t&&(t?e.pause():e.play())},(e,t,n)=>!(e.hasAttribute("autoplay")&&!e.hasPlayed)&&__(e,t,n)),k_("currentTime",M,e,(e,t)=>{null!=t&&(e.currentTime=t)}),I_("abort",e,n),I_("canplay",e,i),I_("canplaythrough",e,a),I_("emptied",e,r),I_("loadstart",e,s),I_("loadeddata",e,o),I_("loadedmetadata",e,l),I_("progress",e,d),I_("durationchange",e,u),I_("volumechange",e,c),I_("ratechange",e,h),I_("resize",e,m),I_("waiting",e,p),I_("play",e,v),I_("playing",e,b),I_("timeupdate",e,f),I_("pause",e,g),I_("seeking",e,E),I_("seeked",e,y),I_("stalled",e,_),I_("suspend",e,A),I_("ended",e,k),I_("error",e,w),I_("cuepointchange",e,T),I_("cuepointschange",e,I),I_("chapterchange",e,S),[U]})(n,e);return i.createElement(T_,{ref:a,playerSoftwareName:"mux-player-react",playerSoftwareVersion:S_,...r})}),R_=C_;var L_=e=>{let{muxPlaybackId:t,customData:n,minHeight:s,aspectRatio:o}=e;const l=`https://image.mux.com/${t}/thumbnail.jpg?&time=0`;if(console.log(t,n,l),n)var d="false"===n.autoplay;const u=(0,i.useRef)(!0),[c,h]=(0,a.Wx)({threshold:.2});return(0,i.useEffect)(()=>{console.log(h,u.current);const e=u.current;h&&!d?e.play():e.pause()},[h]),i.createElement(r.so,{ref:c,sx:{width:"100%",height:s,"mux-player":d?{}:{"--controls":"none","--media-object-fit":"cover","--media-object-position":"center"}}},i.createElement(R_,{style:{height:"100%",maxWidth:"100%",aspectRatio:o||null},id:t,playbackId:t,streamType:"on-demand",playsInline:!0,preload:"auto",muted:!d,loop:!d,ref:u,poster:l,placeholder:l}))}}}]); 85//# sourceMappingURL=f2219f22e4ac0dd7d6b78190c101f064861f2105-5113e40d6a6c3842640f.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.