PageSourceSearch

https://fidibo.com/static/js/reactPlayerMux.dbd7ee3c.chunk.js

js fidibo.com collected 2026-09-24 18:47:34 UTC 540,876 bytes, 82 lines download raw bytes

1/*! For license information please see reactPlayerMux.dbd7ee3c.chunk.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunkfidibo_web=globalThis.webpackChunkfidibo_web||[]).push([[2723],{91969(e,t,n){n.r(t),n.d(t,{MaxResolution:()=>Cn,MediaError:()=>fn,MinResolution:()=>Ln,RenditionOrder:()=>Dn,default:()=>Iy,generatePlayerInitTime:()=>Yi,playerSoftwareName:()=>ky,playerSoftwareVersion:()=>Ay});var i=n(9950),a=Object.create,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,u=function(e,t){return function(){return e&&(t=e(e=0)),t}},c=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},h=function(e,t,n){return n=null!=e?a(l(e)):{},function(e,t,n,i){if(t&&"object"==typeof t||"function"==typeof t)for(var a,l=s(t),u=0,c=l.length;u<c;u++)a=l[u],!d.call(e,a)&&a!==n&&r(e,a,{get:function(e){return t[e]}.bind(null,a),enumerable:!(i=o(t,a))||i.enumerable});return e}(!t&&e&&e.__esModule?n:r(n,"default",{value:e,enumerable:!0}),e)},m=c(function(e,t){var n;n="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t.exports=n});function p(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):p(e,t)}var v=u(function(){v()});function b(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var g=u(function(){}),E=c(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))}}}),f=c(function(e,t){function n(e,t){if(!p(this,n))return new n(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}v(),t.exports=n,n.prototype.nodeType=8,n.prototype.nodeName="#comment",n.prototype.toString=function(){return"[object Comment]"}}),y=c(function(e,t){function n(e,t){if(!p(this,n))return new n(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}v(),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}}),_=c(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)}}),T=c(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)}}),A=c(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)}}}),k=c(function(e,t){g(),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 o(e.data);case 8:return"\x3c!--"+e.data+"--\x3e";default:return function(e){var t=[],s=e.tagName;return"http://www.w3.org/1999/xhtml"===e.namespaceURI&&(s=s.toLowerCase()),t.push("<"+s+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 o in e._attributes[i]){var s=e._attributes[i][o],l=(s.prefix?s.prefix+":":"")+o;t.push({name:l,value:s.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(s)>-1?t.push(" />"):(t.push(">"),e.childNodes.length?t.push.apply(t,e.childNodes.map(i)):e.textContent||e.innerText?t.push(o(e.textContent||e.innerText)):e.innerHTML&&t.push(e.innerHTML),t.push("</"+s+">")),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 o(e).replace(/"/g,"&quot;")}(i)+'"')}),t.length?" "+t.join(" "):""}function o(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}),w=c(function(e,t){v();var n=E(),i=_(),a=T(),r=A(),o=k(),s="http://www.w3.org/1999/xhtml";function l(e,t,n){if(!p(this,l))return new l(e);var i=void 0===n?s:n||null;this.tagName=i===s?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=i,this._attributes={}
2,"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 o(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}}),I=c(function(e,t){v();var n=w();function i(e){if(!p(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("")}}),S=c(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(){}}),R=c(function(e,t){v();var n=E(),i=f(),a=y(),r=w(),o=I(),s=S(),l=_(),d=T(),u=A();function c(){if(!p(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 o(this)},h.createEvent=function(e){return new s(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}),C=c(function(e,t){var n=R();t.exports=new n}),L=c(function(e,t){var n,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},a=C();"undefined"!=typeof document?n=document:(n=i["__GLOBAL_DOCUMENT_CACHE@4"])||(n=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),t.exports=n});function D(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 M(e,t){if(e){if("string"==typeof e)return D(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 D(e,t)}}function x(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=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);o=!0);}catch(Da){s=!0,a=Da}finally{try{!o&&null!=n.return&&n.return()}finally{if(s)throw a}}return r}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var N=h(m()),O=h(m()),P=h(m()),U={now:function(){var e=P.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)}},W=U,B=function(){var e,t,n;if("function"==typeof(null===(e=O.default.crypto)||void 0===e?void 0:e.getRandomValues)){n=new Uint8Array(32),O.default.crypto.getRandomValues(n);for(var i=0;i<32;i++)n[i]=n[i]%16}else{n=[];for(var a=0;a<32;a++)n[a]=16*Math.random()|0}var r=0;t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t="x"===e?n[r]:3&n[r]|8;return r++,t.toString(16)});var o=W.now(),s=null==o?void 0:o.toString(16).substring(3);return s?t.substring(0,28)+s:t},H=function(){return("000000"+(Math.random()*Math.pow(36,6)|0).toString(36)).slice(-6)},V=function(e){if(e&&"undefined"!=typeof e.nodeName)return e.muxId||(e.muxId=H()),e.muxId;var t;try{t=document.querySelector(e)}catch(Zr){}return t&&!t.muxId&&(t.muxId=e),(null==t?void 0:t.muxId)||e},$=function(e){var t;e&&"undefined"!=typeof e.nodeName?e=V(t=e):t=document.querySelector(e);var n=t&&t.nodeName?t.nodeName.toLowerCase():"";return[t,e,n]};function K(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var q=0,F=1,Y=2,G=3,j=4,Q=function(e){var t,n,i,a,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,s=e?[console,e]:[console],l=(t=console.trace).bind.apply(t,K(s)),d=(n=console.info).bind.apply(n,K(s)),u=(i=console.debug).bind.apply(i,K(s)),c=(a=console.warn).bind.apply(a,K(s)),h=(r=console.error).bind.apply(r,K(s)),m=o;return{trace:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(m>q))return l.apply(void 0,K(t))},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(m>F))return u.apply(void 0,K(t))},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(m>Y))return d.apply(void 0,K(t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(m>G))return c.apply(void 0,K(t))},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!(m>j))return h.apply(void 0,K(t))},get level(){return m},set level(e){e!==this.level&&(m=null!=e?e:o)}}}("[mux]"),z=h(m());function Z(){return"1"===(z.default.doNotTrack||z.default.navigator&&z.default.navigator.doNotTrack)}function X(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J(e,t){if(!p(e,t))throw new TypeError("Cannot call a class as a function")}function ee(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 te(e,t,n){return t&&ee(e.prototype,t),n&&ee(e,n),e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}function ae(e,t,n){return ae="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ie(e)););return e}(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(n||e):a.value}},ae(e,t,n||e)}function re(e,t){return re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},re(e,t)}function oe(e,t){if(null==e)return{};var n,i,a=function(e,t){if(null==e)return{};var n,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function se(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?X(e):t}(this,n)}}v(),g();var le=function(e){return de(e)[0]},de=function(e){if("string"!=typeof e||""===e)return["localhost"];var t,n=(e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return n&&(t=(n.match(/[^\.]+\.[^\.]+$/)||[])[0]),[n,t]},ue=h(m()),ce={exists:function(){var e=ue.default.performance;return void 0!==(e&&e.timing)},domContentLoadedEventEnd:function(){var e=ue.default.performance,t=e&&e.t
2iming;return t&&t.domContentLoadedEventEnd},navigationStart:function(){var e=ue.default.performance,t=e&&e.timing;return t&&t.navigationStart}},he=ce;function me(e,t,n){n=void 0===n?1:n,e[t]=e[t]||0,e[t]+=n}function pe(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){ne(e,t,n[t])})}return e}function ve(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 be=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],ge=["x-cdn","content-type"].concat(be);function Ee(e){var t={};return(e=e||"").trim().split(/[\r\n]+/).forEach(function(e){if(e){var n=e.split(": "),i=n.shift();i&&(ge.indexOf(i.toLowerCase())>=0||0===i.toLowerCase().indexOf("x-litix-"))&&(t[i]=n.join(": "))}}),t}function fe(e){if(e){var t=be.find(function(t){return void 0!==e[t]});return t?e[t]:void 0}}var ye=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},_e=function(e){if(!e)return{};var t=he.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)}},Te=function(e){if(e&&"function"==typeof e.getAllResponseHeaders)return Ee(e.getAllResponseHeaders())},Ae=function(e,t){if(!e||!e.requestEndDate)return{};var n,i=le(e.url),a=e.url,r=e.bytesLoaded,o=new Date(e.requestStartDate).getTime(),s=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=Ee(u[u.length-1]._responseHeaders||"")),{requestStart:o,requestResponseStart:s,requestResponseEnd:l,requestBytesLoaded:r,requestResponseHeaders:n,requestMediaDuration:d,requestHostname:i,requestUrl:a,requestId:n?fe(n):void 0}},ke=function(e){var t;return null===(t=e.match(/.*codecs\*?="(.*)"/))||void 0===t?void 0:t[1]},we=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)},o=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:le(n),request_url:n})};n.on("manifestLoaded",o);var s={},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,o=(i||{}).mediaInfo||{},l=o.type,d=o.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?s.video=u:"audio"===l?s.audio=u:s.media=u;var c=Ae(a,n),h=c.requestStart,m=c.requestResponseStart,p=c.requestResponseEnd,v=c.requestResponseHeaders,b=c.requestMediaDuration,g=c.requestHostname,E=c.requestUrl,f=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:g,request_id:f,request_url:E,request_media_duration:b,request_rendition_lists:s})};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,o=i||{},s=o.mediaInfo,l=o.start,d=(s||{}).type,u=Ae(a,n),c=u.requestStart,h=u.requestResponseStart,m=u.requestResponseEnd,p=u.requestBytesLoaded,v=u.requestResponseHeaders,b=u.requestMediaDuration,g=u.requestHostname,E=u.requestUrl,f=u.requestId,y=function(e,t){if("function"==typeof t.getCurrentRepresentationForType){var n=t.getCurrentRepresentationForType(e);return n?{currentLevel:n.absoluteIndex,renditionWidth:n.width||null,renditionHeight:n.height||null,renditionBitrate:n.bandwidth}:{}}var i=t.getQualityFor(e),a=t.getCurrentTrackFor(e).bitrateList;return a?{currentLevel:i,renditionWidth:a[i].width||null,renditionHeight:a[i].height||null,renditionBitrate:a[i].bandwidth}:{}}(d,n),_=y.currentLevel,T=y.renditionWidth,A=y.renditionHeight,k=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:g,request_id:f,request_url:E,request_media_start_time:l,request_media_duration:b,request_current_level:_,request_labeled_bitrate:k,request_video_width:T,request_video_height:A})};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){var o=e.mediaType;if("audio"===o||"video"===o){var s;if("function"==typeof n.getRepresentationsByType)if(e.newRepresentation)s={bitrate:e.newRepresentation.bandwidth,width:e.newRepresentation.width,height:e.newRepresentation.height,qualityIndex:e.newRepresentation.absoluteIndex};else{var l=n.getRepresentationsByType(o);if(l&&"number"==typeof e.newQuality){var d=l.find(function(t){return t.absoluteIndex===e.newQuality||t.index===e.newQuality});d&&(s={bitrate:d.bandwidth,width:d.width,height:d.height,qualityIndex:e.newQuality})}}else{if("number"!=typeof e.newQuality)return void i.warn("missing evt.newQuality in qualityChangeRendered event",e);s=n.getBitrateInfoListFor(o).find(function(t){return t.qualityIndex===e.newQuality})}if(!s||"number"!=typeof s.bitrate)return void i.warn("missing bitrate info for ".concat(o));c[o]=ve(pe({},s),{codec:n.getCurrentTrackFor(o).codec});var u=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:ke(c.video.codec)}}}();u&&r("renditionchange",u)}};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:le(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)||{},o=(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:le(a.url),request_type:a.mediaType,request_error_code:o.status,request_error_text:o.statusText});var s="".concat(null!=a&&a.url?"url: ".concat(a.url,"\n"):"")+"".concat(null!=o&&o.status||null!=o&&o.statusText?"response: ".concat(null==o?void 0:o.status,", ").concat(null==o?void 0:o.statusText,"\n"):"");r("error",{player_error_code:null==i?void 0:i.code,player_error_message:null==i?void 0:i.message,player_error_context:s})};n.on("error",p),n._stopMuxMonitor=function(){n.off("manifestLoaded",o),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.")},Ie=0,Se=function(){function e(){J(this,e),ne(this,"_listeners",void 0)}return te(e,[{key:"on",value:function(e,t,n){return t._eventEmitterGuid=t._eventEmitterGuid||++Ie,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];
2n&&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||++Ie;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"+e]||[],a=this._listeners["before*"]||[],r=this._listeners[e]||[],o=this._listeners["after"+e]||[],s=function(t,i){(t=t.slice()).forEach(function(t){t.call(n,{type:e},i)})};s(i,t),s(a,t),s(r,t),s(o,t)}}}]),e}(),Re=Se,Ce=h(m()),Le=function(){function e(t){var n=this;J(this,e),ne(this,"_playbackHeartbeatInterval",void 0),ne(this,"_playheadShouldBeProgressing",void 0),ne(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&&(Ce.default.clearInterval(n._playbackHeartbeatInterval),t.emit("playbackheartbeatend",{viewer_time:i.viewer_time}),n._playbackHeartbeatInterval=null)})}return te(e,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;null===this._playbackHeartbeatInterval&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=Ce.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(Ce.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),e}(),De=Le,Me=function e(t){var n=this;J(this,e),ne(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(Ha){t.mux.log.warn("Exception in error translator callback.",Ha),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})},xe=function(){function e(t){J(this,e),ne(this,"_watchTimeTrackerLastCheckedTime",void 0),ne(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 te(e,[{key:"_updateWatchTime",value:function(e,t){var n=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=n),me(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}(),Ne=xe,Oe=function(){function e(t){var n=this;J(this,e),ne(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),ne(this,"_lastTime",void 0),ne(this,"_isAdPlaying",void 0),ne(this,"_callbackUpdatePlaybackTime",void 0),ne(this,"pm",void 0),this.pm=t,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=W.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null,t.on("viewinit",function(){n.pm.data.view_playing_time_ms_cumulative=0});var i=this._startPlaybackTimeTracking.bind(this);t.on("playing",i),t.on("adplaying",i);var a=function(){n.pm.data.player_is_paused||i()};t.on("seeked",a),t.on("rebufferend",a);var r=this._stopPlaybackTimeTracking.bind(this);t.on("playbackheartbeatend",r),t.on("seeking",r),t.on("rebufferstart",r),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=W.now(),n._isAdPlaying=!1,n._callbackUpdatePlaybackTime=null})}return te(e,[{key:"_startPlaybackTimeTracking",value:function(){null===this._callbackUpdatePlaybackTime&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this._lastTime=W.now(),this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time||0,t=W.now(),n=t-this._lastTime,i=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?i=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(i=n),i>0&&i<=1e3&&me(this.pm.data,"view_content_playback_time",i),null!==this._callbackUpdatePlaybackTime&&n>0&&n<=1e3&&(this._isAdPlaying&&me(this.pm.data,"ad_playing_time_ms_cumulative",n),me(this.pm.data,"view_playing_time_ms_cumulative",n)),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=t}}]),e}(),Pe=Oe,Ue=function(){function e(t){J(this,e),ne(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 te(e,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position="undefined"==typeof 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();"undefined"!=typeof a&&(this.pm.data.player_playhead_time=a,i(),this._updateMaxPlayheadPosition())}}}]),e}(),We=Ue,Be=3e5,He=function e(t){if(J(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;me(t.data,"view_rebuffer_duration",i),n=e.viewer_time,t.data.view_rebuffer_duration>Be&&(t.emit("viewend"),t.send("viewend"),t.mux.log.warn("Ending view after rebuffering for longer than ".concat(Be,"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||(me(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)})}},Ve=function(){function e(t){var n=this;J(this,e),ne(this,"_lastCheckedTime",void 0),ne(this,"_lastPlayheadTime",void 0),ne(this,"_lastPlayheadTimeUpdatedTime",void 0),ne(this,"_rebuffering",void 0),ne(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:W.now()})}))}return te(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}(),$e=Ve,Ke=function(){function e(t){var n=this;J(this,e),ne(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&&"undefined"==typeof t.data.view_time_to_first_frame||"adplaying"===e.type&&("undefined"==typeof t.data.view_time_to_first_frame||n._inPrerollPosition()))&&n.calculateTimeToFirstFrame(r||W.now(),i)};t.one("playing",a),t.one("adplaying",a),t.one("viewend",function(){t.off("playing",a),t.off("adplaying",a)})}})}return te(e,[{key:"_inPrerollPosition",value:function(){return"undefined"==typeof this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,t){t===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.pm.pageLoadInitTime&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.pm.pageLoadInitTime))}}]),e}(),qe=Ke,Fe=function e(t){var n=this;J(this,e),ne(this,"_lastPlayerHeight",void 0),ne(this,"_lastPlayerWidth",void 0),ne(this,"_lastPlayheadPosition",void 0),ne(this,"_lastSourceHeight",void 0),ne(this,"_lastSourceWidth",void 0),t.on("viewinit",function(){n._lastPlayheadPosition=-1});["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend","playbackmodechange"].forEach(function(e){t.on(e,function(){if(n._lastPlayheadPosition>=0&&t.data.player_playhead_time>=0&&n._lastPlayerWidth>=0&&n._lastSourceWidth>0&&n._lastPlayerHeight>=0&&n._lastSourceHeight>0){var e=t.data.player_playhead_time-n._lastPlayheadPosition;if(e<0)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),me(t.data,"view_total_content_playback_time",e),me(t.data,"view_total_upscaling",a*e),me(t.data,"view_total_downscaling",r*e)}n._lastPlayheadPosition=-1})}),["playing","hb","renditionchange","orientationchange","playbackmodechange"].forEach(function(e){t.on(e,function(){n._lastPlayheadPosition=t.data.player_playhead_time,n._lastPlayerWidth=t.data.player_width,n._lastPlayerHeight=t.data.player_height,n._lastSourceWidth=t.data.video_source_width,n._lastSourceHeight=t.data.video_source_height})})},Ye=function e(t){var n=this;J(this,e),ne(this,"isSeeking",void 0),this.isSeeking=!1;var i=-1,a=function(){var e=W.now(),a=(t.data.viewer_time||e)-(i||e);me(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&&a(),n.isSeeking=!0,i=r.viewer_time,me(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})},Ge=function(e,t){e.push(t),e.sort(function(e,t){return e.viewer_time-t.viewer_time})},je=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],Qe=function(){function e(t){var n=this;J(this,e),ne(this,"_adHasPlayed",void 0),ne(this,"_adRequests",void 0),ne(this,"_adResponses",void 0),ne(this,"_currentAdRequestNumber",void 0),ne(this,"_currentAdResponseNumber",void 0),ne(this,"_prerollPlayTime",void 0),ne(this,"_wouldBeNewAdPlay",void 0),ne(this,"isAdBreak",void 0),ne(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}),je.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),Ge(n._adRequests,i),me(t.data,"view_ad_request_count"),n.inPrerollPosition()&&(t.data.view_preroll_requested=!0,n._adHasPlayed||me(t.data,"view_preroll_request_count"))}),t.on("adresponse",function(e,i){i=Object.assign({ad_request_id:"generatedAdRequestId"+n._currentAdResponseNumber++},i),Ge(n._adResponses,i);var a=n.findAdRequest(i.ad_request_id);a&
2&me(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,me(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()&&"undefined"==typeof t.data.view_preroll_load_time&&"undefined"!=typeof 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||me(t.data,"view_ad_clicked_count")}),t.on("adskipped",function(e,i){n._wouldBeNewAdPlay||me(t.data,"view_ad_skipped_count")}),t.on("adended",function(){n._wouldBeNewAdPlay=!0}),t.on("aderror",function(){n._wouldBeNewAdPlay=!0})}return te(e,[{key:"inPrerollPosition",value:function(){return"undefined"==typeof 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=x(de(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=x(de(t.ad_asset_url),2),o=r[0],s=r[1];this.pm.data.view_preroll_ad_asset_domain=s,this.pm.data.view_preroll_ad_asset_hostname=o}this.pm.data.ad_type="preroll"}this.pm.data.ad_asset_url=null==t?void 0:t.ad_asset_url,this.pm.data.ad_tag_url=null==t?void 0:t.ad_tag_url,this.pm.data.ad_creative_id=null==t?void 0:t.ad_creative_id,this.pm.data.ad_id=null==t?void 0:t.ad_id,this.pm.data.ad_universal_id=null==t?void 0:t.ad_universal_id,null!=t&&t.ad_type&&(this.pm.data.ad_type=null==t?void 0:t.ad_type)}}]),e}(),ze=Qe,Ze=function e(t){var n=this;J(this,e),ne(this,"lastWallClockTime",void 0);var i=function(){n.lastWallClockTime=W.now(),t.on("before*",a)},a=function(e){var i=W.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)})},Xe=h(m()),Je=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};function t(n){function i(t,a,r){var o;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(r=e({path:"/"},i.defaults,r)).expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*r.expires),r.expires=s}try{o=JSON.stringify(a),/^[\{\[]/.test(o)&&(a=o)}catch(p){}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||(o={});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(p){}if(t===m){o=h;break}t||(o[m]=h)}catch(p){}}return o}}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}return t(function(){})}(),et="muxData",tt=function(){var e;try{e=function(e){return e.split("&").reduce(function(e,t){var n=x(t.split("="),2),i=n[0],a=n[1],r=+a,o=a&&r==a?r:a;return e[i]=o,e},{})}(Je.get(et)||"")}catch(So){e={}}return e},nt=function(e){try{Je.set(et,function(e){return Object.entries(e).map(function(e){var t=x(e,2),n=t[0],i=t[1];return"".concat(n,"=").concat(i)}).join("&")}(e),{expires:365})}catch(So){}};var it=rt({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"}),at=rt({ad:"ad",af:"affiliate",ag:"aggregate",ap:"api",al:"application",ao:"audio",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",bn:"brand",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ci:"client",ck:"clicked",cl:"canceled",cm:"cmcd",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cv:"cumulative",cx:"c
2onnection",cz:"context",da:"data",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",dy:"dynamic",eb:"enabled",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",lw:"low",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mp:"mode",ms:"ms",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",or:"origin",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pp:"pip",pr:"preload",ps:"position",pt:"part",pv:"previous",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"});function rt(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function ot(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("_"),o=r[0],s=it[o];s||(Q.info("Data key word `"+r[0]+"` not expected in "+i),s=o+"_"),r.splice(1).forEach(function(e){"url"===e&&(a=!0),at[e]?s+=at[e]:Number.isInteger(Number(e))?s+=e:(Q.info("Data key word `"+e+"` not expected in "+i),s+="_"+e+"_")}),a?n[s]=e[i]:t[s]=e[i]}}),Object.assign(t,n)}var st=h(m()),lt=h(L()),dt={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},ut=["hb","requestcompleted","requestfailed","requestcanceled"],ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._beaconUrl=e||"https://img.litix.io",this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},dt,t)};ct.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)},ct.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())},ct.prototype.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,e?this._clearBeaconQueue():this.flushEvents(),st.default.clearTimeout(this._sendTimeout)},ct.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],ot({mux_view_message:"event queue truncated"}));var n=this._createPayload(t);mt(this._beaconUrl,n,!0,function(){})},ct.prototype._sendBeaconQueue=function(){var e=this;if(this._postInFlight)this._resendAfterPost=!0;else{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=W.now();mt(this._beaconUrl,n,!1,function(n,a){a?(e._eventQueue=t.concat(e._eventQueue),e._failureCount+=1,Q.info("Error sending beacon: "+a)):e._failureCount=0,e._roundTripTime=W.now()-i,e._postInFlight=!1,e._resendAfterPost&&(e._resendAfterPost=!1,e._eventQueue.length>0&&e._sendBeaconQueue())})}},ct.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},ct.prototype._startBeaconSending=function(){var e=this;st.default.clearTimeout(this._sendTimeout),!this.destroyed&&(this._sendTimeout=st.default.setTimeout(function(){e._eventQueue.length&&e._sendBeaconQueue(),e._startBeaconSending()},this._getNextBeaconTime()))},ct.prototype._createPayload=function(e){var t=this,n={transmission_timestamp:Math.round(W.now())};this._roundTripTime&&(n.rtt_ms=Math.round(this._roundTripTime));var i,a,r,o=function(){i=JSON.stringify({metadata:n,events:a||e}),r=i.length/1024},s=function(){return r<=t._options.maxPayloadKBSize};return o(),s()||(Q.info("Payload size is too big ("+r+" kb). Removing unnecessary events."),a=e.filter(function(e){return-1===ut.indexOf(e.e)}),o()),s()||(Q.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))}}),o()),i};var ht="function"==typeof lt.default.exitPictureInPicture?function(e){return e.length<=57344}:function(e){return!1},mt=function(e,t,n,i){if(n&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,t))i();else if(st.default.fetch)st.default.fetch(e,{method:"POST",body:t,headers:{"Content-Type":"text/plain"},keepalive:ht(t)}).then(function(e){return i(null,e.ok?null:"Error")}).catch(function(e){return i(null,e)});else{if(st.default.XMLHttpRequest){var a=new st.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()}},pt=ct,vt=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception","view_playing_time_ms_cumulative","ad_playing_time_ms_cumulative"],bt=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],gt=["ad_id","ad_creative_id","ad_universal_id"],Et=["viewstart","error","ended","viewend"],ft=function(){function e(t,n){var i,a,r,o,s,l,d,u,c,h,m,p,v,b,g,E=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};J(this,e),ne(this,"mux",void 0),ne(this,"envKey",void 0),ne(this,"options",void 0),ne(this,"eventQueue",void 0),ne(this,"sampleRate",void 0),ne(this,"disableCookies",void 0),ne(this,"respectDoNotTrack",void 0),ne(this,"previousBeaconData",void 0),ne(this,"lastEventTime",void 0),ne(this,"rateLimited",void 0),ne(this,"pageLevelData",void 0),ne(this,"viewerData",void 0),this.mux=t,this.envKey=n,this.options=E,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new pt(function(e,t){var n=t.beaconCollectionDomain,i=t.beaconDomain;if(n)return(/localhost(?::\d+)?$/.test(n)?"http://":"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!==(g=this.options.respectDoNotTrack)&&void 0!==g&&g,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===(o=this.options.platform)||void 0===o?void 0:o.product,viewer_device_category:"",viewer_device_manufacturer:null===(s=this.options.platform)||void 0===s?void 0:s.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,page_url:null===Xe.default||void 0===Xe.default||null===(p=Xe.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 te(e,[{key:"send",value:function(e,t){if(e&&null!=t&&t.view_id){if(this.respectDoNotTrack&&Z())return Q.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=typeof t)return Q.error("A data object was expected in send() but was not provided");var n=this.disableCookies?{}:function(){var e=tt(),t=W.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=ve(pe({},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,o=ot(this._deduplicateBeaconData(e,i));if(this.lastEventTime=this.mux.utils.now(),r)return Q.info("Not sending event due to sample rate restriction",e,i,o);if(this.envKey||Q.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,i,o),!this.rateLimited)if(Q.info("Sending event",e,i,o),this.rateLimited=!this.eventQueue.queueEvent(e,o),this.mux.WINDOW_UNLOADING&&"viewend"===e)this.eventQueue.destroy(!0);else{if(this.mux.WINDOW_HIDDEN&&"hb"===e)this.eventQueue.flushEvents(!0);else if(Et.indexOf(e)>=0){if("error"===e&&"warning"===t.player_error_severity)return;this.eventQueue.flushEvents()}if(this.rateLimited)return i.event="eventrateexceeded",o=ot(i),this.eventQueue.queueEvent(i.event,o),Q.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=pe({},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=x(t,2),o=a[0],s=a[1];n.previousBeaconData&&(s!==n.previousBeaconData[o]||vt.indexOf(o)>-1||n.objectHasChanged(r,o,s,n.previousBeaconData[o])||n.eventRequiresKey(e,o))&&(i[o]=s,n.previousBeaconData[o]=s)})}return i}},{key:"objectHasChanged",value:function(e,t,n,i){return!(!e||0!==t.indexOf("request_"))&&("request_response_headers"===t||"object"!=typeof n||"object"!=typeof i||Object.keys(n||{}).length!==Object.keys(i||{}).length)}},{key:"eventRequiresKey",value:function(e,t){return!!("renditionchange"===e&&0===t.indexOf("video_source_")||gt.includes(t)&&bt.includes(e)||"playbackmodechange"===e&&0===t.indexOf("player_playback_mode"))}}]),e}(),yt=function e(t){J(this,e);var n=0,i=0,a=0,r=0,o=0,s=0,l=0;t.on("requestcompleted",function(e,s){var l,d,u=s.request_start,c=s.request_response_start,h=s.request_response_end,m=s.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;o++,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/o)}}),t.on("requestfailed",function(e,n){r++,s++,t.data.view_request_count=r,t.data.view_request_failed_count=s}),t.on("requestcanceled",function(e,n){r++,l++,t.data.view_request_count=r,t.data.view_request_canceled_count=l})},_t=function e(t){var n=this;J(this,e),ne(this,"_lastEventTime",void 0),t.on("before*",function(e,i){var a=i.viewer_time,r=W.now(),o=n._lastEventTime;if(n._lastEventTime=r,o&&r-o>36e5){var s=Object.keys(t.data).reduce(function(e,n){return 0===n.indexOf("video_")?Object.assign(e,ne({},n,t.data[n])):e},{});t.mux.log.info("Received event after at least an hour inactivity, creating a new view");var l=t.playbackHeartbeat._playheadShouldBeProgressing;t._resetView(Object.assign({viewer_time:a},s)),t.playbackHeartbeat._playheadShouldBeProgressing=l,t.playbackHeartbeat._playheadShouldBeProgressing&&"play"!==e.type&&"adbreakstart"!==e.type&&(t.emit("play",{viewer_time:a}),"playing"!==e.type&&t.emit("playing",{viewer_time:a}))}})};function Tt(e,t){return(null==e?void 0:e.toLowerCase())===(null==t?void 0:t.toLowerCase())}var At=function e(t){J(this,e);var n=function(e){var n=function(e){var t;return null!=e&&e.request_type&&("media"===e.request_type||"video"===e.request_type)&&null!==(t=e.request_response_headers)&&void 0!==t&&t["x-cdn"]?e.request_response_headers["x-cdn"]:null!=e&&e.video_cdn?e.video_cdn:null}(e),i=function(e){return null!=e&&e.request_start?e.request_start:null!=e&&e.viewer_time?e.viewer_time:Date.now()}(e);if(null!=n&&!Tt(n,r)&&o<=i){r=n,o=i;var a={video_cdn:n};t.emit("cdnchange",a)}},i=null,a=null,r=null,o=0;t.on("viewinit",function(){i=null,a=null,r=null,o=0}),t.on("beforecdnchange",function(e,t){var n=null==t?void 0:t.video_cdn;n&&("undefined"==typeof t.video_previous_cdn||null===t.video_previous_cdn)&&(Tt(n,a)?t.video_previous_cdn=null!=i?i:void 0:(t.video_previous_cdn=null!=a?a:void 0,i=a,a=n))}),t.on("requestcompleted",function(e,t){n(t)})},kt=function e(t){var n=this;J(this,e),ne(this,"_emittingAutomaticEvent",!1),ne(this,"_hasInitialized",!1),ne(this,"_currentMode","standard"),t.on("viewstart",function(){n._hasInitialized||(n._hasInitialized=!0,n._currentMode=t.data.player_playback_mode||"standard",n._emittingAutomaticEvent=!0,t.emit("playbackmodechange",{player_playback_mode:n._currentMode,player_playback_mode_data:"{}"}),n._emittingAutomaticEvent=!1)}),t.on("viewend",function(){n._hasInitialized=!1}),t.on("playbackmodechange",function(e,i){n._emittingAutomaticEvent||(i.player_playback_mode_data?function(e){try{return JSON.parse(e),!0}catch(t){return!1}}(i.player_playback_mode_data)||(t.mux.log.warn("Invalid JSON string for player_playback_mode_data"),i.player_playback_mode_data="{}"):i.player_playback_mode_data="{}",t.data.player_playback_mode_data=i.player_playback_mode_data,t.data.player_playback_mode=i.player_playback_mode,n._currentMode=i.player_playback_mode)})},wt=function(){function e(t){J(this,e),ne(this,"pm",void 0),ne(this,"_currentRangeStart",void 0),ne(this,"_lastPlayheadTime",void 0),this.pm=t,this._currentRangeStart=null,this._lastPlayheadTime=null,t.on("playbackheartbeat",this._updatePlaybackRange.bind(this)),t.on("playbackheartbeatend",this._endPlaybackRange.bind(this))}return te(e,[{key:"_updateLastRangeEnd",value:function(){var e=this.pm.data.video_playback_ranges;if(e&&e.length>0){var t=this.pm.data.player_playhead_time||0;e[e.length-1][1]=t}}},{key:"_updatePlaybackRange",value:function(){var e,t=this.pm.data.player_playhead_time||0;if(!(!this.pm.disableAdPlaybackRangeFiltering&&null!==(e=this.pm.adTracker)&&void 0!==e&&e.isAdBreak&&null!==this._lastPlayheadTime&&t<this._lastPlayheadTime)){if(null!==this._lastPlayheadTime&&null!==this._currentRangeStart)if(Math.abs(t-this._lastPlayheadTime)>1e3){var n=this.pm.data.video_playback_ranges;n&&n.length>0&&(n[n.length-1][1]=this._lastPlayheadTime),this._currentRangeStart=null}if(null===this._currentRangeStart){var i=this.pm.data.video_playback_ranges||[];i.length>0&&i[i.length-1][1]===t?this._currentRangeStart=i[i.length-1][0]:(this._currentRangeStart=t,i.push([t,t])),this.pm.data.video_playback_ranges=i}else this._updateLastRangeEnd();this._lastPlayheadTime=t}}},{key:"_endPlaybackRange",value:function(){null!==this._currentRangeStart&&(this._updateLastRangeEnd(),this._currentRangeStart=null,this._lastPlayheadTime=null)}}]),e}(),It=wt,St=Object.freeze({CELLULAR:"cellular",WIFI:"wifi",WIRED:"wired",OTHER:"other",NO_CONNECTION:"no_connection",UNKNOWN:"unknown"}),Rt=h(m()),Ct=function(){function e(t){var n=this;J(this,e),ne(this,"pm",void 0),ne(this,"lastType",void 0),ne(this,"lastLowDataMode",void 0),this.pm=t,this.pm.one("viewinit",function(){var t,i=n.emit.bind(n);i(),Rt.default.addEventListener("online",i),Rt.default.addEventListener("offline",i),null===(t=e.connection)||void 0===t||t.addEventListener("change",i
2),n.pm.on("destroy",function(){var t;null===(t=e.connection)||void 0===t||t.removeEventListener("change",i),Rt.default.removeEventListener("online",i),Rt.default.removeEventListener("offline",i)})})}return te(e,[{key:"type",get:function(){var t,n;return!1===(null===(t=Rt.default.navigator)||void 0===t?void 0:t.onLine)?St.NO_CONNECTION:null!==(n=e.connection)&&void 0!==n&&n.type?function(e){if(!e)return St.UNKNOWN;switch(e){case"cellular":case"wimax":return St.CELLULAR;case"wifi":return St.WIFI;case"ethernet":return St.WIRED;case"none":return St.NO_CONNECTION;case"bluetooth":case"other":default:return St.OTHER;case"unknown":return St.UNKNOWN}}(e.connection.type):St.UNKNOWN}},{key:"lowDataMode",get:function(){var t;return null===(t=e.connection)||void 0===t?void 0:t.saveData}},{key:"emit",value:function(){var e=this.type,t=this.lowDataMode;e===this.lastType&&t===this.lastLowDataMode||(this.lastType=e,this.lastLowDataMode=t,this.pm.emit("networkchange",pe({viewer_connection_type:e},void 0!==t&&{viewer_connection_low_data_mode:t})))}}],[{key:"connection",get:function(){return function(e){return"object"==typeof e&&"connection"in e&&"object"==typeof e.connection}(Rt.default.navigator)?Rt.default.navigator.connection:null}}]),e}(),Lt=Ct,Dt=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange","networkchange","cdnchange","playbackmodechange"],Mt=new Set(["requestcompleted","requestfailed","requestcanceled"]),xt=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&&re(e,t)}(n,e);var t=se(n);function n(e,i,a){var r;J(this,n),ne(X(r=t.call(this)),"pageLoadEndTime",void 0),ne(X(r),"pageLoadInitTime",void 0),ne(X(r),"_destroyed",void 0),ne(X(r),"_heartBeatTimeout",void 0),ne(X(r),"adTracker",void 0),ne(X(r),"dashjs",void 0),ne(X(r),"data",void 0),ne(X(r),"disablePlayheadRebufferTracking",void 0),ne(X(r),"disableRebufferTracking",void 0),ne(X(r),"disableAdPlaybackRangeFiltering",void 0),ne(X(r),"errorTracker",void 0),ne(X(r),"errorTranslator",void 0),ne(X(r),"emitTranslator",void 0),ne(X(r),"getAdData",void 0),ne(X(r),"getPlayheadTime",void 0),ne(X(r),"getStateData",void 0),ne(X(r),"stateDataTranslator",void 0),ne(X(r),"hlsjs",void 0),ne(X(r),"id",void 0),ne(X(r),"longResumeTracker",void 0),ne(X(r),"minimumRebufferDuration",void 0),ne(X(r),"mux",void 0),ne(X(r),"playbackEventDispatcher",void 0),ne(X(r),"playbackHeartbeat",void 0),ne(X(r),"playbackHeartbeatTime",void 0),ne(X(r),"playheadTime",void 0),ne(X(r),"seekingTracker",void 0),ne(X(r),"sustainedRebufferThreshold",void 0),ne(X(r),"watchTimeTracker",void 0),ne(X(r),"currentFragmentPDT",void 0),ne(X(r),"currentFragmentStart",void 0),r.pageLoadInitTime=he.navigationStart(),r.pageLoadEndTime=he.domContentLoadedEventEnd();var o={debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,disableAdPlaybackRangeFiltering:!1,errorTranslator:function(e){return e},emitTranslator:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t},stateDataTranslator:function(e){return e}};r.mux=e,r.id=i,null!=a&&a.beaconDomain&&r.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),(a=Object.assign(o,a)).data=a.data||{},a.data.property_key&&(a.data.env_key=a.data.property_key,delete a.data.property_key),Q.level=a.debug?F:G,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.disableAdPlaybackRangeFiltering=a.disableAdPlaybackRangeFiltering,r.errorTranslator=a.errorTranslator,r.emitTranslator=a.emitTranslator,r.stateDataTranslator=a.stateDataTranslator,r.playbackEventDispatcher=new ft(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;var s=function(){"undefined"==typeof this.data.view_start&&(this.data.view_start=this.mux.utils.now(),this.emit
2("viewstart"),this.emit("renditionchange"))}.bind(X(r));if(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)}),r.on("videochange",function(e,t){this._resetView(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."),this._resetView(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="undefined"!=typeof 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)}),Dt.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.pageLoadInitTime=this.data.page_load_init_time||this.pageLoadInitTime,this.pageLoadEndTime=this.data.page_load_end_time||this.pageLoadEndTime,!this.mux.PLAYER_TRACKED&&this.pageLoadInitTime&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.pageLoadEndTime)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.pageLoadEndTime||1/0)-this.pageLoadInitTime)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),r.longResumeTracker=new _t(X(r)),r.errorTracker=new Me(X(r)),new Ze(X(r)),r.seekingTracker=new Ye(X(r)),r.playheadTime=new We(X(r)),r.playbackHeartbeat=new De(X(r)),new Fe(X(r)),r.watchTimeTracker=new Ne(X(r)),new Pe(X(r)),new It(X(r)),r.adTracker=new ze(X(r)),new $e(X(r)),new He(X(r)),new qe(X(r)),new yt(X(r)),new At(X(r)),new kt(X(r)),new Lt(X(r)),a.hlsjs&&r.addHLSJS(a),a.dashjs&&r.addDashJS(a),r.emit("viewinit",a.data),r}return te(n,[{key:"emit",value:function(e,t){var i,a=Object.assign({viewer_time:this.mux.utils.now()},t),r=[e,a];if(this.emitTranslator)try{r=this.emitTranslator(e,a)}catch(wa){this.mux.log.warn("Exception in emit translator callback.",wa)}null!=r&&r.length&&(i=ae(ie(n.prototype),"emit",this)).call.apply(i,[this].concat(K(r)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,"undefined"!=typeof this.data.view_start&&(this.emit
2("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=x(de(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,t.video_playback_ranges&&(t.video_playback_range=JSON.stringify(t.video_playback_ranges.filter(function(e){return e[0]!==e[1]}).map(function(e){return"".concat(e[0],":").concat(e[1])})),delete t.video_playback_ranges),this.playbackEventDispatcher.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,Mt.has(e)||this._restartHeartBeat(),"viewend"===e&&delete this.data.view_id}}},{key:"_resetView",value:function(e){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",e)}},{key:"_updateStateData",value:function(){var e,t=this.getStateData();if("function"==typeof this.stateDataTranslator)try{t=this.stateDataTranslator(t)}catch(Da){this.mux.log.warn("Exception in stateDataTranslator translator callback.",Da)}if(null!==(e=this.data)&&void 0!==e&&e.video_cdn&&null!=t&&t.video_cdn){t.video_cdn;t=oe(t,["video_cdn"])}Object.assign(this.data,t),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var e=this;["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"].forEach(function(t){var n=parseInt(e.data[t],10);e.data[t]=isNaN(n)?void 0:n});["player_source_url","video_source_url"].forEach(function(t){if(e.data[t]){var n=e.data[t].toLowerCase();(0===n.indexOf("data:")||0===n.indexOf("blob:"))&&(e.data[t]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("video_")&&delete e.data[t]})}},{key:"_resetViewData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var e=this,t=this.data.view_id=B(),n=function(){t===e.data.view_id&&me(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,o=function(e){var t,n=parseInt(i.version);return 1===n&&null!==e.programDateTime&&(t=e.programDateTime),0===n&&null!==e.pdt&&(t=e.pdt),t};if(he.exists()){var s=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,o=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}}
2),i.forEach(function(e,t){u[t]={name:e.name,language:e.lang,bitrate:e.bitrate}});var c=_e(r),h=c.bytesLoaded,m=c.requestStart,p=c.responseStart,v=c.responseEnd;s("requestcompleted",ve(pe({},ye(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:le(a),request_response_headers:Te(o),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=_e(l),u=d.bytesLoaded,c=d.requestStart,h=d.responseStart,m=d.responseEnd,p=n.fragments[n.fragments.length-1],v=o(p)+r(p.duration);s("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:le(n.url),request_response_headers:Te(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=_e(a),o=r.bytesLoaded,l=r.requestStart,d=r.responseStart,u=r.responseEnd;s("requestcompleted",{request_event_type:e,request_bytes_loaded:o,request_start:l,request_response_start:d,request_response_end:u,request_type:"manifest",request_hostname:le(n.url),request_response_headers:Te(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 o=_e(i),l=o.bytesLoaded,d=o.requestStart,u=o.responseStart,c=o.responseEnd,h=a?Te(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?le(a.responseURL):void 0,request_id:h?fe(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,s("requestcompleted",m)};n.on(i.Events.FRAG_LOADED,c);var h=function(e,t){var n=t.frag,i=n.start,a={currentFragmentPDT:o(n),currentFragmentStart:r(i)};s("fragmentchange",a)};n.on(i.Events.FRAG_CHANGED,h);var m=function(e,t){var n=t.type,a=t.details,r=t.response,o=t.fatal,l=t.frag,d=t.networkDetails,u=(null==l?void 0:l.url)||t.url||"",c=d?Te(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)&&s("requestfailed",{request_error:a,request_url:u,request_hostname:le(u),request_id:c?fe(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}),o){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"):"");s("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||"";s("requestcanceled",{request_event_type:e,request_url:i,request_type:"media",request_hostname:le(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 o,l=r.attrs.BANDWIDTH,d=parseFloat(r.attrs["FRAME-RATE"]);isNaN(d)||(o=d),l?s("renditionchange",{video_source_fps:o,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,we(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}(Re),Nt=xt,Ot=h(L());function Pt(){return Ot.default&&!!(Ot.default.fullscreenElement||Ot.default.webkitFullscreenElement||Ot.default.mozFullScreenElement||Ot.default.msFullscreenElement)}var Ut=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],Wt={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};var Bt,Ht=h(m());Ht.default&&Ht.default.WeakMap&&(Bt=new WeakMap);var Vt="#EXT-X-TARGETDURATION",$t="#EXT-X-PART-INF",Kt="#EXT-X-SERVER-CONTROL",qt="#EXTINF",Ft="#
2EXT-X-PROGRAM-DATE-TIME",Yt="#EXT-X-VERSION",Gt="#EXT-X-SESSION-DATA",jt=function(e){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(e),this.manifest};jt.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)},jt.prototype.processLine=function(e){var t=e.indexOf(":"),n=tn(e,t),i=n[0],a=2===n.length?Zt(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 Vt:if(!isFinite(a)||a<0)return;this.manifest.targetDuration=a,this.setHoldBack();break;case $t:Qt(this.manifest,n),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case Kt:Qt(this.manifest,n),this.setHoldBack();break;case qt:0===a?this.currentUri.duration=.01:a>0&&(this.currentUri.duration=a);break;case Ft:var r=a,o=new Date(r);this.manifest.dateTimeString||(this.manifest.dateTimeString=r,this.manifest.dateTimeObject=o),this.currentUri.dateTimeString=r,this.currentUri.dateTimeObject=o;break;case Yt:Qt(this.manifest,n);break;case Gt:var s=nn(n[1]),l=ye(s);Object.assign(this.manifest.sessionData,l)}},jt.prototype.setHoldBack=function(){var e=this.manifest,t=e.serverControl,n=e.targetDuration,i=e.partTargetDuration;if(t){var a="holdBack",r="partHoldBack",o=n&&3*n,s=i&&2*i;n&&!t.hasOwnProperty(a)&&(t[a]=o),o&&t[a]<o&&(t[a]=o),i&&!t.hasOwnProperty(r)&&(t[r]=3*i),i&&t[r]<s&&(t[r]=s)}};var Qt=function(e,t){var n,i=zt(t[0].replace("#EXT-X-",""));en(t[1])?(n={},n=Object.assign(Jt(t[1]),n)):n=Zt(t[1]),e[i]=n},zt=function(e){return e.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},Zt=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},Xt=function(e){var t={},n=e.split("=");n.length>1&&(t[zt(n[0])]=Zt(n[1]));return t},Jt=function(e){for(var t=e.split(","),n={},i=0;t.length>i;i++){var a=t[i],r=Xt(a);n=Object.assign(r,n)}return n},en=function(e){return e.indexOf("=")>-1},tn=function(e,t){return-1===t?[e]:[e.substring(0,t),e.substring(t+1)]},nn=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}}},an=jt,rn={safeCall:function(e,t,n,i){var a=i;if(e&&"function"==typeof e[t])try{a=e[t].apply(e,n)}catch(Fr){Q.info("safeCall error",Fr)}return a},safeIncrement:me,getComputedStyle:function(e,t){return e&&t&&Ht.default&&"function"==typeof Ht.default.getComputedStyle?(Bt&&Bt.has(e)&&(n=Bt.get(e)),n||(n=Ht.default.getComputedStyle(e,null),Bt&&Bt.set(e,n)),n.getPropertyValue(t)):"";var n},secondsToMs:function(e){return Math.floor(1e3*e)},assign:Object.assign,headersStringToObject:Ee,cdnHeadersToRequestId:fe,extractHostnameAndDomain:de,extractHostname:le,manifestParser:an,generateShortID:H,generateUUID:B,now:W.now,findMediaElement:$},on=rn,sn={PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",PLAYBACK_MODE_CHANGE:"playbackmodechange",NETWORK_CHANGE:"networkchange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled",HEARTBEAT:"hb",DESTROY:"destroy"},ln={},dn=function(e){var t=arguments;"string"==typeof e?dn.hasOwnProperty(e)?N.default.setTimeout(function(){t=Array.prototype.splice.call(t,1),dn[e].apply(null,t)},0):Q.warn("`"+e+"` is an unknown task"):"function"==typeof e?N.default.setTimeout(function(){e(dn)}
vendor: 5,051 bytes, line 2
2,0):Q.warn("`"+e+"` is invalid.")},un={loaded:W.now(),NAME:"mux-embed",VERSION:"5.18.1",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(e,t){return function(e,t,n){var i=x($(t),3),a=i[0],r=i[1],o=i[2],s=e.log,l=e.utils.getComputedStyle,d=e.utils.secondsToMs;if(!a)return s.error("No element was found with the `"+r+"` query selector.");if("video"!==o&&"audio"!==o)return s.error("The element of `"+r+"` was not a media element.");a.mux&&(a.mux.destroy(),delete a.mux,s.warn("Already monitoring this video element, replacing existing event listeners"));var u={getPlayheadTime:function(){return d(a.currentTime)},getStateData:function(){var e,t,n=(null===(e=this.getPlayheadTime)||void 0===e?void 0:e.call(this))||d(a.currentTime),i=this.hlsjs&&this.hlsjs.url,r=this.dashjs&&"function"==typeof this.dashjs.getSource&&this.dashjs.getSource(),o={player_is_paused:a.paused,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:Pt(),video_poster_url:a.poster,video_source_url:i||r||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===(t=a.getVideoPlaybackQuality)||void 0===t?void 0:t.call(a).droppedVideoFrames};if(a.getStartDate&&n>0){var s=a.getStartDate();if(s&&"function"==typeof s.getTime&&s.getTime()){var u=s.getTime();if(o.player_program_time=u+n,a.seekable.length>0){var c=u+a.seekable.end(a.seekable.length-1);o.player_live_edge_program_time=c}}}return o}};(n=Object.assign({automaticErrorTracking:!0},n,u)).data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:e.VERSION},n.data),a.mux=a.mux||{},a.mux.deleted=!1,a.mux.emit=function(t,n){e.emit(r,t,n)},a.mux.updateData=function(e){a.mux.emit("hb",e)};var c=function(){s.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.fullscreenChangeListener&&(document.removeEventListener("fullscreenchange",a.mux.fullscreenChangeListener,!1),delete a.mux.fullscreenChangeListener),a.mux.destroy=c,a.mux.swapElement=c,a.mux.emit=c,a.mux.addHLSJS=c,a.mux.addDashJS=c,a.mux.removeHLSJS=c,a.mux.removeDashJS=c,a.mux.updateData=c,a.mux.setEmitTranslator=c,a.mux.setStateDataTranslator=c,a.mux.setGetPlayheadTime=c,a.mux.deleted=!0,e.emit(r,"destroy")},a.mux.swapElement=function(t){var n=x($(t),3),i=n[0],r=n[1],o=n[2];return i?"video"!==o&&"audio"!==o?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.fullscreenChangeListener=a.mux.fullscreenChangeListener,delete a.mux.fullscreenChangeListener,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)},a.mux.setEmitTranslator=function(t){e.setEmitTranslator(r,t)},a.mux.setStateDataTranslator=function(t){e.setStateDataTranslator(r,t)},a.mux.setGetPlayheadTime=function(t){t||(t=n.getPlayheadTime),e.setGetPlayheadTime(r,t)},e.init(r,n),e.emit(r,"playerready"),a.paused||(e.emit(r,"play"),a.readyState>2&&e.emit(r,"playing")),a.mux.listeners={},Ut.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=Wt[a.error.code]||a.error.message}e.emit(r,t,n)},a.addEventListener(t,a.mux.listeners[t],!1))}),a.mux.listeners.enterpictureinpicture=function(){e.emit(r,"playbackmodechange",{player_playback_mode:"pip",player_playback_mode_data:"{}"})},a.mux.listeners.leavepictureinpicture=function(){var t=Pt()?"fullscreen":"standard";e.emit(r,"playbackmodechange",{player_playback_mode:t,player_playback_mode_data:"{}"})},a.addEventListener("enterpictureinpicture",a.mux.listeners.enterpictureinpicture,!1),a.addEventListener("leavepictureinpicture",a.mux.listeners.leavepictureinpicture,!1),a.mux.fullscreenChangeListener=function(){var t=Pt(),n=document.fullscreenElement;if(t&&(n===a||null!=n&&n.contains(a)))e.emit(r,"playbackmodechange",{player_playback_mode:"fullscreen",player_playback_mode_data:"{}"});else if(!t){var i=document.pictureInPictureElement===a?"pip":"standard";e.emit(r,"playbackmodechange",{player_playback_mode:i,player_playback_mode_data:"{}"})}},document.addEventListener("fullscreenchange",a.mux.fullscreenChangeListener,!1)}(dn,e,t)}
2,destroyMonitor:function(e){var t=x($(e),1)[0];t&&t.mux&&"function"==typeof t.mux.destroy?t.mux.destroy():Q.error("A video element monitor for `"+e+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(e,t){var n=V(e);ln[n]?ln[n].addHLSJS(t):Q.error("A monitor for `"+n+"` has not been initialized.")},addDashJS:function(e,t){var n=V(e);ln[n]?ln[n].addDashJS(t):Q.error("A monitor for `"+n+"` has not been initialized.")},removeHLSJS:function(e){var t=V(e);ln[t]?ln[t].removeHLSJS():Q.error("A monitor for `"+t+"` has not been initialized.")},removeDashJS:function(e){var t=V(e);ln[t]?ln[t].removeDashJS():Q.error("A monitor for `"+t+"` has not been initialized.")},init:function(e,t){Z()&&t&&t.respectDoNotTrack&&Q.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var n=V(e);ln[n]=new Nt(dn,n,t)},emit:function(e,t,n){var i=V(e);ln[i]?(ln[i].emit(t,n),"destroy"===t&&delete ln[i]):Q.error("A monitor for `"+i+"` has not been initialized.")},updateData:function(e,t){var n=V(e);ln[n]?ln[n].emit("hb",t):Q.error("A monitor for `"+n+"` has not been initialized.")},setEmitTranslator:function(e,t){var n=V(e);ln[n]?ln[n].emitTranslator=t:Q.error("A monitor for `"+n+"` has not been initialized.")},setStateDataTranslator:function(e,t){var n=V(e);ln[n]?ln[n].stateDataTranslator=t:Q.error("A monitor for `"+n+"` has not been initialized.")},setGetPlayheadTime:function(e,t){var n=V(e);ln[n]?ln[n].getPlayheadTime=t:Q.error("A monitor for `"+n+"` has not been initialized.")},checkDoNotTrack:Z,log:Q,utils:on,events:sn,WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(dn,un),"undefined"!=typeof N.default&&"function"==typeof N.default.addEventListener&&N.default.addEventListener("pagehide",function(e){e.persisted||(dn.WINDOW_UNLOADING=!0)},!1);var cn=dn,hn=n(13441),mn=hn.Ay,pn="video",vn="drm",bn={NOT_AN_ERROR:0,NETWORK_OFFLINE:2000002,NETWORK_UNKNOWN_ERROR:2e6,NETWORK_NO_STATUS:2000001,NETWORK_INVALID_URL:24e5,NETWORK_NOT_FOUND:2404e3,NETWORK_NOT_READY:2412e3,NETWORK_GENERIC_SERVER_FAIL:25e5,NETWORK_TOKEN_MISSING:2403201,NETWORK_TOKEN_MALFORMED:2412202,NETWORK_TOKEN_EXPIRED:2403210,NETWORK_TOKEN_AUD_MISSING:2403221,NETWORK_TOKEN_AUD_MISMATCH:2403222,NETWORK_TOKEN_SUB_MISMATCH:2403232,ENCRYPTED_ERROR:5e6,ENCRYPTED_UNSUPPORTED_KEY_SYSTEM:5000001,ENCRYPTED_GENERATE_REQUEST_FAILED:5000002,ENCRYPTED_UPDATE_LICENSE_FAILED:5000003,ENCRYPTED_UPDATE_SERVER_CERT_FAILED:5000004,ENCRYPTED_CDM_ERROR:5000005,ENCRYPTED_OUTPUT_RESTRICTED:5000006,ENCRYPTED_MISSING_TOKEN:5000002},gn=e=>e===pn?"playback":e,En=class e extends Error{constructor(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.MEDIA_ERR_CUSTOM,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;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:"")}};En.MEDIA_ERR_ABORTED=1,En.MEDIA_ERR_NETWORK=2,En.MEDIA_ERR_DECODE=3,En.MEDIA_ERR_SRC_NOT_SUPPORTED=4,En.MEDIA_ERR_ENCRYPTED=5,En.MEDIA_ERR_CUSTOM=100,En.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 fn=En,yn=(e,t)=>!(e=>null==e)(t)&&e in t,_n={ANY:"any",MUTED:"muted"},Tn={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},An="mse",kn="native",wn={HEADER:"header",QUERY:"query",NONE:"none"},In=Object.values(wn),Sn={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},Rn={HLS:Sn.M3U8},Cn=(Object.keys(Rn),Object.values(Sn),{upTo720p:"720p",upTo1080p:"1080p",upTo1440p:"1440p",upTo2160p:"2160p"}),Ln={noLessThan480p:"480p",noLessThan540p:"540p",noLessThan720p:"720p",noLessThan1080p:"1080p",noLessThan1440p:"1440p",noLessThan2160p:"2160p"},Dn={DESCENDING:"desc"},Mn={code:"en"},xn=function(e,t,n,i){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e;a.addEventListener(t,n,i),e.addEventListener("teardown",()=>{a.removeEventListener(t,n)},{once:!0})};var Nn=e=>{let t=e.indexOf("?");return t<0?[e]:[e.slice(0,t),e.slice(t)]},On=e=>{let{type:t}=e;if(t){let e=t.toUpperCase();return yn(e,Rn)?Rn[e]:t}return Wn(e)},Pn=e=>"VOD"===e?Tn.ON_DEMAND:Tn.LIVE,Un=e=>"EVENT"===e?Number.POSITIVE_INFINITY:"VOD"===e?Number.NaN:0,Wn=e=>{let{src:t}=e;if(!t)return"";let n="";try{n=Hn(t).pathname}catch{console.error("Invalid url when trying to infer mime type",t)}let i=n.lastIndexOf(".");if(i<0)return $n(e)?Sn.M3U8:"";let a=n.slice(i+1).toUpperCase();return yn(a,Sn)?Sn[a]:""},Bn=e=>{try{return new URL(e),!1}catch{return!0}},Hn=(e,t)=>{var n;if(!Bn(e))return new URL(e);let i=null==(n=null==window?void 0:window.location)?void 0:n.href,a=null!=t?t:i;
2return t&&Bn(t.toString())&&(a=new URL(t,i)),new URL(e,a)},Vn="mux.com",$n=e=>{let t,{src:n,customDomain:i=Vn}=e;try{t=new URL(`${n}`)}catch{return!1}let a="https:"===t.protocol,r=t.hostname===`stream.${i}`.toLowerCase(),o=t.pathname.split("/"),s=2===o.length,l=!(null!=o&&o[1].includes("."));return a&&r&&s&&l},Kn=e=>{let t=(null!=e?e:"").split(".")[1];if(t)try{let e=t.replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(n)}catch{return}};function qn(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var n,i;let a=t&&null!=(i=null==(n=Mn)?void 0:n[e])?i:e;return new Fn(a,t?Mn.code:"en")}var Fn=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e=>null!=(e=Mn)?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}},Yn=Object.values(_n),Gn=e=>"boolean"==typeof e||"string"==typeof e&&Yn.includes(e),jn=(e,t)=>{if(!t)return;let n=e.muted,i=()=>e.muted=n;switch(t){case _n.ANY:e.play().catch(()=>{e.muted=!0,e.play().catch(i)});break;case _n.MUTED:e.muted=!0,e.play().catch(i);break;default:e.play().catch(()=>{})}};function Qn(e,t){var n;if(!("videoTracks"in e))return;let i=new WeakMap;t.on(mn.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(mn.Events.AUDIO_TRACKS_UPDATED,function(t,n){o();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)}});let a=()=>{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)};e.audioTracks.addEventListener("change",a),t.on(mn.Events.LEVELS_UPDATED,function(t,n){var a;let r=e.videoTracks[null!=(a=e.videoTracks.selectedIndex)?a:0];if(!r)return;let o=n.levels.map(e=>i.get(e));for(let i of e.videoRenditions)i.id&&!o.includes(i.id)&&r.removeRendition(i)});let r=e=>{let n=e.target.selectedIndex;n!=t.nextLevel&&(t.nextLevel=n)};null==(n=e.videoRenditions)||n.addEventListener("change",r);let o=()=>{for(let t of e.audioTracks)e.removeAudioTrack(t)},s=()=>{(()=>{for(let t of e.videoTracks)e.removeVideoTrack(t)})(),o()};t.once(mn.Events.DESTROYING,()=>{var t,n;s(),null==(t=e.audioTracks)||t.removeEventListener("change",a),null==(n=e.videoRenditions)||n.removeEventListener("change",r)})}var zn=e=>"time"in e?e.time:e.startTime;function Zn(e,t,n,i,a,r){let o=document.createElement("track");return o.kind=t,o.label=n,i&&(o.srclang=i),a&&(o.id=a),r&&(o.default=!0),o.track.mode=["subtitles","captions"].includes(t)?"disabled":"hidden",o.setAttribute("data-removeondestroy",""),e.append(o),o.track}function Xn(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 Jn(e,t,n,i){let a=Xn(e,n,i);return a||(a=Zn(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)=>zn(t)-zn(e)).forEach(t=>{var n,r;let o=t.value,s=zn(t);if("endTime"in t&&null!=t.endTime)null==a||a.addCue(new VTTCue(s,t.endTime,"chapters"===i?o:JSON.stringify(null!=o?o:null)));else{let t=Array.prototype.findIndex.call(null==a?void 0:a.cues,e=>e.startTime>=s),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=s),null==a||a.addCue(new VTTCue(s,d,"chapters"===i?o:JSON.stringify(null!=o?o:null)))}}),e.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a}var ei="cuepoints",ti=Object.freeze({label:ei});async function ni(e,t){return Jn(e,t,(arguments.length>2&&void 0!==arguments[2]?arguments[2]:ti).label,"metadata")}var ii=e=>({time:e.startTime,value:JSON.parse(e.text)});function ai(e){var t,n;let i=Xn(e,(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{label:ei}).label,"metadata");if(null==(t=null==i?void 0:i.activeCues)||!t.length)return;if(1===i.activeCues.length)return ii(i.activeCues[0]);let{currentTime:a}=e,r=Array.prototype.find.call(null!=(n=i.activeCues)?n:[],e=>{let{startTime:t,endTime:n}=e;return t<=a&&n>a});return ii(r||i.activeCues[0])}var ri="chapters",oi=Object.freeze({label:ri}),si=e=>({startTime:e.startTime,endTime:e.endTime,value:e.text});async function li(e,t){return Jn(e,t,(arguments.length>2&&void 0!==arguments[2]?arguments[2]:oi).label,"chapters")}function di(e){var t,n;let i=Xn(e,(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{label:ri}).label,"chapters");if(null==(t=null==i?void 0:i.activeCues)||!t.length)return;if(1===i.activeCues.length)return si(i.activeCues[0]);let{currentTime:a}=e,r=Array.prototype.find.call(null!=(n=i.activeCues)?n:[],e=>{let{startTime:t,endTime:n}=e;return t<=a&&n>a});return si(r||i.activeCues[0])}var ui="v",ci="t",hi="s",mi="d",pi=function(e,t,n,i){let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:!(e=>null==(e=globalThis.navigator)?void 0:e.onLine)();var o,s;if(r){let n,i=qn("Your device appears to be offline",a),r=fn.MEDIA_ERR_NETWORK,o=new fn(i,r,!1,n);return o.errorCategory=t,o.muxCode=bn.NETWORK_OFFLINE,o.data=e,o}let l="status"in e?e.status:e.code,d=Date.now(),u=fn.MEDIA_ERR_NETWORK;
2if(200===l)return;let c=gn(t),h=((e,t)=>{var n,i;let a=gn(e),r=`${a}Token`;return null!=(n=t.tokens)&&n[a]?null==(i=t.tokens)?void 0:i[a]:yn(r,t)?t[r]:void 0})(t,n),m=(e=>e===pn?ui:e===vn?mi:void 0)(t),[p]=Nn(null!=(o=n.playbackId)?o:"");if(!l||!p)return;let v=Kn(h);if(h&&!v){let n=qn("The {tokenNamePrefix}-token provided is invalid or malformed.",a).format({tokenNamePrefix:c}),i=qn("Compact JWT string: {token}",a).format({token:h}),r=new fn(n,u,!0,i);return r.errorCategory=t,r.muxCode=bn.NETWORK_TOKEN_MALFORMED,r.data=e,r}if(l>=500){let e=new fn("",u,null==i||i);return e.errorCategory=t,e.muxCode=bn.NETWORK_UNKNOWN_ERROR,e}if(403===l){if(!v){let n=qn("Authorization error trying to access this {category} URL. If this is a signed URL, you might need to provide a {tokenNamePrefix}-token.",a).format({tokenNamePrefix:c,category:t}),r=qn("Specified playback ID: {playbackId}",a).format({playbackId:p}),o=new fn(n,u,null==i||i,r);return o.errorCategory=t,o.muxCode=bn.NETWORK_TOKEN_MISSING,o.data=e,o}if(function(e){let{exp:t}=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();return!t||1e3*t<n}(v,d)){let n={timeStyle:"medium",dateStyle:"medium"},i=qn("The video\u2019s secured {tokenNamePrefix}-token has expired.",a).format({tokenNamePrefix:c}),r=qn("Expired at: {expiredDate}. Current time: {currentDate}.",a).format({expiredDate:new Intl.DateTimeFormat("en",n).format(null!=(s=v.exp)?s:0),currentDate:new Intl.DateTimeFormat("en",n).format(d)}),o=new fn(i,u,!0,r);return o.errorCategory=t,o.muxCode=bn.NETWORK_TOKEN_EXPIRED,o.data=e,o}if(((e,t)=>{let{sub:n}=e;return n!==t})(v,p)){let n=qn("The video\u2019s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",a).format({tokenNamePrefix:c}),i=qn("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",a).format({tokenNamePrefix:c,playbackId:p,tokenPlaybackId:v.sub}),r=new fn(n,u,!0,i);return r.errorCategory=t,r.muxCode=bn.NETWORK_TOKEN_SUB_MISMATCH,r.data=e,r}if((e=>{let{aud:t}=e;return!t})(v)){let n=qn("The {tokenNamePrefix}-token is formatted with incorrect information.",a).format({tokenNamePrefix:c}),i=qn("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",a).format({tokenNamePrefix:c,expectedAud:m}),r=new fn(n,u,!0,i);return r.errorCategory=t,r.muxCode=bn.NETWORK_TOKEN_AUD_MISSING,r.data=e,r}if(((e,t)=>{let{aud:n}=e;return n!==t})(v,m)){let n=qn("The {tokenNamePrefix}-token is formatted with incorrect information.",a).format({tokenNamePrefix:c}),i=qn("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",a).format({tokenNamePrefix:c,expectedAud:m,aud:v.aud}),r=new fn(n,u,!0,i);return r.errorCategory=t,r.muxCode=bn.NETWORK_TOKEN_AUD_MISMATCH,r.data=e,r}}if(412===l){let r=qn("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",a),o=qn("Specified playback ID: {playbackId}",a).format({playbackId:p}),s=new fn(r,u,null==i||i,o);return s.errorCategory=t,s.muxCode=bn.NETWORK_NOT_READY,s.streamType=n.streamType===Tn.LIVE?"live":n.streamType===Tn.ON_DEMAND?"on-demand":"unknown",s.data=e,s}if(404===l){let n=qn("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",a),r=qn("Specified playback ID: {playbackId}",a).format({playbackId:p}),o=new fn(n,u,null==i||i,r);return o.errorCategory=t,o.muxCode=bn.NETWORK_NOT_FOUND,o.data=e,o}if(400===l){let n=qn("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),r=qn("Specified playback ID: {playbackId}",a).format({playbackId:p}),o=new fn(n,u,null==i||i,r);return o.errorCategory=t,o.muxCode=bn.NETWORK_INVALID_URL,o.data=e,o}let b=new fn("",u,null==i||i);return b.errorCategory=t,b.muxCode=bn.NETWORK_UNKNOWN_ERROR,b.data=e,b},vi=mn.DefaultConfig.capLevelController,bi={"720p":921600,"1080p":2073600,"1440p":4194304,"2160p":8294400};var gi=class e extends vi{constructor(e){super(e)}static setMaxAutoResolution(t,n){n?e.maxAutoResolution.set(t,n):e.maxAutoResolution.delete(t)}getMaxAutoResolution(){var t;let n=this.hls;return null!=(t=e.maxAutoResolution.get(n))?t:void 0}get levels(){var e;return null!=(e=this.hls.levels)?e:[]}
2getValidLevels(e){return this.levels.filter((t,n)=>this.isLevelAllowed(t)&&n<=e)}getMaxLevelCapped(e){let t=this.getValidLevels(e),n=this.getMaxAutoResolution();if(!n)return super.getMaxLevel(e);let i=function(e){let t=e.toLowerCase().trim();return bi[t]}(n);if(!i)return super.getMaxLevel(e);let a=t.filter(e=>e.width*e.height<=i),r=a.findIndex(e=>e.width*e.height===i);if(-1!==r){let e=a[r];return t.findIndex(t=>t===e)}if(0===a.length)return 0;let o=a[a.length-1];return t.findIndex(e=>e===o)}getMaxLevel(t){if(void 0!==this.getMaxAutoResolution())return this.getMaxLevelCapped(t);let n=super.getMaxLevel(t),i=this.getValidLevels(t);if(!i[n])return n;let a=Math.min(i[n].width,i[n].height),r=e.minMaxResolution;return a>=r?n:vi.getMaxLevelByMediaSize(i,r*(16/9),r)}};gi.minMaxResolution=720,gi.maxAutoResolution=new WeakMap;var Ei=gi,fi=(e,t)=>{let n=function(e){let t=new ArrayBuffer(2*e.length),n=new DataView(t);for(let i=0;i<e.length;i++)n.setUint16(2*i,e.charCodeAt(i),!0);return t}(yi(e)),i=new Uint8Array(e),a=new Uint8Array(n),r=new Uint8Array(t),o=i.byteLength+4+r.byteLength+4+a.byteLength,s=new Uint8Array(o),l=0,d=e=>{s.set(e,l),l+=e.byteLength},u=e=>{let t=new DataView(s.buffer),n=e.byteLength;t.setUint32(l,n,!0),l+=4,d(e)};return d(i),u(a),u(r),s},yi=e=>new TextDecoder("utf-16le").decode(e).replace("skd://","").slice(1);var _i=e=>{let{mediaEl:t,getAppCertificate:n,getLicenseKey:i,saveAndDispatchError:a,drmTypeCb:r,fallbackToWebkitFairplay:o}=e,s=null,l=async e=>{try{let n=e.initDataType;if("skd"!==n)return void console.error(`Received unexpected initialization data type "${n}"`);t.mediaKeys||await d(n);let i=e.initData;if(null==i)return void console.error(`Could not start encrypted playback due to missing initData in ${e.type} event`);await u(n,i)}catch(jr){return void a(t,jr)}},d=async e=>{let i=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[e],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(e=>(r(),e)).catch(()=>{let e=qn("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),n=new fn(e,fn.MEDIA_ERR_ENCRYPTED,!0);n.errorCategory=vn,n.muxCode=bn.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,a(t,n)});if(!i)return;let o=await i.createMediaKeys();try{let e=await n();await o.setServerCertificate(e).catch(()=>{let e=qn("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),t=new fn(e,fn.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory=vn,t.muxCode=bn.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(t)})}catch(wa){return void a(t,wa)}await t.setMediaKeys(o)},u=async(e,n)=>{let r=t.mediaKeys.createSession(),l=async e=>{let n=e.message,o=await i(n);try{await r.update(o)}catch{let e=qn("Failed to update DRM license. This may be an issue with the player or your protected content."),n=new fn(e,fn.MEDIA_ERR_ENCRYPTED,!0);n.errorCategory=vn,n.muxCode=bn.ENCRYPTED_UPDATE_LICENSE_FAILED,a(t,n)}},d=()=>{r.keyStatuses.forEach(e=>(e=>{let n;if("internal-error"===e){let e=qn("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");n=new fn(e,fn.MEDIA_ERR_ENCRYPTED,!0),n.errorCategory=vn,n.muxCode=bn.ENCRYPTED_CDM_ERROR}else if("output-restricted"===e||"output-downscaled"===e){let e=qn("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");n=new fn(e,fn.MEDIA_ERR_ENCRYPTED,!1),n.errorCategory=vn,n.muxCode=bn.ENCRYPTED_OUTPUT_RESTRICTED}n&&a(t,n)})(e))};r.addEventListener("keystatuseschange",d),r.addEventListener("message",l);let u=async()=>{r.removeEventListener("keystatuseschange",d),r.removeEventListener("message",l),"webkitCurrentPlaybackTargetIsWireless"in t&&t.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",u),t.removeEventListener("teardown",u),await r.close().catch(e=>{console.warn("There was an error when closing EME session",e)}),s=null};"webkitCurrentPlaybackTargetIsWireless"in t&&t.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",u,{once:!0}),t.addEventListener("teardown",u,{once:!0}),s=u,await r.generateRequest(e,n).catch(async e=>{if("NotSupportedError"!==e.name||!("webkitCurrentPlaybackTargetIsWireless"in t)||!t.webkitCurrentPlaybackTargetIsWireless){let t=qn("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),n=new fn(t,fn.MEDIA_ERR_ENCRYPTED,!0);return n.errorCategory=vn,n.muxCode=bn.ENCRYPTED_GENERATE_REQUEST_FAILED,console.error("Failed to generate license request",e),Promise.reject(n)}console.warn("Failed to generate a DRM license request. Attempting to fallback to Webkit DRM"),null==o||o()})},c=async()=>{t.removeEventListener("encrypted",l),t.removeEventListener("teardown",c),s&&await s(),await t.setMediaKeys(null).cat
2ch(()=>{})};return t.addEventListener("encrypted",l),t.addEventListener("teardown",c,{once:!0}),c},Ti="fairplay",Ai="playready",ki="widevine",wi=e=>{let t=e.split("\n").filter(e=>e.startsWith("#EXT-X-SESSION-DATA"));if(!t.length)return{};let n={};for(let i of t){let e=Si(i),t=e["DATA-ID"];t&&(n[t]={...e})}return{sessionData:n}},Ii=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g;function Si(e){let t=[...e.matchAll(Ii)];return Object.fromEntries(t.map(e=>{let[,t,n]=e;return[t,n]}))}var Ri,Ci,Li,Di,Mi,xi,Ni,Oi=e=>{var t,n,i;let a,r=e.split("\n"),o=null==(n=(null!=(t=r.find(e=>e.startsWith("#EXT-X-PLAYLIST-TYPE")))?t:"").split(":")[1])?void 0:n.trim(),s=Pn(o),l=Un(o);if(s===Tn.LIVE){let e=r.find(e=>e.startsWith("#EXT-X-PART-INF"));if(e)a=2*+e.split(":")[1].split("=")[1];else{let e=r.find(e=>e.startsWith("#EXT-X-TARGETDURATION")),t=null==(i=null==e?void 0:e.split(":"))?void 0:i[1];a=3*+(null!=t?t:6)}}return{streamType:s,targetLiveWindow:l,liveEdgeStartOffset:a}},Pi=async(e,t)=>{if(t===Sn.MP4)return{streamType:Tn.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0,sessionData:void 0};if(t===Sn.M3U8){let t=await fetch(e);if(!t.ok)return Promise.reject(t);let n=await t.text(),i=await((e,t)=>{let n,a=(e=>e.split("\n").find((e,t,n)=>t>0&&n[t-1].startsWith("#EXT-X-STREAM-INF")))(e);if(!a)return Promise.reject(new Error("No media playlist URL found in multivariant playlist"));if(Bn(a)&&!t)return Promise.reject(new Error("masterPlaylistUrl is required to resolve relative media playlist URL"));try{n=Hn(a,t)}catch(i){return Promise.reject(i)}return fetch(n).then(e=>200!==e.status?Promise.reject(e):e.text())})(n,t.url);return{...wi(n),...Oi(i)}}return console.error(`Media type ${t} is an unrecognized or unsupported type for src ${e}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0,sessionData:void 0}},Ui=async(e,t)=>{var n,i;try{let a=await fetch(e);if(!a.ok)throw new Error(`Failed to fetch Mux metadata: ${a.status} ${a.statusText}`);let r=await a.json(),o={};if(null==(n=null==r?void 0:r[0])||!n.metadata)return;for(let e of r[0].metadata)e.key&&e.value&&(o[e.key]=e.value);(null!=(i=$i.get(t))?i:{}).metadata=o;let s=new CustomEvent("muxmetadata");t.dispatchEvent(s)}catch(Ha){console.error(Ha)}},Wi=(e,t,n)=>{var i,a,r,o,s,l,d,u;let{streamType:c,targetLiveWindow:h,liveEdgeStartOffset:m,lowLatency:p}=(e=>{var t;let n,i=e.type,a=Pn(i),r=Un(i),o=!(null==(t=e.partList)||!t.length);return a===Tn.LIVE&&(n=o?2*e.partTarget:3*e.targetduration),{streamType:a,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:o}})(e);if(c===Tn.LIVE){p?(n.config.backBufferLength=null!=(i=n.userConfig.backBufferLength)?i:4,n.config.maxFragLookUpTolerance=null!=(a=n.userConfig.maxFragLookUpTolerance)?a:.001,n.c
2onfig.abrBandWidthUpFactor=null!=(r=n.userConfig.abrBandWidthUpFactor)?r:n.config.abrBandWidthFactor):n.config.backBufferLength=null!=(o=n.userConfig.backBufferLength)?o:8;let e=Object.freeze({get length(){return t.seekable.length},start:e=>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!=(s=$i.get(t))?s:{}).seekable=e}(null!=(l=$i.get(t))?l:{}).liveEdgeStartOffset=m,(null!=(d=$i.get(t))?d:{}).targetLiveWindow=h,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(u=$i.get(t))?u:{}).streamType=c,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Bi=null!=(Ci=null==(Ri=null==globalThis?void 0:globalThis.navigator)?void 0:Ri.userAgent)?Ci:"",Hi=null!=(Mi=null==(Di=null==(Li=null==globalThis?void 0:globalThis.navigator)?void 0:Li.userAgentData)?void 0:Di.platform)?Mi:"",Vi=Bi.toLowerCase().includes("android")||["x11","android"].some(e=>Hi.toLowerCase().includes(e)),$i=new WeakMap,Ki="mux.com",qi=null==(Ni=(xi=mn).isSupported)?void 0:Ni.call(xi),Fi=e=>Vi||!(e=>/^((?!chrome|android).)*safari/i.test(Bi)&&!!e.canPlayType("application/vnd.apple.mpegurl"))(e),Yi=()=>{if("undefined"!=typeof window)return cn.utils.now()},Gi=cn.utils.generateUUID,ji=function(){let{playbackId:e,customDomain:t=Ki,maxResolution:n,minResolution:i,renditionOrder:a,programStartTime:r,programEndTime:o,assetStartTime:s,assetEndTime:l,playbackToken:d,tokens:{playback:u=d}={},extraSourceParams:c={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e)return;let[h,m=""]=Nn(e),p=new URL(`https://stream.${t}/${h}.m3u8${m}`);return u||p.searchParams.has("token")?(p.searchParams.forEach((e,t)=>{"token"!=t&&p.searchParams.delete(t)}),u&&p.searchParams.set("token",u)):(n&&p.searchParams.set("max_resolution",n),i&&(p.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&&p.searchParams.set("rendition_order",a),r&&p.searchParams.set("program_start_time",`${r}`),o&&p.searchParams.set("program_end_time",`${o}`),s&&p.searchParams.set("asset_start_time",`${s}`),l&&p.searchParams.set("asset_end_time",`${l}`),Object.entries(c).forEach(e=>{let[t,n]=e;null!=n&&p.searchParams.set(t,n)})),p.toString()},Qi=e=>{if(!e)return;let[t]=e.split("?");return t||void 0},zi=e=>{if(!e||!e.startsWith("https://stream."))return;let[t]=new URL(e).pathname.slice(1).split(/\.m3u8|\//);return t||void 0},Zi=e=>{var t;return null==(t=$i.get(e))?void 0:t.error},Xi=e=>{var t,n;return null!=(n=null==(t=$i.get(e))?void 0:t.streamType)?n:Tn.UNKNOWN},Ji=e=>{var t,n;return null!=(n=null==(t=$i.get(e))?void 0:t.seekable)?n:e.seekable},ea=.034,ta=function(e,t){return e>t||function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ea;return Math.abs(e-t)<=n}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:ea)},na=(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:o}=r;if(null==o||!o.length)return;if(e.currentTime<e.duration-(r.targetduration+.5))return!1;let s=o[o.length-1];if(e.currentTime<=s.start)return!1;let l=s.start+s.duration/2,d=e.buffered.start(e.buffered.length-1),u=e.buffered.end(e.buffered.length-1);return l>d&&l<u},ia=(e,t)=>e.ended||e.loop?e.ended:!(!t||!na(e,t))||function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ea;return e.paused&&ta(e.currentTime,e.duration,t)}(e),aa=(e,t,n)=>{ra(t,n,e);let{metadata:i={}}=e,{view_session_id:a=Gi()}=i,r=(e=>{var t,n,i;return null!=(t=null==e?void 0:e.metadata)&&t.video_id?e.metadata.video_id:ma(e)&&null!=(i=null!=(n=Qi(e.playbackId))?n:zi(e.src))?i:e.src})(e);i.view_session_id=a,i.video_id=r,e.metadata=i;e.drmTypeCb=e=>{var n;null==(n=t.mux)||n.emit("hb",{view_drm_type:e})},e.fallbackToWebkitFairplay=async()=>{var n;let i=!t.paused,a=t.currentTime;e.useWebkitFairplay=!0;let r=e.muxDataKeepSession;e.muxDataKeepSession=!0;let o=null==(n=$i.get(t))?void 0:n.coreReference;aa(e,t,o),e.muxDataKeepSession=r,e.useWebkitFairplay=!1,i&&await t.play().then(()=>{t.currentTime=a}).catch(()=>{}),t.currentTime=a},$i.set(t,{retryCount:0});let o=sa(e,t),s=((e,t,n)=>{let{preload:i,src:a}=e,r=e=>{null!=e&&["","none","metadata","auto"].includes(e)?t.setAttribute("preload",e):t.removeAttribute("preload")};if(!n)return r(i),r;let o=!1,s=!1,l=n.config.maxBufferLength,d=n.config.maxBufferSize,u=e=>{r(e);let i=null!=e?e:t.preload;s||"none"===i||("metadata"===i?(n.config.maxBufferLength=1,n.config.maxBufferSize=1):(n.config.maxBufferLength=l,n.config.maxBufferSize=d),c())},c=()=>{!o&&a&&(o=!0,n.loadSource(a))};return xn(t,"play",()=>{s=!0,n.config.maxBufferLength=l,n.config.maxBufferSize=d,c()},{once:!0}),u(i),u})(e,t,o);null!=e&&e.muxDataKeepSession&&null!=t&&t.mux&&!t.mux.deleted?o&&t.mux.addHLSJS({hlsjs:o,Hls:o?mn:void 0}):va(e,t,o),ba(e,t,o),async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ti;new Promise(n=>{xn(e,"loadstart",async()=>{let i=await ni(e,[],t);xn(e,"cuechange",()=>{let t=ai(e);if(t){let n=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(n)}},{},i),n(i)})})}(t),async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oi;new Promise(n=>{xn(e,"loadstart",async()=>{let i=await li(e,[],t);xn(e,"cuechange",()=>{let t=di(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,o=Gn(i)?i:!!i,s=()=>{a||xn(t,"playing",()=>{a=!0},{once:!0})};if(s(),xn(t,"loadstart",()=>{a=!1,s(),jn(t,o)},{once:!0}),xn(t,"loadstart",()=>{n||(r=e.streamType&&e.streamType!==Tn.UNKNOWN?e.streamType===Tn.LIVE:!Number.isFinite(t.duration)),jn(t,o)},{once:!0}),n&&n.once(mn.Events.LEVEL_LOADED,(t,n)=>{var i;r=e.streamType&&e.streamType!==Tn.UNKNOWN?e.streamType===Tn.LIVE:null!=(i=n.details.live)&&i}),!o){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&&xn(t,"play",()=>{"metadata"===t.preload?n.once(mn.Events.LEVEL_UPDATED,i):i()},{once:!0})}return e=>{a||(o=Gn(e)?e:!!e,jn(t,o))}})(e,t,o);((e,t,n)=>{let{minPreloadSegments:i}=e;if(null==i||i<=0||!n)return;let a=0,r=!1,o=t.playbackRate||1,s=()=>{0!==t.playbackRate&&(o=t.playbackRate,t.playbackRate=0)};t.playbackRate=0,xn(t,"ratechange",s);let l=(e,n)=>{let{frag:l}=n;r||"main"!==l.type||(a++,a>=i&&(r=!0,t.removeEventListener("ratechange",s),t.playbackRate=o))};n.on(mn.Events.FRAG_BUFFERED,l),t.addEventListener("teardown",()=>{r||(r=!0,n.off(mn.Events.FRAG_BUFFERED,l),t.playbackRate=o)},{once:!0})})(e,t,o),((e,t,n)=>{let{initialEstimateSegments:i}=e;if(null==i||i<=0||!n)return;let a=0;n.on(mn.Events.FRAG_BUFFERED,(e,t)=>{let{frag:r}=t;"main"===r.type&&(a++,a<i&&n.abrController.resetEstimator(n.config.abrEwmaDefaultEstimate))})})(e,0,o);let d={engine:o,setAutoplay:l,setPreload:s},u=$i.get(t);return u&&(u.coreReference=d),d},ra=(e,t,n)=>{let i=null==t?void 0:t.engine;null!=e&&e.mux&&!e.mux.deleted&&(null!=n&&n.muxDataKeepSession?i&&e.mux.removeHLSJS():(e.mux.destroy(),delete e.mux)),i&&(i.detachMedia(),i.destroy()),e&&(e.hasAttribute("src")&&(e.removeAttribute("src"),e.load()),e.removeEventListener("error",Ea),e.removeEventListener("error",ya),e.removeEventListener("durationchange",ga),$i.delete(e),e.dispatchEvent(new Event("teardown")))};function oa(e,t){var n;let i=On(e);if(i!==Sn.M3U8)return!0;let a=!i||null==(n=t.canPlayType(i))||n,{preferPlayback:r}=e,o=r===kn,s=qi&&(r===An||Fi(t));return a&&(o||!s)}var sa=(e,t)=>{let{debug:n,streamType:i,startTime:a=-1,metadata:r,preferCmcd:o,_hlsConfig:s={},maxAutoResolution:l,initialBandwidthEstimateKbps:d}=e,u=On(e)===Sn.M3U8,c=oa(e,t);if(u&&!c&&qi){let u={backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelOnFPSDrop:!0,...null!=d?{abrEwmaDefaultEstimate:1e3*d}:{}},c=la(i),h=da(e),m=[wn.QUERY,wn.HEADER].includes(o)?{useHeaders:o===wn.HEADER,sessionId:null==r?void 0:r.view_session_id,contentId:null==r?void 0:r.video_id}:void 0,p=pa(e,s),v=new mn({debug:n,startPosition:a,cmcd:m,xhrSetup:(e,t)=>{var n,i;if(o&&o!==wn.QUERY)return;let a=Hn(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)},...u,...p,...c,...h,...s});return p.capLevelController===Ei&&void 0!==l&&Ei.setMaxAutoResolution(v,l),v.on(mn.Events.MANIFEST_PARSED,async function(e,n){var i,a;let r=null==(i=n.sessionData)?void 0:i["com.apple.hls.chapters"];(null!=r&&r.URI||null!=r&&r.VALUE.toLocaleLowerCase().startsWith("http"))&&Ui(null!=(a=null==r?void 0:r.URI)?a:null==r?void 0:r.VALUE,t)}),v}},la=e=>e===Tn.LIVE?{backBufferLength:8}:{},da=e=>{let{tokens:{drm:t}={},playbackId:n,drmTypeCb:i}=e,a=Qi(n);return t&&a?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:ca(e,"fairplay"),serverCertificateUrl:ha(e,"fairplay")},"com.widevine.alpha":{licenseUrl:ca(e,"widevine")},"com.microsoft.playready":{licenseUrl:ca(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).then(t=>{let n=(e=>e.includes("fps")?Ti:e.includes("playready")?Ai:e.includes("widevine")?ki:void 0)(e);return null==i||i(n),t}))}:{}},ua=(e,t)=>{let n={mediaEl:t,getAppCertificate:()=>(async e=>{let t=await fetch(e);return 200!==t.status?Promise.reject(t):await t.arrayBuffer()})(ha(e,"fairplay")).catch(t=>{if(t instanceof Response){let n=pi(t,vn,e);return console.error("mediaError",null==n?void 0:n.message,null==n?void 0:n.context),n?Promise.reject(n):Promise.reject(new Error("Unexpected error in app cert request"))}return Promise.reject(t)}),getLicenseKey:t=>(async(e,t)=>{let n=await fetch(t,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:e});if(200!==n.status)return Promise.reject(n);let i=await n.arrayBuffer();return new Uint8Array(i)})(t,ca(e,"fairplay")).catch(t=>{if(t instanceof Response){let n=pi(t,vn,e);return console.error("mediaError",null==n?void 0:n.message,null==n?void 0:n.context),n?Promise.reject(n):Promise.reject(new Error("Unexpected error in license key request"))}return Promise.reject(t)}),saveAndDispatchError:fa,drmTypeCb:()=>{var t;null==(t=e.drmTypeCb)||t.call(e,Ti)}};if(e.useWebkitFairplay)(e=>{let{mediaEl:t,getAppCertificate:n,getLicenseKey:i,saveAndDispatchError:a,drmTypeCb:r}=e;if(!window.WebKitMediaKeys||!("onwebkitneedkey"in t)){console.error("No WebKitMediaKeys. FairPlay may not be supported");let e=qn("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),n=new fn(e,fn.MEDIA_ERR_ENCRYPTED,!0);
2return n.errorCategory=vn,n.muxCode=bn.ENCRYPTED_CDM_ERROR,a(t,n),()=>{}}let o=t,s=n(),l=null,d=e=>{(async()=>{try{o.webkitKeys||u();let t=await s;if(null===e.initData||null==t)return;let n=fi(e.initData,t);c(n)}catch(wa){console.error("Could not start encrypted playback due to exception",wa),a(o,wa)}})()},u=()=>{try{let e=new WebKitMediaKeys("com.apple.fps.1_0");o.webkitSetMediaKeys(e),r()}catch{let e=new fn("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.",fn.MEDIA_ERR_ENCRYPTED,!0);throw e.errorCategory=vn,e.muxCode=bn.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,e}},c=e=>{let n=o.webkitKeys.createSession("application/vnd.apple.mpegurl",e),r=async e=>{try{let t=e.message,a=await i(t);n.update(a)}catch(Na){console.error("Error on FairPlay session message",Na),a(t,Na)}},s=e=>{let n=e.target.error;if(!n)return;console.error(`Internal Webkit Key Session Error - sysCode: ${n.systemCode} code: ${n.code}`);let i=qn("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),r=new fn(i,fn.MEDIA_ERR_ENCRYPTED,!0);r.errorCategory=vn,r.muxCode=bn.ENCRYPTED_CDM_ERROR,a(t,r)},d=()=>{n.removeEventListener("webkitkeymessage",r),n.removeEventListener("webkitkeyerror",s),t.removeEventListener("teardown",d),"webkitCurrentPlaybackTargetIsWireless"in t&&t.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",d),l=null;try{n.close()}catch{}};"webkitCurrentPlaybackTargetIsWireless"in t&&t.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",d,{once:!0}),n.addEventListener("webkitkeymessage",r),n.addEventListener("webkitkeyerror",s),t.addEventListener("teardown",d),l=d},h=()=>{t.removeEventListener("webkitneedkey",d),t.removeEventListener("teardown",h),null==l||l();try{o.webkitSetMediaKeys(null)}catch{}};t.addEventListener("webkitneedkey",d),t.addEventListener("teardown",h,{once:!0})})(n);else{let t={fallbackToWebkitFairplay:async()=>{var t;await i(),null==(t=e.fallbackToWebkitFairplay)||t.call(e)},...n},i=_i(t)}},ca=(e,t)=>{let{playbackId:n,tokens:{drm:i}={},customDomain:a=Ki}=e,r=Qi(n);return`https://license.${a.toLocaleLowerCase().endsWith(Ki)?a:Ki}/license/${t}/${r}?token=${i}`},ha=(e,t)=>{let{playbackId:n,tokens:{drm:i}={},customDomain:a=Ki}=e,r=Qi(n);return`https://license.${a.toLocaleLowerCase().endsWith(Ki)?a:Ki}/appcert/${t}/${r}?token=${i}`},ma=e=>{let{playbackId:t,src:n,customDomain:i}=e;if(t)return!0;if("string"!=typeof n)return!1;let a=null==window?void 0:window.location.href,r=new URL(n,a).hostname.toLocaleLowerCase();return r.includes(Ki)||!!i&&r.includes(i.toLocaleLowerCase())},pa=(e,t)=>{let n={};return n.capLevelToPlayerSize=e.capRenditionToPlayerSize,null==n.capLevelToPlayerSize?(n.capLevelController=Ei,n.capLevelToPlayerSize=!0):n.capLevelController=hn.Rx,n},va=(e,t,n)=>{var i;let{envKey:a,disableTracking:r,muxDataSDK:o=cn,muxDataSDKOptions:s={}}=e,l=ma(e);if(!r&&(a||l)){let{playerInitTime:r,playerSoftwareName:l,playerSoftwareVersion:d,beaconCollectionDomain:u,debug:c,disableCookies:h}=e,m={...e.metadata,video_title:(null==(i=null==e?void 0:e.metadata)?void 0:i.video_title)||void 0},p=t=>"string"!=typeof t.player_error_code&&("function"==typeof e.errorTranslator?e.errorTranslator(t):t);o.monitor(t,{debug:c,beaconCollectionDomain:u,hlsjs:n,Hls:n?mn:void 0,automaticErrorTracking:!1,errorTranslator:p,disableCookies:h,...s,data:{...a?{env_key:a}:{},player_software_name:l,player_software:l,player_software_version:d,player_init_time:r,...m}})}},ba=(e,t,n)=>{var i,a;let r,o,s=oa(e,t),{src:l,customDomain:d=Ki}=e,u=()=>{t.ended||e.disablePseudoEnded||!ia(t,n)||(na(t,n)?t.currentTime=t.buffered.end(t.buffered.length-1):t.dispatchEvent(new Event("ended")))},c=()=>{let e,n,i=Ji(t);i.length>0&&(e=i.start(0),n=i.end(0)),(o!==n||r!==e)&&t.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),r=e,o=n};if(xn(t,"durationchange",c),t&&s){let n=On(e);if("string"==typeof l){if(l.endsWith(".mp4")&&l.includes(d)){let e=zi(l),n=new URL(`https://stream.${d}/${e}/metadata.json`);Ui(n.toString(),t)}let r=()=>{if(Xi(t)!==Tn.LIVE||Number.isFinite(t.duration))return;let e=setInterval(c,1e3);t.addEventListener("teardown",()=>{clearInterval(e)},{once:!0}),xn(t,"durationchange",()=>{Number.isFinite(t.duration)&&clearInterval(e)})},o=async()=>async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:On({src:e});var i,a,r,o;let{streamType:s,targetLiveWindow:l,liveEdgeStartOffset:d,sessionData:u}=await Pi(e,n),c=null==u?void 0:u["com.apple.hls.chapters"];(null!=c&&c.URI||null!=c&&c.VALUE.toLocaleLowerCase().startsWith("http"))&&Ui(null!=(i=c.URI)?i:c.VALUE,t),(null!=(a=$i.get(t))?a:{}).liveEdgeStartOffset=d,(null!=(r=$i.get(t))?r:{}).targetLiveWindow=l,t.dispatchEvent(new CustomEvent("targetlivewindowch
2ange",{composed:!0,bubbles:!0})),(null!=(o=$i.get(t))?o:{}).streamType=s,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))}(l,t,n).then(r).catch(n=>{if(n instanceof Response){let i=pi(n,pn,e);if(i)return void fa(t,i)}else Error});if("none"===t.preload){let e=()=>{o(),t.removeEventListener("loadedmetadata",n)},n=()=>{o(),t.removeEventListener("play",e)};xn(t,"play",e,{once:!0}),xn(t,"loadedmetadata",n,{once:!0})}else o();null!=(i=e.tokens)&&i.drm?ua(e,t):xn(t,"encrypted",()=>{let e=qn("Attempting to play DRM-protected content without providing a DRM token."),n=new fn(e,fn.MEDIA_ERR_ENCRYPTED,!0);n.errorCategory=vn,n.muxCode=bn.ENCRYPTED_MISSING_TOKEN,fa(t,n)},{once:!0}),t.setAttribute("src",l),e.startTime&&((null!=(a=$i.get(t))?a:{}).startTime=e.startTime,t.addEventListener("durationchange",ga,{once:!0}))}else t.removeAttribute("src");t.addEventListener("error",Ea),t.addEventListener("error",ya),t.addEventListener("emptied",()=>{t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})},{once:!0}),xn(t,"pause",u),xn(t,"seeked",u),xn(t,"play",()=>{t.ended||ta(t.currentTime,t.duration)&&(t.currentTime=t.seekable.length?t.seekable.start(0):0)})}else n&&l?(n.once(mn.Events.LEVEL_LOADED,(e,i)=>{Wi(i.details,t,n),c(),Xi(t)===Tn.LIVE&&!Number.isFinite(t.duration)&&(n.on(mn.Events.LEVEL_UPDATED,c),xn(t,"durationchange",()=>{Number.isFinite(t.duration)&&n.off(mn.Events.LEVELS_UPDATED,c)}))}),n.on(mn.Events.ERROR,(i,a)=>{var r,o;let s=Oa(a,e);if(s.muxCode===bn.NETWORK_NOT_READY){let e=null!=(r=$i.get(t))?r:{},i=null!=(o=e.retryCount)?o:0;if(i<6){let r=0===i?5e3:6e4,o=new fn(`Retrying in ${r/1e3} seconds...`,s.code,s.fatal);Object.assign(o,s),fa(t,o);let l=setTimeout(()=>{e.retryCount=i+1,"manifestLoadError"===a.details&&a.url&&n.loadSource(a.url)},r);return void t.addEventListener("teardown",()=>clearTimeout(l),{once:!0})}{e.retryCount=0;let n=new fn('Try again later or <a href="#" onclick="window.location.reload(); return false;" style="color: #4a90e2;">click here to retry</a>',s.code,s.fatal);return Object.assign(n,s),void fa(t,n)}}fa(t,s)}),n.on(mn.Events.MANIFEST_LOADED,()=>{let e=$i.get(t);e&&e.error&&(e.error=null,e.retryCount=0,t.dispatchEvent(new Event("emptied")),t.dispatchEvent(new Event("loadstart")))}),t.addEventListener("error",ya),xn(t,"waiting",u),Qn(e,n),function(e,t){t.on(mn.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(n,i)=>{let{tracks:a}=i;a.forEach(n=>{var i,a;let r=null!=(i=n.subtitleTrack)?i:n.closedCaptions,o=t.subtitleTracks.findIndex(e=>{let{lang:t,name:i,type:a}=e;return t==(null==r?void 0:r.lang)&&i===n.label&&a.toLowerCase()===n.kind}),s=(null!=(a=n._id)?a:n.default)?"default":`${n.kind}${o}`;Zn(e,n.kind,n.label,null==r?void 0:r.lang,s,n.default)})});let n=()=>{if(!t.subtitleTracks.length)return;let n=Array.from(e.textTracks).find(e=>e.id&&"showing"===e.mode&&["subtitles","captions"].includes(e.kind));if(!n)return;let i=t.subtitleTracks[t.subtitleTrack],a=i?i.default?"default":`${t.subtitleTracks[t.subtitleTrack].type.toLowerCase()}${t.subtitleTrack}`:void 0;if(t.subtitleTrack<0||(null==n?void 0:n.id)!==a){let e=t.subtitleTracks.findIndex(e=>{let{lang:t,name:i,type:a,default:r}=e;return"default"===n.id&&r||t==n.language&&i===n.label&&a.toLowerCase()===n.kind});t.subtitleTrack=e}(null==n?void 0:n.id)===a&&n.cues&&Array.from(n.cues).forEach(e=>{n.addCue(e)})};e.textTracks.addEventListener("change",n),t.on(mn.Events.CUES_PARSED,(t,n)=>{let{track:i,cues:a}=n,r=e.textTracks.getTrackById(i);if(!r)return;let o="disabled"===r.mode;o&&(r.mode="hidden"),a.forEach(e=>{var t;null!=(t=r.cues)&&t.getCueById(e.id)||r.addCue(e)}),o&&(r.mode="disabled")}),t.once(mn.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||"chapters"===t.kind)){if(null==(n=t.cues)||!n.length){let n="track";t.kind&&(n+=`[kind="${t.kind}"]`),t.label&&(n+=`[label="${t.label}"]`);let a=e.querySelector(n),r=null!=(i=null==a?void 0:a.getAttribute("src"))?i:"";null==a||a.removeAttribute("src"),setTimeout(()=>{null==a||a.setAttribute("src",r)},0)}"hidden"!==t.mode&&(t.mode="hidden")}})};t.once(mn.Events.MANIFEST_LOADED,i),t.once(mn.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 ga(e){var t;let n=e.target,i=null==(t=$i.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 Ea(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 fn(n,i);if(t.src&&i===fn.MEDIA_ERR_SRC_NOT_SUPPORTED&&t.readyState===HTMLMediaElement.HAVE_NOTHING)setTimeout(()=>{var e;let n=null!=(e=Zi(t))?e:t.error;(null==n?void 0:n.code)===fn.MEDIA_ERR_SRC_NOT_SUPPORTED&&fa(t,a)},500);else{if(t.src&&(i!==fn.MEDIA_ERR_DECODE||void 0!==i))try{let{status:e}=await fetch(t.src);a.data={response:{code:e}}}catch{}fa(t,a)}}function fa(e,t){var n;t.fatal&&((null!=(n=$i.get(e))?n:{}).error=t,e.dispatchEvent(new CustomEvent("error",{detail:t})))}function ya(e){var t,n;if(!(e instanceof CustomEvent)||!(e.detail instanceof fn))return;let i=e.target,a=e.detail;!a||!a.fatal||((null!=(t=$i.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}))}var _a,Ta,Aa,ka,wa,Ia,Sa,Ra,Ca,La,Da,Ma,xa,Na,Oa=(e,t)=>{var n,i,a;e.fatal?console.error("getErrorFromHlsErrorData()",e):t.debug&&console.warn("getErrorFromHlsErrorData() (non-fatal)",e);let r,o={[mn.ErrorTypes.NETWORK_ERROR]:fn.MEDIA_ERR_NETWORK,[mn.ErrorTypes.MEDIA_ERROR]:fn.MEDIA_ERR_DECODE,[mn.ErrorTypes.KEY_SYSTEM_ERROR]:fn.MEDIA_ERR_ENCRYPTED},s=(e=>[mn.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,mn.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(e.details)?fn.MEDIA_ERR_NETWORK:o[e.type])(e);if(s===fn.MEDIA_ERR_NETWORK&&e.response){let a=null!=(n=(e=>e.type===mn.ErrorTypes.KEY_SYSTEM_ERROR?vn:e.type===mn.ErrorTypes.NETWORK_ERROR?pn:void 0)(e))?n:pn;r=null!=(i=pi(e.response,a,t,e.fatal))?i:new fn("",s,e.fatal)}else if(s===fn.MEDIA_ERR_ENCRYPTED)if(e.details===mn.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE){let t=qn("Attempting to play DRM-protected content without providing a DRM token.");r=new fn(t,fn.MEDIA_ERR_ENCRYPTED,e.fatal),r.errorCategory=vn,r.muxCode=bn.ENCRYPTED_MISSING_TOKEN}else if(e.details===mn.ErrorDetails.KEY_SYSTEM_NO_ACCESS){let t=qn("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.");r=new fn(t,fn.MEDIA_ERR_ENCRYPTED,e.fatal),r.errorCategory=vn,r.muxCode=bn.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM}else if(e.details===mn.ErrorDetails.KEY_SYSTEM_NO_SESSION){let e=qn("Failed to generate a DRM license request. This may be an issue with the player or your protected content.");r=new fn(e,fn.MEDIA_ERR_ENCRYPTED,!0),r.errorCategory=vn,r.muxCode=bn.ENCRYPTED_GENERATE_REQUEST_FAILED}else if(e.details===mn.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED){let t=qn("Failed to update DRM license. This may be an issue with the player or your protected content.");r=new fn(t,fn.MEDIA_ERR_ENCRYPTED,e.fatal),r.errorCategory=vn,r.muxCode=bn.ENCRYPTED_UPDATE_LICENSE_FAILED}else if(e.details===mn.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED){let t=qn("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate.");r=new fn(t,fn.MEDIA_ERR_ENCRYPTED,e.fatal),r.errorCategory=vn,r.muxCode=bn.ENCRYPTED_UPDATE_SERVER_CERT_FAILED}else if(e.details===mn.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR){let t=qn("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");r=new fn(t,fn.MEDIA_ERR_ENCRYPTED,e.fatal),r.errorCategory=vn,r.muxCode=bn.ENCRYPTED_CDM_ER
2ROR}else if(e.details===mn.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED){let e=qn("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");r=new fn(e,fn.MEDIA_ERR_ENCRYPTED,!1),r.errorCategory=vn,r.muxCode=bn.ENCRYPTED_OUTPUT_RESTRICTED}else r=new fn(e.error.message,fn.MEDIA_ERR_ENCRYPTED,e.fatal),r.errorCategory=vn,r.muxCode=bn.ENCRYPTED_ERROR;else r=new fn("",s,e.fatal);return r.context||(r.context=`${e.url?`url: ${e.url}\n`:""}${e.response&&(e.response.code||e.response.text)?`response: ${e.response.code}, ${e.response.text}\n`:""}${e.reason?`failure reason: ${e.reason}\n`:""}${e.level?`level: ${e.level}\n`:""}${e.parent?`parent stream controller: ${e.parent}\n`:""}${e.buffer?`buffer length: ${e.buffer}\n`:""}${e.error?`error: ${e.error}\n`:""}${e.event?`event: ${e.event}\n`:""}${e.err?`error message: ${null==(a=e.err)?void 0:a.message}\n`:""}`),r.data=e,r},Pa=n(89521),Ua=e=>{throw TypeError(e)},Wa=(e,t,n)=>t.has(e)||Ua("Cannot "+n),Ba=(e,t,n)=>(Wa(e,t,"read from private field"),n?n.call(e):t.get(e)),Ha=(e,t,n)=>t.has(e)?Ua("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Va=(e,t,n,i)=>(Wa(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),$a=(e,t,n)=>(Wa(e,t,"access private method"),n),Ka=(()=>{try{return"0.31.0"}catch{}return"UNKNOWN"})(),qa={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",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",LOGO:"logo",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size",INITIAL_BANDWIDTH_ESTIMATE_KBPS:"initial-bandwidth-estimate-kbps",INITIAL_ESTIMATE_SEGMENTS:"initial-estimate-segments",MIN_PRELOAD_SEGMENTS:"min-preload-segments"},Fa=Object.values(qa),Ya=Ka,Ga="mux-video",ja=class extends Pa.lB{constructor(){super(),Ha(this,Da),Ha(this,_a),Ha(this,Ta),Ha(this,Aa,{}),Ha(this,ka,{}),Ha(this,wa),Ha(this,Ia),Ha(this,Sa),Ha(this,Ra),Ha(this,Ca,""),Ha(this,La,e=>{var t;let n=(e=>{var t;return null==(t=$i.get(e))?void 0:t.metadata})(this.nativeEl),i=null!=(t=this.metadata)?t:{};this.metadata={...n,...i},"mux-free-plan"===(null==n?void 0:n["com.mux.video.branding"])&&(Va(this,Ca,"default"),this.updateLogo())}),Ha(this,xa),Va(this,Ta,Yi())}static get NAME(){return Ga}static get VERSION(){return Ya}static get observedAttributes(){var e;return[...Fa,...null!=(e=Pa.lB.observedAttributes)?e:[]]}static getLogoHTML(e){return e&&"false"!==e?"default"===e?'\n<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.3
269 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>':`<img part="logo" src="${e}" />`:""}static getTemplateHTML(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return`\n      ${Pa.lB.getTemplateHTML(e)}\n      <style>\n        :host {\n          position: relative;\n        }\n        slot[name="logo"] {\n          display: flex;\n          justify-content: end;\n          position: absolute;\n          top: 1rem;\n          right: 1rem;\n          opacity: 0;\n          transition: opacity 0.25s ease-in-out;\n          z-index: 1;\n        }\n        slot[name="logo"]:has([part="logo"]) {\n          opacity: 1;\n        }\n        slot[name="logo"] [part="logo"] {\n          width: 5rem;\n          pointer-events: none;\n          user-select: none;\n        }\n      </style>\n      <slot name="logo">\n        ${this.getLogoHTML(null!=(t=e[qa.LOGO])?t:"")}\n      </slot>\n    `}get preferCmcd(){var e;return null!=(e=this.getAttribute(qa.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?In.includes(e)?this.setAttribute(qa.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${In.join()}`):this.removeAttribute(qa.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(qa.PLAYER_INIT_TIME)?+this.getAttribute(qa.PLAYER_INIT_TIME):Ba(this,Ta)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(qa.PLAYER_INIT_TIME):this.setAttribute(qa.PLAYER_INIT_TIME,""+ +e))}get playerSoftwareName(){var e;return null!=(e=Ba(this,Sa))?e:Ga}set playerSoftwareName(e){Va(this,Sa,e)}get playerSoftwareVersion(){var e;return null!=(e=Ba(this,Ia))?e:Ya}set playerSoftwareVersion(e){Va(this,Ia,e)}get _hls(){var e;return null==(e=Ba(this,Da,Ma))?void 0:e.engine}get mux(){var e;return null==(e=this.nativeEl)?void 0:e.mux}get error(){var e;return null!=(e=Zi(this.nativeEl))?e:null}get errorTranslator(){return Ba(this,Ra)}set errorTranslator(e){Va(this,Ra,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(qa.TYPE))?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(qa.TYPE,e):this.removeAttribute(qa.TYPE))}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(qa.DEBUG)}set debug(e){e!==this.debug&&(e?this.setAttribute(qa.DEBUG,""):this.removeAttribute(qa.DEBUG))}get disableTracking(){return this.hasAttribute(qa.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(qa.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(qa.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(qa.DISABLE_COOKIES,""):this.removeAttribute(qa.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(qa.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(e){e!==this.disablePseudoEnded&&(e?this.setAttribute(qa.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(qa.DISABLE_PSEUDO_ENDED))}get startTime(){let e=this.getAttribute(qa.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(qa.START_TIME):this.setAttribute(qa.START_TIME,`${e}`))}get initialBandwidthEstimateKbps(){let e=this.getAttribute(qa.INITIAL_BANDWIDTH_ESTIMATE_KBPS);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set initialBandwidthEstimateKbps(e){e!==this.initialBandwidthEstimateKbps&&(null==e?this.removeAttribute(qa.INITIAL_BANDWIDTH_ESTIMATE_KBPS):this.setAttribute(qa.INITIAL_BANDWIDTH_ESTIMATE_KBPS,`${e}`))}get initialEstimateSegments(){let e=this.getAttribute(qa.INITIAL_ESTIMATE_SEGMENTS);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set initialEstimateSegments(e){e!==this.initialEstimateSegments&&(null==e?this.removeAttribute(qa.INITIAL_ESTIMATE_SEGMENTS):this.setAttribute(qa.INITIAL_ESTIMATE_SEGMENTS,`${e}`))}get minPreloadSegments(){let e=this.getAttribute(qa.MIN_PRELOAD_SEGMENTS);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set minPreloadSegments(e){e!==this.minPreloadSegments&&(null==e?this.removeAttribute(qa.MIN_PRELOAD_SEGMENTS):this.setAttribute(qa.MIN_PRELOAD_SEGMENTS,`${e}`))}get playbackId(){var e;return this.hasAttribute(qa.PLAYBACK_ID)?this.getAttribute(qa.PLAYBACK_ID):null!=(e=zi(this.src))?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(qa.PLAYBACK_ID,e):this.removeAttribute(qa.PLAYBACK_ID))}get maxResolution(){var e;return null!=(e=this.getAttribute(qa.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(qa.MAX_RESOLUTION,e):this.removeAttribute(qa.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(qa.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(qa.MIN_RESOLUTION,e):this.removeAttribute(qa.MIN_RESOLUTION))}get maxAutoResolution(){var e;return null!=(e=this.getAttribute(qa.MAX_AUTO_RESOLUTION))?e:void 0}set maxAutoResolution(e){null==e?this.removeAttribute(qa.MAX_AUTO_RESOLUTION):this.setAttribute(qa.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return null!=(e=this.getAttribute(qa.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(qa.RENDITION_ORDER,e):this.removeAttribute(qa.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(qa.PROGRAM_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programStartTime(e){null==e?this.removeAttribute(qa.PROGRAM_START_TIME):this.setAttribute(qa.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(qa.PROGRAM_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programEndTime(e){null==e?this.removeAttribute(qa.PROGRAM_END_TIME):this.setAttribute(qa.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(qa.ASSET_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetStartTime(e){null==e?this.removeAttribute(qa.ASSET_START_TIME):this.setAttribute(qa.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(qa.ASSET_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetEndTime(e){null==e?this.removeAttribute(qa.ASSET_END_TIME):this.setAttribute(qa.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return null!=(e=this.getAttribute(qa.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(qa.CUSTOM_DOMAIN,e):this.removeAttribute(qa.CUSTOM_DOMAIN))}get capRenditionToPlayerSize(){var e;return null!=(null==(e=this._hlsConfig)?void 0:e.capLevelToPlayerSize)?this._hlsConfig.capLevelToPlayerSize:Ba(this,xa)}set capRenditionToPlayerSize(e){Va(this,xa,e)}get drmToken(){var e;return null!=(e=this.getAttribute(qa.DRM_TOKEN))?e:void 0}
2set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(qa.DRM_TOKEN,e):this.removeAttribute(qa.DRM_TOKEN))}get playbackToken(){var e,t,n,i;if(this.hasAttribute(qa.PLAYBACK_TOKEN))return null!=(e=this.getAttribute(qa.PLAYBACK_TOKEN))?e:void 0;if(this.hasAttribute(qa.PLAYBACK_ID)){let[,e]=Nn(null!=(t=this.playbackId)?t:"");return null!=(n=new URLSearchParams(e).get("token"))?n:void 0}return this.src&&null!=(i=new URLSearchParams(this.src).get("token"))?i:void 0}set playbackToken(e){e!==this.playbackToken&&(e?this.setAttribute(qa.PLAYBACK_TOKEN,e):this.removeAttribute(qa.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(qa.PLAYBACK_TOKEN),t=this.getAttribute(qa.DRM_TOKEN);return{...Ba(this,ka),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{}}}set tokens(e){Va(this,ka,null!=e?e:{})}get ended(){return ia(this.nativeEl,this._hls)}get envKey(){var e;return null!=(e=this.getAttribute(qa.ENV_KEY))?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(qa.ENV_KEY,e):this.removeAttribute(qa.ENV_KEY))}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(qa.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(qa.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(qa.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return null!=(e=this.getAttribute(qa.STREAM_TYPE))?e:Xi(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(qa.STREAM_TYPE,e):this.removeAttribute(qa.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(qa.TARGET_LIVE_WINDOW)?+this.getAttribute(qa.TARGET_LIVE_WINDOW):(e=>{var t,n;return null!=(n=null==(t=$i.get(e))?void 0:t.targetLiveWindow)?n:Number.NaN})(this.nativeEl)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(null==e?this.removeAttribute(qa.TARGET_LIVE_WINDOW):this.setAttribute(qa.TARGET_LIVE_WINDOW,""+ +e))}get liveEdgeStart(){var e,t;if(this.hasAttribute(qa.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=$i.get(e))?void 0:t.liveEdgeStartOffset;if("number"!=typeof n)return Number.NaN;let i=Ji(e);return i.length?i.end(i.length-1)-n:Number.NaN})(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(qa.LIVE_EDGE_OFFSET))return+this.getAttribute(qa.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(null==e?this.removeAttribute(qa.LIVE_EDGE_OFFSET):this.setAttribute(qa.LIVE_EDGE_OFFSET,""+ +e))}get seekable(){return Ji(this.nativeEl)}async addCuePoints(e){return ni(this.nativeEl,e)}get activeCuePoint(){return ai(this.nativeEl)}get cuePoints(){return function(e){let t=Xn(e,(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{label:ei}).label,"metadata");return null!=t&&t.cues?Array.from(t.cues,e=>ii(e)):[]}(this.nativeEl)}async addChapters(e){return li(this.nativeEl,e)}get activeChapter(){return di(this.nativeEl)}get chapters(){return function(e){var t;let n=Xn(e,(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{label:ri}).label,"chapters");return null!=(t=null==n?void 0:n.cues)&&t.length?Array.from(n.cues,e=>si(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(qa.PREFER_PLAYBACK);if(e===An||e===kn)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===An||e===kn?this.setAttribute(qa.PREFER_PLAYBACK,e):this.removeAttribute(qa.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![qa.METADATA_URL].includes(e)).reduce((e,t)=>{let n=this.getAttribute(t);
2return null!=n&&(e[t.replace(/^metadata-/,"").replace(/-/g,"_")]=n),e},{}),...Ba(this,Aa)}}set metadata(e){Va(this,Aa,null!=e?e:{}),this.mux&&this.mux.emit("hb",Ba(this,Aa))}get _hlsConfig(){return Ba(this,wa)}set _hlsConfig(e){Va(this,wa,e)}get logo(){var e;return null!=(e=this.getAttribute(qa.LOGO))?e:Ba(this,Ca)}set logo(e){e?this.setAttribute(qa.LOGO,e):this.removeAttribute(qa.LOGO)}load(){aa(this,this.nativeEl,Ba(this,Da,Ma))}unload(){ra(this.nativeEl,Ba(this,Da,Ma),this)}attributeChangedCallback(e,t,n){var i,a;switch(Pa.lB.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,t,n),e){case qa.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=null!=n?n:void 0;break;case qa.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=null!=n?n:void 0;break;case"src":{let e=!!t,i=!!n;!e&&i?$a(this,Da,Na).call(this):e&&!i?this.unload():e&&i&&(this.unload(),$a(this,Da,Na).call(this));break}case"autoplay":if(n===t)break;null==(i=Ba(this,Da,Ma))||i.setAutoplay(this.autoplay);break;case"preload":if(n===t)break;null==(a=Ba(this,Da,Ma))||a.setPreload(n);break;case qa.PLAYBACK_ID:case qa.CUSTOM_DOMAIN:case qa.MAX_RESOLUTION:case qa.MIN_RESOLUTION:case qa.RENDITION_ORDER:case qa.PROGRAM_START_TIME:case qa.PROGRAM_END_TIME:case qa.ASSET_START_TIME:case qa.ASSET_END_TIME:case qa.PLAYBACK_TOKEN:this.src=ji(this);break;case qa.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 qa.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 qa.STREAM_TYPE:(null==n||n!==t)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case qa.TARGET_LIVE_WINDOW:(null==n||n!==t)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case qa.LOGO:(null==n||n!==t)&&this.updateLogo();break;case qa.DISABLE_TRACKING:if(null==n||n!==t){let e=this.currentTime,t=this.paused;this.unload(),$a(this,Da,Na).call(this).then(()=>{this.currentTime=e,t||this.play()})}break;case qa.DISABLE_COOKIES:(null==n||n!==t)&&this.disableCookies&&document.cookie.split(";").forEach(e=>{e.trim().startsWith("muxData")&&(document.cookie=e.replace(/^ +/,"").replace(/=.*/,"=;expires="+(new Date).toUTCString()+";path=/"))});break;case qa.CAP_RENDITION_TO_PLAYER_SIZE:(null==n||n!==t)&&(this.capRenditionToPlayerSize=null!=n||void 0)}}updateLogo(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector('slot[name="logo"]');if(!e)return;let t=this.constructor.getLogoHTML(Ba(this,Ca)||this.logo);e.innerHTML=t}connectedCallback(){var e,t;null==(e=super.connectedCallback)||e.call(this),null==(t=this.nativeEl)||t.addEventListener("muxmetadata",Ba(this,La)),this.nativeEl&&this.src&&!Ba(this,Da,Ma)&&$a(this,Da,Na).call(this)}disconnectedCallback(){var e,t;null==(e=this.nativeEl)||e.removeEventListener("muxmetadata",Ba(this,La)),this.unload(),null==(t=super.disconnectedCallback)||t.call(this)}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{composed:!0,detail:e.detail}))}};function Qa(e){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qa(e)}function za(){return za="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Qa(e)););return e}(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},za.apply(null,arguments)}function Za(e,t,n,i){var a=za(Qa(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a}_a=new WeakMap,Ta=new WeakMap,Aa=new WeakMap,ka=new WeakMap,wa=new WeakMap,Ia=new WeakMap,Sa=new WeakMap,Ra=new WeakMap,Ca=new WeakMap,La=new WeakMap,Da=new WeakSet,Ma=function(){return(e=>{var t;return null==(t=$i.get(e))?void 0:t.coreReference})(this.nativeEl)},xa=new WeakMap,Na=async function(){Ba(this,_a)||(await Va(this,_a,Promise.resolve()),Va(this,_a,null),this.load())};var Xa=n(39790),Ja=n(55149),er=n(54705),tr=n(73205),nr=n(24558),ir=n(26562),ar=n(38458);const rr=new WeakMap;
2class or extends Error{}class sr extends Error{}const lr=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"];function dr(){var e;return null===(e=globalThis.cast)||void 0===e||null===(e=e.framework)||void 0===e?void 0:e.CastContext.getInstance()}function ur(){var e;return null===(e=dr())||void 0===e?void 0:e.getCurrentSession()}function cr(){var e;return null===(e=ur())||void 0===e?void 0:e.getSessionObj().media[0]}function hr(e){return dr().setOptions({receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0,...e})}const mr=new(globalThis.WeakRef?class extends Set{add(e){super.add(new WeakRef(e))}forEach(e){super.forEach(t=>{const n=t.deref();n&&e(n)})}}:Set),pr=new WeakSet;let vr;!function(e){var t,n;null!==(t=globalThis.chrome)&&void 0!==t&&null!==(t=t.cast)&&void 0!==t&&t.isAvailable?null!==(n=globalThis.cast)&&void 0!==n&&n.framework?e():customElements.whenDefined("google-cast-button").then(e):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(e)}}(()=>{var e,t;null!==(e=globalThis.chrome)&&void 0!==e&&null!==(e=e.cast)&&void 0!==e&&e.isAvailable?vr||(vr=cast.framework,dr().addEventListener(vr.CastContextEventType.CAST_STATE_CHANGED,e=>{mr.forEach(t=>{var n,i;return null===(n=(i=rr.get(t)).onCastStateChanged)||void 0===n?void 0:n.call(i,e)})}),dr().addEventListener(vr.CastContextEventType.SESSION_STATE_CHANGED,e=>{mr.forEach(t=>{var n,i;return null===(n=(i=rr.get(t)).onSessionStateChanged)||void 0===n?void 0:n.call(i,e)})}),mr.forEach(e=>{var t,n;return null===(t=(n=rr.get(e)).init)||void 0===t?void 0:t.call(n)})):console.debug("chrome.cast.isAvailable",null===(t=globalThis.chrome)||void 0===t||null===(t=t.cast)||void 0===t?void 0:t.isAvailable)});let br=0;var gr=new WeakMap,Er=new WeakMap,fr=new WeakMap,yr=new WeakMap,_r=new WeakMap,Tr=new WeakMap,Ar=new WeakMap,kr=new WeakMap,wr=new WeakMap,Ir=new WeakSet;class Sr extends EventTarget{constructor(e){super(),(0,Xa.A)(this,Ir),(0,Ja.A)(this,gr,void 0),(0,Ja.A)(this,Er,void 0),(0,Ja.A)(this,fr,void 0),(0,Ja.A)(this,yr,void 0),(0,Ja.A)(this,_r,"disconnected"),(0,Ja.A)(this,Tr,!1),(0,Ja.A)(this,Ar,new Set),(0,Ja.A)(this,kr,new WeakMap),(0,Ja.A)(this,wr,()=>(0,ir.A)(Ir,this,Or).call(this)),(0,nr.A)(gr,this,e),mr.add(this),rr.set(this,{init:()=>(0,ir.A)(Ir,this,xr).call(this),onCastStateChanged:()=>(0,ir.A)(Ir,this,Dr).call(this),onSessionStateChanged:()=>(0,ir.A)(Ir,this,Mr).call(this),getCastPlayer:()=>(0,tr.A)(Ir,this,Rr)}),(0,ir.A)(Ir,this,xr).call(this)}destroy(){var e,t;null===(e=(0,ar.A)(gr,this))||void 0===e||null===(e=e.textTracks)||void 0===e||e.removeEventListener("change",(0,ar.A)(wr,this)),(0,ar.A)(yr,this)&&null!==(t=(0,ar.A)(fr,this))&&void 0!==t&&t.controller&&Object.entries((0,ar.A)(yr,this)).forEach(e=>{let[t,n]=e;(0,ar.A)(fr,this).controller.removeEventListener(t,n)}),(0,ar.A)(gr,this)&&pr.delete((0,ar.A)(gr,this)),(0,nr.A)(Er,this,!1)}get state(){return(0,ar.A)(_r,this)}async watchAvailability(e){if((0,ar.A)(gr,this).disableRemotePlayback)throw new or("disableRemotePlayback attribute is present.");return(0,ar.A)(kr,this).set(e,++br),(0,ar.A)(Ar,this).add(e),queueMicrotask(()=>e((0,ir.A)(Ir,this,Lr).call(this))),br}async cancelWatchAvailability(e){if((0,ar.A)(gr,this).disableRemotePlayback)throw new or("disableRemotePlayback attribute is present.");e?(0,ar.A)(Ar,this).delete(e):(0,ar.A)(Ar,this).clear()}async prompt(){var e,t,n;if((0,ar.A)(gr,this).disableRemotePlayback)throw new or("disableRemotePlayback attribute is present.");if(null===(e=globalThis.chrome)||void 0===e||null===(e=e.cast)||void 0===e||!e.isAvailable)throw new sr("The RemotePlayback API is disabled on this platform.");const i=pr.has((0,ar.A)(gr,this));pr.add((0,ar.A)(gr,this)),hr((0,ar.A)(gr,this).castOptions),Object.entries((0,ar.A)(yr,this)).forEach(e=>{let[t,n]=e;(0,ar.A)(fr,this).controller.addEventListener(t,n)});try{await dr().requestSession()}catch(a){if(i||pr.delete((0,ar.A)(gr,this)),"cancel"===a)return;throw new Error(a)}null===(t=rr.get((0,ar.A)(gr,this)))||void 0===t||null===(n=t.loadOnPrompt)||void 0===n||n.call(t)}}function Rr(e){if(pr.has((0,ar.A)(gr,e)))return(0,ar.A)(fr,e)}function Cr(){pr.has((0,ar.A)(gr,this))&&(Object.entries((0,ar.A)(yr,this)).forEac
2h(e=>{let[t,n]=e;(0,ar.A)(fr,this).controller.removeEventListener(t,n)}),pr.delete((0,ar.A)(gr,this)),(0,ar.A)(gr,this).muted=(0,ar.A)(fr,this).isMuted,(0,ar.A)(gr,this).currentTime=(0,ar.A)(fr,this).savedPlayerState.currentTime,!1===(0,ar.A)(fr,this).savedPlayerState.isPaused&&(0,ar.A)(gr,this).play())}function Lr(){var e;const t=null===(e=dr())||void 0===e?void 0:e.getCastState();return t&&"NO_DEVICES_AVAILABLE"!==t}function Dr(){const e=dr().getCastState();if(pr.has((0,ar.A)(gr,this))&&"CONNECTING"===e&&((0,nr.A)(_r,this,"connecting"),this.dispatchEvent(new Event("connecting"))),!(0,ar.A)(Tr,this)&&null!==e&&void 0!==e&&e.includes("CONNECT")){(0,nr.A)(Tr,this,!0);for(let e of(0,ar.A)(Ar,this))e(!0)}else if((0,ar.A)(Tr,this)&&(!e||"NO_DEVICES_AVAILABLE"===e)){(0,nr.A)(Tr,this,!1);for(let e of(0,ar.A)(Ar,this))e(!1)}}async function Mr(){const{SESSION_RESUMED:e}=vr.SessionState;var t;if(dr().getSessionState()===e&&(0,ar.A)(gr,this).castSrc===(null===(t=cr())||void 0===t?void 0:t.media.contentId)){pr.add((0,ar.A)(gr,this)),Object.entries((0,ar.A)(yr,this)).forEach(e=>{let[t,n]=e;(0,ar.A)(fr,this).controller.addEventListener(t,n)});try{await function(e){return new Promise((t,n)=>{cr().getStatus(e,t,n)})}(new chrome.cast.media.GetStatusRequest)}catch(n){console.error(n)}(0,ar.A)(yr,this)[vr.RemotePlayerEventType.IS_PAUSED_CHANGED](),(0,ar.A)(yr,this)[vr.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}}function xr(){vr&&!(0,ar.A)(Er,this)&&((0,nr.A)(Er,this,!0),hr((0,ar.A)(gr,this).castOptions),(0,ar.A)(gr,this).textTracks.addEventListener("change",(0,ar.A)(wr,this)),(0,ir.A)(Ir,this,Dr).call(this),(0,nr.A)(fr,this,new vr.RemotePlayer),new vr.RemotePlayerController((0,ar.A)(fr,this)),(0,nr.A)(yr,this,{[vr.RemotePlayerEventType.IS_CONNECTED_CHANGED]:e=>{let{value:t}=e;!0===t?((0,nr.A)(_r,this,"connected"),this.dispatchEvent(new Event("connect"))):((0,ir.A)(Ir,this,Cr).call(this),(0,nr.A)(_r,this,"disconnected"),this.dispatchEvent(new Event("disconnect")))},[vr.RemotePlayerEventType.DURATION_CHANGED]:()=>{(0,ar.A)(gr,this).dispatchEvent(new Event("durationchange"))},[vr.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{(0,ar.A)(gr,this).dispatchEvent(new Event("volumechange"))},[vr.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{(0,ar.A)(gr,this).dispatchEvent(new Event("volumechange"))},[vr.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{var e;null!==(e=(0,tr.A)(Ir,this,Rr))&&void 0!==e&&e.isMediaLoaded&&(0,ar.A)(gr,this).dispatchEvent(new Event("timeupdate"))},[vr.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{(0,ar.A)(gr,this).dispatchEvent(new Event("resize"))},[vr.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{(0,ar.A)(gr,this).dispatchEvent(new Event(this.paused?"pause":"play"))},[vr.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var e,t;(null===(e=(0,tr.A)(Ir,this,Rr))||void 0===e?void 0:e.playerState)!==chrome.cast.media.PlayerState.PAUSED&&(0,ar.A)(gr,this).dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[null===(t=(0,tr.A)(Ir,this,Rr))||void 0===t?void 0:t.playerState]))},[vr.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{var e;null!==(e=(0,tr.A)(Ir,this,Rr))&&void 0!==e&&e.isMediaLoaded&&(await Promise.resolve(),(0,ir.A)(Ir,this,Nr).call(this))}}))}function Nr(){(0,ir.A)(Ir,this,Or).call(this)}async function Or(){var e,t;if(!(0,tr.A)(Ir,this,Rr))return;const n=((null===(e=(0,ar.A)(fr,this).mediaInfo)||void 0===e?void 0:e.tracks)??[]).filter(e=>{let{type:t}=e;return t===chrome.cast.media.TrackType.TEXT}),i=[...(0,ar.A)(gr,this).textTracks].filter(e=>{let{kind:t}=e;return"subtitles"===t||"captions"===t}),a=n.map(e=>{let{language:t,name:n,trackId:a}=e;const{mode:r}=i.find(e=>e.language===t&&e.label===n)??{};return!!r&&{mode:r,trackId:a}}).filter(Boolean),r=a.filter(e=>{let{mode:t}=e;return"showing"!==t}).map(e=>{let{trackId:t}=e;return t}),o=a.find(e=>{let{mode:t}=e;return"showing"===t}),s=(null===(t=ur())||void 0===t||null===(t=t.getSessionObj().media[0])||void 0===t?void 0:t.activeTrackIds)??[];let l=s;s.length&&(l=l.filter(e=>!r.includes(e))),null!==o&&void 0!==o&&o.trackId&&(l=[...l,o.trackId]),l=[...new Set(l)];if(!((e,t)=>e.length===t.length&&e.every(e=>t.includes(e)))(s,l))try{const e=new chrome.cast.media.EditTracksInfoRequest(l);await function(e){return new Promise((t,n)=>{cr().editTracksInfo(e,t,n)})}(e)}catch(d){console.error(d)}}const Pr=e=>{var t,n,i,a,r,o;return n=new WeakMap,i=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakSet,t=class extends e{constructor(){super(...arguments),(0,Xa.A)(this,o),(0,Ja.A)(this,n,{paused:!1}),(0,Ja.A)(this,i,{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}),(0,Ja.A)(this,a,void 0),(0,Ja.A)(this,r,void 0)}get remote(){if((0,ar.A)(r,this))return(0,ar.A)(r,this);if(globalThis.chrome){if(!this.isConnected)return;return this.disableRemotePlayback||function(){var e;
2const t="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(null!==(e=globalThis.chrome)&&void 0!==e&&e.cast||document.querySelector(`script[src="${t}"]`))return;const n=document.createElement("script");n.src=t,document.head.append(n)}(),rr.set(this,{loadOnPrompt:()=>(0,ir.A)(o,this,l).call(this)}),(0,nr.A)(r,this,new Sr(this))}return super.remote}disconnectedCallback(){var e,t;null===(e=(0,ar.A)(r,this))||void 0===e||e.destroy(),(0,nr.A)(r,this,null),rr.delete(this),null===(t=super.disconnectedCallback)||void 0===t||t.call(this)}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),"cast-receiver"===e&&n)(0,ar.A)(i,this).receiverApplicationId=n;else if((0,tr.A)(o,this,s))switch(e){case"cast-stream-type":case"cast-src":this.load()}}async load(){var e;if(!(0,tr.A)(o,this,s))return super.load();const t=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);t.customData=this.castCustomData;const i=[...this.querySelectorAll("track")].filter(e=>{let{kind:t,src:n}=e;return n&&("subtitles"===t||"captions"===t)}),a=[];let r=0;i.length&&(t.tracks=i.map(e=>{const t=++r;0===a.length&&"showing"===e.track.mode&&a.push(t);const 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?t.streamType=chrome.cast.media.StreamType.LIVE:t.streamType=chrome.cast.media.StreamType.BUFFERED,t.metadata=new chrome.cast.media.GenericMediaMetadata,t.metadata.title=this.title,t.metadata.images=[{url:this.poster}];if(await async function(e){if(!e)return!1;if(/\.m3u8?(\?.*)?$/i.test(e))return!0;if(e.startsWith("blob:"))return!1;try{const t=(await fetch(e,{method:"HEAD"})).headers.get("Content-Type");return lr.some(e=>t===e)}catch(t){return console.error("Error while trying to get the Content-Type of the manifest",t),!1}}(this.castSrc)){t.contentType||(t.contentType="application/x-mpegURL");const e=await async function(e){if(e&&!e.startsWith("blob:"))try{const t=await(await fetch(e)).text();let n=t;const i=function(e){const t=e.split("\n"),n=[];for(let i=0;i<t.length;i++)if(t[i].trim().startsWith("#EXT-X-STREAM-INF")){const e=t[i+1]?t[i+1].trim():"";e&&!e.startsWith("#")&&n.push(e)}return n}(t);if(i.length>0){const t=new URL(i[0],e).toString();n=await(await fetch(t)).text()}return function(e){if(!e)return;const t=e.match(/\.([a-zA-Z0-9]+)(?:\?.*)?$/);return t?t[1]:null}(n.split("\n").find(e=>!e.trim().startsWith("#")&&""!==e.trim()))}catch(t){return void console.error("Error while trying to parse the manifest playlist",t)}}(this.castSrc);(null===e||void 0===e?void 0:e.includes("m4s"))||(null===e||void 0===e?void 0:e.includes("mp4"))?(t.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,t.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):null!==e&&void 0!==e&&e.includes("ts")&&(t.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,t.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.TS)}const l=new chrome.cast.media.LoadRequest(t);l.currentTime=super.currentTime??0,l.autoplay=!(0,ar.A)(n,this).paused,l.activeTrackIds=a,await(null===(e=ur())||void 0===e?void 0:e.loadMedia(l)),this.dispatchEvent(new Event("volumechange"))}play(){if(!(0,tr.A)(o,this,s))return super.play();var e;(0,tr.A)(o,this,s).isPaused&&(null===(e=(0,tr.A)(o,this,s).controller)||void 0===e||e.playOrPause())}pause(){var e;(0,tr.A)(o,this,s)?(0,tr.A)(o,this,s).isPaused||null===(e=(0,tr.A)(o,this,s).controller)||void 0===e||e.playOrPause():super.pause()}get castOptions(){return(0,ar.A)(i,this)}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(e){this.castReceiver!=e&&this.setAttribute("cast-receiver",`${e}`)}get castSrc(){var e;const t=this.currentSrc,n=null!==t&&void 0!==t&&t.startsWith("blob:")?void 0:t;return this.getAttribute("cast-src")??(null===(e=this.querySelector("source"))||void 0===e?void 0:e.src)??n??this.getAttribute("src")??void 0}set castSrc(e){this.castSrc!=e&&this.setAttribute("cast-src",`${e}`)}get castContentType(){return this.getAttribute("cast-content-type")??void 0}set castContentType(e){this.setAttribute("cast-content-type",`${e}`)}get castStreamType(){return this.getAttribute("cast-stream-type")??this.streamType??void 0}set castStreamType(e){this.setAttribute("cast-stream-type",`${e}`)}get castCustomData(){return(0,ar.A)(a,this)}set castCustomData(e){const t=typeof e;["object","undefined"].includes(t)?(0,nr.A)(a,this,e):console.error(`castCustomData must be nullish or an object but value was of type ${t}`)}get readyState(){if((0,tr.A)(o,this,s))switch((0,tr.A)(o,this,s).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(0,tr.A)(o,this,s)?(0,tr.A)(o,this,s).isPaused:super.paused}get muted(){var e;return(0,tr.A)(o,this,s)?null===(e=(0,tr.A)(o,this,s))||void 0===e?void 0:e.isMuted:super.muted}set muted(e){var t;(0,tr.A)(o,this,s)?(e&&!(0,tr.A)(o,this,s).isMuted||!e&&(0,tr.A)(o,this,s).isMuted)&&(null===(t=(0,tr.A)(o,this,s).controller)||void 0===t||t.muteOrUnmute()):super.muted=e}get volume(){var e;return(0,tr.A)(o,this,s)?(null===(e=(0,tr.A)(o,this,s))||void 0===e?void 0:e.volumeLevel)??1:super.volume}set volume(e){var t;if((0,tr.A)(o,this,s))return(0,tr.A)(o,this,s).volumeLevel=+e,void(null===(t=(0,tr.A)(o,this,s).controller)||void 0===t||t.setVolumeLevel());super.volume=e}get duration(){var e,t;return(0,tr.A)(o,this,s)&&null!==(e=(0,tr.A)(o,this,s))&&void 0!==e&&e.isMediaLoaded?(null===(t=(0,tr.A)(o,this,s))||void 0===t?void 0:t.duration)??NaN:super.duration}get currentTime(){var e,t;return(0,tr.A)(o,this,s)&&null!==(e=(0,tr.A)(o,this,s))&&void 0!==e&&e.isMediaLoaded?(null===(t=(0,tr.A)(o,this,s))||void 0===t?void 0:t.currentTime)??0:super.currentTime}set currentTime(e){var t;if((0,tr.A)(o,this,s))return(0,tr.A)(o,this,s).currentTime=e,void(null===(t=(0,tr.A)(o,this,s).controller)||void 0===t||t.seek());super.currentTime=e}},(0,er.A)(t,"observedAttributes",[...e.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"]),t;function s(e){var t,n;return null===(t=rr.get(e.remote))||void 0===t||null===(n=t.getCastPlayer)||void 0===n?void 0:n.call(t)}async function l(){(0,ar.A)(n,this).paused=Za(t.prototype,"paused",this),Za(t.prototype,"pause",this,2)([]),this.muted=Za(t.prototype,"muted",this);try{await this.load()}catch(e){console.error(e)}}};var Ur=n(32089),Wr=e=>{throw TypeError(e)}
2,Br=(e,t,n)=>t.has(e)||Wr("Cannot "+n),Hr=(e,t,n)=>(Br(e,t,"read from private field"),n?n.call(e):t.get(e)),Vr=(e,t,n)=>t.has(e)?Wr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$r=(e,t,n,i)=>(Br(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Kr=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends Kr{}globalThis.DocumentFragment=e}var qr,Fr=class extends Kr{},Yr={get(e){},define(e,t,n){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(Fr)};qr=new WeakMap;var Gr,jr={document:{createElement:function(e,t){return new Fr}},DocumentFragment:DocumentFragment,customElements:Yr,CustomEvent:class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Vr(this,qr),$r(this,qr,null==t?void 0:t.detail)}get detail(){return Hr(this,qr)}initCustomEvent(){}},EventTarget:Kr,HTMLElement:Fr,HTMLVideoElement:class extends Kr{}},Qr="undefined"==typeof window||"undefined"==typeof globalThis.customElements,zr=Qr?jr:globalThis,Zr=(Qr||globalThis.document,class extends(Pr((0,Ur.u6)(ja))){constructor(){super(...arguments),Vr(this,Gr)}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 muxCastCustomData(){return{mux:{playbackId:this.playbackId,minResolution:this.minResolution,maxResolution:this.maxResolution,renditionOrder:this.renditionOrder,customDomain:this.customDomain,tokens:{drm:this.drmToken},envKey:this.envKey,metadata:this.metadata,disableCookies:this.disableCookies,disableTracking:this.disableTracking,beaconCollectionDomain:this.beaconCollectionDomain,startTime:this.startTime,preferCmcd:this.preferCmcd}}}get castCustomData(){var e;return null!=(e=Hr(this,Gr))?e:this.muxCastCustomData}set castCustomData(e){$r(this,Gr,e)}});Gr=new WeakMap,zr.customElements.get("mux-video")||(zr.customElements.define("mux-video",Zr),zr.MuxVideoElement=Zr);const Xr={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",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"},Jr={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},eo={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_P
2LAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_LOOP:"mediaLoop",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},to=Object.entries(eo),no=to.reduce((e,t)=>{let[n,i]=t;return e[n]=i.toLowerCase(),e},{}),io=to.reduce((e,t)=>{let[n,i]=t;return e[n]=i.toLowerCase(),e},{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),ao=(Object.entries(io).reduce((e,t)=>{let[n,i]=t;const a=no[n];return a&&(e[i]=a),e},{userinactivechange:"userinactive"}),Object.entries(no).reduce((e,t)=>{let[n,i]=t;const a=io[n];return a&&(e[i]=a),e},{userinactive:"userinactivechange"})),ro={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},oo="disabled",so="showing",lo="mouse",uo="pen",co="touch",ho="unavailable",mo="unsupported",po={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},vo="fullscreen";function bo(e){if(e){const{id:t,width:n,height:i}=e;return[t,n,i].filter(e=>null!=e).join(":")}}function go(e){if(e){const[t,n,i]=e.split(":");return{id:t,width:+n,height:+i}}}function Eo(e){if(e){const{id:t,kind:n,language:i,label:a}=e;return[t,n,i,a].filter(e=>null!=e).join(":")}}function fo(e){if(e){const[t,n,i,a]=e.split(":");return{id:t,kind:n,language:i,label:a}}}function yo(e){return e.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function _o(e){return"number"===typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}function To(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}const Ao=e=>new Promise(t=>setTimeout(t,e));var ko;const wo={en:{"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","S
2ource Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it.",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds","{time} remaining":"{time} remaining","{currentTime} of {totalTime}":"{currentTime} of {totalTime}","video not loaded, unknown time.":"video not loaded, unknown time."}};let Io=(null==(ko=globalThis.navigator)?void 0:ko.language)||"en";const So=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(e=>{var t,n,i;const[a]=Io.split("-");return(null==(t=wo[Io])?void 0:t[e])||(null==(n=wo[a])?void 0:n[e])||(null==(i=wo.en)?void 0:i[e])||e})(e).replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):`{${n}}`)},Ro=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],Co=e=>{if(!_o(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} ${So(1===e?Ro[t].singular:Ro[t].plural)}`)(e,t)).filter(e=>e).join(", ");return n?So("{time} remaining",{time:a}):a};function Lo(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 o=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=a=i="0"),r=r>0||s>0?r+":":"",a=((r||o>=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;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){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 Do{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class Mo extends Do{}class xo extends Mo{constructor(){super(...arguments),this.role=null}}const No={createElement:function(){return new Oo.HTMLElement},createElementNS:function(){return new Oo.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},Oo={ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},document:No,Node:Mo,Element:xo,HTMLElement:class extends xo{constructor(){super(...arguments),this.innerHTML=""}get content(){return new Oo.DocumentFragment}},DocumentFragment:class extends Do{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem:e=>null,setItem(e,t){},removeItem(e){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia:e=>({matches:!1,media:e}),DOMParser:class{parseFromString(e,t){return{body:{textContent:e}}}}},Po="global"in globalThis&&(null==globalThis?void 0:globalThis.global)===globalThis||"undefined"===typeof window||"undefined"===typeof window.customElements,Uo=Object.keys(Oo).every(e=>e in globalThis),Wo=Po&&!Uo?Oo:globalThis,Bo=Po&&!Uo?No:globalThis.document,Ho=new WeakMap,Vo=e=>{let t=Ho.get(e);return t||Ho.set(e,t=new Set),t},$o=new Wo.ResizeObserver(e=>{for(const t of e)for(const e of Vo(t.target))e(t)});function Ko(e,t){Vo(e).add(t),$o.observe(e)}function qo(e,t){const n=Vo(e);n.delete(t),n.size||$o.unobserve(e)}function Fo(e){const t={};for(const n of e)t[n.name]=n.value;return t}function Yo(e){var t;return null!=(t=Go(e))?t:Zo(e,"media-controller")}function Go(e){var t;const{MEDIA_CONTROLLER:n}=Jr,i=e.getAttribute(n);if(i)return null==(t=Jo(e))?void 0:t.getElementById(i)}const jo=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".value";const i=e.querySelector(n);i&&(i.textContent=t)},Qo=(e,t)=>((e,t)=>{const n=`slot[name="${t}"]`,i=e.shadowRoot.querySelector(n);return i?i.children:[]})(e,t)[0],zo=(e,t)=>!(!e||!t)&&(!!(null==e?void 0:e.contains(t))||zo(e,t.getRootNode().host)),Zo=(e,t)=>{if(!e)return null;const n=e.closest(t);return n||Zo(e.getRootNode().host,t)};function Xo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;var t;const n=null==e?void 0:e.activeElement;return n?null!=(t=Xo(n.shadowRoot))?t:n:null}function Jo(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 es(e){let{depth:t=3,checkOpacity:n=!0,checkVisibilityCSS:i=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.checkVisibility)return e.checkVisibility({checkOpacity:n,checkVisibilityCSS:i});let a=e;for(;a&&t>0;){const e=getComputedStyle(a);if(n&&"0"===e.opacity||i&&"hidden"===e.visibility||"none"===e.display)return!1;a=a.parentElement,t--}return!0}function ts(e,t){const n=function(e,t){var n,i;let a;for(a of null!=(n=e.querySelectorAll("style:not([media])"))?n:[]){let e;try{e=null==(i=a.sheet)?void 0:i.cssRules}catch{continue}for(const n of null!=e?e:[])if(t(n.selectorText))return n}}(e,e=>e===t);return n||ns(e,t)}function ns(e,t){var n,i;const a=null!=(n=e.querySelectorAll("style:not([media])"))?n:[],r=null==a?void 0:a[a.length-1];if(!(null==r?void 0:r.sheet))return console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}};const o=null==r?void 0:r.sheet.insertRule(`${t}{}`,r.sheet.cssRules.length);return null==(i=r.sheet.cssRules)?void 0:i[o]}function is(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN;const i=e.getAttribute(t);return null!=i?+i:n}function as(e,t,n){const i=+n;null==n||Number.isNaN(i)?e.hasAttribute(t)&&e.removeAttribute(t):is(e,t,void 0)!==i&&e.setAttribute(t,`${i}`)}function rs(e,t){return e.hasAttribute(t)}function os(e,t,n){null!=n?rs(e,t)!=n&&e.toggleAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function ss(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var i;return null!=(i=e.getAttribute(t))?i:n}
2function ls(e,t,n){if(null==n)return void(e.hasAttribute(t)&&e.removeAttribute(t));const i=`${n}`;ss(e,t,void 0)!==i&&e.setAttribute(t,i)}var ds,us=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},cs=(e,t,n)=>(us(e,t,"read from private field"),n?n.call(e):t.get(e)),hs=(e,t,n,i)=>(us(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class ms extends Wo.HTMLElement{constructor(){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,ds,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Jr.MEDIA_CONTROLLER,no.MEDIA_PAUSED]}attributeChangedCallback(e,t,n){var i,a,r,o,s;e===Jr.MEDIA_CONTROLLER&&(t&&(null==(a=null==(i=cs(this,ds))?void 0:i.unassociateElement)||a.call(i,this),hs(this,ds,null)),n&&this.isConnected&&(hs(this,ds,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(s=null==(o=cs(this,ds))?void 0:o.associateElement)||s.call(o,this)))}connectedCallback(){var e,t;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),hs(this,ds,function(e){var t;const n=e.getAttribute(Jr.MEDIA_CONTROLLER);if(n)return null==(t=e.getRootNode())?void 0:t.getElementById(n);return Zo(e,"media-controller")}(this)),this.getAttribute(Jr.MEDIA_CONTROLLER)&&(null==(t=null==(e=cs(this,ds))?void 0:e.associateElement)||t.call(e,this)),cs(this,ds)&&(cs(this,ds).addEventListener("pointerdown",this),cs(this,ds).addEventListener("click",this),cs(this,ds).hasAttribute("tabindex")||(cs(this,ds).tabIndex=0))}disconnectedCallback(){var e,t,n,i;this.getAttribute(Jr.MEDIA_CONTROLLER)&&(null==(t=null==(e=cs(this,ds))?void 0:e.unassociateElement)||t.call(e,this)),null==(n=cs(this,ds))||n.removeEventListener("pointerdown",this),null==(i=cs(this,ds))||i.removeEventListener("click",this),hs(this,ds,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:o}=this.getBoundingClientRect(),s=t-i,l=n-a;if(s<0||l<0||s>r||l>o||0===r&&0===o)return;const d=this._pointerType||"mouse";if(this._pointerType=void 0,d===co)return void this.handleTap(e);if(d===lo||d===uo)return void this.handleMouseClick(e)}}get mediaPaused(){return rs(this,no.MEDIA_PAUSED)}set mediaPaused(e){os(this,no.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){const t=this.mediaPaused?Xr.MEDIA_PLAY_REQUEST:Xr.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new Wo.CustomEvent(t,{composed:!0,bubbles:!0}))}}ds=new WeakMap,ms.shadowRootOptions={mode:"open"},ms.getTemplateHTML=function(e){return"\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  "},Wo.customElements.get("media-gesture-receiver")||Wo.customElements.define("media-gesture-receiver",ms);var ps,vs,bs,gs,Es,fs,ys,_s,Ts,As,ks,ws,Is,Ss,Rs,Cs,Ls,Ds,Ms,xs,Ns=ms,Os=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ps=(e,t,n)=>(Os(e,t,"read from private field"),n?n.call(e):t.get(e)),Us=(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)},Ws=(e,t,n,i)=>(Os(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Bs=(e,t,n)=>(Os(e,t,"access private method"),n);const Hs={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};const Vs=Object.values(no);function $s(e,t){var n;if(!e.isConnected)return;const i=function(e){const t=e.split(/\s+/);return Object.fromEntries(t.map(e=>e.split(":")))}(null!=(n=e.getAttribute(Hs.BREAKPOINTS))?n:"sm:384 md:576 lg:768 xl:960"),a=function(e,t){return Object.keys(e).filter(n=>t>=parseInt(e[n]))}(i,t);let r=!1;
2if(Object.keys(i).forEach(t=>{a.includes(t)?e.hasAttribute(`breakpoint${t}`)||(e.setAttribute(`breakpoint${t}`,""),r=!0):e.hasAttribute(`breakpoint${t}`)&&(e.removeAttribute(`breakpoint${t}`),r=!0)}),r){const t=new CustomEvent(io.BREAKPOINTS_CHANGE,{detail:a});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(io.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class Ks extends Wo.HTMLElement{constructor(){if(super(),Us(this,Ts),Us(this,ks),Us(this,Is),Us(this,Rs),Us(this,Ls),Us(this,ps,void 0),Us(this,vs,0),Us(this,bs,null),Us(this,gs,null),Us(this,Es,void 0),this.breakpointsComputed=!1,Us(this,fs,e=>{const t=this.media;for(const n of e){if("childList"!==n.type)continue;const e=n.removedNodes;for(const i of e){if("media"!=i.slot||n.target!=this)continue;let e=n.previousSibling&&n.previousSibling.previousElementSibling;if(e&&t){let t="media"!==e.slot;for(;null!==(e=e.previousSibling);)"media"==e.slot&&(t=!1);t&&this.mediaUnsetCallback(i)}else this.mediaUnsetCallback(i)}if(t)for(const i of n.addedNodes)i===t&&this.handleMediaUpdated(t)}}),Us(this,ys,!1),Us(this,_s,e=>{Ps(this,ys)||(setTimeout(()=>{!function(e){$s(e.target,e.contentRect.width)}(e),Ws(this,ys,!1)},0),Ws(this,ys,!0))}),Us(this,Ms,void 0),Us(this,xs,()=>{Ps(this,Ms).assignedElements({flatten:!0}).length?this.handleMediaUpdated(this.media):Ps(this,bs)&&this.mediaUnsetCallback(Ps(this,bs))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}Ws(this,ps,new MutationObserver(Ps(this,fs)))}static get observedAttributes(){return[Hs.AUTOHIDE,Hs.GESTURES_DISABLED].concat(Vs).filter(e=>![no.MEDIA_RENDITION_LIST,no.MEDIA_AUDIO_TRACK_LIST,no.MEDIA_CHAPTERS_CUES,no.MEDIA_WIDTH,no.MEDIA_HEIGHT,no.MEDIA_ERROR,no.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,n){e.toLowerCase()==Hs.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&&(Ws(this,bs,e),e.localName.includes("-")&&await Wo.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;Ps(this,ps).observe(this,{childList:!0,subtree:!0}),Ko(this,Ps(this,_s));const t=null!=this.getAttribute(Hs.AUDIO),n=So(t?"audio player":"video player");this.setAttribute("role","region"),this.setAttribute("aria-label",n),this.handleMediaUpdated(this.media),this.setAttribute(Hs.USER_INACTIVE,""),$s(this,this.getBoundingClientRect().width);const i=this.querySelector(":scope > slot[slot=media]");i&&(Ws(this,Ms,i),Ps(this,Ms).addEventListener("slotchange",Ps(this,xs))),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=Wo.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;qo(this,Ps(this,_s)),clearTimeout(Ps(this,gs)),Ps(this,ps).disconnect(),this.media&&this.mediaUnsetCallback(this.media),null==(e=Wo.window)||e.removeEventListener("mouseup",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointermove",this),this.removeEventListener("pointerup",this),this.removeEventListener("mouseleave",this),this.removeEventListener("keyup",this),Ps(this,Ms)&&(Ps(this,Ms).removeEventListener("slotchange",Ps(this,xs)),Ws(this,Ms,null)),Ws(this,ys,!1)}mediaSetCallback(e){}mediaUnsetCallback(e){Ws(this,bs,null)}handleEvent(e){switch(e.type){case"pointerdown":Ws(this,vs,e.timeStamp);break;case"pointermove":Bs(this,Ts,As).call(this,e);break;case"pointerup":Bs(this,ks,ws).call(this,e);break;case"mouseleave":Bs(this,Is,Ss).call(this);break;case"mouseup":this.removeAttribute(Hs.KEYBOARD_CONTROL);break;case"keyup":Bs(this,Ls,Ds).call(this),this.setAttribute(Hs.KEYBOARD_CONTROL,"")}}set autohide(e){const t=Number(e);Ws(this,Es,isNaN(t)?0:t)}get autohide(){return(void 0===Ps(this,Es)?2:Ps(this,Es)).toString()}get breakpoints(){return ss(this,Hs.BREAKPOINTS)}set breakpoints(e){ls(this,Hs.BREAKPOINTS,e)}get audio(){return rs(this,Hs.AUDIO)}set audio(e){os(this,Hs.AUDIO,e)}get gesturesDisabled(){return rs(this,Hs.GESTURES_DISABLED)}set gesturesDisabled(e){os(this,Hs.GESTURES_DISABLED,e)}get keyboardControl(){return rs(this,Hs.KEYBOARD_CONTROL)}set keyboardControl(e){os(this,Hs.KEYBOARD_CONTROL,e)}get noAutohide(){return rs(this,Hs.NO_AUTOHIDE)}set noAutohide(e){os(this,Hs.NO_AUTOHIDE,e)}get autohideOverControls(){return rs(this,Hs.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){os(this,Hs.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return rs(this,Hs.USER_INACTIVE)}set userInteractive(e){os(this,Hs.USER_INACTIVE,e)}}ps=new WeakMap,vs=new WeakMap,bs=new WeakMap,gs=new WeakMap,Es=new WeakMap,fs=new WeakMap,ys=new WeakMap,_s=new WeakMap,Ts=new WeakSet,As=function(e){if("mouse"!==e.pointerType){const t=250;if(e.timeStamp-Ps(this,vs)<t)return}Bs(this,Rs,Cs).call(this),clearTimeout(Ps(this,gs));const t=this.hasAttribute(Hs.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(e.target)||t)&&Bs(this,Ls,Ds).call(this)},ks=new WeakSet,ws=function(e){if("touch"===e.pointerType){const t=!this.hasAttribute(Hs.USER_INACTIVE);[this,this.media].includes(e.target)&&t?Bs(this,Is,Ss).call(this):Bs(this,Ls,Ds).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&Bs(this,Ls,Ds).call(this)},Is=new WeakSet,Ss=function(){if(Ps(this,Es)<0)return;if(this.hasAttribute(Hs.USER_INACTIVE))return;this.setAttribute(Hs.USER_INACTIVE,"");const e=new Wo.CustomEvent(io.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},Rs=new WeakSet,Cs=function(){if(!this.hasAttribute(Hs.USER_INACTIVE))return;this.removeAttribute(Hs.USER_INACTIVE);const e=new Wo.CustomEvent(io.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},Ls=new WeakSet,Ds=function(){Bs(this,Rs,Cs).call(this),clearTimeout(Ps(this,gs));const e=parseInt(this.autohide);e<0||Ws(this,gs,setTimeout(()=>{Bs(this,Is,Ss).call(this)},1e3*e))},Ms=new WeakMap,xs=new WeakMap,Ks.shadowRootOptions={mode:"open"},Ks.getTemplateHTML=function(e){return`\n    <style>\n      \n      :host([${no.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        overflow: hidden;\n      }\n\n      :host(:not([${Hs.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([${Hs.AUDIO}]) slot[name=media] {\n        display: var(--media-slot-display, none);\n      }\n\n      \n      :host([${Hs.AUDIO}]) [part~=layer][part~=gesture-layer] {\n        height: 0;\n        display: block;\n      }\n\n      \n      :host(:not([${Hs.AUDIO}])[${Hs.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),\n          :host(:not([${Hs.AUDIO}])[${Hs.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([role=dialog]):not([hidden])) {\n        pointer-events: auto;\n      }\n\n      :host(:not([${Hs.AUDIO}])) *[part~=layer][part~=centered-layer] {\n        align-items: center;\n        justify-content: center;\n      }\n\n      :host(:not([${Hs.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),\n      :host(:not([${Hs.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([${Hs.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([${Hs.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) {\n        opacity: 1;\n        transition: var(--media-control-transition-in, opacity 0.25s);\n      }\n\n      \n      :host([${Hs.USER_INACTIVE}]:not([${no.MEDIA_PAUSED}]):not([${no.MEDIA_IS_AIRPLAYING}
2]):not([${no.MEDIA_IS_CASTING}]):not([${Hs.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${Hs.NO_AUTOHIDE}]):not([role=dialog])) {\n        opacity: 0;\n        transition: var(--media-control-transition-out, opacity 1s);\n      }\n\n      :host([${Hs.USER_INACTIVE}]:not([${Hs.NO_AUTOHIDE}]):not([${no.MEDIA_PAUSED}]):not([${no.MEDIA_IS_CASTING}]):not([${Hs.AUDIO}])) ::slotted([slot=media]) {\n        cursor: none;\n      }\n\n      :host([${Hs.USER_INACTIVE}][${Hs.AUTOHIDE_OVER_CONTROLS}]:not([${Hs.NO_AUTOHIDE}]):not([${no.MEDIA_PAUSED}]):not([${no.MEDIA_IS_CASTING}]):not([${Hs.AUDIO}])) * {\n        --media-cursor: none;\n        cursor: none;\n      }\n\n\n      ::slotted(media-control-bar)  {\n        align-self: stretch;\n      }\n\n      \n      :host(:not([${Hs.AUDIO}])[${no.MEDIA_HAS_PLAYED}]) slot[name=poster] {\n        display: none;\n      }\n\n      ::slotted([role=dialog]) {\n        width: 100%;\n        height: 100%;\n        align-self: center;\n      }\n\n      ::slotted([role=menu]) {\n        align-self: end;\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">\n        <template shadowrootmode="${Ns.shadowRootOptions.mode}">\n          ${Ns.getTemplateHTML({})}\n        </template>\n      </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    <slot name="dialog" part="layer dialog-layer"></slot>\n  `},Wo.customElements.get("media-container")||Wo.customElements.define("media-container",Ks);var qs,Fs,Ys,Gs,js,Qs,zs=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Zs=(e,t,n)=>(zs(e,t,"read from private field"),n?n.call(e):t.get(e)),Xs=(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)},Js=(e,t,n,i)=>(zs(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class el{constructor(e,t){let{defaultValue:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{defaultValue:void 0};Xs(this,js),Xs(this,qs,void 0),Xs(this,Fs,void 0),Xs(this,Ys,void 0),Xs(this,Gs,new Set),Js(this,qs,e),Js(this,Fs,t),Js(this,Ys,new Set(n))}[Symbol.iterator](){return Zs(this,js,Qs).values()}get length(){return Zs(this,js,Qs).size}get value(){var e;return null!=(e=[...Zs(this,js,Qs)].join(" "))?e:""}set value(e){var t;e!==this.value&&(Js(this,Gs,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...Zs(this,js,Qs)][e]}values(){return Zs(this,js,Qs).values()}forEach(e,t){Zs(this,js,Qs).forEach(e,t)}add(){for(var e,t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];i.forEach(e=>Zs(this,Gs).add(e)),(""!==this.value||(null==(e=Zs(this,qs))?void 0:e.hasAttribute(`${Zs(this,Fs)}`)))&&(null==(t=Zs(this,qs))||t.setAttribute(`${Zs(this,Fs)}`,`${this.value}`))}remove(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach(e=>Zs(this,Gs).delete(e)),null==(e=Zs(this,qs))||e.setAttribute(`${Zs(this,Fs)}`,`${this.value}`)}contains(e){return Zs(this,js,Qs).has(e)}toggle(e,t){return"undefined"!==typeof 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}}qs=new WeakMap,Fs=new WeakMap,Ys=new WeakMap,Gs=new WeakMap,js=new WeakSet,Qs=function(){return Zs(this,Gs).size?Zs(this,Gs):Zs(this,Ys)};const tl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n,i]=e.split(":"),a=i?decodeURIComponent(i):void 0;return{kind:"cc"===t?ro.CAPTIONS:ro.SUBTITLES,language:n,label:a}},nl=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(/\s+/)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").map(t=>{const n=tl(t);return{...e,...n}})},il=e=>e?Array.isArray(e)?e.map(e=>"string"===typeof e?tl(e):e):"string"===typeof e?nl(e):[e]:[],al=function(){let{kind:e,label:t,language:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{kind:"subtitles"};return t?`${"captions"===e?"cc":"sb"}:${n}:${encodeURIComponent(t)}`:n},rl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.prototype.map.call(e,al).join(" ")},ol=e=>{const t=Object.entries(e).map(e=>{let[t,n]=e;return((e,t)=>n=>n[e]===t)(t,n)});return e=>t.every(t=>t(e))},sl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=il(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map(ol);Array.from(t).filter(e=>n.some(t=>
2t(e))).forEach(t=>{t.mode=e})},ll=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>!0;if(!(null==e?void 0:e.textTracks))return[];const n="function"===typeof t?t:ol(t);return Array.from(e.textTracks).filter(n)},dl=e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(no.MEDIA_SUBTITLES_SHOWING)},ul="exitFullscreen"in Bo?"exitFullscreen":"webkitExitFullscreen"in Bo?"webkitExitFullscreen":"webkitCancelFullScreen"in Bo?"webkitCancelFullScreen":void 0,cl="fullscreenElement"in Bo?"fullscreenElement":"webkitFullscreenElement"in Bo?"webkitFullscreenElement":void 0,hl=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[cl];return!i&&"webkitDisplayingFullscreen"in n&&"webkitPresentationMode"in n&&n.webkitDisplayingFullscreen&&n.webkitPresentationMode===vo?n:i})(e);if(!r)return!1;if(r===a||r===n)return!0;if(r.localName.includes("-")){let e=r.shadowRoot;if(!(cl in e))return zo(r,a);for(;null==e?void 0:e[cl];){if(e[cl]===a)return!0;e=null==(t=e[cl])?void 0:t.shadowRoot}}return!1},ml="fullscreenEnabled"in Bo?"fullscreenEnabled":"webkitFullscreenEnabled"in Bo?"webkitFullscreenEnabled":void 0;let pl;const vl=()=>{var e,t;return pl||(pl=null==(t=null==(e=Bo)?void 0:e.createElement)?void 0:t.call(e,"video"),pl)},bl=(e,t)=>new Promise(n=>{e.addEventListener("volumechange",()=>n(!0),{signal:t})}),gl=async(e,t)=>{for(let n=0;n<10;n++){if(e.volume===t)return!1;await Ao(10)}return e.volume!==t},El=/.*Version\/.*Safari\/.*/.test(Wo.navigator.userAgent),fl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vl();return(!Wo.matchMedia("(display-mode: standalone)").matches||!El)&&"function"===typeof(null==e?void 0:e.requestPictureInPicture)},yl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vl();return(e=>{const{documentElement:t,media:n}=e;return!!(null==t?void 0:t[ml])||n&&"webkitSupportsFullscreen"in n})({documentElement:Bo,media:e})},_l=yl(),Tl=fl(),Al=!!Wo.WebKitPlaybackTargetAvailabilityEvent,kl=!!Wo.chrome,wl=e=>ll(e.media,e=>[ro.SUBTITLES,ro.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),Il=e=>ll(e.media,e=>e.mode===so&&[ro.SUBTITLES,ro.CAPTIONS].includes(e.kind)),Sl=(e,t)=>{const n=wl(e),i=Il(e),a=!!i.length;if(n.length)if(!1===t||a&&!0!==t)sl(oo,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=Wo.localStorage.getItem("media-chrome-pref-subtitles-lang"),i=e?[e,...Wo.navigator.languages]:Wo.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:o,kind:s}=t;sl(oo,n,i),sl(so,n,[{language:r,label:o,kind:s}])}},Rl=(e,t)=>e===t||null!=e&&null!=t&&(typeof e===typeof t&&(!("number"!==typeof e||!Number.isNaN(e)||!Number.isNaN(t))||"object"===typeof e&&(Array.isArray(e)?Cl(e,t):Object.entries(e).every(e=>{let[n,i]=e;return n in t&&Rl(i,t[n])})))),Cl=(e,t)=>{const n=Array.isArray(e),i=Array.isArray(t);return n===i&&(!n&&!i||e.length===t.length&&e.every((e,n)=>Rl(e,t[n])))},Ll=Object.values(po);let Dl;const Ml=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vl();if(!e)return!1;const t=e.volume;e.volume=t/2+.1;const n=new AbortController,i=await Promise.race([bl(e,n.signal),gl(e,t)]);return n.abort(),i}().then(e=>(Dl=e,Dl)),xl=new Wo.DOMParser,Nl=e=>e&&xl.parseFromString(e,"text/html").body.textContent||e,Ol={mediaError:{get(e,t){const{media:n}=e;if("playing"!==(null==t?void 0:t.type))return null==n?void 0:n.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(e,t){var n;const{media:i}=e;if("playing"!==(null==t?void 0:t.type))return null==(n=null==i?void 0:i.error)?void 0:n.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(e,t){var n,i;const{media:a}=e;if("playing"!==(null==t?void 0:t.type))return null!=(i=null==(n=null==a?void 0:a.error)?void 0:n.message)?i:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.videoWidth)?t:0},mediaEvents:["resize"]},mediaHeight:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.videoHeight)?t:0},mediaEvents:["resize"]},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,options:{noMutedPref:i}={}}=t;if(n){n.muted=e;try{const t=null!==Wo.localStorage.getItem("media-chrome-pref-muted"),a=n.hasAttribute("muted");if(i)return void(t&&Wo.localStorage.removeItem("media-chrome-pref-muted"));if(a&&!t)return;Wo.localStorage.setItem("media-chrome-pref-muted",e?"true":"false")}catch(a){console.debug("Error setting muted pref",a)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{const{options:{noMutedPref:n}}=t,{media:i}=t;if(i&&!i.muted&&!n)try{const n="true"===Wo.localStorage.getItem("media-chrome-pref-muted");Ol.mediaMuted.set(n,t),e(n)}catch(a){console.debug("Error getting muted pref",a)}}]},mediaLoop:{get(e){const{media:t}=e;return null==t?void 0:t.loop},set(e,t){const{media:n}=t;n&&(n.loop=e)},mediaEvents:["medialooprequest"]},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,options:{noVolumePref:i}={}}=t;if(n){try{null==e?Wo.localStorage.removeItem("media-chrome-pref-volume"):n.hasAttribute("muted")||i||Wo.localStorage.setItem("media-chrome-pref-volume",e.toString())}catch(a){console.debug("Error setting volume pref",a)}Number.isFinite(+e)&&(n.volume=+e)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{const{options:{noVolumePref:n}}=t;if(!n)try{const{media:n}=t;if(!n)return;const i=Wo.localStorage.getItem("media-chrome-pref-volume");if(null==i)return;Ol.mediaVolume.set(+i,t),e(+i)}catch(i){console.debug("Error getting volume pref",i)}}]},mediaVolumeLevel:{get(e){const{media:t}=e;return"undefined"==typeof(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&&_o(e)&&(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=[po.LIVE,po.ON_DEMAND].includes(n)?n:void 0;if(!t)return i;const{streamType:a}=t;if(Ll.includes(a))return a===po.UNKNOWN?i:a;const r=t.duration;return r===1/0?po.LIVE:Number.isFinite(r)?po.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=Ol.mediaStreamType.get(e);return null!=n&&!Number.isNaN(n)||i!==po.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(!(Ol.mediaStreamType.get(e)===po.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=>wl(e).map(e=>{let{kind:t,label:n,language:i}=e;return{kind:t,label:n,language:i}}),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:e=>Il(e).map(e=>{let{kind:t,label:n,language:i}=e;return{kind:t,label:n,language:i}}),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var n,i;const{media:a,options:r}=t;if(!a)return;const o=e=>{var n;if(!r.defaultSubtitles)return;e&&![ro.CAPTIONS,ro.SUBTITLES].includes(null==(n=null==e?void 0:e.track)?void 0:n.kind)||Sl(t,!0)};return a.addEventListener("loadstart",o),null==(n=a.textTracks)||n.addEventListener("addtrack",o),null==(i=a.textTracks)||i.addEventListener("removetrack",o),()=>{var e,t;a.removeEventListener("loadstart",o),null==(e=a.textTracks)||e.removeEventListener("addtrack",o),null==(t=a.textTracks)||t.removeEventListener("removetrack",o)}}]},mediaChaptersCues:{get(e){var t;const{media:n}=e;if(!n)return[];const[i]=ll(n,{kind:ro.CHAPTERS});return Array.from(null!=(t=null==i?void 0:i.cues)?t:[]).map(e=>{let{text:t,startTime:n,endTime:i}=e;return{text:Nl(t),startTime:n,endTime:i}})},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var n;const{media:i}=t;if(!i)return;const a=i.querySelector('track[kind="chapters"][default][src]'),r=null==(n=i.shadowRoot)?void 0:n.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return null==a||a.addEventListener("load",e),null==r||r.addEventListener("load",e),()=>{null==a||a.removeEventListener("load",e),null==r||r.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("-"))&&zo(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(!Bo.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 Bo.pictureInPictureElement&&Bo.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(const a of n.audioTracks)a.enabled=i==a.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get:e=>hl(e),set(e,t,n){var i,a;if(e){(e=>{var t;const{media:n,fullscreenElement:i}=e;try{const e=i&&"requestFullscreen"in i?"requestFullscreen":i&&"webkitRequestFullScreen"in i?"webkitRequestFullScreen":void 0;if(e){const n=null==(t=i[e])?void 0:t.call(i);if(n instanceof Promise)return n.catch(()=>{})}else(null==n?void 0:n.webkitEnterFullscreen)?n.webkitEnterFullscreen():(null==n?void 0:n.requestFullscreen)&&n.requestFullscreen()}catch(a){console.error(a)}})(t);n.detail&&!(null==(i=t.media)?void 0:i.inert)&&(null==(a=t.media)||a.focus())}else(e=>{var t;const{documentElement:n}=e;if(ul){const e=null==(t=null==n?void 0:n[ul])?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:()=>!1,set(e,t){const{media:n}=t;
2n&&(n.webkitShowPlaybackTargetPicker&&Wo.WebKitPlaybackTargetAvailabilityEvent?n.webkitShowPlaybackTargetPicker():console.error("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(!_l||!yl(t))return mo}},mediaPipUnavailable:{get(e){const{media:t}=e;return Tl&&fl(t)?(null==t?void 0:t.disablePictureInPicture)?ho:void 0:mo}},mediaVolumeUnavailable:{get(e){const{media:t}=e;if(!1===Dl||void 0==(null==t?void 0:t.volume))return mo},stateOwnersUpdateHandlers:[e=>{null==Dl&&Ml.then(t=>e(t?void 0:mo))}]},mediaCastUnavailable:{get(e){let{availability:t="not-available"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;const{media:i}=e;return kl&&(null==(n=null==i?void 0:i.remote)?void 0:n.state)?null!=t&&"available"!==t?ho:void 0:mo},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)=>Al?"not-available"===(null==t?void 0:t.availability)?ho:void 0:mo,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:ho:mo},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?ho:void 0:mo},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(e){const{options:{mediaLang:t}={}}=e;return null!=t?t:"en"}}},Pl={[Xr.MEDIA_PREVIEW_REQUEST](e,t,n){let{detail:i}=n;var a,r,o;const{media:s}=t,l=null!=i?i:void 0;let d,u;if(s&&null!=l){const[e]=ll(s,{kind:ro.METADATA,label:"thumbnails"}),t=Array.prototype.find.call(null!=(a=null==e?void 0:e.cues)?a:[],(e,t,n)=>0===t?e.endTime>l:t===n.length-1?e.startTime<=l:e.startTime<=l&&e.endTime>l);if(t){const e=/'^(?:[a-z]+:)?\/\//i.test(t.text)||null==(r=null==s?void 0:s.querySelector('track[label="thumbnails"]'))?void 0:r.src,n=new URL(t.text,e);u=new URLSearchParams(n.hash).get("#xywh").split(",").map(e=>+e),d=n.href}}const c=e.mediaDuration.get(t);let h=null==(o=e.mediaChaptersCues.get(t).find((e,t,n)=>t===n.length-1&&c===e.endTime?e.startTime<=l&&e.endTime>=l:e.startTime<=l&&e.endTime>l))?void 0:o.text;return null!=i&&null==h&&(h=""),{mediaPreviewTime:l,mediaPreviewImage:d,mediaPreviewCoords:u,mediaPreviewChapter:h}},[Xr.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[Xr.MEDIA_PLAY_REQUEST](e,t){var n,i,a,r;const o=e.mediaStreamType.get(t)===po.LIVE,s=!(null==(n=t.options)?void 0:n.noAutoSeekToLive),l=e.mediaTargetLiveWindow.get(t)>0;if(o&&s&&!l){const n=null==(i=e.mediaSeekable.get(t))?void 0:i[1];if(n){const i=n-(null!=(r=null==(a=t.options)?void 0:a.seekToLiveOffset)?r:0);e.mediaCurrentTime.set(i,t)}}e.mediaPaused.set(!1,t)},[Xr.MEDIA_PLAYBACK_RATE_REQUEST](e,t,n){let{detail:i}=n;const a=i;e.mediaPlaybackRate.set(a,t)},[Xr.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[Xr.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[Xr.MEDIA_LOOP_REQUEST](e,t,n){let{detail:i}=n;const a=!!i;return e.mediaLoop.set(a,t),{mediaLoop:a}},[Xr.MEDIA_VOLUME_REQUEST](e,t,n){let{detail:i}=n;const a=i;a&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(a,t)},[Xr.MEDIA_SEEK_REQUEST](e,t,n){let{detail:i}=n;const a=i;e.mediaCurrentTime.set(a,t)},[Xr.MEDIA_SEEK_TO_LIVE_REQUEST](e,t){var n,i,a;const r=null==(n=e.mediaSeekable.get(t))?void 0:n[1];if(Number.isNaN(Number(r)))return;const o=r-(null!=(a=null==(i=t.options)?void 0:i.seekToLiveOffset)?a:0);e.mediaCurrentTime.set(o,t)},[Xr.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,n){let{detail:i}=n;var a;const{options:r}=t,o=wl(t),s=il(i),l=null==(a=s[0])?void 0:a.language;l&&!r.noSubtitlesLangPref&&Wo.localStorage.setItem("media-chrome-pref-subtitles-lang",l),sl(so,o,s)},[Xr.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,n){let{detail:i}=n;const a=wl(t);sl(oo,a,null!=i?i:[])},[Xr.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,n){let{detail:i}=n;Sl(t,i)},[Xr.MEDIA_RENDITION_REQUEST](e,t,n){let{detail:i}=n;const a=i;e.mediaRenditionSelected.set(a,t)},[Xr.MEDIA_AUDIO_TRACK_REQUEST](e,t,n){let{detail:i}=n;const a=i;e.mediaAudioTrackEnabled.set(a,t)},[Xr.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[Xr.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[Xr.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t,n){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t,n)},[Xr.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[Xr.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[Xr.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[Xr.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}},Ul=e=>{let{media:t,fullscreenElement:n,documentElement:i,stateMediator:a=Ol,requestMap:r=Pl,options:o={},monitorStateOwnersOnlyWithSubscriptions:s=!0}=e;const l=[],d={options:{...o}};let u=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0});const c=e=>{void 0!=e&&(Rl(e,u)||(u=Object.freeze({...u,...e}
2),l.forEach(e=>e(u))))},h=()=>{const e=Object.entries(a).reduce((e,t)=>{let[n,{get:i}]=t;return e[n]=i(d),e},{});c(e)},m={};let p;const v=async(e,t)=>{var n,i,r,o,u,v,b,g,E,f,y,_,T,A,k,w;const I=!!p;if(p={...d,...null!=p?p:{},...e},I)return;await async function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];await Promise.all(t.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof Wo.HTMLElement))return;const t=e.localName;if(!t.includes("-"))return;const n=Wo.customElements.get(t);n&&e instanceof n||(await Wo.customElements.whenDefined(t),Wo.customElements.upgrade(e))}))}(...Object.values(e));const S=l.length>0&&0===t&&s,R=d.media!==p.media,C=(null==(n=d.media)?void 0:n.textTracks)!==(null==(i=p.media)?void 0:i.textTracks),L=(null==(r=d.media)?void 0:r.videoRenditions)!==(null==(o=p.media)?void 0:o.videoRenditions),D=(null==(u=d.media)?void 0:u.audioTracks)!==(null==(v=p.media)?void 0:v.audioTracks),M=(null==(b=d.media)?void 0:b.remote)!==(null==(g=p.media)?void 0:g.remote),x=d.documentElement!==p.documentElement,N=!!d.media&&(R||S),O=!!(null==(E=d.media)?void 0:E.textTracks)&&(C||S),P=!!(null==(f=d.media)?void 0:f.videoRenditions)&&(L||S),U=!!(null==(y=d.media)?void 0:y.audioTracks)&&(D||S),W=!!(null==(_=d.media)?void 0:_.remote)&&(M||S),B=!!d.documentElement&&(x||S),H=N||O||P||U||W||B,V=0===l.length&&1===t&&s,$=!!p.media&&(R||V),K=!!(null==(T=p.media)?void 0:T.textTracks)&&(C||V),q=!!(null==(A=p.media)?void 0:A.videoRenditions)&&(L||V),F=!!(null==(k=p.media)?void 0:k.audioTracks)&&(D||V),Y=!!(null==(w=p.media)?void 0:w.remote)&&(M||V),G=!!p.documentElement&&(x||V),j=$||K||q||F||Y||G;if(!(H||j))return Object.entries(p).forEach(e=>{let[t,n]=e;d[t]=n}),h(),void(p=void 0);Object.entries(a).forEach(e=>{let[t,{get:n,mediaEvents:i=[],textTracksEvents:a=[],videoRenditionsEvents:r=[],audioTracksEvents:o=[],remoteEvents:s=[],rootEvents:l=[],stateOwnersUpdateHandlers:u=[]}]=e;m[t]||(m[t]={});const h=e=>{const i=n(d,e);c({[t]:i})};let v;v=m[t].mediaEvents,i.forEach(e=>{v&&N&&(d.media.removeEventListener(e,v),m[t].mediaEvents=void 0),$&&(p.media.addEventListener(e,h),m[t].mediaEvents=h)}),v=m[t].textTracksEvents,a.forEach(e=>{var n,i;v&&O&&(null==(n=d.media.textTracks)||n.removeEventListener(e,v),m[t].textTracksEvents=void 0),K&&(null==(i=p.media.textTracks)||i.addEventListener(e,h),m[t].textTracksEvents=h)}),v=m[t].videoRenditionsEvents,r.forEach(e=>{var n,i;v&&P&&(null==(n=d.media.videoRenditions)||n.removeEventListener(e,v),m[t].videoRenditionsEvents=void 0),q&&(null==(i=p.media.videoRenditions)||i.addEventListener(e,h),m[t].videoRenditionsEvents=h)}),v=m[t].audioTracksEvents,o.forEach(e=>{var n,i;v&&U&&(null==(n=d.media.audioTracks)||n.removeEventListener(e,v),m[t].audioTracksEvents=void 0),F&&(null==(i=p.media.audioTracks)||i.addEventListener(e,h),m[t].audioTracksEvents=h)}),v=m[t].remoteEvents,s.forEach(e=>{var n,i;v&&W&&(null==(n=d.media.remote)||n.removeEventListener(e,v),m[t].remoteEvents=void 0),Y&&(null==(i=p.media.remote)||i.addEventListener(e,h),m[t].remoteEvents=h)}),v=m[t].rootEvents,l.forEach(e=>{v&&B&&(d.documentElement.removeEventListener(e,v),m[t].rootEvents=void 0),G&&(p.documentElement.addEventListener(e,h),m[t].rootEvents=h)});const b=m[t].stateOwnersUpdateHandlers;if(b&&H){(Array.isArray(b)?b:[b]).forEach(e=>{"function"===typeof e&&e()})}if(j){const e=u.map(e=>e(h,p)).filter(e=>"function"===typeof e);m[t].stateOwnersUpdateHandlers=1===e.length?e[0]:e}else H&&(m[t].stateOwnersUpdateHandlers=void 0)}),Object.entries(p).forEach(e=>{let[t,n]=e;d[t]=n}),h(),p=void 0};return v({media:t,fullscreenElement:n,documentElement:i,options:o}),{dispatch(e){const{type:t,detail:n}=e;r[t]&&null==u.mediaErrorCode?c(r[t](a,d,e)):"mediaelementchangerequest"===t?v({media:n}):"fullscreenelementchangerequest"===t?v({fullscreenElement:n}):"documentelementchangerequest"===t?v({documentElement:n}):"optionschangerequest"===t&&(Object.entries(null!=n?n:{}).forEach(e=>{let[t,n]=e;d.options[t]=n}),h())},getState:()=>u,subscribe:e=>(v({},l.length+1),l.push(e),e(u),()=>{const t=l.indexOf(e);t>=0&&(v({}
2,l.length-1),l.splice(t,1))})}};var Wl,Bl,Hl,Vl,$l,Kl,ql,Fl,Yl,Gl,jl,Ql,zl,Zl,Xl,Jl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ed=(e,t,n)=>(Jl(e,t,"read from private field"),n?n.call(e):t.get(e)),td=(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)},nd=(e,t,n,i)=>(Jl(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),id=(e,t,n)=>(Jl(e,t,"access private method"),n);const ad=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],rd="defaultsubtitles",od="defaultstreamtype",sd="defaultduration",ld="fullscreenelement",dd="hotkeys",ud="keyboardbackwardseekoffset",cd="keyboardforwardseekoffset",hd="keyboarddownvolumestep",md="keyboardupvolumestep",pd="keysused",vd="lang",bd="loop",gd="liveedgeoffset",Ed="noautoseektolive",fd="nodefaultstore",yd="nohotkeys",_d="nomutedpref",Td="nosubtitleslangpref",Ad="novolumepref",kd="seektoliveoffset";class wd extends Ks{constructor(){super(),td(this,Yl),td(this,Ql),td(this,Zl),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,td(this,Wl,new el(this,dd)),td(this,Bl,void 0),td(this,Hl,void 0),td(this,Vl,null),td(this,$l,void 0),td(this,Kl,void 0),td(this,ql,e=>{var t;null==(t=ed(this,Hl))||t.dispatch(e)}),td(this,Fl,void 0),td(this,jl,e=>{const{key:t,shiftKey:n}=e;n&&("/"===t||"?"===t)||ad.includes(t)?this.keyboardShortcutHandler(e):this.removeEventListener("keyup",ed(this,jl))}),this.associateElement(this);let e={};nd(this,$l,t=>{Object.entries(t).forEach(t=>{let[n,i]=t;if(n in e&&e[n]===i)return;this.propagateMediaState(n,i);const a=n.toLowerCase(),r=new Wo.CustomEvent(ao[a],{composed:!0,detail:i});this.dispatchEvent(r)}),e=t})}static get observedAttributes(){return super.observedAttributes.concat(yd,dd,od,rd,sd,_d,Ad,vd,bd,gd,kd,Ed)}get mediaStore(){return ed(this,Hl)}set mediaStore(e){var t,n;ed(this,Hl)&&(null==(t=ed(this,Kl))||t.call(this),nd(this,Kl,void 0)),nd(this,Hl,e),ed(this,Hl)||this.hasAttribute(fd)?nd(this,Kl,null==(n=ed(this,Hl))?void 0:n.subscribe(ed(this,$l))):id(this,Yl,Gl).call(this)}get fullscreenElement(){var e;return null!=(e=ed(this,Bl))?e:this}set fullscreenElement(e){var t;this.hasAttribute(ld)&&this.removeAttribute(ld),nd(this,Bl,e),null==(t=ed(this,Hl))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return rs(this,rd)}set defaultSubtitles(e){os(this,rd,e)}get defaultStreamType(){return ss(this,od)}set defaultStreamType(e){ls(this,od,e)}get defaultDuration(){return is(this,sd)}set defaultDuration(e){as(this,sd,e)}get noHotkeys(){return rs(this,yd)}set noHotkeys(e){os(this,yd,e)}get keysUsed(){return ss(this,pd)}set keysUsed(e){ls(this,pd,e)}get liveEdgeOffset(){return is(this,gd)}set liveEdgeOffset(e){as(this,gd,e)}get noAutoSeekToLive(){return rs(this,Ed)}set noAutoSeekToLive(e){os(this,Ed,e)}get noVolumePref(){return rs(this,Ad)}set noVolumePref(e){os(this,Ad,e)}get noMutedPref(){return rs(this,_d)}set noMutedPref(e){os(this,_d,e)}get noSubtitlesLangPref(){return rs(this,Td)}set noSubtitlesLangPref(e){os(this,Td,e)}get noDefaultStore(){return rs(this,fd)}set noDefaultStore(e){os(this,fd,e)}attributeChangedCallback(e,t,n){var i,a,r,o,s,l,d,u,c,h,m,p;if(super.attributeChangedCallback(e,t,n),e===yd)n!==t&&""===n?(this.hasAttribute(dd)&&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===dd)ed(this,Wl).value=n;else if(e===rd&&n!==t)null==(i=ed(this,Hl))||i.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(rd)}});else if(e===od)null==(r=ed(this,Hl))||r.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(a=this.getAttribute(od))?a:void 0}});else if(e===gd&&n!==t)null==(o=ed(this,Hl))||o.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(gd)?+this.getAttribute(gd):void 0,seekToLiveOffset:this.hasAttribute(kd)?+this.getAttribute(kd):this.hasAttribute(gd)?+this.getAttribute(gd):void 0}});else if(e===kd&&n!==t)null==(s=ed(this,Hl))||s.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(kd)?+this.getAttribute(kd):this.hasAttribute(gd)?+this.getAttribute(gd):void 0}});else if(e===Ed)null==(l=ed(this,Hl))||l.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(Ed)}});else if(e===ld){const e=n?null==(d=this.getRootNode())?void 0:d.getElementById(n):void 0;nd(this,Bl,e),null==(u=ed(this,Hl))||u.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===vd&&n!==t?(Io=n,null==(c=ed(this,Hl))||c.dispatch({type:"optionschangerequest",detail:{mediaLang:n}})):e===bd&&n!==t?null==(h=ed(this,Hl))||h.dispatch({type:Xr.MEDIA_LOOP_REQUEST,detail:null!=n}
2):e===Ad&&n!==t?null==(m=ed(this,Hl))||m.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(Ad)}}):e===_d&&n!==t&&(null==(p=ed(this,Hl))||p.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(_d)}}))}connectedCallback(){var e,t,n;this.associateElement(this),ed(this,Hl)||this.hasAttribute(fd)||id(this,Yl,Gl).call(this),null==(e=ed(this,Hl))||e.dispatch({type:"documentelementchangerequest",detail:Bo}),null==(t=ed(this,Hl))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement}),super.connectedCallback(),ed(this,Hl)&&!ed(this,Kl)&&nd(this,Kl,null==(n=ed(this,Hl))?void 0:n.subscribe(ed(this,$l))),void 0!==ed(this,Fl)&&ed(this,Hl)&&this.media&&setTimeout(()=>{var e,t,n;(null==(t=null==(e=this.media)?void 0:e.textTracks)?void 0:t.length)&&(null==(n=ed(this,Hl))||n.dispatch({type:Xr.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:ed(this,Fl)}))},0),this.hasAttribute(yd)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,t,n,i,a,r;if(null==(e=super.disconnectedCallback)||e.call(this),this.disableHotkeys(),ed(this,Hl)){const e=ed(this,Hl).getState();nd(this,Fl,!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)),null==(n=ed(this,Hl))||n.dispatch({type:"fullscreenelementchangerequest",detail:void 0}),null==(i=ed(this,Hl))||i.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(a=ed(this,Hl))||a.dispatch({type:Xr.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}ed(this,Kl)&&(null==(r=ed(this,Kl))||r.call(this),nd(this,Kl,void 0)),this.unassociateElement(this),ed(this,Vl)&&(ed(this,Vl).remove(),nd(this,Vl,null))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=ed(this,Hl))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=ed(this,Hl))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){xd(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=Nd(e,n,i);Object.values(Xr).forEach(t=>{e.addEventListener(t,ed(this,ql))}),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(Xr).forEach(t=>{e.removeEventListener(t,ed(this,ql))})}registerMediaStateReceiver(e){if(!e)return;const t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),ed(this,Hl)&&Object.entries(ed(this,Hl).getState()).forEach(t=>{let[n,i]=t;xd([e],n,i)}))}unregisterMediaStateReceiver(e){const t=this.mediaStateReceivers,n=t.indexOf(e);n<0||t.splice(n,1)}enableHotkeys(){this.addEventListener("keydown",id(this,Ql,zl))}disableHotkeys(){this.removeEventListener("keydown",id(this,Ql,zl)),this.removeEventListener("keyup",ed(this,jl))}get hotkeys(){return ed(this,Wl)}set hotkeys(e){ls(this,dd,e)}keyboardShortcutHandler(e){var t,n,i,a,r,o,s,l,d;const u=e.target;if((null!=(i=null!=(n=null==(t=u.getAttribute(pd))?void 0:t.split(" "))?n:null==u?void 0:u.keysUsed)?i:[]).map(e=>
2"Space"===e?" ":e).filter(Boolean).includes(e.key))return;let c,h,m;if(ed(this,Wl).contains(`no${e.key.toLowerCase()}`))return;if(" "===e.key&&ed(this,Wl).contains("nospace"))return;if(!(e.shiftKey&&("/"===e.key||"?"===e.key))||!ed(this,Wl).contains("noshift+/"))switch(e.key){case" ":case"k":c=ed(this,Hl).getState().mediaPaused?Xr.MEDIA_PLAY_REQUEST:Xr.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new Wo.CustomEvent(c,{composed:!0,bubbles:!0}));break;case"m":c="off"===this.mediaStore.getState().mediaVolumeLevel?Xr.MEDIA_UNMUTE_REQUEST:Xr.MEDIA_MUTE_REQUEST,this.dispatchEvent(new Wo.CustomEvent(c,{composed:!0,bubbles:!0}));break;case"f":c=this.mediaStore.getState().mediaIsFullscreen?Xr.MEDIA_EXIT_FULLSCREEN_REQUEST:Xr.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new Wo.CustomEvent(c,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new Wo.CustomEvent(Xr.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{const e=this.hasAttribute(ud)?+this.getAttribute(ud):10;h=Math.max((null!=(a=this.mediaStore.getState().mediaCurrentTime)?a:0)-e,0),m=new Wo.CustomEvent(Xr.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(m);break}case"ArrowRight":case"l":{const e=this.hasAttribute(cd)?+this.getAttribute(cd):10;h=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)+e,0),m=new Wo.CustomEvent(Xr.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(m);break}case"ArrowUp":{const e=this.hasAttribute(md)?+this.getAttribute(md):.025;h=Math.min((null!=(o=this.mediaStore.getState().mediaVolume)?o:1)+e,1),m=new Wo.CustomEvent(Xr.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(m);break}case"ArrowDown":{const e=this.hasAttribute(hd)?+this.getAttribute(hd):.025;h=Math.max((null!=(s=this.mediaStore.getState().mediaVolume)?s:1)-e,0),m=new Wo.CustomEvent(Xr.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(m);break}case"<":{const e=null!=(l=this.mediaStore.getState().mediaPlaybackRate)?l:1;h=Math.max(e-.25,.25).toFixed(2),m=new Wo.CustomEvent(Xr.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(m);break}case">":{const e=null!=(d=this.mediaStore.getState().mediaPlaybackRate)?d:1;h=Math.min(e+.25,2).toFixed(2),m=new Wo.CustomEvent(Xr.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(m);break}case"/":case"?":e.shiftKey&&id(this,Zl,Xl).call(this);break;case"p":c=this.mediaStore.getState().mediaIsPip?Xr.MEDIA_EXIT_PIP_REQUEST:Xr.MEDIA_ENTER_PIP_REQUEST,m=new Wo.CustomEvent(c,{composed:!0,bubbles:!0}),this.dispatchEvent(m)}}}Wl=new WeakMap,Bl=new WeakMap,Hl=new WeakMap,Vl=new WeakMap,$l=new WeakMap,Kl=new WeakMap,ql=new WeakMap,Fl=new WeakMap,Yl=new WeakSet,Gl=function(){var e;this.mediaStore=Ul({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(rd),defaultDuration:this.hasAttribute(sd)?+this.getAttribute(sd):void 0,defaultStreamType:null!=(e=this.getAttribute(od))?e:void 0,liveEdgeOffset:this.hasAttribute(gd)?+this.getAttribute(gd):void 0,seekToLiveOffset:this.hasAttribute(kd)?+this.getAttribute(kd):this.hasAttribute(gd)?+this.getAttribute(gd):void 0,noAutoSeekToLive:this.hasAttribute(Ed),noVolumePref:this.hasAttribute(Ad),noMutedPref:this.hasAttribute(_d),noSubtitlesLangPref:this.hasAttribute(Td)}})},jl=new WeakMap,Ql=new WeakSet,zl=function(e){var t;const{metaKey:n,altKey:i,key:a,shiftKey:r}=e,o=r&&("/"===a||"?"===a);if(o&&(null==(t=ed(this,Vl))?void 0:t.open))return void this.removeEventListener("keyup",ed(this,jl));if(n||i||!o&&!ad.includes(a))return void this.removeEventListener("keyup",ed(this,jl));const s=e.target,l=s instanceof HTMLElement&&("media-volume-range"===s.tagName.toLowerCase()||"media-time-range"===s.tagName.toLowerCase());![" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(a)||ed(this,Wl).contains(`no${a.toLowerCase()}`)||" "===a&&ed(this,Wl).contains("nospace")||l||e.preventDefault(),this.addEventListener("keyup",ed(this,jl),{once:!0})},Zl=new WeakSet,Xl=function(){ed(this,Vl)||(nd(this,Vl,Bo.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(ed(this,Vl))),ed(this,Vl).open=!0};const Id=Object.values(no),Sd=Object.values(eo),Rd=e=>{var t,n,i,a;let{observedAttributes:r}=e.constructor;!r&&(null==(t=e.nodeName)?void 0:t.includes("-"))&&(Wo.customElements.upgrade(e),({observedAttributes:r}=e.constructor));const o=null==(a=null==(i=null==(n=null==e?void 0:e.getAttribute)?void 0:n.call(e,Jr.MEDIA_CHROME_ATTRIBUTES))?void 0:i.split)?void 0:a.call(i,/\s+/);return Array.isArray(r||o)?(r||o).filter(e=>Id.includes(e)):[]},Cd=e=>(e=>{var t,n;return!(null==(t=e.nodeName)?void 0:t.includes("-"))||!Wo.customElements.get(null==(n=e.nodeName)?void 0:n.toLowerCase())||e instanceof Wo.customElements.get(e.nodeName.toLowerCase())||Wo.customElements.upgrade(e),Sd.some(t=>t in e)})(e)||!!Rd(e).length,Ld=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},Dd={[no.MEDIA_SUBTITLES_LIST]:rl,[no.MEDIA_SUBTITLES_SHOWING]:rl,[no.MEDIA_SEEKABLE]:Ld,[no.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(Ld).join(" "),[no.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[no.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(bo).join(" ")},[no.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(Eo).join(" ")}},Md=(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;Cd(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=>Md(e,t))},i=null==e?void 0:e.nodeName.toLowerCase();!i.includes("-")||Cd(e)?n(e,t):Wo.customElements.whenDefined(i).then(()=>{n(e,t)})},xd=(e,t,n)=>{e.forEach(e=>{if(t in e)return void(e[t]=n);const i=Rd(e),a=t.toLowerCase();i.includes(a)&&(async(e,t,n)=>{var i,a;if(e.isConnected||await Ao(0),"boolean"===typeof n||null==n)return os(e,t,n);if("number"===typeof n)return as(e,t,n);if("string"===typeof n)return ls(e,t,n);if(Array.isArray(n)&&!n.length)return e.removeAttribute(t);const r=null!=(a=null==(i=Dd[t])?void 0:i.call(Dd,n))?a:n;e.setAttribute(t,r)})(e,a,n)})},Nd=(e,t,n)=>{Md(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(Xr.REGISTER_MEDIA_STATE_RECEIVER,i),e.addEventListener(Xr.UNREGISTER_MEDIA_STATE_RECEIVER,a);let r=[];const o=e=>{const i=e.target;"media"!==i.name&&(r.forEach(e=>Md(e,n)),r=[...i.assignedElements({flatten:!0})],r.forEach(e=>Md(e,t)))};e.addEventListener("slotchange",o);const s=new MutationObserver(e=>{e.forEach(e=>{const{addedNodes:i=[],removedNodes:a=[],type:r,target:o,attributeName:s}=e;"childList"===r?(Array.prototype.forEach.call(i,e=>Md(e,t)),Array.prototype.forEach.call(a,e=>Md(e,n))):"attributes"===r&&s===Jr.MEDIA_CHROME_ATTRIBUTES&&(Cd(o)?t(o):n(o))})});s.observe(e,{childList:!0,attributes:!0,subtree:!0});return()=>{Md(e,n),e.removeEventListener("slotchange",o),s.disconnect(),e.removeEventListener(Xr.REGISTER_MEDIA_STATE_RECEIVER,i),e.removeEventListener(Xr.UNREGISTER_MEDIA_STATE_RECEIVER,a)}};Wo.customElements.get("media-controller")||Wo.customElements.define("media-controller",wd);var Od=wd;const Pd="placement",Ud="bounds";class Wd extends Wo.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!es(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;const t=this.placement;if("left"===t||"right"===t)return void this.style.removeProperty("--media-tooltip-offset-x");const n=getComputedStyle(this),i=null!=(e=Zo(this,"#"+this.bounds))?e:Yo(this);if(!i)return;const{x:a,width:r}=i.getBoundingClientRect(),{x:o,width:s}=this.getBoundingClientRect(),l=o+s,d=a+r,u=n.getPropertyValue("--media-tooltip-offset-x"),c=u?parseFloat(u.replace("px","")):0,h=n.getPropertyValue("--media-tooltip-container-margin"),m=h?parseFloat(h.replace("px","")):0,p=o-a+c-m,v=l-d+c+m;p<0?this.style.setProperty("--media-tooltip-offset-x",`${p}px`):v>0?this.style.setProperty("--media-tooltip-offset-x",`${v}px`):this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){const e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[Pd,Ud]}get placement(){return ss(this,Pd)}set placement(e){ls(this,Pd,e)}get bounds(){return ss(this,Ud)}set bounds(e){ls(this,Ud,e)}}Wd.shadowRootOptions={mode:"open"},Wd.getTemplateHTML=function(e){return'\n    <style>\n      :host {\n        --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));\n        --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));\n        --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);\n        --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);\n        --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));\n        position: relative;\n        pointer-events: none;\n        display: var(--media-tooltip-display, inline-flex);\n        justify-content: center;\n        align-items: center;\n        box-sizing: border-box;\n        z-index: var(--media-tooltip-z-index, 1);\n        background: var(--_tooltip-background);\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        font: var(--media-font,\n          var(--media-font-weight, 400)\n          var(--media-font-size, 13px) /\n          var(--media-text-content-height, var(--media-control-height, 18px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        padding: var(--media-tooltip-padding, .35em .7em);\n        border: var(--media-tooltip-border, none);\n        border-radius: var(--media-tooltip-border-radius, 5px);\n        filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));\n        white-space: var(--media-tooltip-white-space, nowrap);\n      }\n\n      :host([hidden]) {\n        display: none;\n      }\n\n      img, svg {\n        display: inline-block;\n      }\n\n      #arrow {\n        position: absolute;\n        width: 0px;\n        height: 0px;\n        border-style: solid;\n        display: var(--media-tooltip-arrow-display, block);\n      }\n\n      :host(:not([placement])),\n      :host([placement="top"]) {\n        position: absolute;\n        bottom: calc(100% + var(--media-tooltip-distance, 12px));\n        left: 50%;\n        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
2);\n      }\n      :host(:not([placement])) #arrow,\n      :host([placement="top"]) #arrow {\n        top: 100%;\n        left: 50%;\n        border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);\n        border-color: var(--_tooltip-arrow-background) transparent transparent transparent;\n        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);\n      }\n\n      :host([placement="right"]) {\n        position: absolute;\n        left: calc(100% + var(--media-tooltip-distance, 12px));\n        top: 50%;\n        transform: translate(0, -50%);\n      }\n      :host([placement="right"]) #arrow {\n        top: 50%;\n        right: 100%;\n        border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;\n        border-color: transparent var(--_tooltip-arrow-background) transparent transparent;\n        transform: translate(0, -50%);\n      }\n\n      :host([placement="bottom"]) {\n        position: absolute;\n        top: calc(100% + var(--media-tooltip-distance, 12px));\n        left: 50%;\n        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);\n      }\n      :host([placement="bottom"]) #arrow {\n        bottom: 100%;\n        left: 50%;\n        border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);\n        border-color: transparent transparent var(--_tooltip-arrow-background) transparent;\n        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);\n      }\n\n      :host([placement="left"]) {\n        position: absolute;\n        right: calc(100% + var(--media-tooltip-distance, 12px));\n        top: 50%;\n        transform: translate(0, -50%);\n      }\n      :host([placement="left"]) #arrow {\n        top: 50%;\n        left: 100%;\n        border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);\n        border-color: transparent transparent transparent var(--_tooltip-arrow-background);\n        transform: translate(0, -50%);\n      }\n      \n      :host([placement="none"]) #arrow {\n        display: none;\n      }\n    </style>\n    <slot></slot>\n    <div id="arrow"></div>\n  '},Wo.customElements.get("media-tooltip")||Wo.customElements.define("media-tooltip",Wd);var Bd,Hd,Vd,$d,Kd,qd,Fd,Yd=Wd,Gd=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},jd=(e,t,n)=>(Gd(e,t,"read from private field"),n?n.call(e):t.get(e)),Qd=(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)},zd=(e,t,n,i)=>(Gd(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const Zd="tooltipplacement",Xd="disabled",Jd="notooltip";class eu extends Wo.HTMLElement{constructor(){if(super(),Qd(this,qd),Qd(this,Bd,void 0),this.preventClick=!1,this.tooltipEl=null,Qd(this,Hd,e=>{this.preventClick||this.handleClick(e),setTimeout(jd(this,Vd),0)}),Qd(this,Vd,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),Qd(this,$d,e=>{const{key:t}=e;this.keysUsed.includes(t)?this.preventClick||this.handleClick(e):this.removeEventListener("keyup",jd(this,$d))}),Qd(this,Kd,e=>{const{metaKey:t,altKey:n,key:i}=e;t||n||!this.keysUsed.includes(i)?this.removeEventListener("keyup",jd(this,$d)):this.addEventListener("keyup",jd(this,$d),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",Zd,Jr.MEDIA_CONTROLLER,no.MEDIA_LANG]}enable(){this.addEventListener("click",jd(this,Hd)),this.addEventListener("keydown",jd(this,Kd)),this.tabIndex=0}disable(){this.removeEventListener("click",jd(this,Hd)),this.removeEventListener("keydown",jd(this,Kd)),this.removeEventListener("keyup",jd(this,$d)),this.tabIndex=-1}attributeChangedCallback(e,t,n){var i,a,r,o,s;e===Jr.MEDIA_CONTROLLER?(t&&(null==(a=null==(i=jd(this,Bd))?void 0:i.unassociateElement)||a.call(i,this),zd(this,Bd,null)),n&&this.isConnected&&(zd(this,Bd,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(s=null==(o=jd(this,Bd))?void 0:o.associateElement)||s.call(o,this))):"disabled"===e&&n!==t?null==n?this.enable():this.disable():e===Zd&&this.tooltipEl&&n!==t?this.tooltipEl.placement=n:e===no.MEDIA_LA
2NG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),jd(this,Vd).call(this)}connectedCallback(){var e,t,n;const{style:i}=ts(this.shadowRoot,":host");i.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");const a=this.getAttribute(Jr.MEDIA_CONTROLLER);a&&(zd(this,Bd,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(n=null==(t=jd(this,Bd))?void 0:t.associateElement)||n.call(t,this)),Wo.customElements.whenDefined("media-tooltip").then(()=>{return(e=this,t=qd,n=Fd,Gd(e,t,"access private method"),n).call(this);var e,t,n})}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=jd(this,Bd))?void 0:e.unassociateElement)||t.call(e,this),zd(this,Bd,null),this.removeEventListener("mouseenter",jd(this,Vd)),this.removeEventListener("focus",jd(this,Vd)),this.removeEventListener("click",jd(this,Hd))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return ss(this,Zd)}set tooltipPlacement(e){ls(this,Zd,e)}get mediaController(){return ss(this,Jr.MEDIA_CONTROLLER)}set mediaController(e){ls(this,Jr.MEDIA_CONTROLLER,e)}get disabled(){return rs(this,Xd)}set disabled(e){os(this,Xd,e)}get noTooltip(){return rs(this,Jd)}set noTooltip(e){os(this,Jd,e)}handleClick(e){}}Bd=new WeakMap,Hd=new WeakMap,Vd=new WeakMap,$d=new WeakMap,Kd=new WeakMap,qd=new WeakSet,Fd=function(){this.addEventListener("mouseenter",jd(this,Vd)),this.addEventListener("focus",jd(this,Vd)),this.addEventListener("click",jd(this,Hd));const e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},eu.shadowRootOptions={mode:"open"},eu.getTemplateHTML=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`\n    <style>\n      :host {\n        position: relative;\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: var(--media-cursor, pointer);\n        -webkit-tap-highlight-color: transparent;\n      }\n\n      \n      :host(:focus-visible) {\n        box-shadow: var(--media-focus-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\n      media-tooltip {\n        \n        max-width: 0;\n        overflow-x: clip;\n        opacity: 0;\n        transition: opacity .3s, max-width 0s 9s;\n      }\n\n      :host(:hover) media-tooltip,\n      :host(:focus-visible) media-tooltip {\n        max-width: 100vw;\n        opacity: 1;\n        transition: opacity .3s;\n      }\n\n      :host([notooltip]) slot[name="tooltip"] {\n        display: none;\n      }\n    </style>
2\n\n    ${this.getSlotTemplateHTML(e,t)}\n\n    <slot name="tooltip">\n      <media-tooltip part="tooltip" aria-hidden="true">\n        <template shadowrootmode="${Yd.shadowRootOptions.mode}">\n          ${Yd.getTemplateHTML({})}\n        </template>\n        <slot name="tooltip-content">\n          ${this.getTooltipContentHTML(e)}\n        </slot>\n      </media-tooltip>\n    </slot>\n  `},eu.getSlotTemplateHTML=function(e,t){return"\n    <slot></slot>\n  "},eu.getTooltipContentHTML=function(){return""},Wo.customElements.get("media-chrome-button")||Wo.customElements.define("media-chrome-button",eu);const tu='<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';const nu=e=>{const t=e.mediaIsAirplaying?So("stop airplay"):So("start airplay");e.setAttribute("aria-label",t)};class iu extends eu{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_IS_AIRPLAYING,no.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),nu(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_IS_AIRPLAYING&&nu(this)}get mediaIsAirplaying(){return rs(this,no.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){os(this,no.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return ss(this,no.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){ls(this,no.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){const e=new Wo.CustomEvent(Xr.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}iu.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host([${no.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      \n      :host(:not([${no.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([${no.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter],\n      :host(:not([${no.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="enter">${tu}</slot>\n      <slot name="exit">${tu}</slot>\n    </slot>\n  `},iu.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-enter">${So("start airplay")}</slot>\n    <slot name="tooltip-exit">${So("stop airplay")}</slot>\n  `},Wo.customElements.get("media-airplay-button")||Wo.customElements.define("media-airplay-button",iu);const au=e=>{e.setAttribute("aria-checked",dl(e).toString())};class ru extends eu{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_SUBTITLES_LIST,no.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("aria-label",So("closed captions")),au(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_SUBTITLES_SHOWING&&au(this)}get mediaSubtitlesList(){return ou(this,no.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){su(this,no.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return ou(this,no.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){su(this,no.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new Wo.CustomEvent(Xr.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}ru.getSlotTemplateHTML=function(e){return'\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\n      :host([aria-checked="true"]) slot[name=tooltip-enable],\n      :host(:not([aria-checked="true"])) slot[name=tooltip-disable] {\n        display: none;\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  '},ru.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-enable">${So("Enable captions")}</slot>\n    <slot name="tooltip-disable">${So("Disable captions")}</slot>\n  `};const ou=(e,t)=>{const n=e.getAttribute(t);return n?nl(n):[]},su=(e,t,n)=>{if(!(null==n?void 0:n.length))return void e.removeAttribute(t);const i=rl(n);e.getAttribute(t)!==i&&e.setAttribute(t,i)};Wo.customElements.get("media-captions-button")||Wo.customElements.define("media-captions-button",ru);const lu=e=>{const t=e.mediaIsCasting?So("stop casting"):So("start casting");e.setAttribute("aria-label",t)};class du extends eu{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_IS_CASTING,no.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),lu(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_IS_CASTING&&lu(this)}get mediaIsCasting(){return rs(this,no.MEDIA_IS_CASTING)}set mediaIsCasting(e){os(this,no.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return ss(this,no.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){ls(this,no.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){const e=this.mediaIsCasting?Xr.MEDIA_EXIT_CAST_REQUEST:Xr.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new Wo.CustomEvent(e,{composed:!0,bubbles:!0}))}}du.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host([${no.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      \n      :host(:not([${no.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([${no.MEDIA_IS_CASTING}]) slot[name=tooltip-enter],\n      :host(:not([${no.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] {\n        display: none;\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  `},du.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-enter">${So("Start casting")}</slot>\n    <slot name="tooltip-exit">${So("Stop casting")}</slot>\n  `},Wo.customElements.get("media-cast-button")||Wo.customElements.define("media-cast-button",du);var uu,cu,hu,mu,pu,vu,bu,gu,Eu,fu,yu,_u,Tu,Au,ku,wu=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Iu=(e,t,n)=>(wu(e,t,"read from private field"),n?n.call(e):t.get(e)),Su=(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)},Ru=(e,t,n,i)=>(wu(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Cu=(e,t,n)=>(wu(e,t,"access private method"),n);const Lu="open",Du="anchor";class Mu extends Wo.HTMLElement{constructor(){super(),Su(this,mu),Su(this,vu),Su(this,gu),Su(this,fu),Su(this,_u),Su(this,Au),Su(this,uu,!1),Su(this,cu,null),Su(this,hu,null)}static get observedAttributes(){return[Lu,Du]}get open(){return rs(this,Lu)}set open(e){os(this,Lu,e)}handleEvent(e){switch(e.type){case"invoke":Cu(this,fu,yu).call(this,e);break;case"focusout":Cu(this,_u,Tu).call(this,e);break;case"keydown":Cu(this,Au,ku).call(this,e)}}connectedCallback(){Cu(this,mu,pu).call(this),this.role||(this.role="dialog"),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}disconnectedCallback(){this.removeEventListener("invoke",this),this.removeEventListener("focusout",this),this.removeEventListener("keydown",this)}attributeChangedCallback(e,t,n){Cu(this,mu,pu).call(this),e===Lu&&n!==t&&(this.open?Cu(this,vu,bu).call(this):Cu(this,gu,Eu).
2call(this))}focus(){Ru(this,cu,Xo());const e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),t=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||t)return;const n=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==n||n.focus()}get keysUsed(){return["Escape","Tab"]}}uu=new WeakMap,cu=new WeakMap,hu=new WeakMap,mu=new WeakSet,pu=function(){if(!Iu(this,uu)&&(Ru(this,uu,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e),queueMicrotask(()=>{const{style:e}=ts(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},vu=new WeakSet,bu=function(){var e;null==(e=Iu(this,hu))||e.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},gu=new WeakSet,Eu=function(){var e;null==(e=Iu(this,hu))||e.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},fu=new WeakSet,yu=function(e){Ru(this,hu,e.relatedTarget),zo(this,e.relatedTarget)||(this.open=!this.open)},_u=new WeakSet,Tu=function(e){var t;zo(this,e.relatedTarget)||(null==(t=Iu(this,cu))||t.focus(),Iu(this,hu)&&Iu(this,hu)!==e.relatedTarget&&this.open&&(this.open=!1))},Au=new WeakSet,ku=function(e){var t,n,i,a,r;const{key:o,ctrlKey:s,altKey:l,metaKey:d}=e;s||l||d||this.keysUsed.includes(o)&&(e.preventDefault(),e.stopPropagation(),"Tab"===o?(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"===o&&(null==(r=Iu(this,cu))||r.focus(),this.open=!1))},Mu.shadowRootOptions={mode:"open"},Mu.getTemplateHTML=function(e){return`\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        display: var(--media-dialog-display, inline-flex);\n        justify-content: center;\n        align-items: center;\n        \n        transition-behavior: allow-discrete;\n        visibility: hidden;\n        opacity: 0;\n        transform: translateY(2px) scale(.99);\n        pointer-events: none;\n      }\n\n      :host([open]) {\n        transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;\n        visibility: visible;\n        opacity: 1;\n        transform: translateY(0) scale(1);\n        pointer-events: auto;\n      }\n\n      #content {\n        display: flex;\n        position: relative;\n        box-sizing: border-box;\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    </style>\n    ${this.getSlotTemplateHTML(e)}\n  `},Mu.getSlotTemplateHTML=function(e){return'\n    <slot id="content"></slot>\n  '},Wo.customElements.get("media-chrome-dialog")||Wo.customElements.define("media-chrome-dialog",Mu);var xu,Nu,Ou,Pu,Uu,Wu,Bu,Hu,Vu,$u,Ku,qu,Fu,Yu,Gu,ju,Qu,zu,Zu,Xu,Ju,ec,tc,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)),oc=(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)},sc=(e,t,n,i)=>(ac(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),lc=(e,t,n)=>(ac(e,t,"access private method"),n);class dc extends Wo.HTMLElement{constructor(){if(super(),oc(this,$u),oc(this,qu),oc(this,Yu),oc(this,ju),oc(this,zu),oc(this,Xu),oc(this,ec),oc(this,nc),oc(this,xu,void 0),oc(this,Nu,void 0),oc(this,Ou,void 0),oc(this,Pu,void 0),oc(this,Uu,{}),oc(this,Wu,[]),oc(this,Bu,()=>{if(this.range.matches(":focus-visible")){const{style:e}=ts(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-sha
2dow)")}}),oc(this,Hu,()=>{const{style:e}=ts(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),oc(this,Vu,()=>{const e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.container=this.shadowRoot.querySelector("#container"),sc(this,Ou,this.shadowRoot.querySelector("#startpoint")),sc(this,Pu,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",Jr.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,n){var i,a,r,o,s;e===Jr.MEDIA_CONTROLLER?(t&&(null==(a=null==(i=rc(this,xu))?void 0:i.unassociateElement)||a.call(i,this),sc(this,xu,null)),n&&this.isConnected&&(sc(this,xu,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(s=null==(o=rc(this,xu))?void 0:o.associateElement)||s.call(o,this))):("disabled"===e||"aria-disabled"===e&&t!==n)&&(null==n?(this.range.removeAttribute(e),lc(this,qu,Fu).call(this)):(this.range.setAttribute(e,n),lc(this,Yu,Gu).call(this)))}connectedCallback(){var e,t,n;const{style:i}=ts(this.shadowRoot,":host");i.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),rc(this,Uu).pointer=ts(this.shadowRoot,"#pointer"),rc(this,Uu).progress=ts(this.shadowRoot,"#progress"),rc(this,Uu).thumb=ts(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),rc(this,Uu).activeSegment=ts(this.shadowRoot,"#segments-clipping rect:nth-child(0)");const a=this.getAttribute(Jr.MEDIA_CONTROLLER);a&&(sc(this,xu,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(n=null==(t=rc(this,xu))?void 0:t.associateElement)||n.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",rc(this,Bu)),this.shadowRoot.addEventListener("focusout",rc(this,Hu)),lc(this,qu,Fu).call(this),Ko(this.container,rc(this,Vu))}disconnectedCallback(){var e,t;lc(this,Yu,Gu).call(this),null==(t=null==(e=rc(this,xu))?void 0:e.unassociateElement)||t.call(e,this),sc(this,xu,null),this.shadowRoot.removeEventListener("focusin",rc(this,Bu)),this.shadowRoot.removeEventListener("focusout",rc(this,Hu)),qo(this.container,rc(this,Vu))}updatePointerBar(e){var t;null==(t=rc(this,Uu).pointer)||t.style.setProperty("width",100*this.getPointerRatio(e)+"%")}updateBar(){var e,t;const n=100*this.range.valueAsNumber;null==(e=rc(this,Uu).progress)||e.style.setProperty("width",`${n}%`),null==(t=rc(this,Uu).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;const n=[...new Set([+this.range.min,...e.flatMap(e=>[e.start,e.end]),+this.range.max])];sc(this,Wu,[...n]);const i=n.pop();for(const[a,r]of n.entries()){const[e,o]=[0===a,a===n.length-1],s=e?"calc(var(--segments-gap) / -1)":100*r+"%",l=`calc(${100*((o?i:n[a+1])-r)}%${e||o?"":" - var(--segments-gap)"})`,d=Bo.createElementNS("http://www.w3.org/2000/svg","rect"),u=ns(this.shadowRoot,`#segments-clipping rect:nth-child(${a+1})`);u.style.setProperty("x",s),u.style.setProperty("width",l),t.append(d)}}getPointerRatio(e){return function(e,t,n,i){const a=i.x-n.x,r=i.y-n.y,o=a*a+r*r;if(0===o)return 0;const s=((e-n.x)*a+(t-n.y)*r)/o;return Math.max(0,Math.min(1,s))}(e.clientX,e.clientY,rc(this,Ou).getBoundingClientRect(),rc(this,Pu).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":lc(this,nc,ic).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":lc(this,zu,Zu).call(this,e);break;case"pointerdown":lc(this,ju,Qu).call(this,e);break;case"pointerup":lc(this,Xu,Ju).call(this);break;case"pointerleave":lc(this,ec,tc).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}xu=new WeakMap,Nu=new WeakMap,Ou=new WeakMap,Pu=new WeakMap,Uu=new WeakMap,Wu=new WeakMap,Bu=new WeakMap,Hu=new WeakMap,Vu=new WeakMap,$u=ne
2w WeakSet,Ku=function(e){const t=rc(this,Uu).activeSegment;if(!t)return;const n=this.getPointerRatio(e),i=rc(this,Wu).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))"))},qu=new WeakSet,Fu=function(){!this.hasAttribute("disabled")&&this.isConnected&&(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},Yu=new WeakSet,Gu=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),this.removeEventListener("pointerleave",this),null==(e=Wo.window)||e.removeEventListener("pointerup",this),null==(t=Wo.window)||t.removeEventListener("pointermove",this)},ju=new WeakSet,Qu=function(e){var t;sc(this,Nu,e.composedPath().includes(this.range)),null==(t=Wo.window)||t.addEventListener("pointerup",this,{once:!0})},zu=new WeakSet,Zu=function(e){var t;"mouse"!==e.pointerType&&lc(this,ju,Qu).call(this,e),this.addEventListener("pointerleave",this,{once:!0}),null==(t=Wo.window)||t.addEventListener("pointermove",this)},Xu=new WeakSet,Ju=function(){var e;null==(e=Wo.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},ec=new WeakSet,tc=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=Wo.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=rc(this,Uu).activeSegment)||t.style.removeProperty("transform")},nc=new WeakSet,ic=function(e){"pen"===e.pointerType&&0===e.buttons||(this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),lc(this,$u,Ku).call(this,e),!this.dragging||"mouse"===e.pointerType&&rc(this,Nu)||(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))},dc.shadowRootOptions={mode:"open"},dc.getTemplateHTML=function(e){return`\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: var(--media-cursor, pointer);\n        pointer-events: auto;\n        touch-action: none; \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: var(--media-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      }\n\n      #track {\n        background: var(--media-range-track-background, rgb(255 255 255 / .2));\n        border-radius: var(--media-range-track-border-radius, 1px);\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);
2\n        box-shadow: var(--media-range-track-box-shadow, none);\n        position: absolute;\n        width: 100%;\n        height: 100%;\n        overflow: hidden;\n      }\n\n      #progress,\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      ::slotted([slot=thumb]) {\n        width: var(--media-range-thumb-width, 10
2px);\n        height: var(--media-range-thumb-height, 10px);\n        transition: var(--media-range-thumb-transition);\n        transform: var(--media-range-thumb-transform, none);\n        opacity: var(--media-range-thumb-opacity, 1);\n        translate: -50%;\n        position: absolute;\n        left: 0;\n        cursor: var(--media-cursor, pointer);\n      }\n\n      #thumb {\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        border: var(--media-range-thumb-border, none);\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      #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\n      /* Visible label for accessibility - positioned off-screen but technically visible (Firefox requires visible labels) */\n      #range-label {\n        position: absolute;\n        left: -10000px;\n        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n        pointer-events: none;\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">\n        <div id="track" part="track">\n          <div id="pointer"></div>\n          <div id="progress" part="progress"></div>\n        </div>\n        <slot name="thumb">\n          <div id="thumb" part="thumb"></div>\n        </slot>\n        <svg id="segments" aria-hidden="true"><clipPath id="segments-clipping"></clipPath></svg>\n      </div>
2\n        <input id="range" type="range" min="0" max="1" step="any" value="0">\n        <label for="range" id="range-label"></label>\n\n      ${this.getContainerTemplateHTML(e)}\n    </div>\n    <div id="rightgap"></div>\n  `},dc.getContainerTemplateHTML=function(e){return""},Wo.customElements.get("media-chrome-range")||Wo.customElements.define("media-chrome-range",dc);var uc,cc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},hc=(e,t,n)=>(cc(e,t,"read from private field"),n?n.call(e):t.get(e)),mc=(e,t,n,i)=>(cc(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class pc extends Wo.HTMLElement{constructor(){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,uc,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Jr.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,n){var i,a,r,o,s;e===Jr.MEDIA_CONTROLLER&&(t&&(null==(a=null==(i=hc(this,uc))?void 0:i.unassociateElement)||a.call(i,this),mc(this,uc,null)),n&&this.isConnected&&(mc(this,uc,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(s=null==(o=hc(this,uc))?void 0:o.associateElement)||s.call(o,this)))}connectedCallback(){var e,t,n;const i=this.getAttribute(Jr.MEDIA_CONTROLLER);i&&(mc(this,uc,null==(e=this.getRootNode())?void 0:e.getElementById(i)),null==(n=null==(t=hc(this,uc))?void 0:t.associateElement)||n.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=hc(this,uc))?void 0:e.unassociateElement)||t.call(e,this),mc(this,uc,null)}}uc=new WeakMap,pc.shadowRootOptions={mode:"open"},pc.getTemplateHTML=function(e){return'\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\n      ::slotted([role="menu"]) {\n        position: absolute;\n      }\n    </style>\n\n    <slot></slot>\n  '},Wo.customElements.get("media-control-bar")||Wo.customElements.define("media-control-bar",pc);var vc,bc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},gc=(e,t,n)=>(bc(e,t,"read from private field"),n?n.call(e):t.get(e)),Ec=(e,t,n,i)=>(bc(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class fc extends Wo.HTMLElement{constructor(){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,vc,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Jr.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,n){var i,a,r,o,s;e===Jr.MEDIA_CONTROLLER&&(t&&(null==(a=null==(i=gc(this,vc))?void 0:i.unassociateElement)||a.call(i,this),Ec(this,vc,null)),n&&this.isConnected&&(Ec(this,vc,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(s=null==(o=gc(this,vc))?void 0:o.associateElement)||s.call(o,this)))}connectedCallback(){var e,t,n;const{style:i}=ts(this.shadowRoot,":host");i.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const a=this.getAttribute(Jr.MEDIA_CONTROLLER);a&&(Ec(this,vc,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(n=null==(t=gc(this,vc))?void 0:t.associateElement)||n.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=gc(this,vc))?void 0:e.unassociateElement)||t.call(e,this),Ec(this,vc,null)}}vc=new WeakMap,fc.shadowRootOptions={mode:"open"},fc.getTemplateHTML=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`\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: var(--media-focus-box-sha
2dow, 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\n    ${this.getSlotTemplateHTML(e,t)}\n  `},fc.getSlotTemplateHTML=function(e,t){return"\n    <slot></slot>\n  "},Wo.customElements.get("media-text-display")||Wo.customElements.define("media-text-display",fc);var yc,_c=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Tc=(e,t,n)=>(_c(e,t,"read from private field"),n?n.call(e):t.get(e));class Ac extends fc{constructor(){var e,t,n,i,a;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,yc,void 0),t=this,n=yc,i=this.shadowRoot.querySelector("slot"),_c(t,n,"write to private field"),a?a.call(t,i):n.set(t,i),Tc(this,yc).textContent=Lo(null!=(e=this.mediaDuration)?e:0)}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_DURATION]}attributeChangedCallback(e,t,n){e===no.MEDIA_DURATION&&(Tc(this,yc).textContent=Lo(+n)),super.attributeChangedCallback(e,t,n)}get mediaDuration(){return is(this,no.MEDIA_DURATION)}set mediaDuration(e){as(this,no.MEDIA_DURATION,e)}}yc=new WeakMap,Ac.getSlotTemplateHTML=function(e,t){return`\n    <slot>${Lo(t.mediaDuration)}</slot>\n  `},Wo.customElements.get("media-duration-display")||Wo.customElements.define("media-duration-display",Ac);const kc={2:So("Network Error"),3:So("Decode Error"),4:So("Source Not Supported"),5:So("Encryption 
2Error")},wc={2:So("A network error caused the media download to fail."),3:So("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:So("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:So("The media is encrypted and there are no keys to decrypt it.")},Ic=e=>{var t,n;return 1===e.code?null:{title:null!=(t=kc[e.code])?t:`Error ${e.code}`,message:null!=(n=wc[e.code])?n:e.message}};var Sc,Rc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};function Cc(e){var t;const{title:n,message:i}=null!=(t=Ic(e))?t:{};let a="";return n&&(a+=`<slot name="error-${e.code}-title"><h3>${n}</h3></slot>`),i&&(a+=`<slot name="error-${e.code}-message"><p>${i}</p></slot>`),a}const Lc=[no.MEDIA_ERROR_CODE,no.MEDIA_ERROR_MESSAGE];class Dc extends Mu{constructor(){super(...arguments),((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,Sc,null)}static get observedAttributes(){return[...super.observedAttributes,...Lc]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,n){var i;if(super.attributeChangedCallback(e,t,n),!Lc.includes(e))return;const a=null!=(i=this.mediaError)?i:{code:this.mediaErrorCode,message:this.mediaErrorMessage};var r;if(this.open=(r=a).code&&null!==Ic(r),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(a),!this.hasAttribute("aria-label"))){const{title:e}=Ic(a);e&&this.setAttribute("aria-label",e)}}get mediaError(){return Rc(e=this,t=Sc,"read from private field"),n?n.call(e):t.get(e);var e,t,n}set mediaError(e){((e,t,n,i)=>{Rc(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,Sc,e)}get mediaErrorCode(){return is(this,"mediaerrorcode")}set mediaErrorCode(e){as(this,"mediaerrorcode",e)}get mediaErrorMessage(){return ss(this,"mediaerrormessage")}set mediaErrorMessage(e){ls(this,"mediaerrormessage",e)}}Sc=new WeakMap,Dc.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host {\n        background: rgb(20 20 30 / .8);\n      }\n\n      #content {\n        display: block;\n        padding: 1.2em 1.5em;\n      }\n\n      h3,\n      p {\n        margin-block: 0 .3em;\n      }\n    </style>\n    <slot name="error-${e.mediaerrorcode}" id="content">\n      ${Cc({code:+e.mediaerrorcode,message:e.mediaerrormessage})}\n    </slot>\n  `},Dc.formatErrorMessage=Cc,Wo.customElements.get("media-error-dialog")||Wo.customElements.define("media-error-dialog",Dc);var Mc,xc,Nc=Dc,Oc=(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)),Pc=(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)};class Uc extends Mu{constructor(){super(...arguments),Pc(this,Mc,e=>{var t;if(!this.open)return;const n=null==(t=this.shadowRoot)?void 0:t.querySelector("#content");if(!n)return;const i=e.composedPath(),a=i[0]===this||i.includes(this),r=i.includes(n);a&&!r&&(this.open=!1)}),Pc(this,xc,e=>{if(!this.open)return;const t=e.shiftKey&&("/"===e.key||"?"===e.key);"Escape"!==e.key&&!t||e.ctrlKey||e.altKey||e.metaKey||(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",Oc(this,Mc)),document.addEventListener("keydown",Oc(this,xc)))}disconnectedCallback(){this.removeEventListener("click",Oc(this,Mc)),document.removeEventListener("keydown",Oc(this,xc))}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),"open"===e&&(this.open?(this.addEventListener("click",Oc(this,Mc)),document.addEventListener("keydown",Oc(this,xc))):(this.removeEventListener("click",Oc(this,Mc)),document.removeEventListener("keydown",Oc(this,xc))))}}Mc=new WeakMap,xc=new WeakMap,Uc.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host {\n        position: fixed;\n        top: 0;\n        left: 0;\n        z-index: 9999;\n        background: rgb(20 20 30 / .8);\n        backdrop-filter: blur(10px);\n      }\n\n      #content {\n        display: block;\n        width: clamp(400px, 40vw, 700px);\n        max-width: 90vw;\n        text-align: left;\n      }\n\n      h2 {\n        margin: 0 0 1.5rem 0;\n        font-size: 1.5rem;\n        font-weight: 500;\n        text-align: center;\n      }\n\n      .shortcuts-table {\n        width: 100%;\n        border-collapse: collapse;\n      }\n\n      .shortcuts-table tr {\n        border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n      }\n\n      .shortcuts-table tr:last-child {\n        border-bottom: none;\n      }\n\n      .shortcuts-table td {\n        padding: 0.75rem 0.5rem;\n      }\n\n      .shortcuts-table td:first-child {\n        text-align: right;\n        padding-right: 1rem;\n        width: 40%;\n        min-width: 120px;\n      }\n\n      .shortcuts-table td:last-child {\n        padding-left: 1rem;\n      }\n\n      .key {\n        display: inline-block;\n        background: rgba(255, 255, 255, 0.15);\n        border: 1px solid rgba(255, 255, 255, 0.2);\n        border-radius: 4px;\n        padding: 0.25rem 0.5rem;\n        font-family: 'Courier New', monospace;\n        font-size: 0.9rem;\n        font-weight: 500;\n        min-width: 1.5rem;\n        text-align: center;\n        margin: 0 0.2rem;\n      }\n\n      .description {\n        color: rgba(255, 255, 255, 0.9);\n        font-size: 0.95rem;\n      }\n\n      .key-combo {\n        display: flex;\n        align-items: center;\n        justify-content: flex-end;\n        gap: 0.3rem;\n      }\n\n      .key-separator {\n        color: rgba(255, 255, 255, 0.5);\n        font-size: 0.9rem;\n      }\n    </style>\n    <slot id="content">\n      \n    <h2>Keyboard Shortcuts</h2>\n    <table class="shortcuts-table">${[{keys:["Space","k"],description:"Toggle Playback"},{keys:["m"],description:"Toggle mute"},{keys:["f"],description:"Toggle fullscreen"},{keys:["c"],description:"Toggle captions or subtitles, if available"},{keys:["p"],description:"Toggle Picture in Picture"},{keys:["\u2190","j"],description:"Seek back 10s"},{keys:["\u2192","l"],description:"Seek forward 10s"},{keys:["\u2191"],description:"Turn volume up"},{keys:["\u2193"],description:"Turn volume down"},{keys:["< (SHIFT+,)"],description:"Decrease playback rate"},{keys:["> (SHIFT+.)"],description:"Increase playback rate"}].map(e=>{let{keys:t,description:n}=e;return`\n      <tr>\n        <td>\n          <div class="key-combo">${t.map((e,t)=>t>0?`<span class="key-separator">or</span><span class="key">${e}</span>`:`<span class="key">${e}</span>`).join("")}</div>\n        </td>\n        <td class="description">${n}</td>\n      </tr>\n    `}).join("")}</table>\n  \n    </slot>\n  `},Wo.customElements.get("media-keyboard-shortcuts-dialog")||Wo.customElements.define("media-keyboard-shortcuts-dialog",Uc);var Wc,Bc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};const Hc=e=>{const t=e.mediaIsFullscreen?So("exit fullscreen mode"):So("enter fullscreen mode");e.setAttribute("aria-label",t)};class Vc extends eu{constructor(){super(...arguments),((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,Wc,null)}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_IS_FULLSCREEN,no.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Hc(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_IS_FULLSCREEN&&Hc(this)}get mediaFullscreenUnavailable(){return ss(this,no.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){ls(this,no.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return rs(this,no.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){os(this,no.MEDIA_IS_FULLSCREEN,e)}handleClick(e){var t,n,i,a;i=e,Bc(t=this,n=Wc,"write to private field"),a?a.call(t,i):n.set(t,i);const r=((e,t,n)=>(Bc(e,t,"read from private field"),n?n.call(e):t.get(e)))(this,Wc)instanceof PointerEvent,o=this.mediaIsFullscreen?new Wo.CustomEvent(Xr.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new Wo.CustomEvent(Xr.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(o)}}Wc=new WeakMap,Vc.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host([${no.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      \n      :host(:not([${no.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([${no.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],\n      :host(:not([${no.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] {\n        display: none;\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  `},Vc.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-enter">${So("Enter fullscreen mode")}</slot>\n    <slot name="tooltip-exit">${So("Exit fullscreen mode")}</slot>\n  `},Wo.customElements.get("media-fullscreen-button")||Wo.customElements.define("media-fullscreen-button",Vc);const{MEDIA_TIME_IS_LIVE:$c,MEDIA_PAUSED:Kc}=no,{MEDIA_SEEK_TO_LIVE_REQUEST:qc,MEDIA_PLAY_REQUEST:Fc}=Xr;const Yc=e=>{var t;const n=e.mediaPaused||!e.mediaTimeIsLive,i=So(n?"seek to live":"playing live");e.setAttribute("aria-label",i);const a=null==(t=e.shadowRoot)?void 0:t.querySelector('slot[name="text"]');a&&(a.textContent=So("live")),n?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class Gc extends eu{static get observedAttributes(){return[...super.observedAttributes,$c,Kc]}connectedCallback(){super.connectedCallback(),Yc(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),Yc(this)}get mediaPaused(){return rs(this,no.MEDIA_PAUSED)}set mediaPaused(e){os(this,no.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return rs(this,no.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){os(this,no.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new Wo.CustomEvent(qc,{composed:!0,bubbles:!0})),this.hasAttribute(Kc)&&this.dispatchEvent(new Wo.CustomEvent(Fc,{composed:!0,bubbles:!0})))}}Gc.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host { --media-tooltip-display: none; }\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([${$c}]:not([${Kc}])) slot[name=indicator] > *,\n      :host([${$c}]:not([${Kc}])) ::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([${$c}]:not([${Kc}])) {\n        cursor: var(--media-cursor, not-allowed);\n      }\n\n      slot[name=text]{\n        text-transform: uppercase;\n      }\n\n    </style>\n\n    <slot name="indicator"><svg viewBox="0 0 6 12" aria-hidden="true"><circle cx="3" cy="6" r="2"></circle></svg></slot>\n    \n    <slot name="spacer">&nbsp;</slot><slot name="text">${So("live")}</slot>\n  `},Wo.customElements.get("media-live-button")||Wo.customElements.define("media-live-button",Gc);var jc,Qc,zc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Zc=(e,t,n)=>(zc(e,t,"read from private field"),n?n.call(e):t.get(e)),Xc=(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)},Jc=(e,t,n,i)=>(zc(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const eh="loadingdelay",th="noautohide";class nh extends Wo.HTMLElement{constructor(){if(super(),Xc(this,jc,void 0),Xc(this,Qc,500),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Jr.MEDIA_CONTROLLER,no.MEDIA_PAUSED,no.MEDIA_LOADING,eh]}attributeChangedCallback(e,t,n){var i,a,r,o,s;e===eh&&t!==n?this.loadingDelay=Number(n):e===Jr.MEDIA_CONTROLLER&&(t&&(null==(a=null==(i=Zc(this,jc))?void 0:i.unassociateElement)||a.call(i,this),Jc(this,jc,null)),n&&this.isConnected&&(Jc(this,jc,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(s=null==(o=Zc(this,jc))?void 0:o.associateElement)||s.call(o,this)))}connectedCallback(){var e,t,n;const i=this.getAttribute(Jr.MEDIA_CONTROLLER);i&&(Jc(this,jc,null==(e=this.getRootNode())?void 0:e.getElementById(i)),null==(n=null==(t=Zc(this,jc))?void 0:t.associateElement)||n.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=Zc(this,jc))?void 0:e.unassociateElement)||t.call(e,this),Jc(this,jc,null)}get loadingDelay(){return Zc(this,Qc)}set loadingDelay(e){Jc(this,Qc,e);const{style:t}=ts(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return rs(this,no.MEDIA_PAUSED)}set mediaPaused(e){os(this,no.MEDIA_PAUSED,e)}get mediaLoading(){return rs(this,no.MEDIA_LOADING)}set mediaLoading(e){os(this,no.MEDIA_LOADING,e)}get mediaController(){return ss(this,Jr.MEDIA_CONTROLLER)}set mediaController(e){ls(this,Jr.MEDIA_CONTROLLER,e)}get noAutohide(){return rs(this,th)}set noAutohide(e){os(this,th,e)}}jc=new WeakMap,Qc=new WeakMap,nh.shadowRootOptions={mode:"open"},nh.getTemplateHTML=function(e){return`\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([${no.MEDIA_LOADING}]:not([${no.MEDIA_PAUSED}])) slot[name=icon] > *,\n      :host([${no.MEDIA_LOADING}]:not([${no.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([${no.MEDIA_LOADING}]:not([${no.MEDIA_PAUSED}])) #status {\n        visibility: var(--media-loading-indicator-opacity, visible);\n        transition: visibility 0.15s var(--_loading-indicator-delay);\n      }\n\n      svg, 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="indef
2inite" />\n  </path>\n</svg>\n</slot>\n    <div id="status" role="status" aria-live="polite">${So("media loading")}</div>\n  `},Wo.customElements.get("media-loading-indicator")||Wo.customElements.define("media-loading-indicator",nh);const ih='<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>';const ah=e=>{const t="off"===e.mediaVolumeLevel,n=So(t?"unmute":"mute");e.setAttribute("aria-label",n)};class rh extends eu{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),ah(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_VOLUME_LEVEL&&ah(this)}get mediaVolumeLevel(){return ss(this,no.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){ls(this,no.MEDIA_VOLUME_LEVEL,e)}handleClick(){const e="off"===this.mediaVolumeLevel?Xr.MEDIA_UNMUTE_REQUEST:Xr.MEDIA_MUTE_REQUEST;this.dispatchEvent(new Wo.CustomEvent(e,{composed:!0,bubbles:!0}))}}rh.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host(:not([${no.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]),\n      :host([${no.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) {\n        display: none !important;\n      }\n\n      :host([${no.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) {\n        display: none !important;\n      }\n\n      :host([${no.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) {\n        display: none !important;\n      }\n\n      :host([${no.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) {\n        display: none !important;\n      }\n\n      :host(:not([${no.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute],\n      :host([${no.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] {\n        display: none;\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">${ih}</slot>\n      <slot name="medium">${ih}</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  `},rh.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-mute">${So("Mute")}</slot>\n    <slot name="tooltip-unmute">${So("Unmute")}</slot>\n  `},Wo.customElements.get("media-mute-button")||Wo.customElements.define("media-mute-button",rh);const oh='<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>';const sh=e=>{const t=e.mediaIsPip?So("exit picture in picture mode"):So("enter picture in picture mode");e.setAttribute("aria-label",t)};class lh extends eu{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_IS_PIP,no.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),sh(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_IS_PIP&&sh(this)}get mediaPipUnavailable(){return ss(this,no.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){ls(this,no.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return rs(this,no.MEDIA_IS_PIP)}set mediaIsPip(e){os(this,no.MEDIA_IS_PIP,e)}handleClick(){const e=this.mediaIsPip?Xr.MEDIA_EXIT_PIP_REQUEST:Xr.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new Wo.CustomEvent(e,{composed:!0,bubbles:!0}))}}lh.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host([${no.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      :host(:not([${no.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([${no.MEDIA_IS_PIP}]) slot[name=tooltip-enter],\n      :host(:not([${no.MEDIA_IS_PIP}])) slot[name=tooltip-exit] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="enter">${oh}</slot>\n      <slot name="exit">${oh}</slot>\n    </slot>\n  `},lh.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-enter">${So("Enter picture in picture mode")}</slot>\n    <slot name="tooltip-exit">${So("Exit picture in picture mode")}</slot>\n  `},Wo.customElements.get("media-pip-button")||Wo.customElements.define("media-pip-button",lh);var dh,uh=(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 ch="rates",hh=[1,1.2,1.5,1.7,2];class mh extends eu{constructor(){var e;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,dh,new el(this,ch,{defaultValue:hh})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(e=this.mediaPlaybackRate)?e:1}x`}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_PLAYBACK_RATE,ch]}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),e===ch&&(uh(this,dh).value=n),e===no.MEDIA_PLAYBACK_RATE){const e=n?+n:Number.NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",So("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return uh(this,dh)}set rates(e){e?Array.isArray(e)?uh(this,dh).value=e.join(" "):"str
2ing"===typeof e&&(uh(this,dh).value=e):uh(this,dh).value=""}get mediaPlaybackRate(){return is(this,no.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){as(this,no.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;const n=Array.from(uh(this,dh).values(),e=>+e).sort((e,t)=>e-t),i=null!=(t=null!=(e=n.find(e=>e>this.mediaPlaybackRate))?e:n[0])?t:1,a=new Wo.CustomEvent(Xr.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:i});this.dispatchEvent(a)}}dh=new WeakMap,mh.getSlotTemplateHTML=function(e){return`\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">${e.mediaplaybackrate||1}x</slot>\n  `},mh.getTooltipContentHTML=function(){return So("Playback rate")},Wo.customElements.get("media-playback-rate-button")||Wo.customElements.define("media-playback-rate-button",mh);const ph=e=>{const t=e.mediaPaused?So("play"):So("pause");e.setAttribute("aria-label",t)};class vh extends eu{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_PAUSED,no.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),ph(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e!==no.MEDIA_PAUSED&&e!==no.MEDIA_LANG||ph(this)}get mediaPaused(){return rs(this,no.MEDIA_PAUSED)}set mediaPaused(e){os(this,no.MEDIA_PAUSED,e)}handleClick(){const e=this.mediaPaused?Xr.MEDIA_PLAY_REQUEST:Xr.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new Wo.CustomEvent(e,{composed:!0,bubbles:!0}))}}vh.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host([${no.MEDIA_PAUSED}]) slot[name=pause],\n      :host(:not([${no.MEDIA_PAUSED}])) slot[name=play] {\n        display: none !important;\n      }\n\n      :host([${no.MEDIA_PAUSED}]) slot[name=tooltip-pause],\n      :host(:not([${no.MEDIA_PAUSED}])) slot[name=tooltip-play] {\n        display: none;\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  `},vh.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-play">${So("Play")}</slot>\n    <slot name="tooltip-pause">${So("Pause")}</slot>\n  `},Wo.customElements.get("media-play-button")||Wo.customElements.define("media-play-button",vh);const bh="placeholdersrc",gh="src";class Eh extends Wo.HTMLElement{static get observedAttributes(){return[bh,gh]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,n){e===gh&&(null==n?this.image.removeAttribute(gh):this.image.setAttribute(gh,n)),e===bh&&(null==n?this.image.style.removeProperty("background-image"):((e,t)=>{e.style["background-image"]=`url('${t}')`})(this.image,n))}get placeholderSrc(){return ss(this,bh)}set placeholderSrc(e){ls(this,gh,e)}get src(){return ss(this,gh)}set src(e){ls(this,gh,e)}}Eh.shadowRootOptions={mode:"open"},Eh.getTemplateHTML=function(e){return'\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  '},Wo.customElements.get("media-poster-image")||Wo.customElements.define("media-poster-image",Eh);var fh,yh=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};class _h extends fc{constructor(){var e,t,n,i;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,fh,void 0),e=this,t=fh,n=this.shadowRoot.querySelector("slot"),yh(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_PREVIEW_CHAPTER,no.MEDIA_LA
2NG]}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),(e===no.MEDIA_PREVIEW_CHAPTER||e===no.MEDIA_LANG)&&n!==t&&null!=n)if((i=this,a=fh,yh(i,a,"read from private field"),r?r.call(i):a.get(i)).textContent=n,""!==n){const e=So("chapter: {chapterName}",{chapterName:n});this.setAttribute("aria-valuetext",e)}else this.removeAttribute("aria-valuetext");var i,a,r}get mediaPreviewChapter(){return ss(this,no.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){ls(this,no.MEDIA_PREVIEW_CHAPTER,e)}}fh=new WeakMap,Wo.customElements.get("media-preview-chapter-display")||Wo.customElements.define("media-preview-chapter-display",_h);var Th,Ah=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},kh=(e,t,n)=>(Ah(e,t,"read from private field"),n?n.call(e):t.get(e)),wh=(e,t,n,i)=>(Ah(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class Ih extends Wo.HTMLElement{constructor(){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,Th,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Jr.MEDIA_CONTROLLER,no.MEDIA_PREVIEW_IMAGE,no.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,n;const i=this.getAttribute(Jr.MEDIA_CONTROLLER);i&&(wh(this,Th,null==(e=this.getRootNode())?void 0:e.getElementById(i)),null==(n=null==(t=kh(this,Th))?void 0:t.associateElement)||n.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=kh(this,Th))?void 0:e.unassociateElement)||t.call(e,this),wh(this,Th,null)}attributeChangedCallback(e,t,n){var i,a,r,o,s;[no.MEDIA_PREVIEW_IMAGE,no.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===Jr.MEDIA_CONTROLLER&&(t&&(null==(a=null==(i=kh(this,Th))?void 0:i.unassociateElement)||a.call(i,this),wh(this,Th,null)),n&&this.isConnected&&(wh(this,Th,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(s=null==(o=kh(this,Th))?void 0:o.associateElement)||s.call(o,this)))}get mediaPreviewImage(){return ss(this,no.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){ls(this,no.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){const e=this.getAttribute(no.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){e?this.setAttribute(no.MEDIA_PREVIEW_COORDS,e.join(" ")):this.removeAttribute(no.MEDIA_PREVIEW_COORDS)}update(){const e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!e||!t)return;const[n,i,a,r]=e,o=t.split("#")[0],s=getComputedStyle(this),{maxWidth:l,maxHeight:d,minWidth:u,minHeight:c}=s;let h,m;if("fill"===(s.getPropertyValue("--media-preview-thumbnail-object-fit").trim()||"contain")){const e=parseInt(l)/a,t=parseInt(d)/r,n=parseInt(u)/a,i=parseInt(c)/r;h=e<1?e:Math.max(e,n),m=t<1?t:Math.max(t,i)}else{const e=Math.min(parseInt(l)/a,parseInt(d)/r),t=Math.max(parseInt(u)/a,parseInt(c)/r),n=e<1?e:t>1?t:1;h=n,m=n}const{style:p}=ts(this.shadowRoot,":host"),v=ts(this.shadowRoot,"img").style,b=this.shadowRoot.querySelector("img"),g=Math.min(h,m)<1?"min":"max";p.setProperty(`${g}-width`,"initial","important"),p.setProperty(`${g}-height`,"initial","important"),p.width=a*h+"px",p.height=r*m+"px";const E=()=>{v.width=this.imgWidth*h+"px",v.height=this.imgHeight*m+"px",v.display="block"};b.src!==o&&(b.onload=()=>{this.imgWidth=b.naturalWidth,this.imgHeight=b.naturalHeight,E(),b.onload=null},b.src=o,E()),E(),v.transform=`translate(-${n*h}px, -${i*m}px)`}}Th=new WeakMap,Ih.shadowRootOptions={mode:"open"},Ih.getTemplateHTML=function(e){return'\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  '},Wo.customElements.get("media-preview-thumbnail")||Wo.customElements.define("media-preview-thumbnail",Ih);var Sh,Rh=Ih,Ch=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Lh=(e,t,n)=>(Ch(e,t,"read from private field"),n?n.call(e):t.get(e));class Dh extends fc{constructor(){var e,t,n,i;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,Sh,void 0),e=this,t=Sh,n=this.shadowRoot.querySelector("slot"),Ch(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),Lh(this,Sh).textContent=Lo(0)}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_PREVIEW_TIME&&null!=n&&(Lh(this,Sh).textContent=Lo(parseFloat(n)))}get mediaPreviewTime(){return is(this,no.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){as(this,no.MEDIA_PREVIEW_TIME,e)}}Sh=new WeakMap,Wo.customElements.get("media-preview-time-display")||Wo.customElements.define("media-preview-time-display",Dh);const Mh="seekoffset";class xh extends eu{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_CURRENT_TIME,Mh]}connectedCallback(){super.connectedCallback(),this.seekOffset=is(this,Mh,30
2)}attributeChangedCallback(e,t,n){var i,a;super.attributeChangedCallback(e,t,n),i=this,a=this.seekOffset,i.setAttribute("aria-label",So("seek back {seekOffset} seconds",{seekOffset:a})),e===Mh&&(this.seekOffset=is(this,Mh,30))}get seekOffset(){return is(this,Mh,30)}set seekOffset(e){as(this,Mh,e),this.setAttribute("aria-label",So("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),jo(Qo(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return is(this,no.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){as(this,no.MEDIA_CURRENT_TIME,e)}handleClick(){const e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new Wo.CustomEvent(Xr.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}xh.getSlotTemplateHTML=function(e,t){return`\n    <slot name="icon">${n=t.seekOffset,`\n  <svg aria-hidden="true" viewBox="0 0 20 24">\n    <defs>\n      <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>\n    </defs>\n    <text class="text value" transform="translate(2.18 19.87)">${n}</text>\n    <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"/>\n  </svg>`}</slot>\n  `;var n},xh.getTooltipContentHTML=function(){return So("Seek backward")},Wo.customElements.get("media-seek-backward-button")||Wo.customElements.define("media-seek-backward-button",xh);const Nh="seekoffset";class Oh extends eu{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_CURRENT_TIME,Nh]}connectedCallback(){super.connectedCallback(),this.seekOffset=is(this,Nh,30)}attributeChangedCallback(e,t,n){var i,a;super.attributeChangedCallback(e,t,n),i=this,a=this.seekOffset,i.setAttribute("aria-label",So("seek forward {seekOffset} seconds",{seekOffset:a})),e===Nh&&(this.seekOffset=is(this,Nh,30))}get seekOffset(){return is(this,Nh,30)}set seekOffset(e){as(this,Nh,e),this.setAttribute("aria-label",So("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),jo(Qo(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return is(this,no.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){as(this,no.MEDIA_CURRENT_TIME,e)}handleClick(){const e=this.mediaCurrentTime+this.seekOffset,t=new Wo.CustomEvent(Xr.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}Oh.getSlotTemplateHTML=function(e,t){return`\n    <slot name="icon">${n=t.seekOffset,`\n  <svg aria-hidden="true" viewBox="0 0 20 24">\n    <defs>\n      <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>\n    </defs>\n    <text class="text value" transform="translate(8.9 19.87)">${n}</text>\n    <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"/>\n  </svg>`}</slot>\n  `;var n},Oh.getTooltipContentHTML=function(){return So("Seek forward")},Wo.customElements.get("media-seek-forward-button")||Wo.customElements.define("media-seek-forward-button",Oh);var Ph,Uh,Wh,Bh,Hh,Vh,$h,Kh,qh,Fh,Yh,Gh=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},jh=(e,t,n)=>(Gh(e,t,"read from private field"),n?n.call(e):t.get(e)),Qh=(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)},zh=(e,t,n,i)=>(Gh(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Zh=(e,t,n)=>(Gh(e,t,"access private method"),n);const Xh={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Jh=[...Object.values(Xh),no.MEDIA_CURRENT_TIME,no.MEDIA_DURATION,no.MEDIA_SEEKABLE],em=["Enter"," "],tm="&nbsp;/&nbsp;",nm=function(e){let{timesSep:t=tm}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,i;const a=null!=(n=e.mediaCurrentTime)?n:0,[,r]=null!=(i=e.mediaSeekable)?i:[];let o=0;Number.isFinite(e.mediaDuration)?o=e.mediaDuration:Number.isFinite(r)&&(o=r);const s=e.remaining?Lo(0-(o-a)):Lo(a);return e.showDuration?`${s}${t}${Lo(o)}`:s};class im extends fc{constructor(){super(),Qh(this,Bh),Qh(this,Vh),Qh(this,Kh),Qh(this,Fh),Qh(this,Ph,void 0),Qh(this,Uh,null),Qh(this,Wh,e=>{const{metaKey:t,altKey:n,key:i}=e;t||n||!em.includes(i)?this.removeEventListener("keyup",jh(this,Uh)):this.addEventListener("keyup",jh(this,Uh))}),zh(this,Ph,this.shadowRoot.querySelector("slot")),jh(this,Ph).innerHTML=`${nm(this)}`}static get observedAttributes(){return[...super.observedAttributes,...Jh,"disabled"]}connectedCallback(){const{style:e}=ts(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.setAttribute("aria-label",So("playback time")),Zh(this,Kh,qh).call(this),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),Zh(this,Vh,$h).call(this),super.disconnectedCallback()}attributeChangedCallback(e,t,n){this.setAttribute("aria-label",So("playback time")),Jh.includes(e)?this.update():"disabled"===e&&n!==t?null==n?Zh(this,Kh,qh).call(this):Zh(this,Fh,Yh).call(this):e===Xh.NO_TOGGLE&&n!==t&&(this.noToggle?Zh(this,Fh,Yh).call(this):Zh(this,Kh,qh).call(this)),super.attributeChangedCallback(e,t,n)}enable(){this.noToggle||(this.tabIndex=0)}disable(){this.tabIndex=-1}get remaining(){return rs(this,Xh.REMAINING)}set remaining(e){os(this,Xh.REMAINING,e)}get showDuration(){return rs(this,Xh.SHOW_DURATION)}set showDuration(e){os(this,Xh.SHOW_DURATION,e)}get noToggle(){return rs(this,Xh.NO_TOGGLE)}set noToggle(e){os(this,Xh.NO_TOGGLE,e)}get mediaDuration(){return is(this,no.MEDIA_DURATION)}set mediaDuration(e){as(this,no.MEDIA_DURATION,e)}get mediaCurrentTime(){return is(this,no.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){as(this,no.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){const e=this.getAttribute(no.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null!=e?this.setAttribute(no.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(no.MEDIA_SEEKABLE)}update(){const e=nm(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-description",So("video not loaded, unknown time."));const r=e.remaining?Co(0-(a-n)):Co(n);if(!e.showDuration)return void e.setAttribute("aria-description",r);const o=Co(a),s=So("{currentTime} of {totalTime}",{currentTime:r,totalTime:o});e.setAttribute("aria-description",s)})(this),e!==jh(this,Ph).innerHTML&&(jh(this,Ph).innerHTML=e)}}Ph=new WeakMap,Uh=new WeakMap,Wh=new WeakMap,Bh=new WeakSet,Hh=function(){jh(this,Uh)||(zh(this,Uh,e=>{const{key:t}=e;em.includes(t)?this.toggleTimeDisplay():this.removeEventListener("keyup",jh(this,Uh))}),this.addEventListener("keydown",jh(this,Wh)),this.addEventListener("click",this.toggleTimeDisplay))},Vh=new WeakSet,$h=function(){jh(this,Uh)&&(this.removeEventListener("keyup",jh(this,Uh)),this.removeEventListener("keydown",jh(this,Wh)),this.removeEventListener("click",this.toggleTimeDisplay),zh(this,Uh,null))},Kh=new WeakSet,qh=function(){this.noToggle||this.hasAttribute("disabled")||(this.setAttribute("role","button"),this.enable(),Zh(this,Bh,Hh).call(this))},Fh=new WeakSet,Yh=function(){this.removeAttribute("role"),this.disable(),Zh(this,Vh,$h).call(this)},im.getSlotTemplateHTML=function(e,t){return`\n    <slot>${nm(t)}</slot>\n  `},Wo.customElements.get("media-time-display")||Wo.customElements.define("media-time-display",im);var am,rm,om,sm,lm,dm,um,cm,hm,mm,pm=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)}
2,vm=(e,t,n)=>(pm(e,t,"read from private field"),n?n.call(e):t.get(e)),bm=(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)},gm=(e,t,n,i)=>(pm(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class Em{constructor(e,t,n){var i=this;bm(this,am,void 0),bm(this,rm,void 0),bm(this,om,void 0),bm(this,sm,void 0),bm(this,lm,void 0),bm(this,dm,void 0),bm(this,um,void 0),bm(this,cm,void 0),bm(this,hm,0),bm(this,mm,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now();gm(i,hm,requestAnimationFrame(vm(i,mm))),gm(i,sm,performance.now()-vm(i,om));const t=1e3/i.fps;if(vm(i,sm)>t){gm(i,om,e-vm(i,sm)%t);const s=1e3/((e-vm(i,rm))/++(n=i,a=lm,{set _(e){gm(n,a,e,r)},get _(){return vm(n,a,o)}})._),l=(e-vm(i,dm))/1e3/i.duration;let d=vm(i,um)+l*i.playbackRate;d-vm(i,am).valueAsNumber>0?gm(i,cm,i.playbackRate/i.duration/s):(gm(i,cm,.995*vm(i,cm)),d=vm(i,am).valueAsNumber+vm(i,cm)),i.callback(d)}var n,a,r,o}),gm(this,am,e),this.callback=t,this.fps=n}start(){0===vm(this,hm)&&(gm(this,om,performance.now()),gm(this,rm,vm(this,om)),gm(this,lm,0),vm(this,mm).call(this))}stop(){0!==vm(this,hm)&&(cancelAnimationFrame(vm(this,hm)),gm(this,hm,0))}update(e){let{start:t,duration:n,playbackRate:i}=e;const a=t-vm(this,am).valueAsNumber,r=Math.abs(n-this.duration);(a>0||a<-.03||r>=.5)&&this.callback(t),gm(this,um,t),gm(this,dm,performance.now()),this.duration=n,this.playbackRate=i}}am=new WeakMap,rm=new WeakMap,om=new WeakMap,sm=new WeakMap,lm=new WeakMap,dm=new WeakMap,um=new WeakMap,cm=new WeakMap,hm=new WeakMap,mm=new WeakMap;var fm,ym,_m,Tm,Am,km,wm,Im,Sm,Rm,Cm,Lm,Dm,Mm,xm,Nm,Om,Pm,Um,Wm,Bm,Hm,Vm,$m,Km,qm,Fm=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ym=(e,t,n)=>(Fm(e,t,"read from private field"),n?n.call(e):t.get(e)),Gm=(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)},jm=(e,t,n,i)=>(Fm(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Qm=(e,t,n)=>(Fm(e,t,"access private method"),n);const zm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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))},Zm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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 Xm extends dc{constructor(){super(),Gm(this,Lm),Gm(this,xm),Gm(this,Om),Gm(this,Um),Gm(this,Bm),Gm(this,Vm),Gm(this,Km),Gm(this,fm,null),Gm(this,ym,void 0),Gm(this,_m,void 0),Gm(this,Tm,void 0),Gm(this,Am,void 0),Gm(this,km,void 0),Gm(this,wm,void 0),Gm(this,Im,void 0),Gm(this,Sm,void 0),Gm(this,Rm,void 0),Gm(this,Cm,()=>{Qm(this,Lm,Dm).call(this)?Ym(this,ym).start():Ym(this,ym).stop()}),Gm(this,Mm,e=>{this.dragging||(_o(e)&&(this.range.valueAsNumber=e),Ym(this,Rm)||this.updateBar())});this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),jm(this,_m,this.shadowRoot.querySelectorAll('[part~="box"]')),jm(this,Am,this.shadowRoot.querySelector('[part~="preview-box"]')),jm(this,km,this.shadowRoot.querySelector('[part~="current-box"]'));const e=getComputedStyle(this);jm(this,wm,parseInt(e.getPropertyValue("--media-box-padding-left"))),jm(this,Im,parseInt(e.getPropertyValue("--media-box-padding-right"))),jm(this,ym,new Em(this.range,Ym(this,Mm),60))}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_PAUSED,no.MEDIA_DURATION,no.MEDIA_SEEKABLE,no.MEDIA_CURRENT_TIME,no.MEDIA_PREVIEW_IMAGE,no.MEDIA_PREVIEW_TIME,no.MEDIA_PREVIEW_CHAPTER,no.MEDIA_BUFFERED,no.MEDIA_PLAYBACK_RATE,no.MEDIA_LOADING,no.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",So("seek")),Ym(this,Cm).call(this),jm(this,fm,this.getRootNode()),null==(e=Ym(this,fm))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),Ym(this,ym).stop(),null==(e=Ym(this,fm))||e.removeEventListener("transitionstart",this),jm(this,fm,null)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),t!=n&&(e===no.MEDIA_CURRENT_TIME||e===no.MEDIA_PAUSED||e===no.MEDIA_ENDED||e===no.MEDIA_LOADING||e===no.MEDIA_DURATION||e===no.MEDIA_SEEKABLE?(Ym(this,ym).update({start:zm(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),Ym(this,Cm).call(this),(e=>{const t=e.range,n=Co(+Zm(e)),i=Co(+e.mediaSeekableEnd),a=n&&i?So("{currentTime} of {totalTime}",{currentTime:n,totalTime:i}):So("video not loaded, unknown time.");t.setAttribute("aria-valuetext",a)})(this)):e===no.MEDIA_BUFFERED&&this.updateBufferedBar(),e!==no.MEDIA_DURATION&&e!==no.MEDIA_SEEKABLE||(this.mediaChapter
2sCues=Ym(this,Sm),this.updateBar()))}get mediaChaptersCues(){return Ym(this,Sm)}set mediaChaptersCues(e){var t;jm(this,Sm,e),this.updateSegments(null==(t=Ym(this,Sm))?void 0:t.map(e=>({start:zm(this,e.startTime),end:zm(this,e.endTime)})))}get mediaPaused(){return rs(this,no.MEDIA_PAUSED)}set mediaPaused(e){os(this,no.MEDIA_PAUSED,e)}get mediaLoading(){return rs(this,no.MEDIA_LOADING)}set mediaLoading(e){os(this,no.MEDIA_LOADING,e)}get mediaDuration(){return is(this,no.MEDIA_DURATION)}set mediaDuration(e){as(this,no.MEDIA_DURATION,e)}get mediaCurrentTime(){return is(this,no.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){as(this,no.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return is(this,no.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){as(this,no.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){const e=this.getAttribute(no.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(no.MEDIA_BUFFERED);const t=e.map(e=>e.join(":")).join(" ");this.setAttribute(no.MEDIA_BUFFERED,t)}get mediaSeekable(){const e=this.getAttribute(no.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null!=e?this.setAttribute(no.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(no.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 ss(this,no.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){ls(this,no.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return is(this,no.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){as(this,no.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return rs(this,no.MEDIA_ENDED)}set mediaEnded(e){os(this,no.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=>{let[t,n]=e;return t<=i&&i<=n}))?e:[];n=zm(this,a)}const{style:i}=ts(this.shadowRoot,"#buffered");i.setProperty("width",100*n+"%")}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;const e=ts(this.shadowRoot,"#current-rail"),t=ts(this.shadowRoot,'[part~="current-box"]'),n=Qm(this,xm,Nm).call(this,Ym(this,km)),i=Qm(this,Om,Pm).call(this,n,this.range.valueAsNumber),a=Qm(this,Um,Wm).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":Qm(this,Km,qm).call(this);break;case"pointermove":Qm(this,Bm,Hm).call(this,e);break;case"pointerup":Ym(this,Rm)&&jm(this,Rm,!1);break;case"pointerdown":jm(this,Rm,!0);break;case"pointerleave":Qm(this,Vm,$m).call(this,null);break;case"transitionstart":zo(e.target,this)&&setTimeout(()=>Ym(this,Cm).call(this),0)}}}fm=new WeakMap,ym=new WeakMap,_m=new WeakMap,Tm=new WeakMap,Am=new WeakMap,km=new WeakMap,wm=new WeakMap,Im=new WeakMap,Sm=new WeakMap,Rm=new WeakMap,Cm=new WeakMap,Lm=new WeakSet,Dm=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&es(this)},Mm=new WeakMap,xm=new WeakSet,Nm=function(e){var t;const n=(null!=(t=this.getAttribute("bounds")?Zo(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}},Om=new WeakSet,Pm=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},Um=new WeakSet,Wm=function(e,t){const{width:n,min:i,max:a}
2=e.box,r=t*e.range.width;if(r<i+Ym(this,wm)){return`${r-n/2+(e.range.left-e.bounds.left-Ym(this,wm))}px`}if(r>a-Ym(this,Im)){return r+n/2-(e.bounds.right-e.range.right-Ym(this,Im))-e.range.width+"px"}return 0},Bm=new WeakSet,Hm=function(e){const t=[...Ym(this,_m)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void Qm(this,Vm,$m).call(this,null);const n=this.mediaSeekableEnd;if(!n)return;const i=ts(this.shadowRoot,"#preview-rail"),a=ts(this.shadowRoot,'[part~="preview-box"]'),r=Qm(this,xm,Nm).call(this,Ym(this,Am));let o=(e.clientX-r.range.left)/r.range.width;o=Math.max(0,Math.min(1,o));const s=Qm(this,Om,Pm).call(this,r,o),l=Qm(this,Um,Wm).call(this,r,o);i.style.transform=`translateX(${s})`,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(Ym(this,Tm))-Math.round(o*n);Math.abs(d)<1&&o>.01&&o<.99||(jm(this,Tm,o*n),Qm(this,Vm,$m).call(this,Ym(this,Tm)))},Vm=new WeakSet,$m=function(e){this.dispatchEvent(new Wo.CustomEvent(Xr.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))},Km=new WeakSet,qm=function(){Ym(this,ym).stop();const e=Zm(this);this.dispatchEvent(new Wo.CustomEvent(Xr.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},Xm.shadowRootOptions={mode:"open"},Xm.getContainerTemplateHTML=function(e){return`\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      #buffered {\n        background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));\n        position: absolute;\n        height: 100%;\n        will-change: width;\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([${no.MEDIA_PREVIEW_IMAGE}], [${no.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([${no.MEDIA_PREVIEW_IMAGE}], [${no.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-thumbn
2ail) {\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([${no.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,\n      :host([${no.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([${no.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,\n        :host([${no.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {\n          transition-delay: var(--media-preview-transition-delay-in, .25s);\n          visibility: visible;\n        }\n\n        :host([${no.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([${no.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,\n      :host([${no.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[${no.MEDIA_PREVIEW_CHAPTER}],\n      ::slotted(media-preview-chapter-display[${no.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([${no.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,\n      :host([${no.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([${no.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>\n          <template shadowrootmode="${Rh.shadowRootOptions.mode}">\n            ${Rh.getTemplateHTML({})}\n          </template>\n        </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  `},Wo.customElements.get("media-time-range")||Wo.customElements.define("media-time-range",Xm);var Jm,ep=(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));class tp extends dc{constructor(){super(...arguments),((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,Jm,()=>{const e=this.range.value,t=new Wo.CustomEvent(Xr.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_VOLUME,no.MEDIA_MUTED,no.MEDIA_VOLUME_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",So("volume")),this.range.addEventListener("input",ep(this,Jm))}disconnectedCallback(){this.range.removeEventListener("input",ep(this,Jm)),super.disconnectedCallback()}attributeChangedCallback(e,t,n){var i,a;super.attributeChangedCallback(e,t,n),e!==no.MEDIA_VOLUME&&e!==no.MEDIA_MUTED||(this.range.valueAsNumber=(a=this).mediaMuted?0:a.mediaVolume,this.range.setAttribute("aria-valuetext",(i=this.range.valueAsNumber,`${Math.round(100*i)}%`)),this.updateBar())}
2get mediaVolume(){return is(this,no.MEDIA_VOLUME,1)}set mediaVolume(e){as(this,no.MEDIA_VOLUME,e)}get mediaMuted(){return rs(this,no.MEDIA_MUTED)}set mediaMuted(e){os(this,no.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return ss(this,no.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){ls(this,no.MEDIA_VOLUME_UNAVAILABLE,e)}}Jm=new WeakMap,Wo.customElements.get("media-volume-range")||Wo.customElements.define("media-volume-range",tp);class np extends eu{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=(null==(e=this.shadowRoot)?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=So("Loop"))}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return rs(this,no.MEDIA_LOOP)}set mediaLoop(e){os(this,no.MEDIA_LOOP,e)}handleClick(){const e=!this.mediaLoop,t=new Wo.CustomEvent(Xr.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}np.getSlotTemplateHTML=function(e){return`\n      <style>\n        :host {\n          min-width: 4ch;\n          padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n          width: 100%;\n          display: grid;\n          grid-template-columns: 1fr auto;\n          gap: 1rem;\n          font-weight: var(--media-button-font-weight, normal);\n        }\n\n        #checked-indicator {\n          display: none;\n        }\n\n        :host([${no.MEDIA_LOOP}]) #checked-indicator {\n          display: block;\n        }\n      </style>\n      \n      <span id="icon">\n     </span>\n\n      <div id="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      </div>\n    `},np.getTooltipContentHTML=function(){return So("Loop")},Wo.customElements.get("media-loop-button")||Wo.customElements.define("media-loop-button",np);var ip,ap,rp,op,sp,lp,dp,up,cp,hp,mp,pp=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},vp=(e,t,n)=>(pp(e,t,"read from private field"),n?n.call(e):t.get(e)),bp=(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)},gp=(e,t,n,i)=>(pp(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const Ep={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 Ip&&"boolean"===typeof a.element[a.attributeName]?a.booleanValue=e:"function"===typeof e&&a instanceof Ip?a.element[a.attributeName]=e:a.value=e}}};class fp extends Wo.DocumentFragment{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ep;var i;super(),bp(this,ip,void 0),bp(this,ap,void 0),this.append(e.content.cloneNode(!0)),gp(this,ip,yp(this)),gp(this,ap,n),null==(i=n.createCallback)||i.call(n,this,vp(this,ip),t),n.processCallback(this,vp(this,ip),t)}update(e){vp(this,ap).processCallback(this,vp(this,ip),e)}}ip=new WeakMap,ap=new WeakMap;const yp=function(e){let t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(const a of e.attributes||[])if(a.value.includes("{{")){const r=new wp;for([t,n]of Tp(a.value))if(t){const t=new Ip(e,a.name,a.namespaceURI);r.append(t),i.push([n,t])}else r.append(n);a.value=r.toString()}for(const a of e.childNodes)if(1!==a.nodeType||a instanceof HTMLTemplateElement){const r=a.data;if(1===a.nodeType||r.includes("{{")){const o=[];if(r)for([t,n]of Tp(r))if(t){const t=new Sp(e);o.push(t),i.push([n,t])}else o.push(new Text(n));else if(a instanceof HTMLTemplateElement){const t=new Rp(e,a);o.push(t),i.push([t.expression,t])}a.replaceWith(...o.flatMap(e=>e.replacementNodes||[e]))}}else yp(a,i);return i},_p={},Tp=e=>{let t,n="",i=0,a=_p[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]),_p[e]=a};class Ap{get value(){return""}set value(e){}toString(){return this.value}}const kp=new WeakMap;class wp{constructor(){bp(this,rp,[])}[Symbol.iterator](){return vp(this,rp).values()}get length(){return vp(this,rp).length}item(e){return vp(this,rp)[e]}append(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const i of t)i instanceof Ip&&kp.set(i,this),vp(this,rp).push(i)}toString(){return vp(this,rp).join("")}}rp=new WeakMap;class Ip extends Ap{constructor(e,t,n){super(),bp(this,up),bp(this,op,""),bp(this,sp,void 0),bp(this,lp,void 0),bp(this,dp,void 0),gp(this,sp,e),gp(this,lp,t),gp(this,dp,n)}get attributeName(){return vp(this,lp)}get attributeNamespace(){return vp(this,dp)}
2get element(){return vp(this,sp)}get value(){return vp(this,op)}set value(e){vp(this,op)!==e&&(gp(this,op,e),vp(this,up,cp)&&1!==vp(this,up,cp).length?vp(this,sp).setAttributeNS(vp(this,dp),vp(this,lp),vp(this,up,cp).toString()):null==e?vp(this,sp).removeAttributeNS(vp(this,dp),vp(this,lp)):vp(this,sp).setAttributeNS(vp(this,dp),vp(this,lp),e))}get booleanValue(){return vp(this,sp).hasAttributeNS(vp(this,dp),vp(this,lp))}set booleanValue(e){if(vp(this,up,cp)&&1!==vp(this,up,cp).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}op=new WeakMap,sp=new WeakMap,lp=new WeakMap,dp=new WeakMap,up=new WeakSet,cp=function(){return kp.get(this)};class Sp extends Ap{constructor(e,t){super(),bp(this,hp,void 0),bp(this,mp,void 0),gp(this,hp,e),gp(this,mp,t?[...t]:[new Text])}get replacementNodes(){return vp(this,mp)}get parentNode(){return vp(this,hp)}get nextSibling(){return vp(this,mp)[vp(this,mp).length-1].nextSibling}get previousSibling(){return vp(this,mp)[0].previousSibling}get value(){return vp(this,mp).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const i=t.flat().flatMap(e=>null==e?[new Text]:e.forEach?[...e]:11===e.nodeType?[...e.childNodes]:e.nodeType?[e]:[new Text(e)]);i.length||i.push(new Text),gp(this,mp,function(e,t,n){let i,a,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=0,l=n.length,d=t.length;for(;s<l&&s<d&&t[s]==n[s];)s++;for(;s<l&&s<d&&n[l-1]==t[d-1];)o=n[--d,--l];if(s==d)for(;s<l;)e.insertBefore(n[s++],o);if(s==l)for(;s<d;)e.removeChild(t[s++]);else{for(i=t[s];s<l;)r=n[s++],a=i?i.nextSibling:o,i==r?i=a:s<l&&n[s]==a?(e.replaceChild(r,i),i=a):e.insertBefore(r,i);for(;i!=o;)a=i.nextSibling,e.removeChild(i),i=a}return n}(vp(this,mp)[0].parentNode,vp(this,mp),i,this.nextSibling))}}hp=new WeakMap,mp=new WeakMap;class Rp extends Sp{constructor(e,t){const n=t.getAttribute("directive")||t.getAttribute("type");let i=t.getAttribute("expression")||t.getAttribute(n)||"";i.startsWith("{{")&&(i=i.trim().slice(2,-2).trim()),super(e),this.expression=i,this.template=t,this.directive=n}}const Cp={string:e=>String(e)};class Lp{constructor(e){this.template=e,this.state=void 0}}const Dp=new WeakMap,Mp=new WeakMap,xp={partial:(e,t)=>{t[e.expression]=new Lp(e.template)},if:(e,t)=>{var n;if(Up(e.expression,t))if(Dp.get(e)!==e.template){Dp.set(e,e.template);const n=new fp(e.template,t,Op);e.replace(n),Mp.set(e,n)}else null==(n=Mp.get(e))||n.update(t);else e.replace(""),Dp.delete(e),Mp.delete(e)}},Np=Object.keys(xp),Op={processCallback(e,t,n){var i,a;if(n)for(const[r,o]of t){if(o instanceof Rp){if(!o.directive){const e=Np.find(e=>o.template.hasAttribute(e));e&&(o.directive=e,o.expression=o.template.getAttribute(e))}null==(i=xp[o.directive])||i.call(xp,o,n);continue}let e=Up(r,n);e instanceof Lp?Dp.get(o)!==e.template?(Dp.set(o,e.template),e=new fp(e.template,e.state,Op),o.value=e,Mp.set(o,e)):null==(a=Mp.get(o))||a.update(e.state):e?(o instanceof Ip&&o.attributeName.startsWith("aria-")&&(e=String(e)),o instanceof Ip?"boolean"===typeof e?o.booleanValue=e:"function"===typeof e?o.element[o.attributeName]=e:o.value=e:(o.value=e,Dp.delete(o),Mp.delete(o))):o instanceof Ip?o.value=void 0:(o.value=void 0,Dp.delete(o),Mp.delete(o))}}},Pp={"!":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=Cp[t])?void 0:n.call(Cp,e)}};function Up(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,i,a,r,o,s,l;const d=function(e){return function(e,t){let n,i,a;const r=[];for(;e;){a=null,n=e.length;for(const 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(e=>{let{type:t}=e;return"ws"!==t})}(e);if(0===d.length||d.some(e=>{let{type:t}=e;return!t}))return Wp(e);if(">"===(null==(n=d[0])?void 0:n.token)){const n=t[null==(i=d[1])?void 0:i.token];if(!n)return Wp(e);const s={...t};n.state=s;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==(o=l[e+2])?void 0:o.token;n&&"="===i&&(s[n]=Hp(d,t))}return n}if(1===d.length)return Bp(d[0])?Hp(d[0].token,t):Wp(e);if(2===d.length){const n=null==(s=d[0])?void 0:s.token,i=Pp[n];if(!i||!Bp(d[1]))return Wp(e);return i(Hp(d[1].token,t))}if(3===d.length){const n=null==(l=d[1])?void 0:l.token,i=Pp[n];if(!i||!Bp(d[0])||!Bp(d[2]))return Wp(e);const a=Hp(d[0].token,t);if("|"===n)return i(a,d[2].token);return i(a,Hp(d[2].token,t))}}function Wp(e){return console.warn(`Warning: invalid expression \`${e}\``),!1}function Bp(e){let{type:t}=e;return["number","boolean","string","param"].includes(t)}function Hp(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):To(e)?parseFloat(e):t[e]}var Vp,$p,Kp,qp,Fp,Yp,Gp,jp,Qp,zp=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Zp=(e,t,n)=>(zp(e,t,"read from private field"),n?n.call(e):t.get(e)),Xp=(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)},Jp=(e,t,n,i)=>(zp(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),ev=(e,t,n)=>(zp(e,t,"access private method"),n);const tv={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},nv=Bo.createElement("template");
2nv.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-captions-button:not([mediasubtitleslist]),\n    media-captions-menu:not([mediasubtitleslist]),\n    media-captions-menu-button:not([mediasubtitleslist]),\n    media-audio-track-menu[mediaaudiotrackunavailable],\n    media-audio-track-menu-button[mediaaudiotrackunavailable],\n    media-rendition-menu[mediarenditionunavailable],\n    media-rendition-menu-button[mediarenditionunavailable],\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 iv extends Wo.HTMLElement{constructor(){super(),Xp(this,Fp),Xp(this,Gp),Xp(this,Vp,void 0),Xp(this,$p,void 0),Xp(this,Kp,void 0),Xp(this,qp,void 0),Xp(this,Qp,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer()),Jp(this,qp,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&&(!!tv[e.attributeName]||!!e.attributeName.startsWith("breakpoint"))})&&this.render()})),Jp(this,Qp,this.render.bind(this)),ev(this,Fp,Yp).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return null!=(e=Zp(this,Vp))?e:this.constructor.template}set template(e){null!==e?"string"===typeof e?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(Jp(this,Vp,e),Jp(this,Kp,null),this.createRenderer()):this.removeAttribute("template")}get props(){var e,t,n;const i=[...Array.from(null!=(t=null==(e=this.mediaController)?void 0:e.attributes)?t:[]).filter(e=>{let{name:t}=e;return tv[t]||t.startsWith("breakpoint")}),...Array.from(this.attributes)],a={};for(const r of i){const e=null!=(n=tv[r.name])?n:yo(r.name);let{value:t}=r;null!=t?(To(t)&&(t=parseFloat(t)),a[e]=""===t||t):a[e]=!1}return a}
2attributeChangedCallback(e,t,n){"template"===e&&t!=n&&ev(this,Gp,jp).call(this)}connectedCallback(){this.addEventListener(io.BREAKPOINTS_COMPUTED,Zp(this,Qp)),Zp(this,qp).observe(this,{attributes:!0}),Zp(this,qp).observe(this.renderRoot,{attributes:!0,subtree:!0}),ev(this,Gp,jp).call(this)}disconnectedCallback(){this.removeEventListener(io.BREAKPOINTS_COMPUTED,Zp(this,Qp)),Zp(this,qp).disconnect()}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==Zp(this,$p)&&(Jp(this,$p,this.template),this.renderer=new fp(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(nv.content.cloneNode(!0),this.renderer))}render(){var e;null==(e=this.renderer)||e.update(this.props)}}function av(e){let{anchor:t,floating:n,placement:i}=e;const a=function(e){let{anchor:t,floating:n}=e;return{anchor:rv(t,n.offsetParent),floating:{x:0,y:0,width:n.offsetWidth,height:n.offsetHeight}}}({anchor:t,floating:n}),{x:r,y:o}=function(e,t){let{anchor:n,floating:i}=e;const a="x"===function(e){return["top","bottom"].includes(ov(e))?"y":"x"}(t)?"y":"x",r="y"===a?"height":"width",o=ov(t),s=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2,d=n[r]/2-i[r]/2;let u;switch(o){case"top":u={x:s,y:n.y-i.height};break;case"bottom":u={x:s,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:l};break;case"left":u={x:n.x-i.width,y:l};break;default:u={x:n.x,y:n.y}}switch(t.split("-")[1]){case"start":u[a]-=d;break;case"end":u[a]+=d}return u}(a,i);return{x:r,y:o}}function rv(e,t){var n;const i=e.getBoundingClientRect(),a=null!=(n=null==t?void 0:t.getBoundingClientRect())?n:{x:0,y:0};return{x:i.x-a.x,y:i.y-a.y,width:i.width,height:i.height}}function ov(e){return e.split("-")[0]}Vp=new WeakMap,$p=new WeakMap,Kp=new WeakMap,qp=new WeakMap,Fp=new WeakSet,Yp=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){const t=this[e];delete this[e],this[e]=t}},Gp=new WeakSet,jp=function(){var e;const t=this.getAttribute("template");if(!t||t===Zp(this,Kp))return;const n=this.getRootNode(),i=null==(e=null==n?void 0:n.getElementById)?void 0:e.call(n,t);if(i)return Jp(this,Kp,t),Jp(this,Vp,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)&&(Jp(this,Kp,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=Bo.createElement("template");t.innerHTML=e,Jp(this,Vp,t),this.createRenderer()}).catch(console.error))},Qp=new WeakMap,iv.observedAttributes=["template"],iv.processor=Op,Wo.customElements.get("media-theme")||Wo.customElements.define("media-theme",iv);class sv extends Event{constructor(e){let{action:t="auto",relatedTarget:n,...i}=e;super("invoke",i),this.action=t,this.relatedTarget=n}}class lv extends Event{constructor(e){let{newState:t,oldState:n,...i}=e;super("toggle",i),this.newState=t,this.oldState=n}}var dv,uv,cv,hv,mv,pv,vv,bv,gv,Ev,fv,yv,_v,Tv,Av,kv,wv,Iv,Sv,Rv,Cv,Lv,Dv,Mv,xv,Nv,Ov,Pv,Uv,Wv,Bv,Hv,Vv,$v,Kv,qv,Fv,Yv,Gv,jv,Qv,zv,Zv,Xv,Jv,eb,tb=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},nb=(e,t,n)=>(tb(e,t,"read from private field"),n?n.call(e):t.get(e)),ib=(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)},ab=(e,t,n,i)=>(tb(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),rb=(e,t,n)=>(tb(e,t,"access private method"),n);function ob(e){let{type:t,text:n,value:i,checked:a}=e;const r=Bo.createElement("media-chrome-menu-item");r.type=null!=t?t:"",r.part.add("menu-item"),t&&r.part.add(t),r.value=i,r.checked=a;const o=Bo.createElement("span");return o.textContent=n,r.append(o),r}function sb(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;const i=e.shadowRoot.querySelector(`[name="${t}"] > svg`);return i?i.cloneNode(!0):""}const lb="style",db="hidden",ub="disabled",cb="anchor";class hb extends Wo.HTMLElement{constructor(){if(super(),ib(this,bv),ib(this,Ev),ib(this,_v),ib(this,Av),ib(this,wv),ib(this,Sv),ib(this,Dv),ib(this,xv),ib(this,Ov),ib(this,Uv),ib(this,Bv),ib(this,Vv),ib(this,Kv),ib(this,Fv),ib(this,Gv),ib(this,Qv),ib(this,Zv),ib(this,Jv),ib(this,dv,null),ib(this,uv,null),ib(this,cv,null),ib(this,hv,new Set),ib(this,mv,void 0),ib(this,pv,!1),ib(this,vv,null),ib(this,yv,()=>{const e=nb(this,hv),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}));ab(this,hv,t)}),ib(this,Cv,()=>{rb(this,Dv,Mv).call(this),rb(this,xv,Nv).call(this,!1)}),ib(this,Lv,()=>{rb(this,Dv,Mv).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),ab(this,mv,new MutationObserver(nb(this,yv)))}static get observedAttributes(){return[ub,db,lb,cb,Jr.MEDIA_CONTROLLER]}static formatMenuItemText(e,t){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":rb(this,bv,gv).call(this,e);break;case"invoke":rb(this,Av,kv).call(this,e);break;case"click":rb(this,Ov,Pv).call(this,e);break;case"toggle":rb(this,Bv,Hv).call(this,e);break;case"focusout":rb(this,Kv,qv).call(this,e);break;case"keydown":rb(this,Fv,Yv).call(this,e)}}connectedCallback(){var e,t;nb(this,mv).observe(this.defaultSlot,{childList:!0}),ab(this,vv,ns(this.shadowRoot,":host")),rb(this,_v,Tv).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),ab(this,dv,Go(this)),null==(t=null==(e=nb(this,dv))?void 0:e.associateElement)||t.call(e,this),this.hidden||(Ko(pb
2(this),nb(this,Cv)),Ko(this,nb(this,Lv))),rb(this,Ev,fv).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){var e,t;nb(this,mv).disconnect(),qo(pb(this),nb(this,Cv)),qo(this,nb(this,Lv)),this.disable(),null==(t=null==(e=nb(this,dv))?void 0:e.unassociateElement)||t.call(e,this),ab(this,dv,null),ab(this,uv,null),ab(this,cv,null),this.shadowRoot.removeEventListener("slotchange",this)}attributeChangedCallback(e,t,n){var i,a,r,o;e===db&&n!==t?(nb(this,pv)||ab(this,pv,!0),this.hidden?rb(this,Sv,Rv).call(this):rb(this,wv,Iv).call(this),this.dispatchEvent(new lv({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===Jr.MEDIA_CONTROLLER?(t&&(null==(a=null==(i=nb(this,dv))?void 0:i.unassociateElement)||a.call(i,this),ab(this,dv,null)),n&&this.isConnected&&(ab(this,dv,Go(this)),null==(o=null==(r=nb(this,dv))?void 0:r.associateElement)||o.call(r,this))):e===ub&&n!==t?null==n?this.enable():this.disable():e===lb&&n!==t&&rb(this,_v,Tv).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?null==(e=Jo(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(mb)}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&&rb(this,Jv,eb).call(this,t)}focus(){if(ab(this,uv,Xo()),this.items.length)return rb(this,Zv,Xv).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=rb(this,Gv,jv).call(this,e);n&&(rb(this,Jv,eb).call(this,n,"checkbox"===n.type),nb(this,cv)&&!this.hidden&&(null==(t=nb(this,uv))||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=rb(this,Gv,jv).call(this,e))?t:rb(this,Qv,zv).call(this))?n:a[0],o=a.indexOf(r);let s=Math.max(0,o);"ArrowDown"===i?s++:"ArrowUp"===i?s--:"Home"===e.key?s=0:"End"===e.key&&(s=a.length-1),s<0&&(s=a.length-1),s>a.length-1&&(s=0),rb(this,Zv,Xv).call(this,a[s]),a[s].focus()}}function mb(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function pb(e){var t;return null!=(t=e.getAttribute("bounds")?Zo(e,`#${e.getAttribute("bounds")}`):Yo(e)||e.parentElement)?t:e}dv=new WeakMap,uv=new WeakMap,cv=new WeakMap,hv=new WeakMap,mv=new WeakMap,pv=new WeakMap,vv=new WeakMap,bv=new WeakSet,gv=function(e){const t=e.target;for(const n of t.assignedNodes({flatten:!0}))3===n.nodeType&&""===n.textContent.trim()&&n.remove();["header","title"].includes(t.name)&&rb(this,Ev,fv).call(this),t.name||nb(this,yv).call(this)},Ev=new WeakSet,fv=function(){const e=this.shadowRoot.querySelector('slot[name="header"]'),t=this.shadowRoot.querySelector('slot[name="title"]');e.hidden=0===t.assignedNodes().length&&0===e.assignedNodes().length},yv=new WeakMap,_v=new WeakSet,Tv=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")},Av=new WeakSet,kv=function(e){ab(this,cv,e.relatedTarget),zo(this,e.relatedTarget)||(this.hidden=!this.hidden)},wv=new WeakSet,Iv=function(){var e;null==(e=nb(this,cv))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),Ko(pb(this),nb(this,Cv)),Ko(this,nb(this,Lv))},Sv=new WeakSet,Rv=function(){var e;null==(e=nb(this,cv))||e.setAttribute("aria-expanded","false"),qo(pb(this),nb(this,Cv)),qo(this,nb(this,Lv))},Cv=new WeakMap,Lv=new WeakMap,Dv=new WeakSet,Mv=function(e){if(this.hasAttribute("mediacontroller")&&!this.anchor)return;if(this.hidden||!this.anchorElement)return;const{x:t,y:n}=av({anchor:this.anchorElement,floating:this,placement:"top-start"});null!=e||(e=this.offsetWidth);const i=pb(this).getBoundingClientRect(),a=i.width-t-e,r=i.height-n-this.offsetHeight,{style:o}=nb(this,vv);o.setProperty("position","absolute"),o.setProperty("right",`${Math.max(0,a)}px`),o.setProperty("--_menu-bottom",`${r}px`);const s=getComputedStyle(this),l=o.getPropertyValue("--_menu-bottom")===s.bottom?r:parseFloat(s.bottom),d=i.height-l-parseFloat(s.marginBottom);this.style.setProperty("--_menu-max-height",`${d}px`)},xv=new WeakSet,Nv=function(e){const t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),n=null==t?void 0:t.querySelector('[role="menu"]'),{style:i}=nb(this,vv);if(e||i.setProperty("--media-menu-transition-in","none"),n){const e=n.offsetHeight,i=Math.max(n.offsetWidth,t.offsetWidth);this.style.setProperty("min-width",`${i}px`),this.style.setProperty("min-height",`${e}px`),rb(this,Dv,Mv).call(this,i)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),rb(this,Dv,Mv).call(this);i.removeProperty("--media-menu-transition-in")},Ov=new WeakSet,Pv=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(nb(this,Uv,Wv)))return null==(t=nb(this,uv))||t.focu
2s(),void(this.hidden=!0);const n=rb(this,Gv,jv).call(this,e);n&&!n.hasAttribute("disabled")&&(rb(this,Zv,Xv).call(this,n),this.handleSelect(e))},Uv=new WeakSet,Wv=function(){var e;return null==(e=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))?void 0:e.find(e=>e.matches('button[part~="back"]'))},Bv=new WeakSet,Hv=function(e){if(e.target===this)return;rb(this,Vv,$v).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 sv({relatedTarget:n})));for(const n of t)n.setAttribute("aria-expanded",`${!n.submenuElement.hidden}`);rb(this,xv,Nv).call(this,!0)},Vv=new WeakSet,$v=function(){const e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},Kv=new WeakSet,qv=function(e){var t;zo(this,e.relatedTarget)||(nb(this,pv)&&(null==(t=nb(this,uv))||t.focus()),nb(this,cv)&&nb(this,cv)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},Fv=new WeakSet,Yv=function(e){var t,n,i,a,r;const{key:o,ctrlKey:s,altKey:l,metaKey:d}=e;if(!(s||l||d)&&this.keysUsed.includes(o))if(e.preventDefault(),e.stopPropagation(),"Tab"===o){if(nb(this,pv))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"===o?(null==(r=nb(this,uv))||r.focus(),nb(this,pv)&&(this.hidden=!0)):"Enter"===o||" "===o?this.handleSelect(e):this.handleMove(e)},Gv=new WeakSet,jv=function(e){return e.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},Qv=new WeakSet,zv=function(){return this.items.find(e=>0===e.tabIndex)},Zv=new WeakSet,Xv=function(e){for(const t of this.items)t.tabIndex=t===e?0:-1},Jv=new WeakSet,eb=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}))},hb.shadowRootOptions={mode:"open"},hb.getTemplateHTML=function(e){return'\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        --_menu-bg: rgb(20 20 30 / .8);\n        background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg))));\n        border-radius: var(--media-menu-border-radius);\n        border: var(--media-menu-border, none);\n        display: var(--media-menu-display, inline-flex) !important;\n        \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        bottom: var(--_menu-bottom);\n        box-sizing: border-box;\n      } \n\n      @-moz-document url-prefix() {\n        :host{\n          --_menu-bg: rgb(20 20 30);\n        }\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      }
2\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      button {\n        background: none;\n        color: inherit;\n        border: none;\n        padding: 0;\n        font: inherit;\n        outline: inherit;\n        display: inline-flex;\n        align-items: center;\n      }\n\n      slot[name="header"][hidden] {\n        display: none;\n      }\n\n      slot[name="header"] > *,\n      slot[name="header"]::slotted(*) {\n        padding: .4em .7em;\n        border-bottom: 1px solid rgb(255 255 255 / .25);\n        cursor: var(--media-cursor, default);\n      }\n\n      slot[name="header"] > button[part~="back"],\n      slot[name="header"]::slotted(button[part~="back"]) {\n        cursor: var(--media-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      }\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      slot[name="header"]::slotted(*) {\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" part="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  '},Wo.customElements.get("media-chrome-menu")||Wo.customElements.define("media-chrome-menu",hb);var vb,bb,gb,Eb,fb,yb,_b,Tb,Ab,kb,wb,Ib,Sb,Rb=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Cb=(e,t,n)=>(Rb(e,t,"read from private field"),n?n.call(e):t.get(e)),Lb=(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)},Db=(e,t,n,i)=>(Rb(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Mb=(e,t,n)=>(Rb(e,t,"access private method"),n);const xb="type",Nb="value",Ob="checked",Pb="disabled";class Ub extends Wo.HTMLElement{constructor(){if(super(),Lb(this,gb),Lb(this,fb),Lb(this,_b),Lb(this,Ib),Lb(this,vb,!1),Lb(this,bb,void 0),Lb(this,Ab,()=>{var e,t;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);const n=this.shadowRoot.querySelector('slot[name="description"]'),i=null==(e=this.submenuElement.checkedItems)?void 0:e[0],a=null!=(t=null==i?void 0:i.dataset.description)?t:null==i?void 0:i.text,r=Bo.createElement("span");r.textContent=null!=a?a:"",n.replaceChildren(r)}),Lb(this,kb,e=>{const{key:t}=e;this.keysUsed.includes(t)?this.handleClick(e):this.removeEventListener("keyup",Cb(this,kb))}),Lb(this,wb,e=>{const{metaKey:t,altKey:n,key:i}=e;
2t||n||!this.keysUsed.includes(i)?this.removeEventListener("keyup",Cb(this,kb)):this.addEventListener("keyup",Cb(this,kb),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Fo(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[xb,Pb,Ob,Nb]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),Wb(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":Mb(this,gb,Eb).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":Cb(this,wb).call(this,e);break;case"keyup":Cb(this,kb).call(this,e)}}attributeChangedCallback(e,t,n){e===Ob&&Wb(this)&&!Cb(this,vb)?this.setAttribute("aria-checked",null!=n?"true":"false"):e===xb&&n!==t?this.role="menuitem"+n:e===Pb&&n!==t&&(null==n?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Pb)||this.enable(),this.role="menuitem"+this.type,Db(this,bb,Bb(this,this.parentNode)),Mb(this,Ib,Sb).call(this),this.submenuElement&&Mb(this,fb,yb).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){this.disable(),Mb(this,Ib,Sb).call(this),Db(this,bb,null),this.shadowRoot.removeEventListener("slotchange",this)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=Jo(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(xb))?e:""}set type(e){this.setAttribute(xb,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(Nb))?e:this.text}set value(e){this.setAttribute(Nb,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(Wb(this))return"true"===this.getAttribute("aria-checked")}set checked(e){Wb(this)&&(Db(this,vb,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){Wb(this)||this.invokeTargetElement&&zo(this,e.target)&&this.invokeTargetElement.dispatchEvent(new sv({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function Wb(e){return"radio"===e.type||"checkbox"===e.type}function Bb(e,t){if(!e)return null;const{host:n}=e.getRootNode();return!t&&n?Bb(e,n):(null==t?void 0:t.items)?t:Bb(t,null==t?void 0:t.parentNode)}vb=new WeakMap,bb=new WeakMap,gb=new WeakSet,Eb=function(e){const t=e.target;if(!(null==t?void 0:t.name))for(const n of t.assignedNodes({flatten:!0}))n instanceof Text&&""===n.textContent.trim()&&n.remove();"submenu"===t.name&&(this.submenuElement?Mb(this,fb,yb).call(this):Mb(this,_b,Tb).call(this))},fb=new WeakSet,yb=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",Cb(this,Ab)),this.submenuElement.addEventListener("addmenuitem",Cb(this,Ab)),this.submenuElement.addEventListener("removemenuitem",Cb(this,Ab)),Cb(this,Ab).call(this)},_b=new WeakSet,Tb=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",Cb(this,Ab)),this.submenuElement.removeEventListener("addmenuitem",Cb(this,Ab)),this.submenuElement.removeEventListener("removemenuitem",Cb(this,Ab)),Cb(this,Ab).call(this)},Ab=new WeakMap,kb=new WeakMap,wb=new WeakMap,Ib=new WeakSet,Sb=function(){var e;const t=null==(e=Cb(this,bb))?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")},Ub.shadowRootOptions={mode:"open"},Ub.getTemplateHTML=function(e){return`\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: var(--media-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: var(--media-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">\n      ${this.getSuffixSlotInnerHTML(e)}\n    </slot>\n    <slot name="submenu"></slot>\n  `},Ub.getSuffixSlotInnerHTML=function(e){return""},Wo.customElements.get("media-chrome-menu-item")||Wo.customElements.define("media-chrome-menu-item",Ub);class Hb extends hb{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:Yo(this).querySelector("media-settings-menu-button")}}Hb.getTemplateHTML=function(e){return`\n    ${hb.getTemplateHTML(e)}\n    <style>\n      :host {\n        --_menu-bg: rgb(20 20 30 / .8);\n        background: var(--media-settings-menu-background,\n            var(--media-menu-background,\n              var(--media-control-background,\n                var(--media-secondary-color, var(--_menu-bg)))));\n        min-width: var(--media-settings-menu-min-width, 170px);\n        border-radius: 2px 2px 0 0;\n        overflow: hidden;\n      }\n\n      @-moz-document url-prefix() {\n        :host{\n          --_menu-bg: rgb(20 20 30);\n        }\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  `},Wo.customElements.get("media-settings-menu")||Wo.customElements.define("media-settings-menu",Hb);class Vb extends Ub{}Vb.shadowRootOptions={mode:"open"},Vb.getTemplateHTML=function(e){return`\n    ${Ub.getTemplateHTML.call(this,e)}\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  `},Vb.getSuffixSlotInnerHTML=function(e){return'\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  '},Wo.customElements.get("media-settings-menu-item")||Wo.customElements.define("media-settings-menu-item",Vb);class $b extends eu{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=Jo(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;null==(e=this.invokeTargetElement)||e.dispatchEvent(new sv({relatedTarget:this}))}}Wo.customElements.get("media-chrome-menu-button")||Wo.customElements.define("media-chrome-menu-button",$b);class Kb extends $b{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",So("settings"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:Yo(this).querySelector("media-settings-menu")}}Kb.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\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  '},Kb.getTooltipContentHTML=function(){return So("Settings")},Wo.customElements.get("media-settings-menu-button")||Wo.customElements.define("media-settings-menu-button",Kb);var qb,Fb,Yb,Gb,jb,Qb,zb=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)}
2,Zb=(e,t,n)=>(zb(e,t,"read from private field"),n?n.call(e):t.get(e)),Xb=(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)},Jb=(e,t,n,i)=>(zb(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),eg=(e,t,n)=>(zb(e,t,"access private method"),n);class tg extends hb{constructor(){super(...arguments),Xb(this,Yb),Xb(this,jb),Xb(this,qb,[]),Xb(this,Fb,void 0)}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_AUDIO_TRACK_LIST,no.MEDIA_AUDIO_TRACK_ENABLED,no.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,n){var i;super.attributeChangedCallback(e,t,n),e===no.MEDIA_AUDIO_TRACK_ENABLED&&t!==n?this.value=n:e===no.MEDIA_AUDIO_TRACK_LIST&&t!==n&&(Jb(this,qb,null==(i=null!=n?n:"")?void 0:i.split(/\s+/).map(fo)),eg(this,Yb,Gb).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",eg(this,jb,Qb))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",eg(this,jb,Qb))}get anchorElement(){var e;return"auto"!==this.anchor?super.anchorElement:null==(e=Yo(this))?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return Zb(this,qb)}set mediaAudioTrackList(e){Jb(this,qb,e),eg(this,Yb,Gb).call(this)}get mediaAudioTrackEnabled(){var e;return null!=(e=ss(this,no.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){ls(this,no.MEDIA_AUDIO_TRACK_ENABLED,e)}}qb=new WeakMap,Fb=new WeakMap,Yb=new WeakSet,Gb=function(){if(Zb(this,Fb)===JSON.stringify(this.mediaAudioTrackList))return;Jb(this,Fb,JSON.stringify(this.mediaAudioTrackList));const e=this.mediaAudioTrackList;this.defaultSlot.textContent="",e.sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0}));for(const t of e){const e=ob({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});
2e.prepend(sb(this,"checked-indicator")),this.defaultSlot.append(e)}},jb=new WeakSet,Qb=function(){if(null==this.value)return;const e=new Wo.CustomEvent(Xr.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},Wo.customElements.get("media-audio-track-menu")||Wo.customElements.define("media-audio-track-menu",tg);const ng=e=>{const t=So("Audio");e.setAttribute("aria-label",t)};class ig extends $b{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_AUDIO_TRACK_ENABLED,no.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),ng(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_LANG&&ng(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=Yo(this))?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return null!=(e=ss(this,no.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){ls(this,no.MEDIA_AUDIO_TRACK_ENABLED,e)}}ig.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\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  '},ig.getTooltipContentHTML=function(){return So("Audio")},Wo.customElements.get("media-audio-track-menu-button")||Wo.customElements.define("media-audio-track-menu-button",ig);var ag,rg,og,sg,lg,dg=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ug=(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,cg=(e,t,n)=>(dg(e,t,"access private method"),n);class hg extends hb{constructor(){super(...arguments),ug(this,rg),ug(this,sg),ug(this,ag,void 0)}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_SUBTITLES_LIST,no.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_SUBTITLES_LIST&&t!==n?cg(this,rg,og).call(this):e===no.MEDIA_SUBTITLES_SHOWING&&t!==n&&(this.value=n||"",cg(this,rg,og).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",cg(this,sg,lg))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",cg(this,sg,lg))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:Yo(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return mg(this,no.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){pg(this,no.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return mg(this,no.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){pg(this,no.MEDIA_SUBTITLES_SHOWING,e)}}ag=new WeakMap,rg=new WeakSet,og=function(){var e;const t=(dg(n=this,i=ag,"read from private field"),(a?a.call(n):i.get(n))!==JSON.stringify(this.mediaSubtitlesList));var n,i,a;const r=this.value!==this.getAttribute(no.MEDIA_SUBTITLES_SHOWING);if(!t&&!r)return;((e,t,n,i)=>{dg(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,ag,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";const o=!this.value,s=ob({type:"radio",text:this.formatMenuItemText(So("Off")),value:"off",checked:o});s.prepend(sb(this,"checked-indicator")),this.defaultSlot.append(s);const l=this.mediaSubtitlesList;for(const d of l){const t=ob({type:"radio",text:this.formatMenuItemText(d.label,d),value:al(d),checked:this.value==al(d)});t.prepend(sb(this,"checked-indicator"));"captions"===(null!=(e=d.kind)?e:"subs")&&t.append(sb(this,"captions-indicator")),this.defaultSlot.append(t)}},sg=new WeakSet,lg=function(){const e=this.mediaSubtitlesShowing,t=this.getAttribute(no.MEDIA_SUBTITLES_SHOWING),n=this.value!==t;if((null==e?void 0:e.length)&&n&&this.dispatchEvent(new Wo.CustomEvent(Xr.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e})),!this.value||!n)return;const i=new Wo.CustomEvent(Xr.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)},hg.getTemplateHTML=function(e){return`\n    ${hb.getTemplateHTML(e)}\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>\n  `};const mg=(e,t)=>{const n=e.getAttribute(t);return n?nl(n):[]},pg=(e,t,n)=>{if(!(null==n?void 0:n.length))return void e.removeAttribute(t);const i=rl(n);e.getAttribute(t)!==i&&e.setAttribute(t,i)};Wo.customElements.get("media-captions-menu")||Wo.customElements.define("media-captions-menu",hg);const vg=e=>{e.setAttribute("data-captions-enabled",dl(e).toString())},bg=e=>{e.setAttribute("aria-label",So("closed captions"))};class gg extends $b{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_SUBTITLES_LIST,no.MEDIA_SUBTITLES_SHOWING,
2no.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),bg(this),vg(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_SUBTITLES_SHOWING?vg(this):e===no.MEDIA_LANG&&bg(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=Yo(this))?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return Eg(this,no.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){fg(this,no.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Eg(this,no.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){fg(this,no.MEDIA_SUBTITLES_SHOWING,e)}}gg.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([data-captions-enabled="true"]) slot[name=off] {\n        display: none !important;\n      }\n\n      \n      :host(:not([data-captions-enabled="true"])) slot[name=on] {\n        display: none !important;\n      }\n\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\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  '},gg.getTooltipContentHTML=function(){return So("Captions")};const Eg=(e,t)=>{const n=e.getAttribute(t);return n?nl(n):[]},fg=(e,t,n)=>{if(!(null==n?void 0:n.length))return void e.removeAttribute(t);const i=rl(n);e.getAttribute(t)!==i&&e.setAttribute(t,i)};Wo.customElements.get("media-captions-menu-button")||Wo.customElements.define("media-captions-menu-button",gg);var yg,_g,Tg,Ag,kg,wg=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ig=(e,t,n)=>(wg(e,t,"read from private field"),n?n.call(e):t.get(e)),Sg=(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,Rg=(e,t,n)=>(wg(e,t,"access private method"),n);const Cg="rates";class Lg extends hb{constructor(){super(),Sg(this,_g),Sg(this,Ag),Sg(this,yg,new el(this,Cg,{defaultValue:hh})),Rg(this,_g,Tg).call(this)}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_PLAYBACK_RATE,Cg]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===no.MEDIA_PLAYBACK_RATE&&t!=n?(this.value=n,Rg(this,_g,Tg).call(this)):e===Cg&&t!=n&&(Ig(this,yg).value=n,Rg(this,_g,Tg).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Rg(this,Ag,kg))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Rg(this,Ag,kg))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:Yo(this).querySelector("media-playback-rate-menu-button")}get rates(){return Ig(this,yg)}set rates(e){e?Array.isArray(e)?Ig(this,yg).value=e.join(" "):"string"===typeof e&&(Ig(this,yg).value=e):Ig(this,yg).value="",Rg(this,_g,Tg).call(this)}get mediaPlaybackRate(){return is(this,no.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){as(this,no.MEDIA_PLAYBACK_RATE,e)}}yg=new WeakMap,_g=new WeakSet,Tg=function(){this.defaultSlot.textContent="";const e=this.mediaPlaybackRate,t=new Set(Array.from(Ig(this,yg)).map(e=>Number(e)));e>0&&!t.has(e)&&t.add(e);const n=Array.from(t).sort((e,t)=>e-t);for(const i of n){const t=ob({type:"radio",text:this.formatMenuItemText(`${i}x`,i),value:i.toString(),checked:e===i});t.prepend(sb(this,"checked-indicator")),this.defaultSlot.append(t)}},Ag=new WeakSet,kg=function(){if(!this.value)return;const e=new Wo.CustomEvent(Xr.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},Wo.customElements.get("media-playback-rate-menu")||Wo.customElements.define("media-playback-rate-menu",Lg);class Dg extends $b{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(e=this.mediaPlaybackRate)?e:1}x`}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),e===no.MEDIA_PLAYBACK_RATE){const e=n?+n:Number.NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",So("Playback rate {playbackRate}",{playbackRate:t}))}}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:Yo(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return is(this,no.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){as(this,no.MEDIA_PLAYBACK_RATE,e)}}Dg.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host {\n        min-width: 5ch;\n        padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n      }\n      \n      :host([aria-expanded="true"]) slot {\n        display: block;\n      }\n\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n    <slot name="icon">${e.mediaplaybackrate||1}x</slot>\n  `},Dg.getTooltipContentHTML=function(){return So("Playback rate")},Wo.customElements.get("media-playback-rate-menu-button")||Wo.customElements.define("media-playback-rate-menu-button",Dg);var Mg,xg,Ng,Og,Pg,Ug,Wg=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Bg=(e,t,n)=>(Wg(e,t,"read from private field"),n?n.call(e):t.get(e)),Hg=(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)},Vg=(e,t,n,i)=>(Wg(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),$g=(e,t,n)=>(Wg(e,t,"access private method"),n);class Kg extends hb{constructor(){super(...arguments),Hg(this,Ng),Hg(this,Pg),Hg(this,Mg,[]),Hg(this,xg,{})}static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_RENDITION_LIST,no.MEDIA_RENDITION_SELECTED,no.MEDIA_RENDITION_UNAVAILABLE,no.MEDIA_HEIGHT,no.MEDIA_WIDTH]}static formatMenuItemText(e,t){return super.formatMenuItemText(e,t)}static formatRendition(e){let{showBitrate:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=`${Math.min(e.width,e.height)}p`;if(t&&e.bitrate){const t=e.bitrate/1e6;return`${n} (${`${t.toFixed(t<1?1:0)} Mbps`})`}return this.formatMenuItemText(n,e)}static compareRendition(e,t){var n,i;return t.height===e.height?(null!=(n=t.bitrate)?n:0)-(null!=(i=e.bitrate)?i:0):t.height-e.height}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),t!==n)switch(e){case no.MEDIA_RENDITION_SELECTED:this.value=null!=n?n:"auto",$g(this,Ng,Og).call(this);break;case no.MEDIA_RENDITION_LIST:Vg(this,Mg,null==(i=n)?void 0:i.split(/\s+/).map(go)),$g(this,Ng,Og).call(this);break;case no.MEDIA_HEIGHT:case no.MEDIA_WIDTH:$g(this,Ng,Og).call(this)}var i}connectedCallback(){super.connectedCallback(),this.addEventListener("change",$g(this,Pg,Ug))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",$g(this,Pg,Ug))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:Yo(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return Bg(this,Mg)}set mediaRenditionList(e){Vg(this,Mg,e),$g(this,Ng,Og).call(this)}get mediaRenditionSelected(){return ss(this,no.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){ls(this,no.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return is(this,no.MEDIA_HEIGHT)}set mediaHeight(e){as(this,no.MEDIA_HEIGHT,e)}get mediaWidth(){return is(this,no.MEDIA_WIDTH)}set mediaWidth(e){as(this,no.MEDIA_WIDTH,e)}compareRendition(e,t){return this.constructor.compareRendition(e,t)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}formatRendition(e,t){return this.constructor.formatRendition(e,t)}showRenditionBitrate(e){return this.mediaRenditionList.some(t=>t!==e&&t.height===e.height&&t.bitrate!==e.bitrate)}}Mg=new WeakMap,xg=new WeakMap,Ng=new WeakSet,Og=function(){const e=!this.mediaRenditionSelected;if(Bg(this,xg).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&Bg(this,xg).mediaHeight===this.mediaHeight&&Bg(this,xg).mediaWidth===this.mediaWidth&&Bg(this,xg).isAuto===e)return;Bg(this,xg).mediaRenditionList=JSON.stringify(this.mediaRenditionList),Bg(this,xg).mediaHeight=this.mediaHeight,Bg(this,xg).mediaWidth=this.mediaWidth,Bg(this,xg).isAuto=e;const t=this.mediaRenditionList.sort(this.compareRendition.bind(this)),n=t.find(e=>e.id===this.mediaRenditionSelected);for(const o of t)o.selected=o===n;this.defaultSlot.textContent="";for(const o of t){const t=ob({type:"radio",text:this.formatRendition(o,{showBitrate:this.showRenditionBitrate(o)}),value:`${o.id}`,checked:o.selected&&!e});t.prepend(sb(this,"checked-indicator")),this.defaultSlot.append(t)}const i=n&&this.showRenditionBitrate(n);let a;e&&(n?a=this.formatMenuItemText(`${So("Auto")} \u2022 ${this.formatRendition(n,{showBitrate:i})}`,n):this.mediaHeight>0&&this.mediaWidth>0&&(a=this.formatMenuItemText(`${So("Auto")} (${Math.min(this.mediaWidth,this.mediaHeight)}p)`))),a||(a=this.formatMenuItemText(So("Auto")));const r=ob({type:"radio",text:a,value:"auto",checked:e});r.dataset.description=a,r.prepend(sb(this,"checked-indicator")),this.defaultSlot.append(r)},Pg=new WeakSet,Ug=function(){if(null==this.value)return;const e=new Wo.CustomEvent(Xr.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},Wo.customElements.get("media-rendition-menu")||Wo.customElements.define("media-rendition-menu",Kg);class qg extends $b{static get observedAttributes(){return[...super.observedAttributes,no.MEDIA_RENDITION_SELECTED,no.MEDIA_RENDITION_UNAVAILABLE,no.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",So("quality"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:Yo(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return ss(this,no.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){ls(this,no.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return is(this,no.MEDIA_HEIGHT)}set mediaHeight(e){as(this,no.MEDIA_HEIGHT,e)}}qg.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\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  '},qg.getTooltipContentHTML=function(){return So("Quality")},Wo.customElements.get("media-rendition-menu-button")||Wo.customElements.define("media-rendition-menu-button",qg);var Fg,Yg,Gg,jg,Qg,zg,Zg,Xg,Jg,eE,tE,nE,iE,aE,rE,oE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},sE=(e,t,n)=>(oE(e,t,"read from private field"),n?n.call(e):t.get(e)),lE=(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)},dE=(e,t,n,i)=>(oE(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),uE=(e,t,n)=>(oE(e,t,"access private method"),n);class cE extends hb{constructor(){super(),lE(this,Yg),lE(this,jg),lE(this,zg),lE(this,Xg),lE(this,tE),lE(this,Fg,!1),lE(this,eE,e=>{const t=e.target,n="VIDEO"===(null==t?void 0:t.nodeName),i=uE(this,Xg,Jg).call(this,t);(n||i)&&(sE(this,Fg)?uE(this,jg,Qg).call(this):uE(this,tE,nE).call(this,e))}),lE(this,iE,e=>{const t=e.target,n=this.contains(t),i=2===e.button,a="VIDEO"===(null==t?void 0:t.nodeName),r=uE(this,Xg,Jg).call(this,t);if(n)return;i&&(a||r)||uE(this,jg,Qg).call(this)}),lE(this,aE,e=>{"Escape"===e.key&&uE(this,jg,Qg).call(this)}),lE(this,rE,e=>{var t,n;const i=e.target;if(null==(t=i.matches)?void 0:t.call(i,'button[invoke="copy"]')){const e=null==(n=i.closest("media-context-menu-item"))?void 0:n.querySelector('input[slot="copy"]');e&&navigator.clipboard.writeText(e.value)}uE(this,jg,Qg).call(this)}),this.setAttribute("noautohide",""),uE(this,Yg,Gg).call(this)}connectedCallback(){super.connectedCallback(),Yo(this).addEventListener("contextmenu",sE(this,eE)),this.addEventListener("click",
2sE(this,rE))}disconnectedCallback(){super.disconnectedCallback(),Yo(this).removeEventListener("contextmenu",sE(this,eE)),this.removeEventListener("click",sE(this,rE)),document.removeEventListener("mousedown",sE(this,iE)),document.removeEventListener("keydown",sE(this,aE))}}Fg=new WeakMap,Yg=new WeakSet,Gg=function(){this.hidden=!sE(this,Fg)},jg=new WeakSet,Qg=function(){dE(this,Fg,!1),uE(this,Yg,Gg).call(this)},zg=new WeakSet,Zg=function(){document.querySelectorAll("media-context-menu").forEach(e=>{var t;e!==this&&uE(t=e,jg,Qg).call(t)})},Xg=new WeakSet,Jg=function(e){if(!e)return!1;if(e.hasAttribute("slot")&&"media"===e.getAttribute("slot"))return!0;if(e.nodeName.includes("-")&&e.tagName.includes("-")){return e.hasAttribute("src")||e.hasAttribute("poster")||e.hasAttribute("preload")||e.hasAttribute("playsinline")}return!1},eE=new WeakMap,tE=new WeakSet,nE=function(e){e.preventDefault(),uE(this,zg,Zg).call(this),dE(this,Fg,!0),this.style.position="fixed",this.style.left=`${e.clientX}px`,this.style.top=`${e.clientY}px`,uE(this,Yg,Gg).call(this),document.addEventListener("mousedown",sE(this,iE),{once:!0}),document.addEventListener("keydown",sE(this,aE),{once:!0})},iE=new WeakMap,aE=new WeakMap,rE=new WeakMap,cE.getTemplateHTML=function(e){return`\n      ${hb.getTemplateHTML(e)}\n      <style>\n        :host {\n          --_menu-bg: rgb(20 20 30 / .8);\n          background: var(--media-settings-menu-background,\n            var(--media-menu-background,\n              var(--media-control-background,\n                var(--media-secondary-color, var(--_menu-bg)))));\n          min-width: var(--media-settings-menu-min-width, 170px);\n          border-radius: 2px;\n          overflow: hidden;\n        }\n      </style>\n    `},Wo.customElements.get("media-context-menu")||Wo.customElements.define("media-context-menu",cE);class hE extends Ub{}hE.shadowRootOptions={mode:"open"},hE.getTemplateHTML=function(e){return`\n    ${Ub.getTemplateHTML.call(this,e)}\n    <style>\n        ::slotted(*) {\n            color: var(--media-text-color, white);\n            text-decoration: none;\n            border: none;\n            background: none;\n            cursor: pointer;\n            padding: 0;\n            min-height: var(--media-control-height, 24px);\n        }\n    </style>\n  `},Wo.customElements.get("media-context-menu-item")||Wo.customElements.define("media-context-menu-item",hE);var mE=e=>{throw TypeError(e)},pE=(e,t,n)=>t.has(e)||mE("Cannot "+n),vE=(e,t,n)=>(pE(e,t,"read from private field"),n?n.call(e):t.get(e)),bE=(e,t,n)=>t.has(e)?mE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),gE=(e,t,n,i)=>(pE(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),EE=(e,t,n)=>(pE(e,t,"access private method"),n),fE=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends fE{}globalThis.DocumentFragment=e}var yE,_E=class extends fE{},TE={get(e){},define(e,t,n){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(_E)};yE=new WeakMap;var AE={document:{createElement:function(e,t){return new _E}},DocumentFragment:DocumentFragment,customElements:TE,CustomEvent:class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};bE(this,yE),gE(this,yE,null==t?void 0:t.detail)}get detail(){return vE(this,yE)}initCustomEvent(){}},EventTarget:fE,HTMLElement:_E,HTMLVideoElement:class extends fE{}},kE="undefined"==typeof window||"undefined"==typeof globalThis.customElements,wE=kE?AE:globalThis,IE=kE?AE.document:globalThis.document;function SE(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function RE(e){return e.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function CE(e){if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}function LE(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:""}var DE=(e,t)=>!(!e||!t)&&(!!e.contains(t)||DE(e,t.getRootNode().host)),ME="mux.com",xE=(()=>{try{return"3.13.0"}catch{}return"UNKNOWN"})(),NE=()=>xE,OE=e=>{if(e){if([Tn.LIVE,Tn.ON_DEMAND].includes(e))return e;if(null!=e&&e.includes("live"))return Tn.LIVE}}
2,PE={crossorigin:"crossOrigin",playsinline:"playsInline"};function UE(e){var t;return null!=(t=PE[e])?t:RE(e)}var WE,BE,HE,VE=class{constructor(e,t){bE(this,WE),bE(this,BE),bE(this,HE,[]),gE(this,WE,e),gE(this,BE,t)}[Symbol.iterator](){return vE(this,HE).values()}get length(){return vE(this,HE).length}get value(){var e;return null!=(e=vE(this,HE).join(" "))?e:""}set value(e){var t;e!==this.value&&(gE(this,HE,[]),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return vE(this,HE)[e]}values(){return vE(this,HE).values()}keys(){return vE(this,HE).keys()}forEach(e){vE(this,HE).forEach(e)}add(){for(var e,t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];i.forEach(e=>{this.contains(e)||vE(this,HE).push(e)}),(""!==this.value||null!=(e=vE(this,WE))&&e.hasAttribute(`${vE(this,BE)}`))&&(null==(t=vE(this,WE))||t.setAttribute(`${vE(this,BE)}`,`${this.value}`))}remove(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach(e=>{vE(this,HE).splice(vE(this,HE).indexOf(e),1)}),null==(e=vE(this,WE))||e.setAttribute(`${vE(this,BE)}`,`${this.value}`)}contains(e){return vE(this,HE).includes(e)}toggle(e,t){return"undefined"!=typeof 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)}};WE=new WeakMap,BE=new WeakMap,HE=new WeakMap;var $E=`[mux-player ${NE()}]`;function KE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.warn($E,...t)}function qE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.error($E,...t)}function FE(e){var t;let n=null!=(t=e.message)?t:"";e.context&&(n+=` ${e.context}`),e.file&&(n+=` ${qn("Read more: ")}\nhttps://github.com/muxinc/elements/blob/main/errors/${e.file}`),KE(n)}var YE={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},GE={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},jE=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}}),QE=Object.values(YE).filter(e=>YE.PLAYSINLINE!==e),zE=[...QE,...Object.values(GE)],ZE=class extends wE.HTMLElement{static get observedAttributes(){return zE}constructor(){super()}attributeChangedCallback(e,t,n){var i,a;switch(e){case GE.MUTED:return void(this.media&&(this.media.muted=null!=n,this.media.defaultMuted=null!=n));case GE.VOLUME:{let e=null!=(i=CE(n))?i:1;return void(this.media&&(this.media.volume=e))}case GE.PLAYBACKRATE:{let e=null!=(a=CE(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()}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:jE}get seekable(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.seekable)?t:jE}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=CE(this.getAttribute(GE.PLAYBACKRATE)))?e:1}set defaultPlaybackRate(e){null!=e?this.setAttribute(GE.PLAYBACKRATE,`${e}`):this.removeAttribute(GE.PLAYBACKRATE)}get crossOrigin(){return XE(this,YE.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(YE.CROSSORIGIN,`${e}`)}get autoplay(){return null!=XE(this,YE.AUTOPLAY)}set autoplay(e){e?this.setAttribute(YE.AUTOPLAY,"string"==typeof e?e:""):this.removeAttribute(YE.AUTOPLAY)}get loop(){return null!=XE(this,YE.LOOP)}set loop(e){e?this.setAttribute(YE.LOOP,""):this.removeAttribute(YE.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!=XE(this,YE.MUTED)}set defaultMuted(e){e?this.setAttribute(YE.MUTED,""):this.removeAttribute(YE.MUTED)}
2get playsInline(){return null!=XE(this,YE.PLAYSINLINE)}set playsInline(e){qE("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(YE.PRELOAD,e):this.removeAttribute(YE.PRELOAD)}};function XE(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}var JE=ZE,ef=new WeakMap,tf=class e{constructor(e,t){this.element=e,this.type=t,this.element.addEventListener(this.type,this);let n=ef.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=ef.get(this.element);e&&e.delete(this.type)}}static for(t){ef.has(t.element)||ef.set(t.element,new Map);let n=t.attributeName.slice(2),i=ef.get(t.element);return i&&i.has(n)?i.get(n):new e(t.element,n)}};function nf(e,t){(function(e,t){if(e instanceof Ip&&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 Ip){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 Ip&&e.attributeName.startsWith("on"))&&(tf.for(e).set(t),e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),!0)}(e,t)||function(e,t){return!1===t&&e instanceof Sp&&(e.replace(""),!0)}(e,t)||function(e,t){return t instanceof sf&&e instanceof Sp&&(t.renderInto(e),!0)}(e,t)||function(e,t){return t instanceof DocumentFragment&&e instanceof Sp&&(t.childNodes.length&&e.replace(...t.childNodes),!0)}(e,t)||function(e,t){if(e instanceof Ip){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 af=new Map,rf=new WeakMap,of=new WeakMap,sf=class{constructor(e,t,n){this.strings=e,this.values=t,this.processor=n,this.stringsKey=this.strings.join("\x01")}get template(){if(af.has(this.stringsKey))return af.get(this.stringsKey);{let e=IE.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((e,n,i)=>e+n+(i<t?`{{ ${i} }}`:""),""),af.set(this.stringsKey,e),e}}renderInto(e){var t;let n=this.template;if(rf.get(e)!==n){rf.set(e,n);let t=new fp(n,this.values,this.processor);return of.set(e,t),void(e instanceof Sp?e.replace(...t.children):e.appendChild(t))}let i=of.get(e);null==(t=null==i?void 0:i.update)||t.call(i,this.values)}},lf={processCallback(e,t,n){var i;if(n)for(let[a,r]of t)if(a in n){nf(r,null!=(i=n[a])?i:"")}}};function df(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return new sf(e,n,lf)}var uf=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",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",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(", "),cf=e=>{var t,n,i,a,r,o,s,l,d,u,c,h,m,p,v,b,g,E,f,y,_,T,A,k,w,I,S,R,C,L,D,M,x,N,O,P,U,W,B,H,V;return df`
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"===OE(e.streamType)&&(t+=" noarrowleft noarrowright"),t})(e)||!1}"
7    nohotkeys="${e.noHotKeys||!e.hasSrc||!1}"
8    noautoseektolive="${!(null==(n=e.streamType)||!n.includes(Tn.LIVE))&&0!==e.targetLiveWindow}"
9    novolumepref="${e.novolumepref||!1}"
10    nomutedpref="${e.nomutedpref||!1}"
11    disabled="${!e.hasSrc||e.isDialogOpen}"
12    audio="${null!=(i=e.audio)&&i}"
13    style="${null!=(a=function(e){let t="";
13return Object.entries(e).forEach(e=>{let[n,i]=e;null!=i&&(t+=`${SE(n)}: ${i}; `)}),t?t.trim():void 0}({"--media-primary-color":e.primaryColor,"--media-secondary-color":e.secondaryColor,"--media-accent-color":e.accentColor}))&&a}"
14    defaultsubtitles="${!e.defaultHiddenCaptions}"
15    forwardseekoffset="${null!=(r=e.forwardSeekOffset)&&r}"
16    backwardseekoffset="${null!=(o=e.backwardSeekOffset)&&o}"
17    playbackrates="${null!=(s=e.playbackRates)&&s}"
18    defaultshowremainingtime="${null!=(l=e.defaultShowRemainingTime)&&l}"
19    defaultduration="${null!=(d=e.defaultDuration)&&d}"
20    hideduration="${null!=(u=e.hideDuration)&&u}"
21    title="${null!=(c=e.title)&&c}"
22    videotitle="${null!=(h=e.videoTitle)&&h}"
23    proudlydisplaymuxbadge="${null!=(m=e.proudlyDisplayMuxBadge)&&m}"
24    exportparts="${uf}"
25    onclose="${e.onCloseErrorDialog}"
26    onfocusin="${e.onFocusInErrorDialog}"
27  >
28    <mux-video
29      slot="media"
30      inert="${null!=(p=e.noHotKeys)&&p}"
31      target-live-window="${null!=(v=e.targetLiveWindow)&&v}"
32      stream-type="${null!=(b=OE(e.streamType))&&b}"
33      crossorigin="${null!=(g=e.crossOrigin)?g:""}"
34      playsinline
35      autoplay="${null!=(E=e.autoplay)&&E}"
36      muted="${null!=(f=e.muted)&&f}"
37      loop="${null!=(y=e.loop)&&y}"
38      preload="${null!=(_=e.preload)&&_}"
39      debug="${null!=(T=e.debug)&&T}"
40      prefer-cmcd="${null!=(A=e.preferCmcd)&&A}"
41      disable-tracking="${null!=(k=e.disableTracking)&&k}"
42      disable-cookies="${null!=(w=e.disableCookies)&&w}"
43      prefer-playback="${null!=(I=e.preferPlayback)&&I}"
44      start-time="${null!=e.startTime&&e.startTime}"
45      initial-bandwidth-estimate-kbps="${null!=e.initialBandwidthEstimateKbps&&e.initialBandwidthEstimateKbps}"
46      initial-estimate-segments="${null!=e.initialEstimateSegments&&e.initialEstimateSegments}"
47      min-preload-segments="${null!=e.minPreloadSegments&&e.minPreloadSegments}"
48      beacon-collection-domain="${null!=(S=e.beaconCollectionDomain)&&S}"
49      player-init-time="${null!=(R=e.playerInitTime)&&R}"
50      player-software-name="${null!=(C=e.playerSoftwareName)&&C}"
51      player-software-version="${null!=(L=e.playerSoftwareVersion)&&L}"
52      env-key="${null!=(D=e.envKey)&&D}"
53      custom-domain="${null!=(M=e.customDomain)&&M}"
54      src="${e.src?e.src:!!e.playbackId&&ji(e)}"
55      cast-src="${e.src?e.src:!!e.playbackId&&ji(e)}"
56      cast-receiver="${null!=(x=e.castReceiver)&&x}"
57      drm-token="${null!=(O=null==(N=e.tokens)?void 0:N.drm)&&O}"
58      playback-token="${null!=(U=null==(P=e.tokens)?void 0:P.playback)&&U}"
59      exportparts="video"
60      disable-pseudo-ended="${null!=(W=e.disablePseudoEnded)&&W}"
61      max-auto-resolution="${null!=(B=e.maxAutoResolution)&&B}"
62      cap-rendition-to-player-size="${null!=(H=e.capRenditionToPlayerSize)&&H}"
63    >
64      ${e.storyboard?df`<track label="thumbnails" default kind="metadata" src="${e.storyboard}" />`:df``}
65      <slot></slot>
66    </mux-video>
67    <slot name="poster" slot="poster">
68      <media-poster-image
69        part="poster"
70        exportparts="poster, img"
71        src="${!!e.poster&&e.poster}"
72        placeholdersrc="${null!=(V=e.placeholder)&&V}"
73      ></media-poster-image>
74    </slot>
75  </media-theme>
76`},hf=e=>e.charAt(0).toUpperCase()+e.slice(1),mf=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n,i;if(e.muxCode){let a=hf(null!=(n=e.errorCategory)?n:"video"),r=gn(null!=(i=e.errorCategory)?i:pn);if(e.muxCode===bn.NETWORK_OFFLINE)return qn("Your device appears to be offline",t);if(e.muxCode===bn.NETWORK_TOKEN_EXPIRED)return qn("{category} URL has expired",t).format({category:a});if([bn.NETWORK_TOKEN_SUB_MISMATCH,bn.NETWORK_TOKEN_AUD_MISMATCH,bn.NETWORK_TOKEN_AUD_MISSING,bn.NETWORK_TOKEN_MALFORMED].includes(e.muxCode))return qn("{category} URL is formatted incorrectly",t).format({category:a});if(e.muxCode===bn.NETWORK_TOKEN_MISSING)return qn("Invalid {categoryName} URL",t).format({categoryName:r});if(e.muxCode===bn.NETWORK_NOT_FOUND)return qn("{category} does not exist",t).format({category:a});if(e.muxCode===bn.NETWORK_NOT_READY){let n="live"===e.streamType?"Live stream":"Video";return qn("{mediaType} is not currently available",t).format({mediaType:n})}}if(e.code){if(e.code===fn.MEDIA_ERR_NETWORK)return qn("Network Error",t);if(e.code===fn.MEDIA_ERR_DECODE)return qn("Media Error",t);if(e.code===fn.MEDIA_ERR_SRC_NOT_SUPPORTED)return qn("Source Not Supported",t)}return qn("Error",t)}(e,t).toString(),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n,i;if(e.muxCode){let a=hf(null!=(n=e.errorCategory)?n:"video"),r=gn(null!=(i=e.errorCategory)?i:pn);return e.muxCode===bn.NETWORK_OFFLINE?qn("Check your internet connection and try reloading this video.",t):e.muxCode===bn.NETWORK_TOKEN_EXPIRED?qn("The video\u2019s secured {tokenNamePrefix}-token has expired.",t).format({tokenNamePrefix:r}):e.muxCode===bn.NETWORK_TOKEN_SUB_MISMATCH?qn("The video\u2019s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",t).format({tokenNamePrefix:r}):e.muxCode===bn.NETWORK_TOKEN_MALFORMED?qn("{category} URL is formatted incorrectly",t).format({category:a}):[bn.NETWORK_TOKEN_AUD_MISMATCH,bn.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode)?qn("The {tokenNamePrefix}-token is formatted with incorrect information.",t).format({tokenNamePrefix:r}):[bn.NETWORK_TOKEN_MISSING,bn.NETWORK_INVALID_URL].includes(e.muxCode)?qn("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",t).format({tokenNamePrefix:r}):e.muxCode===bn.NETWORK_NOT_FOUND?"":e.message}return e.code&&(e.code===fn.MEDIA_ERR_NETWORK||e.code===fn.MEDIA_ERR_DECODE||(e.code,fn.MEDIA_ERR_SRC_NOT_SUPPORTED)),e.message}(e,t).toString();return{title:n,message:i}},pf=(e,t)=>
76{let n=(e=>{if(e.muxCode){if(e.muxCode===bn.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(e.muxCode===bn.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([bn.NETWORK_TOKEN_AUD_MISMATCH,bn.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode))return"403-incorrect-aud-value.md";if(e.muxCode===bn.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(e.muxCode===bn.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(e.muxCode===bn.NETWORK_NOT_FOUND)return"404-not-found.md";if(e.muxCode===bn.NETWORK_NOT_READY)return"412-not-playable.md"}if(e.code){if(e.code===fn.MEDIA_ERR_NETWORK)return"";if(e.code===fn.MEDIA_ERR_DECODE)return"media-decode-error.md";if(e.code===fn.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""})(e);return{message:e.message,context:e.context,file:n}},vf=IE.createElement("template");"innerHTML"in vf&&(vf.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      --media-tooltip-container-margin: 6px;\n      --media-tooltip-distance: 18px;\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);
76\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~=\'menu\'] {\n      border-radius: 2px;\n      border: 1px solid rgba(0, 0, 0, 0.1);\n      bottom: 50px;\n      padding: 2.5px 10px;\n    }\n\n    [part~=\'menu\']::part(indicator) {\n      fill: var(--_accent-color);\n    }\n\n    [part~=\'menu\']::part(menu-item) {\n      box-sizing: border-box;\n      display: flex;\n      align-items: center;\n      padding: 6px 10px;\n      min-height: 34px;\n    }\n\n    [part~=\'menu\']::part(checked) {\n      font-weight: 700;\n    }\n\n    media-captions-menu,\n    media-rendition-menu,\n    media-audio-track-menu,\n    media-playback-rate-menu {\n      position: absolute; /* ensure they don\'t take up space in DOM on load */\n      --media-menu-background: var(--_primary-color);\n      --media-menu-item-checked-background: transparent;\n      --media-text-color: var(--_text-color);\n      --media-menu-item-hover-background: transparent;\n      --media-menu-item-hover-outline: var(--_accent-color) solid 1px;\n    }\n\n    media-rendition-menu {\n      min-width: 140px;\n    }\n\n    /* The icon is a circle so make it 16px high instead of 14px for more balance. */\n    media-audio-track-menu-button {\n      --media-control-padding: 5px;\n      --media-control-height: 16px;\n    }\n\n    media-playback-rate-menu-button {\n      --media-control-padding: 6px 3px;\n      min-width: 4.4ch;\n    }\n\n    media-playback-rate-menu {\n      --media-menu-flex-direction: row;\n      --media-menu-item-checked-background: var(--_accent-color);\n      --media-menu-item-checked-indicator-display: none;\n      margin-right: 6px;\n      padding: 0;\n      --media-menu-gap: 0.25em;\n    }\n\n    media-playback-rate-menu[part~=\'menu\']::part(menu-item) {\n      padding: 6px 6px 6px 8px;\n    }\n\n    media-playback-rate-menu[part~=\'menu\']::part(checked) {\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:\n        hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.013) 8.1%, hsl(0 0% 0% / 0.049) 15.5%, hsl(0 0% 0% / 0.104) 22.5%,\n        hsl(0 0% 0% / 0.175) 29%, hsl(0 0% 0% / 0.259) 35.3%, hsl(0 0% 0% / 0.352) 41.2%, hsl(0 0% 0% / 0.45) 47.1%,\n        hsl(0 0% 0% / 0.55) 52.9%, hsl(0 0% 0% / 0.648) 58.8%, hsl(0 0% 0% / 0.741) 64.7%, hsl(0 0% 0% / 0.825) 71%,\n        hsl(0 0% 0% / 0.896) 77.5%, hsl(0 0% 0% / 0.951) 84.5%, hsl(0 0% 0% / 0.987) 91.9%, hsl(0 0% 0%) 100%;\n    }\n\n    :host([title]) media-control-bar[slot=\'top-chrome\']::before,\n    :host([videotitle]) 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: 20;\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    }
76\n\n    .center-controls {\n      --media-button-icon-width: 100%;\n      --media-button-icon-height: auto;\n      --media-tooltip-display: none;\n      pointer-events: none;\n      width: 100%;\n      display: flex;\n      flex-flow: row;\n      align-items: center;\n      justify-content: center;\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      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    [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      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    [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-error-dialog:not([mediaerrorcode]) {\n      opacity: 0;\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%;
76\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-menu-button: none;\n      --bottom-pip-button: none;\n    }\n\n    [part=\'mux-badge\'] {\n      position: absolute;\n      bottom: 10px;\n      right: 10px;\n      z-index: 2;\n      opacity: 0.6;\n      transition:\n        opacity 0.2s ease-in-out,\n        bottom 0.2s ease-in-out;\n    }\n\n    [part=\'mux-badge\']:hover {\n      opacity: 1;\n    }\n\n    [part=\'mux-badge\'] a {\n      font-size: 14px;\n      font-family: var(--_font-family);\n      color: var(--_primary-color);\n      text-decoration: none;\n      display: flex;\n      align-items: center;\n      gap: 5px;\n    }\n\n    [part=\'mux-badge\'] .mux-badge-text {\n      transition: opacity 0.5s ease-in-out;\n      opacity: 0;\n    }\n\n    [part=\'mux-badge\'] .mux-badge-logo {\n      width: 40px;\n      height: auto;\n      display: inline-block;\n    }\n\n    [part=\'mux-badge\'] .mux-badge-logo svg {\n      width: 100%;\n      height: 100%;\n      fill: white;\n    }\n\n    media-controller:not([userinactive]):not([mediahasplayed]) [part=\'mux-badge\'],\n    media-controller:not([userinactive]) [part=\'mux-badge\'],\n    media-controller[mediahasplayed][mediapaused] [part=\'mux-badge\'] {\n      transition: bottom 0.1s ease-in-out;\n    }\n\n    media-controller[userinactive]:not([mediapaused]) [part=\'mux-badge\'] {\n      transition: bottom 0.2s ease-in-out 0.62s;\n    }\n\n    media-controller:not([userinactive]) [part=\'mux-badge\'] .mux-badge-text,\n    media-controller[mediahasplayed][mediapaused] [part=\'mux-badge\'] .mux-badge-text {\n      opacity: 1;\n    }\n\n    media-controller[userinactive]:not([mediapaused]) [part=\'mux-badge\'] .mux-badge-text {\n      opacity: 0;\n    }\n\n    media-controller[userinactive]:not([mediapaused]) [part=\'mux-badge\'] {\n      bottom: 10px;\n    }\n\n    media-controller:not([userinactive]):not([mediahasplayed]) [part=\'mux-badge\'] {\n      bottom: 10px;\n    }\n\n    media-controller:not([userinactive])[mediahasplayed] [part=\'mux-badge\'],\n    media-controller[mediahasplayed][mediapaused] [part=\'mux-badge\'] {\n      bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2);\n    }\n  </style>\n\n  <template partial="TitleDisplay">\n    <template if="videotitle">\n      <template if="videotitle != true">\n        <media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display>\n      </template>\n    </template>\n    <template if="!videotitle">\n      <template if="title">\n        <media-text-display part="top title display" class="title-display">{{title}}</media-text-display>\n      </template>\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>
76\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 
761.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="CaptionsMenu">\n    <media-captions-menu-button part="bottom captions button">\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.
76009C3.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-menu-button>\n    <media-captions-menu\n      hidden\n      anchor="auto"\n      part="bottom captions menu"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n      exportparts="menu-item"\n    >\n      <div slot="checked-indicator">\n        <style>\n          .indicator {\n            position: relative;\n            top: 1px;\n            width: 0.9em;\n            height: auto;\n            fill: var(--_accent-color);\n            margin-right: 5px;\n          }\n\n          [aria-checked=\'false\'] .indicator {\n            display: none;\n          }\n        </style>\n        <svg viewBox="0 0 14 18" class="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></div\n    ></media-captions-menu>\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
767.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}}">
76\n      <span slot="text">Live</span>\n    </media-live-button>\n  </template>\n\n  <template partial="PlaybackRateMenu">\n    <media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button>\n    <media-playback-rate-menu\n      hidden\n      anchor="auto"\n      rates="{{playbackrates}}"\n      exportparts="menu-item"\n      part="bottom playback-rate menu"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n    ></media-playback-rate-menu>\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}}" exportparts="thumb">\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="AudioTrackMenu">\n    <media-audio-track-menu-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-menu-button>\n    <media-audio-track-menu\n      hidden\n      anchor="auto"\n      part="bottom audio-track menu"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n      exportparts="menu-item"\n    >\n      <div slot="checked-indicator">\n        <style>\n          .indicator {\n            position: relative;\n            top: 1px;\n            width: 0.9em;\n            height: auto;\n            fill: var(--_accent-color);\n            margin-right: 5px;\n          }\n\n          [aria-checked=\'false\'] .indicator {\n            display: none;\n          }\n        </style>\n        <svg viewBox="0 0 14 18" class="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-menu>\n  </template>\n\n  <template partial="RenditionMenu">\n    <media-rendition-menu-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-menu-button>\n    <media-rendition-menu\n      hidden\n      anchor="auto"\n      part="bottom rendition menu"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n    >\n      <div slot="checked-indicator">\n        <style>\n          .indicator {\n            position: relative;\n            top: 1px;\n            width: 0.9em;\n            height: auto;\n            fill: var(--_accent-color);\n            margin-right: 5px;\n          }\n\n          [aria-checked=\'false\'] .indicator {\n            opacity: 0;\n          }\n        </style>\n        <svg viewBox="0 0 14 18" class="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-menu>\n  </template>\n\n  <template partial="MuxBadge">\n    <div part="mux-badge">\n      <a href="https://www.mux.com/player" target="_blank">
76\n        <span class="mux-badge-text">Powered by</span>\n        <div class="mux-badge-logo">\n          <svg\n            viewBox="0 0 1600 500"\n            style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2"\n          >\n            <g>\n              <path\n                d="M994.287,93.486c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m0,-93.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,68.943 -56.09,125.033 -125.032,125.033c-68.942,-0 -125.03,-56.09 -125.03,-125.033l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,137.853 112.149,250.003 249.999,250.003c137.851,-0 250.001,-112.15 250.001,-250.003l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486"\n                style="fill-rule: nonzero"\n              ></path>\n              <path\n                d="M1537.51,468.511c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m-275.883,-218.509l-143.33,143.329c-24.402,24.402 -24.402,63.966 0,88.368c24.402,24.402 63.967,24.402 88.369,-0l143.33,-143.329l143.328,143.329c24.402,24.4 63.967,24.402 88.369,-0c24.403,-24.402 24.403,-63.966 0.001,-88.368l-143.33,-143.329l0.001,-0.004l143.329,-143.329c24.402,-24.402 24.402,-63.965 0,-88.367c-24.402,-24.402 -63.967,-24.402 -88.369,-0l-143.329,143.328l-143.329,-143.328c-24.402,-24.401 -63.967,-24.402 -88.369,-0c-24.402,24.402 -24.402,63.965 0,88.367l143.329,143.329l0,0.004Z"\n                style="fill-rule: nonzero"\n              ></path>\n              <path\n                d="M437.511,468.521c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m23.915,-463.762c-23.348,-9.672 -50.226,-4.327 -68.096,13.544l-143.331,143.329l-143.33,-143.329c-17.871,-17.871 -44.747,-23.216 -68.096,-13.544c-23.349,9.671 -38.574,32.455 -38.574,57.729l0,375.026c0,34.51 27.977,62.486 62.487,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-224.173l80.843,80.844c24.404,24.402 63.965,24.402 88.369,-0l80.843,-80.844l0,224.173c0,34.51 27.976,62.486 62.486,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-375.026c0,-25.274 -15.224,-48.058 -38.573,-57.729"\n                style="fill-rule: nonzero"\n              ></path>\n            </g>\n          </svg>\n        </div>\n      </a>\n    </div>\n  </template>\n\n  <media-controller\n    part="controller"\n    defaultstreamtype="{{defaultstreamtype ?? \'on-demand\'}}"\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      <media-error-dialog slot="dialog" noautohide></media-error-dialog>\n      \x3c!-- Pre-playback UI --\x3e\n      \x3c!-- same for both on-demand and live --\x3e\n      <div slot="centered-chrome" class="center-controls pre-playback">\n        <template if="!breakpointsm">{{>PlayButton section="center"}}</template>\n        <template if="breakpointsm">{{>PrePlayButton section="center"}}</template>\n      </div>\n\n      \x3c!-- Mux Badge --\x3e\n      <template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template>\n\n      \x3c!-- Autoplay 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          {{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>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          {{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}}\n          {{>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">{{>PlaybackRateMenu}}</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          {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}}\n          <template if="breakpointsm">\n            {{>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');var bf,gf,Ef=class extends iv{};Ef.template=null==(gf=null==(bf=vf.content)?void 0:bf.children)?void 0:gf[0],wE.customElements.get("media-theme-gerwig")||wE.customElements.define("media-theme-gerwig",Ef);var ff={SRC:"src",POSTER:"poster"},yf={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",P
76LAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",FULLSCREEN_ELEMENT:"fullscreen-element",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",VIDEO_TITLE:"video-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",NO_MUTED_PREF:"no-muted-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended"},_f=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"];var Tf=Nc.formatErrorMessage;function Af(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=wE.customElements.get(i);if(null!=r&&r.template)return r.template}}function kf(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 wf(e){let t=e.videoTitle?{video_title:e.videoTitle}:{};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)}Nc.formatErrorMessage=e=>{var t,n;if(e instanceof fn){let i=mf(e,!1);return`\n      ${null!=i&&i.title?`<h3>${i.title}</h3>`:""}\n      ${null!=i&&i.message||null!=i&&i.linkUrl?`<p>\n        ${null==i?void 0:i.message}\n        ${null!=i&&i.linkUrl?`<a\n              href="${i.linkUrl}"\n              target="_blank"\n              rel="external noopener"\n              aria-label="${null!=(t=i.linkText)?t:""} ${qn("(opens in a new window)")}"\n              >${null!=(n=i.linkText)?n:i.linkUrl}</a\n            >`:""}\n      </p>`:""}\n    `}return Tf(e)};var If,Sf,Rf,Cf,Lf,Df,Mf,xf,Nf,Of,Pf,Uf,Wf,Bf,Hf,Vf,$f,Kf,qf,Ff,Yf,Gf=Object.values(qa),jf=Object.values(ff),Qf=Object.values(yf),zf=NE(),Zf="mux-player",Xf={isDialogOpen:!1},Jf={redundant_streams:!0};function ey(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}If=new WeakMap,Sf=new WeakMap,Rf=new WeakMap,Cf=new WeakMap,Lf=new WeakMap,Df=new WeakMap,Mf=new WeakMap,xf=new WeakMap,Nf=new WeakMap,Of=new WeakMap,Pf=new WeakMap,Uf=new WeakMap,Wf=new WeakSet,Bf=function(){var e,t,n,i;if(!vE(this,Sf)){gE(this,Sf,!0),EE(this,Wf,$f).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof wE.HTMLElement))throw""}catch{qE("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{qE("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof Od))throw""}catch{qE("<media-controller> failed to upgrade!")}EE(this,Wf,Kf).call(this),EE(this,Wf,qf).call(this),EE(this,Wf,Ff).call(this),gE(this,Cf,null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(Hs.USER_INACTIVE))||t),EE(this,Wf,Yf).call(this),null==(n=this.media)||n.addEventListener("streamtypechange",vE(this,Mf)),null==(i=this.media)||i.addEventListener("loadstart",vE(this,xf))}},Hf=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{}},Vf=function(e){Object.assign(vE(this,Pf),e),EE(this,Wf,$f).call(this)},$f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){e.renderInto(t)}((e=>df`
77  <style>
78    ${(e=>{let{tokens:t}=e;return t.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""})(e)}
79    ${":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-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display));\n  --media-rendition-menu-button-display: var(--rendition-menu-button);\n  --media-audio-track-menu-button-display: var(--audio-track-menu-button);\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-menu-button-display: var(--playback-rate-menu-button);\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  line-height: 0;\n  width: 100%;\n}\n\na {\n  color: #fff;\n  font-size: 0.9em;\n  text-decoration: underline;\n}\n\nmedia-theme {\n  display: inline-block;\n  line-height: 0;\n  width: 100%;\n  height: 100%;\n  direction: ltr;\n}\n\nmedia-poster-image {\n  display: inline-block;\n  line-height: 0;\n  width: 100%;\n  height: 100%;\n}\n\nmedia-poster-image:not([src]):not([placeholdersrc]) {\n  display: none;\n}
79\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-menu-button-display: var(\n    --captions-menu-button,\n    var(--media-captions-button-display, var(--top-captions-menu-button))\n  );\n  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button));\n  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button));\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-menu-button-display: var(\n    --captions-menu-button,\n    var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button))\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-menu-button-display: var(\n    --captions-menu-button,\n    var(--media-captions-button-display, var(--center-captions-menu-button))\n  );\n  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button));\n  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button));\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-menu-button-display: var(\n    --playback-rate-menu-button,\n    var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button))\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
79s));\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-menu-button-display: var(\n    --captions-menu-button,\n    var(--media-captions-button-display, var(--bottom-captions-menu-button))\n  );\n  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button));\n  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button));\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-menu-button-display: var(\n    --playback-rate-menu-button,\n    var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button))\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\n:host([no-tooltips]) {\n  --media-tooltip-display: none;\n}\n"}
80  </style>
81  ${cf(e)}
82`)(function(e,t){var n,i,a;return{src:!e.playbackId&&e.src,playbackId:e.playbackId,hasSrc:!!e.playbackId||!!e.src||!!e.currentSrc,poster:e.poster,storyboard:(null==(n=e.media)?void 0:n.currentSrc)&&e.storyboard,storyboardSrc:e.getAttribute(yf.STORYBOARD_SRC),fullscreenElement:e.getAttribute(yf.FULLSCREEN_ELEMENT),placeholder:e.getAttribute("placeholder"),themeTemplate:Af(e),thumbnailTime:!e.tokens.thumbnail&&e.thumbnailTime,autoplay:e.autoplay,crossOrigin:e.crossOrigin,loop:e.loop,noHotKeys:e.hasAttribute(yf.NOHOTKEYS),hotKeys:e.getAttribute(yf.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,maxAutoResolution:e.maxAutoResolution,programStartTime:e.programStartTime,programEndTime:e.programEndTime,assetStartTime:e.assetStartTime,assetEndTime:e.assetEndTime,renditionOrder:e.renditionOrder,metadata:e.metadata,playerInitTime:e.playerInitTime,playerSoftwareName:e.playerSoftwareName,playerSoftwareVersion:e.playerSoftwareVersion,startTime:e.startTime,initialBandwidthEstimateKbps:e.initialBandwidthEstimateKbps,initialEstimateSegments:e.initialEstimateSegments,minPreloadSegments:e.minPreloadSegments,preferPlayback:e.preferPlayback,audio:e.audio,defaultStreamType:e.defaultStreamType,targetLiveWindow:e.getAttribute(qa.TARGET_LIVE_WINDOW),streamType:OE(e.getAttribute(qa.STREAM_TYPE)),primaryColor:e.getAttribute(yf.PRIMARY_COLOR),secondaryColor:e.getAttribute(yf.SECONDARY_COLOR),accentColor:e.getAttribute(yf.ACCENT_COLOR),forwardSeekOffset:e.forwardSeekOffset,backwardSeekOffset:e.backwardSeekOffset,defaultHiddenCaptions:e.defaultHiddenCaptions,defaultDuration:e.defaultDuration,defaultShowRemainingTime:e.defaultShowRemainingTime,hideDuration:kf(e),playbackRates:e.getAttribute(yf.PLAYBACK_RATES),customDomain:null!=(i=e.getAttribute(qa.CUSTOM_DOMAIN))?i:void 0,title:e.getAttribute(yf.TITLE),videoTitle:null!=(a=e.getAttribute(yf.VIDEO_TITLE))?a:e.getAttribute(yf.TITLE),novolumepref:e.hasAttribute(yf.NO_VOLUME_PREF),nomutedpref:e.hasAttribute(yf.NO_MUTED_PREF),proudlyDisplayMuxBadge:e.hasAttribute(yf.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:e.castReceiver,disablePseudoEnded:e.hasAttribute(yf.DISABLE_PSEUDO_ENDED),capRenditionToPlayerSize:e.capRenditionToPlayerSize,...t,extraSourceParams:e.extraSourceParams}}(this,{...vE(this,Pf),...e})),this.shadowRoot)},Kf=function(){let e=e=>{var t,n;if(null==e||!e.startsWith("theme-"))return;let i=e.replace(/^theme-/,"");if(_f.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)};gE(this,Df,new MutationObserver(t=>{for(let{attributeName:n}of t)e(n)})),vE(this,Df).observe(this,{attributes:!0}
82),this.getAttributeNames().forEach(e)},qf=function(){var e=this;this.addEventListener("error",vE(this,Uf)),this.media&&(this.media.errorTranslator=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var n,i,a;if(!((null==(n=e.media)?void 0:n.error)instanceof fn))return t;let r=pf(null==(i=e.media)?void 0:i.error);return{player_error_code:null==(a=e.media)?void 0:a.error.code,player_error_message:r.message?String(r.message):t.player_error_message,player_error_context:r.context?String(r.context):t.player_error_context}})},Ff=function(){var e,t,n,i;null==(t=null==(e=this.media)?void 0:e.textTracks)||t.addEventListener("addtrack",vE(this,Nf)),null==(i=null==(n=this.media)?void 0:n.textTracks)||i.addEventListener("removetrack",vE(this,Nf))},Yf=function(){var e,t,n=this;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===Tn.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,o=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r()||Array.from(e&&e.activeCues||[]).forEach(e=>{if(!(!e.snapToLines||e.line<-5||e.line>=0&&e.line<10))if(!t||n.paused){let t=e.text.split("\n").length,r=-3;n.streamType===Tn.LIVE&&(r=-2);let o=r-t;if(e.line===o&&!i)return;a.has(e)||a.set(e,e.line),e.line=o}else setTimeout(()=>{e.line=a.get(e)||"auto"},500)})},s=()=>{var e,t;o(i,null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(Hs.USER_INACTIVE))&&t)},l=()=>{var e,t;let n=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];n!==i&&(null==i||i.removeEventListener("cuechange",s)),i=n,null==i||i.addEventListener("cuechange",s),o(i,vE(this,Cf))};l(),null==(e=this.textTracks)||e.addEventListener("change",l),null==(t=this.textTracks)||t.addEventListener("addtrack",l);let d=()=>{var e,t;let n=null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(Hs.USER_INACTIVE))||t;vE(this,Cf)!==n&&(gE(this,Cf,n),o(i,vE(this,Cf)))};this.addEventListener("userinactivechange",d),gE(this,Of,()=>{var e,t;null==i||i.removeEventListener("cuechange",s),null==(e=this.textTracks)||e.removeEventListener("change",l),null==(t=this.textTracks)||t.removeEventListener("addtrack",l),this.removeEventListener("userinactivechange",d)})};var ty=class extends JE{constructor(){super(),bE(this,Wf),bE(this,If),bE(this,Sf,!1),bE(this,Rf,{}),bE(this,Cf,!0),bE(this,Lf,new VE(this,"hotkeys")),bE(this,Df),bE(this,Mf,()=>EE(this,Wf,$f).call(this)),bE(this,xf,()=>EE(this,Wf,$f).call(this)),bE(this,Nf,()=>EE(this,Wf,$f).call(this)),bE(this,Of),bE(this,Pf,{...Xf,onCloseErrorDialog:e=>{var t;"media-error-dialog"===(null==(t=e.composedPath()[0])?void 0:t.localName)&&EE(this,Wf,Vf).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:e=>{var t;"media-error-dialog"===(null==(t=e.composedPath()[0])?void 0:t.localName)&&(DE(this,IE.activeElement)||e.preventDefault())}}),bE(this,Uf,e=>{var t;let n=null==(t=this.media)?void 0:t.error;if(!(n instanceof fn)){let{message:e,code:t}=null!=n?n:{};n=new fn(e,t)}if(null==n||!n.fatal)return KE(n),void(n.data&&KE(`${n.name} data:`,n.data));let i=pf(n);i.message&&FE(i),qE(n),n.data&&qE(`${n.name} data:`,n.data),EE(this,Wf,Vf).call(this,{isDialogOpen:!0})}),gE(this,If,Yi()),this.attachShadow({mode:"open"}),EE(this,Wf,Hf).call(this),this.isConnected&&EE(this,Wf,Bf).call(this)}static get NAME(){return Zf}static get VERSION(){return zf}static get observedAttributes(){var e;return[...null!=(e=JE.observedAttributes)?e:[],...jf,...Gf,...Qf]}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(){EE(this,Wf,Bf).call(this);let e=this.media;e&&(e.metadata=wf(this))}disconnectedCallback(){var e,t,n,i,a,r,o,s;null==(e=vE(this,Df))||e.disconnect(),null==(t=this.media)||t.removeEventListener("streamtypechange",vE(this,Mf)),null==(n=this.media)||n.removeEventListener("loadstart",vE(this,xf)),this.removeEventListener("error",vE(this,Uf)),this.media&&(this.media.errorTranslator=void 0),null==(a=null==(i=this.media)?void 0:i.textTracks)||a.removeEventListener("addtrack",vE(this,Nf)),null==(o=null==(r=this.media)?void 0:r.textTracks)||o.removeEventListener("removetrack",vE(this,Nf)),null==(s=vE(this,Of))||s.call(this),gE(this,Of,void 0),gE(this,Sf,!1)}attributeChangedCallback(e,t,n){switch(EE(this,Wf,Bf).call(this),super.attributeChangedCallback(e,t,n),e){case yf.HOTKEYS:vE(this,Lf).value=n;break;case yf.THUMBNAIL_TIME:null!=n&&this.tokens.thumbnail&&KE(qn("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break;case yf.THUMBNAIL_TOKEN:if(n){let e=Kn(n);if(e){let{aud:t}=e,n=ci;t!==n&&KE(qn("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:n,tokenNamePrefix:"thumbnail"}))}}break;case yf.STORYBOARD_TOKEN:if(n){let e=Kn(n);if(e){let{aud:t}=e,n=hi;t!==n&&KE(qn("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:n,tokenNamePrefix:"storyboard"}))}}break;case yf.DRM_TOKEN:if(n){let e=Kn(n);if(e){let{aud:t}=e,n=mi;t!==n&&KE(qn("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:n,tokenNamePrefix:"drm"}))}}break;case qa.PLAYBACK_ID:null!=n&&n.includes("?token")&&qE(qn("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:n}));break;case qa.STREAM_TYPE:n&&![Tn.LIVE,Tn.ON_DEMAND,Tn.UNKNOWN].includes(n)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=n.includes("dvr")?Number.POSITIVE_INFINITY:0:FE({file:"invalid-stream-type.md",message:qn("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):n===Tn.LIVE?null==this.getAttribute(yf.TARGET_LIVE_WINDOW)&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN;break;case yf.FULLSCREEN_ELEMENT:if(null!=n||n!==t){let e=IE.getElementById(n),t=null==e?void 0:e.querySelector("mux-player");this.mediaController&&e&&t&&(this.mediaController.fullscreenElement=e)}break;case qa.CAP_RENDITION_TO_PLAYER_SIZE:(null==n||n!==t)&&(this.capRenditionToPlayerSize=null!=n||void 0)}[qa.PLAYBACK_ID,ff.SRC,yf.PLAYBACK_TOKEN].includes(e)&&t!==n&&gE(this,Pf,{...vE(this,Pf),...Xf}),EE(this,Wf,$f).call(this,{[UE(e)]:n})}async requestFullscreen(e){var t;if(this.mediaController&&!this.mediaController.hasAttribute(no.MEDIA_IS_FULLSCREEN))return null==(t=this.mediaController)||t.dispatchEvent(new wE.CustomEvent(Xr.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>
82{var n;null==(n=this.mediaController)||n.addEventListener(io.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}async exitFullscreen(){var e;if(this.mediaController&&this.mediaController.hasAttribute(no.MEDIA_IS_FULLSCREEN))return null==(e=this.mediaController)||e.dispatchEvent(new wE.CustomEvent(Xr.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var n;null==(n=this.mediaController)||n.addEventListener(io.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var e;return null!=(e=this.getAttribute(qa.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?In.includes(e)?this.setAttribute(qa.PREFER_CMCD,e):KE(`Invalid value for preferCmcd. Must be one of ${In.join()}`):this.removeAttribute(qa.PREFER_CMCD))}get hasPlayed(){var e,t;return null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(no.MEDIA_HAS_PLAYED))&&t}get inLiveWindow(){var e;return null==(e=this.mediaController)?void 0:e.hasAttribute(no.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(yf.THEME))?e:"gerwig"}set theme(e){this.setAttribute(yf.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let n of e.getAttributeNames()){if(_f.includes(n))continue;let i=e.getAttribute(n);t[RE(n)]=""===i||i}return t}set themeProps(e){var t,n;EE(this,Wf,Bf).call(this);let i={...this.themeProps,...e};for(let a in i){if(_f.includes(a))continue;let i=null==e?void 0:e[a];"boolean"==typeof i||null==i?null==(t=this.mediaTheme)||t.toggleAttribute(SE(a),!!i):null==(n=this.mediaTheme)||n.setAttribute(SE(a),i)}}get playbackId(){var e;return null!=(e=this.getAttribute(qa.PLAYBACK_ID))?e:void 0}set playbackId(e){e?this.setAttribute(qa.PLAYBACK_ID,e):this.removeAttribute(qa.PLAYBACK_ID)}get src(){var e,t;return this.playbackId?null!=(e=ey(this,ff.SRC))?e:void 0:null!=(t=this.getAttribute(ff.SRC))?t:void 0}set src(e){e?this.setAttribute(ff.SRC,e):this.removeAttribute(ff.SRC)}get poster(){var e;let t=this.getAttribute(ff.POSTER);if(null!=t)return t;let{tokens:n}=this;if(!n.playback||n.thumbnail)return this.playbackId&&!this.audio?function(e){let{token:t,customDomain:n=ME,thumbnailTime:i,programTime:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r;let o=null==t?i:void 0,{aud:s}=null!=(r=Kn(t))?r:{};if(!t||"t"===s)return`https://image.${n}/${e}/thumbnail.webp${LE({token:t,time:o,program_time:a})}`}(this.playbackId,{customDomain:this.customDomain,thumbnailTime:null!=(e=this.thumbnailTime)?e:this.startTime,programTime:this.programStartTime,token:n.thumbnail}):void 0;KE("Missing expected thumbnail token. No poster image will be shown")}set poster(e){e||""===e?this.setAttribute(ff.POSTER,e):this.removeAttribute(ff.POSTER)}get storyboardSrc(){var e;return null!=(e=this.getAttribute(yf.STORYBOARD_SRC))?e:void 0}set storyboardSrc(e){e?this.setAttribute(yf.STORYBOARD_SRC,e):this.removeAttribute(yf.STORYBOARD_SRC)}get storyboard(){let{tokens:e}=this;return this.storyboardSrc&&!e.storyboard?this.storyboardSrc:this.audio||!this.playbackId||!this.streamType||[Tn.LIVE,Tn.UNKNOWN].includes(this.streamType)||e.playback&&!e.storyboard?void 0:function(e){let{token:t,customDomain:n=ME,programStartTime:i,programEndTime:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r;let{aud:o}=null!=(r=Kn(t))?r:{};if(!t||"s"===o)return`https://image.${n}/${e}/storyboard.vtt${LE({token:t,format:"webp",program_start_time:i,program_end_time:a})}`}(this.playbackId,{customDomain:this.customDomain,token:e.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(yf.AUDIO)}set audio(e){e?this.setAttribute(yf.AUDIO,""):this.removeAttribute(yf.AUDIO)}get hotkeys(){return vE(this,Lf)}get nohotkeys(){return this.hasAttribute(yf.NOHOTKEYS)}set nohotkeys(e){e?this.setAttribute(yf.NOHOTKEYS,""):this.removeAttribute(yf.NOHOTKEYS)}get thumbnailTime(){return CE(this.getAttribute(yf.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(yf.THUMBNAIL_TIME,`${e}`)}get videoTitle(){var e,t;return null!=(t=null!=(e=this.getAttribute(yf.VIDEO_TITLE))?e:this.getAttribute(yf.TITLE))?t:""}set videoTitle(e){e!==this.videoTitle&&(e?this.setAttribute(yf.VIDEO_TITLE,e):this.removeAttribute(yf.VIDEO_TITLE))}get placeholder(){var e;return null!=(e=ey(this,yf.PLACEHOLDER))?e:""}set placeholder(e){this.setAttribute(yf.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let n=this.getAttribute(yf.PRIMARY_COLOR);if(null!=n||this.mediaTheme&&(n=null==(t=null==(e=wE.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_primary-color"))?void 0:t.trim(),n))return n}set primaryColor(e){this.setAttribute(yf.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let n=this.getAttribute(yf.SECONDARY_COLOR);if(null!=n||this.mediaTheme&&(n=null==(t=null==(e=wE.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_secondary-color"))?void 0:t.trim(),n))return n}set secondaryColor(e){this.setAttribute(yf.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let n=this.getAttribute(yf.ACCENT_COLOR);if(null!=n||this.mediaTheme&&(n=null==(t=null==(e=wE.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_accent-color"))?void 0:t.trim(),n))return n}set accentColor(e){this.setAttribute(yf.ACCENT_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute(yf.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute(yf.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(yf.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(yf.PLAYBACK_RATES))return this.getAttribute(yf.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(e=>Number(e)).filter(e=>!Number.isNaN(e)).sort((e,t)=>
82e-t)}set playbackRates(e){e?this.setAttribute(yf.PLAYBACK_RATES,e.join(" ")):this.removeAttribute(yf.PLAYBACK_RATES)}get forwardSeekOffset(){var e;return null!=(e=CE(this.getAttribute(yf.FORWARD_SEEK_OFFSET)))?e:10}set forwardSeekOffset(e){this.setAttribute(yf.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return null!=(e=CE(this.getAttribute(yf.BACKWARD_SEEK_OFFSET)))?e:10}set backwardSeekOffset(e){this.setAttribute(yf.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(yf.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute(yf.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(yf.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return CE(this.getAttribute(yf.DEFAULT_DURATION))}set defaultDuration(e){null==e?this.removeAttribute(yf.DEFAULT_DURATION):this.setAttribute(yf.DEFAULT_DURATION,`${e}`)}get playerInitTime(){return this.hasAttribute(qa.PLAYER_INIT_TIME)?CE(this.getAttribute(qa.PLAYER_INIT_TIME)):vE(this,If)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(qa.PLAYER_INIT_TIME):this.setAttribute(qa.PLAYER_INIT_TIME,""+ +e))}get playerSoftwareName(){var e;return null!=(e=this.getAttribute(qa.PLAYER_SOFTWARE_NAME))?e:Zf}get playerSoftwareVersion(){var e;return null!=(e=this.getAttribute(qa.PLAYER_SOFTWARE_VERSION))?e:zf}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(qa.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(qa.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(qa.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var e;return null!=(e=this.getAttribute(qa.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(qa.MAX_RESOLUTION,e):this.removeAttribute(qa.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(qa.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(qa.MIN_RESOLUTION,e):this.removeAttribute(qa.MIN_RESOLUTION))}get maxAutoResolution(){var e;return null!=(e=this.getAttribute(qa.MAX_AUTO_RESOLUTION))?e:void 0}set maxAutoResolution(e){null==e?this.removeAttribute(qa.MAX_AUTO_RESOLUTION):this.setAttribute(qa.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return null!=(e=this.getAttribute(qa.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(qa.RENDITION_ORDER,e):this.removeAttribute(qa.RENDITION_ORDER))}get programStartTime(){return CE(this.getAttribute(qa.PROGRAM_START_TIME))}set programStartTime(e){null==e?this.removeAttribute(qa.PROGRAM_START_TIME):this.setAttribute(qa.PROGRAM_START_TIME,`${e}`)}get programEndTime(){return CE(this.getAttribute(qa.PROGRAM_END_TIME))}set programEndTime(e){null==e?this.removeAttribute(qa.PROGRAM_END_TIME):this.setAttribute(qa.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){return CE(this.getAttribute(qa.ASSET_START_TIME))}set assetStartTime(e){null==e?this.removeAttribute(qa.ASSET_START_TIME):this.setAttribute(qa.ASSET_START_TIME,`${e}`)}get assetEndTime(){return CE(this.getAttribute(qa.ASSET_END_TIME))}set assetEndTime(e){null==e?this.removeAttribute(qa.ASSET_END_TIME):this.setAttribute(qa.ASSET_END_TIME,`${e}`)}get extraSourceParams(){return this.hasAttribute(yf.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(yf.EXTRA_SOURCE_PARAMS)).entries()].reduce((e,t)=>{let[n,i]=t;return e[n]=i,e},{}):Jf}set extraSourceParams(e){null==e?this.removeAttribute(yf.EXTRA_SOURCE_PARAMS):this.setAttribute(yf.EXTRA_SOURCE_PARAMS,new URLSearchParams(e).toString())}get customDomain(){var e;return null!=(e=this.getAttribute(qa.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(qa.CUSTOM_DOMAIN,e):this.removeAttribute(qa.CUSTOM_DOMAIN))}get envKey(){var e;return null!=(e=ey(this,qa.ENV_KEY))?e:void 0}set envKey(e){this.setAttribute(qa.ENV_KEY,`${e}`)}get noVolumePref(){return this.hasAttribute(yf.NO_VOLUME_PREF)}set noVolumePref(e){e?this.setAttribute(yf.NO_VOLUME_PREF,""):this.removeAttribute(yf.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(yf.NO_MUTED_PREF)}set noMutedPref(e){e?this.setAttribute(yf.NO_MUTED_PREF,""):this.removeAttribute(yf.NO_MUTED_PREF)}get debug(){return null!=ey(this,qa.DEBUG)}set debug(e){e?this.setAttribute(qa.DEBUG,""):this.removeAttribute(qa.DEBUG)}get disableTracking(){return null!=ey(this,qa.DISABLE_TRACKING)}set disableTracking(e){this.toggleAttribute(qa.DISABLE_TRACKING,!!e)}get disableCookies(){return null!=ey(this,qa.DISABLE_COOKIES)}set disableCookies(e){e?this.setAttribute(qa.DISABLE_COOKIES,""):this.removeAttribute(qa.DISABLE_COOKIES)}get streamType(){var e,t,n;return null!=(n=null!=(t=this.getAttribute(qa.STREAM_TYPE))?t:null==(e=this.media)?void 0:e.streamType)?n:Tn.UNKNOWN}set streamType(e){this.setAttribute(qa.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,n;return null!=(n=null!=(t=this.getAttribute(yf.DEFAULT_STREAM_TYPE))?t:null==(e=this.mediaController)?void 0:e.getAttribute(yf.DEFAULT_STREAM_TYPE))?n:Tn.ON_DEMAND}set defaultStreamType(e){e?this.setAttribute(yf.DEFAULT_STREAM_TYPE,e):this.removeAttribute(yf.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var e,t;return this.hasAttribute(yf.TARGET_LIVE_WINDOW)?+this.getAttribute(yf.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(yf.TARGET_LIVE_WINDOW):this.setAttribute(yf.TARGET_LIVE_WINDOW,""+ +e))}get liveEdgeStart(){var e;return null==(e=this.media)?void 0:e.liveEdgeStart}get startTime(){return CE(ey(this,qa.START_TIME))}set startTime(e){this.setAttribute(qa.START_TIME,`${e}`)}get initialBandwidthEstimateKbps(){return CE(ey(this,qa.INITIAL_BANDWIDTH_ESTIMATE_KBPS))}set initialBandwidthEstimateKbps(e){null==e?this.removeAttribute(qa.INITIAL_BANDWIDTH_ESTIMATE_KBPS):this.setAttribute(qa.INITIAL_BANDWIDTH_ESTIMATE_KBPS,`${e}`)}get initialEstimateSegments(){return CE(ey(this,qa.INITIAL_ESTIMATE_SEGMENTS))}set initialEstimateSegments(e){null==e?this.removeAttribute(qa.INITIAL_ESTIMATE_SEGMENTS):this.setAttribute(qa.INITIAL_ESTIMATE_SEGMENTS,`${e}`)}get minPreloadSegments(){return CE(ey(this,qa.MIN_PRELOAD_SEGMENTS))}set minPreloadSegments(e){null==e?this.removeAttribute(qa.MIN_PRELOAD_SEGMENTS):this.setAttribute(qa.MIN_PRELOAD_SEGMENTS,`${e}`)}get preferPlayback(){let e=this.getAttribute(qa.PREFER_PLAYBACK);if(e===An||e===kn)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===An||e===kn?this.setAttribute(qa.PREFER_PLAYBACK,e):this.removeAttribute(qa.PREFER_PLAYBACK))}get metadata(){var e;return null==(e=this.media)?void 0:e.metadata}set metadata(e){EE(this,Wf,Bf).call(this),this.media?this.media.metadata={...wf(this),...e}:qE("underlying media element missing when trying to set metadata. metadata will not be set.")}
82get _hlsConfig(){var e;return null==(e=this.media)?void 0:e._hlsConfig}set _hlsConfig(e){EE(this,Wf,Bf).call(this),this.media?this.media._hlsConfig=e:qE("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.")}async addCuePoints(e){var t;if(EE(this,Wf,Bf).call(this),this.media)return null==(t=this.media)?void 0:t.addCuePoints(e);qE("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(EE(this,Wf,Bf).call(this),this.media)return null==(t=this.media)?void 0:t.addChapters(e);qE("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(yf.PLAYBACK_TOKEN),t=this.getAttribute(yf.DRM_TOKEN),n=this.getAttribute(yf.THUMBNAIL_TOKEN),i=this.getAttribute(yf.STORYBOARD_TOKEN);return{...vE(this,Rf),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{},...null!=n?{thumbnail:n}:{},...null!=i?{storyboard:i}:{}}}set tokens(e){gE(this,Rf,null!=e?e:{})}get playbackToken(){var e;return null!=(e=this.getAttribute(yf.PLAYBACK_TOKEN))?e:void 0}set playbackToken(e){this.setAttribute(yf.PLAYBACK_TOKEN,`${e}`)}get drmToken(){var e;return null!=(e=this.getAttribute(yf.DRM_TOKEN))?e:void 0}set drmToken(e){this.setAttribute(yf.DRM_TOKEN,`${e}`)}get thumbnailToken(){var e;return null!=(e=this.getAttribute(yf.THUMBNAIL_TOKEN))?e:void 0}set thumbnailToken(e){this.setAttribute(yf.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return null!=(e=this.getAttribute(yf.STORYBOARD_TOKEN))?e:void 0}set storyboardToken(e){this.setAttribute(yf.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,t,n,i){var a;let r=null==(a=this.media)?void 0:a.nativeEl;if(r)return Zn(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}get castReceiver(){var e;return null!=(e=this.getAttribute(yf.CAST_RECEIVER))?e:void 0}set castReceiver(e){e!==this.castReceiver&&(e?this.setAttribute(yf.CAST_RECEIVER,e):this.removeAttribute(yf.CAST_RECEIVER))}get castCustomData(){var e;return null==(e=this.media)?void 0:e.castCustomData}set castCustomData(e){this.media?this.media.castCustomData=e:qE("underlying media element missing when trying to set castCustomData. castCustomData will not be set.")}get noTooltips(){return this.hasAttribute(yf.NO_TOOLTIPS)}set noTooltips(e){e?this.setAttribute(yf.NO_TOOLTIPS,""):this.removeAttribute(yf.NO_TOOLTIPS)}get proudlyDisplayMuxBadge(){return this.hasAttribute(yf.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(e){e?this.setAttribute(yf.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(yf.PROUDLY_DISPLAY_MUX_BADGE)}get capRenditionToPlayerSize(){var e;return null==(e=this.media)?void 0:e.capRenditionToPlayerSize}set capRenditionToPlayerSize(e){this.media?this.media.capRenditionToPlayerSize=e:qE("underlying media element missing when trying to set capRenditionToPlayerSize")}},ny=e=>{throw TypeError(e)},iy=(e,t,n)=>t.has(e)||ny("Cannot "+n),ay=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends ay{}globalThis.DocumentFragment=e}var ry,oy=class extends ay{},sy={get(e){},define(e,t,n){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(oy)};ry=new WeakMap;var ly={document:{createElement:function(e,t){return new oy}},DocumentFragment:DocumentFragment,customElements:sy,CustomEvent:class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};
82((e,t,n)=>{t.has(e)?ny("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,ry),((e,t,n,i)=>{iy(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,ry,null==t?void 0:t.detail)}get detail(){return((e,t,n)=>(iy(e,t,"read from private field"),n?n.call(e):t.get(e)))(this,ry)}initCustomEvent(){}},EventTarget:ay,HTMLElement:oy,HTMLVideoElement:class extends ay{}},dy="undefined"==typeof window||"undefined"==typeof globalThis.customElements,uy=dy?ly:globalThis;dy||globalThis.document;uy.customElements.get("mux-player")||(uy.customElements.define("mux-player",ty),uy.MuxPlayerElement=ty);var cy=parseInt(i.version)>=19,hy={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},my=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{ref:t,...n}=e;return Object.entries(n).reduce((e,t)=>{let[n,i]=t,a=((e,t)=>{if(cy||"boolean"!=typeof t||t){if(((e,t)=>!(e=>null==e)(t)&&e in t)(e,hy))return hy[e];if("undefined"!=typeof t)return/[A-Z]/.test(e)?(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`))(e):e}})(n,i);if(!a)return e;let r=(e=>cy||"boolean"!=typeof e?e:"")(i);return e[a]=r,e},{})};function py(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function vy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.useCallback(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{let n=!1,i=t.map(t=>{let i=py(t,e);return!n&&"function"==typeof i&&(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){let n=i[e];"function"==typeof n?n():py(t[e],null)}}}}(...t),t)}var by=Object.prototype.hasOwnProperty,gy=(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(!by.call(t,n[a])||!Object.is(e[n[a]],t[n[a]]))return!1;return!0})(t,e[n]),Ey=(e,t,n)=>{e[n]=t},fy=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ey,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:gy;return(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])},yy=(()=>{try{return"3.13.0"}catch{}return"UNKNOWN"})(),_y=(e,t,n)=>(0,i.useEffect)(()=>{let i=null==t?void 0:t.current;if(!i||!n)return;let a=e,r=n;return i.addEventListener(a,r),()=>{i.removeEventListener(a,r)}},[null==t?void 0:t.current,n,e]),Ty=i.forwardRef((e,t)=>{let{children:n,...a}=e;return i.createElement("mux-player",{suppressHydrationWarning:!0,...my(a),ref:t},n)}),Ay=yy,ky="mux-player-react",wy=i.forwardRef((e,t)=>{var n;let a=(0,i.useRef)(null),r=vy(a,t),[o]=((e,t)=>{let{onAbort:n,onCanPlay:i,onCanPlayThrough:a,onEmptied:r,onLoadStart:o,onLoadedData:s,onLoadedMetadata:l,onProgress:d,onDurationChange:u,onVolumeChange:c,onRateChange:h,onResize:m,onWaiting:p,onPlay:v,onPlaying:b,onTimeUpdate:g,onPause:E,onSeeking:f,onSeeked:y,onStalled:_,onSuspend:T,onEnded:A,onError:k,onCuePointChange:w,onChapterChange:I,metadata:S,tokens:R,paused:C,playbackId:L,playbackRates:D,currentTime:M,themeProps:x,extraSourceParams:N,castCustomData:O,_hlsConfig:P,...U}=t;return fy("tokens",R,e),fy("playbackId",L,e),fy("playbackRates",D,e),fy("metadata",S,e),fy("extraSourceParams",N,e),fy("_hlsConfig",P,e),fy("themeProps",x,e),fy("castCustomData",O,e),fy("paused",C,e,(e,t)=>{null!=t&&(t?e.pause():e.play())},(e,t,n)=>!(e.hasAttribute("autoplay")&&!e.hasPlayed)&&gy(e,t,n)),fy("currentTime",M,e,(e,t)=>{null!=t&&(e.currentTime=t)}),_y("abort",e,n),_y("canplay",e,i),_y("canplaythrough",e,a),_y("emptied",e,r),_y("loadstart",e,o),_y("loadeddata",e,s),_y("loadedmetadata",e,l),_y("progress",e,d),_y("durationchange",e,u),_y("volumechange",e,c),_y("ratechange",e,h),_y("resize",e,m),_y("waiting",e,p),_y("play",e,v),_y("playing",e,b),_y("timeupdate",e,g),_y("pause",e,E),_y("seeking",e,f),_y("seeked",e,y),_y("stalled",e,_),_y("suspend",e,T),_y("ended",e,A),_y("error",e,k),_y("cuepointchange",e,w),_y("chapterchange",e,I),[U]})(a,e),[s]=(0,i.useState)(null!=(n=e.playerInitTime)?n:Yi());return i.createElement(Ty,{ref:r,defaultHiddenCaptions:e.defaultHiddenCaptions,playerSoftwareName:ky,playerSoftwareVersion:Ay,playerInitTime:s,...o})}),Iy=wy}}]);

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.