@mux/mux-player 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var bu=Object.create;var ra=Object.defineProperty;var Eu=Object.getOwnPropertyDescriptor;var vu=Object.getOwnPropertyNames;var fu=Object.getPrototypeOf,gu=Object.prototype.hasOwnProperty;var Au=(i,e)=>{for(var t in e)ra(i,t,{get:e[t],enumerable:!0})},Ss=(i,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of vu(e))!gu.call(i,r)&&r!==t&&ra(i,r,{get:()=>e[r],enumerable:!(a=Eu(e,r))||a.enumerable});return i};var _u=(i,e,t)=>(t=i!=null?bu(fu(i)):{},Ss(e||!i||!i.__esModule?ra(t,"default",{value:i,enumerable:!0}):t,i)),yu=i=>Ss(ra({},"__esModule",{value:!0}),i);var ln=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var k=(i,e,t)=>(ln(i,e,"read from private field"),t?t.call(i):e.get(i)),$=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},de=(i,e,t,a)=>(ln(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t);var W=(i,e,t)=>(ln(i,e,"access private method"),t);var Zm={};Au(Zm,{MediaError:()=>f.MediaError,default:()=>Gm,getVideoAttribute:()=>Nt});module.exports=yu(Zm);var Bt=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Bt{}globalThis.DocumentFragment=i}var Ei=class extends Bt{},dn=class extends Bt{},Tu={get(i){},define(i,e,t){},upgrade(i){},whenDefined(i){return Promise.resolve(Ei)}},vi,un=class{constructor(e,t={}){$(this,vi,void 0);de(this,vi,t==null?void 0:t.detail)}get detail(){return k(this,vi)}initCustomEvent(){}};vi=new WeakMap;function Iu(i,e){return new Ei}var Cs={document:{createElement:Iu},DocumentFragment,customElements:Tu,CustomEvent:un,EventTarget:Bt,HTMLElement:Ei,HTMLVideoElement:dn},Ms=typeof window=="undefined"||typeof globalThis.customElements=="undefined",U=Ms?Cs:globalThis,ae=Ms?Cs.document:globalThis.document;var b={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_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"},A={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},pt={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_PAUSED:"mediaPaused",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_ENDED:"mediaEnded",MEDIA_MUTED:"mediaMuted",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_IS_PIP:"mediaIsPip",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled"},Ls=Object.entries(pt),o=Ls.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{}),He=Ls.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),Xm=Object.entries(He).reduce((i,[e,t])=>{let a=o[e];return a&&(i[t]=a),i},{userinactivechange:"userinactive"}),Rs=Object.entries(o).reduce((i,[e,t])=>{let a=He[e];return a&&(i[t]=a),i},{userinactive:"userinactivechange"}),Vt={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},na={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var cn={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},re={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},pe={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var Z={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:i=1}={})=>`current playback rate ${i}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading"},O={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",AIRPLAY:()=>"air play",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:i=30}={})=>`seek forward ${i} seconds`,SEEK_BACK_N_SECS:({seekOffset:i=30}={})=>`seek back ${i} seconds`,SEEK_LIVE:()=>"seek to live",PLAYING_LIVE:()=>"playing live"},Su={...Z,...O};function ws(i){return i==null?void 0:i.map(Cu).join(" ")}function xs(i){return i==null?void 0:i.split(/\s+/).map(Mu)}function Cu(i){if(i){let{id:e,width:t,height:a}=i;return[e,t,a].filter(r=>r!=null).join(":")}}function Mu(i){if(i){let[e,t,a]=i.split(":");return{id:e,width:t,height:a}}}function Ds(i){return i==null?void 0:i.map(Lu).join(" ")}function Os(i){return i==null?void 0:i.split(/\s+/).map(Ru)}function Lu(i){if(i){let{id:e,kind:t,language:a,label:r}=i;return[e,t,a,r].filter(n=>n!=null).join(":")}}function Ru(i){if(i){let[e,t,a,r]=i.split(":");return{id:e,kind:t,language:a,label:r}}}function oa(i,e=!1){return i.split("_").map(function(t,a){return(a||e?t[0].toUpperCase():t[0].toLowerCase())+t.slice(1).toLowerCase()}).join("")}function Ns(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Us(i){return typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i)}function sa(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))}var la=i=>new Promise(e=>setTimeout(e,i));var Ps=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],wu=(i,e)=>{let t=i===1?Ps[e].singular:Ps[e].plural;return`${i} ${t}`},bt=i=>{if(!Us(i))return"";let e=Math.abs(i),t=e!==i,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((d,u)=>d&&wu(d,u)).filter(d=>d).join(", ")}${t?" remaining":""}`};function ke(i,e){let t=!1;i<0&&(t=!0,i=0-i),i=i<0?0:i;let a=Math.floor(i%60),r=Math.floor(i/60%60),n=Math.floor(i/3600),s=Math.floor(e/60%60),d=Math.floor(e/3600);return(isNaN(i)||i===1/0)&&(n=r=a="0"),n=n>0||d>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(t?"-":"")+n+r+a}var th=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});var da=(i,e,t=".value")=>{let a=i.querySelector(t);!a||(a.textContent=e)},Du=(i,e)=>{let t=`slot[name="${e}"]`,a=i.shadowRoot.querySelector(t);return a?a.children:[]},ua=(i,e)=>Du(i,e)[0],Et=(i,e)=>!i||!e?!1:i.contains(e)?!0:Et(i,e.getRootNode().host),Je=(i,e)=>{if(!i)return null;let t=i.closest(e);return t||Je(i.getRootNode().host,e)};function mn(i=document){var e;let t=i==null?void 0:i.activeElement;return t?(e=mn(t.shadowRoot))!=null?e:t:null}function Bs(i){return i.checkVisibility?i.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):getComputedStyle(i).opacity!="0"&&getComputedStyle(i.parentElement).opacity!="0"}function N(i,e){var t;let a;for(a of i.querySelectorAll("style")){let r;try{r=(t=a.sheet)==null?void 0:t.cssRules}catch{continue}for(let n of r!=null?r:[])if(n.selectorText===e)return n}return a!=null&&a.sheet?(a.sheet.insertRule(`${e}{}`,a.sheet.cssRules.length),a.sheet.cssRules[a.sheet.cssRules.length-1]):{style:{setProperty:()=>{},removeProperty:()=>{}}}}function S(i,e,t=Number.NaN){let a=i.getAttribute(e);return a!=null?+a:t}function D(i,e,t){let a=+t;if(t==null||Number.isNaN(a)){i.hasAttribute(e)&&i.removeAttribute(e);return}S(i,e,void 0)!==a&&i.setAttribute(e,`${a}`)}function x(i,e){return i.hasAttribute(e)}function R(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}x(i,e)!=t&&i.toggleAttribute(e,t)}function w(i,e,t=null){var a;return(a=i.getAttribute(e))!=null?a:t}function C(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}let a=`${t}`;w(i,e,void 0)!==a&&i.setAttribute(e,a)}var ca=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},hn=class{observe(){}unobserve(){}disconnect(){}},Vs={createElement:function(){return new pn.HTMLElement},addEventListener(){},removeEventListener(){}},pn={ResizeObserver:hn,document:Vs,HTMLElement:class extends ca{},DocumentFragment:class extends ca{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},CustomEvent:function(){},getComputedStyle:function(){}},Hs=typeof window=="undefined"||typeof window.customElements=="undefined",$s=Object.keys(pn).every(i=>i in globalThis),l=Hs&&!$s?pn:globalThis,m=Hs&&!$s?Vs:globalThis.document;var Ou=Object.defineProperty,Nu=(i,e,t)=>e in i?Ou(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Uu=(i,e,t)=>(Nu(i,typeof e!="symbol"?e+"":e,t),t),Ws=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ue=(i,e,t)=>(Ws(i,e,"read from private field"),t?t.call(i):e.get(i)),ma=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ha=(i,e,t,a)=>(Ws(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Se,pa,Ht,ba,Fs=m.createElement("template");Fs.innerHTML=`
1
+ "use strict";var Wu=Object.create;var Ea=Object.defineProperty;var Fu=Object.getOwnPropertyDescriptor;var Ku=Object.getOwnPropertyNames;var Yu=Object.getPrototypeOf,Gu=Object.prototype.hasOwnProperty;var Zu=(i,e)=>{for(var t in e)Ea(i,t,{get:e[t],enumerable:!0})},Zs=(i,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ku(e))!Gu.call(i,r)&&r!==t&&Ea(i,r,{get:()=>e[r],enumerable:!(a=Fu(e,r))||a.enumerable});return i};var qu=(i,e,t)=>(t=i!=null?Wu(Yu(i)):{},Zs(e||!i||!i.__esModule?Ea(t,"default",{value:i,enumerable:!0}):t,i)),Qu=i=>Zs(Ea({},"__esModule",{value:!0}),i);var Tn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var S=(i,e,t)=>(Tn(i,e,"read from private field"),t?t.call(i):e.get(i)),W=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ce=(i,e,t,a)=>(Tn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t);var F=(i,e,t)=>(Tn(i,e,"access private method"),t);var _h={};Zu(_h,{MediaError:()=>g.MediaError,default:()=>Ah,getVideoAttribute:()=>Ht});module.exports=Qu(_h);var Ft=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Ft{}globalThis.DocumentFragment=i}var Ti=class extends Ft{},In=class extends Ft{},zu={get(i){},define(i,e,t){},upgrade(i){},whenDefined(i){return Promise.resolve(Ti)}},Ii,kn=class{constructor(e,t={}){W(this,Ii,void 0);ce(this,Ii,t==null?void 0:t.detail)}get detail(){return S(this,Ii)}initCustomEvent(){}};Ii=new WeakMap;function Xu(i,e){return new Ti}var qs={document:{createElement:Xu},DocumentFragment,customElements:zu,CustomEvent:kn,EventTarget:Ft,HTMLElement:Ti,HTMLVideoElement:In},Qs=typeof window=="undefined"||typeof globalThis.customElements=="undefined",U=Qs?qs:globalThis,ne=Qs?qs.document:globalThis.document;var f={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},A={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},vt={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_PAUSED:"mediaPaused",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_ENDED:"mediaEnded",MEDIA_MUTED:"mediaMuted",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_IS_PIP:"mediaIsPip",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled"},zs=Object.entries(vt),o=zs.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{}),Fe=zs.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),kh=Object.entries(Fe).reduce((i,[e,t])=>{let a=o[e];return a&&(i[t]=a),i},{userinactivechange:"userinactive"}),Xs=Object.entries(o).reduce((i,[e,t])=>{let a=Fe[e];return a&&(i[t]=a),i},{userinactive:"userinactivechange"}),Kt={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Yt={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Sn={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},oe={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},fe={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var q={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:i=1}={})=>`current playback rate ${i}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading"},D={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",ENTER_AIRPLAY:()=>"start airplay",EXIT_AIRPLAY:()=>"stop airplay",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:i=30}={})=>`seek forward ${i} seconds`,SEEK_BACK_N_SECS:({seekOffset:i=30}={})=>`seek back ${i} seconds`,SEEK_LIVE:()=>"seek to live",PLAYING_LIVE:()=>"playing live"},ju={...q,...D};function Js(i){return i==null?void 0:i.map(ec).join(" ")}function js(i){return i==null?void 0:i.split(/\s+/).map(tc)}function ec(i){if(i){let{id:e,width:t,height:a}=i;return[e,t,a].filter(r=>r!=null).join(":")}}function tc(i){if(i){let[e,t,a]=i.split(":");return{id:e,width:t,height:a}}}function el(i){return i==null?void 0:i.map(ic).join(" ")}function tl(i){return i==null?void 0:i.split(/\s+/).map(ac)}function ic(i){if(i){let{id:e,kind:t,language:a,label:r}=i;return[e,t,a,r].filter(n=>n!=null).join(":")}}function ac(i){if(i){let[e,t,a,r]=i.split(":");return{id:e,kind:t,language:a,label:r}}}function fa(i,e=!1){return i.split("_").map(function(t,a){return(a||e?t[0].toUpperCase():t[0].toLowerCase())+t.slice(1).toLowerCase()}).join("")}function il(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function al(i){return typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i)}function va(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))}var ga=i=>new Promise(e=>setTimeout(e,i));var rl=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],rc=(i,e)=>{let t=i===1?rl[e].singular:rl[e].plural;return`${i} ${t}`},gt=i=>{if(!al(i))return"";let e=Math.abs(i),t=e!==i,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((d,u)=>d&&rc(d,u)).filter(d=>d).join(", ")}${t?" remaining":""}`};function Se(i,e){let t=!1;i<0&&(t=!0,i=0-i),i=i<0?0:i;let a=Math.floor(i%60),r=Math.floor(i/60%60),n=Math.floor(i/3600),s=Math.floor(e/60%60),d=Math.floor(e/3600);return(isNaN(i)||i===1/0)&&(n=r=a="0"),n=n>0||d>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(t?"-":"")+n+r+a}var Lh=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});var Aa=(i,e,t=".value")=>{let a=i.querySelector(t);a&&(a.textContent=e)},oc=(i,e)=>{let t=`slot[name="${e}"]`,a=i.shadowRoot.querySelector(t);return a?a.children:[]},_a=(i,e)=>oc(i,e)[0],je=(i,e)=>!i||!e?!1:i.contains(e)?!0:je(i,e.getRootNode().host),et=(i,e)=>{if(!i)return null;let t=i.closest(e);return t||et(i.getRootNode().host,e)};function Mn(i=document){var e;let t=i==null?void 0:i.activeElement;return t?(e=Mn(t.shadowRoot))!=null?e:t:null}function nl(i){var e;let t=(e=i==null?void 0:i.getRootNode)==null?void 0:e.call(i);return t instanceof ShadowRoot||t instanceof Document?t:null}function ol(i,e=3){if(i.checkVisibility)return i.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0});let t=i;for(;t&&e>0;){let a=getComputedStyle(t);if(a.opacity==="0"||a.visibility==="hidden"||a.display==="none")return!1;t=t.parentElement,e--}return!0}function sl(i,e,t,a){let r=Cn(t,a),n=Cn(t,{x:i,y:e}),s=Cn(a,{x:i,y:e});return n>r||s>r?n>s?1:0:n/r}function Cn(i,e){return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}function N(i,e){var t;let a;for(a of i.querySelectorAll("style")){let r;try{r=(t=a.sheet)==null?void 0:t.cssRules}catch{continue}for(let n of r!=null?r:[])if(n.selectorText===e)return n}return a!=null&&a.sheet?(a.sheet.insertRule(`${e}{}`,a.sheet.cssRules.length),a.sheet.cssRules[a.sheet.cssRules.length-1]):{style:{setProperty:()=>{},removeProperty:()=>{}}}}function M(i,e,t=Number.NaN){let a=i.getAttribute(e);return a!=null?+a:t}function O(i,e,t){let a=+t;if(t==null||Number.isNaN(a)){i.hasAttribute(e)&&i.removeAttribute(e);return}M(i,e,void 0)!==a&&i.setAttribute(e,`${a}`)}function L(i,e){return i.hasAttribute(e)}function C(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}L(i,e)!=t&&i.toggleAttribute(e,t)}function x(i,e,t=null){var a;return(a=i.getAttribute(e))!=null?a:t}function R(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}let a=`${t}`;x(i,e,void 0)!==a&&i.setAttribute(e,a)}var ya=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},Ln=class{observe(){}unobserve(){}disconnect(){}},ll={createElement:function(){return new Rn.HTMLElement},addEventListener(){},removeEventListener(){}},Rn={ResizeObserver:Ln,document:ll,HTMLElement:class extends ya{},DocumentFragment:class extends ya{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[]}},dl=typeof window=="undefined"||typeof window.customElements=="undefined",ul=Object.keys(Rn).every(i=>i in globalThis),l=dl&&!ul?Rn:globalThis,c=dl&&!ul?ll:globalThis.document;var sc=Object.defineProperty,lc=(i,e,t)=>e in i?sc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,dc=(i,e,t)=>(lc(i,typeof e!="symbol"?e+"":e,t),t),cl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},me=(i,e,t)=>(cl(i,e,"read from private field"),t?t.call(i):e.get(i)),Ta=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ia=(i,e,t,a)=>(cl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ce,ka,Gt,Sa,ml=c.createElement("template");ml.innerHTML=`
2
2
  <style>
3
3
  :host {
4
4
  font: var(--media-font,
@@ -47,12 +47,26 @@
47
47
  min-width: 100%;
48
48
  }
49
49
  </style>
50
- `;var M=class extends l.HTMLElement{constructor(e={}){if(super(),ma(this,Se,void 0),Uu(this,"preventClick",!1),ma(this,pa,a=>{this.preventClick||this.handleClick(a)}),ma(this,Ht,a=>{let{key:r}=a;if(!this.keysUsed.includes(r)){this.removeEventListener("keyup",ue(this,Ht));return}this.preventClick||this.handleClick(a)}),ma(this,ba,a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!this.keysUsed.includes(s)){this.removeEventListener("keyup",ue(this,Ht));return}this.addEventListener("keyup",ue(this,Ht),{once:!0})}),!this.shadowRoot){this.attachShadow({mode:"open"});let a=Fs.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=m.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),this.shadowRoot.appendChild(a)}let{style:t}=N(this.shadowRoot,":host");t.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`)}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",ue(this,pa)),this.addEventListener("keydown",ue(this,ba)),this.tabIndex=0}disable(){this.removeEventListener("click",ue(this,pa)),this.removeEventListener("keydown",ue(this,ba)),this.removeEventListener("keyup",ue(this,Ht)),this.tabIndex=-1}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=ue(this,Se))==null?void 0:r.unassociateElement)==null||n.call(r,this),ha(this,Se,null)),a&&this.isConnected&&(ha(this,Se,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=ue(this,Se))==null?void 0:d.associateElement)==null||u.call(d,this))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","button");let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ha(this,Se,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=ue(this,Se))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=ue(this,Se))==null?void 0:e.unassociateElement)==null||t.call(e,this),ha(this,Se,null)}get keysUsed(){return["Enter"," "]}handleClick(e){}};Se=new WeakMap;pa=new WeakMap;Ht=new WeakMap;ba=new WeakMap;l.customElements.get("media-chrome-button")||l.customElements.define("media-chrome-button",M);var Pu=`<svg aria-hidden="true" viewBox="0 0 26 24">
50
+ `;var w=class extends l.HTMLElement{constructor(e={}){if(super(),Ta(this,Ce,void 0),dc(this,"preventClick",!1),Ta(this,ka,a=>{this.preventClick||this.handleClick(a)}),Ta(this,Gt,a=>{let{key:r}=a;if(!this.keysUsed.includes(r)){this.removeEventListener("keyup",me(this,Gt));return}this.preventClick||this.handleClick(a)}),Ta(this,Sa,a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!this.keysUsed.includes(s)){this.removeEventListener("keyup",me(this,Gt));return}this.addEventListener("keyup",me(this,Gt),{once:!0})}),!this.shadowRoot){this.attachShadow({mode:"open"});let a=ml.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=c.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),this.shadowRoot.appendChild(a)}let{style:t}=N(this.shadowRoot,":host");t.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`)}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",me(this,ka)),this.addEventListener("keydown",me(this,Sa)),this.tabIndex=0}disable(){this.removeEventListener("click",me(this,ka)),this.removeEventListener("keydown",me(this,Sa)),this.removeEventListener("keyup",me(this,Gt)),this.tabIndex=-1}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=me(this,Ce))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ia(this,Ce,null)),a&&this.isConnected&&(Ia(this,Ce,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=me(this,Ce))==null?void 0:d.associateElement)==null||u.call(d,this))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","button");let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Ia(this,Ce,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=me(this,Ce))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=me(this,Ce))==null?void 0:e.unassociateElement)==null||t.call(e,this),Ia(this,Ce,null)}get keysUsed(){return["Enter"," "]}handleClick(e){}};Ce=new WeakMap;ka=new WeakMap;Gt=new WeakMap;Sa=new WeakMap;l.customElements.get("media-chrome-button")||l.customElements.define("media-chrome-button",w);var hl=`<svg aria-hidden="true" viewBox="0 0 26 24">
51
51
  <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"/>
52
52
  </svg>
53
- `,Ks=m.createElement("template");Ks.innerHTML=`
54
- <slot name="icon">${Pu}</slot>
55
- `;var bn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Ks,...e})}connectedCallback(){this.setAttribute("aria-label",O.AIRPLAY()),super.connectedCallback()}get mediaAirplayUnavailable(){return w(this,o.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){C(this,o.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new l.CustomEvent(b.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};l.customElements.get("media-airplay-button")||l.customElements.define("media-airplay-button",bn);var Bu='<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>',Vu='<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>',Gs=m.createElement("template");Gs.innerHTML=`
53
+ `,bl=c.createElement("template");bl.innerHTML=`
54
+ <style>
55
+ :host([${o.MEDIA_IS_AIRPLAYING}]) slot:not([name=exit]):not([name=icon]) {
56
+ display: none !important;
57
+ }
58
+
59
+
60
+ :host(:not([${o.MEDIA_IS_AIRPLAYING}])) slot:not([name=enter]):not([name=icon]) {
61
+ display: none !important;
62
+ }
63
+ </style>
64
+
65
+ <slot name="icon">
66
+ <slot name="enter">${hl}</slot>
67
+ <slot name="exit">${hl}</slot>
68
+ </slot>
69
+ `;var pl=i=>{let e=i.mediaIsAirplaying?D.EXIT_AIRPLAY():D.ENTER_AIRPLAY();i.setAttribute("aria-label",e)},wn=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_AIRPLAYING,o.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:bl,...e})}connectedCallback(){super.connectedCallback(),pl(this)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_IS_AIRPLAYING&&pl(this)}get mediaIsAirplaying(){return L(this,o.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){C(this,o.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return x(this,o.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){R(this,o.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new l.CustomEvent(f.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};l.customElements.get("media-airplay-button")||l.customElements.define("media-airplay-button",wn);var uc='<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>',cc='<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>',fl=c.createElement("template");fl.innerHTML=`
56
70
  <style>
57
71
  :host([${o.MEDIA_IS_CASTING}]) slot:not([name=exit]):not([name=icon]) {
58
72
  display: none !important;
@@ -65,17 +79,17 @@
65
79
  </style>
66
80
 
67
81
  <slot name="icon">
68
- <slot name="enter">${Bu}</slot>
69
- <slot name="exit">${Vu}</slot>
82
+ <slot name="enter">${uc}</slot>
83
+ <slot name="exit">${cc}</slot>
70
84
  </slot>
71
- `;var Ys=i=>{let t=i.getAttribute(o.MEDIA_IS_CASTING)!=null?O.EXIT_CAST():O.ENTER_CAST();i.setAttribute("aria-label",t)},En=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_CASTING,o.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Gs,...e})}connectedCallback(){Ys(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_CASTING&&Ys(this),super.attributeChangedCallback(e,t,a)}get mediaIsCasting(){return x(this,o.MEDIA_IS_CASTING)}set mediaIsCasting(e){R(this,o.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return w(this,o.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){C(this,o.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?b.MEDIA_EXIT_CAST_REQUEST:b.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-cast-button")||l.customElements.define("media-cast-button",En);var Zs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},je=(i,e,t)=>(Zs(i,e,"read from private field"),t?t.call(i):e.get(i)),Hu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ea=(i,e,t,a)=>(Zs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),J,qs=m.createElement("template");qs.innerHTML=`
85
+ `;var El=i=>{let e=i.mediaIsCasting?D.EXIT_CAST():D.ENTER_CAST();i.setAttribute("aria-label",e)},xn=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_CASTING,o.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:fl,...e})}connectedCallback(){super.connectedCallback(),El(this)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_IS_CASTING&&El(this)}get mediaIsCasting(){return L(this,o.MEDIA_IS_CASTING)}set mediaIsCasting(e){C(this,o.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return x(this,o.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){R(this,o.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?f.MEDIA_EXIT_CAST_REQUEST:f.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-cast-button")||l.customElements.define("media-cast-button",xn);var vl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},tt=(i,e,t)=>(vl(i,e,"read from private field"),t?t.call(i):e.get(i)),mc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ca=(i,e,t,a)=>(vl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),te,gl=c.createElement("template");gl.innerHTML=`
72
86
  <style>
73
87
  :host {
74
88
  display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
75
89
  box-sizing: border-box;
76
90
  }
77
91
  </style>
78
- `;var vn=class extends l.HTMLElement{constructor(e={}){if(super(),Hu(this,J,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=qs.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=m.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),t.appendChild(a)}}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=je(this,J))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ea(this,J,null)),a&&this.isConnected&&(Ea(this,J,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=je(this,J))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),Ea(this,J,$u(this)),this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=je(this,J))==null?void 0:e.associateElement)==null||t.call(e,this)),(a=je(this,J))==null||a.addEventListener("pointerdown",this),(r=je(this,J))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,t,a,r;this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=je(this,J))==null?void 0:e.unassociateElement)==null||t.call(e,this)),(a=je(this,J))==null||a.removeEventListener("pointerdown",this),(r=je(this,J))==null||r.removeEventListener("click",this),Ea(this,J,null)}handleEvent(e){var t;let a=(t=e.composedPath())==null?void 0:t[0];if(!!["video","media-controller"].includes(a==null?void 0:a.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){let{clientX:n,clientY:s}=e,{left:d,top:u,width:c,height:h}=this.getBoundingClientRect(),g=n-d,v=s-u;if(g<0||v<0||g>c||v>h||c===0&&h===0)return;let{pointerType:T=this._pointerType}=e;if(this._pointerType=void 0,T===cn.TOUCH){this.handleTap(e);return}else if(T===cn.MOUSE){this.handleMouseClick(e);return}}}}get mediaPaused(){return x(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(t,{composed:!0,bubbles:!0}))}};J=new WeakMap;function $u(i){var e;let t=i.getAttribute(A.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):Je(i,"media-controller")}l.customElements.get("media-gesture-receiver")||l.customElements.define("media-gesture-receiver",vn);var Wu=Object.defineProperty,Fu=(i,e,t)=>e in i?Wu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ku=(i,e,t)=>(Fu(i,typeof e!="symbol"?e+"":e,t),t),L={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive"},Qs=m.createElement("template");Qs.innerHTML=`
92
+ `;var Dn=class extends l.HTMLElement{constructor(e={}){if(super(),mc(this,te,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=gl.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=c.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),t.appendChild(a)}}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=tt(this,te))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ca(this,te,null)),a&&this.isConnected&&(Ca(this,te,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=tt(this,te))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),Ca(this,te,hc(this)),this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=tt(this,te))==null?void 0:e.associateElement)==null||t.call(e,this)),(a=tt(this,te))==null||a.addEventListener("pointerdown",this),(r=tt(this,te))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,t,a,r;this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=tt(this,te))==null?void 0:e.unassociateElement)==null||t.call(e,this)),(a=tt(this,te))==null||a.removeEventListener("pointerdown",this),(r=tt(this,te))==null||r.removeEventListener("click",this),Ca(this,te,null)}handleEvent(e){var t;let a=(t=e.composedPath())==null?void 0:t[0];if(["video","media-controller"].includes(a==null?void 0:a.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){let{clientX:n,clientY:s}=e,{left:d,top:u,width:h,height:m}=this.getBoundingClientRect(),p=n-d,E=s-u;if(p<0||E<0||p>h||E>m||h===0&&m===0)return;let{pointerType:I=this._pointerType}=e;if(this._pointerType=void 0,I===Sn.TOUCH){this.handleTap(e);return}else if(I===Sn.MOUSE){this.handleMouseClick(e);return}}}}get mediaPaused(){return L(this,o.MEDIA_PAUSED)}set mediaPaused(e){C(this,o.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?f.MEDIA_PLAY_REQUEST:f.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(t,{composed:!0,bubbles:!0}))}};te=new WeakMap;function hc(i){var e;let t=i.getAttribute(A.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):et(i,"media-controller")}l.customElements.get("media-gesture-receiver")||l.customElements.define("media-gesture-receiver",Dn);var Al=new WeakMap,On=i=>{let e=Al.get(i);return e||Al.set(i,e=new Set),e},_l=new l.ResizeObserver(i=>{for(let e of i)for(let t of On(e.target))t(e)});function ki(i,e){On(i).add(e),_l.observe(i)}function Nn(i,e){let t=On(i);t.delete(e),t.size||_l.unobserve(i)}var pc=Object.defineProperty,bc=(i,e,t)=>e in i?pc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ec=(i,e,t)=>(bc(i,typeof e!="symbol"?e+"":e,t),t),Vn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Si=(i,e,t)=>(Vn(i,e,"read from private field"),t?t.call(i):e.get(i)),At=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Un=(i,e,t,a)=>(Vn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ve=(i,e,t)=>(Vn(i,e,"access private method"),t),Ma,it,Pn,yl,Bn,Tl,Ci,Ra,wa,Hn,Zt,Mi,T={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive"},Il=c.createElement("template");Il.innerHTML=`
79
93
  <style>
80
94
 
81
95
  :host([${o.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
@@ -90,7 +104,7 @@
90
104
  background-color: var(--media-background-color, #000);
91
105
  }
92
106
 
93
- :host(:not([${L.AUDIO}])) [part~=layer]:not([part~=media-layer]) {
107
+ :host(:not([${T.AUDIO}])) [part~=layer]:not([part~=media-layer]) {
94
108
  position: absolute;
95
109
  top: 0;
96
110
  left: 0;
@@ -108,19 +122,19 @@
108
122
  }
109
123
 
110
124
 
111
- :host([${L.AUDIO}]) slot[name=media] {
125
+ :host([${T.AUDIO}]) slot[name=media] {
112
126
  display: var(--media-slot-display, none);
113
127
  }
114
128
 
115
129
 
116
- :host([${L.AUDIO}]) [part~=layer][part~=gesture-layer] {
130
+ :host([${T.AUDIO}]) [part~=layer][part~=gesture-layer] {
117
131
  height: 0;
118
132
  display: block;
119
133
  }
120
134
 
121
135
 
122
- :host(:not([${L.AUDIO}])[${L.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),
123
- :host(:not([${L.AUDIO}])[${L.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {
136
+ :host(:not([${T.AUDIO}])[${T.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),
137
+ :host(:not([${T.AUDIO}])[${T.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {
124
138
  display: none;
125
139
  }
126
140
 
@@ -129,13 +143,13 @@
129
143
  pointer-events: auto;
130
144
  }
131
145
 
132
- :host(:not([${L.AUDIO}])) *[part~=layer][part~=centered-layer] {
146
+ :host(:not([${T.AUDIO}])) *[part~=layer][part~=centered-layer] {
133
147
  align-items: center;
134
148
  justify-content: center;
135
149
  }
136
150
 
137
- :host(:not([${L.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
138
- :host(:not([${L.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {
151
+ :host(:not([${T.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
152
+ :host(:not([${T.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {
139
153
  align-self: stretch;
140
154
  flex-grow: 1;
141
155
  }
@@ -155,7 +169,7 @@
155
169
  }
156
170
 
157
171
 
158
- :host(:not([${L.AUDIO}])) .spacer {
172
+ :host(:not([${T.AUDIO}])) .spacer {
159
173
  flex-grow: 1;
160
174
  }
161
175
 
@@ -167,23 +181,27 @@
167
181
  }
168
182
 
169
183
 
170
- ::slotted(:not([slot=media]):not([${L.NO_AUTOHIDE}])) {
184
+ ::slotted(:not([slot=media]):not([${T.NO_AUTOHIDE}])) {
171
185
  opacity: 1;
172
186
  transition: opacity 0.25s;
173
187
  }
174
188
 
175
189
 
176
- :host([${L.USER_INACTIVE}]:not([${o.MEDIA_PAUSED}]):not([${o.MEDIA_IS_CASTING}]):not([${L.AUDIO}])) ::slotted(:not([slot=media]):not([${L.NO_AUTOHIDE}])) {
190
+ :host([${T.USER_INACTIVE}]:not([${o.MEDIA_PAUSED}]):not([${o.MEDIA_IS_AIRPLAYING}]):not([${o.MEDIA_IS_CASTING}]):not([${T.AUDIO}])) ::slotted(:not([slot=media]):not([${T.NO_AUTOHIDE}])) {
177
191
  opacity: 0;
178
192
  transition: opacity 1s;
179
193
  }
180
194
 
195
+ :host([${T.USER_INACTIVE}]:not([${o.MEDIA_PAUSED}]):not([${o.MEDIA_IS_CASTING}]):not([${T.AUDIO}])) ::slotted([slot=media]) {
196
+ cursor: none;
197
+ }
198
+
181
199
  ::slotted(media-control-bar) {
182
200
  align-self: stretch;
183
201
  }
184
202
 
185
203
 
186
- :host(:not([${L.AUDIO}])[${o.MEDIA_HAS_PLAYED}]) slot[name=poster] {
204
+ :host(:not([${T.AUDIO}])[${o.MEDIA_HAS_PLAYED}]) slot[name=poster] {
187
205
  display: none;
188
206
  }
189
207
  </style>
@@ -200,7 +218,7 @@
200
218
 
201
219
  <slot part="bottom chrome"></slot>
202
220
  </span>
203
- `;var Yu=Object.values(o),Gu="sm:384 md:576 lg:768 xl:960";function Zu(i){for(let e of i)qu(e.target,e.contentRect.width)}function qu(i,e){var t;if(!i.isConnected)return;let a=(t=i.getAttribute(L.BREAKPOINTS))!=null?t:Gu,r=Qu(a),n=zu(r,e),s=!1;if(Object.keys(r).forEach(d=>{if(n.includes(d)){i.hasAttribute(`breakpoint${d}`)||(i.setAttribute(`breakpoint${d}`,""),s=!0);return}i.hasAttribute(`breakpoint${d}`)&&(i.removeAttribute(`breakpoint${d}`),s=!0)}),s){let d=new CustomEvent(He.BREAKPOINTS_CHANGE,{detail:n});i.dispatchEvent(d)}}function Qu(i){let e=i.split(/\s+/);return Object.fromEntries(e.map(t=>t.split(":")))}function zu(i,e){return Object.keys(i).filter(t=>e>=i[t])}var va=class extends l.HTMLElement{constructor(){super(),Ku(this,"breakpointsComputed",!1),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Qs.content.cloneNode(!0)));let e=u=>{let c=this.media;for(let h of u)h.type==="childList"&&(h.removedNodes.forEach(g=>{if(g.slot=="media"&&h.target==this){let v=h.previousSibling&&h.previousSibling.previousElementSibling;if(!v||!c)this.mediaUnsetCallback(g);else{let T=v.slot!=="media";for(;(v=v.previousSibling)!==null;)v.slot=="media"&&(T=!1);T&&this.mediaUnsetCallback(g)}}}),c&&h.addedNodes.forEach(g=>{g==c&&this.handleMediaUpdated(c).then(v=>this.mediaSetCallback(v))}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0});let a=!1,r=u=>{a||(setTimeout(()=>{Zu(u),a=!1,this.breakpointsComputed||(this.breakpointsComputed=!0,this.dispatchEvent(new CustomEvent(He.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))},0),a=!0)},n=new ResizeObserver(r);this.resizeObserver=n,n.observe(this);let s=this.media,d=this.querySelector(":scope > slot[slot=media]");d&&d.addEventListener("slotchange",()=>{if(!d.assignedElements({flatten:!0}).length){this.mediaUnsetCallback(s);return}this.media&&(s=this.media,this.handleMediaUpdated(this.media).then(c=>this.mediaSetCallback(c)))})}static get observedAttributes(){return[L.AUTOHIDE,L.GESTURES_DISABLED].concat(Yu).filter(e=>![o.MEDIA_RENDITION_LIST,o.MEDIA_AUDIO_TRACK_LIST].includes(e))}attributeChangedCallback(e,t,a){e.toLowerCase()==L.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return(e==null?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}mediaSetCallback(e){this._mediaClickPlayToggle=()=>{let t=e.paused?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(t,{composed:!0,bubbles:!0}))}}handleMediaUpdated(e){let t=n=>Promise.resolve(n),a=n=>(console.error('<media-chrome>: Media element set with slot="media" does not appear to be compatible.',n),Promise.reject(n));if(!e)return a(e);let r=e.nodeName.toLowerCase();return r.includes("-")?l.customElements.whenDefined(r).then(()=>t(e)):t(e)}mediaUnsetCallback(e){}connectedCallback(){var e;let a=this.getAttribute(L.AUDIO)!=null?Z.AUDIO_PLAYER():Z.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.media&&this.handleMediaUpdated(this.media).then(d=>this.mediaSetCallback(d)),this.setAttribute(L.USER_INACTIVE,"");let r=()=>{if(this.autohide<0||this.hasAttribute(L.USER_INACTIVE))return;this.setAttribute(L.USER_INACTIVE,"");let d=new l.CustomEvent(He.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(d)},n=()=>{if(!this.hasAttribute(L.USER_INACTIVE))return;this.removeAttribute(L.USER_INACTIVE);let d=new l.CustomEvent(He.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(d)},s=()=>{n(),clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=setTimeout(()=>{r()},this.autohide*1e3))};this.addEventListener("keyup",()=>{s()}),this.addEventListener("pointerup",d=>{d.pointerType==="touch"?[this,this.media].includes(d.target)&&!this.hasAttribute(L.USER_INACTIVE)?r():s():d.composedPath().some(u=>{var c;return["media-play-button","media-fullscreen-button"].includes((c=u==null?void 0:u.nodeName)==null?void 0:c.toLowerCase())})&&s()}),this.addEventListener("pointermove",d=>{n(),clearTimeout(this._inactiveTimeout),[this,this.media].includes(d.target)&&s()}),this.addEventListener("mouseleave",()=>{r()}),this.addEventListener("keyup",()=>{this.setAttribute(L.KEYBOARD_CONTROL,"")}),(e=l.window)==null||e.addEventListener("mouseup",()=>{this.removeAttribute(L.KEYBOARD_CONTROL)})}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return this._autohide===void 0?2:this._autohide}};var zs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},F=(i,e,t)=>(zs(i,e,"read from private field"),t?t.call(i):e.get(i)),fi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},fa=(i,e,t,a)=>(zs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),$t,Wt,ga,vt,$e,et,tt=class{constructor(e,t,{defaultValue:a}={defaultValue:void 0}){fi(this,$e),fi(this,$t,void 0),fi(this,Wt,void 0),fi(this,ga,void 0),fi(this,vt,new Set),fa(this,$t,e),fa(this,Wt,t),fa(this,ga,new Set(a))}[Symbol.iterator](){return F(this,$e,et).values()}get length(){return F(this,$e,et).size}get value(){var e;return(e=[...F(this,$e,et)].join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(fa(this,vt,new Set),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return[...F(this,$e,et)][e]}values(){return F(this,$e,et).values()}forEach(e){F(this,$e,et).forEach(e)}add(...e){var t,a;e.forEach(r=>F(this,vt).add(r)),!(this.value===""&&!((t=F(this,$t))!=null&&t.hasAttribute(`${F(this,Wt)}`)))&&((a=F(this,$t))==null||a.setAttribute(`${F(this,Wt)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>F(this,vt).delete(a)),(t=F(this,$t))==null||t.setAttribute(`${F(this,Wt)}`,`${this.value}`)}contains(e){return F(this,$e,et).has(e)}toggle(e,t){return typeof t!="undefined"?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}};$t=new WeakMap;Wt=new WeakMap;ga=new WeakMap;vt=new WeakMap;$e=new WeakSet;et=function(){return F(this,vt).size?F(this,vt):F(this,ga)};var Xs=(i="")=>i.split(/\s+/),Js=(i="")=>{let[e,t,a]=i.split(":"),r=a?decodeURIComponent(a):void 0;return e=e==="cc"?"captions":"subtitles",{kind:e,language:t,label:r}},gi=(i="",e={})=>Xs(i).map(t=>{let a=Js(t);return{...e,...a}}),Xu=i=>Array.isArray(i)?i.map(e=>typeof e=="string"?Js(e):e):typeof i=="string"?gi(i):[i],Aa=({kind:i,label:e,language:t}={kind:"subtitles"})=>e?`${i==="captions"?"cc":"sb"}:${t}:${encodeURIComponent(e)}`:t,ft=(i=[])=>Array.prototype.map.call(i,Aa).join(" "),Ju=(i,e)=>t=>t[i]===e,js=i=>{let e=Object.entries(i).map(([t,a])=>Ju(t,a));return t=>e.every(a=>a(t))},fn=(i,e=[],t=[])=>{let a=Xu(t).map(js),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=i})},_a=(i,e=()=>!0)=>{if(!(i!=null&&i.textTracks))return[];let t=typeof e=="function"?e:js(e);return Array.from(i.textTracks).filter(t)},gn=i=>!!i.getAttribute(o.MEDIA_SUBTITLES_SHOWING),We=(i,e)=>{var t,a;let r=gn(i);if(r||e===!1){let n=i.getAttribute(o.MEDIA_SUBTITLES_SHOWING);if(n){let s=new l.CustomEvent(b.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:n});i.dispatchEvent(s)}}else if(!r||e===!0){let[n]=(a=Xs((t=i.getAttribute(o.MEDIA_SUBTITLES_LIST))!=null?t:""))!=null?a:[];if(n){let s=new l.CustomEvent(b.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:n});i.dispatchEvent(s)}}else console.error("Attempting to enable captions or subtitles but none are available! Please verify your media content if this is unexpected.")};var B={enter:"requestFullscreen",exit:"exitFullscreen",rootEvents:["fullscreenchange"],mediaEvents:[],element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};m.fullscreenElement===void 0&&(B.enter="webkitRequestFullScreen",B.exit=m.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",B.rootEvents=["webkitfullscreenchange"],B.mediaEvents=["webkitbeginfullscreen","webkitendfullscreen"],B.element="webkitFullscreenElement",B.error="webkitfullscreenerror",B.enabled="webkitFullscreenEnabled");var ya,An=()=>{var i,e;return ya||(ya=(e=(i=m)==null?void 0:i.createElement)==null?void 0:e.call(i,"video"),ya)},el=async(i=An())=>{if(!i)return!1;let e=i.volume;return i.volume=e/2+.1,await la(0),i.volume!==e},ju=(i=An())=>typeof(i==null?void 0:i.requestPictureInPicture)=="function",ec=(i=An())=>{let e=m[B.enabled];return!e&&i&&(e="webkitSupportsFullscreen"in i),e},_n=ec(),tl=ju(),il=!!l.WebKitPlaybackTargetAvailabilityEvent,al=!!l.chrome;var Ta,rl=el().then(i=>(Ta=i,Ta)),tc=Object.values(pe),yn=i=>_a(i.media,e=>[Vt.SUBTITLES,Vt.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),ic=i=>_a(i.media,e=>e.mode===na.SHOWING&&[Vt.SUBTITLES,Vt.CAPTIONS].includes(e.kind)),j={MEDIA_PAUSED:{get:function(i){let{media:e}=i;return e?e.paused:!0},mediaEvents:["play","playing","pause","emptied"]},MEDIA_HAS_PLAYED:{get:function(i){let{media:e}=i;return e?!e.paused:!1},mediaEvents:["playing","emptied"]},MEDIA_ENDED:{get:function(i){let{media:e}=i;return e?e.ended:!1},mediaEvents:["seeked","ended","emptied"]},MEDIA_PLAYBACK_RATE:{get:function(i){let{media:e}=i;return!e||typeof e.playbackRate=="undefined"?1:e.playbackRate},mediaEvents:["ratechange","loadstart"]},MEDIA_MUTED:{get:function(i){let{media:e}=i;return!e||typeof e.muted=="undefined"?!1:e.muted},mediaEvents:["volumechange"]},MEDIA_VOLUME:{get:function(i){let{media:e}=i;return!e||typeof e.volume=="undefined"?1:Number(e.volume)},mediaEvents:["volumechange"]},MEDIA_VOLUME_LEVEL:{get:function(i){let{media:e}=i,t="high";if(!e||typeof e.volume=="undefined")return t;let{muted:a,volume:r}=e;return r===0||a?t="off":r<.5?t="low":r<.75&&(t="medium"),t},mediaEvents:["volumechange"]},MEDIA_CURRENT_TIME:{get:function(i){let{media:e}=i;return!e||typeof e.currentTime=="undefined"?0:e.currentTime},mediaEvents:["playing","pause","timeupdate","loadedmetadata"]},MEDIA_DURATION:{get:function(i){let{media:e}=i;return!e||!Number.isFinite(e.duration)?NaN:e.duration},mediaEvents:["durationchange","loadedmetadata","emptied"]},MEDIA_SEEKABLE:{get:function(i){var e;let{media:t}=i;if(!((e=t==null?void 0:t.seekable)!=null&&e.length))return;let a=t.seekable.start(0),r=t.seekable.end(t.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress"]},MEDIA_LOADING:{get:function(i){var e;return((e=i.media)==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},MEDIA_BUFFERED:{get:function(i){var e,t,a;let r=(e=i.media)==null?void 0:e.buffered;return Array.from((a=(t=i.media)==null?void 0:t.buffered)!=null?a:[]).map((n,s)=>[Number(r.start(s)).toFixed(3),Number(r.end(s)).toFixed(3)])},mediaEvents:["progress","emptied"]},MEDIA_STREAM_TYPE:{get:function(i){let{media:e}=i;if(!e)return;let{streamType:t}=e;if(tc.includes(t)){if(t===pe.UNKNOWN){let r=i.getAttribute("defaultstreamtype");return[pe.LIVE,pe.ON_DEMAND].includes(r)?r:void 0}return t}let a=e.duration;if(a===1/0)return pe.LIVE;if(Number.isFinite(a))return pe.ON_DEMAND;{let r=i.getAttribute("defaultstreamtype");if([pe.LIVE,pe.ON_DEMAND].includes(r))return r}},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},MEDIA_TARGET_LIVE_WINDOW:{get:function(i){let{media:e}=i;if(!e)return Number.NaN;let{targetLiveWindow:t}=e,a=j.MEDIA_STREAM_TYPE.get(i);return(t==null||Number.isNaN(t))&&a===pe.LIVE?0:t},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},MEDIA_TIME_IS_LIVE:{get:function(i){let{media:e}=i;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(j.MEDIA_STREAM_TYPE.get(i)==="live"))return!1;let a=e.seekable;if(!a)return!0;if(!a.length)return!1;let r=i.hasAttribute("liveedgeoffset")?Number(i.getAttribute("liveedgeoffset")):10,n=a.end(a.length-1)-r;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},MEDIA_IS_FULLSCREEN:{get:function(i,e){var t;let a=i.media;if(a&&m[B.element]===void 0&&"webkitDisplayingFullscreen"in a)return a.webkitDisplayingFullscreen&&a.webkitPresentationMode==="fullscreen";let r;return e?r=m[B.element]?e.target:null:r=(t=i.getRootNode().fullscreenElement)!=null?t:m[B.element],Et(i.fullscreenElement,r)},rootEvents:B.rootEvents,mediaEvents:B.mediaEvents},MEDIA_IS_PIP:{get:function(i,e){var t;let a=i.media;if(!a)return!1;if(e)return e.type=="enterpictureinpicture";{let r=(t=i.getRootNode().pictureInPictureElement)!=null?t:m.pictureInPictureElement;return Et(a,r)}},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},MEDIA_IS_CASTING:{get:function(i,e){var t;let{media:a}=i;if(!a)return!1;let r=(t=l.CastableVideoElement)==null?void 0:t.castElement,n=Et(a,r);return(e==null?void 0:e.type)==="castchange"&&(e==null?void 0:e.detail)==="CONNECTING"&&(n="connecting"),n},mediaEvents:["entercast","leavecast","castchange"]},MEDIA_AIRPLAY_UNAVAILABLE:{get:function(i,e){if(!il)return re.UNSUPPORTED;if(!!e&&e.availability!=="available"&&e.availability==="not-available")return re.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"]},MEDIA_CAST_UNAVAILABLE:{get:function(){var i;let e=(i=l.CastableVideoElement)==null?void 0:i.castState;if(!al||!e)return re.UNSUPPORTED;if(!e.includes("CONNECT"))return re.UNAVAILABLE},mediaEvents:["castchange"]},MEDIA_FULLSCREEN_UNAVAILABLE:{get:function(){return _n?void 0:re.UNAVAILABLE}},MEDIA_PIP_UNAVAILABLE:{get:function(){return tl?void 0:re.UNSUPPORTED}},MEDIA_RENDITION_UNAVAILABLE:{get:function(i){var e;let{media:t}=i;if(!(t!=null&&t.videoRenditions))return re.UNSUPPORTED;if(!((e=t.videoRenditions)!=null&&e.length))return re.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},MEDIA_AUDIO_TRACK_UNAVAILABLE:{get:function(i){var e,t;let{media:a}=i;if(!(a!=null&&a.audioTracks))return re.UNSUPPORTED;if(((t=(e=a.audioTracks)==null?void 0:e.length)!=null?t:0)<=1)return re.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},MEDIA_VOLUME_UNAVAILABLE:{get:function(i){if(Ta!==void 0&&!Ta)return re.UNSUPPORTED;let{media:e}=i;if(e&&typeof e.volume=="undefined")return re.UNAVAILABLE},mediaEvents:["loadstart"]},MEDIA_SUBTITLES_LIST:{get:function(i){return yn(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},MEDIA_SUBTITLES_SHOWING:{get:function(i){return i.hasAttribute("defaultsubtitles")&&!i.hasAttribute(o.MEDIA_HAS_PLAYED)&&!i.hasAttribute(o.MEDIA_SUBTITLES_SHOWING)&&We(i,!0),ic(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"]},MEDIA_RENDITION_LIST:{get:function(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.videoRenditions)!=null?e:[]]},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},MEDIA_RENDITION_SELECTED:{get:function(i){var e,t,a;let{media:r}=i;return(a=(t=r==null?void 0:r.videoRenditions)==null?void 0:t[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},MEDIA_AUDIO_TRACK_LIST:{get:function(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},MEDIA_AUDIO_TRACK_ENABLED:{get:function(i){var e,t;let{media:a}=i;return(t=[...(e=a==null?void 0:a.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:t.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]}},Ia={MEDIA_PLAY_REQUEST:(i,e,t)=>{var a;let r=j.MEDIA_STREAM_TYPE.get(t),n=t.getAttribute("noautoseektolive")===null;r==pe.LIVE&&n&&Ia.MEDIA_SEEK_TO_LIVE_REQUEST(i),(a=i.play())==null||a.catch(()=>{})},MEDIA_PAUSE_REQUEST:i=>i.pause(),MEDIA_MUTE_REQUEST:i=>i.muted=!0,MEDIA_UNMUTE_REQUEST:i=>{i.muted=!1,i.volume===0&&(i.volume=.25)},MEDIA_VOLUME_REQUEST:(i,e,t)=>{let a=e.detail;if(i.volume=a,a>0&&i.muted&&(i.muted=!1),!t.hasAttribute("novolumepref"))try{l.localStorage.setItem("media-chrome-pref-volume",a.toString())}catch{}},MEDIA_ENTER_FULLSCREEN_REQUEST:(i,e,t)=>{if(!_n){console.warn("Fullscreen support is unavailable; not entering fullscreen");return}m.pictureInPictureElement&&m.exitPictureInPicture(),t[B.enter]?t.fullscreenElement[B.enter]():i.webkitEnterFullscreen?i.webkitEnterFullscreen():i.requestFullscreen?i.requestFullscreen():console.warn("MediaChrome: Fullscreen not supported")},MEDIA_EXIT_FULLSCREEN_REQUEST:()=>{m[B.exit]()},MEDIA_ENTER_PIP_REQUEST:i=>{if(!m.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}m[B.element]&&m[B.exit]();let e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(t=>{if(t.code===11)if(i.readyState===0&&i.preload==="none"){let a=()=>{i.removeEventListener("loadedmetadata",r),i.preload="none"},r=()=>{i.requestPictureInPicture().catch(e),a()};i.addEventListener("loadedmetadata",r),i.preload="metadata",setTimeout(()=>{i.readyState===0&&e(),a()},1e3)}else throw t;else throw t})},MEDIA_EXIT_PIP_REQUEST:()=>{m.pictureInPictureElement&&m.exitPictureInPicture()},MEDIA_ENTER_CAST_REQUEST:i=>{var e;!((e=l.CastableVideoElement)!=null&&e.castEnabled)||(m[B.element]&&m[B.exit](),i.requestCast())},MEDIA_EXIT_CAST_REQUEST:async()=>{var i;(i=l.CastableVideoElement)!=null&&i.castElement&&l.CastableVideoElement.exitCast()},MEDIA_SEEK_REQUEST:(i,e)=>{let t=e.detail;(i.readyState>0||i.readyState===void 0)&&(i.currentTime=t)},MEDIA_PLAYBACK_RATE_REQUEST:(i,e)=>{i.playbackRate=e.detail},MEDIA_PREVIEW_REQUEST:(i,e,t)=>{var a;if(!i)return;let r=e.detail;r===null&&t.propagateMediaState(o.MEDIA_PREVIEW_TIME,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_TIME,r);let[n]=_a(i,{kind:Vt.METADATA,label:"thumbnails"});if(!(n&&n.cues))return;if(r===null){t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,void 0);return}let s=Array.prototype.find.call(n.cues,h=>h.startTime>=r);if(!s)return;let d=/'^(?:[a-z]+:)?\/\//i.test(s.text)||(a=i.querySelector('track[label="thumbnails"]'))==null?void 0:a.src,u=new URL(s.text,d),c=new URLSearchParams(u.hash).get("#xywh");t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,u.href),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,c.split(","))},MEDIA_SHOW_SUBTITLES_REQUEST:(i,e,t)=>{let a=yn(t),{detail:r=[]}=e;fn(na.SHOWING,a,r)},MEDIA_DISABLE_SUBTITLES_REQUEST:(i,e,t)=>{let a=yn(t),{detail:r=[]}=e;fn(na.DISABLED,a,r)},MEDIA_AIRPLAY_REQUEST:i=>{if(!!i){if(!(i.webkitShowPlaybackTargetPicker&&l.WebKitPlaybackTargetAvailabilityEvent)){console.warn("received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},MEDIA_SEEK_TO_LIVE_REQUEST:i=>{let e=i.seekable;if(!e){console.warn("MediaController: Media element does not support seeking to live.");return}if(!e.length){console.warn("MediaController: Media is unable to seek to live.");return}i.currentTime=e.end(e.length-1)},MEDIA_RENDITION_REQUEST:(i,e)=>{if(!(i!=null&&i.videoRenditions)){console.warn("MediaController: Rendition selection not supported by this media.");return}let t=e.detail,a=[...i.videoRenditions].findIndex(r=>r.id==t);i.videoRenditions.selectedIndex!=a&&(i.videoRenditions.selectedIndex=a)},MEDIA_AUDIO_TRACK_REQUEST:(i,e)=>{if(!(i!=null&&i.audioTracks)){console.warn("MediaController: Audio track selection not supported by this media.");return}let t=e.detail;for(let a of i.audioTracks)a.enabled=t==a.id}};var kn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},At=(i,e,t)=>(kn(i,e,"read from private field"),t?t.call(i):e.get(i)),ka=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},nl=(i,e,t,a)=>(kn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ft=(i,e,t)=>(kn(i,e,"access private method"),t),it,Ai,Kt,_i,Sa,Tn,cl=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],ac=10,ol=0,ee={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys"},Ca=class extends va{constructor(){super(),ka(this,Kt),ka(this,Sa),ka(this,it,new tt(this,ee.HOTKEYS)),ka(this,Ai,void 0),j.MEDIA_VOLUME_UNAVAILABLE.get(this)===void 0&&rl.then(()=>{this.propagateMediaState(o.MEDIA_VOLUME_UNAVAILABLE,j.MEDIA_VOLUME_UNAVAILABLE.get(this))}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this),Object.keys(Ia).forEach(e=>{let t=`_handle${oa(e,!0)}`;this[t]=a=>{if(a.stopPropagation(),!this.media){console.warn("MediaController: No media available.");return}Ia[e](this.media,a,this)},this.addEventListener(b[e],this[t])}),this._mediaStatePropagators={},Object.keys(j).forEach(e=>{this._mediaStatePropagators[e]=t=>{this.propagateMediaState(pt[e],j[e].get(this,t))}}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(ee.NO_HOTKEYS,ee.HOTKEYS,ee.DEFAULT_STREAM_TYPE,ee.DEFAULT_SUBTITLES)}get fullscreenElement(){var e;return(e=At(this,Ai))!=null?e:this}set fullscreenElement(e){this.hasAttribute(ee.FULLSCREEN_ELEMENT)&&this.removeAttribute(ee.FULLSCREEN_ELEMENT),nl(this,Ai,e)}attributeChangedCallback(e,t,a){var r;if(e===ee.NO_HOTKEYS)a!==t&&a===""?(this.hasAttribute(ee.HOTKEYS)&&console.warn("Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==t&&a===null&&this.enableHotkeys();else if(e===ee.HOTKEYS)At(this,it).value=a;else if(e===ee.DEFAULT_SUBTITLES&&a!==t&&a==="")We(this,!0);else if(e===ee.DEFAULT_STREAM_TYPE)this.propagateMediaState(pt.MEDIA_STREAM_TYPE);else if(e===ee.FULLSCREEN_ELEMENT){let n=a?(r=this.getRootNode())==null?void 0:r.getElementById(a):void 0;nl(this,Ai,n)}super.attributeChangedCallback(e,t,a)}mediaSetCallback(e){if(super.mediaSetCallback(e),e.hasAttribute("tabindex")||(e.tabIndex=-1),Object.keys(j).forEach(t=>{let{mediaEvents:a,rootEvents:r,textTracksEvents:n,videoRenditionsEvents:s,audioTracksEvents:d}=j[t],u=this._mediaStatePropagators[t];a==null||a.forEach(c=>{e.addEventListener(c,u),u()}),r==null||r.forEach(c=>{this.getRootNode().addEventListener(c,u),u()}),n==null||n.forEach(c=>{var h;(h=e.textTracks)==null||h.addEventListener(c,u),u()}),s==null||s.forEach(c=>{var h;(h=e.videoRenditions)==null||h.addEventListener(c,u),u()}),d==null||d.forEach(c=>{var h;(h=e.audioTracks)==null||h.addEventListener(c,u),u()})}),!this.hasAttribute("novolumepref"))try{let t=l.localStorage.getItem("media-chrome-pref-volume");t!==null&&(e.volume=t)}catch(t){console.debug("Error getting volume pref",t)}}mediaUnsetCallback(e){super.mediaUnsetCallback(e),Object.keys(j).forEach(t=>{let{mediaEvents:a,rootEvents:r,textTracksEvents:n,videoRenditionsEvents:s,audioTracksEvents:d}=j[t],u=this._mediaStatePropagators[t];a==null||a.forEach(c=>{e.removeEventListener(c,u)}),r==null||r.forEach(c=>{this.getRootNode().removeEventListener(c,u)}),n==null||n.forEach(c=>{var h;(h=e.textTracks)==null||h.removeEventListener(c,u)}),s==null||s.forEach(c=>{var h;(h=e.videoRenditions)==null||h.removeEventListener(c,u),u()}),d==null||d.forEach(c=>{var h;(h=e.audioTracks)==null||h.removeEventListener(c,u),u()})}),this.propagateMediaState(pt.MEDIA_PAUSED,!0)}propagateMediaState(e,t){let a=ul(this.mediaStateReceivers,e);if(dl(this.mediaStateReceivers,e,t),a===ul(this.mediaStateReceivers,e))return;let r=e.toLowerCase(),n=new l.CustomEvent(Rs[r],{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=dc(e,a,r);Object.keys(b).forEach(s=>{e.addEventListener(b[s],this[`_handle${oa(s,!0)}`])}),t.set(e,n)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(!t.has(e))return;t.get(e)(),t.delete(e),Object.keys(b).forEach(r=>{e.removeEventListener(b[r],this[`_handle${oa(r,!0)}`])})}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),Object.keys(j).forEach(r=>{let n=j[r];dl([e],pt[r],n.get(this))}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,a=t.indexOf(e);a<0||t.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",Ft(this,Sa,Tn))}disableHotkeys(){this.removeEventListener("keydown",Ft(this,Sa,Tn)),this.removeEventListener("keyup",Ft(this,Kt,_i))}get hotkeys(){return At(this,it)}keyboardShortcutHandler(e){var t,a,r,n;if(((n=(r=(t=e.target.getAttribute(ee.KEYS_USED))==null?void 0:t.split(" "))!=null?r:(a=e.target)==null?void 0:a.keysUsed)!=null?n:[]).map(T=>T==="Space"?" ":T).filter(Boolean).includes(e.key))return;let d,u,c,h,g,v=ac;if(!At(this,it).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&At(this,it).contains("nospace")))switch(e.key){case" ":case"k":d=this.getAttribute(o.MEDIA_PAUSED)!=null?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"m":d=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?b.MEDIA_UNMUTE_REQUEST:b.MEDIA_MUTE_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"f":d=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?b.MEDIA_EXIT_FULLSCREEN_REQUEST:b.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"c":We(this);break;case"ArrowLeft":u=this.getAttribute(o.MEDIA_CURRENT_TIME),c=u&&!Number.isNaN(+u)?+u:ol,h=Math.max(c-v,0),g=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(g);break;case"ArrowRight":u=this.getAttribute(o.MEDIA_CURRENT_TIME),c=u&&!Number.isNaN(+u)?+u:ol,h=Math.max(c+v,0),g=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(g);break;default:break}}};it=new WeakMap;Ai=new WeakMap;Kt=new WeakSet;_i=function(i){let{key:e}=i;if(!cl.includes(e)){this.removeEventListener("keyup",Ft(this,Kt,_i));return}this.keyboardShortcutHandler(i)};Sa=new WeakSet;Tn=function(i){let{metaKey:e,altKey:t,key:a}=i;if(e||t||!cl.includes(a)){this.removeEventListener("keyup",Ft(this,Kt,_i));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(At(this,it).contains(`no${a.toLowerCase()}`)||a===" "&&At(this,it).contains("nospace"))&&i.preventDefault(),this.addEventListener("keyup",Ft(this,Kt,_i),{once:!0})};var rc=Object.values(o),nc=Object.values(pt),Sn=i=>{var e,t,a,r;let{observedAttributes:n}=i.constructor;!n&&((e=i.nodeName)==null?void 0:e.includes("-"))&&(l.customElements.upgrade(i),{observedAttributes:n}=i.constructor);let s=(r=(a=(t=i==null?void 0:i.getAttribute)==null?void 0:t.call(i,A.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(d=>rc.includes(d)):[]},oc=i=>{var e,t;return((e=i.nodeName)==null?void 0:e.includes("-"))&&!!l.customElements.get((t=i.nodeName)==null?void 0:t.toLowerCase())&&!(i instanceof l.customElements.get(i.nodeName.toLowerCase()))&&l.customElements.upgrade(i),nc.some(a=>a in i)},In=i=>oc(i)||!!Sn(i).length,sl=i=>{var e;return(e=i==null?void 0:i.join)==null?void 0:e.call(i,":")},ll={[o.MEDIA_SUBTITLES_LIST]:ft,[o.MEDIA_SUBTITLES_SHOWING]:ft,[o.MEDIA_SEEKABLE]:sl,[o.MEDIA_BUFFERED]:i=>i==null?void 0:i.map(sl).join(" "),[o.MEDIA_PREVIEW_COORDS]:i=>i==null?void 0:i.join(" "),[o.MEDIA_RENDITION_LIST]:ws,[o.MEDIA_AUDIO_TRACK_LIST]:Ds},sc=async(i,e,t)=>{var a,r;if(i.isConnected||await la(0),typeof t=="boolean"||t==null)return R(i,e,t);if(typeof t=="number")return D(i,e,t);if(typeof t=="string")return C(i,e,t);if(Array.isArray(t)&&!t.length)return i.removeAttribute(e);let n=(r=(a=ll[e])==null?void 0:a.call(ll,t))!=null?r:t;return i.setAttribute(e,n)},lc=i=>{var e;return!!((e=i.closest)!=null&&e.call(i,'*[slot="media"]'))},gt=(i,e)=>{if(lc(i))return;let t=(r,n)=>{var s,d;In(r)&&n(r);let{children:u=[]}=r!=null?r:{},c=(d=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?d:[];[...u,...c].forEach(g=>gt(g,n))},a=i==null?void 0:i.nodeName.toLowerCase();if(a.includes("-")&&!In(i)){l.customElements.whenDefined(a).then(()=>{t(i,e)});return}t(i,e)},dl=(i,e,t)=>{i.forEach(a=>{if(e in a){a[e]=t;return}let r=Sn(a),n=e.toLowerCase();!r.includes(n)||sc(a,n,t)})},ul=(i,e)=>{for(let t of i){if(e in t)return t[e];let a=Sn(t),r=e.toLowerCase();if(!!a.includes(r))return t.getAttribute(r)}},dc=(i,e,t)=>{gt(i,e);let a=h=>{var g;let v=(g=h==null?void 0:h.composedPath()[0])!=null?g:h.target;e(v)},r=h=>{var g;let v=(g=h==null?void 0:h.composedPath()[0])!=null?g:h.target;t(v)};i.addEventListener(b.REGISTER_MEDIA_STATE_RECEIVER,a),i.addEventListener(b.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=h=>{h.forEach(g=>{let{addedNodes:v=[],removedNodes:T=[],type:H,target:Y,attributeName:I}=g;H==="childList"?(Array.prototype.forEach.call(v,ie=>gt(ie,e)),Array.prototype.forEach.call(T,ie=>gt(ie,t))):H==="attributes"&&I===A.MEDIA_CHROME_ATTRIBUTES&&(In(Y)?e(Y):t(Y))})},s=[],d=h=>{let g=h.target;g.name!=="media"&&(s.forEach(v=>gt(v,t)),s=[...g.assignedElements({flatten:!0})],s.forEach(v=>gt(v,e)))};i.addEventListener("slotchange",d);let u=new MutationObserver(n);return u.observe(i,{childList:!0,attributes:!0,subtree:!0}),()=>{gt(i,t),i.removeEventListener("slotchange",d),u.disconnect(),i.removeEventListener(b.REGISTER_MEDIA_STATE_RECEIVER,a),i.removeEventListener(b.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};l.customElements.get("media-controller")||l.customElements.define("media-controller",Ca);var Cn=Ca;var On=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Fe=(i,e,t)=>(On(i,e,"read from private field"),t?t.call(i):e.get(i)),be=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},yi=(i,e,t,a)=>(On(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ce=(i,e,t)=>(On(i,e,"access private method"),t),Me,Da,Ma,La,Ra,Mn,wa,Ln,xa,Nn,Rn,ml,wn,hl,xn,pl,Dn,bl,El=m.createElement("template");El.innerHTML=`
221
+ `;var fc=Object.values(o),vc="sm:384 md:576 lg:768 xl:960";function gc(i){Ac(i.target,i.contentRect.width)}function Ac(i,e){var t;if(!i.isConnected)return;let a=(t=i.getAttribute(T.BREAKPOINTS))!=null?t:vc,r=_c(a),n=yc(r,e),s=!1;if(Object.keys(r).forEach(d=>{if(n.includes(d)){i.hasAttribute(`breakpoint${d}`)||(i.setAttribute(`breakpoint${d}`,""),s=!0);return}i.hasAttribute(`breakpoint${d}`)&&(i.removeAttribute(`breakpoint${d}`),s=!0)}),s){let d=new CustomEvent(Fe.BREAKPOINTS_CHANGE,{detail:n});i.dispatchEvent(d)}}function _c(i){let e=i.split(/\s+/);return Object.fromEntries(e.map(t=>t.split(":")))}function yc(i,e){return Object.keys(i).filter(t=>e>=i[t])}var La=class extends l.HTMLElement{constructor(){super(),At(this,Pn),At(this,Bn),At(this,Ci),At(this,wa),At(this,Zt),At(this,Ma,0),At(this,it,void 0),Ec(this,"breakpointsComputed",!1),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Il.content.cloneNode(!0)));let e=s=>{let d=this.media;for(let u of s)u.type==="childList"&&(u.removedNodes.forEach(h=>{if(h.slot=="media"&&u.target==this){let m=u.previousSibling&&u.previousSibling.previousElementSibling;if(!m||!d)this.mediaUnsetCallback(h);else{let p=m.slot!=="media";for(;(m=m.previousSibling)!==null;)m.slot=="media"&&(p=!1);p&&this.mediaUnsetCallback(h)}}}),d&&u.addedNodes.forEach(h=>{h===d&&d!==Si(this,it)&&this.handleMediaUpdated(d).then(m=>this.mediaSetCallback(m))}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0});let a=!1;ki(this,s=>{a||(setTimeout(()=>{gc(s),a=!1,this.breakpointsComputed||(this.breakpointsComputed=!0,this.dispatchEvent(new CustomEvent(Fe.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))},0),a=!0)});let n=this.querySelector(":scope > slot[slot=media]");n&&n.addEventListener("slotchange",()=>{if(!n.assignedElements({flatten:!0}).length){this.mediaUnsetCallback(Si(this,it));return}this.media&&this.media!==Si(this,it)&&this.handleMediaUpdated(this.media).then(d=>this.mediaSetCallback(d))})}static get observedAttributes(){return[T.AUTOHIDE,T.GESTURES_DISABLED].concat(fc).filter(e=>![o.MEDIA_RENDITION_LIST,o.MEDIA_AUDIO_TRACK_LIST].includes(e))}attributeChangedCallback(e,t,a){e.toLowerCase()==T.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return(e==null?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){Un(this,it,e);let t=a=>(Un(this,it,null),console.error('Media Chrome: Media element set with slot="media" does not appear to be compatible.',a),Promise.reject(a));return e?(e.localName.includes("-")&&await l.customElements.whenDefined(e.localName),e):t(e)}connectedCallback(){var e;let a=this.getAttribute(T.AUDIO)!=null?q.AUDIO_PLAYER():q.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.media&&this.media!==Si(this,it)&&this.handleMediaUpdated(this.media).then(r=>this.mediaSetCallback(r)),this.setAttribute(T.USER_INACTIVE,""),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),(e=l.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;this.media&&this.mediaUnsetCallback(this.media),(e=l.window)==null||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){}handleEvent(e){switch(e.type){case"pointerdown":Un(this,Ma,e.timeStamp);break;case"pointermove":ve(this,Pn,yl).call(this,e);break;case"pointerup":ve(this,Bn,Tl).call(this,e);break;case"mouseleave":ve(this,Ci,Ra).call(this);break;case"mouseup":this.removeAttribute(T.KEYBOARD_CONTROL);break;case"keyup":ve(this,Zt,Mi).call(this),this.setAttribute(T.KEYBOARD_CONTROL,"");break}}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return this._autohide===void 0?2:this._autohide}};Ma=new WeakMap;it=new WeakMap;Pn=new WeakSet;yl=function(i){i.pointerType!=="mouse"&&i.timeStamp-Si(this,Ma)<250||(ve(this,wa,Hn).call(this),clearTimeout(this._inactiveTimeout),[this,this.media].includes(i.target)&&ve(this,Zt,Mi).call(this))};Bn=new WeakSet;Tl=function(i){if(i.pointerType==="touch"){let e=!this.hasAttribute(T.USER_INACTIVE);[this,this.media].includes(i.target)&&e?ve(this,Ci,Ra).call(this):ve(this,Zt,Mi).call(this)}else i.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e==null?void 0:e.localName))&&ve(this,Zt,Mi).call(this)};Ci=new WeakSet;Ra=function(){if(this.autohide<0||this.hasAttribute(T.USER_INACTIVE))return;this.setAttribute(T.USER_INACTIVE,"");let i=new l.CustomEvent(Fe.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(i)};wa=new WeakSet;Hn=function(){if(!this.hasAttribute(T.USER_INACTIVE))return;this.removeAttribute(T.USER_INACTIVE);let i=new l.CustomEvent(Fe.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(i)};Zt=new WeakSet;Mi=function(){ve(this,wa,Hn).call(this),clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=setTimeout(()=>{ve(this,Ci,Ra).call(this)},this.autohide*1e3))};var kl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},K=(i,e,t)=>(kl(i,e,"read from private field"),t?t.call(i):e.get(i)),Li=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},xa=(i,e,t,a)=>(kl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),qt,Qt,Da,_t,Ke,at,rt=class{constructor(e,t,{defaultValue:a}={defaultValue:void 0}){Li(this,Ke),Li(this,qt,void 0),Li(this,Qt,void 0),Li(this,Da,void 0),Li(this,_t,new Set),xa(this,qt,e),xa(this,Qt,t),xa(this,Da,new Set(a))}[Symbol.iterator](){return K(this,Ke,at).values()}get length(){return K(this,Ke,at).size}get value(){var e;return(e=[...K(this,Ke,at)].join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(xa(this,_t,new Set),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return[...K(this,Ke,at)][e]}values(){return K(this,Ke,at).values()}forEach(e){K(this,Ke,at).forEach(e)}add(...e){var t,a;e.forEach(r=>K(this,_t).add(r)),!(this.value===""&&!((t=K(this,qt))!=null&&t.hasAttribute(`${K(this,Qt)}`)))&&((a=K(this,qt))==null||a.setAttribute(`${K(this,Qt)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>K(this,_t).delete(a)),(t=K(this,qt))==null||t.setAttribute(`${K(this,Qt)}`,`${this.value}`)}contains(e){return K(this,Ke,at).has(e)}toggle(e,t){return typeof t!="undefined"?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}};qt=new WeakMap;Qt=new WeakMap;Da=new WeakMap;_t=new WeakMap;Ke=new WeakSet;at=function(){return K(this,_t).size?K(this,_t):K(this,Da)};var Tc=(i="")=>i.split(/\s+/),Sl=(i="")=>{let[e,t,a]=i.split(":"),r=a?decodeURIComponent(a):void 0;return e=e==="cc"?"captions":"subtitles",{kind:e,language:t,label:r}},Ri=(i="",e={})=>Tc(i).map(t=>{let a=Sl(t);return{...e,...a}}),$n=i=>Array.isArray(i)?i.map(e=>typeof e=="string"?Sl(e):e):typeof i=="string"?Ri(i):[i],Oa=({kind:i,label:e,language:t}={kind:"subtitles"})=>e?`${i==="captions"?"cc":"sb"}:${t}:${encodeURIComponent(e)}`:t,yt=(i=[])=>Array.prototype.map.call(i,Oa).join(" "),Ic=(i,e)=>t=>t[i]===e,Cl=i=>{let e=Object.entries(i).map(([t,a])=>Ic(t,a));return t=>e.every(a=>a(t))},wi=(i,e=[],t=[])=>{let a=$n(t).map(Cl),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=i})},Na=(i,e=()=>!0)=>{if(!(i!=null&&i.textTracks))return[];let t=typeof e=="function"?e:Cl(e);return Array.from(i.textTracks).filter(t)},Ml=i=>!!i.getAttribute(o.MEDIA_SUBTITLES_SHOWING);var B={enter:"requestFullscreen",exit:"exitFullscreen",rootEvents:["fullscreenchange"],mediaEvents:[],element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};c.fullscreenElement===void 0&&(B.enter="webkitRequestFullScreen",B.exit=c.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",B.rootEvents=["webkitfullscreenchange"],B.mediaEvents=["webkitbeginfullscreen","webkitendfullscreen"],B.element="webkitFullscreenElement",B.error="webkitfullscreenerror",B.enabled="webkitFullscreenEnabled");var Ua,Wn=()=>{var i,e;return Ua||(Ua=(e=(i=c)==null?void 0:i.createElement)==null?void 0:e.call(i,"video"),Ua)},Ll=async(i=Wn())=>{if(!i)return!1;let e=i.volume;return i.volume=e/2+.1,await ga(0),i.volume!==e},kc=(i=Wn())=>typeof(i==null?void 0:i.requestPictureInPicture)=="function",Sc=(i=Wn())=>{let e=c[B.enabled];return!e&&i&&(e="webkitSupportsFullscreen"in i),e},Fn=Sc(),Rl=kc(),wl=!!l.WebKitPlaybackTargetAvailabilityEvent,xl=!!l.chrome;var Ba,Dl=Ll().then(i=>(Ba=i,Ba)),Cc=Object.values(fe),Pa=i=>Na(i.media,e=>[Kt.SUBTITLES,Kt.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),Ol=i=>Na(i.media,e=>e.mode===Yt.SHOWING&&[Kt.SUBTITLES,Kt.CAPTIONS].includes(e.kind)),ie={MEDIA_PAUSED:{get:function(i){let{media:e}=i;return e?e.paused:!0},mediaEvents:["play","playing","pause","emptied"]},MEDIA_HAS_PLAYED:{get:function(i){let{media:e}=i;return e?!e.paused:!1},mediaEvents:["playing","emptied"]},MEDIA_ENDED:{get:function(i){let{media:e}=i;return e?e.ended:!1},mediaEvents:["seeked","ended","emptied"]},MEDIA_PLAYBACK_RATE:{get:function(i){let{media:e}=i;return!e||typeof e.playbackRate=="undefined"?1:e.playbackRate},mediaEvents:["ratechange","loadstart"]},MEDIA_MUTED:{get:function(i){let{media:e}=i;return!e||typeof e.muted=="undefined"?!1:e.muted},mediaEvents:["volumechange"]},MEDIA_VOLUME:{get:function(i){let{media:e}=i;return!e||typeof e.volume=="undefined"?1:Number(e.volume)},mediaEvents:["volumechange"]},MEDIA_VOLUME_LEVEL:{get:function(i){let{media:e}=i,t="high";if(!e||typeof e.volume=="undefined")return t;let{muted:a,volume:r}=e;return r===0||a?t="off":r<.5?t="low":r<.75&&(t="medium"),t},mediaEvents:["volumechange"]},MEDIA_CURRENT_TIME:{get:function(i){let{media:e}=i;return!e||typeof e.currentTime=="undefined"?0:e.currentTime},mediaEvents:["playing","pause","timeupdate","loadedmetadata"]},MEDIA_DURATION:{get:function(i){let{media:e}=i;return i.hasAttribute("defaultduration")&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?+i.getAttribute("defaultduration"):!e||!Number.isFinite(e.duration)?Number.NaN:e.duration},mediaEvents:["durationchange","loadedmetadata","emptied"]},MEDIA_SEEKABLE:{get:function(i){var e;let{media:t}=i;if(!((e=t==null?void 0:t.seekable)!=null&&e.length))return;let a=t.seekable.start(0),r=t.seekable.end(t.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress"]},MEDIA_LOADING:{get:function(i){var e;return((e=i.media)==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},MEDIA_BUFFERED:{get:function(i){var e,t,a;let r=(e=i.media)==null?void 0:e.buffered;return Array.from((a=(t=i.media)==null?void 0:t.buffered)!=null?a:[]).map((n,s)=>[Number(r.start(s)).toFixed(3),Number(r.end(s)).toFixed(3)])},mediaEvents:["progress","emptied"]},MEDIA_STREAM_TYPE:{get:function(i){let{media:e}=i;if(!e)return;let{streamType:t}=e;if(Cc.includes(t)){if(t===fe.UNKNOWN){let r=i.getAttribute("defaultstreamtype");return[fe.LIVE,fe.ON_DEMAND].includes(r)?r:void 0}return t}let a=e.duration;if(a===1/0)return fe.LIVE;if(Number.isFinite(a))return fe.ON_DEMAND;{let r=i.getAttribute("defaultstreamtype");if([fe.LIVE,fe.ON_DEMAND].includes(r))return r}},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},MEDIA_TARGET_LIVE_WINDOW:{get:function(i){let{media:e}=i;if(!e)return Number.NaN;let{targetLiveWindow:t}=e,a=ie.MEDIA_STREAM_TYPE.get(i);return(t==null||Number.isNaN(t))&&a===fe.LIVE?0:t},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},MEDIA_TIME_IS_LIVE:{get:function(i){let{media:e}=i;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(ie.MEDIA_STREAM_TYPE.get(i)==="live"))return!1;let a=e.seekable;if(!a)return!0;if(!a.length)return!1;let r=i.hasAttribute("liveedgeoffset")?Number(i.getAttribute("liveedgeoffset")):10,n=a.end(a.length-1)-r;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},MEDIA_IS_FULLSCREEN:{get:function(i,e){var t,a;let r=i.media;if(r&&c[B.element]===void 0&&"webkitDisplayingFullscreen"in r)return r.webkitDisplayingFullscreen&&r.webkitPresentationMode==="fullscreen";let n;return e?n=c[B.element]?e.target:null:n=(a=(t=nl(i))==null?void 0:t.fullscreenElement)!=null?a:c[B.element],je(i.fullscreenElement,n)},rootEvents:B.rootEvents,mediaEvents:B.mediaEvents},MEDIA_IS_PIP:{get:function(i,e){var t;let a=i.media;if(!a)return!1;if(e)return e.type=="enterpictureinpicture";{let r=(t=i.getRootNode().pictureInPictureElement)!=null?t:c.pictureInPictureElement;return je(a,r)}},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},MEDIA_IS_AIRPLAYING:{get:function(i){var e;let{media:t}=i;return!(t!=null&&t.remote)||((e=t.remote)==null?void 0:e.state)==="disconnected"?!1:t.remote.state},remoteEvents:["playing","connect","connecting","disconnect"]},MEDIA_IS_CASTING:{get:function(i){var e;let{media:t}=i;return!(t!=null&&t.remote)||((e=t.remote)==null?void 0:e.state)==="disconnected"?!1:t.remote.state},remoteEvents:["connect","connecting","disconnect"]},MEDIA_AIRPLAY_UNAVAILABLE:{get:function(i,{availability:e=!1}={}){if(!wl)return oe.UNSUPPORTED;if(!(e==null||e===!0))return oe.UNAVAILABLE},mediaSetCallback(i,e){var t;(t=i.remote)==null||t.watchAvailability(a=>e({availability:a}))},mediaUnsetCallback(i){var e;(e=i.remote)==null||e.cancelWatchAvailability()}},MEDIA_CAST_UNAVAILABLE:{get:function(i,{availability:e=!1}={}){var t;let{media:a}=i;if(!xl||!((t=a==null?void 0:a.remote)!=null&&t.state))return oe.UNSUPPORTED;if(!(e==null||e===!0))return oe.UNAVAILABLE},mediaSetCallback(i,e){var t;(t=i.remote)==null||t.watchAvailability(a=>e({availability:a}))},mediaUnsetCallback(i){var e;(e=i.remote)==null||e.cancelWatchAvailability()}},MEDIA_FULLSCREEN_UNAVAILABLE:{get:function(){return Fn?void 0:oe.UNAVAILABLE}},MEDIA_PIP_UNAVAILABLE:{get:function(){return Rl?void 0:oe.UNSUPPORTED}},MEDIA_RENDITION_UNAVAILABLE:{get:function(i){var e;let{media:t}=i;if(!(t!=null&&t.videoRenditions))return oe.UNSUPPORTED;if(!((e=t.videoRenditions)!=null&&e.length))return oe.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},MEDIA_AUDIO_TRACK_UNAVAILABLE:{get:function(i){var e,t;let{media:a}=i;if(!(a!=null&&a.audioTracks))return oe.UNSUPPORTED;if(((t=(e=a.audioTracks)==null?void 0:e.length)!=null?t:0)<=1)return oe.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},MEDIA_VOLUME_UNAVAILABLE:{get:function(i){if(Ba!==void 0&&!Ba)return oe.UNSUPPORTED;let{media:e}=i;if(e&&typeof e.volume=="undefined")return oe.UNAVAILABLE},mediaEvents:["loadstart"]},MEDIA_SUBTITLES_LIST:{get:function(i){return Pa(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},MEDIA_SUBTITLES_SHOWING:{get:function(i){return i.hasAttribute("defaultsubtitles")&&!i.hasAttribute(o.MEDIA_HAS_PLAYED)&&!i.hasAttribute(o.MEDIA_SUBTITLES_SHOWING)&&xi.MEDIA_TOGGLE_SUBTITLES_REQUEST(void 0,void 0,i),Ol(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"]},MEDIA_RENDITION_LIST:{get:function(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.videoRenditions)!=null?e:[]]},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},MEDIA_RENDITION_SELECTED:{get:function(i){var e,t,a;let{media:r}=i;return(a=(t=r==null?void 0:r.videoRenditions)==null?void 0:t[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},MEDIA_AUDIO_TRACK_LIST:{get:function(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},MEDIA_AUDIO_TRACK_ENABLED:{get:function(i){var e,t;let{media:a}=i;return(t=[...(e=a==null?void 0:a.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:t.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]}},xi={MEDIA_PLAY_REQUEST:(i,e,t)=>{var a;let r=ie.MEDIA_STREAM_TYPE.get(t),n=t.getAttribute("noautoseektolive")===null;r==fe.LIVE&&n&&xi.MEDIA_SEEK_TO_LIVE_REQUEST(i),(a=i.play())==null||a.catch(()=>{})},MEDIA_PAUSE_REQUEST:i=>i.pause(),MEDIA_MUTE_REQUEST:i=>i.muted=!0,MEDIA_UNMUTE_REQUEST:i=>{i.muted=!1,i.volume===0&&(i.volume=.25)},MEDIA_VOLUME_REQUEST:(i,e,t)=>{let a=e.detail;if(i.volume=a,a>0&&i.muted&&(i.muted=!1),!t.hasAttribute("novolumepref"))try{l.localStorage.setItem("media-chrome-pref-volume",a.toString())}catch{}},MEDIA_ENTER_FULLSCREEN_REQUEST:(i,e,t)=>{if(!Fn){console.warn("MediaChrome: Fullscreen support is unavailable; not entering fullscreen");return}c.pictureInPictureElement&&c.exitPictureInPicture(),t[B.enter]?t.fullscreenElement[B.enter]():i.webkitEnterFullscreen?i.webkitEnterFullscreen():i.requestFullscreen?i.requestFullscreen():console.warn("MediaChrome: Fullscreen not supported")},MEDIA_EXIT_FULLSCREEN_REQUEST:()=>{c[B.exit]()},MEDIA_ENTER_PIP_REQUEST:i=>{if(!c.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}c[B.element]&&c[B.exit]();let e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(t=>{if(t.code===11)if(i.readyState===0&&i.preload==="none"){let a=()=>{i.removeEventListener("loadedmetadata",r),i.preload="none"},r=()=>{i.requestPictureInPicture().catch(e),a()};i.addEventListener("loadedmetadata",r),i.preload="metadata",setTimeout(()=>{i.readyState===0&&e(),a()},1e3)}else throw t;else throw t})},MEDIA_EXIT_PIP_REQUEST:()=>{c.pictureInPictureElement&&c.exitPictureInPicture()},MEDIA_ENTER_CAST_REQUEST:async i=>{var e;if(((e=i.remote)==null?void 0:e.state)==="disconnected"){if(c[B.element]&&c[B.exit](),!i.remote.prompt){console.warn("MediaChrome: Casting is not supported in this environment");return}try{await i.remote.prompt()}catch{}}},MEDIA_EXIT_CAST_REQUEST:i=>{var e;((e=i.remote)==null?void 0:e.state)==="connected"&&i.remote.prompt()},MEDIA_SEEK_REQUEST:(i,e)=>{let t=e.detail;(i.readyState>0||i.readyState===void 0)&&(i.currentTime=t)},MEDIA_PLAYBACK_RATE_REQUEST:(i,e)=>{i.playbackRate=e.detail},MEDIA_PREVIEW_REQUEST:(i,e,t)=>{var a;if(!i)return;let r=e.detail;r===null&&t.propagateMediaState(o.MEDIA_PREVIEW_TIME,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_TIME,r);let[n]=Na(i,{kind:Kt.METADATA,label:"thumbnails"});if(!(n&&n.cues))return;if(r===null){t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,void 0);return}let s=Array.prototype.find.call(n.cues,m=>m.startTime>=r);if(!s)return;let d=/'^(?:[a-z]+:)?\/\//i.test(s.text)||(a=i.querySelector('track[label="thumbnails"]'))==null?void 0:a.src,u=new URL(s.text,d),h=new URLSearchParams(u.hash).get("#xywh");t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,u.href),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,h.split(","))},MEDIA_SHOW_SUBTITLES_REQUEST:(i,e,t)=>{var a;let r=Pa(t),{detail:n=[]}=e,s=$n(n),d=(a=s[0])==null?void 0:a.language;d&&!(t!=null&&t.hasAttribute("nosubtitleslangpref"))&&l.localStorage.setItem("media-chrome-pref-subtitles-lang",d),wi(Yt.SHOWING,r,s)},MEDIA_DISABLE_SUBTITLES_REQUEST:(i,e,t)=>{let a=Pa(t),{detail:r=[]}=e;wi(Yt.DISABLED,a,r)},MEDIA_TOGGLE_SUBTITLES_REQUEST:(i,e,t)=>{let{detail:a}=e!=null?e:{},r=Pa(t),n=Ol(t),s=!!n.length;if(!(!r.length||s&&a||!s&&a===!1))if(s)wi(Yt.DISABLED,r,n);else{let d=r[0];if(!(t!=null&&t.hasAttribute("nosubtitleslangpref"))){let p=l.localStorage.getItem("media-chrome-pref-subtitles-lang"),E=p?[p,...l.navigator.languages]:l.navigator.languages,I=r.filter(H=>E.some(k=>H.language.toLowerCase().startsWith(k.split("-")[0]))).sort((H,k)=>{let $=E.findIndex(ee=>H.language.toLowerCase().startsWith(ee.split("-")[0])),Z=E.findIndex(ee=>k.language.toLowerCase().startsWith(ee.split("-")[0]));return $-Z});I[0]&&(d=I[0])}let{language:u,label:h,kind:m}=d;wi(Yt.SHOWING,r,[{language:u,label:h,kind:m}])}},MEDIA_AIRPLAY_REQUEST:async i=>{if(i!=null&&i.remote){if(!i.remote.prompt){console.warn("MediaChrome: AirPlay is not supported in this environment");return}try{await i.remote.prompt()}catch{}}},MEDIA_SEEK_TO_LIVE_REQUEST:i=>{let e=i.seekable;if(!e){console.warn("MediaChrome: Media element does not support seeking to live.");return}if(!e.length){console.warn("MediaChrome: Media is unable to seek to live.");return}i.currentTime=e.end(e.length-1)},MEDIA_RENDITION_REQUEST:(i,e)=>{if(!(i!=null&&i.videoRenditions)){console.warn("MediaChrome: Rendition selection not supported by this media.");return}let t=e.detail,a=[...i.videoRenditions].findIndex(r=>r.id==t);i.videoRenditions.selectedIndex!=a&&(i.videoRenditions.selectedIndex=a)},MEDIA_AUDIO_TRACK_REQUEST:(i,e)=>{if(!(i!=null&&i.audioTracks)){console.warn("MediaChrome: Audio track selection not supported by this media.");return}let t=e.detail;for(let a of i.audioTracks)a.enabled=t==a.id}};var Zn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Me=(i,e,t)=>(Zn(i,e,"read from private field"),t?t.call(i):e.get(i)),Di=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Kn=(i,e,t,a)=>(Zn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Xt=(i,e,t)=>(Zn(i,e,"access private method"),t),nt,Oi,zt,Jt,Ni,Va,Yn,Hl=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],Mc=10,Nl=0,X={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys"},Ha=class extends La{constructor(){super(),Di(this,Jt),Di(this,Va),Di(this,nt,new rt(this,X.HOTKEYS)),Di(this,Oi,void 0),Di(this,zt,void 0),ie.MEDIA_VOLUME_UNAVAILABLE.get(this)===void 0&&Dl.then(()=>{this.propagateMediaState(o.MEDIA_VOLUME_UNAVAILABLE,ie.MEDIA_VOLUME_UNAVAILABLE.get(this))}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this),Object.keys(xi).forEach(e=>{let t=`_handle${fa(e,!0)}`;this[t]=a=>{if(a.stopPropagation(),!this.media){console.warn("MediaController: No media available.");return}xi[e](this.media,a,this)},this.addEventListener(f[e],this[t])}),this._mediaStatePropagators={},Object.keys(ie).forEach(e=>{this._mediaStatePropagators[e]=t=>{this.propagateMediaState(vt[e],ie[e].get(this,t))}})}static get observedAttributes(){return super.observedAttributes.concat(X.NO_HOTKEYS,X.HOTKEYS,X.DEFAULT_STREAM_TYPE,X.DEFAULT_SUBTITLES,X.DEFAULT_DURATION)}get fullscreenElement(){var e;return(e=Me(this,Oi))!=null?e:this}set fullscreenElement(e){this.hasAttribute(X.FULLSCREEN_ELEMENT)&&this.removeAttribute(X.FULLSCREEN_ELEMENT),Kn(this,Oi,e)}attributeChangedCallback(e,t,a){var r;if(super.attributeChangedCallback(e,t,a),e===X.NO_HOTKEYS)a!==t&&a===""?(this.hasAttribute(X.HOTKEYS)&&console.warn("Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==t&&a===null&&this.enableHotkeys();else if(e===X.HOTKEYS)Me(this,nt).value=a;else if(e===X.DEFAULT_SUBTITLES&&a!==t&&a==="")this.dispatchEvent(new l.CustomEvent(f.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:!0}));else if(e===X.DEFAULT_STREAM_TYPE)this.propagateMediaState(vt.MEDIA_STREAM_TYPE);else if(e===X.FULLSCREEN_ELEMENT){let n=a?(r=Me(this,zt))==null?void 0:r.getElementById(a):void 0;Kn(this,Oi,n)}}connectedCallback(){super.connectedCallback(),Kn(this,zt,this.getRootNode()),this.enableHotkeys()}disconnectedCallback(){super.disconnectedCallback(),this.disableHotkeys(),this.dispatchEvent(new l.CustomEvent(f.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:!1}))}mediaSetCallback(e){if(super.mediaSetCallback(e),e.hasAttribute("tabindex")||(e.tabIndex=-1),Object.keys(ie).forEach(t=>{let{mediaSetCallback:a,mediaEvents:r,rootEvents:n,textTracksEvents:s,videoRenditionsEvents:d,audioTracksEvents:u,remoteEvents:h}=ie[t],m=this._mediaStatePropagators[t];a&&(a(e,m),m()),r==null||r.forEach(p=>{e.addEventListener(p,m),m()}),n==null||n.forEach(p=>{var E;(E=Me(this,zt))==null||E.addEventListener(p,m),m()}),s==null||s.forEach(p=>{var E;(E=e.textTracks)==null||E.addEventListener(p,m),m()}),d==null||d.forEach(p=>{var E;(E=e.videoRenditions)==null||E.addEventListener(p,m),m()}),u==null||u.forEach(p=>{var E;(E=e.audioTracks)==null||E.addEventListener(p,m),m()}),h==null||h.forEach(p=>{var E;(E=e.remote)==null||E.addEventListener(p,m),m()})}),!this.hasAttribute("novolumepref"))try{let t=l.localStorage.getItem("media-chrome-pref-volume");t!==null&&(e.volume=t)}catch(t){console.debug("Error getting volume pref",t)}}mediaUnsetCallback(e){super.mediaUnsetCallback(e),Object.keys(ie).forEach(t=>{let{mediaUnsetCallback:a,mediaEvents:r,rootEvents:n,textTracksEvents:s,videoRenditionsEvents:d,audioTracksEvents:u,remoteEvents:h}=ie[t],m=this._mediaStatePropagators[t];r==null||r.forEach(p=>{e.removeEventListener(p,m)}),n==null||n.forEach(p=>{var E;(E=Me(this,zt))==null||E.removeEventListener(p,m)}),s==null||s.forEach(p=>{var E;(E=e.textTracks)==null||E.removeEventListener(p,m)}),d==null||d.forEach(p=>{var E;(E=e.videoRenditions)==null||E.removeEventListener(p,m),m()}),u==null||u.forEach(p=>{var E;(E=e.audioTracks)==null||E.removeEventListener(p,m),m()}),h==null||h.forEach(p=>{var E;(E=e.remote)==null||E.removeEventListener(p,m),m()}),a&&(a(e,m),m())}),this.propagateMediaState(vt.MEDIA_PAUSED,!0)}propagateMediaState(e,t){let a=Vl(this.mediaStateReceivers,e);if(Bl(this.mediaStateReceivers,e,t),a===Vl(this.mediaStateReceivers,e))return;let r=e.toLowerCase(),n=new l.CustomEvent(Xs[r],{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=Oc(e,a,r);Object.keys(f).forEach(s=>{e.addEventListener(f[s],this[`_handle${fa(s,!0)}`])}),t.set(e,n)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(!t.has(e))return;t.get(e)(),t.delete(e),Object.keys(f).forEach(r=>{e.removeEventListener(f[r],this[`_handle${fa(r,!0)}`])})}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),Object.keys(ie).forEach(r=>{let n=ie[r];Bl([e],vt[r],n.get(this))}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,a=t.indexOf(e);a<0||t.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",Xt(this,Va,Yn))}disableHotkeys(){this.removeEventListener("keydown",Xt(this,Va,Yn)),this.removeEventListener("keyup",Xt(this,Jt,Ni))}get hotkeys(){return Me(this,nt)}keyboardShortcutHandler(e){var t,a,r,n;if(((n=(r=(t=e.target.getAttribute(X.KEYS_USED))==null?void 0:t.split(" "))!=null?r:(a=e.target)==null?void 0:a.keysUsed)!=null?n:[]).map(I=>I==="Space"?" ":I).filter(Boolean).includes(e.key))return;let d,u,h,m,p,E=Mc;if(!Me(this,nt).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&Me(this,nt).contains("nospace")))switch(e.key){case" ":case"k":d=this.getAttribute(o.MEDIA_PAUSED)!=null?f.MEDIA_PLAY_REQUEST:f.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"m":d=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?f.MEDIA_UNMUTE_REQUEST:f.MEDIA_MUTE_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"f":d=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?f.MEDIA_EXIT_FULLSCREEN_REQUEST:f.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new l.CustomEvent(f.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":u=this.getAttribute(o.MEDIA_CURRENT_TIME),h=u&&!Number.isNaN(+u)?+u:Nl,m=Math.max(h-E,0),p=new l.CustomEvent(f.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:m}),this.dispatchEvent(p);break;case"ArrowRight":u=this.getAttribute(o.MEDIA_CURRENT_TIME),h=u&&!Number.isNaN(+u)?+u:Nl,m=Math.max(h+E,0),p=new l.CustomEvent(f.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:m}),this.dispatchEvent(p);break;default:break}}};nt=new WeakMap;Oi=new WeakMap;zt=new WeakMap;Jt=new WeakSet;Ni=function(i){let{key:e}=i;if(!Hl.includes(e)){this.removeEventListener("keyup",Xt(this,Jt,Ni));return}this.keyboardShortcutHandler(i)};Va=new WeakSet;Yn=function(i){let{metaKey:e,altKey:t,key:a}=i;if(e||t||!Hl.includes(a)){this.removeEventListener("keyup",Xt(this,Jt,Ni));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(Me(this,nt).contains(`no${a.toLowerCase()}`)||a===" "&&Me(this,nt).contains("nospace"))&&i.preventDefault(),this.addEventListener("keyup",Xt(this,Jt,Ni),{once:!0})};var Lc=Object.values(o),Rc=Object.values(vt),qn=i=>{var e,t,a,r;let{observedAttributes:n}=i.constructor;!n&&((e=i.nodeName)!=null&&e.includes("-"))&&(l.customElements.upgrade(i),{observedAttributes:n}=i.constructor);let s=(r=(a=(t=i==null?void 0:i.getAttribute)==null?void 0:t.call(i,A.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(d=>Lc.includes(d)):[]},wc=i=>{var e,t;return(e=i.nodeName)!=null&&e.includes("-")&&l.customElements.get((t=i.nodeName)==null?void 0:t.toLowerCase())&&!(i instanceof l.customElements.get(i.nodeName.toLowerCase()))&&l.customElements.upgrade(i),Rc.some(a=>a in i)},Gn=i=>wc(i)||!!qn(i).length,Ul=i=>{var e;return(e=i==null?void 0:i.join)==null?void 0:e.call(i,":")},Pl={[o.MEDIA_SUBTITLES_LIST]:yt,[o.MEDIA_SUBTITLES_SHOWING]:yt,[o.MEDIA_SEEKABLE]:Ul,[o.MEDIA_BUFFERED]:i=>i==null?void 0:i.map(Ul).join(" "),[o.MEDIA_PREVIEW_COORDS]:i=>i==null?void 0:i.join(" "),[o.MEDIA_RENDITION_LIST]:Js,[o.MEDIA_AUDIO_TRACK_LIST]:el},xc=async(i,e,t)=>{var a,r;if(i.isConnected||await ga(0),typeof t=="boolean"||t==null)return C(i,e,t);if(typeof t=="number")return O(i,e,t);if(typeof t=="string")return R(i,e,t);if(Array.isArray(t)&&!t.length)return i.removeAttribute(e);let n=(r=(a=Pl[e])==null?void 0:a.call(Pl,t))!=null?r:t;return i.setAttribute(e,n)},Dc=i=>{var e;return!!((e=i.closest)!=null&&e.call(i,'*[slot="media"]'))},Tt=(i,e)=>{if(Dc(i))return;let t=(r,n)=>{var s,d;Gn(r)&&n(r);let{children:u=[]}=r!=null?r:{},h=(d=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?d:[];[...u,...h].forEach(p=>Tt(p,n))},a=i==null?void 0:i.nodeName.toLowerCase();if(a.includes("-")&&!Gn(i)){l.customElements.whenDefined(a).then(()=>{t(i,e)});return}t(i,e)},Bl=(i,e,t)=>{i.forEach(a=>{if(e in a){a[e]=t;return}let r=qn(a),n=e.toLowerCase();r.includes(n)&&xc(a,n,t)})},Vl=(i,e)=>{for(let t of i){if(e in t)return t[e];let a=qn(t),r=e.toLowerCase();if(a.includes(r))return t.getAttribute(r)}},Oc=(i,e,t)=>{Tt(i,e);let a=m=>{var p;let E=(p=m==null?void 0:m.composedPath()[0])!=null?p:m.target;e(E)},r=m=>{var p;let E=(p=m==null?void 0:m.composedPath()[0])!=null?p:m.target;t(E)};i.addEventListener(f.REGISTER_MEDIA_STATE_RECEIVER,a),i.addEventListener(f.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=m=>{m.forEach(p=>{let{addedNodes:E=[],removedNodes:I=[],type:H,target:k,attributeName:$}=p;H==="childList"?(Array.prototype.forEach.call(E,Z=>Tt(Z,e)),Array.prototype.forEach.call(I,Z=>Tt(Z,t))):H==="attributes"&&$===A.MEDIA_CHROME_ATTRIBUTES&&(Gn(k)?e(k):t(k))})},s=[],d=m=>{let p=m.target;p.name!=="media"&&(s.forEach(E=>Tt(E,t)),s=[...p.assignedElements({flatten:!0})],s.forEach(E=>Tt(E,e)))};i.addEventListener("slotchange",d);let u=new MutationObserver(n);return u.observe(i,{childList:!0,attributes:!0,subtree:!0}),()=>{Tt(i,t),i.removeEventListener("slotchange",d),u.disconnect(),i.removeEventListener(f.REGISTER_MEDIA_STATE_RECEIVER,a),i.removeEventListener(f.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};l.customElements.get("media-controller")||l.customElements.define("media-controller",Ha);var Qn=Ha;var io=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ge=(i,e,t)=>(io(i,e,"read from private field"),t?t.call(i):e.get(i)),se=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},It=(i,e,t,a)=>(io(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Le=(i,e,t)=>(io(i,e,"access private method"),t),Re,qa,Ya,Ga,$a,Wa,Fa,zn,Ka,Xn,Za,ao,Jn,$l,jn,Wl,eo,Fl,to,Kl,Yl=c.createElement("template");Yl.innerHTML=`
204
222
  <style>
205
223
  :host {
206
224
  --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
@@ -235,19 +253,31 @@
235
253
  background: var(--media-control-hover-background, rgb(50 50 70 / .7));
236
254
  }
237
255
 
256
+ #leftgap {
257
+ padding-left: var(--media-range-padding-left, var(--_media-range-padding));
258
+ }
259
+
260
+ #rightgap {
261
+ padding-right: var(--media-range-padding-right, var(--_media-range-padding));
262
+ }
263
+
264
+ #startpoint,
265
+ #endpoint {
266
+ position: absolute;
267
+ }
268
+
269
+ #endpoint {
270
+ right: 0;
271
+ }
272
+
238
273
  #container {
239
274
 
240
- width: calc(
241
- var(--media-range-track-width, 100%)
242
- - var(--media-range-padding-left, var(--_media-range-padding))
243
- - var(--media-range-padding-right, var(--_media-range-padding)));
244
- transform: translate(
245
- calc(var(--media-range-track-translate-x, 0px) + var(--media-range-padding-left, var(--_media-range-padding))),
246
- var(--media-range-track-translate-y, 0px));
275
+ width: var(--media-range-track-width, 100%);
276
+ transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));
277
+ position: relative;
247
278
  height: 100%;
248
279
  display: flex;
249
280
  align-items: center;
250
- position: relative;
251
281
  min-width: 40px;
252
282
  }
253
283
 
@@ -311,6 +341,7 @@
311
341
  #background {
312
342
  background: var(--media-range-track-background, rgb(255 255 255 / .2));
313
343
  backdrop-filter: var(--media-range-track-background-backdrop-filter);
344
+ -webkit-backdrop-filter: var(--media-range-track-background-backdrop-filter);
314
345
  }
315
346
 
316
347
  #track {
@@ -318,6 +349,7 @@
318
349
  outline: var(--media-range-track-outline);
319
350
  outline-offset: var(--media-range-track-outline-offset);
320
351
  backdrop-filter: var(--media-range-track-backdrop-filter);
352
+ -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
321
353
  box-shadow: var(--media-range-track-box-shadow, none);
322
354
  overflow: hidden;
323
355
  }
@@ -373,7 +405,10 @@
373
405
  background-color: #777;
374
406
  }
375
407
  </style>
408
+ <div id="leftgap"></div>
376
409
  <div id="container">
410
+ <div id="startpoint"></div>
411
+ <div id="endpoint"></div>
377
412
  <div id="appearance">
378
413
  <div id="background"></div>
379
414
  <div id="track">
@@ -385,7 +420,8 @@
385
420
  </div>
386
421
  <input id="range" type="range" min="0" max="1" step="any" value="0">
387
422
  </div>
388
- `;var _t=class extends l.HTMLElement{constructor(){super(),be(this,Ra),be(this,wa),be(this,xa),be(this,Rn),be(this,wn),be(this,xn),be(this,Dn),be(this,Me,void 0),be(this,Da,void 0),be(this,Ma,()=>{if(this.range.matches(":focus-visible")){let{style:t}=N(this.shadowRoot,":host");t.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),be(this,La,()=>{let{style:t}=N(this.shadowRoot,":host");t.removeProperty("--_focus-visible-box-shadow")}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(El.content.cloneNode(!0)));let{style:e}=N(this.shadowRoot,":host");e.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.container=this.shadowRoot.querySelector("#container"),this.range=this.shadowRoot.querySelector("#range")}static get observedAttributes(){return["disabled","aria-disabled",A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=Fe(this,Me))==null?void 0:r.unassociateElement)==null||n.call(r,this),yi(this,Me,null)),a&&this.isConnected&&(yi(this,Me,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Fe(this,Me))==null?void 0:d.associateElement)==null||u.call(d,this))):(e==="disabled"||e==="aria-disabled"&&t!==a)&&(a==null?(this.range.removeAttribute(e),Ce(this,Ra,Mn).call(this)):(this.range.setAttribute(e,a),Ce(this,wa,Ln).call(this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(yi(this,Me,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Fe(this,Me))==null?void 0:t.associateElement)==null||a.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",Fe(this,Ma)),this.shadowRoot.addEventListener("focusout",Fe(this,La)),Ce(this,Ra,Mn).call(this)}disconnectedCallback(){var e,t;Ce(this,wa,Ln).call(this),(t=(e=Fe(this,Me))==null?void 0:e.unassociateElement)==null||t.call(e,this),yi(this,Me,null),this.shadowRoot.removeEventListener("focusin",Fe(this,Ma)),this.shadowRoot.removeEventListener("focusout",Fe(this,La))}updatePointerBar(e){let t=this.range.getBoundingClientRect(),a=(e.clientX-t.left)/t.width;a=Math.max(0,Math.min(1,a))*100;let{style:r}=N(this.shadowRoot,"#pointer");r.setProperty("width",`${a}%`)}updateBar(){let e=this.range.valueAsNumber*100,t=N(this.shadowRoot,"#progress"),a=N(this.shadowRoot,"#thumb");t.style.setProperty("width",`${e}%`),a.style.setProperty("left",`${e}%`)}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"input":this.updateBar();break;case"pointerenter":Ce(this,Rn,ml).call(this,e);break;case"pointerdown":Ce(this,xa,Nn).call(this,e);break;case"pointermove":Ce(this,Dn,bl).call(this,e);break;case"pointerup":Ce(this,wn,hl).call(this);break;case"pointerleave":Ce(this,xn,pl).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};Me=new WeakMap;Da=new WeakMap;Ma=new WeakMap;La=new WeakMap;Ra=new WeakSet;Mn=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};wa=new WeakSet;Ln=function(){var i,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),(i=l.window)==null||i.removeEventListener("pointerup",this),(e=l.window)==null||e.removeEventListener("pointermove",this)};xa=new WeakSet;Nn=function(i){var e;yi(this,Da,i.composedPath().includes(this.range)),(e=l.window)==null||e.addEventListener("pointerup",this)};Rn=new WeakSet;ml=function(i){var e;i.pointerType!=="mouse"&&Ce(this,xa,Nn).call(this,i),this.addEventListener("pointerleave",this),(e=l.window)==null||e.addEventListener("pointermove",this)};wn=new WeakSet;hl=function(){var i;(i=l.window)==null||i.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};xn=new WeakSet;pl=function(){var i;this.removeEventListener("pointerleave",this),(i=l.window)==null||i.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};Dn=new WeakSet;bl=function(i){if(this.toggleAttribute("dragging",i.buttons===1||i.pointerType!=="mouse"),this.updatePointerBar(i),this.dragging&&(i.pointerType!=="mouse"||!Fe(this,Da))){this.range.disabled=!0;let e=this.range.getBoundingClientRect(),t=(i.clientX-e.left)/e.width;t=Math.max(0,Math.min(1,t)),this.range.valueAsNumber=t,this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}};l.customElements.get("media-chrome-range")||l.customElements.define("media-chrome-range",_t);var vl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Oa=(i,e,t)=>(vl(i,e,"read from private field"),t?t.call(i):e.get(i)),uc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Na=(i,e,t,a)=>(vl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Le,fl=m.createElement("template");fl.innerHTML=`
423
+ <div id="rightgap"></div>
424
+ `;var kt=class extends l.HTMLElement{constructor(){super(),se(this,Fa),se(this,Ka),se(this,Za),se(this,Jn),se(this,jn),se(this,eo),se(this,to),se(this,Re,void 0),se(this,qa,void 0),se(this,Ya,void 0),se(this,Ga,void 0),se(this,$a,()=>{if(this.range.matches(":focus-visible")){let{style:t}=N(this.shadowRoot,":host");t.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),se(this,Wa,()=>{let{style:t}=N(this.shadowRoot,":host");t.removeProperty("--_focus-visible-box-shadow")}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Yl.content.cloneNode(!0)));let{style:e}=N(this.shadowRoot,":host");e.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.container=this.shadowRoot.querySelector("#container"),It(this,Ya,this.shadowRoot.querySelector("#startpoint")),It(this,Ga,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range")}static get observedAttributes(){return["disabled","aria-disabled",A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=ge(this,Re))==null?void 0:r.unassociateElement)==null||n.call(r,this),It(this,Re,null)),a&&this.isConnected&&(It(this,Re,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=ge(this,Re))==null?void 0:d.associateElement)==null||u.call(d,this))):(e==="disabled"||e==="aria-disabled"&&t!==a)&&(a==null?(this.range.removeAttribute(e),Le(this,Fa,zn).call(this)):(this.range.setAttribute(e,a),Le(this,Ka,Xn).call(this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(It(this,Re,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=ge(this,Re))==null?void 0:t.associateElement)==null||a.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",ge(this,$a)),this.shadowRoot.addEventListener("focusout",ge(this,Wa)),Le(this,Fa,zn).call(this)}disconnectedCallback(){var e,t;Le(this,Ka,Xn).call(this),(t=(e=ge(this,Re))==null?void 0:e.unassociateElement)==null||t.call(e,this),It(this,Re,null),this.shadowRoot.removeEventListener("focusin",ge(this,$a)),this.shadowRoot.removeEventListener("focusout",ge(this,Wa))}updatePointerBar(e){let t=this.range.getBoundingClientRect(),a=(e.clientX-t.left)/t.width;a=Math.max(0,Math.min(1,a))*100;let{style:r}=N(this.shadowRoot,"#pointer");r.setProperty("width",`${a}%`)}updateBar(){let e=this.range.valueAsNumber*100,t=N(this.shadowRoot,"#progress"),a=N(this.shadowRoot,"#thumb");t.style.setProperty("width",`${e}%`),a.style.setProperty("left",`${e}%`)}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"input":this.updateBar();break;case"pointerenter":Le(this,Jn,$l).call(this,e);break;case"pointerdown":Le(this,Za,ao).call(this,e);break;case"pointermove":Le(this,to,Kl).call(this,e);break;case"pointerup":Le(this,jn,Wl).call(this);break;case"pointerleave":Le(this,eo,Fl).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};Re=new WeakMap;qa=new WeakMap;Ya=new WeakMap;Ga=new WeakMap;$a=new WeakMap;Wa=new WeakMap;Fa=new WeakSet;zn=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};Ka=new WeakSet;Xn=function(){var i,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),(i=l.window)==null||i.removeEventListener("pointerup",this),(e=l.window)==null||e.removeEventListener("pointermove",this)};Za=new WeakSet;ao=function(i){var e;It(this,qa,i.composedPath().includes(this.range)),(e=l.window)==null||e.addEventListener("pointerup",this)};Jn=new WeakSet;$l=function(i){var e;i.pointerType!=="mouse"&&Le(this,Za,ao).call(this,i),this.addEventListener("pointerleave",this),(e=l.window)==null||e.addEventListener("pointermove",this)};jn=new WeakSet;Wl=function(){var i;(i=l.window)==null||i.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};eo=new WeakSet;Fl=function(){var i;this.removeEventListener("pointerleave",this),(i=l.window)==null||i.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};to=new WeakSet;Kl=function(i){if(this.toggleAttribute("dragging",i.buttons===1||i.pointerType!=="mouse"),this.updatePointerBar(i),this.dragging&&(i.pointerType!=="mouse"||!ge(this,qa))){this.range.disabled=!0;let e=sl(i.clientX,i.clientY,ge(this,Ya).getBoundingClientRect(),ge(this,Ga).getBoundingClientRect());e=Math.max(0,Math.min(1,e)),this.range.valueAsNumber=e,this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}};l.customElements.get("media-chrome-range")||l.customElements.define("media-chrome-range",kt);var Gl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Qa=(i,e,t)=>(Gl(i,e,"read from private field"),t?t.call(i):e.get(i)),Nc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},za=(i,e,t,a)=>(Gl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),we,Zl=c.createElement("template");Zl.innerHTML=`
389
425
  <style>
390
426
  :host {
391
427
 
@@ -407,7 +443,7 @@
407
443
  </style>
408
444
 
409
445
  <slot></slot>
410
- `;var Un=class extends l.HTMLElement{constructor(){super(),uc(this,Le,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(fl.content.cloneNode(!0)))}static get observedAttributes(){return[A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Oa(this,Le))==null?void 0:r.unassociateElement)==null||n.call(r,this),Na(this,Le,null)),a&&this.isConnected&&(Na(this,Le,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Oa(this,Le))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Na(this,Le,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Oa(this,Le))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Oa(this,Le))==null?void 0:e.unassociateElement)==null||t.call(e,this),Na(this,Le,null)}};Le=new WeakMap;l.customElements.get("media-control-bar")||l.customElements.define("media-control-bar",Un);var gl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ua=(i,e,t)=>(gl(i,e,"read from private field"),t?t.call(i):e.get(i)),cc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Pa=(i,e,t,a)=>(gl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Re,Al=m.createElement("template");Al.innerHTML=`
446
+ `;var ro=class extends l.HTMLElement{constructor(){super(),Nc(this,we,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Zl.content.cloneNode(!0)))}static get observedAttributes(){return[A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Qa(this,we))==null?void 0:r.unassociateElement)==null||n.call(r,this),za(this,we,null)),a&&this.isConnected&&(za(this,we,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Qa(this,we))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(za(this,we,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Qa(this,we))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Qa(this,we))==null?void 0:e.unassociateElement)==null||t.call(e,this),za(this,we,null)}};we=new WeakMap;l.customElements.get("media-control-bar")||l.customElements.define("media-control-bar",ro);var ql=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Xa=(i,e,t)=>(ql(i,e,"read from private field"),t?t.call(i):e.get(i)),Uc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ja=(i,e,t,a)=>(ql(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),xe,Ql=c.createElement("template");Ql.innerHTML=`
411
447
  <style>
412
448
  :host {
413
449
  font: var(--media-font,
@@ -440,11 +476,11 @@
440
476
  }
441
477
  </style>
442
478
  <slot></slot>
443
- `;var Ke=class extends l.HTMLElement{constructor(){super(),cc(this,Re,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Al.content.cloneNode(!0)));let{style:e}=N(this.shadowRoot,":host");e.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`)}static get observedAttributes(){return[A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Ua(this,Re))==null?void 0:r.unassociateElement)==null||n.call(r,this),Pa(this,Re,null)),a&&this.isConnected&&(Pa(this,Re,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Ua(this,Re))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Pa(this,Re,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Ua(this,Re))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Ua(this,Re))==null?void 0:e.unassociateElement)==null||t.call(e,this),Pa(this,Re,null)}};Re=new WeakMap;l.customElements.get("media-text-display")||l.customElements.define("media-text-display",Ke);var yl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_l=(i,e,t)=>(yl(i,e,"read from private field"),t?t.call(i):e.get(i)),mc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},hc=(i,e,t,a)=>(yl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ti,Pn=class extends Ke{constructor(){super(),mc(this,Ti,void 0),hc(this,Ti,this.shadowRoot.querySelector("slot")),_l(this,Ti).textContent=ke(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_DURATION]}attributeChangedCallback(e,t,a){e===o.MEDIA_DURATION&&(_l(this,Ti).textContent=ke(a)),super.attributeChangedCallback(e,t,a)}get mediaDuration(){return S(this,o.MEDIA_DURATION)}set mediaDuration(e){D(this,o.MEDIA_DURATION,e)}};Ti=new WeakMap;l.customElements.get("media-duration-display")||l.customElements.define("media-duration-display",Pn);var Sl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Bn=(i,e,t)=>(Sl(i,e,"read from private field"),t?t.call(i):e.get(i)),pc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},bc=(i,e,t,a)=>(Sl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Yt,Ee={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Tl=[...Object.values(Ee),o.MEDIA_CURRENT_TIME,o.MEDIA_DURATION,o.MEDIA_SEEKABLE],Il=["Enter"," "],Ec="&nbsp;/&nbsp;",kl=(i,{timesSep:e=Ec}={})=>{var t,a,r,n;let s=i.hasAttribute(Ee.REMAINING),d=i.hasAttribute(Ee.SHOW_DURATION),u=(t=i.mediaCurrentTime)!=null?t:0,[,c]=(a=i.mediaSeekable)!=null?a:[],h=(n=(r=i.mediaDuration)!=null?r:c)!=null?n:0,g=s?ke(0-(h-u)):ke(u);return d?`${g}${e}${ke(h)}`:g},vc="video not loaded, unknown time.",fc=i=>{var e;let t=i.mediaCurrentTime,[,a]=(e=i.mediaSeekable)!=null?e:[],r=i.mediaDuration||a;if(t==null||r==null){i.setAttribute("aria-valuetext",vc);return}let n=i.hasAttribute(Ee.REMAINING),s=i.hasAttribute(Ee.SHOW_DURATION),d=n?bt(0-(r-t)):bt(t);if(!s){i.setAttribute("aria-valuetext",d);return}let u=bt(r),c=`${d} of ${u}`;i.setAttribute("aria-valuetext",c)},Vn=class extends Ke{constructor(){super(),pc(this,Yt,void 0),bc(this,Yt,this.shadowRoot.querySelector("slot")),Bn(this,Yt).innerHTML=`${kl(this)}`;let{style:e}=N(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","pointer"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))")}static get observedAttributes(){return[...super.observedAttributes,...Tl,"disabled"]}connectedCallback(){this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",Z.PLAYBACK_TIME());let e=t=>{let{key:a}=t;if(!Il.includes(a)){this.removeEventListener("keyup",e);return}this.toggleTimeDisplay()};this.addEventListener("keydown",t=>{let{metaKey:a,altKey:r,key:n}=t;if(a||r||!Il.includes(n)){this.removeEventListener("keyup",e);return}this.addEventListener("keyup",e)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,t,a){Tl.includes(e)?this.update():e==="disabled"&&a!==t&&(a==null?this.enable():this.disable()),super.attributeChangedCallback(e,t,a)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return x(this,Ee.REMAINING)}set remaining(e){R(this,Ee.REMAINING,e)}get showDuration(){return x(this,Ee.SHOW_DURATION)}set showDuration(e){R(this,Ee.SHOW_DURATION,e)}get noToggle(){return x(this,Ee.NO_TOGGLE)}set noToggle(e){R(this,Ee.NO_TOGGLE,e)}get mediaDuration(){return S(this,o.MEDIA_DURATION)}set mediaDuration(e){D(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return S(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(!!e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}update(){let e=kl(this);fc(this),e!==Bn(this,Yt).innerHTML&&(Bn(this,Yt).innerHTML=e)}};Yt=new WeakMap;l.customElements.get("media-time-display")||l.customElements.define("media-time-display",Vn);var gc=`<svg aria-hidden="true" viewBox="0 0 26 24">
479
+ `;var Ye=class extends l.HTMLElement{constructor(){super(),Uc(this,xe,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ql.content.cloneNode(!0)));let{style:e}=N(this.shadowRoot,":host");e.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`)}static get observedAttributes(){return[A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Xa(this,xe))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ja(this,xe,null)),a&&this.isConnected&&(Ja(this,xe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Xa(this,xe))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Ja(this,xe,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Xa(this,xe))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Xa(this,xe))==null?void 0:e.unassociateElement)==null||t.call(e,this),Ja(this,xe,null)}};xe=new WeakMap;l.customElements.get("media-text-display")||l.customElements.define("media-text-display",Ye);var Xl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},zl=(i,e,t)=>(Xl(i,e,"read from private field"),t?t.call(i):e.get(i)),Pc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Bc=(i,e,t,a)=>(Xl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ui,no=class extends Ye{constructor(){super(),Pc(this,Ui,void 0),Bc(this,Ui,this.shadowRoot.querySelector("slot")),zl(this,Ui).textContent=Se(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_DURATION]}attributeChangedCallback(e,t,a){e===o.MEDIA_DURATION&&(zl(this,Ui).textContent=Se(a)),super.attributeChangedCallback(e,t,a)}get mediaDuration(){return M(this,o.MEDIA_DURATION)}set mediaDuration(e){O(this,o.MEDIA_DURATION,e)}};Ui=new WeakMap;l.customElements.get("media-duration-display")||l.customElements.define("media-duration-display",no);var td=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},oo=(i,e,t)=>(td(i,e,"read from private field"),t?t.call(i):e.get(i)),Vc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Hc=(i,e,t,a)=>(td(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),jt,Ae={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Jl=[...Object.values(Ae),o.MEDIA_CURRENT_TIME,o.MEDIA_DURATION,o.MEDIA_SEEKABLE],jl=["Enter"," "],$c="&nbsp;/&nbsp;",ed=(i,{timesSep:e=$c}={})=>{var t,a,r,n;let s=i.hasAttribute(Ae.REMAINING),d=i.hasAttribute(Ae.SHOW_DURATION),u=(t=i.mediaCurrentTime)!=null?t:0,[,h]=(a=i.mediaSeekable)!=null?a:[],m=(n=(r=i.mediaDuration)!=null?r:h)!=null?n:0,p=s?Se(0-(m-u)):Se(u);return d?`${p}${e}${Se(m)}`:p},Wc="video not loaded, unknown time.",Fc=i=>{var e;let t=i.mediaCurrentTime,[,a]=(e=i.mediaSeekable)!=null?e:[],r=i.mediaDuration||a;if(t==null||r==null){i.setAttribute("aria-valuetext",Wc);return}let n=i.hasAttribute(Ae.REMAINING),s=i.hasAttribute(Ae.SHOW_DURATION),d=n?gt(0-(r-t)):gt(t);if(!s){i.setAttribute("aria-valuetext",d);return}let u=gt(r),h=`${d} of ${u}`;i.setAttribute("aria-valuetext",h)},so=class extends Ye{constructor(){super(),Vc(this,jt,void 0),Hc(this,jt,this.shadowRoot.querySelector("slot")),oo(this,jt).innerHTML=`${ed(this)}`;let{style:e}=N(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","pointer"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))")}static get observedAttributes(){return[...super.observedAttributes,...Jl,"disabled"]}connectedCallback(){this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",q.PLAYBACK_TIME());let e=t=>{let{key:a}=t;if(!jl.includes(a)){this.removeEventListener("keyup",e);return}this.toggleTimeDisplay()};this.addEventListener("keydown",t=>{let{metaKey:a,altKey:r,key:n}=t;if(a||r||!jl.includes(n)){this.removeEventListener("keyup",e);return}this.addEventListener("keyup",e)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,t,a){Jl.includes(e)?this.update():e==="disabled"&&a!==t&&(a==null?this.enable():this.disable()),super.attributeChangedCallback(e,t,a)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return L(this,Ae.REMAINING)}set remaining(e){C(this,Ae.REMAINING,e)}get showDuration(){return L(this,Ae.SHOW_DURATION)}set showDuration(e){C(this,Ae.SHOW_DURATION,e)}get noToggle(){return L(this,Ae.NO_TOGGLE)}set noToggle(e){C(this,Ae.NO_TOGGLE,e)}get mediaDuration(){return M(this,o.MEDIA_DURATION)}set mediaDuration(e){O(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return M(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){O(this,o.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}update(){let e=ed(this);Fc(this),e!==oo(this,jt).innerHTML&&(oo(this,jt).innerHTML=e)}};jt=new WeakMap;l.customElements.get("media-time-display")||l.customElements.define("media-time-display",so);var Kc=`<svg aria-hidden="true" viewBox="0 0 26 24">
444
480
  <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"/>
445
- </svg>`,Ac=`<svg aria-hidden="true" viewBox="0 0 26 24">
481
+ </svg>`,Yc=`<svg aria-hidden="true" viewBox="0 0 26 24">
446
482
  <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"/>
447
- </svg>`,Rl=m.createElement("template");Rl.innerHTML=`
483
+ </svg>`,nd=c.createElement("template");nd.innerHTML=`
448
484
  <style>
449
485
  :host([aria-checked="true"]) slot[name=off] {
450
486
  display: none !important;
@@ -457,16 +493,16 @@
457
493
  </style>
458
494
 
459
495
  <slot name="icon">
460
- <slot name="on">${gc}</slot>
461
- <slot name="off">${Ac}</slot>
496
+ <slot name="on">${Kc}</slot>
497
+ <slot name="off">${Yc}</slot>
462
498
  </slot>
463
- `;var Cl=i=>{i.setAttribute("aria-checked",gn(i))},Hn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:Rl,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",Z.CLOSED_CAPTIONS()),Cl(this)}attributeChangedCallback(e,t,a){e===o.MEDIA_SUBTITLES_SHOWING&&Cl(this),super.attributeChangedCallback(e,t,a)}get mediaSubtitlesList(){return Ml(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Ll(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Ml(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Ll(this,o.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){We(this)}},Ml=(i,e)=>{let t=i.getAttribute(e);return t?gi(t):[]},Ll=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=ft(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-button")||l.customElements.define("media-captions-button",Hn);var Gt={SEEK_OFFSET:"seekoffset"},Ba=30,_c=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(8.9 19.87)">${Ba}</text><path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/></svg>`,wl=m.createElement("template");wl.innerHTML=`
464
- <slot name="icon">${_c}</slot>
465
- `;var yc=0,$n=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,Gt.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:wl,...e})}connectedCallback(){this.seekOffset=S(this,Gt.SEEK_OFFSET,Ba),super.connectedCallback()}attributeChangedCallback(e,t,a){e===Gt.SEEK_OFFSET&&(this.seekOffset=S(this,Gt.SEEK_OFFSET,Ba)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return S(this,Gt.SEEK_OFFSET,Ba)}set seekOffset(e){D(this,Gt.SEEK_OFFSET,e),this.setAttribute("aria-label",O.SEEK_FORWARD_N_SECS({seekOffset:this.seekOffset})),da(ua(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return S(this,o.MEDIA_CURRENT_TIME,yc)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};l.customElements.get("media-seek-forward-button")||l.customElements.define("media-seek-forward-button",$n);var Tc=`<svg aria-hidden="true" viewBox="0 0 26 24">
499
+ `;var id=i=>{i.setAttribute("aria-checked",Ml(i))},lo=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:nd,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",q.CLOSED_CAPTIONS()),id(this)}attributeChangedCallback(e,t,a){e===o.MEDIA_SUBTITLES_SHOWING&&id(this),super.attributeChangedCallback(e,t,a)}get mediaSubtitlesList(){return ad(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){rd(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return ad(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){rd(this,o.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new l.CustomEvent(f.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}},ad=(i,e)=>{let t=i.getAttribute(e);return t?Ri(t):[]},rd=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=yt(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-button")||l.customElements.define("media-captions-button",lo);var ei={SEEK_OFFSET:"seekoffset"},ja=30,Gc=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(8.9 19.87)">${ja}</text><path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/></svg>`,od=c.createElement("template");od.innerHTML=`
500
+ <slot name="icon">${Gc}</slot>
501
+ `;var Zc=0,uo=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,ei.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:od,...e})}connectedCallback(){this.seekOffset=M(this,ei.SEEK_OFFSET,ja),super.connectedCallback()}attributeChangedCallback(e,t,a){e===ei.SEEK_OFFSET&&(this.seekOffset=M(this,ei.SEEK_OFFSET,ja)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return M(this,ei.SEEK_OFFSET,ja)}set seekOffset(e){O(this,ei.SEEK_OFFSET,e),this.setAttribute("aria-label",D.SEEK_FORWARD_N_SECS({seekOffset:this.seekOffset})),Aa(_a(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return M(this,o.MEDIA_CURRENT_TIME,Zc)}set mediaCurrentTime(e){O(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new l.CustomEvent(f.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};l.customElements.get("media-seek-forward-button")||l.customElements.define("media-seek-forward-button",uo);var qc=`<svg aria-hidden="true" viewBox="0 0 26 24">
466
502
  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
467
- </svg>`,Ic=`<svg aria-hidden="true" viewBox="0 0 26 24">
503
+ </svg>`,Qc=`<svg aria-hidden="true" viewBox="0 0 26 24">
468
504
  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
469
- </svg>`,Dl=m.createElement("template");Dl.innerHTML=`
505
+ </svg>`,ld=c.createElement("template");ld.innerHTML=`
470
506
  <style>
471
507
  :host([${o.MEDIA_IS_FULLSCREEN}]) slot:not([name=exit]):not([name=icon]) {
472
508
  display: none !important;
@@ -479,10 +515,10 @@
479
515
  </style>
480
516
 
481
517
  <slot name="icon">
482
- <slot name="enter">${Tc}</slot>
483
- <slot name="exit">${Ic}</slot>
518
+ <slot name="enter">${qc}</slot>
519
+ <slot name="exit">${Qc}</slot>
484
520
  </slot>
485
- `;var xl=i=>{let e=i.mediaIsFullscreen?O.EXIT_FULLSCREEN():O.ENTER_FULLSCREEN();i.setAttribute("aria-label",e)},Wn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_FULLSCREEN,o.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Dl,...e})}connectedCallback(){xl(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_FULLSCREEN&&xl(this),super.attributeChangedCallback(e,t,a)}get mediaFullscreenUnavailable(){return w(this,o.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){C(this,o.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return x(this,o.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){R(this,o.MEDIA_IS_FULLSCREEN,e)}handleClick(){let e=this.mediaIsFullscreen?b.MEDIA_EXIT_FULLSCREEN_REQUEST:b.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-fullscreen-button")||l.customElements.define("media-fullscreen-button",Wn);var{MEDIA_TIME_IS_LIVE:Va,MEDIA_PAUSED:Ii}=o,{MEDIA_SEEK_TO_LIVE_REQUEST:kc,MEDIA_PLAY_REQUEST:Sc}=b,Cc='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>',Nl=m.createElement("template");Nl.innerHTML=`
521
+ `;var sd=i=>{let e=i.mediaIsFullscreen?D.EXIT_FULLSCREEN():D.ENTER_FULLSCREEN();i.setAttribute("aria-label",e)},co=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_FULLSCREEN,o.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:ld,...e})}connectedCallback(){sd(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_FULLSCREEN&&sd(this),super.attributeChangedCallback(e,t,a)}get mediaFullscreenUnavailable(){return x(this,o.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){R(this,o.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return L(this,o.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){C(this,o.MEDIA_IS_FULLSCREEN,e)}handleClick(){let e=this.mediaIsFullscreen?f.MEDIA_EXIT_FULLSCREEN_REQUEST:f.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-fullscreen-button")||l.customElements.define("media-fullscreen-button",co);var{MEDIA_TIME_IS_LIVE:er,MEDIA_PAUSED:Pi}=o,{MEDIA_SEEK_TO_LIVE_REQUEST:zc,MEDIA_PLAY_REQUEST:Xc}=f,Jc='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>',ud=c.createElement("template");ud.innerHTML=`
486
522
  <style>
487
523
 
488
524
  slot[name=indicator] > *,
@@ -493,57 +529,57 @@
493
529
  color: var(--media-live-button-icon-color, rgb(140, 140, 140));
494
530
  }
495
531
 
496
- :host([${Va}]:not([${Ii}])) slot[name=indicator] > *,
497
- :host([${Va}]:not([${Ii}])) ::slotted([slot=indicator]) {
532
+ :host([${er}]:not([${Pi}])) slot[name=indicator] > *,
533
+ :host([${er}]:not([${Pi}])) ::slotted([slot=indicator]) {
498
534
  fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
499
535
  color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
500
536
  }
501
537
 
502
- :host([${Va}]:not([${Ii}])) {
538
+ :host([${er}]:not([${Pi}])) {
503
539
  cursor: not-allowed;
504
540
  }
505
541
 
506
542
  </style>
507
543
 
508
- <slot name="indicator">${Cc}</slot>
544
+ <slot name="indicator">${Jc}</slot>
509
545
 
510
546
  <slot name="spacer">&nbsp;</slot><slot name="text">LIVE</slot>
511
- `;var Ol=i=>{let e=i.mediaPaused||!i.mediaTimeIsLive,t=e?O.SEEK_LIVE():O.PLAYING_LIVE();i.setAttribute("aria-label",t),e?i.removeAttribute("aria-disabled"):i.setAttribute("aria-disabled","true")},Fn=class extends M{static get observedAttributes(){return[...super.observedAttributes,Ii,Va]}constructor(e={}){super({slotTemplate:Nl,...e})}connectedCallback(){Ol(this),super.connectedCallback()}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),Ol(this)}get mediaPaused(){return x(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return x(this,o.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){R(this,o.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new l.CustomEvent(kc,{composed:!0,bubbles:!0})),this.hasAttribute(Ii)&&this.dispatchEvent(new l.CustomEvent(Sc,{composed:!0,bubbles:!0})))}};l.customElements.get("media-live-button")||l.customElements.define("media-live-button",Fn);var{MEDIA_VOLUME_LEVEL:ki}=o,Mc=`<svg aria-hidden="true" viewBox="0 0 24 24">
547
+ `;var dd=i=>{let e=i.mediaPaused||!i.mediaTimeIsLive,t=e?D.SEEK_LIVE():D.PLAYING_LIVE();i.setAttribute("aria-label",t),e?i.removeAttribute("aria-disabled"):i.setAttribute("aria-disabled","true")},mo=class extends w{static get observedAttributes(){return[...super.observedAttributes,Pi,er]}constructor(e={}){super({slotTemplate:ud,...e})}connectedCallback(){dd(this),super.connectedCallback()}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),dd(this)}get mediaPaused(){return L(this,o.MEDIA_PAUSED)}set mediaPaused(e){C(this,o.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return L(this,o.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){C(this,o.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new l.CustomEvent(zc,{composed:!0,bubbles:!0})),this.hasAttribute(Pi)&&this.dispatchEvent(new l.CustomEvent(Xc,{composed:!0,bubbles:!0})))}};l.customElements.get("media-live-button")||l.customElements.define("media-live-button",mo);var{MEDIA_VOLUME_LEVEL:Bi}=o,jc=`<svg aria-hidden="true" viewBox="0 0 24 24">
512
548
  <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"/>
513
- </svg>`,Ul=`<svg aria-hidden="true" viewBox="0 0 24 24">
549
+ </svg>`,cd=`<svg aria-hidden="true" viewBox="0 0 24 24">
514
550
  <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"/>
515
- </svg>`,Lc=`<svg aria-hidden="true" viewBox="0 0 24 24">
551
+ </svg>`,em=`<svg aria-hidden="true" viewBox="0 0 24 24">
516
552
  <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"/>
517
- </svg>`,Bl=m.createElement("template");Bl.innerHTML=`
553
+ </svg>`,hd=c.createElement("template");hd.innerHTML=`
518
554
  <style>
519
555
 
520
- :host(:not([${ki}])) slot:not([name=high]):not([name=icon]),
521
- :host([${ki}=high]) slot:not([name=high]):not([name=icon]) {
556
+ :host(:not([${Bi}])) slot:not([name=high]):not([name=icon]),
557
+ :host([${Bi}=high]) slot:not([name=high]):not([name=icon]) {
522
558
  display: none !important;
523
559
  }
524
560
 
525
- :host([${ki}=off]) slot:not([name=off]):not([name=icon]) {
561
+ :host([${Bi}=off]) slot:not([name=off]):not([name=icon]) {
526
562
  display: none !important;
527
563
  }
528
564
 
529
- :host([${ki}=low]) slot:not([name=low]):not([name=icon]) {
565
+ :host([${Bi}=low]) slot:not([name=low]):not([name=icon]) {
530
566
  display: none !important;
531
567
  }
532
568
 
533
- :host([${ki}=medium]) slot:not([name=medium]):not([name=icon]) {
569
+ :host([${Bi}=medium]) slot:not([name=medium]):not([name=icon]) {
534
570
  display: none !important;
535
571
  }
536
572
  </style>
537
573
 
538
574
  <slot name="icon">
539
- <slot name="off">${Mc}</slot>
540
- <slot name="low">${Ul}</slot>
541
- <slot name="medium">${Ul}</slot>
542
- <slot name="high">${Lc}</slot>
575
+ <slot name="off">${jc}</slot>
576
+ <slot name="low">${cd}</slot>
577
+ <slot name="medium">${cd}</slot>
578
+ <slot name="high">${em}</slot>
543
579
  </slot>
544
- `;var Pl=i=>{let t=i.mediaVolumeLevel==="off"?O.UNMUTE():O.MUTE();i.setAttribute("aria-label",t)},Kn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:Bl,...e})}connectedCallback(){Pl(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_VOLUME_LEVEL&&Pl(this),super.attributeChangedCallback(e,t,a)}get mediaVolumeLevel(){return w(this,o.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){C(this,o.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel==="off"?b.MEDIA_UNMUTE_REQUEST:b.MEDIA_MUTE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-mute-button")||l.customElements.define("media-mute-button",Kn);var Vl=`<svg aria-hidden="true" viewBox="0 0 28 24">
580
+ `;var md=i=>{let t=i.mediaVolumeLevel==="off"?D.UNMUTE():D.MUTE();i.setAttribute("aria-label",t)},ho=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:hd,...e})}connectedCallback(){md(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_VOLUME_LEVEL&&md(this),super.attributeChangedCallback(e,t,a)}get mediaVolumeLevel(){return x(this,o.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){R(this,o.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel==="off"?f.MEDIA_UNMUTE_REQUEST:f.MEDIA_MUTE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-mute-button")||l.customElements.define("media-mute-button",ho);var pd=`<svg aria-hidden="true" viewBox="0 0 28 24">
545
581
  <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"/>
546
- </svg>`,$l=m.createElement("template");$l.innerHTML=`
582
+ </svg>`,Ed=c.createElement("template");Ed.innerHTML=`
547
583
  <style>
548
584
  :host([${o.MEDIA_IS_PIP}]) slot:not([name=exit]):not([name=icon]) {
549
585
  display: none !important;
@@ -556,14 +592,14 @@
556
592
  </style>
557
593
 
558
594
  <slot name="icon">
559
- <slot name="enter">${Vl}</slot>
560
- <slot name="exit">${Vl}</slot>
595
+ <slot name="enter">${pd}</slot>
596
+ <slot name="exit">${pd}</slot>
561
597
  </slot>
562
- `;var Hl=i=>{let e=i.mediaIsPip?O.EXIT_PIP():O.ENTER_PIP();i.setAttribute("aria-label",e)},Yn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_PIP,o.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:$l,...e})}connectedCallback(){Hl(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_PIP&&Hl(this),super.attributeChangedCallback(e,t,a)}get mediaPipUnavailable(){return w(this,o.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){C(this,o.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return x(this,o.MEDIA_IS_PIP)}set mediaIsPip(e){R(this,o.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?b.MEDIA_EXIT_PIP_REQUEST:b.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-pip-button")||l.customElements.define("media-pip-button",Yn);var Rc=`<svg aria-hidden="true" viewBox="0 0 24 24">
598
+ `;var bd=i=>{let e=i.mediaIsPip?D.EXIT_PIP():D.ENTER_PIP();i.setAttribute("aria-label",e)},po=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_PIP,o.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Ed,...e})}connectedCallback(){bd(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_PIP&&bd(this),super.attributeChangedCallback(e,t,a)}get mediaPipUnavailable(){return x(this,o.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){R(this,o.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return L(this,o.MEDIA_IS_PIP)}set mediaIsPip(e){C(this,o.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?f.MEDIA_EXIT_PIP_REQUEST:f.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-pip-button")||l.customElements.define("media-pip-button",po);var tm=`<svg aria-hidden="true" viewBox="0 0 24 24">
563
599
  <path d="m6 21 15-9L6 3v18Z"/>
564
- </svg>`,wc=`<svg aria-hidden="true" viewBox="0 0 24 24">
600
+ </svg>`,im=`<svg aria-hidden="true" viewBox="0 0 24 24">
565
601
  <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
566
- </svg>`,Fl=m.createElement("template");Fl.innerHTML=`
602
+ </svg>`,vd=c.createElement("template");vd.innerHTML=`
567
603
  <style>
568
604
  :host([${o.MEDIA_PAUSED}]) slot[name=pause] {
569
605
  display: none !important;
@@ -575,10 +611,10 @@
575
611
  </style>
576
612
 
577
613
  <slot name="icon">
578
- <slot name="play">${Rc}</slot>
579
- <slot name="pause">${wc}</slot>
614
+ <slot name="play">${tm}</slot>
615
+ <slot name="pause">${im}</slot>
580
616
  </slot>
581
- `;var Wl=i=>{let e=i.mediaPaused?O.PLAY():O.PAUSE();i.setAttribute("aria-label",e)},Gn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_ENDED]}constructor(e={}){super({slotTemplate:Fl,...e})}connectedCallback(){Wl(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_PAUSED&&Wl(this),super.attributeChangedCallback(e,t,a)}get mediaPaused(){return x(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-play-button")||l.customElements.define("media-play-button",Gn);var xc=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ha=(i,e,t)=>(xc(i,e,"read from private field"),t?t.call(i):e.get(i)),Dc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Zt,Zn={RATES:"rates"},Qn=[1,1.2,1.5,1.7,2],qt=1,Kl=m.createElement("template");Kl.innerHTML=`
617
+ `;var fd=i=>{let e=i.mediaPaused?D.PLAY():D.PAUSE();i.setAttribute("aria-label",e)},bo=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_ENDED]}constructor(e={}){super({slotTemplate:vd,...e})}connectedCallback(){fd(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_PAUSED&&fd(this),super.attributeChangedCallback(e,t,a)}get mediaPaused(){return L(this,o.MEDIA_PAUSED)}set mediaPaused(e){C(this,o.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?f.MEDIA_PLAY_REQUEST:f.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-play-button")||l.customElements.define("media-play-button",bo);var am=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},tr=(i,e,t)=>(am(i,e,"read from private field"),t?t.call(i):e.get(i)),rm=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ti,Eo={RATES:"rates"},vo=[1,1.2,1.5,1.7,2],ii=1,gd=c.createElement("template");gd.innerHTML=`
582
618
  <style>
583
619
  :host {
584
620
  min-width: 5ch;
@@ -586,7 +622,7 @@
586
622
  }
587
623
  </style>
588
624
  <span id="container"></span>
589
- `;var qn=class extends M{constructor(e={}){super({slotTemplate:Kl,...e}),Dc(this,Zt,new tt(this,Zn.RATES,{defaultValue:Qn})),this.container=this.shadowRoot.querySelector("#container"),this.container.innerHTML=`${qt}x`}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE,Zn.RATES]}attributeChangedCallback(e,t,a){if(super.attributeChangedCallback(e,t,a),e===Zn.RATES&&(Ha(this,Zt).value=a),e===o.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?qt:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",Z.PLAYBACK_RATE({playbackRate:n}))}}get rates(){return Ha(this,Zt)}set rates(e){e?Array.isArray(e)&&(Ha(this,Zt).value=e.join(" ")):Ha(this,Zt).value=""}get mediaPlaybackRate(){return S(this,o.MEDIA_PLAYBACK_RATE,qt)}set mediaPlaybackRate(e){D(this,o.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let a=Array.from(this.rates.values(),s=>+s).sort((s,d)=>s-d),r=(t=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?t:qt,n=new l.CustomEvent(b.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};Zt=new WeakMap;l.customElements.get("media-playback-rate-button")||l.customElements.define("media-playback-rate-button",qn);var we={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"},Yl=m.createElement("template");Yl.innerHTML=`
625
+ `;var fo=class extends w{constructor(e={}){super({slotTemplate:gd,...e}),rm(this,ti,new rt(this,Eo.RATES,{defaultValue:vo})),this.container=this.shadowRoot.querySelector("#container"),this.container.innerHTML=`${ii}x`}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE,Eo.RATES]}attributeChangedCallback(e,t,a){if(super.attributeChangedCallback(e,t,a),e===Eo.RATES&&(tr(this,ti).value=a),e===o.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?ii:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",q.PLAYBACK_RATE({playbackRate:n}))}}get rates(){return tr(this,ti)}set rates(e){e?Array.isArray(e)&&(tr(this,ti).value=e.join(" ")):tr(this,ti).value=""}get mediaPlaybackRate(){return M(this,o.MEDIA_PLAYBACK_RATE,ii)}set mediaPlaybackRate(e){O(this,o.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let a=Array.from(this.rates.values(),s=>+s).sort((s,d)=>s-d),r=(t=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?t:ii,n=new l.CustomEvent(f.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};ti=new WeakMap;l.customElements.get("media-playback-rate-button")||l.customElements.define("media-playback-rate-button",fo);var De={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"},Ad=c.createElement("template");Ad.innerHTML=`
590
626
  <style>
591
627
  :host {
592
628
  pointer-events: none;
@@ -608,9 +644,9 @@
608
644
  </style>
609
645
 
610
646
  <img part="poster img" aria-hidden="true" id="image"/>
611
- `;var Oc=i=>{i.style.removeProperty("background-image")},Nc=(i,e)=>{i.style["background-image"]=`url('${e}')`},zn=class extends l.HTMLElement{static get observedAttributes(){return[we.PLACEHOLDER_SRC,we.SRC]}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Yl.content.cloneNode(!0))),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,a){e===we.SRC&&(a==null?this.image.removeAttribute(we.SRC):this.image.setAttribute(we.SRC,a)),e===we.PLACEHOLDER_SRC&&(a==null?Oc(this.image):Nc(this.image,a))}get placeholderSrc(){return w(this,we.PLACEHOLDER_SRC)}set placeholderSrc(e){C(this,we.SRC,e)}get src(){return w(this,we.SRC)}set src(e){C(this,we.SRC,e)}};l.customElements.get("media-poster-image")||l.customElements.define("media-poster-image",zn);var Qt={SEEK_OFFSET:"seekoffset"},$a=30,Uc=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(2.18 19.87)">${$a}</text><path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/></svg>`,Gl=m.createElement("template");Gl.innerHTML=`
612
- <slot name="icon">${Uc}</slot>
613
- `;var Pc=0,Xn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,Qt.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:Gl,...e})}connectedCallback(){this.seekOffset=S(this,Qt.SEEK_OFFSET,$a),super.connectedCallback()}attributeChangedCallback(e,t,a){e===Qt.SEEK_OFFSET&&(this.seekOffset=S(this,Qt.SEEK_OFFSET,$a)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return S(this,Qt.SEEK_OFFSET,$a)}set seekOffset(e){D(this,Qt.SEEK_OFFSET,e),this.setAttribute("aria-label",O.SEEK_BACK_N_SECS({seekOffset:this.seekOffset})),da(ua(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return S(this,o.MEDIA_CURRENT_TIME,Pc)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};l.customElements.get("media-seek-backward-button")||l.customElements.define("media-seek-backward-button",Xn);var ql=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Zl=(i,e,t)=>(ql(i,e,"read from private field"),t?t.call(i):e.get(i)),Bc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Vc=(i,e,t,a)=>(ql(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Si,Jn=class extends Ke{constructor(){super(),Bc(this,Si,void 0),Vc(this,Si,this.shadowRoot.querySelector("slot")),Zl(this,Si).textContent=ke(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,a){e===o.MEDIA_PREVIEW_TIME&&a!=null&&(Zl(this,Si).textContent=ke(a)),super.attributeChangedCallback(e,t,a)}get mediaPreviewTime(){return S(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){D(this,o.MEDIA_PREVIEW_TIME,e)}};Si=new WeakMap;l.customElements.get("media-preview-time-display")||l.customElements.define("media-preview-time-display",Jn);var Ql=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Wa=(i,e,t)=>(Ql(i,e,"read from private field"),t?t.call(i):e.get(i)),Hc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Fa=(i,e,t,a)=>(Ql(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),xe,zl=m.createElement("template");zl.innerHTML=`
647
+ `;var nm=i=>{i.style.removeProperty("background-image")},om=(i,e)=>{i.style["background-image"]=`url('${e}')`},go=class extends l.HTMLElement{static get observedAttributes(){return[De.PLACEHOLDER_SRC,De.SRC]}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ad.content.cloneNode(!0))),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,a){e===De.SRC&&(a==null?this.image.removeAttribute(De.SRC):this.image.setAttribute(De.SRC,a)),e===De.PLACEHOLDER_SRC&&(a==null?nm(this.image):om(this.image,a))}get placeholderSrc(){return x(this,De.PLACEHOLDER_SRC)}set placeholderSrc(e){R(this,De.SRC,e)}get src(){return x(this,De.SRC)}set src(e){R(this,De.SRC,e)}};l.customElements.get("media-poster-image")||l.customElements.define("media-poster-image",go);var ai={SEEK_OFFSET:"seekoffset"},ir=30,sm=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(2.18 19.87)">${ir}</text><path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/></svg>`,_d=c.createElement("template");_d.innerHTML=`
648
+ <slot name="icon">${sm}</slot>
649
+ `;var lm=0,Ao=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,ai.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:_d,...e})}connectedCallback(){this.seekOffset=M(this,ai.SEEK_OFFSET,ir),super.connectedCallback()}attributeChangedCallback(e,t,a){e===ai.SEEK_OFFSET&&(this.seekOffset=M(this,ai.SEEK_OFFSET,ir)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return M(this,ai.SEEK_OFFSET,ir)}set seekOffset(e){O(this,ai.SEEK_OFFSET,e),this.setAttribute("aria-label",D.SEEK_BACK_N_SECS({seekOffset:this.seekOffset})),Aa(_a(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return M(this,o.MEDIA_CURRENT_TIME,lm)}set mediaCurrentTime(e){O(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new l.CustomEvent(f.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};l.customElements.get("media-seek-backward-button")||l.customElements.define("media-seek-backward-button",Ao);var Td=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},yd=(i,e,t)=>(Td(i,e,"read from private field"),t?t.call(i):e.get(i)),dm=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},um=(i,e,t,a)=>(Td(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Vi,_o=class extends Ye{constructor(){super(),dm(this,Vi,void 0),um(this,Vi,this.shadowRoot.querySelector("slot")),yd(this,Vi).textContent=Se(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,a){e===o.MEDIA_PREVIEW_TIME&&a!=null&&(yd(this,Vi).textContent=Se(a)),super.attributeChangedCallback(e,t,a)}get mediaPreviewTime(){return M(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){O(this,o.MEDIA_PREVIEW_TIME,e)}};Vi=new WeakMap;l.customElements.get("media-preview-time-display")||l.customElements.define("media-preview-time-display",_o);var Id=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ar=(i,e,t)=>(Id(i,e,"read from private field"),t?t.call(i):e.get(i)),cm=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},rr=(i,e,t,a)=>(Id(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Oe,kd=c.createElement("template");kd.innerHTML=`
614
650
  <style>
615
651
  :host {
616
652
  box-sizing: border-box;
@@ -624,7 +660,7 @@
624
660
  }
625
661
  </style>
626
662
  <img crossorigin loading="eager" decoding="async">
627
- `;var jn=class extends l.HTMLElement{constructor(){super(),Hc(this,xe,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(zl.content.cloneNode(!0)))}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Fa(this,xe,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Wa(this,xe))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Wa(this,xe))==null?void 0:e.unassociateElement)==null||t.call(e,this),Fa(this,xe,null)}attributeChangedCallback(e,t,a){var r,n,s,d,u;[o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Wa(this,xe))==null?void 0:r.unassociateElement)==null||n.call(r,this),Fa(this,xe,null)),a&&this.isConnected&&(Fa(this,xe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Wa(this,xe))==null?void 0:d.associateElement)==null||u.call(d,this)))}get mediaPreviewImage(){return w(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){C(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(o.MEDIA_PREVIEW_COORDS);if(!!e)return e.split(/\s+/).map(t=>+t)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(o.MEDIA_PREVIEW_COORDS);return}this.setAttribute(o.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!(e&&t))return;let[a,r,n,s]=e,d=t.split("#")[0],u=getComputedStyle(this),{maxWidth:c,maxHeight:h,minWidth:g,minHeight:v}=u,T=Math.min(parseInt(c)/n,parseInt(h)/s),H=Math.max(parseInt(g)/n,parseInt(v)/s),Y=T<1,I=Y?T:H>1?H:1,{style:ie}=N(this.shadowRoot,":host"),Ie=N(this.shadowRoot,"img").style,le=this.shadowRoot.querySelector("img"),bi=Y?"min":"max";ie.setProperty(`${bi}-width`,"initial","important"),ie.setProperty(`${bi}-height`,"initial","important"),ie.width=`${n*I}px`,ie.height=`${s*I}px`;let Pt=()=>{Ie.width=`${this.imgWidth*I}px`,Ie.height=`${this.imgHeight*I}px`,Ie.display="block"};le.src!==d&&(le.onload=()=>{this.imgWidth=le.naturalWidth,this.imgHeight=le.naturalHeight,Pt()},le.src=d,Pt()),Pt(),Ie.transform=`translate(-${a*I}px, -${r*I}px)`}};xe=new WeakMap;l.customElements.get("media-preview-thumbnail")||l.customElements.define("media-preview-thumbnail",jn);var Xl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},K=(i,e,t)=>(Xl(i,e,"read from private field"),t?t.call(i):e.get(i)),De=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ne=(i,e,t,a)=>(Xl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),$c=(i,e,t,a)=>({set _(r){ne(i,e,r,t)},get _(){return K(i,e,a)}}),zt,Ka,Xt,Ci,Ya,Ga,Za,Jt,yt,qa,Qa=class{constructor(e,t,a){De(this,zt,void 0),De(this,Ka,void 0),De(this,Xt,void 0),De(this,Ci,void 0),De(this,Ya,void 0),De(this,Ga,void 0),De(this,Za,void 0),De(this,Jt,void 0),De(this,yt,0),De(this,qa,(r=performance.now())=>{ne(this,yt,requestAnimationFrame(K(this,qa))),ne(this,Ci,performance.now()-K(this,Xt));let n=1e3/this.fps;if(K(this,Ci)>n){ne(this,Xt,r-K(this,Ci)%n);let s=1e3/((r-K(this,Ka))/++$c(this,Ya)._),d=(r-K(this,Ga))/1e3/this.duration,u=K(this,Za)+d*this.playbackRate;u-K(this,zt).valueAsNumber>0?ne(this,Jt,this.playbackRate/this.duration/s):(ne(this,Jt,.995*K(this,Jt)),u=K(this,zt).valueAsNumber+K(this,Jt)),this.callback(u)}}),ne(this,zt,e),this.callback=t,this.fps=a}start(){K(this,yt)===0&&(ne(this,Xt,performance.now()),ne(this,Ka,K(this,Xt)),ne(this,Ya,0),K(this,qa).call(this))}stop(){K(this,yt)!==0&&(cancelAnimationFrame(K(this,yt)),ne(this,yt,0))}update({start:e,duration:t,playbackRate:a}){let r=e-K(this,zt).valueAsNumber;(r>0||r<-.03)&&this.callback(e),ne(this,Za,e),ne(this,Ga,performance.now()),this.duration=t,this.playbackRate=a}};zt=new WeakMap;Ka=new WeakMap;Xt=new WeakMap;Ci=new WeakMap;Ya=new WeakMap;Ga=new WeakMap;Za=new WeakMap;Jt=new WeakMap;yt=new WeakMap;qa=new WeakMap;var ro=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ve=(i,e,t)=>(ro(i,e,"read from private field"),t?t.call(i):e.get(i)),oe=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},jt=(i,e,t,a)=>(ro(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ce=(i,e,t)=>(ro(i,e,"access private method"),t),Tt,za,Xa,Mi,Ja,ja,ei,Li,no,jl,eo,er,oo,to,ed,Ri,tr,io,td,Wc="video not loaded, unknown time.",Fc=i=>{let e=i.range,t=bt(+ad(i)),a=bt(+i.mediaSeekableEnd),r=t&&a?`${t} of ${a}`:Wc;e.setAttribute("aria-valuetext",r)},id=m.createElement("template");id.innerHTML=`
663
+ `;var yo=class extends l.HTMLElement{constructor(){super(),cm(this,Oe,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(kd.content.cloneNode(!0)))}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(rr(this,Oe,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=ar(this,Oe))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=ar(this,Oe))==null?void 0:e.unassociateElement)==null||t.call(e,this),rr(this,Oe,null)}attributeChangedCallback(e,t,a){var r,n,s,d,u;[o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===A.MEDIA_CONTROLLER&&(t&&((n=(r=ar(this,Oe))==null?void 0:r.unassociateElement)==null||n.call(r,this),rr(this,Oe,null)),a&&this.isConnected&&(rr(this,Oe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=ar(this,Oe))==null?void 0:d.associateElement)==null||u.call(d,this)))}get mediaPreviewImage(){return x(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){R(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(o.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(t=>+t)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(o.MEDIA_PREVIEW_COORDS);return}this.setAttribute(o.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!(e&&t))return;let[a,r,n,s]=e,d=t.split("#")[0],u=getComputedStyle(this),{maxWidth:h,maxHeight:m,minWidth:p,minHeight:E}=u,I=Math.min(parseInt(h)/n,parseInt(m)/s),H=Math.max(parseInt(p)/n,parseInt(E)/s),k=I<1,$=k?I:H>1?H:1,{style:Z}=N(this.shadowRoot,":host"),ee=N(this.shadowRoot,"img").style,Je=this.shadowRoot.querySelector("img"),yi=k?"min":"max";Z.setProperty(`${yi}-width`,"initial","important"),Z.setProperty(`${yi}-height`,"initial","important"),Z.width=`${n*$}px`,Z.height=`${s*$}px`;let Wt=()=>{ee.width=`${this.imgWidth*$}px`,ee.height=`${this.imgHeight*$}px`,ee.display="block"};Je.src!==d&&(Je.onload=()=>{this.imgWidth=Je.naturalWidth,this.imgHeight=Je.naturalHeight,Wt()},Je.src=d,Wt()),Wt(),ee.transform=`translate(-${a*$}px, -${r*$}px)`}};Oe=new WeakMap;l.customElements.get("media-preview-thumbnail")||l.customElements.define("media-preview-thumbnail",yo);var Sd=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Y=(i,e,t)=>(Sd(i,e,"read from private field"),t?t.call(i):e.get(i)),Ne=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},le=(i,e,t,a)=>(Sd(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),mm=(i,e,t,a)=>({set _(r){le(i,e,r,t)},get _(){return Y(i,e,a)}}),ri,nr,ni,Hi,or,sr,lr,oi,St,dr,ur=class{constructor(e,t,a){Ne(this,ri,void 0),Ne(this,nr,void 0),Ne(this,ni,void 0),Ne(this,Hi,void 0),Ne(this,or,void 0),Ne(this,sr,void 0),Ne(this,lr,void 0),Ne(this,oi,void 0),Ne(this,St,0),Ne(this,dr,(r=performance.now())=>{le(this,St,requestAnimationFrame(Y(this,dr))),le(this,Hi,performance.now()-Y(this,ni));let n=1e3/this.fps;if(Y(this,Hi)>n){le(this,ni,r-Y(this,Hi)%n);let s=1e3/((r-Y(this,nr))/++mm(this,or)._),d=(r-Y(this,sr))/1e3/this.duration,u=Y(this,lr)+d*this.playbackRate;u-Y(this,ri).valueAsNumber>0?le(this,oi,this.playbackRate/this.duration/s):(le(this,oi,.995*Y(this,oi)),u=Y(this,ri).valueAsNumber+Y(this,oi)),this.callback(u)}}),le(this,ri,e),this.callback=t,this.fps=a}start(){Y(this,St)===0&&(le(this,ni,performance.now()),le(this,nr,Y(this,ni)),le(this,or,0),Y(this,dr).call(this))}stop(){Y(this,St)!==0&&(cancelAnimationFrame(Y(this,St)),le(this,St,0))}update({start:e,duration:t,playbackRate:a}){let r=e-Y(this,ri).valueAsNumber;(r>0||r<-.03)&&this.callback(e),le(this,lr,e),le(this,sr,performance.now()),this.duration=t,this.playbackRate=a}};ri=new WeakMap;nr=new WeakMap;ni=new WeakMap;Hi=new WeakMap;or=new WeakMap;sr=new WeakMap;lr=new WeakMap;oi=new WeakMap;St=new WeakMap;dr=new WeakMap;var Co=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},de=(i,e,t)=>(Co(i,e,"read from private field"),t?t.call(i):e.get(i)),ae=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ot=(i,e,t,a)=>(Co(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),he=(i,e,t)=>(Co(i,e,"access private method"),t),si,Ct,cr,mr,$i,hr,pr,li,Wi,Mo,Md,To,br,Lo,Io,Ld,Fi,Er,ko,Rd,hm="video not loaded, unknown time.",pm=i=>{let e=i.range,t=gt(+xd(i)),a=gt(+i.mediaSeekableEnd),r=t&&a?`${t} of ${a}`:hm;e.setAttribute("aria-valuetext",r)},wd=c.createElement("template");wd.innerHTML=`
628
664
  <style>
629
665
  :host {
630
666
  --media-preview-border-radius: 3px;
@@ -749,7 +785,7 @@
749
785
 
750
786
  </slot>
751
787
  </div>
752
- `;var Jl=(i,e=i.mediaCurrentTime)=>{if(Number.isNaN(i.mediaSeekableEnd))return 0;let t=(e-i.mediaSeekableStart)/(i.mediaSeekableEnd-i.mediaSeekableStart);return Math.max(0,Math.min(t,1))},ad=(i,e=i.range.valueAsNumber)=>Number.isNaN(i.mediaSeekableEnd)?0:e*(i.mediaSeekableEnd-i.mediaSeekableStart)+i.mediaSeekableStart,ao=class extends _t{constructor(){super(),oe(this,ei),oe(this,no),oe(this,er),oe(this,to),oe(this,Ri),oe(this,io),oe(this,Tt,void 0),oe(this,za,void 0),oe(this,Xa,void 0),oe(this,Mi,void 0),oe(this,Ja,void 0),oe(this,ja,void 0),oe(this,eo,t=>{this.dragging||(this.range.valueAsNumber=t,this.updateBar())}),this.container.appendChild(id.content.cloneNode(!0)),jt(this,za,this.shadowRoot.querySelectorAll('[part~="box"]')),jt(this,Xa,this.shadowRoot.querySelector('[part~="preview-box"]')),jt(this,Mi,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);jt(this,Ja,parseInt(e.getPropertyValue("--media-box-padding-left"))),jt(this,ja,parseInt(e.getPropertyValue("--media-box-padding-right"))),jt(this,Tt,new Qa(this.range,ve(this,eo),60)),this.addEventListener("transitionstart",this)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_DURATION,o.MEDIA_SEEKABLE,o.MEDIA_CURRENT_TIME,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_TIME,o.MEDIA_BUFFERED,o.MEDIA_PLAYBACK_RATE,o.MEDIA_LOADING,o.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",Z.SEEK()),ce(this,ei,Li).call(this)}disconnectedCallback(){super.disconnectedCallback(),ce(this,ei,Li).call(this)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),t!=a&&(e===o.MEDIA_CURRENT_TIME||e===o.MEDIA_PAUSED||e===o.MEDIA_ENDED||e===o.MEDIA_LOADING||e===o.MEDIA_DURATION||e===o.MEDIA_SEEKABLE?(ve(this,Tt).update({start:Jl(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),ce(this,ei,Li).call(this),Fc(this)):e===o.MEDIA_BUFFERED&&this.updateBufferedBar())}get mediaPaused(){return x(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return x(this,o.MEDIA_LOADING)}set mediaLoading(e){R(this,o.MEDIA_LOADING,e)}get mediaDuration(){return S(this,o.MEDIA_DURATION)}set mediaDuration(e){D(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return S(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return S(this,o.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){D(this,o.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(o.MEDIA_BUFFERED);return e?e.split(" ").map(t=>t.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(o.MEDIA_BUFFERED);return}let t=e.map(a=>a.join(":")).join(" ");this.setAttribute(o.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(!!e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;let[,t=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return t}get mediaSeekableStart(){var e;let[t=0]=(e=this.mediaSeekable)!=null?e:[];return t}get mediaPreviewImage(){return w(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){C(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return S(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){D(this,o.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return x(this,o.MEDIA_ENDED)}set mediaEnded(e){R(this,o.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;let t=this.mediaBuffered;if(!t.length)return;let a;if(this.mediaEnded)a=1;else{let n=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=t.find(([d,u])=>d<=n&&n<=u))!=null?e:[];a=Jl(this,s)}let{style:r}=N(this.shadowRoot,"#highlight");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!ve(this,Mi).assignedElements().length)return;let e=ce(this,er,oo).call(this,ve(this,Mi),this.range.valueAsNumber),{style:t}=N(this.shadowRoot,"#current-rail");t.transform=`translateX(${e})`}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":ce(this,io,td).call(this);break;case"pointermove":ce(this,to,ed).call(this,e);break;case"pointerup":case"pointerleave":ce(this,Ri,tr).call(this,null);break;case"transitionstart":setTimeout(()=>ce(this,ei,Li).call(this),0);break}}};Tt=new WeakMap;za=new WeakMap;Xa=new WeakMap;Mi=new WeakMap;Ja=new WeakMap;ja=new WeakMap;ei=new WeakSet;Li=function(){ce(this,no,jl).call(this)?ve(this,Tt).start():ve(this,Tt).stop()};no=new WeakSet;jl=function(){return this.isConnected&&Bs(this)&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded};eo=new WeakMap;er=new WeakSet;oo=function(i,e){var t;let a=`${e*100*100}%`,r=i.offsetWidth;if(!r)return a;let n=(t=this.getAttribute("bounds")?Je(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?t:this,s=this.range.getBoundingClientRect(),d=n.getBoundingClientRect(),u=(ve(this,Ja)-(s.left-d.left-r/2))/s.width*100,c=(d.right-s.left-r/2-ve(this,ja))/s.width*100;return Number.isNaN(u)||(a=`max(${u*100}%, ${a})`),Number.isNaN(c)||(a=`min(${a}, ${c*100}%)`),a};to=new WeakSet;ed=function(i){let e=[...ve(this,za)].some(d=>i.composedPath().includes(d));if(!this.dragging&&(e||!i.composedPath().includes(this))){ce(this,Ri,tr).call(this,null);return}let t=this.mediaDuration;if(!t)return;let a=this.range.getBoundingClientRect(),r=(i.clientX-a.left)/a.width;r=Math.max(0,Math.min(1,r));let n=ce(this,er,oo).call(this,ve(this,Xa),r),{style:s}=N(this.shadowRoot,"#preview-rail");s.transform=`translateX(${n})`,ce(this,Ri,tr).call(this,r*t)};Ri=new WeakSet;tr=function(i){this.dispatchEvent(new l.CustomEvent(b.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:i}))};io=new WeakSet;td=function(){ve(this,Tt).stop();let i=ad(this);this.dispatchEvent(new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:i}))};l.customElements.get("media-time-range")||l.customElements.define("media-time-range",ao);var nd=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ti=(i,e,t)=>(nd(i,e,"read from private field"),t?t.call(i):e.get(i)),so=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ii=(i,e,t,a)=>(nd(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Oe,ir,ar,rd={LOADING_DELAY:"loadingdelay"},od=500,sd=m.createElement("template"),Kc=`
788
+ `;var Cd=(i,e=i.mediaCurrentTime)=>{if(Number.isNaN(i.mediaSeekableEnd))return 0;let t=(e-i.mediaSeekableStart)/(i.mediaSeekableEnd-i.mediaSeekableStart);return Math.max(0,Math.min(t,1))},xd=(i,e=i.range.valueAsNumber)=>Number.isNaN(i.mediaSeekableEnd)?0:e*(i.mediaSeekableEnd-i.mediaSeekableStart)+i.mediaSeekableStart,So=class extends kt{constructor(){super(),ae(this,li),ae(this,Mo),ae(this,br),ae(this,Io),ae(this,Fi),ae(this,ko),ae(this,si,void 0),ae(this,Ct,void 0),ae(this,cr,void 0),ae(this,mr,void 0),ae(this,$i,void 0),ae(this,hr,void 0),ae(this,pr,void 0),ae(this,To,t=>{this.dragging||(this.range.valueAsNumber=t,this.updateBar())}),this.container.appendChild(wd.content.cloneNode(!0)),ot(this,cr,this.shadowRoot.querySelectorAll('[part~="box"]')),ot(this,mr,this.shadowRoot.querySelector('[part~="preview-box"]')),ot(this,$i,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);ot(this,hr,parseInt(e.getPropertyValue("--media-box-padding-left"))),ot(this,pr,parseInt(e.getPropertyValue("--media-box-padding-right"))),ot(this,Ct,new ur(this.range,de(this,To),60))}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_DURATION,o.MEDIA_SEEKABLE,o.MEDIA_CURRENT_TIME,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_TIME,o.MEDIA_BUFFERED,o.MEDIA_PLAYBACK_RATE,o.MEDIA_LOADING,o.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",q.SEEK()),he(this,li,Wi).call(this),ot(this,si,this.getRootNode()),(e=de(this,si))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),he(this,li,Wi).call(this),(e=de(this,si))==null||e.removeEventListener("transitionstart",this),ot(this,si,null)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),t!=a&&(e===o.MEDIA_CURRENT_TIME||e===o.MEDIA_PAUSED||e===o.MEDIA_ENDED||e===o.MEDIA_LOADING||e===o.MEDIA_DURATION||e===o.MEDIA_SEEKABLE?(de(this,Ct).update({start:Cd(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),he(this,li,Wi).call(this),pm(this)):e===o.MEDIA_BUFFERED&&this.updateBufferedBar())}get mediaPaused(){return L(this,o.MEDIA_PAUSED)}set mediaPaused(e){C(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return L(this,o.MEDIA_LOADING)}set mediaLoading(e){C(this,o.MEDIA_LOADING,e)}get mediaDuration(){return M(this,o.MEDIA_DURATION)}set mediaDuration(e){O(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return M(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){O(this,o.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return M(this,o.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){O(this,o.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(o.MEDIA_BUFFERED);return e?e.split(" ").map(t=>t.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(o.MEDIA_BUFFERED);return}let t=e.map(a=>a.join(":")).join(" ");this.setAttribute(o.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;let[,t=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return t}get mediaSeekableStart(){var e;let[t=0]=(e=this.mediaSeekable)!=null?e:[];return t}get mediaPreviewImage(){return x(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){R(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return M(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){O(this,o.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return L(this,o.MEDIA_ENDED)}set mediaEnded(e){C(this,o.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;let t=this.mediaBuffered;if(!t.length)return;let a;if(this.mediaEnded)a=1;else{let n=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=t.find(([d,u])=>d<=n&&n<=u))!=null?e:[];a=Cd(this,s)}let{style:r}=N(this.shadowRoot,"#highlight");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!de(this,$i).assignedElements().length)return;let e=he(this,br,Lo).call(this,de(this,$i),this.range.valueAsNumber),{style:t}=N(this.shadowRoot,"#current-rail");t.transform=`translateX(${e})`}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":he(this,ko,Rd).call(this);break;case"pointermove":he(this,Io,Ld).call(this,e);break;case"pointerup":case"pointerleave":he(this,Fi,Er).call(this,null);break;case"transitionstart":je(e.target,this)&&setTimeout(()=>he(this,li,Wi).call(this),0);break}}};si=new WeakMap;Ct=new WeakMap;cr=new WeakMap;mr=new WeakMap;$i=new WeakMap;hr=new WeakMap;pr=new WeakMap;li=new WeakSet;Wi=function(){he(this,Mo,Md).call(this)?de(this,Ct).start():de(this,Ct).stop()};Mo=new WeakSet;Md=function(){return this.isConnected&&ol(this)&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded};To=new WeakMap;br=new WeakSet;Lo=function(i,e){var t;let a=`${e*100*100}%`,r=i.offsetWidth;if(!r)return a;let n=(t=this.getAttribute("bounds")?et(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?t:this,s=this.range.getBoundingClientRect(),d=n.getBoundingClientRect(),u=(de(this,hr)-(s.left-d.left-r/2))/s.width*100,h=(d.right-s.left-r/2-de(this,pr))/s.width*100;return Number.isNaN(u)||(a=`max(${u*100}%, ${a})`),Number.isNaN(h)||(a=`min(${a}, ${h*100}%)`),a};Io=new WeakSet;Ld=function(i){let e=[...de(this,cr)].some(d=>i.composedPath().includes(d));if(!this.dragging&&(e||!i.composedPath().includes(this))){he(this,Fi,Er).call(this,null);return}let t=this.mediaDuration;if(!t)return;let a=this.range.getBoundingClientRect(),r=(i.clientX-a.left)/a.width;r=Math.max(0,Math.min(1,r));let n=he(this,br,Lo).call(this,de(this,mr),r),{style:s}=N(this.shadowRoot,"#preview-rail");s.transform=`translateX(${n})`,he(this,Fi,Er).call(this,r*t)};Fi=new WeakSet;Er=function(i){this.dispatchEvent(new l.CustomEvent(f.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:i}))};ko=new WeakSet;Rd=function(){de(this,Ct).stop();let i=xd(this);this.dispatchEvent(new l.CustomEvent(f.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:i}))};l.customElements.get("media-time-range")||l.customElements.define("media-time-range",So);var Od=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},di=(i,e,t)=>(Od(i,e,"read from private field"),t?t.call(i):e.get(i)),Ro=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ui=(i,e,t,a)=>(Od(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ue,fr,vr,Dd={LOADING_DELAY:"loadingdelay"},Nd=500,Ud=c.createElement("template"),bm=`
753
789
  <svg aria-hidden="true" viewBox="0 0 100 100">
754
790
  <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">
755
791
  <animateTransform
@@ -762,13 +798,13 @@
762
798
  repeatCount="indefinite" />
763
799
  </path>
764
800
  </svg>
765
- `;sd.innerHTML=`
801
+ `;Ud.innerHTML=`
766
802
  <style>
767
803
  :host {
768
804
  display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
769
805
  vertical-align: middle;
770
806
  box-sizing: border-box;
771
- --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${od}ms);
807
+ --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${Nd}ms);
772
808
  }
773
809
 
774
810
  #status {
@@ -807,12 +843,12 @@ svg, img, ::slotted(svg), ::slotted(img) {
807
843
  }
808
844
  </style>
809
845
 
810
- <slot name="icon">${Kc}</slot>
811
- <div id="status" role="status" aria-live="polite">${Z.MEDIA_LOADING()}</div>
812
- `;var lo=class extends l.HTMLElement{constructor(){if(super(),so(this,Oe,void 0),so(this,ir,od),so(this,ar,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=sd.content.cloneNode(!0);t.appendChild(a)}let{style:e}=N(this.shadowRoot,":host");ii(this,ar,e)}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED,o.MEDIA_LOADING,rd.LOADING_DELAY]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===rd.LOADING_DELAY&&t!==a?this.loadingDelay=Number(a):e===A.MEDIA_CONTROLLER&&(t&&((n=(r=ti(this,Oe))==null?void 0:r.unassociateElement)==null||n.call(r,this),ii(this,Oe,null)),a&&this.isConnected&&(ii(this,Oe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=ti(this,Oe))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ii(this,Oe,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=ti(this,Oe))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=ti(this,Oe))==null?void 0:e.unassociateElement)==null||t.call(e,this),ii(this,Oe,null)}get loadingDelay(){return ti(this,ir)}set loadingDelay(e){ii(this,ir,e),ti(this,ar).setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return x(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return x(this,o.MEDIA_LOADING)}set mediaLoading(e){R(this,o.MEDIA_LOADING,e)}};Oe=new WeakMap;ir=new WeakMap;ar=new WeakMap;l.customElements.get("media-loading-indicator")||l.customElements.define("media-loading-indicator",lo);var Yc=1,Gc=i=>i.mediaMuted?0:i.mediaVolume,Zc=({value:i})=>`${Math.round(i*100)}%`,uo=class extends _t{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME,o.MEDIA_MUTED,o.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{let e=this.range.value,t=new l.CustomEvent(b.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",Z.VOLUME())}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED)&&(this.range.valueAsNumber=Gc(this),this.range.setAttribute("aria-valuetext",Zc(this.range)),this.updateBar())}get mediaVolume(){return S(this,o.MEDIA_VOLUME,Yc)}set mediaVolume(e){D(this,o.MEDIA_VOLUME,e)}get mediaMuted(){return x(this,o.MEDIA_MUTED)}set mediaMuted(e){R(this,o.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return w(this,o.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){C(this,o.MEDIA_VOLUME_UNAVAILABLE,e)}};l.customElements.get("media-volume-range")||l.customElements.define("media-volume-range",uo);var Eo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},G=(i,e,t)=>(Eo(i,e,"read from private field"),t?t.call(i):e.get(i)),se=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ge=(i,e,t,a)=>(Eo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),fe=(i,e,t)=>(Eo(i,e,"access private method"),t),Ne,at,ri,wi,rr,nr,co,ai,mo,or,ho,xi,sr,lr,po,bo,ld,vo,dd,qc=`
846
+ <slot name="icon">${bm}</slot>
847
+ <div id="status" role="status" aria-live="polite">${q.MEDIA_LOADING()}</div>
848
+ `;var wo=class extends l.HTMLElement{constructor(){if(super(),Ro(this,Ue,void 0),Ro(this,fr,Nd),Ro(this,vr,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=Ud.content.cloneNode(!0);t.appendChild(a)}let{style:e}=N(this.shadowRoot,":host");ui(this,vr,e)}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED,o.MEDIA_LOADING,Dd.LOADING_DELAY]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===Dd.LOADING_DELAY&&t!==a?this.loadingDelay=Number(a):e===A.MEDIA_CONTROLLER&&(t&&((n=(r=di(this,Ue))==null?void 0:r.unassociateElement)==null||n.call(r,this),ui(this,Ue,null)),a&&this.isConnected&&(ui(this,Ue,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=di(this,Ue))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ui(this,Ue,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=di(this,Ue))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=di(this,Ue))==null?void 0:e.unassociateElement)==null||t.call(e,this),ui(this,Ue,null)}get loadingDelay(){return di(this,fr)}set loadingDelay(e){ui(this,fr,e),di(this,vr).setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return L(this,o.MEDIA_PAUSED)}set mediaPaused(e){C(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return L(this,o.MEDIA_LOADING)}set mediaLoading(e){C(this,o.MEDIA_LOADING,e)}};Ue=new WeakMap;fr=new WeakMap;vr=new WeakMap;l.customElements.get("media-loading-indicator")||l.customElements.define("media-loading-indicator",wo);var Em=1,fm=i=>i.mediaMuted?0:i.mediaVolume,vm=({value:i})=>`${Math.round(i*100)}%`,xo=class extends kt{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME,o.MEDIA_MUTED,o.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{let e=this.range.value,t=new l.CustomEvent(f.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",q.VOLUME())}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED)&&(this.range.valueAsNumber=fm(this),this.range.setAttribute("aria-valuetext",vm(this.range)),this.updateBar())}get mediaVolume(){return M(this,o.MEDIA_VOLUME,Em)}set mediaVolume(e){O(this,o.MEDIA_VOLUME,e)}get mediaMuted(){return L(this,o.MEDIA_MUTED)}set mediaMuted(e){C(this,o.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return x(this,o.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){R(this,o.MEDIA_VOLUME_UNAVAILABLE,e)}};l.customElements.get("media-volume-range")||l.customElements.define("media-volume-range",xo);var Bo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},G=(i,e,t)=>(Bo(i,e,"read from private field"),t?t.call(i):e.get(i)),ue=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ye=(i,e,t,a)=>(Bo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),_e=(i,e,t)=>(Bo(i,e,"access private method"),t),Pe,st,mi,Ki,gr,Ar,Do,ci,Oo,_r,No,Yi,yr,Tr,Uo,Po,Pd,Vo,Bd,gm=`
813
849
  <svg aria-hidden="true" viewBox="0 1 24 24" part="select-indicator indicator">
814
850
  <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"/>
815
- </svg>`;function Ue(i,e,t){let a=m.createElement("media-chrome-option");a.part.add("option"),a.value=e,a.selected=t;let r=m.createElement("span");return r.textContent=i,a.append(r),a}function Ae(i,e){let t=i.querySelector(`:scope > [slot="${e}"]`);return(t==null?void 0:t.nodeName)=="SLOT"&&(t=t.assignedElements({flatten:!0})[0]),t?(t=t.cloneNode(!0),t.removeAttribute("slot"),t):i.shadowRoot.querySelector(`[name="${e}"] > svg`).cloneNode(!0)}var ud=m.createElement("template");ud.innerHTML=`
851
+ </svg>`;function Be(i,e,t){let a=c.createElement("media-chrome-option");a.part.add("option"),a.value=e,a.selected=t;let r=c.createElement("span");return r.textContent=i,a.append(r),a}function Te(i,e){let t=i.querySelector(`:scope > [slot="${e}"]`);return(t==null?void 0:t.nodeName)=="SLOT"&&(t=t.assignedElements({flatten:!0})[0]),t?(t=t.cloneNode(!0),t.removeAttribute("slot"),t):i.shadowRoot.querySelector(`[name="${e}"] > svg`).cloneNode(!0)}var Vd=c.createElement("template");Vd.innerHTML=`
816
852
  <style>
817
853
  :host {
818
854
  font: var(--media-font,
@@ -891,8 +927,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
891
927
  </style>
892
928
  <slot name="header"></slot>
893
929
  <slot id="container"></slot>
894
- <slot name="select-indicator" hidden>${qc}</slot>
895
- `;var me=class extends l.HTMLElement{constructor(e={}){super(),se(this,nr),se(this,or),se(this,xi),se(this,lr),se(this,bo),se(this,vo),se(this,Ne,void 0),se(this,at,""),se(this,ri,null),se(this,wi,!1),se(this,rr,t=>{this.handleClick(t)}),se(this,ai,t=>{let{key:a}=t;if(a==="Escape"){this.removeEventListener("keyup",G(this,ai));return}if(a==="Meta"){ge(this,wi,!1);return}fe(this,nr,co).call(this,t)}),se(this,mo,t=>{let{key:a,altKey:r}=t;if(r){this.removeEventListener("keyup",G(this,ai));return}if(a==="Meta"){ge(this,wi,!0);return}if(this.keysUsed.includes(a)&&t.preventDefault(),G(this,wi)&&this.keysUsed.includes(a)){fe(this,nr,co).call(this,t);return}this.addEventListener("keyup",G(this,ai),{once:!0})}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=ud.content.cloneNode(!0),e.slotTemplate&&this.nativeEl.append(e.slotTemplate.content.cloneNode(!0)),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.container.addEventListener("slotchange",t=>{for(let a of t.target.assignedNodes({flatten:!0}))a.nodeType===3&&a.textContent.trim()===""&&a.remove()})}static get observedAttributes(){return["disabled","style",A.MEDIA_CONTROLLER]}static formatOptionText(e){return e}formatOptionText(e,t){return this.constructor.formatOptionText(e,t)}get options(){var e;let t=this.querySelectorAll("media-chrome-option");return t.length||(t=(e=this.container)==null?void 0:e.querySelectorAll("media-chrome-option")),Array.from(t)}get selectedOptions(){return this.options.filter(e=>e.selected)}get value(){var e,t;return(t=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?t:""}set value(e){let t=this.options.find(a=>a.value===e);!t||fe(this,lr,po).call(this,t)}focus(){var e;(e=this.selectedOptions[0])==null||e.focus()}enable(){this.addEventListener("click",G(this,rr)),this.addEventListener("keydown",G(this,mo))}disable(){this.removeEventListener("click",G(this,rr)),this.removeEventListener("keyup",G(this,ai))}attributeChangedCallback(e,t,a){var r,n,s,d,u;e==="style"&&a!==t?fe(this,or,ho).call(this):e===A.MEDIA_CONTROLLER?(t&&((n=(r=G(this,Ne))==null?void 0:r.unassociateElement)==null||n.call(r,this),ge(this,Ne,null)),a&&this.isConnected&&(ge(this,Ne,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=G(this,Ne))==null?void 0:d.associateElement)==null||u.call(d,this))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;fe(this,or,ho).call(this),this.hasAttribute("disabled")||this.enable(),this.hasAttribute("role")||this.setAttribute("role","listbox");let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ge(this,Ne,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=G(this,Ne))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=G(this,Ne))==null?void 0:e.unassociateElement)==null||t.call(e,this),ge(this,Ne,null)}get keysUsed(){return["Enter"," ","ArrowDown","ArrowUp","Home","End"]}handleSelection(e,t){let a=fe(this,xi,sr).call(this,e);!a||fe(this,lr,po).call(this,a,t)}handleMovement(e){let{key:t}=e,a=this.options,r=fe(this,xi,sr).call(this,e);r||(r=a.filter(s=>s.getAttribute("tabindex")==="0")[0]);let n;switch(t){case"ArrowDown":n=r.nextElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.nextElementSibling);break;case"ArrowUp":n=r.previousElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.previousElementSibling);break;case"Home":n=a[0];break;case"End":n=a[a.length-1];break;default:n=fe(this,bo,ld).call(this,t);break}n&&(a.forEach(s=>s.setAttribute("tabindex","-1")),n.setAttribute("tabindex","0"),n.focus())}handleClick(e){let t=fe(this,xi,sr).call(this,e);!t||t.hasAttribute("disabled")||(this.options.forEach(a=>a.setAttribute("tabindex","-1")),t.setAttribute("tabindex","0"),this.handleSelection(e,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"))}};Ne=new WeakMap;at=new WeakMap;ri=new WeakMap;wi=new WeakMap;rr=new WeakMap;nr=new WeakSet;co=function(i){let{key:e}=i;e==="Enter"||e===" "?this.handleSelection(i,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"):this.handleMovement(i)};ai=new WeakMap;mo=new WeakMap;or=new WeakSet;ho=function(){var i;let e=this.shadowRoot.querySelector("#layout-row"),t=((i=getComputedStyle(this).getPropertyValue("--media-listbox-layout"))==null?void 0:i.trim())==="row";e.setAttribute("media",t?"":"width:0")};xi=new WeakSet;sr=function(i){let e=i.composedPath(),t=e.findIndex(a=>a.nodeName==="MEDIA-CHROME-OPTION");return e[t]};lr=new WeakSet;po=function(i,e){let t=[...this.selectedOptions];(!this.hasAttribute("aria-multiselectable")||this.getAttribute("aria-multiselectable")!=="true")&&this.options.forEach(a=>a.selected=!1),e?i.selected=!i.selected:i.selected=!0,this.selectedOptions.some((a,r)=>a!=t[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};bo=new WeakSet;ld=function(i){fe(this,vo,dd).call(this);let e=this.options,t=e.findIndex(c=>c.getAttribute("tabindex")==="0");ge(this,at,G(this,at)+i);let a=G(this,at).split("").every(c=>c===i),r=e.slice(t+(a?1:0)).filter(c=>c.textContent.toLowerCase().startsWith(G(this,at))),n=e.slice(0,t-(a?1:0)).filter(c=>c.textContent.toLowerCase().startsWith(G(this,at))),s=[],d=[];return a&&(s=e.slice(t+(a?1:0)).filter(c=>c.textContent.startsWith(i)),d=e.slice(0,t-(a?1:0)).filter(c=>c.textContent.startsWith(i))),[...r,...n,...s,...d][0]};vo=new WeakSet;dd=function(){clearTimeout(G(this,ri)),ge(this,ri,null),ge(this,ri,setTimeout(()=>{ge(this,at,""),ge(this,ri,null)},500))};l.customElements.get("media-chrome-listbox")||l.customElements.define("media-chrome-listbox",me);var To=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ao=(i,e,t)=>(To(i,e,"read from private field"),t?t.call(i):e.get(i)),fo=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},go=(i,e,t,a)=>(To(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),cd=(i,e,t)=>(To(i,e,"access private method"),t),dr,ni,ur,_o,md=m.createElement("template");md.innerHTML=`
930
+ <slot name="select-indicator" hidden>${gm}</slot>
931
+ `;var pe=class extends l.HTMLElement{constructor(e={}){super(),ue(this,Ar),ue(this,_r),ue(this,Yi),ue(this,Tr),ue(this,Po),ue(this,Vo),ue(this,Pe,void 0),ue(this,st,""),ue(this,mi,null),ue(this,Ki,!1),ue(this,gr,t=>{this.handleClick(t)}),ue(this,ci,t=>{let{key:a}=t;if(a==="Escape"){this.removeEventListener("keyup",G(this,ci));return}if(a==="Meta"){ye(this,Ki,!1);return}_e(this,Ar,Do).call(this,t)}),ue(this,Oo,t=>{let{key:a,altKey:r}=t;if(r){this.removeEventListener("keyup",G(this,ci));return}if(a==="Meta"){ye(this,Ki,!0);return}if(this.keysUsed.includes(a)&&t.preventDefault(),G(this,Ki)&&this.keysUsed.includes(a)){_e(this,Ar,Do).call(this,t);return}this.addEventListener("keyup",G(this,ci),{once:!0})}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=Vd.content.cloneNode(!0),e.slotTemplate&&this.nativeEl.append(e.slotTemplate.content.cloneNode(!0)),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.container.addEventListener("slotchange",t=>{for(let a of t.target.assignedNodes({flatten:!0}))a.nodeType===3&&a.textContent.trim()===""&&a.remove()})}static get observedAttributes(){return["disabled","style",A.MEDIA_CONTROLLER]}static formatOptionText(e){return e}formatOptionText(e,t){return this.constructor.formatOptionText(e,t)}get options(){var e;let t=this.querySelectorAll("media-chrome-option");return t.length||(t=(e=this.container)==null?void 0:e.querySelectorAll("media-chrome-option")),Array.from(t)}get selectedOptions(){return this.options.filter(e=>e.selected)}get value(){var e,t;return(t=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?t:""}set value(e){let t=this.options.find(a=>a.value===e);t&&_e(this,Tr,Uo).call(this,t)}focus(){var e;(e=this.selectedOptions[0])==null||e.focus()}enable(){this.addEventListener("click",G(this,gr)),this.addEventListener("keydown",G(this,Oo))}disable(){this.removeEventListener("click",G(this,gr)),this.removeEventListener("keyup",G(this,ci))}attributeChangedCallback(e,t,a){var r,n,s,d,u;e==="style"&&a!==t?_e(this,_r,No).call(this):e===A.MEDIA_CONTROLLER?(t&&((n=(r=G(this,Pe))==null?void 0:r.unassociateElement)==null||n.call(r,this),ye(this,Pe,null)),a&&this.isConnected&&(ye(this,Pe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=G(this,Pe))==null?void 0:d.associateElement)==null||u.call(d,this))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;_e(this,_r,No).call(this),this.hasAttribute("disabled")||this.enable(),this.hasAttribute("role")||this.setAttribute("role","listbox");let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ye(this,Pe,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=G(this,Pe))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=G(this,Pe))==null?void 0:e.unassociateElement)==null||t.call(e,this),ye(this,Pe,null)}get keysUsed(){return["Enter"," ","ArrowDown","ArrowUp","Home","End"]}handleSelection(e,t){let a=_e(this,Yi,yr).call(this,e);a&&_e(this,Tr,Uo).call(this,a,t)}handleMovement(e){let{key:t}=e,a=this.options,r=_e(this,Yi,yr).call(this,e);r||(r=a.filter(s=>s.getAttribute("tabindex")==="0")[0]);let n;switch(t){case"ArrowDown":n=r.nextElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.nextElementSibling);break;case"ArrowUp":n=r.previousElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.previousElementSibling);break;case"Home":n=a[0];break;case"End":n=a[a.length-1];break;default:n=_e(this,Po,Pd).call(this,t);break}n&&(a.forEach(s=>s.setAttribute("tabindex","-1")),n.setAttribute("tabindex","0"),n.focus())}handleClick(e){let t=_e(this,Yi,yr).call(this,e);!t||t.hasAttribute("disabled")||(this.options.forEach(a=>a.setAttribute("tabindex","-1")),t.setAttribute("tabindex","0"),this.handleSelection(e,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"))}};Pe=new WeakMap;st=new WeakMap;mi=new WeakMap;Ki=new WeakMap;gr=new WeakMap;Ar=new WeakSet;Do=function(i){let{key:e}=i;e==="Enter"||e===" "?this.handleSelection(i,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"):this.handleMovement(i)};ci=new WeakMap;Oo=new WeakMap;_r=new WeakSet;No=function(){var i;let e=this.shadowRoot.querySelector("#layout-row"),t=((i=getComputedStyle(this).getPropertyValue("--media-listbox-layout"))==null?void 0:i.trim())==="row";e.setAttribute("media",t?"":"width:0")};Yi=new WeakSet;yr=function(i){let e=i.composedPath(),t=e.findIndex(a=>a.nodeName==="MEDIA-CHROME-OPTION");return e[t]};Tr=new WeakSet;Uo=function(i,e){let t=[...this.selectedOptions];(!this.hasAttribute("aria-multiselectable")||this.getAttribute("aria-multiselectable")!=="true")&&this.options.forEach(a=>a.selected=!1),e?i.selected=!i.selected:i.selected=!0,this.selectedOptions.some((a,r)=>a!=t[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};Po=new WeakSet;Pd=function(i){_e(this,Vo,Bd).call(this);let e=this.options,t=e.findIndex(h=>h.getAttribute("tabindex")==="0");ye(this,st,G(this,st)+i);let a=G(this,st).split("").every(h=>h===i),r=e.slice(t+(a?1:0)).filter(h=>h.textContent.toLowerCase().startsWith(G(this,st))),n=e.slice(0,t-(a?1:0)).filter(h=>h.textContent.toLowerCase().startsWith(G(this,st))),s=[],d=[];return a&&(s=e.slice(t+(a?1:0)).filter(h=>h.textContent.startsWith(i)),d=e.slice(0,t-(a?1:0)).filter(h=>h.textContent.startsWith(i))),[...r,...n,...s,...d][0]};Vo=new WeakSet;Bd=function(){clearTimeout(G(this,mi)),ye(this,mi,null),ye(this,mi,setTimeout(()=>{ye(this,st,""),ye(this,mi,null)},500))};l.customElements.get("media-chrome-listbox")||l.customElements.define("media-chrome-listbox",pe);var Yo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Wo=(i,e,t)=>(Yo(i,e,"read from private field"),t?t.call(i):e.get(i)),Ho=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},$o=(i,e,t,a)=>(Yo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Hd=(i,e,t)=>(Yo(i,e,"access private method"),t),Ir,hi,kr,Fo,$d=c.createElement("template");$d.innerHTML=`
896
932
  <style>
897
933
  :host {
898
934
  cursor: pointer;
@@ -930,7 +966,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
930
966
  }
931
967
  </style>
932
968
  <slot></slot>
933
- `;var rt={VALUE:"value",SELECTED:"selected",DISABLED:"disabled"},cr=class extends l.HTMLElement{constructor(){super(),fo(this,ur),fo(this,dr,!1),fo(this,ni,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(md.content.cloneNode(!0)))}static get observedAttributes(){return[rt.DISABLED,rt.SELECTED,rt.VALUE]}get value(){var e;return(e=this.getAttribute(rt.VALUE))!=null?e:this.text}set value(e){this.setAttribute(rt.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get selected(){return this.getAttribute("aria-selected")==="true"}set selected(e){go(this,dr,!0),this.setAttribute("aria-selected",e?"true":"false"),e?this.part.add("option-selected"):this.part.remove("option-selected")}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex",-1),this.hasAttribute("aria-selected")||this.setAttribute("aria-selected","false")}disable(){this.removeAttribute("tabindex")}attributeChangedCallback(e,t,a){e===rt.SELECTED&&!Ao(this,dr)?this.setAttribute("aria-selected",a!=null?"true":"false"):e===rt.DISABLED&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(rt.DISABLED)||this.enable(),this.setAttribute("role","option"),go(this,ni,yo(this,this.parentNode)),cd(this,ur,_o).call(this)}disconnectedCallback(){this.disable(),cd(this,ur,_o).call(this),go(this,ni,null)}handleClick(){}};dr=new WeakMap;ni=new WeakMap;ur=new WeakSet;_o=function(){var i;let e=(i=Ao(this,ni))==null?void 0:i.options;if(!e)return;let t=e.filter(a=>a.getAttribute("aria-selected")==="true").pop();t||(t=e[0]),Ao(this,ni).getAttribute("aria-multiselectable")!=="true"&&e.forEach(a=>{a.setAttribute("tabindex","-1"),a.setAttribute("aria-selected","false")}),t==null||t.setAttribute("tabindex","0"),t==null||t.setAttribute("aria-selected","true")};function yo(i,e){if(!i)return null;let{host:t}=i.getRootNode();return!e&&t?yo(i,t):e!=null&&e.options?e:yo(e,e==null?void 0:e.parentNode)}l.customElements.get("media-chrome-option")||l.customElements.define("media-chrome-option",cr);var hd=new WeakMap,Io=i=>{let e=hd.get(i);return e||hd.set(i,e=new Set),e},pd=new l.ResizeObserver(i=>{for(let e of i)for(let t of Io(e.target))t(e)});function ko(i,e){Io(i).add(e),pd.observe(i)}function So(i,e){let t=Io(i);t.delete(e),t.size||pd.unobserve(i)}var Mo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},E=(i,e,t)=>(Mo(i,e,"read from private field"),t?t.call(i):e.get(i)),te=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Pe=(i,e,t,a)=>(Mo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),It=(i,e,t)=>(Mo(i,e,"access private method"),t),Be,q,Di,V,_e,oi,mr,hr,pr,br,Er,Co,Lo,bd,si,Oi,kt,Ed=m.createElement("template");Ed.innerHTML=`
969
+ `;var lt={VALUE:"value",SELECTED:"selected",DISABLED:"disabled"},Sr=class extends l.HTMLElement{constructor(){super(),Ho(this,kr),Ho(this,Ir,!1),Ho(this,hi,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild($d.content.cloneNode(!0)))}static get observedAttributes(){return[lt.DISABLED,lt.SELECTED,lt.VALUE]}get value(){var e;return(e=this.getAttribute(lt.VALUE))!=null?e:this.text}set value(e){this.setAttribute(lt.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get selected(){return this.getAttribute("aria-selected")==="true"}set selected(e){$o(this,Ir,!0),this.setAttribute("aria-selected",e?"true":"false"),e?this.part.add("option-selected"):this.part.remove("option-selected")}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex",-1),this.hasAttribute("aria-selected")||this.setAttribute("aria-selected","false")}disable(){this.removeAttribute("tabindex")}attributeChangedCallback(e,t,a){e===lt.SELECTED&&!Wo(this,Ir)?this.setAttribute("aria-selected",a!=null?"true":"false"):e===lt.DISABLED&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(lt.DISABLED)||this.enable(),this.setAttribute("role","option"),$o(this,hi,Ko(this,this.parentNode)),Hd(this,kr,Fo).call(this)}disconnectedCallback(){this.disable(),Hd(this,kr,Fo).call(this),$o(this,hi,null)}handleClick(){}};Ir=new WeakMap;hi=new WeakMap;kr=new WeakSet;Fo=function(){var i;let e=(i=Wo(this,hi))==null?void 0:i.options;if(!e)return;let t=e.filter(a=>a.getAttribute("aria-selected")==="true").pop();t||(t=e[0]),Wo(this,hi).getAttribute("aria-multiselectable")!=="true"&&e.forEach(a=>{a.setAttribute("tabindex","-1"),a.setAttribute("aria-selected","false")}),t==null||t.setAttribute("tabindex","0"),t==null||t.setAttribute("aria-selected","true")};function Ko(i,e){if(!i)return null;let{host:t}=i.getRootNode();return!e&&t?Ko(i,t):e!=null&&e.options?e:Ko(e,e==null?void 0:e.parentNode)}l.customElements.get("media-chrome-option")||l.customElements.define("media-chrome-option",Sr);var Zo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},v=(i,e,t)=>(Zo(i,e,"read from private field"),t?t.call(i):e.get(i)),re=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ve=(i,e,t,a)=>(Zo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Mt=(i,e,t)=>(Zo(i,e,"access private method"),t),He,Q,Gi,V,Ie,pi,Cr,Mr,Lr,Rr,wr,Go,qo,Wd,bi,Zi,Lt,Fd=c.createElement("template");Fd.innerHTML=`
934
970
  <style>
935
971
  :host {
936
972
  font: var(--media-font,
@@ -981,22 +1017,22 @@ svg, img, ::slotted(svg), ::slotted(img) {
981
1017
  <slot></slot>
982
1018
  </media-chrome-listbox>
983
1019
  </slot>
984
- `;var he=class extends l.HTMLElement{constructor(){var e;super(),te(this,Er),te(this,Lo),te(this,si),te(this,Be,void 0),te(this,q,void 0),te(this,Di,void 0),te(this,V,void 0),te(this,_e,void 0),te(this,oi,a=>{let{key:r}=a;if(!this.keysUsed.includes(r)){this.removeEventListener("keyup",E(this,oi));return}a.composedPath().includes(E(this,q))&&(r==="Enter"||r===" ")?It(this,Er,Co).call(this):r==="Escape"&&It(this,si,Oi).call(this)}),te(this,mr,a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!this.keysUsed.includes(s)){this.removeEventListener("keyup",E(this,oi));return}a.preventDefault(),this.addEventListener("keyup",E(this,oi),{once:!0})}),te(this,hr,a=>{a.composedPath().includes(this)||It(this,si,Oi).call(this)}),te(this,pr,a=>{a.composedPath().includes(E(this,q))&&It(this,Er,Co).call(this)}),te(this,br,()=>{It(this,si,Oi).call(this)}),te(this,kt,()=>{if(E(this,V).offsetWidth===0)return;let a=E(this,V).offsetWidth,r=E(this,q).getBoundingClientRect();if(this.hasAttribute("mediacontroller")||E(this,q).hasAttribute("mediacontroller")||E(this,V).hasAttribute("mediacontroller")){E(this,V).style.zIndex="1",E(this,V).style.bottom="unset",E(this,V).style.right=null,E(this,V).style.left="0",E(this,V).style.top=`${r.height}px`;return}let s=Ni(this).getBoundingClientRect(),d=r.x+a,u=Math.max(r.right-d,r.right-s.right);E(this,V).style.left=null,E(this,V).style.right=`${u}px`,E(this,V).style.maxHeight=`${s.height-r.height}px`}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ed.content.cloneNode(!0)));let{style:t}=N(this.shadowRoot,":host");t.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),(e=this.init)==null||e.call(this),Pe(this,q,this.shadowRoot.querySelector("[part=button]")),Pe(this,V,this.shadowRoot.querySelector("[part=listbox]")),Pe(this,Di,this.shadowRoot.querySelector("slot[name=button]")),E(this,Di).addEventListener("slotchange",()=>{let a=E(this,Di).assignedElements()[0];if(!a)return;Pe(this,q,a),E(this,q).preventClick=!0,this.hasAttribute("disabled")||E(this,q).hasAttribute("disabled")?this.disable():(this.enable(),E(this,q).setAttribute("aria-haspopup","listbox"))}),Pe(this,_e,this.shadowRoot.querySelector("slot[name=listbox]")),E(this,_e).addEventListener("slotchange",()=>{Pe(this,V,E(this,_e).assignedElements()[0]||E(this,V))})}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){E(this,q).toggleAttribute("disabled",!1),this.addEventListener("change",E(this,br)),this.addEventListener("keydown",E(this,mr)),this.addEventListener("click",E(this,pr)),m.addEventListener("click",E(this,hr))}disable(){E(this,q).toggleAttribute("disabled",!0),this.removeEventListener("change",E(this,br)),this.removeEventListener("keydown",E(this,mr)),this.removeEventListener("keyup",E(this,oi)),this.removeEventListener("click",E(this,pr)),m.removeEventListener("click",E(this,hr))}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=E(this,Be))==null?void 0:r.unassociateElement)==null||n.call(r,this),Pe(this,Be,null),E(this,V).removeAttribute(A.MEDIA_CONTROLLER)),a&&this.isConnected&&(Pe(this,Be,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=E(this,Be))==null?void 0:d.associateElement)==null||u.call(d,this),E(this,V).setAttribute(A.MEDIA_CONTROLLER,a))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Pe(this,Be,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=E(this,Be))==null?void 0:t.associateElement)==null||a.call(t,this),E(this,V).setAttribute(A.MEDIA_CONTROLLER,r)),this.hasAttribute("disabled")||this.enable(),E(this,_e).hidden||ko(Ni(this),E(this,kt))}disconnectedCallback(){var e,t;So(Ni(this),E(this,kt)),this.disable(),(t=(e=E(this,Be))==null?void 0:e.unassociateElement)==null||t.call(e,this),Pe(this,Be,null),E(this,V).removeAttribute(A.MEDIA_CONTROLLER)}get keysUsed(){return["Enter","Escape"," ","ArrowUp","ArrowDown","f","c","k","m"]}};Be=new WeakMap;q=new WeakMap;Di=new WeakMap;V=new WeakMap;_e=new WeakMap;oi=new WeakMap;mr=new WeakMap;hr=new WeakMap;pr=new WeakMap;br=new WeakMap;Er=new WeakSet;Co=function(){E(this,_e).hidden?It(this,Lo,bd).call(this):It(this,si,Oi).call(this)};Lo=new WeakSet;bd=function(){!E(this,_e).hidden||(E(this,_e).hidden=!1,E(this,q).setAttribute("aria-expanded","true"),E(this,kt).call(this),E(this,V).focus(),ko(Ni(this),E(this,kt)))};si=new WeakSet;Oi=function(){if(E(this,_e).hidden)return;So(Ni(this),E(this,kt));let i=mn();E(this,_e).hidden=!0,E(this,q).setAttribute("aria-expanded","false"),Et(E(this,V),i)&&E(this,q).focus()};kt=new WeakMap;function Ni(i){var e;return(e=i.getAttribute("bounds")?Je(i,`#${i.getAttribute("bounds")}`):Qc(i)||i.parentElement)!=null?e:i}function Qc(i){var e;let t=i.getAttribute(A.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):Je(i,"media-controller")}l.customElements.get("media-chrome-selectmenu")||l.customElements.define("media-chrome-selectmenu",he);var Oo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},zc=(i,e,t)=>(Oo(i,e,"read from private field"),t?t.call(i):e.get(i)),Ro=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Xc=(i,e,t,a)=>(Oo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),wo=(i,e,t)=>(Oo(i,e,"access private method"),t),fr,xo,gd,vr,Do,Jc=`
1020
+ `;var be=class extends l.HTMLElement{constructor(){var e;super(),re(this,wr),re(this,qo),re(this,bi),re(this,He,void 0),re(this,Q,void 0),re(this,Gi,void 0),re(this,V,void 0),re(this,Ie,void 0),re(this,pi,a=>{let{key:r}=a;if(!this.keysUsed.includes(r)){this.removeEventListener("keyup",v(this,pi));return}a.composedPath().includes(v(this,Q))&&(r==="Enter"||r===" ")?Mt(this,wr,Go).call(this):r==="Escape"&&Mt(this,bi,Zi).call(this)}),re(this,Cr,a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!this.keysUsed.includes(s)){this.removeEventListener("keyup",v(this,pi));return}a.preventDefault(),this.addEventListener("keyup",v(this,pi),{once:!0})}),re(this,Mr,a=>{a.composedPath().includes(this)||Mt(this,bi,Zi).call(this)}),re(this,Lr,a=>{a.composedPath().includes(v(this,Q))&&Mt(this,wr,Go).call(this)}),re(this,Rr,()=>{Mt(this,bi,Zi).call(this)}),re(this,Lt,()=>{if(v(this,V).offsetWidth===0)return;let a=v(this,V).offsetWidth,r=v(this,Q).getBoundingClientRect();if(this.hasAttribute("mediacontroller")||v(this,Q).hasAttribute("mediacontroller")||v(this,V).hasAttribute("mediacontroller")){v(this,V).style.zIndex="1",v(this,V).style.bottom="unset",v(this,V).style.right=null,v(this,V).style.left="0",v(this,V).style.top=`${r.height}px`;return}let s=qi(this).getBoundingClientRect(),d=r.x+a,u=Math.max(r.right-d,r.right-s.right);v(this,V).style.left=null,v(this,V).style.right=`${u}px`,v(this,V).style.maxHeight=`${s.height-r.height}px`}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Fd.content.cloneNode(!0)));let{style:t}=N(this.shadowRoot,":host");t.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),(e=this.init)==null||e.call(this),Ve(this,Q,this.shadowRoot.querySelector("[part=button]")),Ve(this,V,this.shadowRoot.querySelector("[part=listbox]")),Ve(this,Gi,this.shadowRoot.querySelector("slot[name=button]")),v(this,Gi).addEventListener("slotchange",()=>{let a=v(this,Gi).assignedElements()[0];if(!a)return;Ve(this,Q,a),v(this,Q).preventClick=!0,this.hasAttribute("disabled")||v(this,Q).hasAttribute("disabled")?this.disable():(this.enable(),v(this,Q).setAttribute("aria-haspopup","listbox"))}),Ve(this,Ie,this.shadowRoot.querySelector("slot[name=listbox]")),v(this,Ie).addEventListener("slotchange",()=>{Ve(this,V,v(this,Ie).assignedElements()[0]||v(this,V))})}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){v(this,Q).toggleAttribute("disabled",!1),this.addEventListener("change",v(this,Rr)),this.addEventListener("keydown",v(this,Cr)),this.addEventListener("click",v(this,Lr)),c.addEventListener("click",v(this,Mr))}disable(){v(this,Q).toggleAttribute("disabled",!0),this.removeEventListener("change",v(this,Rr)),this.removeEventListener("keydown",v(this,Cr)),this.removeEventListener("keyup",v(this,pi)),this.removeEventListener("click",v(this,Lr)),c.removeEventListener("click",v(this,Mr))}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=v(this,He))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ve(this,He,null),v(this,V).removeAttribute(A.MEDIA_CONTROLLER)),a&&this.isConnected&&(Ve(this,He,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=v(this,He))==null?void 0:d.associateElement)==null||u.call(d,this),v(this,V).setAttribute(A.MEDIA_CONTROLLER,a))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Ve(this,He,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=v(this,He))==null?void 0:t.associateElement)==null||a.call(t,this),v(this,V).setAttribute(A.MEDIA_CONTROLLER,r)),this.hasAttribute("disabled")||this.enable(),v(this,Ie).hidden||ki(qi(this),v(this,Lt))}disconnectedCallback(){var e,t;Nn(qi(this),v(this,Lt)),this.disable(),(t=(e=v(this,He))==null?void 0:e.unassociateElement)==null||t.call(e,this),Ve(this,He,null),v(this,V).removeAttribute(A.MEDIA_CONTROLLER)}get keysUsed(){return["Enter","Escape"," ","ArrowUp","ArrowDown","f","c","k","m"]}};He=new WeakMap;Q=new WeakMap;Gi=new WeakMap;V=new WeakMap;Ie=new WeakMap;pi=new WeakMap;Cr=new WeakMap;Mr=new WeakMap;Lr=new WeakMap;Rr=new WeakMap;wr=new WeakSet;Go=function(){v(this,Ie).hidden?Mt(this,qo,Wd).call(this):Mt(this,bi,Zi).call(this)};qo=new WeakSet;Wd=function(){v(this,Ie).hidden&&(v(this,Ie).hidden=!1,v(this,Q).setAttribute("aria-expanded","true"),v(this,Lt).call(this),v(this,V).focus(),ki(qi(this),v(this,Lt)))};bi=new WeakSet;Zi=function(){if(v(this,Ie).hidden)return;Nn(qi(this),v(this,Lt));let i=Mn();v(this,Ie).hidden=!0,v(this,Q).setAttribute("aria-expanded","false"),je(v(this,V),i)&&v(this,Q).focus()};Lt=new WeakMap;function qi(i){var e;return(e=i.getAttribute("bounds")?et(i,`#${i.getAttribute("bounds")}`):Am(i)||i.parentElement)!=null?e:i}function Am(i){var e;let t=i.getAttribute(A.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):et(i,"media-controller")}l.customElements.get("media-chrome-selectmenu")||l.customElements.define("media-chrome-selectmenu",be);var jo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_m=(i,e,t)=>(jo(i,e,"read from private field"),t?t.call(i):e.get(i)),Qo=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ym=(i,e,t,a)=>(jo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),zo=(i,e,t)=>(jo(i,e,"access private method"),t),Dr,Xo,Gd,xr,Jo,Tm=`
985
1021
  <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
986
1022
  <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"/>
987
- </svg>`,Ad=m.createElement("template");Ad.innerHTML=`
988
- <slot name="captions-indicator" hidden>${Jc}</slot>
989
- `;var gr=class extends me{constructor(){super({slotTemplate:Ad}),Ro(this,xo),Ro(this,vr),Ro(this,fr,void 0)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_SUBTITLES_LIST&&t!==a?wo(this,xo,gd).call(this):e===o.MEDIA_SUBTITLES_SHOWING&&t!==a?this.value=a:e==="aria-multiselectable"&&(this.removeAttribute("aria-multiselectable"),console.warn("Captions List doesn't currently support multiple selections. You can enable multiple items via the media.textTrack API."))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",wo(this,vr,Do))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",wo(this,vr,Do))}get mediaSubtitlesList(){return vd(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){fd(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return vd(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){fd(this,o.MEDIA_SUBTITLES_SHOWING,e)}};fr=new WeakMap;xo=new WeakSet;gd=function(){var i;if(zc(this,fr)===JSON.stringify(this.mediaSubtitlesList))return;Xc(this,fr,JSON.stringify(this.mediaSubtitlesList));let e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.value,a=Ue(this.formatOptionText("Off"),"off",t);a.prepend(Ae(this,"select-indicator")),e.append(a);let r=this.mediaSubtitlesList;for(let n of r){let s=Ue(this.formatOptionText(n.label,n),Aa(n),this.value==Aa(n));s.prepend(Ae(this,"select-indicator")),((i=n.kind)!=null?i:"subs")==="captions"&&s.append(Ae(this,"captions-indicator")),e.append(s)}};vr=new WeakSet;Do=function(){if(We(this,!1),!this.value)return;let i=new l.CustomEvent(b.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};var vd=(i,e)=>{let t=i.getAttribute(e);return t?gi(t):[]},fd=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=ft(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-listbox")||l.customElements.define("media-captions-listbox",gr);var Ar=class extends he{init(){let e=m.createElement("media-captions-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-captions-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-captions-selectmenu")||l.customElements.define("media-captions-selectmenu",Ar);var _d=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_r=(i,e,t)=>(_d(i,e,"read from private field"),t?t.call(i):e.get(i)),No=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ui=(i,e,t)=>(_d(i,e,"access private method"),t),li,Pi,yr,Tr,Po,Uo={RATES:"rates"},Ir=class extends me{constructor(){super(),No(this,Pi),No(this,Tr),No(this,li,new tt(this,Uo.RATES,{defaultValue:Qn})),Ui(this,Pi,yr).call(this)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_PLAYBACK_RATE,Uo.RATES]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_PLAYBACK_RATE&&t!=a?this.value=a:e===Uo.RATES&&t!=a&&(_r(this,li).value=a,Ui(this,Pi,yr).call(this))}get rates(){return _r(this,li)}set rates(e){e?Array.isArray(e)&&(_r(this,li).value=e.join(" ")):_r(this,li).value="",Ui(this,Pi,yr).call(this)}get mediaPlaybackRate(){return S(this,o.MEDIA_PLAYBACK_RATE,qt)}set mediaPlaybackRate(e){D(this,o.MEDIA_PLAYBACK_RATE,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ui(this,Tr,Po))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ui(this,Tr,Po))}};li=new WeakMap;Pi=new WeakSet;yr=function(){let i=this.shadowRoot.querySelector("#container");i.textContent="";for(let e of this.rates){let t=Ue(this.formatOptionText(`${e}x`,e),e,this.mediaPlaybackRate==e);t.prepend(Ae(this,"select-indicator")),i.append(t)}};Tr=new WeakSet;Po=function(){if(!this.value)return;let i=new l.CustomEvent(b.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-playback-rate-listbox")||l.customElements.define("media-playback-rate-listbox",Ir);var kr=class extends he{init(){let e=m.createElement("media-playback-rate-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-playback-rate-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-playback-rate-selectmenu")||l.customElements.define("media-playback-rate-selectmenu",kr);var $o=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},yd=(i,e,t)=>($o(i,e,"read from private field"),t?t.call(i):e.get(i)),Sr=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Bo=(i,e,t,a)=>($o(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Cr=(i,e,t)=>($o(i,e,"access private method"),t),Bi,Rr,Mr,Vo,Lr,Ho,wr=class extends me{constructor(){super(...arguments),Sr(this,Mr),Sr(this,Lr),Sr(this,Bi,[]),Sr(this,Rr,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_LIST,o.MEDIA_RENDITION_SELECTED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_RENDITION_SELECTED&&t!==a?this.value=a!=null?a:"auto":e===o.MEDIA_RENDITION_LIST&&t!==a&&(Bo(this,Bi,xs(a)),Cr(this,Mr,Vo).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Cr(this,Lr,Ho))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Cr(this,Lr,Ho))}get mediaRenditionList(){return yd(this,Bi)}set mediaRenditionList(e){Bo(this,Bi,e),Cr(this,Mr,Vo).call(this)}get mediaRenditionSelected(){return w(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){C(this,o.MEDIA_RENDITION_SELECTED,e)}};Bi=new WeakMap;Rr=new WeakMap;Mr=new WeakSet;Vo=function(){if(yd(this,Rr)===JSON.stringify(this.mediaRenditionList))return;Bo(this,Rr,JSON.stringify(this.mediaRenditionList));let i=this.mediaRenditionList.sort((r,n)=>n.height-r.height),e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.mediaRenditionSelected;for(let r of i){let n=this.formatOptionText(`${Math.min(r.width,r.height)}p`,r),s=Ue(n,`${r.id}`,r.selected&&!t);s.prepend(Ae(this,"select-indicator")),e.append(s)}let a=Ue(this.formatOptionText("Auto"),"auto",t);a.prepend(Ae(this,"select-indicator")),e.append(a)};Lr=new WeakSet;Ho=function(){if(this.value==null)return;let i=new l.CustomEvent(b.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-rendition-listbox")||l.customElements.define("media-rendition-listbox",wr);var jc=`<svg aria-hidden="true" viewBox="0 0 24 24">
1023
+ </svg>`,Zd=c.createElement("template");Zd.innerHTML=`
1024
+ <slot name="captions-indicator" hidden>${Tm}</slot>
1025
+ `;var Or=class extends pe{constructor(){super({slotTemplate:Zd}),Qo(this,Xo),Qo(this,xr),Qo(this,Dr,void 0)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_SUBTITLES_LIST&&t!==a?zo(this,Xo,Gd).call(this):e===o.MEDIA_SUBTITLES_SHOWING&&t!==a?this.value=a:e==="aria-multiselectable"&&(this.removeAttribute("aria-multiselectable"),console.warn("Captions List doesn't currently support multiple selections. You can enable multiple items via the media.textTracks API."))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",zo(this,xr,Jo))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",zo(this,xr,Jo))}get mediaSubtitlesList(){return Kd(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Yd(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Kd(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Yd(this,o.MEDIA_SUBTITLES_SHOWING,e)}};Dr=new WeakMap;Xo=new WeakSet;Gd=function(){var i;if(_m(this,Dr)===JSON.stringify(this.mediaSubtitlesList))return;ym(this,Dr,JSON.stringify(this.mediaSubtitlesList));let e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.value,a=Be(this.formatOptionText("Off"),"off",t);a.prepend(Te(this,"select-indicator")),e.append(a);let r=this.mediaSubtitlesList;for(let n of r){let s=Be(this.formatOptionText(n.label,n),Oa(n),this.value==Oa(n));s.prepend(Te(this,"select-indicator")),((i=n.kind)!=null?i:"subs")==="captions"&&s.append(Te(this,"captions-indicator")),e.append(s)}};xr=new WeakSet;Jo=function(){let i=this.mediaSubtitlesShowing,e=this.getAttribute(o.MEDIA_SUBTITLES_SHOWING),t=this.value!==e;if(i!=null&&i.length&&t&&this.dispatchEvent(new l.CustomEvent(f.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:i})),!this.value||!t)return;let a=new l.CustomEvent(f.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};var Kd=(i,e)=>{let t=i.getAttribute(e);return t?Ri(t):[]},Yd=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=yt(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-listbox")||l.customElements.define("media-captions-listbox",Or);var Nr=class extends be{init(){let e=c.createElement("media-captions-button");e.part.add("button"),e.preventClick=!0;let t=c.createElement("media-captions-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-captions-selectmenu")||l.customElements.define("media-captions-selectmenu",Nr);var qd=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ur=(i,e,t)=>(qd(i,e,"read from private field"),t?t.call(i):e.get(i)),es=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Qi=(i,e,t)=>(qd(i,e,"access private method"),t),Ei,zi,Pr,Br,is,ts={RATES:"rates"},Vr=class extends pe{constructor(){super(),es(this,zi),es(this,Br),es(this,Ei,new rt(this,ts.RATES,{defaultValue:vo})),Qi(this,zi,Pr).call(this)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_PLAYBACK_RATE,ts.RATES]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_PLAYBACK_RATE&&t!=a?this.value=a:e===ts.RATES&&t!=a&&(Ur(this,Ei).value=a,Qi(this,zi,Pr).call(this))}get rates(){return Ur(this,Ei)}set rates(e){e?Array.isArray(e)&&(Ur(this,Ei).value=e.join(" ")):Ur(this,Ei).value="",Qi(this,zi,Pr).call(this)}get mediaPlaybackRate(){return M(this,o.MEDIA_PLAYBACK_RATE,ii)}set mediaPlaybackRate(e){O(this,o.MEDIA_PLAYBACK_RATE,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Qi(this,Br,is))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Qi(this,Br,is))}};Ei=new WeakMap;zi=new WeakSet;Pr=function(){let i=this.shadowRoot.querySelector("#container");i.textContent="";for(let e of this.rates){let t=Be(this.formatOptionText(`${e}x`,e),e,this.mediaPlaybackRate==e);t.prepend(Te(this,"select-indicator")),i.append(t)}};Br=new WeakSet;is=function(){if(!this.value)return;let i=new l.CustomEvent(f.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-playback-rate-listbox")||l.customElements.define("media-playback-rate-listbox",Vr);var Hr=class extends be{init(){let e=c.createElement("media-playback-rate-button");e.part.add("button"),e.preventClick=!0;let t=c.createElement("media-playback-rate-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-playback-rate-selectmenu")||l.customElements.define("media-playback-rate-selectmenu",Hr);var os=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Qd=(i,e,t)=>(os(i,e,"read from private field"),t?t.call(i):e.get(i)),$r=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},as=(i,e,t,a)=>(os(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Wr=(i,e,t)=>(os(i,e,"access private method"),t),Xi,Yr,Fr,rs,Kr,ns,Gr=class extends pe{constructor(){super(...arguments),$r(this,Fr),$r(this,Kr),$r(this,Xi,[]),$r(this,Yr,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_LIST,o.MEDIA_RENDITION_SELECTED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_RENDITION_SELECTED&&t!==a?this.value=a!=null?a:"auto":e===o.MEDIA_RENDITION_LIST&&t!==a&&(as(this,Xi,js(a)),Wr(this,Fr,rs).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Wr(this,Kr,ns))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Wr(this,Kr,ns))}get mediaRenditionList(){return Qd(this,Xi)}set mediaRenditionList(e){as(this,Xi,e),Wr(this,Fr,rs).call(this)}get mediaRenditionSelected(){return x(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){R(this,o.MEDIA_RENDITION_SELECTED,e)}};Xi=new WeakMap;Yr=new WeakMap;Fr=new WeakSet;rs=function(){if(Qd(this,Yr)===JSON.stringify(this.mediaRenditionList))return;as(this,Yr,JSON.stringify(this.mediaRenditionList));let i=this.mediaRenditionList.sort((r,n)=>n.height-r.height),e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.mediaRenditionSelected;for(let r of i){let n=this.formatOptionText(`${Math.min(r.width,r.height)}p`,r),s=Be(n,`${r.id}`,r.selected&&!t);s.prepend(Te(this,"select-indicator")),e.append(s)}let a=Be(this.formatOptionText("Auto"),"auto",t);a.prepend(Te(this,"select-indicator")),e.append(a)};Kr=new WeakSet;ns=function(){if(this.value==null)return;let i=new l.CustomEvent(f.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-rendition-listbox")||l.customElements.define("media-rendition-listbox",Gr);var Im=`<svg aria-hidden="true" viewBox="0 0 24 24">
990
1026
  <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" />
991
- </svg>`,Td=m.createElement("template");Td.innerHTML=`
992
- <slot name="icon">${jc}</slot>
993
- `;var Wo=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:Td})}get mediaRenditionSelected(){return w(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){C(this,o.MEDIA_RENDITION_SELECTED,e)}};l.customElements.get("media-rendition-button")||l.customElements.define("media-rendition-button",Wo);var xr=class extends he{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE]}init(){let e=m.createElement("media-rendition-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-rendition-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-rendition-selectmenu")||l.customElements.define("media-rendition-selectmenu",xr);var Go=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Id=(i,e,t)=>(Go(i,e,"read from private field"),t?t.call(i):e.get(i)),Dr=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Fo=(i,e,t,a)=>(Go(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Or=(i,e,t)=>(Go(i,e,"access private method"),t),Vi,Pr,Nr,Ko,Ur,Yo,Br=class extends me{constructor(){super(...arguments),Dr(this,Nr),Dr(this,Ur),Dr(this,Vi,[]),Dr(this,Pr,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_LIST,o.MEDIA_AUDIO_TRACK_ENABLED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_AUDIO_TRACK_ENABLED&&t!==a?this.value=a:e===o.MEDIA_AUDIO_TRACK_LIST&&t!==a&&(Fo(this,Vi,Os(a)),Or(this,Nr,Ko).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Or(this,Ur,Yo))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Or(this,Ur,Yo))}get mediaAudioTrackList(){return Id(this,Vi)}set mediaAudioTrackList(e){Fo(this,Vi,e),Or(this,Nr,Ko).call(this)}get mediaAudioTrackEnabled(){return w(this,o.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){C(this,o.MEDIA_AUDIO_TRACK_ENABLED,e)}};Vi=new WeakMap;Pr=new WeakMap;Nr=new WeakSet;Ko=function(){if(Id(this,Pr)===JSON.stringify(this.mediaAudioTrackList))return;Fo(this,Pr,JSON.stringify(this.mediaAudioTrackList));let i=this.mediaAudioTrackList,e=this.shadowRoot.querySelector("#container");e.textContent="";for(let t of i){let a=this.formatOptionText(t.label,t),r=Ue(a,`${t.id}`,t.enabled);r.prepend(Ae(this,"select-indicator")),e.append(r)}};Ur=new WeakSet;Yo=function(){if(this.value==null)return;let i=new l.CustomEvent(b.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-audio-track-listbox")||l.customElements.define("media-audio-track-listbox",Br);var em=`<svg aria-hidden="true" viewBox="0 0 24 24">
1027
+ </svg>`,zd=c.createElement("template");zd.innerHTML=`
1028
+ <slot name="icon">${Im}</slot>
1029
+ `;var ss=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:zd})}get mediaRenditionSelected(){return x(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){R(this,o.MEDIA_RENDITION_SELECTED,e)}};l.customElements.get("media-rendition-button")||l.customElements.define("media-rendition-button",ss);var Zr=class extends be{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE]}init(){let e=c.createElement("media-rendition-button");e.part.add("button"),e.preventClick=!0;let t=c.createElement("media-rendition-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-rendition-selectmenu")||l.customElements.define("media-rendition-selectmenu",Zr);var cs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Xd=(i,e,t)=>(cs(i,e,"read from private field"),t?t.call(i):e.get(i)),qr=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ls=(i,e,t,a)=>(cs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Qr=(i,e,t)=>(cs(i,e,"access private method"),t),Ji,Jr,zr,ds,Xr,us,jr=class extends pe{constructor(){super(...arguments),qr(this,zr),qr(this,Xr),qr(this,Ji,[]),qr(this,Jr,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_LIST,o.MEDIA_AUDIO_TRACK_ENABLED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_AUDIO_TRACK_ENABLED&&t!==a?this.value=a:e===o.MEDIA_AUDIO_TRACK_LIST&&t!==a&&(ls(this,Ji,tl(a)),Qr(this,zr,ds).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Qr(this,Xr,us))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Qr(this,Xr,us))}get mediaAudioTrackList(){return Xd(this,Ji)}set mediaAudioTrackList(e){ls(this,Ji,e),Qr(this,zr,ds).call(this)}get mediaAudioTrackEnabled(){return x(this,o.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){R(this,o.MEDIA_AUDIO_TRACK_ENABLED,e)}};Ji=new WeakMap;Jr=new WeakMap;zr=new WeakSet;ds=function(){if(Xd(this,Jr)===JSON.stringify(this.mediaAudioTrackList))return;ls(this,Jr,JSON.stringify(this.mediaAudioTrackList));let i=this.mediaAudioTrackList,e=this.shadowRoot.querySelector("#container");e.textContent="";for(let t of i){let a=this.formatOptionText(t.label,t),r=Be(a,`${t.id}`,t.enabled);r.prepend(Te(this,"select-indicator")),e.append(r)}};Xr=new WeakSet;us=function(){if(this.value==null)return;let i=new l.CustomEvent(f.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-audio-track-listbox")||l.customElements.define("media-audio-track-listbox",jr);var km=`<svg aria-hidden="true" viewBox="0 0 24 24">
994
1030
  <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
995
1031
  <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"/>
996
- </svg>`,kd=m.createElement("template");kd.innerHTML=`
997
- <slot name="icon">${em}</slot>
998
- `;var Zo=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_ENABLED,o.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:kd})}get mediaAudioTrackEnabled(){return w(this,o.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){C(this,o.MEDIA_AUDIO_TRACK_ENABLED,e)}};l.customElements.get("media-audio-track-button")||l.customElements.define("media-audio-track-button",Zo);var Vr=class extends he{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_ENABLED,o.MEDIA_AUDIO_TRACK_UNAVAILABLE]}init(){let e=m.createElement("media-audio-track-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-audio-track-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-audio-track-selectmenu")||l.customElements.define("media-audio-track-selectmenu",Vr);var f=_u(require("@mux/mux-video")),P=require("@mux/playback-core");var Nd=require("@mux/mux-video");var tm="en",St={code:tm};var Sd="en";function y(i,e=!0){var r,n;let t=e&&(n=(r=St)==null?void 0:r[i])!=null?n:i,a=e?St.code:Sd;return new qo(t,a)}var qo=class{constructor(e,t=(a=>(a=St.code)!=null?a:Sd)()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,a)=>{var r;return(r=e[a])!=null?r:""})}toString(){return this.message}};function Cd(i){let e="";return Object.entries(i).forEach(([t,a])=>{a!=null&&(e+=`${Hr(t)}: ${a}; `)}),e?e.trim():void 0}function Hr(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function $r(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Ye(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function Qo(i){let e=im(i).toString();return e?"?"+e:""}function im(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}function nt(i){let e=(i!=null?i:"").split(".")[1];if(!e)return{};let t=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(t).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}var zo=(i,e)=>!i||!e?!1:i.contains(e)?!0:zo(i,e.getRootNode().host);var Wr=require("@mux/playback-core");var Md="mux.com",am=()=>{try{return"2.2.0"}catch{}return"UNKNOWN"},rm=am(),Kr=()=>rm,Ld=(i,{token:e,customDomain:t=Md,thumbnailTime:a}={})=>{let r=e==null?a:void 0,{aud:n}=nt(e);if(!(e&&n!=="t"))return`https://image.${t}/${i}/thumbnail.webp${Qo({token:e,time:r})}`},Rd=(i,{token:e,customDomain:t=Md}={})=>{let{aud:a}=nt(e);if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${Qo({token:e,format:"webp"})}`},Hi=i=>{if(!!i){if([Wr.StreamTypes.LIVE,Wr.StreamTypes.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return Wr.StreamTypes.LIVE}};var nm={crossorigin:"crossOrigin",playsinline:"playsInline"};function wd(i){var e;return(e=nm[i])!=null?e:$r(i)}var Ct,Mt,z,Fr=class{constructor(e,t){$(this,Ct,void 0);$(this,Mt,void 0);$(this,z,[]);de(this,Ct,e),de(this,Mt,t)}[Symbol.iterator](){return k(this,z).values()}get length(){return k(this,z).length}get value(){var e;return(e=k(this,z).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(de(this,z,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return k(this,z)[e]}values(){return k(this,z).values()}keys(){return k(this,z).keys()}forEach(e){k(this,z).forEach(e)}add(...e){var t,a;e.forEach(r=>{this.contains(r)||k(this,z).push(r)}),!(this.value===""&&!((t=k(this,Ct))!=null&&t.hasAttribute(`${k(this,Mt)}`)))&&((a=k(this,Ct))==null||a.setAttribute(`${k(this,Mt)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>{k(this,z).splice(k(this,z).indexOf(a),1)}),(t=k(this,Ct))==null||t.setAttribute(`${k(this,Mt)}`,`${this.value}`)}contains(e){return k(this,z).includes(e)}toggle(e,t){return typeof t!="undefined"?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)}};Ct=new WeakMap,Mt=new WeakMap,z=new WeakMap;var xd=`[mux-player ${Kr()}]`;function ot(...i){console.warn(xd,...i)}function ye(...i){console.error(xd,...i)}function Xo(i){var t;let e=(t=i.message)!=null?t:"";if(i.context&&(e+=` ${i.context}`),i.file){let a="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${y("Read more: ")}
999
- ${a}${i.file}`}ot(e)}var Q={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Lt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Od=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),om=Nd.VideoEvents.filter(i=>i!=="error"),sm=Object.values(Q).filter(i=>![Q.PLAYSINLINE].includes(i)),lm=Object.values(Lt);function Ud(i){i.querySelectorAll(":scope > track").forEach(e=>{var t;(t=i.media)==null||t.append(e.cloneNode())}),om.forEach(e=>{var t;(t=i.media)==null||t.addEventListener(e,a=>{i.dispatchEvent(new Event(a.type))})})}var Jo=class extends U.HTMLElement{static get observedAttributes(){return[...sm,...lm]}constructor(){super(),this.querySelectorAll(":scope > track").forEach(a=>{var r;(r=this.media)==null||r.append(a.cloneNode())});let e=a=>{for(let r of a)r.type==="childList"&&(r.removedNodes.forEach(n=>{var d,u;let s=(d=this.media)==null?void 0:d.querySelector(`track[src="${n.src}"]`);s&&((u=this.media)==null||u.removeChild(s))}),r.addedNodes.forEach(n=>{var s;(s=this.media)==null||s.append(n.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,t,a){var r,n;switch(e){case Lt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case Lt.VOLUME:{let s=(r=Ye(a))!=null?r:1;this.media&&(this.media.volume=s);return}case Lt.PLAYBACKRATE:{let s=(n=Ye(a))!=null?n:1;this.media&&(this.media.playbackRate=s,this.media.defaultPlaybackRate=s);return}}}play(){var e,t;return(t=(e=this.media)==null?void 0:e.play())!=null?t:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}requestCast(e){var t;return(t=this.media)==null?void 0:t.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?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(t=(e=this.media)==null?void 0:e.paused)!=null?t:!0}get duration(){var e,t;return(t=(e=this.media)==null?void 0:e.duration)!=null?t:NaN}get ended(){var e,t;return(t=(e=this.media)==null?void 0:e.ended)!=null?t:!1}get buffered(){var e,t;return(t=(e=this.media)==null?void 0:e.buffered)!=null?t:Od}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:Od}get readyState(){var e,t;return(t=(e=this.media)==null?void 0:e.readyState)!=null?t:0}get videoWidth(){var e,t;return(t=(e=this.media)==null?void 0:e.videoWidth)!=null?t:0}get videoHeight(){var e,t;return(t=(e=this.media)==null?void 0:e.videoHeight)!=null?t:0}get currentTime(){var e,t;return(t=(e=this.media)==null?void 0:e.currentTime)!=null?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return(t=(e=this.media)==null?void 0:e.volume)!=null?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return(t=(e=this.media)==null?void 0:e.playbackRate)!=null?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=Ye(this.getAttribute(Lt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(Lt.PLAYBACKRATE,`${e}`):this.removeAttribute(Lt.PLAYBACKRATE)}get crossOrigin(){return $i(this,Q.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(Q.CROSSORIGIN,`${e}`)}get autoplay(){return $i(this,Q.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(Q.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(Q.AUTOPLAY)}get loop(){return $i(this,Q.LOOP)!=null}set loop(e){e?this.setAttribute(Q.LOOP,""):this.removeAttribute(Q.LOOP)}get muted(){var e,t;return(t=(e=this.media)==null?void 0:e.muted)!=null?t:!1}set muted(e){this.media&&(this.media.muted=Boolean(e))}get defaultMuted(){return $i(this,Q.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(Q.MUTED,""):this.removeAttribute(Q.MUTED)}get playsInline(){return $i(this,Q.PLAYSINLINE)!=null}set playsInline(e){ye("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(Q.PRELOAD,e):this.removeAttribute(Q.PRELOAD)}};function $i(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var jo=Jo;var dm=Object.defineProperty,um=(i,e,t)=>e in i?dm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,cm=(i,e,t)=>(um(i,typeof e!="symbol"?e+"":e,t),t),$d=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_=(i,e,t)=>($d(i,e,"read from private field"),t?t.call(i):e.get(i)),Ve=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ge=(i,e,t,a)=>($d(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),di,Yr,Rt,Wi,st,lt,dt,wt,ui,Gr,Te,Pd=1,Bd=0,mm=1,hm={processCallback(i,e,t){if(!!t){for(let[a,r]of e)if(a in t){let n=t[a];typeof n=="boolean"&&r instanceof X&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof X?r.element[r.attributeName]=n:r.value=n}}}},Ze=class extends l.DocumentFragment{constructor(e,t,a=hm){var r;super(),Ve(this,di,void 0),Ve(this,Yr,void 0),this.append(e.content.cloneNode(!0)),Ge(this,di,Wd(this)),Ge(this,Yr,a),(r=a.createCallback)==null||r.call(a,this,_(this,di),t),a.processCallback(this,_(this,di),t)}update(e){_(this,Yr).processCallback(this,_(this,di),e)}};di=new WeakMap;Yr=new WeakMap;var Wd=(i,e=[])=>{let t,a;for(let r of i.attributes||[])if(r.value.includes("{{")){let n=new es;for([t,a]of Hd(r.value))if(!t)n.append(a);else{let s=new X(i,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(let r of i.childNodes)if(r.nodeType===Pd&&!(r instanceof HTMLTemplateElement))Wd(r,e);else if(r.nodeType===Pd||r.data.includes("{{")){let n=[];if(r.data)for([t,a]of Hd(r.data))if(!t)n.push(new Text(a));else{let s=new qe(i);n.push(s),e.push([a,s])}else if(r instanceof HTMLTemplateElement){let s=new Fi(i,r);n.push(s),e.push([s.expression,s])}r.replaceWith(...n.flatMap(s=>s.replacementNodes||[s]))}return e},Vd={},Hd=i=>{let e="",t=0,a=Vd[i],r=0,n;if(a)return a;for(a=[];n=i[r];r++)n==="{"&&i[r+1]==="{"&&i[r-1]!=="\\"&&i[r+2]&&++t==1?(e&&a.push([Bd,e]),e="",r++):n==="}"&&i[r+1]==="}"&&i[r-1]!=="\\"&&!--t?(a.push([mm,e.trim()]),e="",r++):e+=n||"";return e&&a.push([Bd,(t>0?"{{":"")+e]),Vd[i]=a},pm=11,Zr=class{get value(){return""}set value(e){}toString(){return this.value}},Fd=new WeakMap,es=class{constructor(){Ve(this,Rt,[])}[Symbol.iterator](){return _(this,Rt).values()}get length(){return _(this,Rt).length}item(e){return _(this,Rt)[e]}append(...e){for(let t of e)t instanceof X&&Fd.set(t,this),_(this,Rt).push(t)}toString(){return _(this,Rt).join("")}};Rt=new WeakMap;var X=class extends Zr{constructor(e,t,a){super(),Ve(this,wt),Ve(this,Wi,""),Ve(this,st,void 0),Ve(this,lt,void 0),Ve(this,dt,void 0),Ge(this,st,e),Ge(this,lt,t),Ge(this,dt,a)}get attributeName(){return _(this,lt)}get attributeNamespace(){return _(this,dt)}get element(){return _(this,st)}get value(){return _(this,Wi)}set value(e){_(this,Wi)!==e&&(Ge(this,Wi,e),!_(this,wt,ui)||_(this,wt,ui).length===1?e==null?_(this,st).removeAttributeNS(_(this,dt),_(this,lt)):_(this,st).setAttributeNS(_(this,dt),_(this,lt),e):_(this,st).setAttributeNS(_(this,dt),_(this,lt),_(this,wt,ui)))}get booleanValue(){return _(this,st).hasAttributeNS(_(this,dt),_(this,lt))}set booleanValue(e){if(!_(this,wt,ui)||_(this,wt,ui).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};Wi=new WeakMap;st=new WeakMap;lt=new WeakMap;dt=new WeakMap;wt=new WeakSet;ui=function(){return Fd.get(this)};var qe=class extends Zr{constructor(e,t){super(),Ve(this,Gr,void 0),Ve(this,Te,void 0),Ge(this,Gr,e),Ge(this,Te,t?[...t]:[new Text])}get replacementNodes(){return _(this,Te)}get parentNode(){return _(this,Gr)}get nextSibling(){return _(this,Te)[_(this,Te).length-1].nextSibling}get previousSibling(){return _(this,Te)[0].previousSibling}get value(){return _(this,Te).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===pm?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);t.length||t.push(new Text),Ge(this,Te,bm(_(this,Te)[0].parentNode,_(this,Te),t,this.nextSibling))}};Gr=new WeakMap;Te=new WeakMap;var Fi=class extends qe{constructor(e,t){let a=t.getAttribute("directive")||t.getAttribute("type"),r=t.getAttribute("expression")||t.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),cm(this,"directive"),this.expression=r,this.template=t,this.directive=a}};function bm(i,e,t,a=null){let r=0,n,s,d,u=t.length,c=e.length;for(;r<u&&r<c&&e[r]==t[r];)r++;for(;r<u&&r<c&&t[u-1]==e[c-1];)a=t[--c,--u];if(r==c)for(;r<u;)i.insertBefore(t[r++],a);if(r==u)for(;r<c;)i.removeChild(e[r++]);else{for(n=e[r];r<u;)d=t[r++],s=n?n.nextSibling:a,n==d?n=s:r<u&&t[r]==s?(i.replaceChild(d,n),n=s):i.insertBefore(d,n);for(;n!=a;)s=n.nextSibling,i.removeChild(n),n=s}return t}var Kd={string:i=>String(i)},Qr=class{constructor(e){this.template=e,this.state=void 0}},xt=new WeakMap,Dt=new WeakMap,ts={partial:(i,e)=>{e[i.expression]=new Qr(i.template)},if:(i,e)=>{var t;if(Gd(i.expression,e))if(xt.get(i)!==i.template){xt.set(i,i.template);let a=new Ze(i.template,e,zr);i.replace(a),Dt.set(i,a)}else(t=Dt.get(i))==null||t.update(e);else i.replace(""),xt.delete(i),Dt.delete(i)}},Em=Object.keys(ts),zr={processCallback(i,e,t){var a,r;if(!!t)for(let[n,s]of e){if(s instanceof Fi){if(!s.directive){let u=Em.find(c=>s.template.hasAttribute(c));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=ts[s.directive])==null||a.call(ts,s,t);continue}let d=Gd(n,t);if(d instanceof Qr){xt.get(s)!==d.template?(xt.set(s,d.template),d=new Ze(d.template,d.state,zr),s.value=d,Dt.set(s,d)):(r=Dt.get(s))==null||r.update(d.state);continue}d?(s instanceof X&&s.attributeName.startsWith("aria-")&&(d=String(d)),s instanceof X?typeof d=="boolean"?s.booleanValue=d:typeof d=="function"?s.element[s.attributeName]=d:s.value=d:(s.value=d,xt.delete(s),Dt.delete(s))):s instanceof X?s.value=void 0:(s.value=void 0,xt.delete(s),Dt.delete(s))}}},Yd={"!":i=>!i,"!!":i=>!!i,"==":(i,e)=>i==e,"!=":(i,e)=>i!=e,">":(i,e)=>i>e,">=":(i,e)=>i>=e,"<":(i,e)=>i<e,"<=":(i,e)=>i<=e,"??":(i,e)=>i!=null?i:e,"|":(i,e)=>{var t;return(t=Kd[e])==null?void 0:t.call(Kd,i)}};function vm(i){return fm(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function Gd(i,e={}){var t,a,r,n,s,d,u;let c=vm(i);if(c.length===0||c.some(({type:h})=>!h))return Ki(i);if(((t=c[0])==null?void 0:t.token)===">"){let h=e[(a=c[1])==null?void 0:a.token];if(!h)return Ki(i);let g={...e};h.state=g;let v=c.slice(2);for(let T=0;T<v.length;T+=3){let H=(r=v[T])==null?void 0:r.token,Y=(n=v[T+1])==null?void 0:n.token,I=(s=v[T+2])==null?void 0:s.token;H&&Y==="="&&(g[H]=Yi(I,e))}return h}if(c.length===1)return qr(c[0])?Yi(c[0].token,e):Ki(i);if(c.length===2){let h=(d=c[0])==null?void 0:d.token,g=Yd[h];if(!g||!qr(c[1]))return Ki(i);let v=Yi(c[1].token,e);return g(v)}if(c.length===3){let h=(u=c[1])==null?void 0:u.token,g=Yd[h];if(!g||!qr(c[0])||!qr(c[2]))return Ki(i);let v=Yi(c[0].token,e);if(h==="|")return g(v,c[2].token);let T=Yi(c[2].token,e);return g(v,T)}}function Ki(i){return console.warn(`Warning: invalid expression \`${i}\``),!1}function qr({type:i}){return["number","boolean","string","param"].includes(i)}function Yi(i,e){let t=i[0],a=i.slice(-1);return i==="true"||i==="false"?i==="true":t===a&&["'",'"'].includes(t)?i.slice(1,-1):sa(i)?parseFloat(i):e[i]}function fm(i,e){let t,a,r,n=[];for(;i;){r=null,t=i.length;for(let s in e)a=e[s].exec(i),a&&a.index<t&&(r={token:a[0],type:s,matches:a.slice(1)},t=a.index);t&&n.push({token:i.substr(0,t),type:void 0}),r&&n.push(r),i=i.substr(t+(r?r.token.length:0))}return n}var gm=Object.defineProperty,Am=(i,e,t)=>e in i?gm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Zi=(i,e,t)=>(Am(i,typeof e!="symbol"?e+"":e,t),t),ss=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},rs=(i,e,t)=>(ss(i,e,"read from private field"),t?t.call(i):e.get(i)),Gi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ot=(i,e,t,a)=>(ss(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),is=(i,e,t)=>(ss(i,e,"access private method"),t),ci,Xr,mi,ns,Zd,Jr,os,as={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},qd=m.createElement("template");qd.innerHTML=`
1032
+ </svg>`,Jd=c.createElement("template");Jd.innerHTML=`
1033
+ <slot name="icon">${km}</slot>
1034
+ `;var ms=class extends w{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_ENABLED,o.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:Jd})}get mediaAudioTrackEnabled(){return x(this,o.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){R(this,o.MEDIA_AUDIO_TRACK_ENABLED,e)}};l.customElements.get("media-audio-track-button")||l.customElements.define("media-audio-track-button",ms);var en=class extends be{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_ENABLED,o.MEDIA_AUDIO_TRACK_UNAVAILABLE]}init(){let e=c.createElement("media-audio-track-button");e.part.add("button"),e.preventClick=!0;let t=c.createElement("media-audio-track-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-audio-track-selectmenu")||l.customElements.define("media-audio-track-selectmenu",en);var g=qu(require("@mux/mux-video")),P=require("@mux/playback-core");var lu=require("@mux/mux-video");var Sm="en",Rt={code:Sm};var jd="en";function y(i,e=!0){var r,n;let t=e&&(n=(r=Rt)==null?void 0:r[i])!=null?n:i,a=e?Rt.code:jd;return new hs(t,a)}var hs=class{constructor(e,t=(a=>(a=Rt.code)!=null?a:jd)()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,a)=>{var r;return(r=e[a])!=null?r:""})}toString(){return this.message}};function eu(i){let e="";return Object.entries(i).forEach(([t,a])=>{a!=null&&(e+=`${tn(t)}: ${a}; `)}),e?e.trim():void 0}function tn(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function an(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function $e(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function ps(i){let e=Cm(i).toString();return e?"?"+e:""}function Cm(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}function dt(i){let e=(i!=null?i:"").split(".")[1];if(!e)return{};let t=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(t).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}var bs=(i,e)=>!i||!e?!1:i.contains(e)?!0:bs(i,e.getRootNode().host);var rn=require("@mux/playback-core");var tu="mux.com",Mm=()=>{try{return"2.3.0"}catch{}return"UNKNOWN"},Lm=Mm(),on=()=>Lm,iu=(i,{token:e,customDomain:t=tu,thumbnailTime:a}={})=>{let r=e==null?a:void 0,{aud:n}=dt(e);if(!(e&&n!=="t"))return`https://image.${t}/${i}/thumbnail.webp${ps({token:e,time:r})}`},au=(i,{token:e,customDomain:t=tu}={})=>{let{aud:a}=dt(e);if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${ps({token:e,format:"webp"})}`},ji=i=>{if(i){if([rn.StreamTypes.LIVE,rn.StreamTypes.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return rn.StreamTypes.LIVE}};var Rm={crossorigin:"crossOrigin",playsinline:"playsInline"};function ru(i){var e;return(e=Rm[i])!=null?e:an(i)}var wt,xt,J,nn=class{constructor(e,t){W(this,wt,void 0);W(this,xt,void 0);W(this,J,[]);ce(this,wt,e),ce(this,xt,t)}[Symbol.iterator](){return S(this,J).values()}get length(){return S(this,J).length}get value(){var e;return(e=S(this,J).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(ce(this,J,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return S(this,J)[e]}values(){return S(this,J).values()}keys(){return S(this,J).keys()}forEach(e){S(this,J).forEach(e)}add(...e){var t,a;e.forEach(r=>{this.contains(r)||S(this,J).push(r)}),!(this.value===""&&!((t=S(this,wt))!=null&&t.hasAttribute(`${S(this,xt)}`)))&&((a=S(this,wt))==null||a.setAttribute(`${S(this,xt)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>{S(this,J).splice(S(this,J).indexOf(a),1)}),(t=S(this,wt))==null||t.setAttribute(`${S(this,xt)}`,`${this.value}`)}contains(e){return S(this,J).includes(e)}toggle(e,t){return typeof t!="undefined"?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)}};wt=new WeakMap,xt=new WeakMap,J=new WeakMap;var nu=`[mux-player ${on()}]`;function ut(...i){console.warn(nu,...i)}function Ee(...i){console.error(nu,...i)}function Es(i){var t;let e=(t=i.message)!=null?t:"";if(i.context&&(e+=` ${i.context}`),i.file){let a="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${y("Read more: ")}
1035
+ ${a}${i.file}`}ut(e)}var z={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Dt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},su=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),wm=lu.VideoEvents.filter(i=>i!=="error"),xm=Object.values(z).filter(i=>![z.PLAYSINLINE].includes(i)),Dm=Object.values(Dt);function du(i){i.querySelectorAll(":scope > track").forEach(e=>{var t;(t=i.media)==null||t.append(e.cloneNode())}),wm.forEach(e=>{var t;(t=i.media)==null||t.addEventListener(e,a=>{i.dispatchEvent(new Event(a.type))})})}var fs=class extends U.HTMLElement{static get observedAttributes(){return[...xm,...Dm]}constructor(){super(),this.querySelectorAll(":scope > track").forEach(a=>{var r;(r=this.media)==null||r.append(a.cloneNode())});let e=a=>{for(let r of a)r.type==="childList"&&(r.removedNodes.forEach(n=>{var d,u;let s=(d=this.media)==null?void 0:d.querySelector(`track[src="${n.src}"]`);s&&((u=this.media)==null||u.removeChild(s))}),r.addedNodes.forEach(n=>{var s;(s=this.media)==null||s.append(n.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,t,a){var r,n;switch(e){case Dt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case Dt.VOLUME:{let s=(r=$e(a))!=null?r:1;this.media&&(this.media.volume=s);return}case Dt.PLAYBACKRATE:{let s=(n=$e(a))!=null?n:1;this.media&&(this.media.playbackRate=s,this.media.defaultPlaybackRate=s);return}}}play(){var e,t;return(t=(e=this.media)==null?void 0:e.play())!=null?t:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}requestCast(e){var t;return(t=this.media)==null?void 0:t.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?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(t=(e=this.media)==null?void 0:e.paused)!=null?t:!0}get duration(){var e,t;return(t=(e=this.media)==null?void 0:e.duration)!=null?t:NaN}get ended(){var e,t;return(t=(e=this.media)==null?void 0:e.ended)!=null?t:!1}get buffered(){var e,t;return(t=(e=this.media)==null?void 0:e.buffered)!=null?t:su}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:su}get readyState(){var e,t;return(t=(e=this.media)==null?void 0:e.readyState)!=null?t:0}get videoWidth(){var e,t;return(t=(e=this.media)==null?void 0:e.videoWidth)!=null?t:0}get videoHeight(){var e,t;return(t=(e=this.media)==null?void 0:e.videoHeight)!=null?t:0}get currentTime(){var e,t;return(t=(e=this.media)==null?void 0:e.currentTime)!=null?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return(t=(e=this.media)==null?void 0:e.volume)!=null?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return(t=(e=this.media)==null?void 0:e.playbackRate)!=null?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=$e(this.getAttribute(Dt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(Dt.PLAYBACKRATE,`${e}`):this.removeAttribute(Dt.PLAYBACKRATE)}get crossOrigin(){return ea(this,z.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(z.CROSSORIGIN,`${e}`)}get autoplay(){return ea(this,z.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(z.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(z.AUTOPLAY)}get loop(){return ea(this,z.LOOP)!=null}set loop(e){e?this.setAttribute(z.LOOP,""):this.removeAttribute(z.LOOP)}get muted(){var e,t;return(t=(e=this.media)==null?void 0:e.muted)!=null?t:!1}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return ea(this,z.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(z.MUTED,""):this.removeAttribute(z.MUTED)}get playsInline(){return ea(this,z.PLAYSINLINE)!=null}set playsInline(e){Ee("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(z.PRELOAD,e):this.removeAttribute(z.PRELOAD)}};function ea(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var vs=fs;var Om=Object.defineProperty,Nm=(i,e,t)=>e in i?Om(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Um=(i,e,t)=>(Nm(i,typeof e!="symbol"?e+"":e,t),t),pu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_=(i,e,t)=>(pu(i,e,"read from private field"),t?t.call(i):e.get(i)),We=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ge=(i,e,t,a)=>(pu(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),fi,sn,Ot,ta,ct,mt,ht,Nt,vi,ln,ke,uu=1,cu=0,Pm=1,Bm={processCallback(i,e,t){if(t){for(let[a,r]of e)if(a in t){let n=t[a];typeof n=="boolean"&&r instanceof j&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof j?r.element[r.attributeName]=n:r.value=n}}}},Ze=class extends l.DocumentFragment{constructor(e,t,a=Bm){var r;super(),We(this,fi,void 0),We(this,sn,void 0),this.append(e.content.cloneNode(!0)),Ge(this,fi,bu(this)),Ge(this,sn,a),(r=a.createCallback)==null||r.call(a,this,_(this,fi),t),a.processCallback(this,_(this,fi),t)}update(e){_(this,sn).processCallback(this,_(this,fi),e)}};fi=new WeakMap;sn=new WeakMap;var bu=(i,e=[])=>{let t,a;for(let r of i.attributes||[])if(r.value.includes("{{")){let n=new gs;for([t,a]of hu(r.value))if(!t)n.append(a);else{let s=new j(i,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(let r of i.childNodes)if(r.nodeType===uu&&!(r instanceof HTMLTemplateElement))bu(r,e);else if(r.nodeType===uu||r.data.includes("{{")){let n=[];if(r.data)for([t,a]of hu(r.data))if(!t)n.push(new Text(a));else{let s=new qe(i);n.push(s),e.push([a,s])}else if(r instanceof HTMLTemplateElement){let s=new ia(i,r);n.push(s),e.push([s.expression,s])}r.replaceWith(...n.flatMap(s=>s.replacementNodes||[s]))}return e},mu={},hu=i=>{let e="",t=0,a=mu[i],r=0,n;if(a)return a;for(a=[];n=i[r];r++)n==="{"&&i[r+1]==="{"&&i[r-1]!=="\\"&&i[r+2]&&++t==1?(e&&a.push([cu,e]),e="",r++):n==="}"&&i[r+1]==="}"&&i[r-1]!=="\\"&&!--t?(a.push([Pm,e.trim()]),e="",r++):e+=n||"";return e&&a.push([cu,(t>0?"{{":"")+e]),mu[i]=a},Vm=11,dn=class{get value(){return""}set value(e){}toString(){return this.value}},Eu=new WeakMap,gs=class{constructor(){We(this,Ot,[])}[Symbol.iterator](){return _(this,Ot).values()}get length(){return _(this,Ot).length}item(e){return _(this,Ot)[e]}append(...e){for(let t of e)t instanceof j&&Eu.set(t,this),_(this,Ot).push(t)}toString(){return _(this,Ot).join("")}};Ot=new WeakMap;var j=class extends dn{constructor(e,t,a){super(),We(this,Nt),We(this,ta,""),We(this,ct,void 0),We(this,mt,void 0),We(this,ht,void 0),Ge(this,ct,e),Ge(this,mt,t),Ge(this,ht,a)}get attributeName(){return _(this,mt)}get attributeNamespace(){return _(this,ht)}get element(){return _(this,ct)}get value(){return _(this,ta)}set value(e){_(this,ta)!==e&&(Ge(this,ta,e),!_(this,Nt,vi)||_(this,Nt,vi).length===1?e==null?_(this,ct).removeAttributeNS(_(this,ht),_(this,mt)):_(this,ct).setAttributeNS(_(this,ht),_(this,mt),e):_(this,ct).setAttributeNS(_(this,ht),_(this,mt),_(this,Nt,vi)))}get booleanValue(){return _(this,ct).hasAttributeNS(_(this,ht),_(this,mt))}set booleanValue(e){if(!_(this,Nt,vi)||_(this,Nt,vi).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};ta=new WeakMap;ct=new WeakMap;mt=new WeakMap;ht=new WeakMap;Nt=new WeakSet;vi=function(){return Eu.get(this)};var qe=class extends dn{constructor(e,t){super(),We(this,ln,void 0),We(this,ke,void 0),Ge(this,ln,e),Ge(this,ke,t?[...t]:[new Text])}get replacementNodes(){return _(this,ke)}get parentNode(){return _(this,ln)}get nextSibling(){return _(this,ke)[_(this,ke).length-1].nextSibling}get previousSibling(){return _(this,ke)[0].previousSibling}get value(){return _(this,ke).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===Vm?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);t.length||t.push(new Text),Ge(this,ke,Hm(_(this,ke)[0].parentNode,_(this,ke),t,this.nextSibling))}};ln=new WeakMap;ke=new WeakMap;var ia=class extends qe{constructor(e,t){let a=t.getAttribute("directive")||t.getAttribute("type"),r=t.getAttribute("expression")||t.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),Um(this,"directive"),this.expression=r,this.template=t,this.directive=a}};function Hm(i,e,t,a=null){let r=0,n,s,d,u=t.length,h=e.length;for(;r<u&&r<h&&e[r]==t[r];)r++;for(;r<u&&r<h&&t[u-1]==e[h-1];)a=t[--h,--u];if(r==h)for(;r<u;)i.insertBefore(t[r++],a);if(r==u)for(;r<h;)i.removeChild(e[r++]);else{for(n=e[r];r<u;)d=t[r++],s=n?n.nextSibling:a,n==d?n=s:r<u&&t[r]==s?(i.replaceChild(d,n),n=s):i.insertBefore(d,n);for(;n!=a;)s=n.nextSibling,i.removeChild(n),n=s}return t}var fu={string:i=>String(i)},cn=class{constructor(e){this.template=e,this.state=void 0}},Ut=new WeakMap,Pt=new WeakMap,As={partial:(i,e)=>{e[i.expression]=new cn(i.template)},if:(i,e)=>{var t;if(gu(i.expression,e))if(Ut.get(i)!==i.template){Ut.set(i,i.template);let a=new Ze(i.template,e,mn);i.replace(a),Pt.set(i,a)}else(t=Pt.get(i))==null||t.update(e);else i.replace(""),Ut.delete(i),Pt.delete(i)}},$m=Object.keys(As),mn={processCallback(i,e,t){var a,r;if(t)for(let[n,s]of e){if(s instanceof ia){if(!s.directive){let u=$m.find(h=>s.template.hasAttribute(h));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=As[s.directive])==null||a.call(As,s,t);continue}let d=gu(n,t);if(d instanceof cn){Ut.get(s)!==d.template?(Ut.set(s,d.template),d=new Ze(d.template,d.state,mn),s.value=d,Pt.set(s,d)):(r=Pt.get(s))==null||r.update(d.state);continue}d?(s instanceof j&&s.attributeName.startsWith("aria-")&&(d=String(d)),s instanceof j?typeof d=="boolean"?s.booleanValue=d:typeof d=="function"?s.element[s.attributeName]=d:s.value=d:(s.value=d,Ut.delete(s),Pt.delete(s))):s instanceof j?s.value=void 0:(s.value=void 0,Ut.delete(s),Pt.delete(s))}}},vu={"!":i=>!i,"!!":i=>!!i,"==":(i,e)=>i==e,"!=":(i,e)=>i!=e,">":(i,e)=>i>e,">=":(i,e)=>i>=e,"<":(i,e)=>i<e,"<=":(i,e)=>i<=e,"??":(i,e)=>i!=null?i:e,"|":(i,e)=>{var t;return(t=fu[e])==null?void 0:t.call(fu,i)}};function Wm(i){return Fm(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function gu(i,e={}){var t,a,r,n,s,d,u;let h=Wm(i);if(h.length===0||h.some(({type:m})=>!m))return aa(i);if(((t=h[0])==null?void 0:t.token)===">"){let m=e[(a=h[1])==null?void 0:a.token];if(!m)return aa(i);let p={...e};m.state=p;let E=h.slice(2);for(let I=0;I<E.length;I+=3){let H=(r=E[I])==null?void 0:r.token,k=(n=E[I+1])==null?void 0:n.token,$=(s=E[I+2])==null?void 0:s.token;H&&k==="="&&(p[H]=ra($,e))}return m}if(h.length===1)return un(h[0])?ra(h[0].token,e):aa(i);if(h.length===2){let m=(d=h[0])==null?void 0:d.token,p=vu[m];if(!p||!un(h[1]))return aa(i);let E=ra(h[1].token,e);return p(E)}if(h.length===3){let m=(u=h[1])==null?void 0:u.token,p=vu[m];if(!p||!un(h[0])||!un(h[2]))return aa(i);let E=ra(h[0].token,e);if(m==="|")return p(E,h[2].token);let I=ra(h[2].token,e);return p(E,I)}}function aa(i){return console.warn(`Warning: invalid expression \`${i}\``),!1}function un({type:i}){return["number","boolean","string","param"].includes(i)}function ra(i,e){let t=i[0],a=i.slice(-1);return i==="true"||i==="false"?i==="true":t===a&&["'",'"'].includes(t)?i.slice(1,-1):va(i)?parseFloat(i):e[i]}function Fm(i,e){let t,a,r,n=[];for(;i;){r=null,t=i.length;for(let s in e)a=e[s].exec(i),a&&a.index<t&&(r={token:a[0],type:s,matches:a.slice(1)},t=a.index);t&&n.push({token:i.substr(0,t),type:void 0}),r&&n.push(r),i=i.substr(t+(r?r.token.length:0))}return n}var Km=Object.defineProperty,Ym=(i,e,t)=>e in i?Km(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,oa=(i,e,t)=>(Ym(i,typeof e!="symbol"?e+"":e,t),t),Ss=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ts=(i,e,t)=>(Ss(i,e,"read from private field"),t?t.call(i):e.get(i)),na=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Bt=(i,e,t,a)=>(Ss(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),_s=(i,e,t)=>(Ss(i,e,"access private method"),t),gi,hn,Ai,Is,Au,pn,ks,ys={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},_u=c.createElement("template");_u.innerHTML=`
1000
1036
  <style>
1001
1037
  :host {
1002
1038
  display: inline-block;
@@ -1020,7 +1056,7 @@ ${a}${i.file}`}ot(e)}var Q={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"
1020
1056
  display: none;
1021
1057
  }
1022
1058
  </style>
1023
- `;var ut=class extends l.HTMLElement{constructor(){super(),Gi(this,ns),Gi(this,Jr),Zi(this,"renderRoot"),Zi(this,"renderer"),Gi(this,ci,void 0),Gi(this,Xr,void 0),Gi(this,mi,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());let e=new MutationObserver(t=>{var a;this.mediaController&&!((a=this.mediaController)!=null&&a.breakpointsComputed)||t.some(r=>{let n=r.target;return n===this?!0:n.localName!=="media-controller"?!1:!!(as[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(He.BREAKPOINTS_COMPUTED,this.render),is(this,ns,Zd).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=rs(this,ci))!=null?e:this.constructor.template}set template(e){Ot(this,mi,null),Ot(this,ci,e),this.createRenderer()}get props(){var e,t,a;let r=[...Array.from((t=(e=this.mediaController)==null?void 0:e.attributes)!=null?t:[]).filter(({name:s})=>as[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(let s of r){let d=(a=as[s.name])!=null?a:Ns(s.name),{value:u}=s;u!=null?(sa(u)&&(u=parseFloat(u)),n[d]=u===""?!0:u):n[d]=!1}return n}attributeChangedCallback(e,t,a){e==="template"&&t!=a&&is(this,Jr,os).call(this)}connectedCallback(){is(this,Jr,os).call(this)}createRenderer(){this.template&&this.template!==rs(this,Xr)&&(Ot(this,Xr,this.template),this.renderer=new Ze(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(qd.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};ci=new WeakMap;Xr=new WeakMap;mi=new WeakMap;ns=new WeakSet;Zd=function(i){if(Object.prototype.hasOwnProperty.call(this,i)){let e=this[i];delete this[i],this[i]=e}};Jr=new WeakSet;os=function(){var i;let e=this.getAttribute("template");if(!e||e===rs(this,mi))return;let t=this.getRootNode(),a=(i=t==null?void 0:t.getElementById)==null?void 0:i.call(t,e);if(a){Ot(this,mi,e),Ot(this,ci,a),this.createRenderer();return}_m(e)&&(Ot(this,mi,e),ym(e).then(r=>{let n=m.createElement("template");n.innerHTML=r,Ot(this,ci,n),this.createRenderer()}).catch(console.error))};Zi(ut,"template");Zi(ut,"observedAttributes",["template"]);Zi(ut,"processor",zr);function _m(i){if(!/^(\/|\.\/|https?:\/\/)/.test(i))return!1;let e=/^https?:\/\//.test(i)?void 0:location.origin;try{new URL(i,e)}catch{return!1}return!0}async function ym(i){let e=await fetch(i);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}l.customElements.get("media-theme")||l.customElements.define("media-theme",ut);var Qd=`:host {
1059
+ `;var pt=class extends l.HTMLElement{constructor(){super(),na(this,Is),na(this,pn),oa(this,"renderRoot"),oa(this,"renderer"),na(this,gi,void 0),na(this,hn,void 0),na(this,Ai,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());let e=new MutationObserver(t=>{var a;this.mediaController&&!((a=this.mediaController)!=null&&a.breakpointsComputed)||t.some(r=>{let n=r.target;return n===this?!0:n.localName!=="media-controller"?!1:!!(ys[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(Fe.BREAKPOINTS_COMPUTED,this.render),_s(this,Is,Au).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=Ts(this,gi))!=null?e:this.constructor.template}set template(e){Bt(this,Ai,null),Bt(this,gi,e),this.createRenderer()}get props(){var e,t,a;let r=[...Array.from((t=(e=this.mediaController)==null?void 0:e.attributes)!=null?t:[]).filter(({name:s})=>ys[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(let s of r){let d=(a=ys[s.name])!=null?a:il(s.name),{value:u}=s;u!=null?(va(u)&&(u=parseFloat(u)),n[d]=u===""?!0:u):n[d]=!1}return n}attributeChangedCallback(e,t,a){e==="template"&&t!=a&&_s(this,pn,ks).call(this)}connectedCallback(){_s(this,pn,ks).call(this)}createRenderer(){this.template&&this.template!==Ts(this,hn)&&(Bt(this,hn,this.template),this.renderer=new Ze(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(_u.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};gi=new WeakMap;hn=new WeakMap;Ai=new WeakMap;Is=new WeakSet;Au=function(i){if(Object.prototype.hasOwnProperty.call(this,i)){let e=this[i];delete this[i],this[i]=e}};pn=new WeakSet;ks=function(){var i;let e=this.getAttribute("template");if(!e||e===Ts(this,Ai))return;let t=this.getRootNode(),a=(i=t==null?void 0:t.getElementById)==null?void 0:i.call(t,e);if(a){Bt(this,Ai,e),Bt(this,gi,a),this.createRenderer();return}Gm(e)&&(Bt(this,Ai,e),Zm(e).then(r=>{let n=c.createElement("template");n.innerHTML=r,Bt(this,gi,n),this.createRenderer()}).catch(console.error))};oa(pt,"template");oa(pt,"observedAttributes",["template"]);oa(pt,"processor",mn);function Gm(i){if(!/^(\/|\.\/|https?:\/\/)/.test(i))return!1;let e=/^https?:\/\//.test(i)?void 0:location.origin;try{new URL(i,e)}catch{return!1}return!0}async function Zm(i){let e=await fetch(i);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}l.customElements.get("media-theme")||l.customElements.define("media-theme",pt);var yu=`:host {
1024
1060
  --media-control-display: var(--controls);
1025
1061
  --media-loading-indicator-display: var(--loading-indicator);
1026
1062
  --media-dialog-display: var(--dialog);
@@ -1038,6 +1074,7 @@ ${a}${i.file}`}ot(e)}var Q={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"
1038
1074
  --media-fullscreen-button-display: var(--fullscreen-button);
1039
1075
  --media-cast-button-display: var(--cast-button);
1040
1076
  --media-playback-rate-button-display: var(--playback-rate-button);
1077
+ --media-playback-rate-selectmenu-display: var(--playback-rate-selectmenu);
1041
1078
  --media-volume-range-display: var(--volume-range);
1042
1079
  --media-time-range-display: var(--time-range);
1043
1080
  --media-time-display-display: var(--time-display);
@@ -1095,6 +1132,10 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1095
1132
  --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button));
1096
1133
  --media-cast-button-display: var(--cast-button, var(--top-cast-button));
1097
1134
  --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button));
1135
+ --media-playback-rate-selectmenu-display: var(
1136
+ --captions-selectmenu,
1137
+ var(--media-playback-rate-button-display, var(--top-playback-rate-selectmenu))
1138
+ );
1098
1139
  --media-volume-range-display: var(--volume-range, var(--top-volume-range));
1099
1140
  --media-time-range-display: var(--time-range, var(--top-time-range));
1100
1141
  --media-time-display-display: var(--time-display, var(--top-time-display));
@@ -1122,6 +1163,10 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1122
1163
  --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button));
1123
1164
  --media-cast-button-display: var(--cast-button, var(--center-cast-button));
1124
1165
  --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button));
1166
+ --media-playback-rate-selectmenu-display: var(
1167
+ --playback-rate-selectmenu,
1168
+ var(--media-playback-rate-button-display, var(--center-playback-rate-selectmenu))
1169
+ );
1125
1170
  --media-volume-range-display: var(--volume-range, var(--center-volume-range));
1126
1171
  --media-time-range-display: var(--time-range, var(--center-time-range));
1127
1172
  --media-time-display-display: var(--time-display, var(--center-time-display));
@@ -1148,13 +1193,17 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1148
1193
  --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button));
1149
1194
  --media-cast-button-display: var(--cast-button, var(--bottom-cast-button));
1150
1195
  --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button));
1196
+ --media-playback-rate-selectmenu-display: var(
1197
+ --playback-rate-selectmenu,
1198
+ var(--media-playback-rate-button-display, var(--bottom-playback-rate-selectmenu))
1199
+ );
1151
1200
  --media-volume-range-display: var(--volume-range, var(--bottom-volume-range));
1152
1201
  --media-time-range-display: var(--time-range, var(--bottom-time-range));
1153
1202
  --media-time-display-display: var(--time-display, var(--bottom-time-display));
1154
1203
  --media-duration-display-display: var(--duration-display, var(--bottom-duration-display));
1155
1204
  --media-title-display-display: var(--title-display, var(--bottom-title-display));
1156
1205
  }
1157
- `;var Xd=`
1206
+ `;var Iu=`
1158
1207
  :host {
1159
1208
  z-index: 100;
1160
1209
  display: var(--media-dialog-display, flex);
@@ -1206,17 +1255,17 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1206
1255
  text-align: center;
1207
1256
  line-height: 1.4;
1208
1257
  }
1209
- `,Jd=ae.createElement("template");Jd.innerHTML=`
1258
+ `,ku=ne.createElement("template");ku.innerHTML=`
1210
1259
  <style>
1211
- ${Xd}
1260
+ ${Iu}
1212
1261
  </style>
1213
1262
 
1214
1263
  <div class="dialog">
1215
1264
  <slot></slot>
1216
1265
  </div>
1217
- `;var ct=class extends U.HTMLElement{constructor(){var t;super();this.attachShadow({mode:"open"}),(t=this.shadowRoot)==null||t.appendChild(this.constructor.template.content.cloneNode(!0))}show(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("open",{composed:!0,bubbles:!0})),zd(this)}close(){!this.hasAttribute("open")||(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),Im(this))}attributeChangedCallback(t,a,r){t==="open"&&a!==r&&(r!=null?this.show():this.close())}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("open")&&zd(this)}};ct.styles=Xd,ct.template=Jd,ct.observedAttributes=["open"];function zd(i){let e=new CustomEvent("initfocus",{composed:!0,bubbles:!0,cancelable:!0});if(i.dispatchEvent(e),e.defaultPrevented)return;let t=i.querySelector("[autofocus]:not([disabled])");!t&&i.tabIndex>=0&&(t=i),t||(t=jd(i.shadowRoot)),i._previouslyFocusedElement=ae.activeElement,ae.activeElement instanceof HTMLElement&&ae.activeElement.blur(),i.addEventListener("transitionend",()=>{t instanceof HTMLElement&&t.focus({preventScroll:!0})},{once:!0})}function jd(i){let t=["button","input","keygen","select","textarea"].map(function(r){return r+":not([disabled])"});t.push('[tabindex]:not([disabled]):not([tabindex=""])');let a=i==null?void 0:i.querySelector(t.join(", "));if(!a&&"attachShadow"in Element.prototype){let r=(i==null?void 0:i.querySelectorAll("*"))||[];for(let n=0;n<r.length&&!(r[n].tagName&&r[n].shadowRoot&&(a=jd(r[n].shadowRoot),a));n++);}return a}function Im(i){i._previouslyFocusedElement instanceof HTMLElement&&i._previouslyFocusedElement.focus()}U.customElements.get("media-dialog")||(U.customElements.define("media-dialog",ct),U.MediaDialog=ct);var ls=ct;var eu=ae.createElement("template");eu.innerHTML=`
1266
+ `;var bt=class extends U.HTMLElement{constructor(){var t;super();this.attachShadow({mode:"open"}),(t=this.shadowRoot)==null||t.appendChild(this.constructor.template.content.cloneNode(!0))}show(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("open",{composed:!0,bubbles:!0})),Tu(this)}close(){this.hasAttribute("open")&&(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),Qm(this))}attributeChangedCallback(t,a,r){t==="open"&&a!==r&&(r!=null?this.show():this.close())}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("open")&&Tu(this)}};bt.styles=Iu,bt.template=ku,bt.observedAttributes=["open"];function Tu(i){let e=new CustomEvent("initfocus",{composed:!0,bubbles:!0,cancelable:!0});if(i.dispatchEvent(e),e.defaultPrevented)return;let t=i.querySelector("[autofocus]:not([disabled])");!t&&i.tabIndex>=0&&(t=i),t||(t=Su(i.shadowRoot)),i._previouslyFocusedElement=ne.activeElement,ne.activeElement instanceof HTMLElement&&ne.activeElement.blur(),i.addEventListener("transitionend",()=>{t instanceof HTMLElement&&t.focus({preventScroll:!0})},{once:!0})}function Su(i){let t=["button","input","keygen","select","textarea"].map(function(r){return r+":not([disabled])"});t.push('[tabindex]:not([disabled]):not([tabindex=""])');let a=i==null?void 0:i.querySelector(t.join(", "));if(!a&&"attachShadow"in Element.prototype){let r=(i==null?void 0:i.querySelectorAll("*"))||[];for(let n=0;n<r.length&&!(r[n].tagName&&r[n].shadowRoot&&(a=Su(r[n].shadowRoot),a));n++);}return a}function Qm(i){i._previouslyFocusedElement instanceof HTMLElement&&i._previouslyFocusedElement.focus()}U.customElements.get("media-dialog")||(U.customElements.define("media-dialog",bt),U.MediaDialog=bt);var Cs=bt;var Cu=ne.createElement("template");Cu.innerHTML=`
1218
1267
  <style>
1219
- ${ls.styles}
1268
+ ${Cs.styles}
1220
1269
 
1221
1270
  .close {
1222
1271
  background: none;
@@ -1245,53 +1294,54 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1245
1294
  </svg>
1246
1295
  </button>
1247
1296
  </slot>
1248
- `;var qi=class extends ls{constructor(){var e,t;super(),(t=(e=this.shadowRoot)==null?void 0:e.querySelector(".close"))==null||t.addEventListener("click",()=>{this.close()})}};qi.template=eu;U.customElements.get("mxp-dialog")||(U.customElements.define("mxp-dialog",qi),U.MxpDialog=qi);var Qi=new WeakMap,zi=class{constructor(e,t){this.element=e;this.type=t;this.element.addEventListener(this.type,this);let a=Qi.get(this.element);a&&a.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let t=Qi.get(this.element);t&&t.delete(this.type)}}static for(e){Qi.has(e.element)||Qi.set(e.element,new Map);let t=e.attributeName.slice(2),a=Qi.get(e.element);return a&&a.has(t)?a.get(t):new zi(e.element,t)}};function km(i,e){return i instanceof X&&i.attributeName.startsWith("on")?(zi.for(i).set(e),i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),!0):!1}function Sm(i,e){return e instanceof jr&&i instanceof qe?(e.renderInto(i),!0):!1}function Cm(i,e){return e instanceof DocumentFragment&&i instanceof qe?(e.childNodes.length&&i.replace(...e.childNodes),!0):!1}function Mm(i,e){if(i instanceof X){let t=i.attributeNamespace,a=i.element.getAttributeNS(t,i.attributeName);return String(e)!==a&&(i.value=String(e)),!0}return i.value=String(e),!0}function Lm(i,e){if(i instanceof X&&e instanceof Element){let t=i.element;return t[i.attributeName]!==e&&(i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),t[i.attributeName]=e),!0}return!1}function Rm(i,e){if(typeof e=="boolean"&&i instanceof X){let t=i.attributeNamespace,a=i.element.hasAttributeNS(t,i.attributeName);return e!==a&&(i.booleanValue=e),!0}return!1}function wm(i,e){return e===!1&&i instanceof qe?(i.replace(""),!0):!1}function xm(i,e){Lm(i,e)||Rm(i,e)||km(i,e)||wm(i,e)||Sm(i,e)||Cm(i,e)||Mm(i,e)}var ds=new Map,tu=new WeakMap,iu=new WeakMap,jr=class{constructor(e,t,a){this.strings=e;this.values=t;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(ds.has(this.stringsKey))return ds.get(this.stringsKey);{let e=ae.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<t?`{{ ${n} }}`:""),""),ds.set(this.stringsKey,e),e}}renderInto(e){var r;let t=this.template;if(tu.get(e)!==t){tu.set(e,t);let n=new Ze(t,this.values,this.processor);iu.set(e,n),e instanceof qe?e.replace(...n.children):e.appendChild(n);return}let a=iu.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},Dm={processCallback(i,e,t){var a;if(!!t){for(let[r,n]of e)if(r in t){let s=(a=t[r])!=null?a:"";xm(n,s)}}}};function Qe(i,...e){return new jr(i,e,Dm)}function au(i,e){i.renderInto(e)}var Xi=require("@mux/playback-core"),ru=i=>Qe`
1297
+ `;var sa=class extends Cs{constructor(){var e,t;super(),(t=(e=this.shadowRoot)==null?void 0:e.querySelector(".close"))==null||t.addEventListener("click",()=>{this.close()})}};sa.template=Cu;U.customElements.get("mxp-dialog")||(U.customElements.define("mxp-dialog",sa),U.MxpDialog=sa);var la=new WeakMap,Ls=class i{constructor(e,t){this.element=e;this.type=t;this.element.addEventListener(this.type,this);let a=la.get(this.element);a&&a.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let t=la.get(this.element);t&&t.delete(this.type)}}static for(e){la.has(e.element)||la.set(e.element,new Map);let t=e.attributeName.slice(2),a=la.get(e.element);return a&&a.has(t)?a.get(t):new i(e.element,t)}};function zm(i,e){return i instanceof j&&i.attributeName.startsWith("on")?(Ls.for(i).set(e),i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),!0):!1}function Xm(i,e){return e instanceof bn&&i instanceof qe?(e.renderInto(i),!0):!1}function Jm(i,e){return e instanceof DocumentFragment&&i instanceof qe?(e.childNodes.length&&i.replace(...e.childNodes),!0):!1}function jm(i,e){if(i instanceof j){let t=i.attributeNamespace,a=i.element.getAttributeNS(t,i.attributeName);return String(e)!==a&&(i.value=String(e)),!0}return i.value=String(e),!0}function eh(i,e){if(i instanceof j&&e instanceof Element){let t=i.element;return t[i.attributeName]!==e&&(i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),t[i.attributeName]=e),!0}return!1}function th(i,e){if(typeof e=="boolean"&&i instanceof j){let t=i.attributeNamespace,a=i.element.hasAttributeNS(t,i.attributeName);return e!==a&&(i.booleanValue=e),!0}return!1}function ih(i,e){return e===!1&&i instanceof qe?(i.replace(""),!0):!1}function ah(i,e){eh(i,e)||th(i,e)||zm(i,e)||ih(i,e)||Xm(i,e)||Jm(i,e)||jm(i,e)}var Ms=new Map,Mu=new WeakMap,Lu=new WeakMap,bn=class{constructor(e,t,a){this.strings=e;this.values=t;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(Ms.has(this.stringsKey))return Ms.get(this.stringsKey);{let e=ne.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<t?`{{ ${n} }}`:""),""),Ms.set(this.stringsKey,e),e}}renderInto(e){var r;let t=this.template;if(Mu.get(e)!==t){Mu.set(e,t);let n=new Ze(t,this.values,this.processor);Lu.set(e,n),e instanceof qe?e.replace(...n.children):e.appendChild(n);return}let a=Lu.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},rh={processCallback(i,e,t){var a;if(t){for(let[r,n]of e)if(r in t){let s=(a=t[r])!=null?a:"";ah(n,s)}}}};function Qe(i,...e){return new bn(i,e,rh)}function Ru(i,e){i.renderInto(e)}var da=require("@mux/playback-core"),wu=i=>Qe`
1249
1298
  <style>
1250
- ${Qd}
1299
+ ${yu}
1251
1300
  </style>
1252
- ${Nm(i)}
1253
- `,Om=i=>{let e=i.hotKeys?`${i.hotKeys}`:"";return Hi(i.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},Nm=i=>{var e,t,a,r,n,s,d,u,c,h,g,v,T,H,Y,I,ie,Ie,le,bi,Pt,hs,ps,bs,Es,vs,fs,gs,As,_s,ys,Ts,Is,ks;return Qe`
1301
+ ${lh(i)}
1302
+ `,nh=i=>{let e=i.hotKeys?`${i.hotKeys}`:"";return ji(i.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},oh={TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",DISPLAY:"display",CONTROL_BAR:"control-bar",SELECTMENU:"selectmenu",LISTBOX:"listbox",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"},sh=Object.values(oh).join(", "),lh=i=>{var e,t,a,r,n,s,d,u,h,m,p,E,I,H,k,$,Z,ee,Je,yi,Wt,Ds,Os,Ns,Us,Ps,Bs,Vs,Hs,$s,Ws,Fs,Ks,Ys,Gs;return Qe`
1254
1303
  <media-theme
1255
1304
  template="${i.themeTemplate||!1}"
1256
1305
  defaultstreamtype="${(e=i.defaultStreamType)!=null?e:!1}"
1257
- hotkeys="${Om(i)||!1}"
1306
+ hotkeys="${nh(i)||!1}"
1258
1307
  nohotkeys="${i.noHotKeys||!i.hasSrc||i.isDialogOpen||!1}"
1259
- noautoseektolive="${!!((t=i.streamType)!=null&&t.includes(Xi.StreamTypes.LIVE))&&i.targetLiveWindow!==0}"
1308
+ noautoseektolive="${!!((t=i.streamType)!=null&&t.includes(da.StreamTypes.LIVE))&&i.targetLiveWindow!==0}"
1260
1309
  novolumepref="${i.novolumepref||!1}"
1261
1310
  disabled="${!i.hasSrc||i.isDialogOpen}"
1262
1311
  audio="${(a=i.audio)!=null?a:!1}"
1263
- style="${(r=Cd({"--media-primary-color":i.primaryColor,"--media-secondary-color":i.secondaryColor,"--media-accent-color":i.accentColor}))!=null?r:!1}"
1312
+ style="${(r=eu({"--media-primary-color":i.primaryColor,"--media-secondary-color":i.secondaryColor,"--media-accent-color":i.accentColor}))!=null?r:!1}"
1264
1313
  defaultsubtitles="${!i.defaultHiddenCaptions}"
1265
1314
  forwardseekoffset="${(n=i.forwardSeekOffset)!=null?n:!1}"
1266
1315
  backwardseekoffset="${(s=i.backwardSeekOffset)!=null?s:!1}"
1267
1316
  playbackrates="${(d=i.playbackRates)!=null?d:!1}"
1268
1317
  defaultshowremainingtime="${(u=i.defaultShowRemainingTime)!=null?u:!1}"
1269
- hideduration="${(c=i.hideDuration)!=null?c:!1}"
1270
- title="${(h=i.title)!=null?h:!1}"
1271
- exportparts="top, center, bottom, layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer, controller, poster, live, play, button, seek-backward, seek-forward, mute, captions, airplay, pip, fullscreen, cast, playback-rate, volume, range, time, display, control-bar"
1318
+ defaultduration="${(h=i.defaultDuration)!=null?h:!1}"
1319
+ hideduration="${(m=i.hideDuration)!=null?m:!1}"
1320
+ title="${(p=i.title)!=null?p:!1}"
1321
+ exportparts="${sh}"
1272
1322
  >
1273
1323
  <mux-video
1274
1324
  slot="media"
1275
- target-live-window="${(g=i.targetLiveWindow)!=null?g:!1}"
1276
- stream-type="${(v=Hi(i.streamType))!=null?v:!1}"
1277
- crossorigin="${(T=i.crossOrigin)!=null?T:""}"
1325
+ target-live-window="${(E=i.targetLiveWindow)!=null?E:!1}"
1326
+ stream-type="${(I=ji(i.streamType))!=null?I:!1}"
1327
+ crossorigin="${(H=i.crossOrigin)!=null?H:""}"
1278
1328
  playsinline
1279
- autoplay="${(H=i.autoplay)!=null?H:!1}"
1280
- muted="${(Y=i.muted)!=null?Y:!1}"
1281
- loop="${(I=i.loop)!=null?I:!1}"
1282
- preload="${(ie=i.preload)!=null?ie:!1}"
1283
- debug="${(Ie=i.debug)!=null?Ie:!1}"
1284
- prefer-cmcd="${(le=i.preferCmcd)!=null?le:!1}"
1285
- disable-cookies="${(bi=i.disableCookies)!=null?bi:!1}"
1286
- prefer-playback="${(Pt=i.preferPlayback)!=null?Pt:!1}"
1329
+ autoplay="${(k=i.autoplay)!=null?k:!1}"
1330
+ muted="${($=i.muted)!=null?$:!1}"
1331
+ loop="${(Z=i.loop)!=null?Z:!1}"
1332
+ preload="${(ee=i.preload)!=null?ee:!1}"
1333
+ debug="${(Je=i.debug)!=null?Je:!1}"
1334
+ prefer-cmcd="${(yi=i.preferCmcd)!=null?yi:!1}"
1335
+ disable-cookies="${(Wt=i.disableCookies)!=null?Wt:!1}"
1336
+ prefer-playback="${(Ds=i.preferPlayback)!=null?Ds:!1}"
1287
1337
  start-time="${i.startTime!=null?i.startTime:!1}"
1288
- beacon-collection-domain="${(hs=i.beaconCollectionDomain)!=null?hs:!1}"
1289
- player-software-name="${(ps=i.playerSoftwareName)!=null?ps:!1}"
1290
- player-software-version="${(bs=i.playerSoftwareVersion)!=null?bs:!1}"
1291
- env-key="${(Es=i.envKey)!=null?Es:!1}"
1292
- custom-domain="${(vs=i.customDomain)!=null?vs:!1}"
1293
- src="${i.src?i.src:i.playbackId?(0,Xi.toMuxVideoURL)(i):!1}"
1294
- cast-src="${i.src?i.src:i.playbackId?(0,Xi.toMuxVideoURL)(i):!1}"
1338
+ beacon-collection-domain="${(Os=i.beaconCollectionDomain)!=null?Os:!1}"
1339
+ player-software-name="${(Ns=i.playerSoftwareName)!=null?Ns:!1}"
1340
+ player-software-version="${(Us=i.playerSoftwareVersion)!=null?Us:!1}"
1341
+ env-key="${(Ps=i.envKey)!=null?Ps:!1}"
1342
+ custom-domain="${(Bs=i.customDomain)!=null?Bs:!1}"
1343
+ src="${i.src?i.src:i.playbackId?(0,da.toMuxVideoURL)(i):!1}"
1344
+ cast-src="${i.src?i.src:i.playbackId?(0,da.toMuxVideoURL)(i):!1}"
1295
1345
  exportparts="video"
1296
1346
  >
1297
1347
  ${i.storyboard?Qe`<track label="thumbnails" default kind="metadata" src="${i.storyboard}" />`:Qe``}
@@ -1300,30 +1350,30 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1300
1350
  <media-poster-image
1301
1351
  part="poster"
1302
1352
  exportparts="poster, img"
1303
- src="${i.poster===""?!1:(fs=i.poster)!=null?fs:!1}"
1304
- placeholdersrc="${(gs=i.placeholder)!=null?gs:!1}"
1353
+ src="${i.poster===""?!1:(Vs=i.poster)!=null?Vs:!1}"
1354
+ placeholdersrc="${(Hs=i.placeholder)!=null?Hs:!1}"
1305
1355
  ></media-poster-image>
1306
1356
  </slot>
1307
1357
  <mxp-dialog
1308
1358
  no-auto-hide
1309
- open="${(As=i.isDialogOpen)!=null?As:!1}"
1359
+ open="${($s=i.isDialogOpen)!=null?$s:!1}"
1310
1360
  onclose="${i.onCloseErrorDialog}"
1311
1361
  oninitfocus="${i.onInitFocusDialog}"
1312
1362
  >
1313
- ${(_s=i.dialog)!=null&&_s.title?Qe`<h3>${i.dialog.title}</h3>`:Qe``}
1363
+ ${(Ws=i.dialog)!=null&&Ws.title?Qe`<h3>${i.dialog.title}</h3>`:Qe``}
1314
1364
  <p>
1315
- ${(ys=i.dialog)==null?void 0:ys.message}
1316
- ${(Ts=i.dialog)!=null&&Ts.linkUrl?Qe`<a
1365
+ ${(Fs=i.dialog)==null?void 0:Fs.message}
1366
+ ${(Ks=i.dialog)!=null&&Ks.linkUrl?Qe`<a
1317
1367
  href="${i.dialog.linkUrl}"
1318
1368
  target="_blank"
1319
1369
  rel="external noopener"
1320
- aria-label="${(Is=i.dialog.linkText)!=null?Is:""} ${y("(opens in a new window)")}"
1321
- >${(ks=i.dialog.linkText)!=null?ks:i.dialog.linkUrl}</a
1370
+ aria-label="${(Ys=i.dialog.linkText)!=null?Ys:""} ${y("(opens in a new window)")}"
1371
+ >${(Gs=i.dialog.linkText)!=null?Gs:i.dialog.linkUrl}</a
1322
1372
  >`:Qe``}
1323
1373
  </p>
1324
1374
  </mxp-dialog>
1325
1375
  </media-theme>
1326
- `};var Ji=require("@mux/mux-video");function en(i,e,t,a,r){var d,u,c;let n={},s={};switch(i.code){case Ji.MediaError.MEDIA_ERR_NETWORK:{switch(n.title=y("Network Error",r),n.message=i.message,(d=i.data)==null?void 0:d.response.code){case 412:{n.title=y("Video is not currently available",r),n.message=y("The live stream or video file are not yet ready.",r),s.message=y("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),s.file="412-not-playable.md";break}case 404:{n.title=y("Video does not exist",r),n.message="",s.message=y("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),s.file="404-not-found.md";break}case 403:{if(n.title=y("Invalid playback URL",r),n.message=y("The video URL or playback-token are formatted with incorrect or incomplete information.",r),s.message=y("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",r),s.file="missing-signed-tokens.md",!a)break;let{exp:h,aud:g,sub:v}=nt(a),T=Date.now()>h*1e3,H=v!==t,Y=g!=="v",I={timeStyle:"medium",dateStyle:"medium"};if(T){n.title=y("Video URL has expired",r),n.message=y("The video\u2019s secured playback-token has expired.",r),s.message=y("The video\u2019s secured playback-token has expired.",r),s.context=y("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat(St.code,I).format(h*1e3),currentDate:new Intl.DateTimeFormat(St.code,I).format(Date.now())}),s.file="403-expired-token.md";break}if(H){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.context=y("Specified playback ID: {playbackId} and the playback ID encoded in the playback-token: {tokenPlaybackId}",r).format({playbackId:t,tokenPlaybackId:v}),s.file="403-playback-id-mismatch.md";break}if(Y){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The playback-token is formatted with incorrect information.",r),s.message=y("The playback-token is formatted with incorrect information.",r),s.context=y("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",r).format({tokenType:g}),s.file="403-incorrect-aud-value.md";break}s.message=y("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",r),s.file="403-malformatted-token.md";break}}break}case Ji.MediaError.MEDIA_ERR_DECODE:{let{message:h}=i;n={title:y("Media Error",r),message:h},s.file="media-decode-error.md";break}case Ji.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:{let h=(c=(u=i.data)==null?void 0:u.response)==null?void 0:c.code;if(h>=400&&h<500){i.code=Ji.MediaError.MEDIA_ERR_NETWORK,i.data={response:{code:h}},{dialog:n,devlog:s}=en(i,e,t,a);break}n={title:y("Source Not Supported",r),message:i.message},s.file="media-src-not-supported.md";break}default:n={title:y("Error",r),message:i.message};break}return e&&(n={title:y("Your device appears to be offline",r),message:y("Check your internet connection and try reloading this video.",r)}),{dialog:n,devlog:s}}var nu=`<template id="media-theme-gerwig">
1376
+ `};var ua=require("@mux/mux-video");function En(i,e,t,a,r){var d,u,h;let n={},s={};switch(i.code){case ua.MediaError.MEDIA_ERR_NETWORK:{switch(n.title=y("Network Error",r),n.message=i.message,(d=i.data)==null?void 0:d.response.code){case 412:{n.title=y("Video is not currently available",r),n.message=y("The live stream or video file are not yet ready.",r),s.message=y("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),s.file="412-not-playable.md";break}case 404:{n.title=y("Video does not exist",r),n.message="",s.message=y("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),s.file="404-not-found.md";break}case 403:{if(n.title=y("Invalid playback URL",r),n.message=y("The video URL or playback-token are formatted with incorrect or incomplete information.",r),s.message=y("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",r),s.file="missing-signed-tokens.md",!a)break;let{exp:m,aud:p,sub:E}=dt(a),I=Date.now()>m*1e3,H=E!==t,k=p!=="v",$={timeStyle:"medium",dateStyle:"medium"};if(I){n.title=y("Video URL has expired",r),n.message=y("The video\u2019s secured playback-token has expired.",r),s.message=y("The video\u2019s secured playback-token has expired.",r),s.context=y("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat(Rt.code,$).format(m*1e3),currentDate:new Intl.DateTimeFormat(Rt.code,$).format(Date.now())}),s.file="403-expired-token.md";break}if(H){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.context=y("Specified playback ID: {playbackId} and the playback ID encoded in the playback-token: {tokenPlaybackId}",r).format({playbackId:t,tokenPlaybackId:E}),s.file="403-playback-id-mismatch.md";break}if(k){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The playback-token is formatted with incorrect information.",r),s.message=y("The playback-token is formatted with incorrect information.",r),s.context=y("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",r).format({tokenType:p}),s.file="403-incorrect-aud-value.md";break}s.message=y("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",r),s.file="403-malformatted-token.md";break}}break}case ua.MediaError.MEDIA_ERR_DECODE:{let{message:m}=i;n={title:y("Media Error",r),message:m},s.file="media-decode-error.md";break}case ua.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:{let m=(h=(u=i.data)==null?void 0:u.response)==null?void 0:h.code;if(m>=400&&m<500){i.code=ua.MediaError.MEDIA_ERR_NETWORK,i.data={response:{code:m}},{dialog:n,devlog:s}=En(i,e,t,a);break}n={title:y("Source Not Supported",r),message:i.message},s.file="media-src-not-supported.md";break}default:n={title:y("Error",r),message:i.message};break}return e&&(n={title:y("Your device appears to be offline",r),message:y("Check your internet connection and try reloading this video.",r)}),{dialog:n,devlog:s}}var xu=`<template id="media-theme-gerwig">
1327
1377
  <style>
1328
1378
  @keyframes pre-play-hide {
1329
1379
  0% {
@@ -1366,6 +1416,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1366
1416
  }
1367
1417
 
1368
1418
  :host([audio]) {
1419
+ --_secondary-color: var(--media-secondary-color, black);
1369
1420
  --media-preview-time-border-radius: 3px;
1370
1421
  --media-preview-time-margin: 0 0 5px;
1371
1422
  --media-preview-time-text-shadow: none;
@@ -1389,6 +1440,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1389
1440
 
1390
1441
  :host([audio]) media-control-bar {
1391
1442
  width: 100%;
1443
+ background-color: var(--media-control-background);
1392
1444
  }
1393
1445
 
1394
1446
  /*
@@ -1396,10 +1448,11 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1396
1448
  * Borrowed here, so the captions don't move too fast.
1397
1449
  */
1398
1450
  media-controller ::slotted([slot='media']) {
1451
+ --media-webkit-text-track-transform: translateY(0) scale(0.98);
1399
1452
  --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s;
1400
1453
  }
1401
1454
  media-controller:is([mediapaused], :not([userinactive])) ::slotted([slot='media']) {
1402
- --media-webkit-text-track-transform: translateY(-50px);
1455
+ --media-webkit-text-track-transform: translateY(-50px) scale(0.98);
1403
1456
  --media-webkit-text-track-transition: transform 0.15s ease;
1404
1457
  }
1405
1458
 
@@ -1718,7 +1771,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1718
1771
  opacity: 1;
1719
1772
  }
1720
1773
 
1721
- media-loading-indicator[media-loading]:not([media-paused]) ~ div > * {
1774
+ media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * {
1722
1775
  opacity: 0;
1723
1776
  transition-delay: 400ms;
1724
1777
  }
@@ -1806,6 +1859,19 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1806
1859
  media-mute-button[mediavolumelevel='off'] .muted {
1807
1860
  opacity: 1;
1808
1861
  }
1862
+
1863
+ /**
1864
+ * Our defaults for these buttons are to hide them at small sizes
1865
+ * users can override this with CSS
1866
+ */
1867
+ media-controller:not([breakpointsm]):not([audio]) {
1868
+ --bottom-play-button: none;
1869
+ --bottom-seek-backward-button: none;
1870
+ --bottom-seek-forward-button: none;
1871
+ --bottom-time-display: none;
1872
+ --bottom-playback-rate-selectmenu: none;
1873
+ --bottom-pip-button: none;
1874
+ }
1809
1875
  </style>
1810
1876
 
1811
1877
  <template partial="TitleDisplay">
@@ -1967,7 +2033,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1967
2033
  />
1968
2034
  </svg>
1969
2035
  </media-captions-button>
1970
- <media-captions-listbox slot="listbox" part="bottom captions listbox">
2036
+ <media-captions-listbox slot="listbox" exportparts="option" part="bottom captions listbox">
1971
2037
  <div slot="select-indicator">
1972
2038
  <style>
1973
2039
  .listbox-indicator {
@@ -2046,7 +2112,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2046
2112
  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"
2047
2113
  />
2048
2114
  </svg>
2049
- <svg viewBox="0 0 18 14" aria-hidden="true" slot="exist">
2115
+ <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
2050
2116
  <path
2051
2117
  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"
2052
2118
  />
@@ -2063,13 +2129,17 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2063
2129
 
2064
2130
  <template partial="PlaybackRateSelect">
2065
2131
  <media-playback-rate-selectmenu
2066
- rates="{{playbackrates}}"
2067
2132
  part="bottom playback-rate selectmenu"
2068
2133
  disabled="{{disabled}}"
2069
2134
  aria-disabled="{{disabled}}"
2070
2135
  >
2071
2136
  <media-playback-rate-button slot="button" part="bottom playback-rate button"></media-playback-rate-button>
2072
- <media-playback-rate-listbox slot="listbox" part="bottom playback-rate listbox"></media-playback-rate-listbox>
2137
+ <media-playback-rate-listbox
2138
+ slot="listbox"
2139
+ rates="{{playbackrates}}"
2140
+ exportparts="option"
2141
+ part="bottom playback-rate listbox"
2142
+ ></media-playback-rate-listbox>
2073
2143
  </media-playback-rate-selectmenu>
2074
2144
  </template>
2075
2145
 
@@ -2109,7 +2179,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2109
2179
  />
2110
2180
  </svg>
2111
2181
  </media-audio-track-button>
2112
- <media-audio-track-listbox slot="listbox" part="bottom audio-track listbox">
2182
+ <media-audio-track-listbox slot="listbox" exportparts="option" part="bottom audio-track listbox">
2113
2183
  <div slot="select-indicator">
2114
2184
  <style>
2115
2185
  .listbox-indicator {
@@ -2144,7 +2214,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2144
2214
  />
2145
2215
  </svg>
2146
2216
  </media-rendition-button>
2147
- <media-rendition-listbox slot="listbox" part="bottom rendition listbox">
2217
+ <media-rendition-listbox slot="listbox" exportparts="option" part="bottom rendition listbox">
2148
2218
  <div slot="select-indicator">
2149
2219
  <style>
2150
2220
  .listbox-indicator {
@@ -2171,6 +2241,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2171
2241
  </template>
2172
2242
 
2173
2243
  <media-controller
2244
+ part="controller"
2174
2245
  defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}"
2175
2246
  breakpoints="sm:470"
2176
2247
  gesturesdisabled="{{disabled}}"
@@ -2180,13 +2251,14 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2180
2251
  audio="{{audio}}"
2181
2252
  noautoseektolive="{{noautoseektolive}}"
2182
2253
  defaultsubtitles="{{defaultsubtitles}}"
2254
+ defaultduration="{{defaultduration ?? false}}"
2183
2255
  exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
2184
2256
  style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}"
2185
2257
  >
2186
2258
  <slot name="media" slot="media"></slot>
2187
2259
  <slot name="poster" slot="poster"></slot>
2188
2260
 
2189
- <media-loading-indicator slot="centered-chrome" no-auto-hide></media-loading-indicator>
2261
+ <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
2190
2262
 
2191
2263
  <template if="!audio">
2192
2264
  <!-- Pre-playback UI -->
@@ -2235,16 +2307,11 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2235
2307
  </template>
2236
2308
  {{>TimeRange}}
2237
2309
  <media-control-bar part="control-bar bottom">
2238
- <template if="breakpointsm">
2239
- {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}}
2240
- </template>
2241
- {{>MuteButton}} {{>VolumeRange}}
2310
+ {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}}
2311
+ {{>VolumeRange}}
2242
2312
  <div class="spacer"></div>
2243
- {{>RenditionSelect}}
2244
- <template if="breakpointsm"> {{>PlaybackRateSelect}} </template>
2245
- {{>AudioTrackSelect}} {{>CaptionsMenuButton}} {{>AirplayButton}} {{>CastButton}}
2246
- <template if="breakpointsm"> {{>PipButton}} </template>
2247
- {{>FullscreenButton}}
2313
+ {{>RenditionSelect}} {{>PlaybackRateSelect}} {{>AudioTrackSelect}} {{>CaptionsMenuButton}} {{>AirplayButton}}
2314
+ {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}
2248
2315
  </media-control-bar>
2249
2316
  </template>
2250
2317
 
@@ -2255,15 +2322,12 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2255
2322
  </media-control-bar>
2256
2323
  <template if="targetlivewindow > 0">{{>TimeRange}}</template>
2257
2324
  <media-control-bar part="control-bar bottom">
2258
- <template if="breakpointsm">
2259
- {{>PlayButton}}
2260
- <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
2261
- </template>
2325
+ {{>PlayButton}}
2326
+ <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template>
2262
2327
  {{>MuteButton}} {{>VolumeRange}}
2263
2328
  <div class="spacer"></div>
2264
2329
  {{>RenditionSelect}} {{>AudioTrackSelect}} {{>CaptionsMenuButton}} {{>AirplayButton}} {{>CastButton}}
2265
- <template if="breakpointsm">{{>PipButton}}</template>
2266
- {{>FullscreenButton}}
2330
+ {{>PipButton}} {{>FullscreenButton}}
2267
2331
  </media-control-bar>
2268
2332
  </template>
2269
2333
  </template>
@@ -2279,7 +2343,6 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2279
2343
  {{>MuteButton}}
2280
2344
  <template if="breakpointsm">{{>VolumeRange}}</template>
2281
2345
  {{>TimeDisplay}} {{>TimeRange}}
2282
- <div class="spacer"></div>
2283
2346
  <template if="breakpointsm">{{>PlaybackRateSelect}}</template>
2284
2347
  {{>AirplayButton}} {{>CastButton}}
2285
2348
  </media-control-bar>
@@ -2295,7 +2358,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2295
2358
  <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
2296
2359
  </template>
2297
2360
  <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template>
2298
- <div class="spacer"></div>
2361
+ <template if="!targetlivewindow"><div class="spacer"></div></template>
2299
2362
  {{>AirplayButton}} {{>CastButton}}
2300
2363
  </media-control-bar>
2301
2364
  </template>
@@ -2304,5 +2367,5 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2304
2367
  <slot></slot>
2305
2368
  </media-controller>
2306
2369
  </template>
2307
- `;var us=ae.createElement("template");"innerHTML"in us&&(us.innerHTML=nu);var ou,su,tn=class extends ut{};tn.template=(su=(ou=us.content)==null?void 0:ou.children)==null?void 0:su[0];U.customElements.get("media-theme-gerwig")||U.customElements.define("media-theme-gerwig",tn);var Pm="gerwig";var ze={SRC:"src",POSTER:"poster"},p={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",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",TITLE:"title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",NO_VOLUME_PREF:"no-volume-pref"},cs=["audio","backwardseekoffset","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function Bm(i,e){var a;return{src:!i.playbackId&&i.src,playbackId:i.playbackId,hasSrc:!!i.playbackId||!!i.src,poster:i.poster,storyboard:i.storyboard,storyboardSrc:i.getAttribute(p.STORYBOARD_SRC),placeholder:i.getAttribute("placeholder"),themeTemplate:Vm(i),thumbnailTime:!i.tokens.thumbnail&&i.thumbnailTime,autoplay:i.autoplay,crossOrigin:i.crossOrigin,loop:i.loop,noHotKeys:i.hasAttribute(p.NOHOTKEYS),hotKeys:i.getAttribute(p.HOTKEYS),muted:i.muted,paused:i.paused,preload:i.preload,envKey:i.envKey,preferCmcd:i.preferCmcd,debug:i.debug,disableCookies:i.disableCookies,tokens:i.tokens,beaconCollectionDomain:i.beaconCollectionDomain,maxResolution:i.maxResolution,minResolution:i.minResolution,renditionOrder:i.renditionOrder,metadata:i.metadata,playerSoftwareName:i.playerSoftwareName,playerSoftwareVersion:i.playerSoftwareVersion,startTime:i.startTime,preferPlayback:i.preferPlayback,audio:i.audio,defaultStreamType:i.defaultStreamType,targetLiveWindow:i.getAttribute(f.Attributes.TARGET_LIVE_WINDOW),streamType:Hi(i.getAttribute(f.Attributes.STREAM_TYPE)),primaryColor:i.primaryColor,secondaryColor:i.secondaryColor,accentColor:i.accentColor,forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:Hm(i),playbackRates:i.getAttribute(p.PLAYBACK_RATES),customDomain:(a=i.getAttribute(f.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,title:i.getAttribute(p.TITLE),novolumepref:i.hasAttribute(p.NO_VOLUME_PREF),extraPlaylistParams:{redundant_streams:!0},...e}}function Vm(i){var t,a;let e=i.theme;if(e){let r=(a=(t=i.getRootNode())==null?void 0:t.getElementById)==null?void 0:a.call(t,e);if(r&&r instanceof HTMLTemplateElement)return r;e.startsWith("media-theme-")||(e=`media-theme-${e}`);let n=U.customElements.get(e);if(n!=null&&n.template)return n.template}}function Hm(i){var t;let e=(t=i.mediaController)==null?void 0:t.querySelector("media-time-display");return e&&getComputedStyle(e).getPropertyValue("--media-duration-display-display").trim()==="none"}function lu(i){let e=i.hasAttribute(p.TITLE)?{video_title:i.getAttribute(p.TITLE)}:{};return i.getAttributeNames().filter(t=>t.startsWith("metadata-")).reduce((t,a)=>{let r=i.getAttribute(a);return r!==null&&(t[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),t},e)}var $m=Object.values(f.Attributes),Wm=Object.values(ze),Fm=Object.values(p),Km=Kr(),Ym="mux-player",du={dialog:void 0,isDialogOpen:!1},ea,ta,Xe,ia,Ut,mt,hi,an,uu,aa,ms,ht,pi,rn,cu,nn,mu,on,hu,sn,pu,ji=class extends jo{constructor(){super();$(this,mt);$(this,an);$(this,aa);$(this,ht);$(this,rn);$(this,nn);$(this,on);$(this,sn);$(this,ea,!1);$(this,ta,{});$(this,Xe,!0);$(this,ia,new Fr(this,"hotkeys"));$(this,Ut,{...du,onCloseErrorDialog:()=>W(this,aa,ms).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:t=>{zo(this,ae.activeElement)||t.preventDefault()}});this.attachShadow({mode:"open"}),W(this,an,uu).call(this),this.isConnected&&W(this,mt,hi).call(this)}static get observedAttributes(){var t;return[...(t=jo.observedAttributes)!=null?t:[],...Wm,...$m,...Fm]}get mediaTheme(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("media-theme")}get mediaController(){var t,a;return(a=(t=this.mediaTheme)==null?void 0:t.shadowRoot)==null?void 0:a.querySelector("media-controller")}connectedCallback(){var a;let t=(a=this.shadowRoot)==null?void 0:a.querySelector("mux-video");t&&(t.metadata=lu(this))}attributeChangedCallback(t,a,r){switch(W(this,mt,hi).call(this),super.attributeChangedCallback(t,a,r),t){case p.HOTKEYS:k(this,ia).value=r;break;case p.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&ot(y("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case p.THUMBNAIL_TOKEN:{let{aud:s}=nt(r);r&&s!=="t"&&ot(y("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case p.STORYBOARD_TOKEN:{let{aud:s}=nt(r);r&&s!=="s"&&ot(y("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:s}));break}case f.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&ye(y("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case f.Attributes.STREAM_TYPE:r&&![P.StreamTypes.LIVE,P.StreamTypes.ON_DEMAND,P.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:Xo({file:"invalid-stream-type.md",message:y("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):this.targetLiveWindow=r===P.StreamTypes.LIVE?0:Number.NaN}[f.Attributes.PLAYBACK_ID,ze.SRC,p.PLAYBACK_TOKEN].includes(t)&&a!==r&&de(this,Ut,{...k(this,Ut),...du}),W(this,ht,pi).call(this,{[wd(t)]:r})}get preferCmcd(){var t;return(t=this.getAttribute(f.Attributes.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?P.CmcdTypeValues.includes(t)?this.setAttribute(f.Attributes.PREFER_CMCD,t):ot(`Invalid value for preferCmcd. Must be one of ${P.CmcdTypeValues.join()}`):this.removeAttribute(f.Attributes.PREFER_CMCD))}get hasPlayed(){var t,a;return(a=(t=this.mediaController)==null?void 0:t.hasAttribute("media-has-played"))!=null?a:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute("media-time-is-live")}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(p.THEME))!=null?t:Pm}set theme(t){this.setAttribute(p.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let a={};for(let r of t.getAttributeNames()){if(cs.includes(r))continue;let n=t.getAttribute(r);a[$r(r)]=n===""?!0:n}return a}set themeProps(t){var r,n;W(this,mt,hi).call(this);let a={...this.themeProps,...t};for(let s in a){if(cs.includes(s))continue;let d=t==null?void 0:t[s];typeof d=="boolean"||d==null?(r=this.mediaTheme)==null||r.toggleAttribute(Hr(s),Boolean(d)):(n=this.mediaTheme)==null||n.setAttribute(Hr(s),d)}}get playbackId(){var t;return(t=this.getAttribute(f.Attributes.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(f.Attributes.PLAYBACK_ID,t):this.removeAttribute(f.Attributes.PLAYBACK_ID)}get src(){var t,a;return this.playbackId?(t=Nt(this,ze.SRC))!=null?t:void 0:(a=this.getAttribute(ze.SRC))!=null?a:void 0}set src(t){t?this.setAttribute(ze.SRC,t):this.removeAttribute(ze.SRC)}get poster(){var a;let t=this.getAttribute(ze.POSTER);if(t!=null)return t;if(this.playbackId&&!this.audio)return Ld(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(a=this.thumbnailTime)!=null?a:this.startTime,token:this.tokens.thumbnail})}set poster(t){t||t===""?this.setAttribute(ze.POSTER,t):this.removeAttribute(ze.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(p.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(p.STORYBOARD_SRC,t):this.removeAttribute(p.STORYBOARD_SRC)}get storyboard(){if(this.storyboardSrc&&!this.tokens.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[P.StreamTypes.LIVE,P.StreamTypes.UNKNOWN].includes(this.streamType)))return Rd(this.playbackId,{customDomain:this.customDomain,token:this.tokens.storyboard})}get audio(){return this.hasAttribute(p.AUDIO)}set audio(t){if(!t){this.removeAttribute(p.AUDIO);return}this.setAttribute(p.AUDIO,"")}get hotkeys(){return k(this,ia)}get nohotkeys(){return this.hasAttribute(p.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(p.NOHOTKEYS);return}this.setAttribute(p.NOHOTKEYS,"")}get thumbnailTime(){return Ye(this.getAttribute(p.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(p.THUMBNAIL_TIME,`${t}`)}get title(){var t;return(t=this.getAttribute(p.TITLE))!=null?t:""}set title(t){t!==this.title&&(t?this.setAttribute(p.TITLE,t):this.removeAttribute("title"),super.title=t)}get placeholder(){var t;return(t=Nt(this,p.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(p.PLACEHOLDER,`${t}`)}get primaryColor(){var a,r;let t=this.getAttribute(p.PRIMARY_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_primary-color"))==null?void 0:r.trim(),t))return t}set primaryColor(t){this.setAttribute(p.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var a,r;let t=this.getAttribute(p.SECONDARY_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_secondary-color"))==null?void 0:r.trim(),t))return t}set secondaryColor(t){this.setAttribute(p.SECONDARY_COLOR,`${t}`)}get accentColor(){var a,r;let t=this.getAttribute(p.ACCENT_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_accent-color"))==null?void 0:r.trim(),t))return t}set accentColor(t){this.setAttribute(p.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(p.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(p.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(p.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(!!this.hasAttribute(p.PLAYBACK_RATES))return this.getAttribute(p.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,a)=>t-a)}set playbackRates(t){if(!t){this.removeAttribute(p.PLAYBACK_RATES);return}this.setAttribute(p.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=Ye(this.getAttribute(p.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(p.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=Ye(this.getAttribute(p.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(p.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(p.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(p.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(p.DEFAULT_HIDDEN_CAPTIONS)}get playerSoftwareName(){var t;return(t=this.getAttribute(f.Attributes.PLAYER_SOFTWARE_NAME))!=null?t:Ym}get playerSoftwareVersion(){var t;return(t=this.getAttribute(f.Attributes.PLAYER_SOFTWARE_VERSION))!=null?t:Km}get beaconCollectionDomain(){var t;return(t=this.getAttribute(f.Attributes.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(f.Attributes.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(f.Attributes.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(f.Attributes.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(f.Attributes.MAX_RESOLUTION,t):this.removeAttribute(f.Attributes.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(f.Attributes.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(f.Attributes.MIN_RESOLUTION,t):this.removeAttribute(f.Attributes.MIN_RESOLUTION))}get renditionOrder(){var t;return(t=this.getAttribute(f.Attributes.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(f.Attributes.RENDITION_ORDER,t):this.removeAttribute(f.Attributes.RENDITION_ORDER))}get customDomain(){var t;return(t=this.getAttribute(f.Attributes.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(f.Attributes.CUSTOM_DOMAIN,t):this.removeAttribute(f.Attributes.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Nt(this,f.Attributes.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(f.Attributes.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(p.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(p.NO_VOLUME_PREF,""):this.removeAttribute(p.NO_VOLUME_PREF)}get debug(){return Nt(this,f.Attributes.DEBUG)!=null}set debug(t){t?this.setAttribute(f.Attributes.DEBUG,""):this.removeAttribute(f.Attributes.DEBUG)}get disableCookies(){return Nt(this,f.Attributes.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(f.Attributes.DISABLE_COOKIES,""):this.removeAttribute(f.Attributes.DISABLE_COOKIES)}get streamType(){var t,a,r;return(r=(a=this.getAttribute(f.Attributes.STREAM_TYPE))!=null?a:(t=this.media)==null?void 0:t.streamType)!=null?r:P.StreamTypes.UNKNOWN}set streamType(t){this.setAttribute(f.Attributes.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,a,r;return(r=(a=this.getAttribute(p.DEFAULT_STREAM_TYPE))!=null?a:(t=this.mediaController)==null?void 0:t.getAttribute(p.DEFAULT_STREAM_TYPE))!=null?r:P.StreamTypes.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(p.DEFAULT_STREAM_TYPE,t):this.removeAttribute(p.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,a;return this.hasAttribute(p.TARGET_LIVE_WINDOW)?+this.getAttribute(p.TARGET_LIVE_WINDOW):(a=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(t){t!=this.targetLiveWindow&&(t==null?this.removeAttribute(p.TARGET_LIVE_WINDOW):this.setAttribute(p.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return Ye(Nt(this,f.Attributes.START_TIME))}set startTime(t){this.setAttribute(f.Attributes.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(f.Attributes.PREFER_PLAYBACK);if(t===P.PlaybackTypes.MSE||t===P.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===P.PlaybackTypes.MSE||t===P.PlaybackTypes.NATIVE?this.setAttribute(f.Attributes.PREFER_PLAYBACK,t):this.removeAttribute(f.Attributes.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(W(this,mt,hi).call(this),!this.media){ye("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...lu(this),...t}}async addCuePoints(t){var a;if(W(this,mt,hi).call(this),!this.media){ye("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(a=this.media)==null?void 0:a.addCuePoints(t)}get activeCuePoint(){var t;return(t=this.media)==null?void 0:t.activeCuePoint}get cuePoints(){var t,a;return(a=(t=this.media)==null?void 0:t.cuePoints)!=null?a:[]}getStartDate(){var t;return(t=this.media)==null?void 0:t.getStartDate()}get currentPdt(){var t;return(t=this.media)==null?void 0:t.currentPdt}get tokens(){let t=this.getAttribute(p.PLAYBACK_TOKEN),a=this.getAttribute(p.THUMBNAIL_TOKEN),r=this.getAttribute(p.STORYBOARD_TOKEN);return{...k(this,ta),...t!=null?{playback:t}:{},...a!=null?{thumbnail:a}:{},...r!=null?{storyboard:r}:{}}}set tokens(t){de(this,ta,t!=null?t:{})}get playbackToken(){var t;return(t=this.getAttribute(p.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(p.PLAYBACK_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(p.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(p.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(p.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(p.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,a,r,n){var d;let s=(d=this.media)==null?void 0:d.nativeEl;if(!!s)return(0,P.addTextTrack)(s,t,a,r,n)}removeTextTrack(t){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(!!a)return(0,P.removeTextTrack)(a,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}};ea=new WeakMap,ta=new WeakMap,Xe=new WeakMap,ia=new WeakMap,Ut=new WeakMap,mt=new WeakSet,hi=function(){var t,a,r;if(!k(this,ea)){de(this,ea,!0),W(this,ht,pi).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof U.HTMLElement))throw""}catch{ye("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof f.default))throw""}catch{ye("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof Cn))throw""}catch{ye("<media-controller> failed to upgrade!")}Ud(this),W(this,rn,cu).call(this),W(this,nn,mu).call(this),W(this,on,hu).call(this),de(this,Xe,(a=(t=this.mediaController)==null?void 0:t.hasAttribute("userinactive"))!=null?a:!0),W(this,sn,pu).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>{W(this,ht,pi).call(this)})}},an=new WeakSet,uu=function(){var t,a;try{(t=window==null?void 0:window.CSS)==null||t.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(a=window==null?void 0:window.CSS)==null||a.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},aa=new WeakSet,ms=function(t){Object.assign(k(this,Ut),t),W(this,ht,pi).call(this)},ht=new WeakSet,pi=function(t={}){au(ru(Bm(this,{...k(this,Ut),...t})),this.shadowRoot)},rn=new WeakSet,cu=function(){let t=r=>{var d,u;if(!(r!=null&&r.startsWith("theme-")))return;let n=r.replace(/^theme-/,"");if(cs.includes(n))return;let s=this.getAttribute(r);s!=null?(d=this.mediaTheme)==null||d.setAttribute(n,s):(u=this.mediaTheme)==null||u.removeAttribute(n)};new MutationObserver(r=>{for(let{attributeName:n}of r)t(n)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(t)},nn=new WeakSet,mu=function(){var a;let t=r=>{let{detail:n}=r;if(n instanceof f.MediaError||(n=new f.MediaError(n.message,n.code,n.fatal)),!(n!=null&&n.fatal)){ot(n),n.data&&ot(`${n.name} data:`,n.data);return}let{dialog:s,devlog:d}=en(n,!window.navigator.onLine,this.playbackId,this.playbackToken);d.message&&Xo(d),ye(n),n.data&&ye(`${n.name} data:`,n.data),W(this,aa,ms).call(this,{isDialogOpen:!0,dialog:s})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(r={})=>{var s,d,u;if(!(((s=this.media)==null?void 0:s.error)instanceof f.MediaError))return r;let{devlog:n}=en((d=this.media)==null?void 0:d.error,!window.navigator.onLine,this.playbackId,this.playbackToken,!1);return{player_error_code:(u=this.media)==null?void 0:u.error.code,player_error_message:n.message?String(n.message):r.player_error_message,player_error_context:n.context?String(n.context):r.player_error_context}}),(a=this.media)==null||a.addEventListener("error",r=>{var s,d;let{detail:n}=r;if(!n){let{message:u,code:c}=(d=(s=this.media)==null?void 0:s.error)!=null?d:{};n=new f.MediaError(u,c)}!(n!=null&&n.fatal)||this.dispatchEvent(new CustomEvent("error",{detail:n}))})},on=new WeakSet,hu=function(){var a,r,n,s;let t=()=>W(this,ht,pi).call(this);(r=(a=this.media)==null?void 0:a.textTracks)==null||r.addEventListener("addtrack",t),(s=(n=this.media)==null?void 0:n.textTracks)==null||s.addEventListener("removetrack",t)},sn=new WeakSet,pu=function(){var h,g;let t=/.*Version\/.*Safari\/.*/.test(navigator.userAgent);if(!/Firefox/i.test(navigator.userAgent))return;let r,n=new WeakMap,s=()=>this.streamType===P.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,d=(v,T,H=!1)=>{if(s())return;Array.from(v&&v.activeCues||[]).forEach(I=>{if(!(!I.snapToLines||I.line<-5||I.line>=0&&I.line<10))if(!T||this.paused){let ie=I.text.split(`
2308
- `).length,Ie=t?-2:-3;this.streamType===P.StreamTypes.LIVE&&(Ie=t?-1:-2);let le=Ie-ie;if(I.line===le&&!H)return;n.has(I)||n.set(I,I.line),I.line=le-1,I.line=le}else setTimeout(()=>{I.line=n.get(I)||"auto"},500)})},u=()=>{var v,T;d(r,(T=(v=this.mediaController)==null?void 0:v.hasAttribute("userinactive"))!=null?T:!1)},c=()=>{var H,Y;let T=Array.from(((Y=(H=this.mediaController)==null?void 0:H.media)==null?void 0:Y.textTracks)||[]).filter(I=>["subtitles","captions"].includes(I.kind)&&I.mode==="showing")[0];T!==r&&(r==null||r.removeEventListener("cuechange",u)),r=T,r==null||r.addEventListener("cuechange",u),d(r,k(this,Xe))};if(c(),(h=this.textTracks)==null||h.addEventListener("change",c),(g=this.textTracks)==null||g.addEventListener("addtrack",c),navigator.userAgent.includes("Chrome/")){let v=()=>{d(r,k(this,Xe),!0),this.paused||window.requestAnimationFrame(v)};this.addEventListener("playing",()=>{v()})}this.addEventListener("userinactivechange",()=>{var T,H;let v=(H=(T=this.mediaController)==null?void 0:T.hasAttribute("userinactive"))!=null?H:!0;k(this,Xe)!==v&&(de(this,Xe,v),d(r,k(this,Xe)))})};function Nt(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}U.customElements.get("mux-player")||(U.customElements.define("mux-player",ji),U.MuxPlayerElement=ji);var Gm=ji;
2370
+ `;var Rs=ne.createElement("template");"innerHTML"in Rs&&(Rs.innerHTML=xu);var Du,Ou,fn=class extends pt{};fn.template=(Ou=(Du=Rs.content)==null?void 0:Du.children)==null?void 0:Ou[0];U.customElements.get("media-theme-gerwig")||U.customElements.define("media-theme-gerwig",fn);var uh="gerwig";var ze={SRC:"src",POSTER:"poster"},b={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref"},ws=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function ch(i,e){var a;return{src:!i.playbackId&&i.src,playbackId:i.playbackId,hasSrc:!!i.playbackId||!!i.src,poster:i.poster,storyboard:i.storyboard,storyboardSrc:i.getAttribute(b.STORYBOARD_SRC),placeholder:i.getAttribute("placeholder"),themeTemplate:mh(i),thumbnailTime:!i.tokens.thumbnail&&i.thumbnailTime,autoplay:i.autoplay,crossOrigin:i.crossOrigin,loop:i.loop,noHotKeys:i.hasAttribute(b.NOHOTKEYS),hotKeys:i.getAttribute(b.HOTKEYS),muted:i.muted,paused:i.paused,preload:i.preload,envKey:i.envKey,preferCmcd:i.preferCmcd,debug:i.debug,disableCookies:i.disableCookies,tokens:i.tokens,beaconCollectionDomain:i.beaconCollectionDomain,maxResolution:i.maxResolution,minResolution:i.minResolution,renditionOrder:i.renditionOrder,metadata:i.metadata,playerSoftwareName:i.playerSoftwareName,playerSoftwareVersion:i.playerSoftwareVersion,startTime:i.startTime,preferPlayback:i.preferPlayback,audio:i.audio,defaultStreamType:i.defaultStreamType,targetLiveWindow:i.getAttribute(g.Attributes.TARGET_LIVE_WINDOW),streamType:ji(i.getAttribute(g.Attributes.STREAM_TYPE)),primaryColor:i.getAttribute(b.PRIMARY_COLOR),secondaryColor:i.getAttribute(b.SECONDARY_COLOR),accentColor:i.getAttribute(b.ACCENT_COLOR),forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultDuration:i.defaultDuration,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:hh(i),playbackRates:i.getAttribute(b.PLAYBACK_RATES),customDomain:(a=i.getAttribute(g.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,title:i.getAttribute(b.TITLE),novolumepref:i.hasAttribute(b.NO_VOLUME_PREF),...e,extraSourceParams:i.extraSourceParams}}function mh(i){var t,a;let e=i.theme;if(e){let r=(a=(t=i.getRootNode())==null?void 0:t.getElementById)==null?void 0:a.call(t,e);if(r&&r instanceof HTMLTemplateElement)return r;e.startsWith("media-theme-")||(e=`media-theme-${e}`);let n=U.customElements.get(e);if(n!=null&&n.template)return n.template}}function hh(i){var t;let e=(t=i.mediaController)==null?void 0:t.querySelector("media-time-display");return e&&getComputedStyle(e).getPropertyValue("--media-duration-display-display").trim()==="none"}function Nu(i){let e=i.hasAttribute(b.TITLE)?{video_title:i.getAttribute(b.TITLE)}:{};return i.getAttributeNames().filter(t=>t.startsWith("metadata-")).reduce((t,a)=>{let r=i.getAttribute(a);return r!==null&&(t[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),t},e)}var ph=Object.values(g.Attributes),bh=Object.values(ze),Eh=Object.values(b),fh=on(),vh="mux-player",Uu={dialog:void 0,isDialogOpen:!1},gh={redundant_streams:!0},ma,ha,Et,pa,$t,Xe,Vt,vn,Pu,ba,xs,ft,_i,gn,Bu,An,Vu,_n,Hu,yn,$u,ca=class extends vs{constructor(){super();W(this,Xe);W(this,vn);W(this,ba);W(this,ft);W(this,gn);W(this,An);W(this,_n);W(this,yn);W(this,ma,!1);W(this,ha,{});W(this,Et,!0);W(this,pa,new nn(this,"hotkeys"));W(this,$t,{...Uu,onCloseErrorDialog:()=>F(this,ba,xs).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:t=>{bs(this,ne.activeElement)||t.preventDefault()}});this.attachShadow({mode:"open"}),F(this,vn,Pu).call(this),this.isConnected&&F(this,Xe,Vt).call(this)}static get observedAttributes(){var t;return[...(t=vs.observedAttributes)!=null?t:[],...bh,...ph,...Eh]}get mediaTheme(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("media-theme")}get mediaController(){var t,a;return(a=(t=this.mediaTheme)==null?void 0:t.shadowRoot)==null?void 0:a.querySelector("media-controller")}connectedCallback(){var a;let t=(a=this.shadowRoot)==null?void 0:a.querySelector("mux-video");t&&(t.metadata=Nu(this))}attributeChangedCallback(t,a,r){switch(F(this,Xe,Vt).call(this),super.attributeChangedCallback(t,a,r),t){case b.HOTKEYS:S(this,pa).value=r;break;case b.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&ut(y("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case b.THUMBNAIL_TOKEN:{let{aud:s}=dt(r);r&&s!=="t"&&ut(y("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case b.STORYBOARD_TOKEN:{let{aud:s}=dt(r);r&&s!=="s"&&ut(y("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:s}));break}case g.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&Ee(y("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case g.Attributes.STREAM_TYPE:r&&![P.StreamTypes.LIVE,P.StreamTypes.ON_DEMAND,P.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:Es({file:"invalid-stream-type.md",message:y("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):this.targetLiveWindow=r===P.StreamTypes.LIVE?0:Number.NaN}[g.Attributes.PLAYBACK_ID,ze.SRC,b.PLAYBACK_TOKEN].includes(t)&&a!==r&&ce(this,$t,{...S(this,$t),...Uu}),F(this,ft,_i).call(this,{[ru(t)]:r})}get preferCmcd(){var t;return(t=this.getAttribute(g.Attributes.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?P.CmcdTypeValues.includes(t)?this.setAttribute(g.Attributes.PREFER_CMCD,t):ut(`Invalid value for preferCmcd. Must be one of ${P.CmcdTypeValues.join()}`):this.removeAttribute(g.Attributes.PREFER_CMCD))}get hasPlayed(){var t,a;return(a=(t=this.mediaController)==null?void 0:t.hasAttribute(o.MEDIA_HAS_PLAYED))!=null?a:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute(o.MEDIA_TIME_IS_LIVE)}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(b.THEME))!=null?t:uh}set theme(t){this.setAttribute(b.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let a={};for(let r of t.getAttributeNames()){if(ws.includes(r))continue;let n=t.getAttribute(r);a[an(r)]=n===""?!0:n}return a}set themeProps(t){var r,n;F(this,Xe,Vt).call(this);let a={...this.themeProps,...t};for(let s in a){if(ws.includes(s))continue;let d=t==null?void 0:t[s];typeof d=="boolean"||d==null?(r=this.mediaTheme)==null||r.toggleAttribute(tn(s),!!d):(n=this.mediaTheme)==null||n.setAttribute(tn(s),d)}}get playbackId(){var t;return(t=this.getAttribute(g.Attributes.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(g.Attributes.PLAYBACK_ID,t):this.removeAttribute(g.Attributes.PLAYBACK_ID)}get src(){var t,a;return this.playbackId?(t=Ht(this,ze.SRC))!=null?t:void 0:(a=this.getAttribute(ze.SRC))!=null?a:void 0}set src(t){t?this.setAttribute(ze.SRC,t):this.removeAttribute(ze.SRC)}get poster(){var a;let t=this.getAttribute(ze.POSTER);if(t!=null)return t;if(this.playbackId&&!this.audio)return iu(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(a=this.thumbnailTime)!=null?a:this.startTime,token:this.tokens.thumbnail})}set poster(t){t||t===""?this.setAttribute(ze.POSTER,t):this.removeAttribute(ze.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(b.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(b.STORYBOARD_SRC,t):this.removeAttribute(b.STORYBOARD_SRC)}get storyboard(){if(this.storyboardSrc&&!this.tokens.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[P.StreamTypes.LIVE,P.StreamTypes.UNKNOWN].includes(this.streamType)))return au(this.playbackId,{customDomain:this.customDomain,token:this.tokens.storyboard})}get audio(){return this.hasAttribute(b.AUDIO)}set audio(t){if(!t){this.removeAttribute(b.AUDIO);return}this.setAttribute(b.AUDIO,"")}get hotkeys(){return S(this,pa)}get nohotkeys(){return this.hasAttribute(b.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(b.NOHOTKEYS);return}this.setAttribute(b.NOHOTKEYS,"")}get thumbnailTime(){return $e(this.getAttribute(b.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(b.THUMBNAIL_TIME,`${t}`)}get title(){var t;return(t=this.getAttribute(b.TITLE))!=null?t:""}set title(t){t!==this.title&&(t?this.setAttribute(b.TITLE,t):this.removeAttribute("title"),super.title=t)}get placeholder(){var t;return(t=Ht(this,b.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(b.PLACEHOLDER,`${t}`)}get primaryColor(){var a,r;let t=this.getAttribute(b.PRIMARY_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_primary-color"))==null?void 0:r.trim(),t))return t}set primaryColor(t){this.setAttribute(b.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var a,r;let t=this.getAttribute(b.SECONDARY_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_secondary-color"))==null?void 0:r.trim(),t))return t}set secondaryColor(t){this.setAttribute(b.SECONDARY_COLOR,`${t}`)}get accentColor(){var a,r;let t=this.getAttribute(b.ACCENT_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_accent-color"))==null?void 0:r.trim(),t))return t}set accentColor(t){this.setAttribute(b.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(b.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(b.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(b.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(b.PLAYBACK_RATES))return this.getAttribute(b.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,a)=>t-a)}set playbackRates(t){if(!t){this.removeAttribute(b.PLAYBACK_RATES);return}this.setAttribute(b.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=$e(this.getAttribute(b.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(b.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=$e(this.getAttribute(b.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(b.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(b.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(b.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(b.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return $e(this.getAttribute(b.DEFAULT_DURATION))}set defaultDuration(t){t==null?this.removeAttribute(b.DEFAULT_DURATION):this.setAttribute(b.DEFAULT_DURATION,`${t}`)}get playerSoftwareName(){var t;return(t=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_NAME))!=null?t:vh}get playerSoftwareVersion(){var t;return(t=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_VERSION))!=null?t:fh}get beaconCollectionDomain(){var t;return(t=this.getAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(g.Attributes.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(g.Attributes.MAX_RESOLUTION,t):this.removeAttribute(g.Attributes.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(g.Attributes.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(g.Attributes.MIN_RESOLUTION,t):this.removeAttribute(g.Attributes.MIN_RESOLUTION))}get renditionOrder(){var t;return(t=this.getAttribute(g.Attributes.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(g.Attributes.RENDITION_ORDER,t):this.removeAttribute(g.Attributes.RENDITION_ORDER))}get extraSourceParams(){return this.hasAttribute(b.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(b.EXTRA_SOURCE_PARAMS)).entries()].reduce((t,[a,r])=>(t[a]=r,t),{}):gh}set extraSourceParams(t){t==null?this.removeAttribute(b.EXTRA_SOURCE_PARAMS):this.setAttribute(b.EXTRA_SOURCE_PARAMS,new URLSearchParams(t).toString())}get customDomain(){var t;return(t=this.getAttribute(g.Attributes.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(g.Attributes.CUSTOM_DOMAIN,t):this.removeAttribute(g.Attributes.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Ht(this,g.Attributes.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(g.Attributes.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(b.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(b.NO_VOLUME_PREF,""):this.removeAttribute(b.NO_VOLUME_PREF)}get debug(){return Ht(this,g.Attributes.DEBUG)!=null}set debug(t){t?this.setAttribute(g.Attributes.DEBUG,""):this.removeAttribute(g.Attributes.DEBUG)}get disableCookies(){return Ht(this,g.Attributes.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(g.Attributes.DISABLE_COOKIES,""):this.removeAttribute(g.Attributes.DISABLE_COOKIES)}get streamType(){var t,a,r;return(r=(a=this.getAttribute(g.Attributes.STREAM_TYPE))!=null?a:(t=this.media)==null?void 0:t.streamType)!=null?r:P.StreamTypes.UNKNOWN}set streamType(t){this.setAttribute(g.Attributes.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,a,r;return(r=(a=this.getAttribute(b.DEFAULT_STREAM_TYPE))!=null?a:(t=this.mediaController)==null?void 0:t.getAttribute(b.DEFAULT_STREAM_TYPE))!=null?r:P.StreamTypes.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(b.DEFAULT_STREAM_TYPE,t):this.removeAttribute(b.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,a;return this.hasAttribute(b.TARGET_LIVE_WINDOW)?+this.getAttribute(b.TARGET_LIVE_WINDOW):(a=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(t){t!=this.targetLiveWindow&&(t==null?this.removeAttribute(b.TARGET_LIVE_WINDOW):this.setAttribute(b.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return $e(Ht(this,g.Attributes.START_TIME))}set startTime(t){this.setAttribute(g.Attributes.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(g.Attributes.PREFER_PLAYBACK);if(t===P.PlaybackTypes.MSE||t===P.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===P.PlaybackTypes.MSE||t===P.PlaybackTypes.NATIVE?this.setAttribute(g.Attributes.PREFER_PLAYBACK,t):this.removeAttribute(g.Attributes.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(F(this,Xe,Vt).call(this),!this.media){Ee("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...Nu(this),...t}}get _hlsConfig(){var t;return(t=this.media)==null?void 0:t._hlsConfig}set _hlsConfig(t){if(F(this,Xe,Vt).call(this),!this.media){Ee("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=t}async addCuePoints(t){var a;if(F(this,Xe,Vt).call(this),!this.media){Ee("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(a=this.media)==null?void 0:a.addCuePoints(t)}get activeCuePoint(){var t;return(t=this.media)==null?void 0:t.activeCuePoint}get cuePoints(){var t,a;return(a=(t=this.media)==null?void 0:t.cuePoints)!=null?a:[]}getStartDate(){var t;return(t=this.media)==null?void 0:t.getStartDate()}get currentPdt(){var t;return(t=this.media)==null?void 0:t.currentPdt}get tokens(){let t=this.getAttribute(b.PLAYBACK_TOKEN),a=this.getAttribute(b.THUMBNAIL_TOKEN),r=this.getAttribute(b.STORYBOARD_TOKEN);return{...S(this,ha),...t!=null?{playback:t}:{},...a!=null?{thumbnail:a}:{},...r!=null?{storyboard:r}:{}}}set tokens(t){ce(this,ha,t!=null?t:{})}get playbackToken(){var t;return(t=this.getAttribute(b.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(b.PLAYBACK_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(b.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(b.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(b.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(b.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,a,r,n){var d;let s=(d=this.media)==null?void 0:d.nativeEl;if(s)return(0,P.addTextTrack)(s,t,a,r,n)}removeTextTrack(t){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(a)return(0,P.removeTextTrack)(a,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}};ma=new WeakMap,ha=new WeakMap,Et=new WeakMap,pa=new WeakMap,$t=new WeakMap,Xe=new WeakSet,Vt=function(){var t,a,r;if(!S(this,ma)){ce(this,ma,!0),F(this,ft,_i).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof U.HTMLElement))throw""}catch{Ee("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof g.default))throw""}catch{Ee("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof Qn))throw""}catch{Ee("<media-controller> failed to upgrade!")}du(this),F(this,gn,Bu).call(this),F(this,An,Vu).call(this),F(this,_n,Hu).call(this),ce(this,Et,(a=(t=this.mediaController)==null?void 0:t.hasAttribute(T.USER_INACTIVE))!=null?a:!0),F(this,yn,$u).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>{F(this,ft,_i).call(this)})}},vn=new WeakSet,Pu=function(){var t,a;try{(t=window==null?void 0:window.CSS)==null||t.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(a=window==null?void 0:window.CSS)==null||a.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},ba=new WeakSet,xs=function(t){Object.assign(S(this,$t),t),F(this,ft,_i).call(this)},ft=new WeakSet,_i=function(t={}){Ru(wu(ch(this,{...S(this,$t),...t})),this.shadowRoot)},gn=new WeakSet,Bu=function(){let t=r=>{var d,u;if(!(r!=null&&r.startsWith("theme-")))return;let n=r.replace(/^theme-/,"");if(ws.includes(n))return;let s=this.getAttribute(r);s!=null?(d=this.mediaTheme)==null||d.setAttribute(n,s):(u=this.mediaTheme)==null||u.removeAttribute(n)};new MutationObserver(r=>{for(let{attributeName:n}of r)t(n)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(t)},An=new WeakSet,Vu=function(){var a;let t=r=>{let{detail:n}=r;if(n instanceof g.MediaError||(n=new g.MediaError(n.message,n.code,n.fatal)),!(n!=null&&n.fatal)){ut(n),n.data&&ut(`${n.name} data:`,n.data);return}let{dialog:s,devlog:d}=En(n,!window.navigator.onLine,this.playbackId,this.playbackToken);d.message&&Es(d),Ee(n),n.data&&Ee(`${n.name} data:`,n.data),F(this,ba,xs).call(this,{isDialogOpen:!0,dialog:s})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(r={})=>{var s,d,u;if(!(((s=this.media)==null?void 0:s.error)instanceof g.MediaError))return r;let{devlog:n}=En((d=this.media)==null?void 0:d.error,!window.navigator.onLine,this.playbackId,this.playbackToken,!1);return{player_error_code:(u=this.media)==null?void 0:u.error.code,player_error_message:n.message?String(n.message):r.player_error_message,player_error_context:n.context?String(n.context):r.player_error_context}}),(a=this.media)==null||a.addEventListener("error",r=>{var s,d;let{detail:n}=r;if(!n){let{message:u,code:h}=(d=(s=this.media)==null?void 0:s.error)!=null?d:{};n=new g.MediaError(u,h)}n!=null&&n.fatal&&this.dispatchEvent(new CustomEvent("error",{detail:n}))})},_n=new WeakSet,Hu=function(){var a,r,n,s;let t=()=>F(this,ft,_i).call(this);(r=(a=this.media)==null?void 0:a.textTracks)==null||r.addEventListener("addtrack",t),(s=(n=this.media)==null?void 0:n.textTracks)==null||s.addEventListener("removetrack",t)},yn=new WeakSet,$u=function(){var h,m;if(!/Firefox/i.test(navigator.userAgent))return;let a,r=new WeakMap,n=()=>this.streamType===P.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,s=(p,E,I=!1)=>{if(n())return;Array.from(p&&p.activeCues||[]).forEach(k=>{if(!(!k.snapToLines||k.line<-5||k.line>=0&&k.line<10))if(!E||this.paused){let $=k.text.split(`
2371
+ `).length,Z=-3;this.streamType===P.StreamTypes.LIVE&&(Z=-2);let ee=Z-$;if(k.line===ee&&!I)return;r.has(k)||r.set(k,k.line),k.line=ee}else setTimeout(()=>{k.line=r.get(k)||"auto"},500)})},d=()=>{var p,E;s(a,(E=(p=this.mediaController)==null?void 0:p.hasAttribute(T.USER_INACTIVE))!=null?E:!1)},u=()=>{var I,H;let E=Array.from(((H=(I=this.mediaController)==null?void 0:I.media)==null?void 0:H.textTracks)||[]).filter(k=>["subtitles","captions"].includes(k.kind)&&k.mode==="showing")[0];E!==a&&(a==null||a.removeEventListener("cuechange",d)),a=E,a==null||a.addEventListener("cuechange",d),s(a,S(this,Et))};u(),(h=this.textTracks)==null||h.addEventListener("change",u),(m=this.textTracks)==null||m.addEventListener("addtrack",u),this.addEventListener("userinactivechange",()=>{var E,I;let p=(I=(E=this.mediaController)==null?void 0:E.hasAttribute(T.USER_INACTIVE))!=null?I:!0;S(this,Et)!==p&&(ce(this,Et,p),s(a,S(this,Et)))})};function Ht(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}U.customElements.get("mux-player")||(U.customElements.define("mux-player",ca),U.MuxPlayerElement=ca);var Ah=ca;