@mux/mux-player 2.3.3 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +825 -377
- package/dist/index.mjs +37 -40
- package/dist/mux-player.js +815 -367
- package/dist/mux-player.mjs +815 -367
- package/dist/themes/classic/index.cjs.js +84 -21
- package/dist/themes/classic/index.js +84 -21
- package/dist/themes/classic/index.mjs +84 -21
- package/dist/themes/gerwig/index.cjs.js +110 -50
- package/dist/themes/gerwig/index.js +110 -50
- package/dist/themes/gerwig/index.mjs +110 -50
- package/dist/themes/microvideo/index.cjs.js +90 -23
- package/dist/themes/microvideo/index.js +90 -23
- package/dist/themes/microvideo/index.mjs +90 -23
- package/dist/themes/minimal/index.cjs.js +86 -21
- package/dist/themes/minimal/index.js +86 -21
- package/dist/themes/minimal/index.mjs +86 -21
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,148 @@
|
|
|
1
|
-
"use strict";var ec=Object.create;var _a=Object.defineProperty;var tc=Object.getOwnPropertyDescriptor;var ic=Object.getOwnPropertyNames;var ac=Object.getPrototypeOf,rc=Object.prototype.hasOwnProperty;var nc=(i,e)=>{for(var t in e)_a(i,t,{get:e[t],enumerable:!0})},tl=(i,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ic(e))!rc.call(i,r)&&r!==t&&_a(i,r,{get:()=>e[r],enumerable:!(a=tc(e,r))||a.enumerable});return i};var oc=(i,e,t)=>(t=i!=null?ec(ac(i)):{},tl(e||!i||!i.__esModule?_a(t,"default",{value:i,enumerable:!0}):t,i)),sc=i=>tl(_a({},"__esModule",{value:!0}),i);var Rn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var S=(i,e,t)=>(Rn(i,e,"read from private field"),t?t.call(i):e.get(i)),K=(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)},me=(i,e,t,a)=>(Rn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t);var Y=(i,e,t)=>(Rn(i,e,"access private method"),t);var Uh={};nc(Uh,{MediaError:()=>g.MediaError,default:()=>Ph,getVideoAttribute:()=>Ft});module.exports=sc(Uh);var Gt=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Gt{}globalThis.DocumentFragment=i}var Si=class extends Gt{},wn=class extends Gt{},lc={get(i){},define(i,e,t){},upgrade(i){},whenDefined(i){return Promise.resolve(Si)}},Ci,xn=class{constructor(e,t={}){K(this,Ci,void 0);me(this,Ci,t==null?void 0:t.detail)}get detail(){return S(this,Ci)}initCustomEvent(){}};Ci=new WeakMap;function dc(i,e){return new Si}var il={document:{createElement:dc},DocumentFragment,customElements:lc,CustomEvent:xn,EventTarget:Gt,HTMLElement:Si,HTMLVideoElement:wn},al=typeof window=="undefined"||typeof globalThis.customElements=="undefined",U=al?il:globalThis,le=al?il.document:globalThis.document;var v={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"},At={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_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_CHAPTERS_CUES:"mediaChaptersCues"},rl=Object.entries(At),o=rl.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{}),qe=rl.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),Wh=Object.entries(qe).reduce((i,[e,t])=>{let a=o[e];return a&&(i[t]=a),i},{userinactivechange:"userinactive"}),nl=Object.entries(o).reduce((i,[e,t])=>{let a=qe[e];return a&&(i[t]=a),i},{userinactive:"userinactivechange"}),Me={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},_t={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Dn={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},de={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},fe={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var X={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",SETTINGS:()=>"settings",AUDIO_TRACKS:()=>"audio tracks",QUALITY:()=>"quality"},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"},cc={...X,...D};function ol(i){return i==null?void 0:i.map(mc).join(" ")}function sl(i){return i==null?void 0:i.split(/\s+/).map(hc)}function mc(i){if(i){let{id:e,width:t,height:a}=i;return[e,t,a].filter(r=>r!=null).join(":")}}function hc(i){if(i){let[e,t,a]=i.split(":");return{id:e,width:t,height:a}}}function ll(i){return i==null?void 0:i.map(pc).join(" ")}function dl(i){return i==null?void 0:i.split(/\s+/).map(bc)}function pc(i){if(i){let{id:e,kind:t,language:a,label:r}=i;return[e,t,a,r].filter(n=>n!=null).join(":")}}function bc(i){if(i){let[e,t,a,r]=i.split(":");return{id:e,kind:t,language:a,label:r}}}function ya(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 ul(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function cl(i){return typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i)}function Ta(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))}var Ia=i=>new Promise(e=>setTimeout(e,i));var ml=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],Ec=(i,e)=>{let t=i===1?ml[e].singular:ml[e].plural;return`${i} ${t}`},yt=i=>{if(!cl(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&&Ec(d,u)).filter(d=>d).join(", ")}${t?" remaining":""}`};function Le(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 Yh=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 ka=(i,e,t=".value")=>{let a=i.querySelector(t);a&&(a.textContent=e)},fc=(i,e)=>{let t=`slot[name="${e}"]`,a=i.shadowRoot.querySelector(t);return a?a.children:[]},Sa=(i,e)=>fc(i,e)[0],it=(i,e)=>!i||!e?!1:i.contains(e)?!0:it(i,e.getRootNode().host),at=(i,e)=>{if(!i)return null;let t=i.closest(e);return t||at(i.getRootNode().host,e)};function Nn(i=document){var e;let t=i==null?void 0:i.activeElement;return t?(e=Nn(t.shadowRoot))!=null?e:t:null}function hl(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 pl(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 bl(i,e,t,a){let r=On(t,a),n=On(t,{x:i,y:e}),s=On(a,{x:i,y:e});return n>r||s>r?n>s?1:0:n/r}function On(i,e){return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}function N(i,e){let t=gc(i,a=>a===e);return t||Pn(i,e)}function gc(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(e(n.selectorText))return n}}function Pn(i,e){var t,a;let r=(t=i.querySelectorAll("style"))!=null?t:[],n=r==null?void 0:r[r.length-1];return n!=null&&n.sheet?(n==null||n.sheet.insertRule(`${e}{}`,n.sheet.cssRules.length),(a=n.sheet.cssRules)==null?void 0:a[n.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",i),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function R(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}R(i,e,void 0)!==a&&i.setAttribute(e,`${a}`)}function w(i,e){return i.hasAttribute(e)}function M(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}w(i,e)!=t&&i.toggleAttribute(e,t)}function L(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}`;L(i,e,void 0)!==a&&i.setAttribute(e,a)}var Ca=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},Un=class{observe(){}unobserve(){}disconnect(){}},El={createElement:function(){return new Ma.HTMLElement},createElementNS:function(){return new Ma.HTMLElement},addEventListener(){},removeEventListener(){}},Ma={ResizeObserver:Un,document:El,HTMLElement:class extends Ca{},DocumentFragment:class extends Ca{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(i){return{matches:!1,media:i}}},vl=typeof window=="undefined"||typeof window.customElements=="undefined",fl=Object.keys(Ma).every(i=>i in globalThis),l=vl&&!fl?Ma:globalThis,c=vl&&!fl?El:globalThis.document;var Ac=Object.defineProperty,_c=(i,e,t)=>e in i?Ac(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,yc=(i,e,t)=>(_c(i,typeof e!="symbol"?e+"":e,t),t),gl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},he=(i,e,t)=>(gl(i,e,"read from private field"),t?t.call(i):e.get(i)),La=(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)},Ra=(i,e,t,a)=>(gl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Re,wa,qt,xa,Al=c.createElement("template");Al.innerHTML=`
|
|
1
|
+
"use strict";var uv=Object.create;var Wr=Object.defineProperty;var cv=Object.getOwnPropertyDescriptor;var mv=Object.getOwnPropertyNames;var hv=Object.getPrototypeOf,pv=Object.prototype.hasOwnProperty;var vv=(i,e)=>{for(var t in e)Wr(i,t,{get:e[t],enumerable:!0})},vc=(i,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of mv(e))!pv.call(i,r)&&r!==t&&Wr(i,r,{get:()=>e[r],enumerable:!(a=cv(e,r))||a.enumerable});return i};var fv=(i,e,t)=>(t=i!=null?uv(hv(i)):{},vc(e||!i||!i.__esModule?Wr(t,"default",{value:i,enumerable:!0}):t,i)),bv=i=>vc(Wr({},"__esModule",{value:!0}),i);var Po=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var O=(i,e,t)=>(Po(i,e,"read from private field"),t?t.call(i):e.get(i)),ee=(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)=>(Po(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t);var te=(i,e,t)=>(Po(i,e,"access private method"),t);var w0={};vv(w0,{MediaError:()=>A.MediaError,default:()=>M0,getVideoAttribute:()=>Di});module.exports=bv(w0);var Ni=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Ni{}globalThis.DocumentFragment=i}var Ra=class extends Ni{},No=class extends Ni{},Ev={get(i){},define(i,e,t){},upgrade(i){},whenDefined(i){return Promise.resolve(Ra)}},xa,Uo=class{constructor(e,t={}){ee(this,xa,void 0);Ce(this,xa,t==null?void 0:t.detail)}get detail(){return O(this,xa)}initCustomEvent(){}};xa=new WeakMap;function gv(i,e){return new Ra}var fc={document:{createElement:gv},DocumentFragment,customElements:Ev,CustomEvent:Uo,EventTarget:Ni,HTMLElement:Ra,HTMLVideoElement:No},bc=typeof window=="undefined"||typeof globalThis.customElements=="undefined",Z=bc?fc:globalThis,ye=bc?fc.document:globalThis.document;var h={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"},y={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},Bo={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_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_CHAPTERS_CUES:"mediaChaptersCues"},Ec=Object.entries(Bo),s=Ec.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{}),yt=Ec.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),P0=Object.entries(yt).reduce((i,[e,t])=>{let a=s[e];return a&&(i[t]=a),i},{userinactivechange:"userinactive"}),gc=Object.entries(s).reduce((i,[e,t])=>{let a=yt[e];return a&&(i[t]=a),i},{userinactive:"userinactivechange"}),Ne={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Pt={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Wo={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},Te={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},Ue={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},_c={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"};var K={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",SETTINGS:()=>"settings",AUDIO_TRACKS:()=>"audio tracks",QUALITY:()=>"quality"},Y={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"},Av={...K,...Y};function Ac(i){return i==null?void 0:i.map(yv).join(" ")}function Hr(i){return i==null?void 0:i.split(/\s+/).map(Tv)}function yv(i){if(i){let{id:e,width:t,height:a}=i;return[e,t,a].filter(r=>r!=null).join(":")}}function Tv(i){if(i){let[e,t,a]=i.split(":");return{id:e,width:t,height:a}}}function yc(i){return i==null?void 0:i.map(kv).join(" ")}function $r(i){return i==null?void 0:i.split(/\s+/).map(Sv)}function kv(i){if(i){let{id:e,kind:t,language:a,label:r}=i;return[e,t,a,r].filter(n=>n!=null).join(":")}}function Sv(i){if(i){let[e,t,a,r]=i.split(":");return{id:e,kind:t,language:a,label:r}}}function Tc(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function kc(i){return typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i)}function Fr(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))}var Vr=i=>new Promise(e=>setTimeout(e,i));var Sc=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],Iv=(i,e)=>{let t=i===1?Sc[e].singular:Sc[e].plural;return`${i} ${t}`},ii=i=>{if(!kc(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&&Iv(d,u)).filter(d=>d).join(", ")}${t?" remaining":""}`};function ze(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),o=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||o>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(t?"-":"")+n+r+a}var W0=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 Kr=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},Yr=class extends Kr{},Ho=class{observe(){}unobserve(){}disconnect(){}},Ic={createElement:function(){return new Gr.HTMLElement},createElementNS:function(){return new Gr.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(i){return!1}},Gr={ResizeObserver:Ho,document:Ic,Node:Yr,HTMLElement:class extends Yr{},DocumentFragment:class extends Kr{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(i){return null},setItem(i,e){},removeItem(i){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(i){return{matches:!1,media:i}}},Cc=typeof window=="undefined"||typeof window.customElements=="undefined",Lc=Object.keys(Gr).every(i=>i in globalThis),l=Cc&&!Lc?Gr:globalThis,m=Cc&&!Lc?Ic:globalThis.document;var Mc=new WeakMap,$o=i=>{let e=Mc.get(i);return e||Mc.set(i,e=new Set),e},wc=new l.ResizeObserver(i=>{for(let e of i)for(let t of $o(e.target))t(e)});function Le(i,e){$o(i).add(e),wc.observe(i)}function Xe(i,e){let t=$o(i);t.delete(e),t.size||wc.unobserve(i)}function X(i){var e;return(e=qr(i))!=null?e:Be(i,"media-controller")}function qr(i){var e;let{MEDIA_CONTROLLER:t}=y,a=i.getAttribute(t);if(a)return(e=ri(i))==null?void 0:e.getElementById(a)}var Zr=(i,e,t=".value")=>{let a=i.querySelector(t);a&&(a.textContent=e)},Lv=(i,e)=>{let t=`slot[name="${e}"]`,a=i.shadowRoot.querySelector(t);return a?a.children:[]},Qr=(i,e)=>Lv(i,e)[0],ue=(i,e)=>!i||!e?!1:i!=null&&i.contains(e)?!0:ue(i,e.getRootNode().host),Be=(i,e)=>{if(!i)return null;let t=i.closest(e);return t||Be(i.getRootNode().host,e)};function ai(i=document){var e;let t=i==null?void 0:i.activeElement;return t?(e=ai(t.shadowRoot))!=null?e:t:null}function ri(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 Rc(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 xc(i,e,t,a){let r=Fo(t,a),n=Fo(t,{x:i,y:e}),o=Fo(a,{x:i,y:e});return n>r||o>r?n>o?1:0:n/r}function Fo(i,e){return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}function N(i,e){let t=Mv(i,a=>a===e);return t||Vo(i,e)}function Mv(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(e(n.selectorText))return n}}function Vo(i,e){var t,a;let r=(t=i.querySelectorAll("style"))!=null?t:[],n=r==null?void 0:r[r.length-1];return n!=null&&n.sheet?(n==null||n.sheet.insertRule(`${e}{}`,n.sheet.cssRules.length),(a=n.sheet.cssRules)==null?void 0:a[n.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",i),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function x(i,e,t=Number.NaN){let a=i.getAttribute(e);return a!=null?+a:t}function U(i,e,t){let a=+t;if(t==null||Number.isNaN(a)){i.hasAttribute(e)&&i.removeAttribute(e);return}x(i,e,void 0)!==a&&i.setAttribute(e,`${a}`)}function H(i,e){return i.hasAttribute(e)}function B(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}H(i,e)!=t&&i.toggleAttribute(e,t)}function I(i,e,t=null){var a;return(a=i.getAttribute(e))!=null?a:t}function k(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}let a=`${t}`;I(i,e,void 0)!==a&&i.setAttribute(e,a)}var Dc=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Nt=(i,e,t)=>(Dc(i,e,"read from private field"),t?t.call(i):e.get(i)),wv=(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)},zr=(i,e,t,a)=>(Dc(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),be,Oc=m.createElement("template");Oc.innerHTML=`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
</style>
|
|
8
|
+
`;var Ko=class extends l.HTMLElement{constructor(e={}){if(super(),wv(this,be,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=Oc.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[y.MEDIA_CONTROLLER,s.MEDIA_PAUSED]}attributeChangedCallback(e,t,a){var r,n,o,d,u;e===y.MEDIA_CONTROLLER&&(t&&((n=(r=Nt(this,be))==null?void 0:r.unassociateElement)==null||n.call(r,this),zr(this,be,null)),a&&this.isConnected&&(zr(this,be,(o=this.getRootNode())==null?void 0:o.getElementById(a)),(u=(d=Nt(this,be))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),zr(this,be,Rv(this)),this.getAttribute(y.MEDIA_CONTROLLER)&&((t=(e=Nt(this,be))==null?void 0:e.associateElement)==null||t.call(e,this)),(a=Nt(this,be))==null||a.addEventListener("pointerdown",this),(r=Nt(this,be))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,t,a,r;this.getAttribute(y.MEDIA_CONTROLLER)&&((t=(e=Nt(this,be))==null?void 0:e.unassociateElement)==null||t.call(e,this)),(a=Nt(this,be))==null||a.removeEventListener("pointerdown",this),(r=Nt(this,be))==null||r.removeEventListener("click",this),zr(this,be,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:o}=e,{left:d,top:u,width:c,height:f}=this.getBoundingClientRect(),E=n-d,v=o-u;if(E<0||v<0||E>c||v>f||c===0&&f===0)return;let{pointerType:b=this._pointerType}=e;if(this._pointerType=void 0,b===Wo.TOUCH){this.handleTap(e);return}else if(b===Wo.MOUSE){this.handleMouseClick(e);return}}}}get mediaPaused(){return H(this,s.MEDIA_PAUSED)}set mediaPaused(e){B(this,s.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?h.MEDIA_PLAY_REQUEST:h.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(t,{composed:!0,bubbles:!0}))}};be=new WeakMap;function Rv(i){var e;let t=i.getAttribute(y.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):Be(i,"media-controller")}l.customElements.get("media-gesture-receiver")||l.customElements.define("media-gesture-receiver",Ko);var xv=Object.defineProperty,Dv=(i,e,t)=>e in i?xv(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ov=(i,e,t)=>(Dv(i,typeof e!="symbol"?e+"":e,t),t),Qo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Go=(i,e,t)=>(Qo(i,e,"read from private field"),t?t.call(i):e.get(i)),ni=(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)},Yo=(i,e,t,a)=>(Qo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),We=(i,e,t)=>(Qo(i,e,"access private method"),t),Xr,Ui,qo,Pc,Zo,Nc,Da,Jr,jr,zo,Bi,Oa,M={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive"},Uc=m.createElement("template");Uc.innerHTML=`
|
|
9
|
+
<style>
|
|
10
|
+
|
|
11
|
+
:host([${s.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
|
|
12
|
+
outline: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
position: relative;
|
|
18
|
+
display: inline-block;
|
|
19
|
+
line-height: 0;
|
|
20
|
+
background-color: var(--media-background-color, #000);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host(:not([${M.AUDIO}])) [part~=layer]:not([part~=media-layer]) {
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
bottom: 0;
|
|
28
|
+
right: 0;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-flow: column nowrap;
|
|
31
|
+
align-items: start;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
background: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
slot[name=media] {
|
|
37
|
+
display: var(--media-slot-display, contents);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
:host([${M.AUDIO}]) slot[name=media] {
|
|
42
|
+
display: var(--media-slot-display, none);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
:host([${M.AUDIO}]) [part~=layer][part~=gesture-layer] {
|
|
47
|
+
height: 0;
|
|
48
|
+
display: block;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
:host(:not([${M.AUDIO}])[${M.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),
|
|
53
|
+
:host(:not([${M.AUDIO}])[${M.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([hidden])) {
|
|
59
|
+
pointer-events: auto;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host(:not([${M.AUDIO}])) *[part~=layer][part~=centered-layer] {
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host(:not([${M.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
|
|
68
|
+
:host(:not([${M.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {
|
|
69
|
+
align-self: stretch;
|
|
70
|
+
flex-grow: 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
slot[name=middle-chrome] {
|
|
74
|
+
display: inline;
|
|
75
|
+
flex-grow: 1;
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
background: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
::slotted([slot=media]),
|
|
82
|
+
::slotted([slot=poster]) {
|
|
83
|
+
width: 100%;
|
|
84
|
+
height: 100%;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
:host(:not([${M.AUDIO}])) .spacer {
|
|
89
|
+
flex-grow: 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
:host(:-webkit-full-screen) {
|
|
94
|
+
|
|
95
|
+
width: 100% !important;
|
|
96
|
+
height: 100% !important;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
::slotted(:not([slot=media]):not([slot=poster]):not([${M.NO_AUTOHIDE}]):not([hidden])) {
|
|
101
|
+
opacity: 1;
|
|
102
|
+
transition: opacity 0.25s;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
:host([${M.USER_INACTIVE}]:not([${s.MEDIA_PAUSED}]):not([${s.MEDIA_IS_AIRPLAYING}]):not([${s.MEDIA_IS_CASTING}]):not([${M.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${M.NO_AUTOHIDE}])) {
|
|
107
|
+
opacity: 0;
|
|
108
|
+
transition: opacity 1s;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:host([${M.USER_INACTIVE}]:not([${s.MEDIA_PAUSED}]):not([${s.MEDIA_IS_CASTING}]):not([${M.AUDIO}])) ::slotted([slot=media]) {
|
|
112
|
+
cursor: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
::slotted(media-control-bar) {
|
|
116
|
+
align-self: stretch;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
:host(:not([${M.AUDIO}])[${s.MEDIA_HAS_PLAYED}]) slot[name=poster] {
|
|
121
|
+
display: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
::slotted([role="menu"]) {
|
|
125
|
+
align-self: end;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
::slotted([role="dialog"]) {
|
|
129
|
+
align-self: center;
|
|
130
|
+
}
|
|
131
|
+
</style>
|
|
132
|
+
|
|
133
|
+
<slot name="media" part="layer media-layer"></slot>
|
|
134
|
+
<slot name="poster" part="layer poster-layer"></slot>
|
|
135
|
+
<slot name="gestures-chrome" part="layer gesture-layer">
|
|
136
|
+
<media-gesture-receiver slot="gestures-chrome"></media-gesture-receiver>
|
|
137
|
+
</slot>
|
|
138
|
+
<span part="layer vertical-layer">
|
|
139
|
+
<slot name="top-chrome" part="top chrome"></slot>
|
|
140
|
+
<slot name="middle-chrome" part="middle chrome"></slot>
|
|
141
|
+
<slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>
|
|
142
|
+
|
|
143
|
+
<slot part="bottom chrome"></slot>
|
|
144
|
+
</span>
|
|
145
|
+
`;var Pv=Object.values(s),Nv="sm:384 md:576 lg:768 xl:960";function Uv(i){Bv(i.target,i.contentRect.width)}function Bv(i,e){var t;if(!i.isConnected)return;let a=(t=i.getAttribute(M.BREAKPOINTS))!=null?t:Nv,r=Wv(a),n=Hv(r,e),o=!1;if(Object.keys(r).forEach(d=>{if(n.includes(d)){i.hasAttribute(`breakpoint${d}`)||(i.setAttribute(`breakpoint${d}`,""),o=!0);return}i.hasAttribute(`breakpoint${d}`)&&(i.removeAttribute(`breakpoint${d}`),o=!0)}),o){let d=new CustomEvent(yt.BREAKPOINTS_CHANGE,{detail:n});i.dispatchEvent(d)}}function Wv(i){let e=i.split(/\s+/);return Object.fromEntries(e.map(t=>t.split(":")))}function Hv(i,e){return Object.keys(i).filter(t=>e>=i[t])}var Pa=class extends l.HTMLElement{constructor(){super(),ni(this,qo),ni(this,Zo),ni(this,Da),ni(this,jr),ni(this,Bi),ni(this,Xr,0),ni(this,Ui,void 0),Ov(this,"breakpointsComputed",!1),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Uc.content.cloneNode(!0)));let e=o=>{let d=this.media;for(let u of o)u.type==="childList"&&(u.removedNodes.forEach(c=>{if(c.slot=="media"&&u.target==this){let f=u.previousSibling&&u.previousSibling.previousElementSibling;if(!f||!d)this.mediaUnsetCallback(c);else{let E=f.slot!=="media";for(;(f=f.previousSibling)!==null;)f.slot=="media"&&(E=!1);E&&this.mediaUnsetCallback(c)}}}),d&&u.addedNodes.forEach(c=>{c===d&&this.handleMediaUpdated(d)}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0});let a=!1;Le(this,o=>{a||(setTimeout(()=>{Uv(o),a=!1,this.breakpointsComputed||(this.breakpointsComputed=!0,this.dispatchEvent(new CustomEvent(yt.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){Go(this,Ui)&&this.mediaUnsetCallback(Go(this,Ui));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[M.AUTOHIDE,M.GESTURES_DISABLED].concat(Pv).filter(e=>![s.MEDIA_RENDITION_LIST,s.MEDIA_AUDIO_TRACK_LIST,s.MEDIA_CHAPTERS_CUES].includes(e))}attributeChangedCallback(e,t,a){e.toLowerCase()==M.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){e&&(Yo(this,Ui,e),e.localName.includes("-")&&await l.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;let a=this.getAttribute(M.AUDIO)!=null?K.AUDIO_PLAYER():K.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.handleMediaUpdated(this.media),this.setAttribute(M.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){Yo(this,Ui,null)}handleEvent(e){switch(e.type){case"pointerdown":Yo(this,Xr,e.timeStamp);break;case"pointermove":We(this,qo,Pc).call(this,e);break;case"pointerup":We(this,Zo,Nc).call(this,e);break;case"mouseleave":We(this,Da,Jr).call(this);break;case"mouseup":this.removeAttribute(M.KEYBOARD_CONTROL);break;case"keyup":We(this,Bi,Oa).call(this),this.setAttribute(M.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}};Xr=new WeakMap;Ui=new WeakMap;qo=new WeakSet;Pc=function(i){i.pointerType!=="mouse"&&i.timeStamp-Go(this,Xr)<250||(We(this,jr,zo).call(this),clearTimeout(this._inactiveTimeout),[this,this.media].includes(i.target)&&We(this,Bi,Oa).call(this))};Zo=new WeakSet;Nc=function(i){if(i.pointerType==="touch"){let e=!this.hasAttribute(M.USER_INACTIVE);[this,this.media].includes(i.target)&&e?We(this,Da,Jr).call(this):We(this,Bi,Oa).call(this)}else i.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e==null?void 0:e.localName))&&We(this,Bi,Oa).call(this)};Da=new WeakSet;Jr=function(){if(this.autohide<0||this.hasAttribute(M.USER_INACTIVE))return;this.setAttribute(M.USER_INACTIVE,"");let i=new l.CustomEvent(yt.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(i)};jr=new WeakSet;zo=function(){if(!this.hasAttribute(M.USER_INACTIVE))return;this.removeAttribute(M.USER_INACTIVE);let i=new l.CustomEvent(yt.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(i)};Bi=new WeakSet;Oa=function(){We(this,jr,zo).call(this),clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=setTimeout(()=>{We(this,Da,Jr).call(this)},this.autohide*1e3))};l.customElements.get("media-container")||l.customElements.define("media-container",Pa);var Bc=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},re=(i,e,t)=>(Bc(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)},en=(i,e,t,a)=>(Bc(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Wi,Hi,tn,si,Tt,Ut,Me=class{constructor(e,t,{defaultValue:a}={defaultValue:void 0}){Na(this,Tt),Na(this,Wi,void 0),Na(this,Hi,void 0),Na(this,tn,void 0),Na(this,si,new Set),en(this,Wi,e),en(this,Hi,t),en(this,tn,new Set(a))}[Symbol.iterator](){return re(this,Tt,Ut).values()}get length(){return re(this,Tt,Ut).size}get value(){var e;return(e=[...re(this,Tt,Ut)].join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(en(this,si,new Set),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return[...re(this,Tt,Ut)][e]}values(){return re(this,Tt,Ut).values()}forEach(e){re(this,Tt,Ut).forEach(e)}add(...e){var t,a;e.forEach(r=>re(this,si).add(r)),!(this.value===""&&!((t=re(this,Wi))!=null&&t.hasAttribute(`${re(this,Hi)}`)))&&((a=re(this,Wi))==null||a.setAttribute(`${re(this,Hi)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>re(this,si).delete(a)),(t=re(this,Wi))==null||t.setAttribute(`${re(this,Hi)}`,`${this.value}`)}contains(e){return re(this,Tt,Ut).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}};Wi=new WeakMap;Hi=new WeakMap;tn=new WeakMap;si=new WeakMap;Tt=new WeakSet;Ut=function(){return re(this,si).size?re(this,si):re(this,tn)};var $v=(i="")=>i.split(/\s+/),Wc=(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}},kt=(i="",e={})=>$v(i).map(t=>{let a=Wc(t);return{...e,...a}}),Xo=i=>i?Array.isArray(i)?i.map(e=>typeof e=="string"?Wc(e):e):typeof i=="string"?kt(i):[i]:[],oi=({kind:i,label:e,language:t}={kind:"subtitles"})=>e?`${i==="captions"?"cc":"sb"}:${t}:${encodeURIComponent(e)}`:t,He=(i=[])=>Array.prototype.map.call(i,oi).join(" "),Fv=(i,e)=>t=>t[i]===e,Hc=i=>{let e=Object.entries(i).map(([t,a])=>Fv(t,a));return t=>e.every(a=>a(t))},li=(i,e=[],t=[])=>{let a=Xo(t).map(Hc),r=n=>a.some(o=>o(n));Array.from(e).filter(r).forEach(n=>{n.mode=i})},di=(i,e=()=>!0)=>{if(!(i!=null&&i.textTracks))return[];let t=typeof e=="function"?e:Hc(e);return Array.from(i.textTracks).filter(t)},an=i=>{var e;return!!((e=i.mediaSubtitlesShowing)!=null&&e.length)||i.hasAttribute(s.MEDIA_SUBTITLES_SHOWING)};var G={enter:"requestFullscreen",exit:"exitFullscreen",rootEvents:["fullscreenchange"],mediaEvents:[],element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};m.fullscreenElement===void 0&&(G.enter="webkitRequestFullScreen",G.exit=m.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",G.rootEvents=["webkitfullscreenchange"],G.mediaEvents=["webkitbeginfullscreen","webkitendfullscreen"],G.element="webkitFullscreenElement",G.error="webkitfullscreenerror",G.enabled="webkitFullscreenEnabled");var rn,Jo=()=>{var i,e;return rn||(rn=(e=(i=m)==null?void 0:i.createElement)==null?void 0:e.call(i,"video"),rn)},$c=async(i=Jo())=>{if(!i)return!1;let e=i.volume;return i.volume=e/2+.1,await Vr(0),i.volume!==e},Vv=/.*Version\/.*Safari\/.*/.test(l.navigator.userAgent),jo=(i=Jo())=>l.matchMedia("(display-mode: standalone)").matches&&Vv?!1:typeof(i==null?void 0:i.requestPictureInPicture)=="function",el=(i=Jo())=>{let e=m[G.enabled];return!e&&i&&(e="webkitSupportsFullscreen"in i),e},Fc=el(),Vc=jo(),Kc=!!l.WebKitPlaybackTargetAvailabilityEvent,Yc=!!l.chrome;var $i=i=>di(i.media,e=>[Ne.SUBTITLES,Ne.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),tl=i=>di(i.media,e=>e.mode===Pt.SHOWING&&[Ne.SUBTITLES,Ne.CAPTIONS].includes(e.kind)),nn=(i,e)=>{let t=$i(i),a=tl(i),r=!!a.length;if(t.length){if(e===!1||r&&e!==!0)li(Pt.DISABLED,t,a);else if(e===!0||!r&&e!==!1){let n=t[0],{options:o}=i;if(!(o!=null&&o.noSubtitlesLangPref)){let f=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),E=f?[f,...globalThis.navigator.languages]:globalThis.navigator.languages,v=t.filter(b=>E.some(w=>b.language.toLowerCase().startsWith(w.split("-")[0]))).sort((b,w)=>{let _=E.findIndex(D=>b.language.toLowerCase().startsWith(D.split("-")[0])),T=E.findIndex(D=>w.language.toLowerCase().startsWith(D.split("-")[0]));return _-T});v[0]&&(n=v[0])}let{language:d,label:u,kind:c}=n;li(Pt.DISABLED,t,a),li(Pt.SHOWING,t,[{language:d,label:u,kind:c}])}}},sn=(i,e)=>i===e?!0:typeof i!=typeof e?!1:typeof i=="number"&&Number.isNaN(i)&&Number.isNaN(e)?!0:typeof i!="object"?!1:Array.isArray(i)?Kv(i,e):Object.entries(i).every(([t,a])=>t in e&&sn(a,e[t])),Kv=(i,e)=>{let t=Array.isArray(i),a=Array.isArray(e);return t!==a?!1:t||a?i.length!==e.length?!1:i.every((r,n)=>sn(r,e[n])):!0};var Yv=Object.values(Ue),on,Gv=$c().then(i=>(on=i,on)),Gc=async(...i)=>{await i.filter(e=>e).forEach(async e=>{if(!("localName"in e&&e instanceof l.HTMLElement))return;let t=e.localName;if(!t.includes("-"))return;let a=l.customElements.get(t);a&&e instanceof a||(await l.customElements.whenDefined(t),l.customElements.upgrade(e))})},Ua={mediaPaused:{get(i){var e;let{media:t}=i;return(e=t==null?void 0:t.paused)!=null?e:!0},set(i,e){let{media:t}=e;t&&(i?t.pause():t.play().catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(i,e){let{media:t}=i;return t?e?e.type==="playing":!t.paused:!1},mediaEvents:["playing","emptied"]},mediaEnded:{get(i){var e;let{media:t}=i;return(e=t==null?void 0:t.ended)!=null?e:!1},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(i){var e;let{media:t}=i;return(e=t==null?void 0:t.playbackRate)!=null?e:1},set(i,e){let{media:t}=e;t&&Number.isFinite(+i)&&(t.playbackRate=+i)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(i){var e;let{media:t}=i;return(e=t==null?void 0:t.muted)!=null?e:!1},set(i,e){let{media:t}=e;t&&(t.muted=i)},mediaEvents:["volumechange"]},mediaVolume:{get(i){var e;let{media:t}=i;return(e=t==null?void 0:t.volume)!=null?e:1},set(i,e){let{media:t}=e;if(t){try{i==null?l.localStorage.removeItem("media-chrome-pref-volume"):l.localStorage.setItem("media-chrome-pref-volume",i.toString())}catch{}Number.isFinite(+i)&&(t.volume=+i)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(i,e)=>{let{options:{noVolumePref:t}}=e;if(!t)try{let a=l.localStorage.getItem("media-chrome-pref-volume");if(a==null)return;Ua.mediaVolume.set(+a,e),i(a)}catch(a){console.debug("Error getting volume pref",a)}}]},mediaVolumeLevel:{get(i){let{media:e}=i;return typeof(e==null?void 0:e.volume)=="undefined"?"high":e.muted||e.volume===0?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(i){var e;let{media:t}=i;return(e=t==null?void 0:t.currentTime)!=null?e:0},set(i,e){let{media:t}=e;t!=null&&t.readyState&&(t.currentTime=i)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(i){let{media:e,options:{defaultDuration:t}={}}=i;return t&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?t:Number.isFinite(e==null?void 0:e.duration)?e.duration:Number.NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(i){let{media:e}=i;return(e==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(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","seekablechange"]},mediaBuffered:{get(i){var e;let{media:t}=i,a=(e=t==null?void 0:t.buffered)!=null?e:[];return Array.from(a).map((r,n)=>[Number(a.start(n).toFixed(3)),Number(a.end(n).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(i){let{media:e,options:{defaultStreamType:t}={}}=i,a=[Ue.LIVE,Ue.ON_DEMAND].includes(t)?t:void 0;if(!e)return a;let{streamType:r}=e;if(Yv.includes(r))return r===Ue.UNKNOWN?a:r;let n=e.duration;return n===1/0?Ue.LIVE:Number.isFinite(n)?Ue.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(i){let{media:e}=i;if(!e)return Number.NaN;let{targetLiveWindow:t}=e,a=Ua.mediaStreamType.get(i);return(t==null||Number.isNaN(t))&&a===Ue.LIVE?0:t},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(i){let{media:e,options:{liveEdgeOffset:t=10}={}}=i;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(Ua.mediaStreamType.get(i)===Ue.LIVE))return!1;let r=e.seekable;if(!r)return!0;if(!r.length)return!1;let n=r.end(r.length-1)-t;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(i){return $i(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(i){return tl(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(i,e)=>{var t,a;let{media:r,options:n}=e;if(!r)return;let o=d=>{var u;!n.defaultSubtitles||d&&![Ne.CAPTIONS,Ne.SUBTITLES].includes((u=d==null?void 0:d.track)==null?void 0:u.kind)||nn(e,!0)};return(t=r.textTracks)==null||t.addEventListener("addtrack",o),(a=r.textTracks)==null||a.addEventListener("removetrack",o),o(),()=>{var d,u;(d=r.textTracks)==null||d.removeEventListener("addtrack",o),(u=r.textTracks)==null||u.removeEventListener("removetrack",o)}}]},mediaChaptersCues:{get(i){var e;let{media:t}=i;if(!t)return[];let[a]=di(t,{kind:Ne.CHAPTERS});return Array.from((e=a==null?void 0:a.cues)!=null?e:[]).map(({text:r,startTime:n,endTime:o})=>({text:r,startTime:n,endTime:o}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(i,e)=>{let{media:t}=e;if(!t)return;let a=t.querySelector('track[kind="chapters"][default][src]');return a==null||a.addEventListener("load",i),()=>{a==null||a.removeEventListener("load",i)}}]},mediaIsPip:{get(i){var e,t;let{media:a,documentElement:r}=i;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return(e=a.localName)!=null&&e.includes("-")?ue(a,r.pictureInPictureElement):!1;if(r.pictureInPictureElement.localName.includes("-")){let n=r.pictureInPictureElement.shadowRoot;for(;n!=null&&n.pictureInPictureElement;){if(n.pictureInPictureElement===a)return!0;n=(t=n.pictureInPictureElement)==null?void 0:t.shadowRoot}}return!1},set(i,e){let{media:t}=e;if(t)if(i){if(!m.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!t.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}let a=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};t.requestPictureInPicture().catch(r=>{if(r.code===11){if(!t.src){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");return}if(t.readyState===0&&t.preload==="none"){let n=()=>{t.removeEventListener("loadedmetadata",o),t.preload="none"},o=()=>{t.requestPictureInPicture().catch(a),n()};t.addEventListener("loadedmetadata",o),t.preload="metadata",setTimeout(()=>{t.readyState===0&&a(),n()},1e3)}else throw r}else throw r})}else m.pictureInPictureElement&&m.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.videoRenditions)!=null?e:[]].map(a=>({...a}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(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},set(i,e){let{media:t}=e;if(!(t!=null&&t.videoRenditions)){console.warn("MediaController: Rendition selection not supported by this media.");return}let a=i,r=Array.prototype.findIndex.call(t.videoRenditions,n=>n.id==a);t.videoRenditions.selectedIndex!=r&&(t.videoRenditions.selectedIndex=r)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(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},set(i,e){let{media:t}=e;if(!(t!=null&&t.audioTracks)){console.warn("MediaChrome: Audio track selection not supported by this media.");return}let a=i;for(let r of t.audioTracks)r.enabled=a==r.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(i){var e;let{media:t,documentElement:a,fullscreenElement:r=t}=i;if(!t||!a)return!1;if(!a[G.element])return"webkitDisplayingFullscreen"in t&&"webkitPresentationMode"in t?t.webkitDisplayingFullscreen&&t.webkitPresentationMode===_c.FULLSCREEN:!1;if(a[G.element]===r)return!0;if(a[G.element].localName.includes("-")){let n=a[G.element].shadowRoot;if(!(G.element in n))return ue(a[G.element],r);for(;n!=null&&n[G.element];){if(n[G.element]===r)return!0;n=(e=n[G.element])==null?void 0:e.shadowRoot}}return!1},set(i,e){var t,a;let{media:r,fullscreenElement:n,documentElement:o}=e;if(!i&&(o!=null&&o[G.exit])){let d=(t=o==null?void 0:o[G.exit])==null?void 0:t.call(o);d instanceof Promise&&d.catch(()=>{});return}if(n!=null&&n[G.enter]){let d=(a=n[G.enter])==null?void 0:a.call(n);d instanceof Promise&&d.catch(()=>{})}else r!=null&&r.webkitEnterFullscreen?r.webkitEnterFullscreen():r!=null&&r.requestFullscreen&&r.requestFullscreen()},rootEvents:G.rootEvents,mediaEvents:G.mediaEvents},mediaIsCasting:{get(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},set(i,e){var t,a;let{media:r}=e;if(r&&!(i&&((t=r.remote)==null?void 0:t.state)!=="disconnected")&&!(!i&&((a=r.remote)==null?void 0:a.state)!=="connected")){if(typeof r.remote.prompt!="function"){console.warn("MediaChrome: Casting is not supported in this environment");return}r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(i,e){let{media:t}=e;if(t){if(!(t.webkitShowPlaybackTargetPicker&&l.WebKitPlaybackTargetAvailabilityEvent)){console.warn("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");return}t.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(i){let{media:e}=i;if(!Fc||!el(e))return Te.UNSUPPORTED}},mediaPipUnavailable:{get(i){let{media:e}=i;if(!Vc||!jo(e))return Te.UNSUPPORTED}},mediaVolumeUnavailable:{get(i){let{media:e}=i;if(on===!1||(e==null?void 0:e.volume)==null)return Te.UNSUPPORTED},stateOwnersUpdateHandlers:[i=>{on==null&&Gv.then(e=>i(e?void 0:Te.UNSUPPORTED))}]},mediaCastUnavailable:{get(i,{availability:e="not-available"}={}){var t;let{media:a}=i;if(!Yc||!((t=a==null?void 0:a.remote)!=null&&t.state))return Te.UNSUPPORTED;if(!(e==null||e==="available"))return Te.UNAVAILABLE},stateOwnersUpdateHandlers:[(i,e)=>{var t;let{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(t=a==null?void 0:a.remote)==null||t.watchAvailability(n=>{i({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?i({availability:null}):i({availability:"not-available"})}),()=>{var n;(n=a==null?void 0:a.remote)==null||n.cancelWatchAvailability()}):void 0}]},mediaAirplayUnavailable:{get(i,e){if(!Kc)return Te.UNSUPPORTED;if((e==null?void 0:e.availability)==="not-available")return Te.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(i,e)=>{var t;let{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(t=a==null?void 0:a.remote)==null||t.watchAvailability(n=>{i({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?i({availability:null}):i({availability:"not-available"})}),()=>{var n;(n=a==null?void 0:a.remote)==null||n.cancelWatchAvailability()}):void 0}]},mediaRenditionUnavailable:{get(i){var e;let{media:t}=i;if(!(t!=null&&t.videoRenditions))return Te.UNSUPPORTED;if(!((e=t.videoRenditions)!=null&&e.length))return Te.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(i){var e,t;let{media:a}=i;if(!(a!=null&&a.audioTracks))return Te.UNSUPPORTED;if(((t=(e=a.audioTracks)==null?void 0:e.length)!=null?t:0)<=1)return Te.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]}};var qc={[h.MEDIA_PREVIEW_REQUEST](i,e,{detail:t}){var a,r,n;let{media:o}=e,d=t!=null?t:void 0,u,c;if(o&&d!=null){let[b]=di(o,{kind:Ne.METADATA,label:"thumbnails"}),w=Array.prototype.find.call((a=b==null?void 0:b.cues)!=null?a:[],(_,T,D)=>T===0?_.endTime>d:T===D.length-1?_.startTime<=d:_.startTime<=d&&_.endTime>d);if(w){let _=/'^(?:[a-z]+:)?\/\//i.test(w.text)||(r=o==null?void 0:o.querySelector('track[label="thumbnails"]'))==null?void 0:r.src,T=new URL(w.text,_);c=new URLSearchParams(T.hash).get("#xywh").split(","),u=T.href}}let f=i.mediaDuration.get(e),v=(n=i.mediaChaptersCues.get(e).find((b,w,_)=>w===_.length-1&&f===b.endTime?b.startTime<=d&&b.endTime>=d:b.startTime<=d&&b.endTime>d))==null?void 0:n.text;return t!=null&&v==null&&(v=""),{mediaPreviewTime:d,mediaPreviewImage:u,mediaPreviewCoords:c,mediaPreviewChapter:v}},[h.MEDIA_PAUSE_REQUEST](i,e){i["mediaPaused"].set(!0,e)},[h.MEDIA_PLAY_REQUEST](i,e){var t;let a="mediaPaused";if(i.mediaStreamType.get(e)===Ue.LIVE){let o=!(i.mediaTargetLiveWindow.get(e)>0),d=(t=i.mediaSeekable.get(e))==null?void 0:t[1];o&&d&&i.mediaCurrentTime.set(d,e)}i[a].set(!1,e)},[h.MEDIA_PLAYBACK_RATE_REQUEST](i,e,{detail:t}){let a="mediaPlaybackRate",r=t;i[a].set(r,e)},[h.MEDIA_MUTE_REQUEST](i,e){i["mediaMuted"].set(!0,e)},[h.MEDIA_UNMUTE_REQUEST](i,e){let t="mediaMuted";i.mediaVolume.get(e)||i.mediaVolume.set(.25,e),i[t].set(!1,e)},[h.MEDIA_VOLUME_REQUEST](i,e,{detail:t}){let a="mediaVolume",r=t;r&&i.mediaMuted.get(e)&&i.mediaMuted.set(!1,e),i[a].set(r,e)},[h.MEDIA_SEEK_REQUEST](i,e,{detail:t}){let a="mediaCurrentTime",r=t;i[a].set(r,e)},[h.MEDIA_SEEK_TO_LIVE_REQUEST](i,e){var t;let a="mediaCurrentTime",r=(t=i.mediaSeekable.get(e))==null?void 0:t[1];Number.isNaN(Number(r))&&i[a].set(r,e)},[h.MEDIA_SHOW_SUBTITLES_REQUEST](i,e,{detail:t}){var a;let{options:r}=e,n=$i(e),o=Xo(t),d=(a=o[0])==null?void 0:a.language;d&&!r.noSubtitlesLangPref&&l.localStorage.setItem("media-chrome-pref-subtitles-lang",d),li(Pt.SHOWING,n,o)},[h.MEDIA_DISABLE_SUBTITLES_REQUEST](i,e,{detail:t}){let a=$i(e),r=t!=null?t:[];li(Pt.DISABLED,a,r)},[h.MEDIA_TOGGLE_SUBTITLES_REQUEST](i,e,{detail:t}){nn(e,t)},[h.MEDIA_RENDITION_REQUEST](i,e,{detail:t}){let a="mediaRenditionSelected",r=t;i[a].set(r,e)},[h.MEDIA_AUDIO_TRACK_REQUEST](i,e,{detail:t}){let a="mediaAudioTrackEnabled",r=t;i[a].set(r,e)},[h.MEDIA_ENTER_PIP_REQUEST](i,e){let t="mediaIsPip";i.mediaIsFullscreen.get(e)&&i.mediaIsFullscreen.set(!1,e),i[t].set(!0,e)},[h.MEDIA_EXIT_PIP_REQUEST](i,e){i["mediaIsPip"].set(!1,e)},[h.MEDIA_ENTER_FULLSCREEN_REQUEST](i,e){let t="mediaIsFullscreen";i.mediaIsPip.get(e)&&i.mediaIsPip.set(!1,e),i[t].set(!0,e)},[h.MEDIA_EXIT_FULLSCREEN_REQUEST](i,e){i["mediaIsFullscreen"].set(!1,e)},[h.MEDIA_ENTER_CAST_REQUEST](i,e){let t="mediaIsCasting";i.mediaIsFullscreen.get(e)&&i.mediaIsFullscreen.set(!1,e),i[t].set(!0,e)},[h.MEDIA_EXIT_CAST_REQUEST](i,e){i["mediaIsCasting"].set(!1,e)},[h.MEDIA_AIRPLAY_REQUEST](i,e){i["mediaIsAirplaying"].set(!0,e)}};var qv=({media:i,fullscreenElement:e,documentElement:t,stateMediator:a=Ua,requestMap:r=qc,options:n={},monitorStateOwnersOnlyWithSubscriptions:o=!0})=>{let d=[],u={options:{...n}},c=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),f=_=>{_!=null&&(sn(_,c)||(c=Object.freeze({...c,..._}),d.forEach(T=>T(c))))},E=()=>{let _=Object.entries(a).reduce((T,[D,{get:oe}])=>(T[D]=oe(u),T),{});f(_)},v={},b,w=async(_,T)=>{var D,oe,ge,Ot,_t,Ea,ga,_a,Aa,ya,Ta,ka,Sa,Ia,Ca,La;let Br=!!b;if(b={...u,...b!=null?b:{},..._},Br)return;await Gc(...Object.values(_));let At=d.length>0&&T===0&&o,Ma=u.media!==b.media,Qu=((D=u.media)==null?void 0:D.textTracks)!==((oe=b.media)==null?void 0:oe.textTracks),zu=((ge=u.media)==null?void 0:ge.videoRenditions)!==((Ot=b.media)==null?void 0:Ot.videoRenditions),Xu=((_t=u.media)==null?void 0:_t.audioTracks)!==((Ea=b.media)==null?void 0:Ea.audioTracks),Ju=((ga=u.media)==null?void 0:ga.remote)!==((_a=b.media)==null?void 0:_a.remote),ju=u.documentElement!==b.documentElement,ec=!!u.media&&(Ma||At),tc=!!((Aa=u.media)!=null&&Aa.textTracks)&&(Qu||At),ic=!!((ya=u.media)!=null&&ya.videoRenditions)&&(zu||At),ac=!!((Ta=u.media)!=null&&Ta.audioTracks)&&(Xu||At),rc=!!((ka=u.media)!=null&&ka.remote)&&(Ju||At),nc=!!u.documentElement&&(ju||At),sc=ec||tc||ic||ac||rc||nc,Pi=d.length===0&&T===1&&o,oc=!!b.media&&(Ma||Pi),lc=!!((Sa=b.media)!=null&&Sa.textTracks)&&(Qu||Pi),dc=!!((Ia=b.media)!=null&&Ia.videoRenditions)&&(zu||Pi),uc=!!((Ca=b.media)!=null&&Ca.audioTracks)&&(Xu||Pi),cc=!!((La=b.media)!=null&&La.remote)&&(Ju||Pi),mc=!!b.documentElement&&(ju||Pi),hc=oc||lc||dc||uc||cc||mc;if(!(sc||hc)){Object.entries(b).forEach(([F,wa])=>{u[F]=wa}),E(),b=void 0;return}Object.entries(a).forEach(([F,{get:wa,mediaEvents:av=[],textTracksEvents:rv=[],videoRenditionsEvents:nv=[],audioTracksEvents:sv=[],remoteEvents:ov=[],rootEvents:lv=[],stateOwnersUpdateHandlers:dv=[]}])=>{v[F]||(v[F]={});let _e=j=>{let Ae=wa(u,j);f({[F]:Ae})},ae;ae=v[F].mediaEvents,av.forEach(j=>{ae&&ec&&(u.media.removeEventListener(j,ae),v[F].mediaEvents=void 0),oc&&(b.media.addEventListener(j,_e),v[F].mediaEvents=_e)}),ae=v[F].textTracksEvents,rv.forEach(j=>{var Ae,Pe;ae&&tc&&((Ae=u.media.textTracks)==null||Ae.removeEventListener(j,ae),v[F].textTracksEvents=void 0),lc&&((Pe=b.media.textTracks)==null||Pe.addEventListener(j,_e),v[F].textTracksEvents=_e)}),ae=v[F].videoRenditionsEvents,nv.forEach(j=>{var Ae,Pe;ae&&ic&&((Ae=u.media.videoRenditions)==null||Ae.removeEventListener(j,ae),v[F].videoRenditionsEvents=void 0),dc&&((Pe=b.media.videoRenditions)==null||Pe.addEventListener(j,_e),v[F].videoRenditionsEvents=_e)}),ae=v[F].audioTracksEvents,sv.forEach(j=>{var Ae,Pe;ae&&ac&&((Ae=u.media.audioTracks)==null||Ae.removeEventListener(j,ae),v[F].audioTracksEvents=void 0),uc&&((Pe=b.media.audioTracks)==null||Pe.addEventListener(j,_e),v[F].audioTracksEvents=_e)}),ae=v[F].remoteEvents,ov.forEach(j=>{var Ae,Pe;ae&&rc&&((Ae=u.media.remote)==null||Ae.removeEventListener(j,ae),v[F].remoteEvents=void 0),cc&&((Pe=b.media.remote)==null||Pe.addEventListener(j,_e),v[F].remoteEvents=_e)}),ae=v[F].rootEvents,lv.forEach(j=>{ae&&nc&&(u.documentElement.removeEventListener(j,ae),v[F].rootEvents=void 0),mc&&(b.documentElement.addEventListener(j,_e),v[F].rootEvents=_e)});let pc=v[F].stateOwnersUpdateHandlers;dv.forEach(j=>{pc&&sc&&pc(),hc&&(v[F].stateOwnersUpdateHandlers=j(_e,b))})}),Object.entries(b).forEach(([F,wa])=>{u[F]=wa}),E(),b=void 0};return w({media:i,fullscreenElement:e,documentElement:t,options:n}),{dispatch(_){let{type:T,detail:D}=_;if(r[T]){f(r[T](a,u,_));return}T==="mediaelementchangerequest"?w({media:D}):T==="fullscreenelementchangerequest"?w({fullscreenElement:D}):T==="documentelementchangerequest"?w({documentElement:D}):T==="optionschangerequest"&&Object.entries(D!=null?D:{}).forEach(([oe,ge])=>{u.options[oe]=ge})},getState(){return c},subscribe(_){return w({},d.length+1),d.push(_),_(c),()=>{let T=d.indexOf(_);T>=0&&(w({},d.length-1),d.splice(T,1))}}}},Zc=qv;var nl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},L=(i,e,t)=>(nl(i,e,"read from private field"),t?t.call(i):e.get(i)),St=(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)=>(nl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Wt=(i,e,t)=>(nl(i,e,"access private method"),t),Ht,Ba,q,Wa,Je,ln,dn,il,Fi,Ha,un,al,jc=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],Qc=10,R={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",NO_VOLUME_PREF:"novolumepref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_DEFAULT_STORE:"nodefaultstore",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset"},cn=class extends Pa{constructor(){super(),St(this,dn),St(this,Fi),St(this,un),St(this,Ht,new Me(this,R.HOTKEYS)),St(this,Ba,void 0),St(this,q,void 0),St(this,Wa,void 0),St(this,Je,void 0),St(this,ln,t=>{var a;(a=L(this,q))==null||a.dispatch(t)}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this);let e={};Bt(this,Wa,t=>{Object.entries(t).forEach(([a,r])=>{if(a in e&&e[a]===r)return;this.propagateMediaState(a,r);let n=a.toLowerCase(),o=new l.CustomEvent(gc[n],{composed:!0,detail:r});this.dispatchEvent(o)}),e=t}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(R.NO_HOTKEYS,R.HOTKEYS,R.DEFAULT_STREAM_TYPE,R.DEFAULT_SUBTITLES,R.DEFAULT_DURATION)}get mediaStore(){return L(this,q)}set mediaStore(e){var t,a;if(L(this,q)&&((t=L(this,Je))==null||t.call(this),Bt(this,Je,void 0)),Bt(this,q,e),!L(this,q)&&!this.hasAttribute(R.NO_DEFAULT_STORE)){Wt(this,dn,il).call(this);return}Bt(this,Je,(a=L(this,q))==null?void 0:a.subscribe(L(this,Wa)))}get fullscreenElement(){var e;return(e=L(this,Ba))!=null?e:this}set fullscreenElement(e){var t;this.hasAttribute(R.FULLSCREEN_ELEMENT)&&this.removeAttribute(R.FULLSCREEN_ELEMENT),Bt(this,Ba,e),(t=L(this,q))==null||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}attributeChangedCallback(e,t,a){var r,n,o,d,u,c;if(super.attributeChangedCallback(e,t,a),e===R.NO_HOTKEYS)a!==t&&a===""?(this.hasAttribute(R.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==t&&a===null&&this.enableHotkeys();else if(e===R.HOTKEYS)L(this,Ht).value=a;else if(e===R.DEFAULT_SUBTITLES&&a!==t)(r=L(this,q))==null||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(R.DEFAULT_SUBTITLES)}});else if(e===R.DEFAULT_STREAM_TYPE)(o=L(this,q))==null||o.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(n=this.getAttribute(R.DEFAULT_STREAM_TYPE))!=null?n:void 0}});else if(e===R.LIVE_EDGE_OFFSET)(d=L(this,q))==null||d.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(R.LIVE_EDGE_OFFSET)?+this.getAttribute(R.LIVE_EDGE_OFFSET):void 0}});else if(e===R.FULLSCREEN_ELEMENT){let f=a?(u=this.getRootNode())==null?void 0:u.getElementById(a):void 0;Bt(this,Ba,f),(c=L(this,q))==null||c.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}}connectedCallback(){var e,t;!L(this,q)&&!this.hasAttribute(R.NO_DEFAULT_STORE)&&Wt(this,dn,il).call(this),(e=L(this,q))==null||e.dispatch({type:"documentelementchangerequest",detail:m}),super.connectedCallback(),L(this,q)&&!L(this,Je)&&Bt(this,Je,(t=L(this,q))==null?void 0:t.subscribe(L(this,Wa))),this.enableHotkeys()}disconnectedCallback(){var e,t,a,r;(e=super.disconnectedCallback)==null||e.call(this),L(this,q)&&((t=L(this,q))==null||t.dispatch({type:"documentelementchangerequest",detail:void 0}),(a=L(this,q))==null||a.dispatch({type:h.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),L(this,Je)&&((r=L(this,Je))==null||r.call(this),Bt(this,Je,void 0))}mediaSetCallback(e){var t;super.mediaSetCallback(e),(t=L(this,q))==null||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),(t=L(this,q))==null||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){Jc(this.mediaStateReceivers,e,t)}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=jv(e,a,r);Object.values(h).forEach(o=>{e.addEventListener(o,L(this,ln))}),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.values(h).forEach(r=>{e.removeEventListener(r,L(this,ln))})}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),L(this,q)&&Object.entries(L(this,q).getState()).forEach(([r,n])=>{Jc([e],r,n)}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,a=t.indexOf(e);a<0||t.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",Wt(this,un,al))}disableHotkeys(){this.removeEventListener("keydown",Wt(this,un,al)),this.removeEventListener("keyup",Wt(this,Fi,Ha))}get hotkeys(){return L(this,Ht)}keyboardShortcutHandler(e){var t,a,r,n,o,d;if(((n=(r=(t=e.target.getAttribute(R.KEYS_USED))==null?void 0:t.split(" "))!=null?r:(a=e.target)==null?void 0:a.keysUsed)!=null?n:[]).map(v=>v==="Space"?" ":v).filter(Boolean).includes(e.key))return;let c,f,E;if(!L(this,Ht).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&L(this,Ht).contains("nospace")))switch(e.key){case" ":case"k":c=L(this,q).getState().mediaPaused?h.MEDIA_PLAY_REQUEST:h.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new l.CustomEvent(c,{composed:!0,bubbles:!0}));break;case"m":c=this.mediaStore.getState().mediaVolumeLevel==="off"?h.MEDIA_UNMUTE_REQUEST:h.MEDIA_MUTE_REQUEST,this.dispatchEvent(new l.CustomEvent(c,{composed:!0,bubbles:!0}));break;case"f":c=this.mediaStore.getState().mediaIsFullscreen?h.MEDIA_EXIT_FULLSCREEN_REQUEST:h.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new l.CustomEvent(c,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new l.CustomEvent(h.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":{let v=this.hasAttribute(R.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(R.KEYBOARD_BACKWARD_SEEK_OFFSET):Qc;f=Math.max(((o=this.mediaStore.getState().mediaCurrentTime)!=null?o:0)-v,0),E=new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:f}),this.dispatchEvent(E);break}case"ArrowRight":{let v=this.hasAttribute(R.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(R.KEYBOARD_FORWARD_SEEK_OFFSET):Qc;f=Math.max(((d=this.mediaStore.getState().mediaCurrentTime)!=null?d:0)+v,0),E=new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:f}),this.dispatchEvent(E);break}default:break}}};Ht=new WeakMap;Ba=new WeakMap;q=new WeakMap;Wa=new WeakMap;Je=new WeakMap;ln=new WeakMap;dn=new WeakSet;il=function(){var i;this.mediaStore=Zc({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(R.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(R.DEFAULT_DURATION)?+this.getAttribute(R.DEFAULT_DURATION):void 0,defaultStreamType:(i=this.getAttribute(R.DEFAULT_STREAM_TYPE))!=null?i:void 0,liveEdgeOffset:this.hasAttribute(R.LIVE_EDGE_OFFSET)?+this.getAttribute(R.LIVE_EDGE_OFFSET):void 0,noVolumePref:this.hasAttribute(R.NO_VOLUME_PREF),noSubtitlesLangPref:this.hasAttribute(R.NO_SUBTITLES_LANG_PREF)}})};Fi=new WeakSet;Ha=function(i){let{key:e}=i;if(!jc.includes(e)){this.removeEventListener("keyup",Wt(this,Fi,Ha));return}this.keyboardShortcutHandler(i)};un=new WeakSet;al=function(i){let{metaKey:e,altKey:t,key:a}=i;if(e||t||!jc.includes(a)){this.removeEventListener("keyup",Wt(this,Fi,Ha));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(L(this,Ht).contains(`no${a.toLowerCase()}`)||a===" "&&L(this,Ht).contains("nospace"))&&i.preventDefault(),this.addEventListener("keyup",Wt(this,Fi,Ha),{once:!0})};var Zv=Object.values(s),Qv=Object.values(Bo),em=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 o=(r=(a=(t=i==null?void 0:i.getAttribute)==null?void 0:t.call(i,y.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||o)?(n||o).filter(d=>Zv.includes(d)):[]},zv=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),Qv.some(a=>a in i)},rl=i=>zv(i)||!!em(i).length,zc=i=>{var e;return(e=i==null?void 0:i.join)==null?void 0:e.call(i,":")},Xc={[s.MEDIA_SUBTITLES_LIST]:He,[s.MEDIA_SUBTITLES_SHOWING]:He,[s.MEDIA_SEEKABLE]:zc,[s.MEDIA_BUFFERED]:i=>i==null?void 0:i.map(zc).join(" "),[s.MEDIA_PREVIEW_COORDS]:i=>i==null?void 0:i.join(" "),[s.MEDIA_RENDITION_LIST]:Ac,[s.MEDIA_AUDIO_TRACK_LIST]:yc},Xv=async(i,e,t)=>{var a,r;if(i.isConnected||await Vr(0),typeof t=="boolean"||t==null)return B(i,e,t);if(typeof t=="number")return U(i,e,t);if(typeof t=="string")return k(i,e,t);if(Array.isArray(t)&&!t.length)return i.removeAttribute(e);let n=(r=(a=Xc[e])==null?void 0:a.call(Xc,t))!=null?r:t;return i.setAttribute(e,n)},Jv=i=>{var e;return!!((e=i.closest)!=null&&e.call(i,'*[slot="media"]'))},ui=(i,e)=>{if(Jv(i))return;let t=(r,n)=>{var o,d;rl(r)&&n(r);let{children:u=[]}=r!=null?r:{},c=(d=(o=r==null?void 0:r.shadowRoot)==null?void 0:o.children)!=null?d:[];[...u,...c].forEach(E=>ui(E,n))},a=i==null?void 0:i.nodeName.toLowerCase();if(a.includes("-")&&!rl(i)){l.customElements.whenDefined(a).then(()=>{t(i,e)});return}t(i,e)},Jc=(i,e,t)=>{i.forEach(a=>{if(e in a){a[e]=t;return}let r=em(a),n=e.toLowerCase();r.includes(n)&&Xv(a,n,t)})},jv=(i,e,t)=>{ui(i,e);let a=f=>{var E;let v=(E=f==null?void 0:f.composedPath()[0])!=null?E:f.target;e(v)},r=f=>{var E;let v=(E=f==null?void 0:f.composedPath()[0])!=null?E:f.target;t(v)};i.addEventListener(h.REGISTER_MEDIA_STATE_RECEIVER,a),i.addEventListener(h.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=f=>{f.forEach(E=>{let{addedNodes:v=[],removedNodes:b=[],type:w,target:_,attributeName:T}=E;w==="childList"?(Array.prototype.forEach.call(v,D=>ui(D,e)),Array.prototype.forEach.call(b,D=>ui(D,t))):w==="attributes"&&T===y.MEDIA_CHROME_ATTRIBUTES&&(rl(_)?e(_):t(_))})},o=[],d=f=>{let E=f.target;E.name!=="media"&&(o.forEach(v=>ui(v,t)),o=[...E.assignedElements({flatten:!0})],o.forEach(v=>ui(v,e)))};i.addEventListener("slotchange",d);let u=new MutationObserver(n);return u.observe(i,{childList:!0,attributes:!0,subtree:!0}),()=>{ui(i,t),i.removeEventListener("slotchange",d),u.disconnect(),i.removeEventListener(h.REGISTER_MEDIA_STATE_RECEIVER,a),i.removeEventListener(h.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};l.customElements.get("media-controller")||l.customElements.define("media-controller",cn);var sl=cn;var ef=Object.defineProperty,tf=(i,e,t)=>e in i?ef(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,af=(i,e,t)=>(tf(i,typeof e!="symbol"?e+"":e,t),t),tm=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},we=(i,e,t)=>(tm(i,e,"read from private field"),t?t.call(i):e.get(i)),mn=(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)},hn=(i,e,t,a)=>(tm(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),je,pn,Vi,vn,im=m.createElement("template");im.innerHTML=`
|
|
2
146
|
<style>
|
|
3
147
|
:host {
|
|
4
148
|
font: var(--media-font,
|
|
@@ -47,186 +191,406 @@
|
|
|
47
191
|
min-width: 100%;
|
|
48
192
|
}
|
|
49
193
|
</style>
|
|
50
|
-
`;var
|
|
194
|
+
`;var P=class extends l.HTMLElement{constructor(e={}){if(super(),mn(this,je,void 0),af(this,"preventClick",!1),mn(this,pn,t=>{this.preventClick||this.handleClick(t)}),mn(this,Vi,t=>{let{key:a}=t;if(!this.keysUsed.includes(a)){this.removeEventListener("keyup",we(this,Vi));return}this.preventClick||this.handleClick(t)}),mn(this,vn,t=>{let{metaKey:a,altKey:r,key:n}=t;if(a||r||!this.keysUsed.includes(n)){this.removeEventListener("keyup",we(this,Vi));return}this.addEventListener("keyup",we(this,Vi),{once:!0})}),!this.shadowRoot){this.attachShadow({mode:"open"});let t=im.content.cloneNode(!0);this.nativeEl=t;let a=e.slotTemplate;a||(a=m.createElement("template"),a.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(a.content.cloneNode(!0)),this.shadowRoot.appendChild(t)}}static get observedAttributes(){return["disabled",y.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",we(this,pn)),this.addEventListener("keydown",we(this,vn)),this.tabIndex=0}disable(){this.removeEventListener("click",we(this,pn)),this.removeEventListener("keydown",we(this,vn)),this.removeEventListener("keyup",we(this,Vi)),this.tabIndex=-1}attributeChangedCallback(e,t,a){var r,n,o,d,u;e===y.MEDIA_CONTROLLER?(t&&((n=(r=we(this,je))==null?void 0:r.unassociateElement)==null||n.call(r,this),hn(this,je,null)),a&&this.isConnected&&(hn(this,je,(o=this.getRootNode())==null?void 0:o.getElementById(a)),(u=(d=we(this,je))==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;let{style:r}=N(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","button");let n=this.getAttribute(y.MEDIA_CONTROLLER);n&&(hn(this,je,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(t=we(this,je))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=we(this,je))==null?void 0:e.unassociateElement)==null||t.call(e,this),hn(this,je,null)}get keysUsed(){return["Enter"," "]}handleClick(e){}};je=new WeakMap;pn=new WeakMap;Vi=new WeakMap;vn=new WeakMap;l.customElements.get("media-chrome-button")||l.customElements.define("media-chrome-button",P);var am=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
51
195
|
<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
196
|
</svg>
|
|
53
|
-
`,
|
|
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">${_l}</slot>
|
|
67
|
-
<slot name="exit">${_l}</slot>
|
|
68
|
-
</slot>
|
|
69
|
-
`;var yl=i=>{let e=i.mediaIsAirplaying?D.EXIT_AIRPLAY():D.ENTER_AIRPLAY();i.setAttribute("aria-label",e)},Bn=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_AIRPLAYING,o.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Tl,...e})}connectedCallback(){super.connectedCallback(),yl(this)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_IS_AIRPLAYING&&yl(this)}get mediaIsAirplaying(){return w(this,o.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){M(this,o.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return L(this,o.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){C(this,o.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new l.CustomEvent(v.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};l.customElements.get("media-airplay-button")||l.customElements.define("media-airplay-button",Bn);var Tc='<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>',Ic='<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>',kl=c.createElement("template");kl.innerHTML=`
|
|
197
|
+
`,nm=m.createElement("template");nm.innerHTML=`
|
|
70
198
|
<style>
|
|
71
|
-
:host([${
|
|
199
|
+
:host([${s.MEDIA_IS_AIRPLAYING}]) slot:not([name=exit]):not([name=icon]) {
|
|
72
200
|
display: none !important;
|
|
73
201
|
}
|
|
74
202
|
|
|
75
203
|
|
|
76
|
-
:host(:not([${
|
|
204
|
+
:host(:not([${s.MEDIA_IS_AIRPLAYING}])) slot:not([name=enter]):not([name=icon]) {
|
|
77
205
|
display: none !important;
|
|
78
206
|
}
|
|
79
207
|
</style>
|
|
80
208
|
|
|
81
209
|
<slot name="icon">
|
|
82
|
-
<slot name="enter">${
|
|
83
|
-
<slot name="exit">${
|
|
210
|
+
<slot name="enter">${am}</slot>
|
|
211
|
+
<slot name="exit">${am}</slot>
|
|
84
212
|
</slot>
|
|
85
|
-
`;var
|
|
86
|
-
<style>
|
|
87
|
-
:host {
|
|
88
|
-
display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
|
|
89
|
-
box-sizing: border-box;
|
|
90
|
-
}
|
|
91
|
-
</style>
|
|
92
|
-
`;var Vn=class extends l.HTMLElement{constructor(e={}){if(super(),kc(this,ne,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=Cl.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=rt(this,ne))==null?void 0:r.unassociateElement)==null||n.call(r,this),Da(this,ne,null)),a&&this.isConnected&&(Da(this,ne,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=rt(this,ne))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),Da(this,ne,Sc(this)),this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=rt(this,ne))==null?void 0:e.associateElement)==null||t.call(e,this)),(a=rt(this,ne))==null||a.addEventListener("pointerdown",this),(r=rt(this,ne))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,t,a,r;this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=rt(this,ne))==null?void 0:e.unassociateElement)==null||t.call(e,this)),(a=rt(this,ne))==null||a.removeEventListener("pointerdown",this),(r=rt(this,ne))==null||r.removeEventListener("click",this),Da(this,ne,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:m,height:h}=this.getBoundingClientRect(),p=n-d,b=s-u;if(p<0||b<0||p>m||b>h||m===0&&h===0)return;let{pointerType:_=this._pointerType}=e;if(this._pointerType=void 0,_===Dn.TOUCH){this.handleTap(e);return}else if(_===Dn.MOUSE){this.handleMouseClick(e);return}}}}get mediaPaused(){return w(this,o.MEDIA_PAUSED)}set mediaPaused(e){M(this,o.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?v.MEDIA_PLAY_REQUEST:v.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(t,{composed:!0,bubbles:!0}))}};ne=new WeakMap;function Sc(i){var e;let t=i.getAttribute(A.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):at(i,"media-controller")}l.customElements.get("media-gesture-receiver")||l.customElements.define("media-gesture-receiver",Vn);var Ml=new WeakMap,Wn=i=>{let e=Ml.get(i);return e||Ml.set(i,e=new Set),e},Ll=new l.ResizeObserver(i=>{for(let e of i)for(let t of Wn(e.target))t(e)});function Tt(i,e){Wn(i).add(e),Ll.observe(i)}function Mi(i,e){let t=Wn(i);t.delete(e),t.size||Ll.unobserve(i)}var Cc=Object.defineProperty,Mc=(i,e,t)=>e in i?Cc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Lc=(i,e,t)=>(Mc(i,typeof e!="symbol"?e+"":e,t),t),Gn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Fn=(i,e,t)=>(Gn(i,e,"read from private field"),t?t.call(i):e.get(i)),It=(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)},$n=(i,e,t,a)=>(Gn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ge=(i,e,t)=>(Gn(i,e,"access private method"),t),Oa,Zt,Kn,Rl,Yn,wl,Li,Pa,Ua,qn,Qt,Ri,k={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive"},xl=c.createElement("template");xl.innerHTML=`
|
|
213
|
+
`;var rm=i=>{let e=i.mediaIsAirplaying?Y.EXIT_AIRPLAY():Y.ENTER_AIRPLAY();i.setAttribute("aria-label",e)},ol=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_IS_AIRPLAYING,s.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:nm,...e})}connectedCallback(){super.connectedCallback(),rm(this)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_IS_AIRPLAYING&&rm(this)}get mediaIsAirplaying(){return H(this,s.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){B(this,s.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return I(this,s.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){k(this,s.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new l.CustomEvent(h.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};l.customElements.get("media-airplay-button")||l.customElements.define("media-airplay-button",ol);function sm({anchor:i,floating:e,placement:t}){let a=rf({anchor:i,floating:e}),{x:r,y:n}=sf(a,t);return{x:r,y:n}}function rf({anchor:i,floating:e}){return{anchor:nf(i,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function nf(i,e){let t=i.getBoundingClientRect(),a=e.getBoundingClientRect();return{x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}function sf({anchor:i,floating:e},t){let a=of(t)==="x"?"y":"x",r=a==="y"?"height":"width",n=om(t),o=i.x+i.width/2-e.width/2,d=i.y+i.height/2-e.height/2,u=i[r]/2-e[r]/2,c;switch(n){case"top":c={x:o,y:i.y-e.height};break;case"bottom":c={x:o,y:i.y+i.height};break;case"right":c={x:i.x+i.width,y:d};break;case"left":c={x:i.x-e.width,y:d};break;default:c={x:i.x,y:i.y}}switch(t.split("-")[1]){case"start":c[a]-=u;break;case"end":c[a]+=u;break}return c}function om(i){return i.split("-")[0]}function of(i){return["top","bottom"].includes(om(i))?"y":"x"}var lf=Object.defineProperty,df=(i,e,t)=>e in i?lf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,fn=(i,e,t)=>(df(i,typeof e!="symbol"?e+"":e,t),t),$t=class extends Event{constructor({action:e="auto",relatedTarget:t,...a}){super("invoke",a),fn(this,"action"),fn(this,"relatedTarget"),this.action=e,this.relatedTarget=t}},bn=class extends Event{constructor({newState:e,oldState:t,...a}){super("toggle",a),fn(this,"newState"),fn(this,"oldState"),this.newState=e,this.oldState=t}};var uf=Object.defineProperty,cf=(i,e,t)=>e in i?uf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,mf=(i,e,t)=>(cf(i,typeof e!="symbol"?e+"":e,t),t),gl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},W=(i,e,t)=>(gl(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)},It=(i,e,t,a)=>(gl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),V=(i,e,t)=>(gl(i,e,"access private method"),t),et,mi,Ft,lm,dm,En,gn,hi,ll,um,yn,_n,dl,ul,cm,cl,mm,ml,hm,Ki,Yi,pi,Gi,Tn,_l,hl,pm,Al,vm,pl,fm,yl,bm,vl,Em,fl,gm,$a,kn,bl,_m,Fa,Sn,An,El;function tt({type:i,text:e,value:t,checked:a}){let r=m.createElement("media-chrome-menu-item");r.type=i!=null?i:"",r.part.add("menu-item"),i&&r.part.add(i),r.value=t,r.checked=a;let n=m.createElement("span");return n.textContent=e,r.append(n),r}function $e(i,e){let t=i.querySelector(`:scope > [slot="${e}"]`);if((t==null?void 0:t.nodeName)=="SLOT"&&(t=t.assignedElements({flatten:!0})[0]),t)return t=t.cloneNode(!0),t;let a=i.shadowRoot.querySelector(`[name="${e}"] > svg`);return a?a.cloneNode(!0):""}var Am=m.createElement("template");Am.innerHTML=`
|
|
93
214
|
<style>
|
|
94
|
-
|
|
95
|
-
:host([${o.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
|
|
96
|
-
outline: none;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
215
|
:host {
|
|
100
|
-
|
|
216
|
+
font: var(--media-font,
|
|
217
|
+
var(--media-font-weight, normal)
|
|
218
|
+
var(--media-font-size, 14px) /
|
|
219
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
220
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
221
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
222
|
+
background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8))));
|
|
223
|
+
border-radius: var(--media-menu-border-radius);
|
|
224
|
+
border: var(--media-menu-border, none);
|
|
225
|
+
display: var(--media-menu-display, inline-flex);
|
|
226
|
+
transition: var(--media-menu-transition-in,
|
|
227
|
+
visibility 0s,
|
|
228
|
+
opacity .2s ease-out,
|
|
229
|
+
transform .15s ease-out,
|
|
230
|
+
left .2s ease-in-out,
|
|
231
|
+
min-width .2s ease-in-out,
|
|
232
|
+
min-height .2s ease-in-out
|
|
233
|
+
) !important;
|
|
234
|
+
|
|
235
|
+
visibility: var(--media-menu-visibility, visible);
|
|
236
|
+
opacity: var(--media-menu-opacity, 1);
|
|
237
|
+
max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));
|
|
238
|
+
transform: var(--media-menu-transform-in, translateY(0) scale(1));
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
|
|
241
|
+
min-height: 0;
|
|
101
242
|
position: relative;
|
|
102
|
-
|
|
103
|
-
line-height: 0;
|
|
104
|
-
background-color: var(--media-background-color, #000);
|
|
243
|
+
box-sizing: border-box;
|
|
105
244
|
}
|
|
106
245
|
|
|
107
|
-
:host(
|
|
246
|
+
:host([hidden]) {
|
|
247
|
+
transition: var(--media-menu-transition-out,
|
|
248
|
+
visibility .15s ease-in,
|
|
249
|
+
opacity .15s ease-in,
|
|
250
|
+
transform .15s ease-in
|
|
251
|
+
) !important;
|
|
252
|
+
visibility: var(--media-menu-hidden-visibility, hidden);
|
|
253
|
+
opacity: var(--media-menu-hidden-opacity, 0);
|
|
254
|
+
max-height: var(--media-menu-hidden-max-height,
|
|
255
|
+
var(--media-menu-max-height, var(--_menu-max-height, 300px)));
|
|
256
|
+
transform: var(--media-menu-transform-out, translateY(2px) scale(.99));
|
|
257
|
+
pointer-events: none;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
:host([slot="submenu"]) {
|
|
261
|
+
background: none;
|
|
262
|
+
width: 100%;
|
|
263
|
+
min-height: 100%;
|
|
108
264
|
position: absolute;
|
|
109
|
-
top: 0;
|
|
110
|
-
left: 0;
|
|
111
265
|
bottom: 0;
|
|
112
|
-
right:
|
|
266
|
+
right: -100%;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
#container {
|
|
113
270
|
display: flex;
|
|
114
|
-
flex-
|
|
115
|
-
|
|
116
|
-
|
|
271
|
+
flex-direction: column;
|
|
272
|
+
min-height: 0;
|
|
273
|
+
transition: transform .2s ease-out;
|
|
274
|
+
transform: translate(0, 0);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
#container.has-expanded {
|
|
278
|
+
transition: transform .2s ease-in;
|
|
279
|
+
transform: translate(-100%, 0);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
slot[name="header"] {
|
|
283
|
+
display: flex;
|
|
284
|
+
padding: .4em .7em;
|
|
285
|
+
border-bottom: 1px solid rgb(255 255 255 / .25);
|
|
286
|
+
cursor: default;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
slot[name="header"][hidden] {
|
|
290
|
+
display: none;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
button[part~="back"] {
|
|
294
|
+
background: none;
|
|
295
|
+
color: inherit;
|
|
296
|
+
border: none;
|
|
297
|
+
padding: 0;
|
|
298
|
+
font: inherit;
|
|
299
|
+
cursor: pointer;
|
|
300
|
+
outline: inherit;
|
|
301
|
+
display: inline-flex;
|
|
302
|
+
align-items: center;
|
|
303
|
+
cursor: pointer;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
svg[part~="back"] {
|
|
307
|
+
height: var(--media-menu-icon-height, var(--media-control-height, 24px));
|
|
308
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
309
|
+
display: block;
|
|
310
|
+
margin-right: .5ch;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
slot:not([name]) {
|
|
314
|
+
gap: var(--media-menu-gap);
|
|
315
|
+
flex-direction: var(--media-menu-flex-direction, column);
|
|
316
|
+
overflow: var(--media-menu-overflow, hidden auto);
|
|
317
|
+
display: flex;
|
|
318
|
+
min-height: 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
:host([role="menu"]) slot:not([name]) {
|
|
322
|
+
padding-block: .4em;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
slot:not([name])::slotted([role="menu"]) {
|
|
117
326
|
background: none;
|
|
118
327
|
}
|
|
119
328
|
|
|
120
|
-
|
|
121
|
-
|
|
329
|
+
media-chrome-menu-item > span {
|
|
330
|
+
margin-right: .5ch;
|
|
331
|
+
max-width: var(--media-menu-item-max-width);
|
|
332
|
+
text-overflow: ellipsis;
|
|
333
|
+
overflow: hidden;
|
|
334
|
+
}
|
|
335
|
+
</style>
|
|
336
|
+
<style id="layout-row" media="width:0">
|
|
337
|
+
|
|
338
|
+
slot[name="header"] {
|
|
339
|
+
padding: .4em .5em;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
slot:not([name]) {
|
|
343
|
+
gap: var(--media-menu-gap, .25em);
|
|
344
|
+
flex-direction: var(--media-menu-flex-direction, row);
|
|
345
|
+
padding-inline: .5em;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
media-chrome-menu-item {
|
|
349
|
+
padding: .3em .5em;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
media-chrome-menu-item[aria-checked="true"] {
|
|
353
|
+
background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));
|
|
122
354
|
}
|
|
123
355
|
|
|
124
356
|
|
|
125
|
-
|
|
126
|
-
display: var(--media-
|
|
357
|
+
media-chrome-menu-item::part(checked-indicator) {
|
|
358
|
+
display: var(--media-menu-item-checked-indicator-display, none);
|
|
359
|
+
}
|
|
360
|
+
</style>
|
|
361
|
+
<div id="container">
|
|
362
|
+
<slot name="header" hidden>
|
|
363
|
+
<button part="back button" aria-label="Back to previous menu">
|
|
364
|
+
<slot name="back-icon">
|
|
365
|
+
<svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">
|
|
366
|
+
<path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/>
|
|
367
|
+
</svg>
|
|
368
|
+
</slot>
|
|
369
|
+
<slot name="title"></slot>
|
|
370
|
+
</button>
|
|
371
|
+
</slot>
|
|
372
|
+
<slot></slot>
|
|
373
|
+
</div>
|
|
374
|
+
<slot name="checked-indicator" hidden></slot>
|
|
375
|
+
`;var ci={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"},ce=class extends l.HTMLElement{constructor(){super(),$(this,ll),$(this,_n),$(this,ul),$(this,cl),$(this,ml),$(this,pi),$(this,Tn),$(this,hl),$(this,Al),$(this,pl),$(this,yl),$(this,vl),$(this,fl),$(this,$a),$(this,bl),$(this,Fa),$(this,An),$(this,et,void 0),$(this,mi,void 0),$(this,Ft,void 0),$(this,lm,""),$(this,dm,null),$(this,En,new Set),$(this,gn,void 0),$(this,hi,!1),$(this,yn,()=>{let e=W(this,En),t=new Set(this.items);for(let a of e)t.has(a)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:a}));for(let a of t)e.has(a)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:a}));It(this,En,t)}),$(this,Ki,()=>{V(this,pi,Gi).call(this,!1),V(this,Tn,_l).call(this,!1)}),$(this,Yi,()=>{V(this,pi,Gi).call(this,!1)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=this.constructor.template.content.cloneNode(!0),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),It(this,gn,new MutationObserver(W(this,yn))),W(this,gn).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[ci.DISABLED,ci.HIDDEN,ci.STYLE,ci.ANCHOR,y.MEDIA_CONTROLLER]}static formatMenuItemText(e){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":V(this,ll,um).call(this,e);break;case"invoke":V(this,ul,cm).call(this,e);break;case"click":V(this,hl,pm).call(this,e);break;case"toggle":V(this,pl,fm).call(this,e);break;case"focusout":V(this,vl,Em).call(this,e);break;case"keydown":V(this,fl,gm).call(this,e);break}}connectedCallback(){var e,t;V(this,_n,dl).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),It(this,et,qr(this)),(t=(e=W(this,et))==null?void 0:e.associateElement)==null||t.call(e,this),this.hidden||(Le(Va(this),W(this,Ki)),Le(this,W(this,Yi)))}disconnectedCallback(){var e,t;Xe(Va(this),W(this,Ki)),Xe(this,W(this,Yi)),this.disable(),(t=(e=W(this,et))==null?void 0:e.unassociateElement)==null||t.call(e,this),It(this,et,null)}attributeChangedCallback(e,t,a){var r,n,o,d;e===ci.HIDDEN&&a!==t?(W(this,hi)||It(this,hi,!0),this.hidden?V(this,ml,hm).call(this):V(this,cl,mm).call(this),this.dispatchEvent(new bn({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===y.MEDIA_CONTROLLER?(t&&((n=(r=W(this,et))==null?void 0:r.unassociateElement)==null||n.call(r,this),It(this,et,null)),a&&this.isConnected&&(It(this,et,qr(this)),(d=(o=W(this,et))==null?void 0:o.associateElement)==null||d.call(o,this))):e===ci.DISABLED&&a!==t?a==null?this.enable():this.disable():e===ci.STYLE&&a!==t&&V(this,_n,dl).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=ri(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(hf)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,t;return(t=(e=this.checkedItems[0])==null?void 0:e.value)!=null?t:""}set value(e){let t=this.items.find(a=>a.value===e);t&&V(this,An,El).call(this,t)}focus(){if(It(this,mi,ai()),this.items.length){V(this,Fa,Sn).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e==null||e.focus()}handleSelect(e){var t;let a=V(this,$a,kn).call(this,e);a&&(V(this,An,El).call(this,a,a.type==="checkbox"),W(this,Ft)&&!this.hidden&&((t=W(this,mi))==null||t.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var t,a;let{key:r}=e,n=this.items,o=(a=(t=V(this,$a,kn).call(this,e))!=null?t:V(this,bl,_m).call(this))!=null?a:n[0],d=n.indexOf(o),u=Math.max(0,d);r==="ArrowDown"?u++:r==="ArrowUp"?u--:e.key==="Home"?u=0:e.key==="End"&&(u=n.length-1),u<0&&(u=n.length-1),u>n.length-1&&(u=0),V(this,Fa,Sn).call(this,n[u]),n[u].focus()}};et=new WeakMap;mi=new WeakMap;Ft=new WeakMap;lm=new WeakMap;dm=new WeakMap;En=new WeakMap;gn=new WeakMap;hi=new WeakMap;ll=new WeakSet;um=function(i){let e=i.target;for(let t of e.assignedNodes({flatten:!0}))t.nodeType===3&&t.textContent.trim()===""&&t.remove();if(["header","title"].includes(e.name)){let t=this.shadowRoot.querySelector('slot[name="header"]');t.hidden=e.assignedNodes().length===0}e.name||W(this,yn).call(this)};yn=new WeakMap;_n=new WeakSet;dl=function(){var i;let e=this.shadowRoot.querySelector("#layout-row"),t=(i=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:i.trim();e.setAttribute("media",t==="row"?"":"width:0")};ul=new WeakSet;cm=function(i){It(this,Ft,i.relatedTarget),ue(this,i.relatedTarget)||(this.hidden=!this.hidden)};cl=new WeakSet;mm=function(){var i;(i=W(this,Ft))==null||i.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>V(this,pi,Gi).call(this,!1)),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),Le(Va(this),W(this,Ki)),Le(this,W(this,Yi))};ml=new WeakSet;hm=function(){var i;(i=W(this,Ft))==null||i.setAttribute("aria-expanded","false"),Xe(Va(this),W(this,Ki)),Xe(this,W(this,Yi))};Ki=new WeakMap;Yi=new WeakMap;pi=new WeakSet;Gi=function(i,e){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:t,y:a}=sm({anchor:this.anchorElement,floating:this,placement:"top-start"});e!=null||(e=this.offsetWidth);let n=Va(this).getBoundingClientRect(),o=this.anchorElement.getBoundingClientRect(),d=n.width-t-e,u=n.height-a-this.offsetHeight,c=n.height-o.height,{style:f}=N(this.shadowRoot,":host");i||f.setProperty("--media-menu-transition-in","none"),f.setProperty("position","absolute"),f.setProperty("right",`${Math.max(0,d)}px`),f.setProperty("bottom",`${u}px`),f.setProperty("--_menu-max-height",`${c}px`),f.removeProperty("--media-menu-transition-in")};Tn=new WeakSet;_l=function(i){let e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),t=e==null?void 0:e.querySelector('[role="menu"]'),{style:a}=N(this.shadowRoot,":host");if(i||a.setProperty("--media-menu-transition-in","none"),t){let r=t.offsetHeight,n=Math.max(t.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${n}px`),this.style.setProperty("min-height",`${r}px`),V(this,pi,Gi).call(this,i,n)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),V(this,pi,Gi).call(this,i);a.removeProperty("--media-menu-transition-in")};hl=new WeakSet;pm=function(i){var e;if(i.stopPropagation(),i.composedPath().includes(W(this,Al,vm))){(e=W(this,mi))==null||e.focus(),this.hidden=!0;return}let t=V(this,$a,kn).call(this,i);!t||t.hasAttribute("disabled")||(V(this,Fa,Sn).call(this,t),this.handleSelect(i))};Al=new WeakSet;vm=function(){var i;return(i=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:i.find(t=>t.part.contains("back")&&t.part.contains("button"))};pl=new WeakSet;fm=function(i){if(i.target===this)return;V(this,yl,bm).call(this);let e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let t of e)t.invokeTargetElement!=i.target&&i.newState=="open"&&t.getAttribute("aria-expanded")=="true"&&!t.invokeTargetElement.hidden&&t.invokeTargetElement.dispatchEvent(new $t({relatedTarget:t}));for(let t of e)t.setAttribute("aria-expanded",`${!t.submenuElement.hidden}`);V(this,Tn,_l).call(this,!0)};yl=new WeakSet;bm=function(){let i='[role="menuitem"] > [role="menu"]:not([hidden])',e=this.querySelector(i);this.container.classList.toggle("has-expanded",!!e)};vl=new WeakSet;Em=function(i){var e;ue(this,i.relatedTarget)||(W(this,hi)&&((e=W(this,mi))==null||e.focus()),W(this,Ft)&&W(this,Ft)!==i.relatedTarget&&!this.hidden&&(this.hidden=!0))};fl=new WeakSet;gm=function(i){var e,t,a,r,n;let{key:o,ctrlKey:d,altKey:u,metaKey:c}=i;if(!(d||u||c)&&this.keysUsed.includes(o))if(i.preventDefault(),i.stopPropagation(),o==="Tab"){if(W(this,hi)){this.hidden=!0;return}i.shiftKey?(t=(e=this.previousElementSibling)==null?void 0:e.focus)==null||t.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()}else o==="Escape"?((n=W(this,mi))==null||n.focus(),W(this,hi)&&(this.hidden=!0)):o==="Enter"||o===" "?this.handleSelect(i):this.handleMove(i)};$a=new WeakSet;kn=function(i){return i.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};bl=new WeakSet;_m=function(){return this.items.find(i=>i.tabIndex===0)};Fa=new WeakSet;Sn=function(i){for(let e of this.items)e.tabIndex=e===i?0:-1};An=new WeakSet;El=function(i,e){let t=[...this.checkedItems];i.type==="radio"&&this.radioGroupItems.forEach(a=>a.checked=!1),e?i.checked=!i.checked:i.checked=!0,this.checkedItems.some((a,r)=>a!=t[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};mf(ce,"template",Am);function hf(i){return["menuitem","menuitemradio","menuitemcheckbox"].includes(i==null?void 0:i.role)}function Va(i){var e;return(e=i.getAttribute("bounds")?Be(i,`#${i.getAttribute("bounds")}`):X(i)||i.parentElement)!=null?e:i}l.customElements.get("media-chrome-menu")||l.customElements.define("media-chrome-menu",ce);var Cl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ym=(i,e,t)=>(Cl(i,e,"read from private field"),t?t.call(i):e.get(i)),In=(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)},Tl=(i,e,t,a)=>(Cl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Cn=(i,e,t)=>(Cl(i,e,"access private method"),t),Ka,wn,Ln,kl,Mn,Sl,Il=class extends ce{constructor(){super(...arguments),In(this,Ln),In(this,Mn),In(this,Ka,[]),In(this,wn,void 0)}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_AUDIO_TRACK_LIST,s.MEDIA_AUDIO_TRACK_ENABLED,s.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_AUDIO_TRACK_ENABLED&&t!==a?this.value=a:e===s.MEDIA_AUDIO_TRACK_LIST&&t!==a&&(Tl(this,Ka,$r(a)),Cn(this,Ln,kl).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Cn(this,Mn,Sl))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Cn(this,Mn,Sl))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:X(this).querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return ym(this,Ka)}set mediaAudioTrackList(e){Tl(this,Ka,e),Cn(this,Ln,kl).call(this)}get mediaAudioTrackEnabled(){return I(this,s.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){k(this,s.MEDIA_AUDIO_TRACK_ENABLED,e)}};Ka=new WeakMap;wn=new WeakMap;Ln=new WeakSet;kl=function(){if(ym(this,wn)===JSON.stringify(this.mediaAudioTrackList))return;Tl(this,wn,JSON.stringify(this.mediaAudioTrackList));let i=this.mediaAudioTrackList;this.defaultSlot.textContent="";for(let e of i){let t=this.formatMenuItemText(e.label,e),a=tt({type:"radio",text:t,value:`${e.id}`,checked:e.enabled});a.prepend($e(this,"checked-indicator")),this.defaultSlot.append(a)}};Mn=new WeakSet;Sl=function(){if(this.value==null)return;let i=new l.CustomEvent(h.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-audio-track-menu")||l.customElements.define("media-audio-track-menu",Il);var ke=class extends P{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=ri(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){this.invokeTargetElement.dispatchEvent(new $t({relatedTarget:this}))}};l.customElements.get("media-chrome-menu-button")||l.customElements.define("media-chrome-menu-button",ke);var pf=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
376
|
+
<path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
|
|
377
|
+
<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"/>
|
|
378
|
+
</svg>`,Tm=m.createElement("template");Tm.innerHTML=`
|
|
379
|
+
<slot name="icon">${pf}</slot>
|
|
380
|
+
`;var Ll=class extends ke{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_AUDIO_TRACK_ENABLED,s.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:Tm})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",K.AUDIO_TRACKS())}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:X(this).querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){return I(this,s.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){k(this,s.MEDIA_AUDIO_TRACK_ENABLED,e)}};l.customElements.get("media-audio-track-menu-button")||l.customElements.define("media-audio-track-menu-button",Ll);var vf=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
381
|
+
<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"/>
|
|
382
|
+
</svg>`,ff=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
383
|
+
<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"/>
|
|
384
|
+
</svg>`,Cm=m.createElement("template");Cm.innerHTML=`
|
|
385
|
+
<style>
|
|
386
|
+
:host([aria-checked="true"]) slot[name=off] {
|
|
387
|
+
display: none !important;
|
|
127
388
|
}
|
|
128
389
|
|
|
129
390
|
|
|
130
|
-
:host([
|
|
131
|
-
|
|
132
|
-
|
|
391
|
+
:host(:not([aria-checked="true"])) slot[name=on] {
|
|
392
|
+
display: none !important;
|
|
393
|
+
}
|
|
394
|
+
</style>
|
|
395
|
+
|
|
396
|
+
<slot name="icon">
|
|
397
|
+
<slot name="on">${vf}</slot>
|
|
398
|
+
<slot name="off">${ff}</slot>
|
|
399
|
+
</slot>
|
|
400
|
+
`;var km=i=>{i.setAttribute("aria-checked",an(i))},Ml=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_SUBTITLES_LIST,s.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:Cm,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",K.CLOSED_CAPTIONS()),km(this)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_SUBTITLES_SHOWING&&km(this)}get mediaSubtitlesList(){return Sm(this,s.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Im(this,s.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Sm(this,s.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Im(this,s.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new l.CustomEvent(h.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}},Sm=(i,e)=>{let t=i.getAttribute(e);return t?kt(t):[]},Im=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=He(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-button")||l.customElements.define("media-captions-button",Ml);var bf=Object.defineProperty,Ef=(i,e,t)=>e in i?bf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,gf=(i,e,t)=>(Ef(i,typeof e!="symbol"?e+"":e,t),t),Ol=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_f=(i,e,t)=>(Ol(i,e,"read from private field"),t?t.call(i):e.get(i)),wl=(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)},Af=(i,e,t,a)=>(Ol(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Rl=(i,e,t)=>(Ol(i,e,"access private method"),t),xn,xl,wm,Rn,Dl,yf=`
|
|
401
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
|
|
402
|
+
<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"/>
|
|
403
|
+
</svg>`,Rm=m.createElement("template");Rm.innerHTML=ce.template.innerHTML+`
|
|
404
|
+
<slot name="captions-indicator" hidden>${yf}</slot>`;var Dn=class extends ce{constructor(){super(...arguments),wl(this,xl),wl(this,Rn),wl(this,xn,void 0)}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_SUBTITLES_LIST,s.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_SUBTITLES_LIST&&t!==a?Rl(this,xl,wm).call(this):e===s.MEDIA_SUBTITLES_SHOWING&&t!==a&&(this.value=a)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Rl(this,Rn,Dl))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Rl(this,Rn,Dl))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:X(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return Lm(this,s.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Mm(this,s.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Lm(this,s.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Mm(this,s.MEDIA_SUBTITLES_SHOWING,e)}};xn=new WeakMap;xl=new WeakSet;wm=function(){var i;if(_f(this,xn)===JSON.stringify(this.mediaSubtitlesList))return;Af(this,xn,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";let e=!this.value,t=tt({type:"radio",text:this.formatMenuItemText("Off"),value:"off",checked:e});t.prepend($e(this,"checked-indicator")),this.defaultSlot.append(t);let a=this.mediaSubtitlesList;for(let r of a){let n=tt({type:"radio",text:this.formatMenuItemText(r.label,r),value:oi(r),checked:this.value==oi(r)});n.prepend($e(this,"checked-indicator")),((i=r.kind)!=null?i:"subs")==="captions"&&n.append($e(this,"captions-indicator")),this.defaultSlot.append(n)}};Rn=new WeakSet;Dl=function(){let i=this.mediaSubtitlesShowing,e=this.getAttribute(s.MEDIA_SUBTITLES_SHOWING),t=this.value!==e;if(i!=null&&i.length&&t&&this.dispatchEvent(new l.CustomEvent(h.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:i})),!this.value||!t)return;let a=new l.CustomEvent(h.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};gf(Dn,"template",Rm);var Lm=(i,e)=>{let t=i.getAttribute(e);return t?kt(t):[]},Mm=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=He(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-menu")||l.customElements.define("media-captions-menu",Dn);var Tf=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
405
|
+
<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"/>
|
|
406
|
+
</svg>`,kf=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
407
|
+
<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"/>
|
|
408
|
+
</svg>`,Pm=m.createElement("template");Pm.innerHTML=`
|
|
409
|
+
<style>
|
|
410
|
+
:host([aria-checked="true"]) slot[name=off] {
|
|
411
|
+
display: none !important;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
:host(:not([aria-checked="true"])) slot[name=on] {
|
|
416
|
+
display: none !important;
|
|
417
|
+
}
|
|
418
|
+
</style>
|
|
419
|
+
|
|
420
|
+
<slot name="icon">
|
|
421
|
+
<slot name="on">${Tf}</slot>
|
|
422
|
+
<slot name="off">${kf}</slot>
|
|
423
|
+
</slot>
|
|
424
|
+
`;var xm=i=>{i.setAttribute("aria-checked",an(i))},Pl=class extends ke{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_SUBTITLES_LIST,s.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:Pm,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",K.CLOSED_CAPTIONS()),xm(this)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_SUBTITLES_SHOWING&&xm(this)}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:X(this).querySelector("media-captions-menu")}get mediaSubtitlesList(){return Dm(this,s.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Om(this,s.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Dm(this,s.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Om(this,s.MEDIA_SUBTITLES_SHOWING,e)}},Dm=(i,e)=>{let t=i.getAttribute(e);return t?kt(t):[]},Om=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=He(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-menu-button")||l.customElements.define("media-captions-menu-button",Pl);var Sf='<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>',If='<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>',Um=m.createElement("template");Um.innerHTML=`
|
|
425
|
+
<style>
|
|
426
|
+
:host([${s.MEDIA_IS_CASTING}]) slot:not([name=exit]):not([name=icon]) {
|
|
427
|
+
display: none !important;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
:host(:not([${s.MEDIA_IS_CASTING}])) slot:not([name=enter]):not([name=icon]) {
|
|
432
|
+
display: none !important;
|
|
433
|
+
}
|
|
434
|
+
</style>
|
|
435
|
+
|
|
436
|
+
<slot name="icon">
|
|
437
|
+
<slot name="enter">${Sf}</slot>
|
|
438
|
+
<slot name="exit">${If}</slot>
|
|
439
|
+
</slot>
|
|
440
|
+
`;var Nm=i=>{let e=i.mediaIsCasting?Y.EXIT_CAST():Y.ENTER_CAST();i.setAttribute("aria-label",e)},Nl=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_IS_CASTING,s.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Um,...e})}connectedCallback(){super.connectedCallback(),Nm(this)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_IS_CASTING&&Nm(this)}get mediaIsCasting(){return H(this,s.MEDIA_IS_CASTING)}set mediaIsCasting(e){B(this,s.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return I(this,s.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){k(this,s.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?h.MEDIA_EXIT_CAST_REQUEST:h.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",Nl);var Cf=Object.defineProperty,Lf=(i,e,t)=>e in i?Cf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Mf=(i,e,t)=>(Lf(i,typeof e!="symbol"?e+"":e,t),t),Vl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},qi=(i,e,t)=>(Vl(i,e,"read from private field"),t?t.call(i):e.get(i)),vi=(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)},Bm=(i,e,t,a)=>(Vl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ya=(i,e,t)=>(Vl(i,e,"access private method"),t),Ga,fi,Bl,Wm,Wl,Hm,Hl,$m,$l,Fm,Fl,Vm,Km=m.createElement("template");Km.innerHTML=`
|
|
441
|
+
<style>
|
|
442
|
+
:host {
|
|
443
|
+
font: var(--media-font,
|
|
444
|
+
var(--media-font-weight, normal)
|
|
445
|
+
var(--media-font-size, 14px) /
|
|
446
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
447
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
448
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
449
|
+
background: var(--media-dialog-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8))));
|
|
450
|
+
border-radius: var(--media-dialog-border-radius);
|
|
451
|
+
border: var(--media-dialog-border, none);
|
|
452
|
+
display: var(--media-dialog-display, inline-flex);
|
|
453
|
+
transition: var(--media-dialog-transition-in,
|
|
454
|
+
visibility 0s,
|
|
455
|
+
opacity .2s ease-out,
|
|
456
|
+
transform .15s ease-out
|
|
457
|
+
) !important;
|
|
458
|
+
|
|
459
|
+
visibility: var(--media-dialog-visibility, visible);
|
|
460
|
+
opacity: var(--media-dialog-opacity, 1);
|
|
461
|
+
transform: var(--media-dialog-transform-in, translateY(0) scale(1));
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
:host([hidden]) {
|
|
465
|
+
transition: var(--media-dialog-transition-out,
|
|
466
|
+
visibility .15s ease-in,
|
|
467
|
+
opacity .15s ease-in,
|
|
468
|
+
transform .15s ease-in
|
|
469
|
+
) !important;
|
|
470
|
+
visibility: var(--media-dialog-hidden-visibility, hidden);
|
|
471
|
+
opacity: var(--media-dialog-hidden-opacity, 0);
|
|
472
|
+
transform: var(--media-dialog-transform-out, translateY(2px) scale(.99));
|
|
473
|
+
pointer-events: none;
|
|
474
|
+
}
|
|
475
|
+
</style>
|
|
476
|
+
<slot></slot>
|
|
477
|
+
`;var Ul={HIDDEN:"hidden",ANCHOR:"anchor"},On=class extends l.HTMLElement{constructor(){super(),vi(this,Bl),vi(this,Wl),vi(this,Hl),vi(this,$l),vi(this,Fl),vi(this,Ga,void 0),vi(this,fi,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=this.constructor.template.content.cloneNode(!0),this.shadowRoot.append(this.nativeEl)),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[Ul.HIDDEN,Ul.ANCHOR]}handleEvent(e){switch(e.type){case"invoke":Ya(this,Hl,$m).call(this,e);break;case"focusout":Ya(this,$l,Fm).call(this,e);break;case"keydown":Ya(this,Fl,Vm).call(this,e);break}}connectedCallback(){this.role||(this.role="dialog")}attributeChangedCallback(e,t,a){e===Ul.HIDDEN&&a!==t&&(this.hidden?Ya(this,Wl,Hm).call(this):Ya(this,Bl,Wm).call(this))}focus(){Bm(this,Ga,ai());let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e==null||e.focus()}get keysUsed(){return["Escape","Tab"]}};Ga=new WeakMap;fi=new WeakMap;Bl=new WeakSet;Wm=function(){var i;(i=qi(this,fi))==null||i.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0})};Wl=new WeakSet;Hm=function(){var i;(i=qi(this,fi))==null||i.setAttribute("aria-expanded","false")};Hl=new WeakSet;$m=function(i){Bm(this,fi,i.relatedTarget),ue(this,i.relatedTarget)||(this.hidden=!this.hidden)};$l=new WeakSet;Fm=function(i){var e;ue(this,i.relatedTarget)||((e=qi(this,Ga))==null||e.focus(),qi(this,fi)&&qi(this,fi)!==i.relatedTarget&&!this.hidden&&(this.hidden=!0))};Fl=new WeakSet;Vm=function(i){var e,t,a,r,n;let{key:o,ctrlKey:d,altKey:u,metaKey:c}=i;d||u||c||this.keysUsed.includes(o)&&(i.preventDefault(),i.stopPropagation(),o==="Tab"?(i.shiftKey?(t=(e=this.previousElementSibling)==null?void 0:e.focus)==null||t.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()):o==="Escape"&&((n=qi(this,Ga))==null||n.focus(),this.hidden=!0))};Mf(On,"template",Km);l.customElements.get("media-chrome-dialog")||l.customElements.define("media-chrome-dialog",On);var wf=Object.defineProperty,Rf=(i,e,t)=>e in i?wf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,xf=(i,e,t)=>(Rf(i,typeof e!="symbol"?e+"":e,t),t),Ql=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},at=(i,e,t)=>(Ql(i,e,"read from private field"),t?t.call(i):e.get(i)),Ct=(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)},Kl=(i,e,t,a)=>(Ql(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),it=(i,e,t)=>(Ql(i,e,"access private method"),t),Pn,Za,Yl,Ym,zl,Gm,Xl,qm,rt,Zi,Qa,Gl,Zm,Nn,ql,Qm=m.createElement("template");Qm.innerHTML=`
|
|
478
|
+
<style>
|
|
479
|
+
:host {
|
|
480
|
+
transition: var(--media-menu-item-transition,
|
|
481
|
+
background .15s linear,
|
|
482
|
+
opacity .2s ease-in-out
|
|
483
|
+
);
|
|
484
|
+
outline: var(--media-menu-item-outline, 0);
|
|
485
|
+
outline-offset: var(--media-menu-item-outline-offset, -1px);
|
|
486
|
+
cursor: pointer;
|
|
487
|
+
display: flex;
|
|
488
|
+
align-items: center;
|
|
489
|
+
align-self: stretch;
|
|
490
|
+
justify-self: stretch;
|
|
491
|
+
white-space: nowrap;
|
|
492
|
+
white-space-collapse: collapse;
|
|
493
|
+
text-wrap: nowrap;
|
|
494
|
+
padding: .4em .8em .4em 1em;
|
|
133
495
|
}
|
|
134
496
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
497
|
+
:host(:focus-visible) {
|
|
498
|
+
box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
499
|
+
outline: var(--media-menu-item-hover-outline, 0);
|
|
500
|
+
outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px));
|
|
139
501
|
}
|
|
140
502
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
503
|
+
:host(:hover) {
|
|
504
|
+
cursor: pointer;
|
|
505
|
+
background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5));
|
|
506
|
+
outline: var(--media-menu-item-hover-outline);
|
|
507
|
+
outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px));
|
|
144
508
|
}
|
|
145
509
|
|
|
146
|
-
:host(
|
|
147
|
-
|
|
148
|
-
justify-content: center;
|
|
510
|
+
:host([aria-checked="true"]) {
|
|
511
|
+
background: var(--media-menu-item-checked-background);
|
|
149
512
|
}
|
|
150
513
|
|
|
151
|
-
:host(
|
|
152
|
-
|
|
153
|
-
align-self: stretch;
|
|
154
|
-
flex-grow: 1;
|
|
514
|
+
:host([hidden]) {
|
|
515
|
+
display: none;
|
|
155
516
|
}
|
|
156
517
|
|
|
157
|
-
|
|
158
|
-
display: inline;
|
|
159
|
-
flex-grow: 1;
|
|
518
|
+
:host([disabled]) {
|
|
160
519
|
pointer-events: none;
|
|
161
|
-
|
|
520
|
+
color: rgba(255, 255, 255, .3);
|
|
162
521
|
}
|
|
163
522
|
|
|
164
|
-
|
|
165
|
-
::slotted([slot=media]),
|
|
166
|
-
::slotted([slot=poster]) {
|
|
523
|
+
slot:not([name]) {
|
|
167
524
|
width: 100%;
|
|
168
|
-
height: 100%;
|
|
169
525
|
}
|
|
170
526
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
527
|
+
slot:not([name="submenu"]) {
|
|
528
|
+
display: inline-flex;
|
|
529
|
+
align-items: center;
|
|
530
|
+
transition: inherit;
|
|
531
|
+
opacity: var(--media-menu-item-opacity, 1);
|
|
174
532
|
}
|
|
175
533
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
width: 100% !important;
|
|
180
|
-
height: 100% !important;
|
|
534
|
+
slot[name="description"] {
|
|
535
|
+
justify-content: end;
|
|
181
536
|
}
|
|
182
537
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
538
|
+
slot[name="description"] > span {
|
|
539
|
+
display: inline-block;
|
|
540
|
+
margin-inline: 1em .2em;
|
|
541
|
+
max-width: var(--media-menu-item-description-max-width, 100px);
|
|
542
|
+
text-overflow: ellipsis;
|
|
543
|
+
overflow: hidden;
|
|
544
|
+
font-size: .8em;
|
|
545
|
+
font-weight: 400;
|
|
546
|
+
text-align: right;
|
|
547
|
+
position: relative;
|
|
548
|
+
top: .04em;
|
|
187
549
|
}
|
|
188
550
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
opacity: 0;
|
|
192
|
-
transition: opacity 1s;
|
|
551
|
+
slot[name="checked-indicator"] {
|
|
552
|
+
display: none;
|
|
193
553
|
}
|
|
194
554
|
|
|
195
|
-
:host(
|
|
196
|
-
|
|
555
|
+
:host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] {
|
|
556
|
+
display: var(--media-menu-item-checked-indicator-display, inline-block);
|
|
197
557
|
}
|
|
198
558
|
|
|
199
|
-
|
|
200
|
-
|
|
559
|
+
|
|
560
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
561
|
+
height: var(--media-menu-item-icon-height, var(--media-control-height, 24px));
|
|
562
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
563
|
+
display: block;
|
|
201
564
|
}
|
|
202
565
|
|
|
203
566
|
|
|
204
|
-
|
|
205
|
-
|
|
567
|
+
[part~="indicator"],
|
|
568
|
+
::slotted([part~="indicator"]) {
|
|
569
|
+
fill: var(--media-menu-item-indicator-fill,
|
|
570
|
+
var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));
|
|
571
|
+
height: var(--media-menu-item-indicator-height, 1.25em);
|
|
572
|
+
margin-right: .5ch;
|
|
206
573
|
}
|
|
207
574
|
|
|
208
|
-
|
|
209
|
-
|
|
575
|
+
[part~="checked-indicator"] {
|
|
576
|
+
visibility: hidden;
|
|
210
577
|
}
|
|
211
578
|
|
|
212
|
-
|
|
213
|
-
|
|
579
|
+
:host([aria-checked="true"]) [part~="checked-indicator"] {
|
|
580
|
+
visibility: visible;
|
|
214
581
|
}
|
|
215
582
|
</style>
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
<media-gesture-receiver slot="gestures-chrome"></media-gesture-receiver>
|
|
583
|
+
<slot name="checked-indicator">
|
|
584
|
+
<svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">
|
|
585
|
+
<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"/>
|
|
586
|
+
</svg>
|
|
221
587
|
</slot>
|
|
222
|
-
<
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
</span>
|
|
229
|
-
`;var Rc=Object.values(o),wc="sm:384 md:576 lg:768 xl:960";function xc(i){Dc(i.target,i.contentRect.width)}function Dc(i,e){var t;if(!i.isConnected)return;let a=(t=i.getAttribute(k.BREAKPOINTS))!=null?t:wc,r=Oc(a),n=Nc(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(qe.BREAKPOINTS_CHANGE,{detail:n});i.dispatchEvent(d)}}function Oc(i){let e=i.split(/\s+/);return Object.fromEntries(e.map(t=>t.split(":")))}function Nc(i,e){return Object.keys(i).filter(t=>e>=i[t])}var Na=class extends l.HTMLElement{constructor(){super(),It(this,Kn),It(this,Yn),It(this,Li),It(this,Ua),It(this,Qt),It(this,Oa,0),It(this,Zt,void 0),Lc(this,"breakpointsComputed",!1),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(xl.content.cloneNode(!0)));let e=s=>{let d=this.media;for(let u of s)u.type==="childList"&&(u.removedNodes.forEach(m=>{if(m.slot=="media"&&u.target==this){let h=u.previousSibling&&u.previousSibling.previousElementSibling;if(!h||!d)this.mediaUnsetCallback(m);else{let p=h.slot!=="media";for(;(h=h.previousSibling)!==null;)h.slot=="media"&&(p=!1);p&&this.mediaUnsetCallback(m)}}}),d&&u.addedNodes.forEach(m=>{m===d&&this.handleMediaUpdated(d)}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0});let a=!1;Tt(this,s=>{a||(setTimeout(()=>{xc(s),a=!1,this.breakpointsComputed||(this.breakpointsComputed=!0,this.dispatchEvent(new CustomEvent(qe.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){Fn(this,Zt)&&this.mediaUnsetCallback(Fn(this,Zt));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[k.AUTOHIDE,k.GESTURES_DISABLED].concat(Rc).filter(e=>![o.MEDIA_RENDITION_LIST,o.MEDIA_AUDIO_TRACK_LIST,o.MEDIA_CHAPTERS_CUES].includes(e))}attributeChangedCallback(e,t,a){e.toLowerCase()==k.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){e&&($n(this,Zt,e),e.localName.includes("-")&&await l.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;let a=this.getAttribute(k.AUDIO)!=null?X.AUDIO_PLAYER():X.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.handleMediaUpdated(this.media),this.setAttribute(k.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){$n(this,Zt,null)}handleEvent(e){switch(e.type){case"pointerdown":$n(this,Oa,e.timeStamp);break;case"pointermove":ge(this,Kn,Rl).call(this,e);break;case"pointerup":ge(this,Yn,wl).call(this,e);break;case"mouseleave":ge(this,Li,Pa).call(this);break;case"mouseup":this.removeAttribute(k.KEYBOARD_CONTROL);break;case"keyup":ge(this,Qt,Ri).call(this),this.setAttribute(k.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}};Oa=new WeakMap;Zt=new WeakMap;Kn=new WeakSet;Rl=function(i){i.pointerType!=="mouse"&&i.timeStamp-Fn(this,Oa)<250||(ge(this,Ua,qn).call(this),clearTimeout(this._inactiveTimeout),[this,this.media].includes(i.target)&&ge(this,Qt,Ri).call(this))};Yn=new WeakSet;wl=function(i){if(i.pointerType==="touch"){let e=!this.hasAttribute(k.USER_INACTIVE);[this,this.media].includes(i.target)&&e?ge(this,Li,Pa).call(this):ge(this,Qt,Ri).call(this)}else i.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e==null?void 0:e.localName))&&ge(this,Qt,Ri).call(this)};Li=new WeakSet;Pa=function(){if(this.autohide<0||this.hasAttribute(k.USER_INACTIVE))return;this.setAttribute(k.USER_INACTIVE,"");let i=new l.CustomEvent(qe.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(i)};Ua=new WeakSet;qn=function(){if(!this.hasAttribute(k.USER_INACTIVE))return;this.removeAttribute(k.USER_INACTIVE);let i=new l.CustomEvent(qe.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(i)};Qt=new WeakSet;Ri=function(){ge(this,Ua,qn).call(this),clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=setTimeout(()=>{ge(this,Li,Pa).call(this)},this.autohide*1e3))};var Dl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},G=(i,e,t)=>(Dl(i,e,"read from private field"),t?t.call(i):e.get(i)),wi=(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)},Ba=(i,e,t,a)=>(Dl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),zt,Xt,Ha,kt,Ze,nt,ot=class{constructor(e,t,{defaultValue:a}={defaultValue:void 0}){wi(this,Ze),wi(this,zt,void 0),wi(this,Xt,void 0),wi(this,Ha,void 0),wi(this,kt,new Set),Ba(this,zt,e),Ba(this,Xt,t),Ba(this,Ha,new Set(a))}[Symbol.iterator](){return G(this,Ze,nt).values()}get length(){return G(this,Ze,nt).size}get value(){var e;return(e=[...G(this,Ze,nt)].join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(Ba(this,kt,new Set),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return[...G(this,Ze,nt)][e]}values(){return G(this,Ze,nt).values()}forEach(e){G(this,Ze,nt).forEach(e)}add(...e){var t,a;e.forEach(r=>G(this,kt).add(r)),!(this.value===""&&!((t=G(this,zt))!=null&&t.hasAttribute(`${G(this,Xt)}`)))&&((a=G(this,zt))==null||a.setAttribute(`${G(this,Xt)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>G(this,kt).delete(a)),(t=G(this,zt))==null||t.setAttribute(`${G(this,Xt)}`,`${this.value}`)}contains(e){return G(this,Ze,nt).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}};zt=new WeakMap;Xt=new WeakMap;Ha=new WeakMap;kt=new WeakMap;Ze=new WeakSet;nt=function(){return G(this,kt).size?G(this,kt):G(this,Ha)};var Pc=(i="")=>i.split(/\s+/),Ol=(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}},xi=(i="",e={})=>Pc(i).map(t=>{let a=Ol(t);return{...e,...a}}),Zn=i=>Array.isArray(i)?i.map(e=>typeof e=="string"?Ol(e):e):typeof i=="string"?xi(i):[i],Va=({kind:i,label:e,language:t}={kind:"subtitles"})=>e?`${i==="captions"?"cc":"sb"}:${t}:${encodeURIComponent(e)}`:t,St=(i=[])=>Array.prototype.map.call(i,Va).join(" "),Uc=(i,e)=>t=>t[i]===e,Nl=i=>{let e=Object.entries(i).map(([t,a])=>Uc(t,a));return t=>e.every(a=>a(t))},Jt=(i,e=[],t=[])=>{let a=Zn(t).map(Nl),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=i})},jt=(i,e=()=>!0)=>{if(!(i!=null&&i.textTracks))return[];let t=typeof e=="function"?e:Nl(e);return Array.from(i.textTracks).filter(t)},Pl=i=>!!i.getAttribute(o.MEDIA_SUBTITLES_SHOWING);var W={enter:"requestFullscreen",exit:"exitFullscreen",rootEvents:["fullscreenchange"],mediaEvents:[],element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};c.fullscreenElement===void 0&&(W.enter="webkitRequestFullScreen",W.exit=c.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",W.rootEvents=["webkitfullscreenchange"],W.mediaEvents=["webkitbeginfullscreen","webkitendfullscreen"],W.element="webkitFullscreenElement",W.error="webkitfullscreenerror",W.enabled="webkitFullscreenEnabled");var Wa,Qn=()=>{var i,e;return Wa||(Wa=(e=(i=c)==null?void 0:i.createElement)==null?void 0:e.call(i,"video"),Wa)},Ul=async(i=Qn())=>{if(!i)return!1;let e=i.volume;return i.volume=e/2+.1,await Ia(0),i.volume!==e},Bc=/.*Version\/.*Safari\/.*/.test(l.navigator.userAgent),Hc=(i=Qn())=>l.matchMedia("(display-mode: standalone)").matches&&Bc?!1:typeof(i==null?void 0:i.requestPictureInPicture)=="function",Vc=(i=Qn())=>{let e=c[W.enabled];return!e&&i&&(e="webkitSupportsFullscreen"in i),e},zn=Vc(),Bl=Hc(),Hl=!!l.WebKitPlaybackTargetAvailabilityEvent,Vl=!!l.chrome;var Fa,Wl=Ul().then(i=>(Fa=i,Fa)),Wc=Object.values(fe),$a=i=>jt(i.media,e=>[Me.SUBTITLES,Me.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),$l=i=>jt(i.media,e=>e.mode===_t.SHOWING&&[Me.SUBTITLES,Me.CAPTIONS].includes(e.kind)),oe={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(Wc.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=oe.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(!(oe.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[W.element]===void 0&&"webkitDisplayingFullscreen"in r)return r.webkitDisplayingFullscreen&&r.webkitPresentationMode==="fullscreen";let n;return e?n=c[W.element]?e.target:null:n=(a=(t=hl(i))==null?void 0:t.fullscreenElement)!=null?a:c[W.element],it(i.fullscreenElement,n)},rootEvents:W.rootEvents,mediaEvents:W.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 it(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(!Hl)return de.UNSUPPORTED;if(!(e==null||e===!0))return de.UNAVAILABLE},mediaSetCallback(i,e){var t;i.disableRemotePlayback||i.hasAttribute("disableremoteplayback")||(t=i.remote)==null||t.watchAvailability(r=>e({availability:r})).catch(r=>{r.name==="NotSupportedError"?e({availability:null}):e({availability:!1})})},mediaUnsetCallback(i){var e;i.disableRemotePlayback||i.hasAttribute("disableremoteplayback")||(e=i.remote)==null||e.cancelWatchAvailability()}},MEDIA_CAST_UNAVAILABLE:{get:function(i,{availability:e=!1}={}){var t;let{media:a}=i;if(!Vl||!((t=a==null?void 0:a.remote)!=null&&t.state))return de.UNSUPPORTED;if(!(e==null||e===!0))return de.UNAVAILABLE},mediaSetCallback(i,e){var t;i.disableRemotePlayback||i.hasAttribute("disableremoteplayback")||(t=i.remote)==null||t.watchAvailability(r=>e({availability:r})).catch(r=>{r.name==="NotSupportedError"?e({availability:null}):e({availability:!1})})},mediaUnsetCallback(i){var e;i.disableRemotePlayback||i.hasAttribute("disableremoteplayback")||(e=i.remote)==null||e.cancelWatchAvailability()}},MEDIA_FULLSCREEN_UNAVAILABLE:{get:function(){return zn?void 0:de.UNAVAILABLE}},MEDIA_PIP_UNAVAILABLE:{get:function(){return Bl?void 0:de.UNSUPPORTED}},MEDIA_RENDITION_UNAVAILABLE:{get:function(i){var e;let{media:t}=i;if(!(t!=null&&t.videoRenditions))return de.UNSUPPORTED;if(!((e=t.videoRenditions)!=null&&e.length))return de.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 de.UNSUPPORTED;if(((t=(e=a.audioTracks)==null?void 0:e.length)!=null?t:0)<=1)return de.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},MEDIA_VOLUME_UNAVAILABLE:{get:function(i){if(Fa!==void 0&&!Fa)return de.UNSUPPORTED;let{media:e}=i;if(e&&typeof e.volume=="undefined")return de.UNAVAILABLE},mediaEvents:["loadstart"]},MEDIA_SUBTITLES_LIST:{get:function(i){return $a(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,e){var t;return i.hasAttribute("defaultsubtitles")&&["addtrack","removetrack"].includes(e==null?void 0:e.type)&&[Me.CAPTIONS,Me.SUBTITLES].includes((t=e==null?void 0:e.track)==null?void 0:t.kind)&&Di.MEDIA_TOGGLE_SUBTITLES_REQUEST(void 0,{detail:!0},i),$l(i).map(({kind:a,label:r,language:n})=>({kind:a,label:r,language:n}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"]},MEDIA_CHAPTERS_CUES:{get:function(i){var e;let{media:t}=i;if(!t)return[];let[a]=jt(t,{kind:Me.CHAPTERS});return Array.from((e=a==null?void 0:a.cues)!=null?e:[]).map(({text:r,startTime:n,endTime:s})=>({text:r,startTime:n,endTime:s}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack"]},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"]}},Di={MEDIA_PLAY_REQUEST:(i,e,t)=>{var a;let r=oe.MEDIA_STREAM_TYPE.get(t),n=t.getAttribute("noautoseektolive")===null;r==fe.LIVE&&n&&Di.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(!zn){console.warn("MediaChrome: Fullscreen support is unavailable; not entering fullscreen");return}c.pictureInPictureElement&&c.exitPictureInPicture(),t[W.enter]?t.fullscreenElement[W.enter]():i.webkitEnterFullscreen?i.webkitEnterFullscreen():i.requestFullscreen?i.requestFullscreen():console.warn("MediaChrome: Fullscreen not supported")},MEDIA_EXIT_FULLSCREEN_REQUEST:()=>{c[W.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[W.element]&&c[W.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[W.element]&&c[W.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,r,n,s,d,u;if(!i)return;let m=e.detail;if(m===null){t.propagateMediaState(o.MEDIA_PREVIEW_TIME,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,void 0);return}t.propagateMediaState(o.MEDIA_PREVIEW_TIME,m);let[h]=jt(i,{kind:Me.CHAPTERS}),p=Array.from((a=h==null?void 0:h.cues)!=null?a:[]).find(F=>F.startTime<=m&&F.endTime>m);t.propagateMediaState(o.MEDIA_PREVIEW_CHAPTER,p==null?void 0:p.text);let[b]=jt(i,{kind:Me.METADATA,label:"thumbnails"}),_=Array.from((r=b==null?void 0:b.cues)!=null?r:[]).find(F=>F.startTime>=m);if(!_)return;let P=/'^(?:[a-z]+:)?\/\//i.test((n=_==null?void 0:_.text)!=null?n:"")||(s=i.querySelector('track[label="thumbnails"]'))==null?void 0:s.src,I=new URL((d=_==null?void 0:_.text)!=null?d:"./",P),V=(u=new URLSearchParams(I.hash).get("#xywh"))!=null?u:"";t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,I.href),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,V.split(","))},MEDIA_SHOW_SUBTITLES_REQUEST:(i,e,t)=>{var a;let r=$a(t),{detail:n=[]}=e,s=Zn(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),Jt(_t.SHOWING,r,s)},MEDIA_DISABLE_SUBTITLES_REQUEST:(i,e,t)=>{let a=$a(t),{detail:r=[]}=e;Jt(_t.DISABLED,a,r)},MEDIA_TOGGLE_SUBTITLES_REQUEST:(i,e,t)=>{let{detail:a}=e!=null?e:{},r=$a(t),n=$l(t),s=!!n.length;if(r.length){if(a===!1||s&&a!==!0)Jt(_t.DISABLED,r,n);else if(a===!0||!s&&a!==!1){let d=r[0];if(!(t!=null&&t.hasAttribute("nosubtitleslangpref"))){let p=l.localStorage.getItem("media-chrome-pref-subtitles-lang"),b=p?[p,...l.navigator.languages]:l.navigator.languages,_=r.filter(P=>b.some(I=>P.language.toLowerCase().startsWith(I.split("-")[0]))).sort((P,I)=>{let V=b.findIndex(re=>P.language.toLowerCase().startsWith(re.split("-")[0])),F=b.findIndex(re=>I.language.toLowerCase().startsWith(re.split("-")[0]));return V-F});_[0]&&(d=_[0])}let{language:u,label:m,kind:h}=d;Jt(_t.DISABLED,r,n),Jt(_t.SHOWING,r,[{language:u,label:m,kind:h}])}}},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 eo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},we=(i,e,t)=>(eo(i,e,"read from private field"),t?t.call(i):e.get(i)),Oi=(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)},Xn=(i,e,t,a)=>(eo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ti=(i,e,t)=>(eo(i,e,"access private method"),t),st,Ni,ei,ii,Pi,Ka,Jn,Zl=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],$c=10,Fl=0,te={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"},Ya=class extends Na{constructor(){super(),Oi(this,ii),Oi(this,Ka),Oi(this,st,new ot(this,te.HOTKEYS)),Oi(this,Ni,void 0),Oi(this,ei,void 0),oe.MEDIA_VOLUME_UNAVAILABLE.get(this)===void 0&&Wl.then(()=>{this.propagateMediaState(o.MEDIA_VOLUME_UNAVAILABLE,oe.MEDIA_VOLUME_UNAVAILABLE.get(this))}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this),Object.keys(Di).forEach(e=>{let t=`_handle${ya(e,!0)}`;this[t]=a=>{if(a.stopPropagation(),!this.media){console.warn("Media Chrome: No media available.");return}Di[e](this.media,a,this)},this.addEventListener(v[e],this[t])}),this._mediaStatePropagators={},Object.keys(oe).forEach(e=>{this._mediaStatePropagators[e]=t=>{this.propagateMediaState(At[e],oe[e].get(this,t))}})}static get observedAttributes(){return super.observedAttributes.concat(te.NO_HOTKEYS,te.HOTKEYS,te.DEFAULT_STREAM_TYPE,te.DEFAULT_SUBTITLES,te.DEFAULT_DURATION)}get fullscreenElement(){var e;return(e=we(this,Ni))!=null?e:this}set fullscreenElement(e){this.hasAttribute(te.FULLSCREEN_ELEMENT)&&this.removeAttribute(te.FULLSCREEN_ELEMENT),Xn(this,Ni,e)}attributeChangedCallback(e,t,a){var r;if(super.attributeChangedCallback(e,t,a),e===te.NO_HOTKEYS)a!==t&&a===""?(this.hasAttribute(te.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==t&&a===null&&this.enableHotkeys();else if(e===te.HOTKEYS)we(this,st).value=a;else if(e===te.DEFAULT_SUBTITLES&&a!==t&&a==="")this.dispatchEvent(new l.CustomEvent(v.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:!0}));else if(e===te.DEFAULT_STREAM_TYPE)this.propagateMediaState(At.MEDIA_STREAM_TYPE);else if(e===te.FULLSCREEN_ELEMENT){let n=a?(r=we(this,ei))==null?void 0:r.getElementById(a):void 0;Xn(this,Ni,n)}}connectedCallback(){Xn(this,ei,this.getRootNode()),super.connectedCallback(),this.enableHotkeys()}disconnectedCallback(){super.disconnectedCallback(),this.disableHotkeys(),this.dispatchEvent(new l.CustomEvent(v.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:!1}))}mediaSetCallback(e){if(super.mediaSetCallback(e),e.hasAttribute("tabindex")||(e.tabIndex=-1),Object.keys(oe).forEach(t=>{let{mediaSetCallback:a,mediaEvents:r,rootEvents:n,textTracksEvents:s,videoRenditionsEvents:d,audioTracksEvents:u,remoteEvents:m}=oe[t],h=this._mediaStatePropagators[t];a&&(a(e,h),h()),r==null||r.forEach(p=>{e.addEventListener(p,h),h()}),n==null||n.forEach(p=>{var b;(b=we(this,ei))==null||b.addEventListener(p,h),h()}),s==null||s.forEach(p=>{var b;(b=e.textTracks)==null||b.addEventListener(p,h),h()}),d==null||d.forEach(p=>{var b;(b=e.videoRenditions)==null||b.addEventListener(p,h),h()}),u==null||u.forEach(p=>{var b;(b=e.audioTracks)==null||b.addEventListener(p,h),h()}),m==null||m.forEach(p=>{var b;(b=e.remote)==null||b.addEventListener(p,h),h()})}),!this.hasAttribute("novolumepref"))try{let t=l.localStorage.getItem("media-chrome-pref-volume");t!==null&&(e.volume=t)}catch(t){console.debug("Media Chrome: Error getting volume pref",t)}}mediaUnsetCallback(e){super.mediaUnsetCallback(e),Object.keys(oe).forEach(t=>{let{mediaUnsetCallback:a,mediaEvents:r,rootEvents:n,textTracksEvents:s,videoRenditionsEvents:d,audioTracksEvents:u,remoteEvents:m}=oe[t],h=this._mediaStatePropagators[t];r==null||r.forEach(p=>{e.removeEventListener(p,h)}),n==null||n.forEach(p=>{var b;(b=we(this,ei))==null||b.removeEventListener(p,h)}),s==null||s.forEach(p=>{var b;(b=e.textTracks)==null||b.removeEventListener(p,h)}),d==null||d.forEach(p=>{var b;(b=e.videoRenditions)==null||b.removeEventListener(p,h),h()}),u==null||u.forEach(p=>{var b;(b=e.audioTracks)==null||b.removeEventListener(p,h),h()}),m==null||m.forEach(p=>{var b;(b=e.remote)==null||b.removeEventListener(p,h),h()}),a&&(a(e,h),h())}),this.propagateMediaState(At.MEDIA_PAUSED,!0)}propagateMediaState(e,t){let a=ql(this.mediaStateReceivers,e);if(Gl(this.mediaStateReceivers,e,t),a===ql(this.mediaStateReceivers,e))return;let r=e.toLowerCase(),n=new l.CustomEvent(nl[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=Zc(e,a,r);Object.keys(v).forEach(s=>{e.addEventListener(v[s],this[`_handle${ya(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(v).forEach(r=>{e.removeEventListener(v[r],this[`_handle${ya(r,!0)}`])})}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),Object.keys(oe).forEach(r=>{let n=oe[r];Gl([e],At[r],n.get(this))}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,a=t.indexOf(e);a<0||t.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",ti(this,Ka,Jn))}disableHotkeys(){this.removeEventListener("keydown",ti(this,Ka,Jn)),this.removeEventListener("keyup",ti(this,ii,Pi))}get hotkeys(){return we(this,st)}keyboardShortcutHandler(e){var t,a,r,n;if(((n=(r=(t=e.target.getAttribute(te.KEYS_USED))==null?void 0:t.split(" "))!=null?r:(a=e.target)==null?void 0:a.keysUsed)!=null?n:[]).map(_=>_==="Space"?" ":_).filter(Boolean).includes(e.key))return;let d,u,m,h,p,b=$c;if(!we(this,st).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&we(this,st).contains("nospace")))switch(e.key){case" ":case"k":d=this.getAttribute(o.MEDIA_PAUSED)!=null?v.MEDIA_PLAY_REQUEST:v.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"m":d=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?v.MEDIA_UNMUTE_REQUEST:v.MEDIA_MUTE_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"f":d=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?v.MEDIA_EXIT_FULLSCREEN_REQUEST:v.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new l.CustomEvent(v.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":u=this.getAttribute(o.MEDIA_CURRENT_TIME),m=u&&!Number.isNaN(+u)?+u:Fl,h=Math.max(m-b,0),p=new l.CustomEvent(v.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(p);break;case"ArrowRight":u=this.getAttribute(o.MEDIA_CURRENT_TIME),m=u&&!Number.isNaN(+u)?+u:Fl,h=Math.max(m+b,0),p=new l.CustomEvent(v.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(p);break;default:break}}};st=new WeakMap;Ni=new WeakMap;ei=new WeakMap;ii=new WeakSet;Pi=function(i){let{key:e}=i;if(!Zl.includes(e)){this.removeEventListener("keyup",ti(this,ii,Pi));return}this.keyboardShortcutHandler(i)};Ka=new WeakSet;Jn=function(i){let{metaKey:e,altKey:t,key:a}=i;if(e||t||!Zl.includes(a)){this.removeEventListener("keyup",ti(this,ii,Pi));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(we(this,st).contains(`no${a.toLowerCase()}`)||a===" "&&we(this,st).contains("nospace"))&&i.preventDefault(),this.addEventListener("keyup",ti(this,ii,Pi),{once:!0})};var Fc=Object.values(o),Kc=Object.values(At),to=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=>Fc.includes(d)):[]},Yc=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),Kc.some(a=>a in i)},jn=i=>Yc(i)||!!to(i).length,Kl=i=>{var e;return(e=i==null?void 0:i.join)==null?void 0:e.call(i,":")},Yl={[o.MEDIA_SUBTITLES_LIST]:St,[o.MEDIA_SUBTITLES_SHOWING]:St,[o.MEDIA_SEEKABLE]:Kl,[o.MEDIA_BUFFERED]:i=>i==null?void 0:i.map(Kl).join(" "),[o.MEDIA_PREVIEW_COORDS]:i=>i==null?void 0:i.join(" "),[o.MEDIA_RENDITION_LIST]:ol,[o.MEDIA_AUDIO_TRACK_LIST]:ll},Gc=async(i,e,t)=>{var a,r;if(i.isConnected||await Ia(0),typeof t=="boolean"||t==null)return M(i,e,t);if(typeof t=="number")return O(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=Yl[e])==null?void 0:a.call(Yl,t))!=null?r:t;return i.setAttribute(e,n)},qc=i=>{var e;return!!((e=i.closest)!=null&&e.call(i,'*[slot="media"]'))},Ct=(i,e)=>{if(qc(i))return;let t=(r,n)=>{var s,d;jn(r)&&n(r);let{children:u=[]}=r!=null?r:{},m=(d=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?d:[];[...u,...m].forEach(p=>Ct(p,n))},a=i==null?void 0:i.nodeName.toLowerCase();if(a.includes("-")&&!jn(i)){l.customElements.whenDefined(a).then(()=>{t(i,e)});return}t(i,e)},Gl=(i,e,t)=>{i.forEach(a=>{if(e in a){a[e]=t;return}let r=to(a),n=e.toLowerCase();r.includes(n)&&Gc(a,n,t)})},ql=(i,e)=>{for(let t of i){if(e in t)return t[e];let a=to(t),r=e.toLowerCase();if(a.includes(r))return t.getAttribute(r)}},Zc=(i,e,t)=>{Ct(i,e);let a=h=>{var p;let b=(p=h==null?void 0:h.composedPath()[0])!=null?p:h.target;e(b)},r=h=>{var p;let b=(p=h==null?void 0:h.composedPath()[0])!=null?p:h.target;t(b)};i.addEventListener(v.REGISTER_MEDIA_STATE_RECEIVER,a),i.addEventListener(v.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=h=>{h.forEach(p=>{let{addedNodes:b=[],removedNodes:_=[],type:P,target:I,attributeName:V}=p;P==="childList"?(Array.prototype.forEach.call(b,F=>Ct(F,e)),Array.prototype.forEach.call(_,F=>Ct(F,t))):P==="attributes"&&V===A.MEDIA_CHROME_ATTRIBUTES&&(jn(I)?e(I):t(I))})},s=[],d=h=>{let p=h.target;p.name!=="media"&&(s.forEach(b=>Ct(b,t)),s=[...p.assignedElements({flatten:!0})],s.forEach(b=>Ct(b,e)))};i.addEventListener("slotchange",d);let u=new MutationObserver(n);return u.observe(i,{childList:!0,attributes:!0,subtree:!0}),()=>{Ct(i,t),i.removeEventListener("slotchange",d),u.disconnect(),i.removeEventListener(v.REGISTER_MEDIA_STATE_RECEIVER,a),i.removeEventListener(v.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};l.customElements.get("media-controller")||l.customElements.define("media-controller",Ya);var io=Ya;var uo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},B=(i,e,t)=>(uo(i,e,"read from private field"),t?t.call(i):e.get(i)),Q=(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)},lt=(i,e,t,a)=>(uo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ae=(i,e,t)=>(uo(i,e,"access private method"),t),xe,tr,Ga,qa,_e,ja,Za,Qa,za,co,Ql,Xa,ao,Ja,ro,er,mo,no,zl,oo,Xl,so,Jl,lo,jl,ed=c.createElement("template");ed.innerHTML=`
|
|
588
|
+
<slot name="prefix"></slot>
|
|
589
|
+
<slot></slot>
|
|
590
|
+
<slot name="description"></slot>
|
|
591
|
+
<slot name="suffix"></slot>
|
|
592
|
+
<slot name="submenu"></slot>
|
|
593
|
+
`;var Re={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"},bi=class extends l.HTMLElement{constructor(){super(),Ct(this,Yl),Ct(this,zl),Ct(this,Xl),Ct(this,Zi),Ct(this,Gl),Ct(this,Nn),Ct(this,Pn,!1),Ct(this,Za,void 0),Ct(this,rt,()=>{var e,t;this.setAttribute("submenusize",`${this.submenuElement.items.length}`);let a=this.shadowRoot.querySelector('slot[name="description"]'),r=(t=(e=this.submenuElement.checkedItems)==null?void 0:e[0])==null?void 0:t.text,n=m.createElement("span");n.textContent=r!=null?r:"",a.replaceChildren(n)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.append(this.constructor.template.content.cloneNode(!0))),this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[Re.TYPE,Re.DISABLED,Re.CHECKED,Re.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),qa(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":it(this,Yl,Ym).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":it(this,Gl,Zm).call(this,e);break;case"keyup":it(this,Zi,Qa).call(this,e);break}}attributeChangedCallback(e,t,a){e===Re.CHECKED&&qa(this)&&!at(this,Pn)?this.setAttribute("aria-checked",a!=null?"true":"false"):e===Re.TYPE&&a!==t?this.role="menuitem"+a:e===Re.DISABLED&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Re.DISABLED)||this.enable(),this.role="menuitem"+this.type,Kl(this,Za,Zl(this,this.parentNode)),it(this,Nn,ql).call(this)}disconnectedCallback(){this.disable(),it(this,Nn,ql).call(this),Kl(this,Za,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=ri(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return(e=this.getAttribute(Re.TYPE))!=null?e:""}set type(e){this.setAttribute(Re.TYPE,`${e}`)}get value(){var e;return(e=this.getAttribute(Re.VALUE))!=null?e:this.text}set value(e){this.setAttribute(Re.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(qa(this))return this.getAttribute("aria-checked")==="true"}set checked(e){qa(this)&&(Kl(this,Pn,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){qa(this)||this.invokeTargetElement&&ue(this,e.target)&&this.invokeTargetElement.dispatchEvent(new $t({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}};Pn=new WeakMap;Za=new WeakMap;Yl=new WeakSet;Ym=function(i){let e=i.target;if(!(e!=null&&e.name))for(let a of e.assignedNodes({flatten:!0}))a instanceof Text&&a.textContent.trim()===""&&a.remove();e.name==="submenu"&&(this.submenuElement?it(this,zl,Gm).call(this):it(this,Xl,qm).call(this))};zl=new WeakSet;Gm=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",at(this,rt)),this.submenuElement.addEventListener("addmenuitem",at(this,rt)),this.submenuElement.addEventListener("removemenuitem",at(this,rt)),at(this,rt).call(this)};Xl=new WeakSet;qm=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",at(this,rt)),this.submenuElement.removeEventListener("addmenuitem",at(this,rt)),this.submenuElement.removeEventListener("removemenuitem",at(this,rt)),at(this,rt).call(this)};rt=new WeakMap;Zi=new WeakSet;Qa=function(i){let{key:e}=i;if(!this.keysUsed.includes(e)){this.removeEventListener("keyup",it(this,Zi,Qa));return}this.handleClick(i)};Gl=new WeakSet;Zm=function(i){let{metaKey:e,altKey:t,key:a}=i;if(e||t||!this.keysUsed.includes(a)){this.removeEventListener("keyup",it(this,Zi,Qa));return}this.addEventListener("keyup",it(this,Zi,Qa),{once:!0})};Nn=new WeakSet;ql=function(){var i;let e=(i=at(this,Za))==null?void 0:i.radioGroupItems;if(!e)return;let t=e.filter(a=>a.getAttribute("aria-checked")==="true").pop();t||(t=e[0]);for(let a of e)a.setAttribute("aria-checked","false");t==null||t.setAttribute("aria-checked","true")};xf(bi,"template",Qm);function qa(i){return i.type==="radio"||i.type==="checkbox"}function Zl(i,e){if(!i)return null;let{host:t}=i.getRootNode();return!e&&t?Zl(i,t):e!=null&&e.items?e:Zl(e,e==null?void 0:e.parentNode)}l.customElements.get("media-chrome-menu-item")||l.customElements.define("media-chrome-menu-item",bi);var rd=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Q=(i,e,t)=>(rd(i,e,"read from private field"),t?t.call(i):e.get(i)),le=(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)},Vt=(i,e,t,a)=>(rd(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Fe=(i,e,t)=>(rd(i,e,"access private method"),t),nt,Gn,Un,Bn,Ve,Kn,Wn,Hn,$n,nd,zm,Fn,Jl,Vn,jl,Yn,sd,ed,Xm,td,Jm,id,jm,ad,eh,th=m.createElement("template");th.innerHTML=`
|
|
230
594
|
<style>
|
|
231
595
|
:host {
|
|
232
596
|
--_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
@@ -462,7 +826,7 @@
|
|
|
462
826
|
<input id="range" type="range" min="0" max="1" step="any" value="0">
|
|
463
827
|
</div>
|
|
464
828
|
<div id="rightgap"></div>
|
|
465
|
-
`;var
|
|
829
|
+
`;var Ei=class extends l.HTMLElement{constructor(){super(),le(this,nd),le(this,Fn),le(this,Vn),le(this,Yn),le(this,ed),le(this,td),le(this,id),le(this,ad),le(this,nt,void 0),le(this,Gn,void 0),le(this,Un,void 0),le(this,Bn,void 0),le(this,Ve,{}),le(this,Kn,[]),le(this,Wn,()=>{if(this.range.matches(":focus-visible")){let{style:e}=N(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),le(this,Hn,()=>{let{style:e}=N(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),le(this,$n,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(th.content.cloneNode(!0))),this.container=this.shadowRoot.querySelector("#container"),Vt(this,Un,this.shadowRoot.querySelector("#startpoint")),Vt(this,Bn,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",y.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,o,d,u;e===y.MEDIA_CONTROLLER?(t&&((n=(r=Q(this,nt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Vt(this,nt,null)),a&&this.isConnected&&(Vt(this,nt,(o=this.getRootNode())==null?void 0:o.getElementById(a)),(u=(d=Q(this,nt))==null?void 0:d.associateElement)==null||u.call(d,this))):(e==="disabled"||e==="aria-disabled"&&t!==a)&&(a==null?(this.range.removeAttribute(e),Fe(this,Fn,Jl).call(this)):(this.range.setAttribute(e,a),Fe(this,Vn,jl).call(this)))}connectedCallback(){var e,t,a;let{style:r}=N(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),Q(this,Ve).pointer=N(this.shadowRoot,"#pointer"),Q(this,Ve).progress=N(this.shadowRoot,"#progress"),Q(this,Ve).thumb=N(this.shadowRoot,"#thumb");let n=this.getAttribute(y.MEDIA_CONTROLLER);n&&(Vt(this,nt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(t=Q(this,nt))==null?void 0:t.associateElement)==null||a.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",Q(this,Wn)),this.shadowRoot.addEventListener("focusout",Q(this,Hn)),Fe(this,Fn,Jl).call(this),Le(this.container,Q(this,$n))}disconnectedCallback(){var e,t;Fe(this,Vn,jl).call(this),(t=(e=Q(this,nt))==null?void 0:e.unassociateElement)==null||t.call(e,this),Vt(this,nt,null),this.shadowRoot.removeEventListener("focusin",Q(this,Wn)),this.shadowRoot.removeEventListener("focusout",Q(this,Hn)),Xe(this.container,Q(this,$n))}updatePointerBar(e){var t;(t=Q(this,Ve).pointer)==null||t.style.setProperty("width",`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,t;let a=this.range.valueAsNumber*100;(e=Q(this,Ve).progress)==null||e.style.setProperty("width",`${a}%`),(t=Q(this,Ve).thumb)==null||t.style.setProperty("left",`${a}%`)}updateSegments(e){let t=this.shadowRoot.querySelector("#segments-clipping");if(t.textContent="",this.container.classList.toggle("segments",!!(e!=null&&e.length)),!(e!=null&&e.length))return;Q(this,Ve).activeSegment=Vo(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let a=[...new Set([+this.range.min,...e.flatMap(n=>[n.start,n.end]),+this.range.max])];Vt(this,Kn,[...a]);let r=a.pop();for(let[n,o]of a.entries()){let[d,u]=[n===0,n===a.length-1],c=d?"calc(var(--segments-gap) / -1)":`${o*100}%`,E=`calc(${((u?r:a[n+1])-o)*100}%${d||u?"":" - var(--segments-gap)"})`,v=m.createElementNS("http://www.w3.org/2000/svg","rect"),b=N(this.shadowRoot,`#segments-clipping rect:nth-child(${n+1})`);b.style.setProperty("x",c),b.style.setProperty("width",E),t.append(v)}}getPointerRatio(e){let t=xc(e.clientX,e.clientY,Q(this,Un).getBoundingClientRect(),Q(this,Bn).getBoundingClientRect());return Math.max(0,Math.min(1,t))}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":Fe(this,ad,eh).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":Fe(this,ed,Xm).call(this,e);break;case"pointerdown":Fe(this,Yn,sd).call(this,e);break;case"pointerup":Fe(this,td,Jm).call(this);break;case"pointerleave":Fe(this,id,jm).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};nt=new WeakMap;Gn=new WeakMap;Un=new WeakMap;Bn=new WeakMap;Ve=new WeakMap;Kn=new WeakMap;Wn=new WeakMap;Hn=new WeakMap;$n=new WeakMap;nd=new WeakSet;zm=function(i){let e=Q(this,Ve).activeSegment;if(!e)return;let t=this.getPointerRatio(i),r=`#segments-clipping rect:nth-child(${Q(this,Kn).findIndex((n,o,d)=>{let u=d[o+1];return u!=null&&t>=n&&t<=u})+1})`;(e.selectorText!=r||!e.style.transform)&&(e.selectorText=r,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))};Fn=new WeakSet;Jl=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};Vn=new WeakSet;jl=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)};Yn=new WeakSet;sd=function(i){var e;Vt(this,Gn,i.composedPath().includes(this.range)),(e=l.window)==null||e.addEventListener("pointerup",this)};ed=new WeakSet;Xm=function(i){var e;i.pointerType!=="mouse"&&Fe(this,Yn,sd).call(this,i),this.addEventListener("pointerleave",this),(e=l.window)==null||e.addEventListener("pointermove",this)};td=new WeakSet;Jm=function(){var i;(i=l.window)==null||i.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};id=new WeakSet;jm=function(){var i,e;this.removeEventListener("pointerleave",this),(i=l.window)==null||i.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=Q(this,Ve).activeSegment)==null||e.style.removeProperty("transform")};ad=new WeakSet;eh=function(i){this.toggleAttribute("dragging",i.buttons===1||i.pointerType!=="mouse"),this.updatePointerBar(i),Fe(this,nd,zm).call(this,i),this.dragging&&(i.pointerType!=="mouse"||!Q(this,Gn))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(i),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))};l.customElements.get("media-chrome-range")||l.customElements.define("media-chrome-range",Ei);var ih=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},qn=(i,e,t)=>(ih(i,e,"read from private field"),t?t.call(i):e.get(i)),Df=(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)},Zn=(i,e,t,a)=>(ih(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),st,ah=m.createElement("template");ah.innerHTML=`
|
|
466
830
|
<style>
|
|
467
831
|
:host {
|
|
468
832
|
|
|
@@ -484,7 +848,7 @@
|
|
|
484
848
|
</style>
|
|
485
849
|
|
|
486
850
|
<slot></slot>
|
|
487
|
-
`;var
|
|
851
|
+
`;var od=class extends l.HTMLElement{constructor(){super(),Df(this,st,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(ah.content.cloneNode(!0)))}static get observedAttributes(){return[y.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,o,d,u;e===y.MEDIA_CONTROLLER&&(t&&((n=(r=qn(this,st))==null?void 0:r.unassociateElement)==null||n.call(r,this),Zn(this,st,null)),a&&this.isConnected&&(Zn(this,st,(o=this.getRootNode())==null?void 0:o.getElementById(a)),(u=(d=qn(this,st))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(y.MEDIA_CONTROLLER);r&&(Zn(this,st,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=qn(this,st))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=qn(this,st))==null?void 0:e.unassociateElement)==null||t.call(e,this),Zn(this,st,null)}};st=new WeakMap;l.customElements.get("media-control-bar")||l.customElements.define("media-control-bar",od);var rh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Qn=(i,e,t)=>(rh(i,e,"read from private field"),t?t.call(i):e.get(i)),Of=(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)},zn=(i,e,t,a)=>(rh(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ot,nh=m.createElement("template");nh.innerHTML=`
|
|
488
852
|
<style>
|
|
489
853
|
:host {
|
|
490
854
|
font: var(--media-font,
|
|
@@ -517,49 +881,27 @@
|
|
|
517
881
|
}
|
|
518
882
|
</style>
|
|
519
883
|
<slot></slot>
|
|
520
|
-
`;var
|
|
521
|
-
<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"/>
|
|
522
|
-
</svg>`,nm=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
523
|
-
<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"/>
|
|
524
|
-
</svg>`,bd=c.createElement("template");bd.innerHTML=`
|
|
525
|
-
<style>
|
|
526
|
-
:host([aria-checked="true"]) slot[name=off] {
|
|
527
|
-
display: none !important;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
:host(:not([aria-checked="true"])) slot[name=on] {
|
|
532
|
-
display: none !important;
|
|
533
|
-
}
|
|
534
|
-
</style>
|
|
535
|
-
|
|
536
|
-
<slot name="icon">
|
|
537
|
-
<slot name="on">${rm}</slot>
|
|
538
|
-
<slot name="off">${nm}</slot>
|
|
539
|
-
</slot>
|
|
540
|
-
`;var md=i=>{i.setAttribute("aria-checked",Pl(i))},vo=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:bd,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",X.CLOSED_CAPTIONS()),md(this)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_SUBTITLES_SHOWING&&md(this)}get mediaSubtitlesList(){return hd(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){pd(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return hd(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){pd(this,o.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new l.CustomEvent(v.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}},hd=(i,e)=>{let t=i.getAttribute(e);return t?xi(t):[]},pd=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=St(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-button")||l.customElements.define("media-captions-button",vo);var ri={SEEK_OFFSET:"seekoffset"},or=30,om=`<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)">${or}</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>`,Ed=c.createElement("template");Ed.innerHTML=`
|
|
541
|
-
<slot name="icon">${om}</slot>
|
|
542
|
-
`;var sm=0,fo=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,ri.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:Ed,...e})}connectedCallback(){this.seekOffset=R(this,ri.SEEK_OFFSET,or),super.connectedCallback()}attributeChangedCallback(e,t,a){e===ri.SEEK_OFFSET&&(this.seekOffset=R(this,ri.SEEK_OFFSET,or)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return R(this,ri.SEEK_OFFSET,or)}set seekOffset(e){O(this,ri.SEEK_OFFSET,e),this.setAttribute("aria-label",D.SEEK_FORWARD_N_SECS({seekOffset:this.seekOffset})),ka(Sa(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return R(this,o.MEDIA_CURRENT_TIME,sm)}set mediaCurrentTime(e){O(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new l.CustomEvent(v.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",fo);var lm=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
884
|
+
`;var lt=class extends l.HTMLElement{constructor(){super(),Of(this,ot,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(nh.content.cloneNode(!0)))}static get observedAttributes(){return[y.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,o,d,u;e===y.MEDIA_CONTROLLER&&(t&&((n=(r=Qn(this,ot))==null?void 0:r.unassociateElement)==null||n.call(r,this),zn(this,ot,null)),a&&this.isConnected&&(zn(this,ot,(o=this.getRootNode())==null?void 0:o.getElementById(a)),(u=(d=Qn(this,ot))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let{style:r}=N(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let n=this.getAttribute(y.MEDIA_CONTROLLER);n&&(zn(this,ot,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(t=Qn(this,ot))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Qn(this,ot))==null?void 0:e.unassociateElement)==null||t.call(e,this),zn(this,ot,null)}};ot=new WeakMap;l.customElements.get("media-text-display")||l.customElements.define("media-text-display",lt);var sh=lt;var lh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},oh=(i,e,t)=>(lh(i,e,"read from private field"),t?t.call(i):e.get(i)),Pf=(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)},Nf=(i,e,t,a)=>(lh(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),za,ld=class extends lt{constructor(){super(),Pf(this,za,void 0),Nf(this,za,this.shadowRoot.querySelector("slot")),oh(this,za).textContent=ze(0)}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_DURATION]}attributeChangedCallback(e,t,a){e===s.MEDIA_DURATION&&(oh(this,za).textContent=ze(a)),super.attributeChangedCallback(e,t,a)}get mediaDuration(){return x(this,s.MEDIA_DURATION)}set mediaDuration(e){U(this,s.MEDIA_DURATION,e)}};za=new WeakMap;l.customElements.get("media-duration-display")||l.customElements.define("media-duration-display",ld);var Uf=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
543
885
|
<path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
|
|
544
|
-
</svg>`,
|
|
886
|
+
</svg>`,Bf=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
545
887
|
<path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
|
|
546
|
-
</svg>`,
|
|
888
|
+
</svg>`,uh=m.createElement("template");uh.innerHTML=`
|
|
547
889
|
<style>
|
|
548
|
-
:host([${
|
|
890
|
+
:host([${s.MEDIA_IS_FULLSCREEN}]) slot:not([name=exit]):not([name=icon]) {
|
|
549
891
|
display: none !important;
|
|
550
892
|
}
|
|
551
893
|
|
|
552
894
|
|
|
553
|
-
:host(:not([${
|
|
895
|
+
:host(:not([${s.MEDIA_IS_FULLSCREEN}])) slot:not([name=enter]):not([name=icon]) {
|
|
554
896
|
display: none !important;
|
|
555
897
|
}
|
|
556
898
|
</style>
|
|
557
899
|
|
|
558
900
|
<slot name="icon">
|
|
559
|
-
<slot name="enter">${
|
|
560
|
-
<slot name="exit">${
|
|
901
|
+
<slot name="enter">${Uf}</slot>
|
|
902
|
+
<slot name="exit">${Bf}</slot>
|
|
561
903
|
</slot>
|
|
562
|
-
`;var
|
|
904
|
+
`;var dh=i=>{let e=i.mediaIsFullscreen?Y.EXIT_FULLSCREEN():Y.ENTER_FULLSCREEN();i.setAttribute("aria-label",e)},dd=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_IS_FULLSCREEN,s.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:uh,...e})}connectedCallback(){super.connectedCallback(),dh(this)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_IS_FULLSCREEN&&dh(this)}get mediaFullscreenUnavailable(){return I(this,s.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){k(this,s.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return H(this,s.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){B(this,s.MEDIA_IS_FULLSCREEN,e)}handleClick(){let e=this.mediaIsFullscreen?h.MEDIA_EXIT_FULLSCREEN_REQUEST:h.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",dd);var{MEDIA_TIME_IS_LIVE:Xn,MEDIA_PAUSED:Xa}=s,{MEDIA_SEEK_TO_LIVE_REQUEST:Wf,MEDIA_PLAY_REQUEST:Hf}=h,$f='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>',mh=m.createElement("template");mh.innerHTML=`
|
|
563
905
|
<style>
|
|
564
906
|
|
|
565
907
|
slot[name=indicator] > *,
|
|
@@ -570,100 +912,168 @@
|
|
|
570
912
|
color: var(--media-live-button-icon-color, rgb(140, 140, 140));
|
|
571
913
|
}
|
|
572
914
|
|
|
573
|
-
:host([${
|
|
574
|
-
:host([${
|
|
915
|
+
:host([${Xn}]:not([${Xa}])) slot[name=indicator] > *,
|
|
916
|
+
:host([${Xn}]:not([${Xa}])) ::slotted([slot=indicator]) {
|
|
575
917
|
fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
|
|
576
918
|
color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
|
|
577
919
|
}
|
|
578
920
|
|
|
579
|
-
:host([${
|
|
921
|
+
:host([${Xn}]:not([${Xa}])) {
|
|
580
922
|
cursor: not-allowed;
|
|
581
923
|
}
|
|
582
924
|
|
|
583
925
|
</style>
|
|
584
926
|
|
|
585
|
-
<slot name="indicator">${
|
|
927
|
+
<slot name="indicator">${$f}</slot>
|
|
586
928
|
|
|
587
929
|
<slot name="spacer"> </slot><slot name="text">LIVE</slot>
|
|
588
|
-
`;var
|
|
930
|
+
`;var ch=i=>{let e=i.mediaPaused||!i.mediaTimeIsLive,t=e?Y.SEEK_LIVE():Y.PLAYING_LIVE();i.setAttribute("aria-label",t),e?i.removeAttribute("aria-disabled"):i.setAttribute("aria-disabled","true")},ud=class extends P{static get observedAttributes(){return[...super.observedAttributes,Xa,Xn]}constructor(e={}){super({slotTemplate:mh,...e})}connectedCallback(){ch(this),super.connectedCallback()}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),ch(this)}get mediaPaused(){return H(this,s.MEDIA_PAUSED)}set mediaPaused(e){B(this,s.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return H(this,s.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){B(this,s.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new l.CustomEvent(Wf,{composed:!0,bubbles:!0})),this.hasAttribute(Xa)&&this.dispatchEvent(new l.CustomEvent(Hf,{composed:!0,bubbles:!0})))}};l.customElements.get("media-live-button")||l.customElements.define("media-live-button",ud);var vh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ja=(i,e,t)=>(vh(i,e,"read from private field"),t?t.call(i):e.get(i)),hh=(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)=>(vh(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),dt,Jn,ph={LOADING_DELAY:"loadingdelay"},fh=500,bh=m.createElement("template"),Ff=`
|
|
931
|
+
<svg aria-hidden="true" viewBox="0 0 100 100">
|
|
932
|
+
<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">
|
|
933
|
+
<animateTransform
|
|
934
|
+
attributeName="transform"
|
|
935
|
+
attributeType="XML"
|
|
936
|
+
type="rotate"
|
|
937
|
+
dur="1s"
|
|
938
|
+
from="0 50 50"
|
|
939
|
+
to="360 50 50"
|
|
940
|
+
repeatCount="indefinite" />
|
|
941
|
+
</path>
|
|
942
|
+
</svg>
|
|
943
|
+
`;bh.innerHTML=`
|
|
944
|
+
<style>
|
|
945
|
+
:host {
|
|
946
|
+
display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
|
|
947
|
+
vertical-align: middle;
|
|
948
|
+
box-sizing: border-box;
|
|
949
|
+
--_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${fh}ms);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
#status {
|
|
953
|
+
color: rgba(0,0,0,0);
|
|
954
|
+
width: 0px;
|
|
955
|
+
height: 0px;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
:host slot[name=icon] > *,
|
|
959
|
+
:host ::slotted([slot=icon]) {
|
|
960
|
+
opacity: var(--media-loading-indicator-opacity, 0);
|
|
961
|
+
transition: opacity 0.15s;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
:host([${s.MEDIA_LOADING}]:not([${s.MEDIA_PAUSED}])) slot[name=icon] > *,
|
|
965
|
+
:host([${s.MEDIA_LOADING}]:not([${s.MEDIA_PAUSED}])) ::slotted([slot=icon]) {
|
|
966
|
+
opacity: var(--media-loading-indicator-opacity, 1);
|
|
967
|
+
transition: opacity 0.15s var(--_loading-indicator-delay);
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
:host #status {
|
|
971
|
+
visibility: var(--media-loading-indicator-opacity, hidden);
|
|
972
|
+
transition: visibility 0.15s;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
:host([${s.MEDIA_LOADING}]:not([${s.MEDIA_PAUSED}])) #status {
|
|
976
|
+
visibility: var(--media-loading-indicator-opacity, visible);
|
|
977
|
+
transition: visibility 0.15s var(--_loading-indicator-delay);
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
981
|
+
width: var(--media-loading-indicator-icon-width);
|
|
982
|
+
height: var(--media-loading-indicator-icon-height, 100px);
|
|
983
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
984
|
+
vertical-align: middle;
|
|
985
|
+
}
|
|
986
|
+
</style>
|
|
987
|
+
|
|
988
|
+
<slot name="icon">${Ff}</slot>
|
|
989
|
+
<div id="status" role="status" aria-live="polite">${K.MEDIA_LOADING()}</div>
|
|
990
|
+
`;var cd=class extends l.HTMLElement{constructor(){if(super(),hh(this,dt,void 0),hh(this,Jn,fh),!this.shadowRoot){let e=this.attachShadow({mode:"open"}),t=bh.content.cloneNode(!0);e.appendChild(t)}}static get observedAttributes(){return[y.MEDIA_CONTROLLER,s.MEDIA_PAUSED,s.MEDIA_LOADING,ph.LOADING_DELAY]}attributeChangedCallback(e,t,a){var r,n,o,d,u;e===ph.LOADING_DELAY&&t!==a?this.loadingDelay=Number(a):e===y.MEDIA_CONTROLLER&&(t&&((n=(r=Ja(this,dt))==null?void 0:r.unassociateElement)==null||n.call(r,this),ja(this,dt,null)),a&&this.isConnected&&(ja(this,dt,(o=this.getRootNode())==null?void 0:o.getElementById(a)),(u=(d=Ja(this,dt))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(y.MEDIA_CONTROLLER);r&&(ja(this,dt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Ja(this,dt))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Ja(this,dt))==null?void 0:e.unassociateElement)==null||t.call(e,this),ja(this,dt,null)}get loadingDelay(){return Ja(this,Jn)}set loadingDelay(e){ja(this,Jn,e);let{style:t}=N(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return H(this,s.MEDIA_PAUSED)}set mediaPaused(e){B(this,s.MEDIA_PAUSED,e)}get mediaLoading(){return H(this,s.MEDIA_LOADING)}set mediaLoading(e){B(this,s.MEDIA_LOADING,e)}};dt=new WeakMap;Jn=new WeakMap;l.customElements.get("media-loading-indicator")||l.customElements.define("media-loading-indicator",cd);var{MEDIA_VOLUME_LEVEL:er}=s,Vf=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
589
991
|
<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"/>
|
|
590
|
-
</svg>`,
|
|
992
|
+
</svg>`,Eh=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
591
993
|
<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"/>
|
|
592
|
-
</svg>`,
|
|
994
|
+
</svg>`,Kf=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
593
995
|
<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"/>
|
|
594
|
-
</svg>`,
|
|
996
|
+
</svg>`,_h=m.createElement("template");_h.innerHTML=`
|
|
595
997
|
<style>
|
|
596
998
|
|
|
597
|
-
:host(:not([${
|
|
598
|
-
:host([${
|
|
999
|
+
:host(:not([${er}])) slot:not([name=high]):not([name=icon]),
|
|
1000
|
+
:host([${er}=high]) slot:not([name=high]):not([name=icon]) {
|
|
599
1001
|
display: none !important;
|
|
600
1002
|
}
|
|
601
1003
|
|
|
602
|
-
:host([${
|
|
1004
|
+
:host([${er}=off]) slot:not([name=off]):not([name=icon]) {
|
|
603
1005
|
display: none !important;
|
|
604
1006
|
}
|
|
605
1007
|
|
|
606
|
-
:host([${
|
|
1008
|
+
:host([${er}=low]) slot:not([name=low]):not([name=icon]) {
|
|
607
1009
|
display: none !important;
|
|
608
1010
|
}
|
|
609
1011
|
|
|
610
|
-
:host([${
|
|
1012
|
+
:host([${er}=medium]) slot:not([name=medium]):not([name=icon]) {
|
|
611
1013
|
display: none !important;
|
|
612
1014
|
}
|
|
613
1015
|
</style>
|
|
614
1016
|
|
|
615
1017
|
<slot name="icon">
|
|
616
|
-
<slot name="off">${
|
|
617
|
-
<slot name="low">${
|
|
618
|
-
<slot name="medium">${
|
|
619
|
-
<slot name="high">${
|
|
1018
|
+
<slot name="off">${Vf}</slot>
|
|
1019
|
+
<slot name="low">${Eh}</slot>
|
|
1020
|
+
<slot name="medium">${Eh}</slot>
|
|
1021
|
+
<slot name="high">${Kf}</slot>
|
|
620
1022
|
</slot>
|
|
621
|
-
`;var
|
|
1023
|
+
`;var gh=i=>{let t=i.mediaVolumeLevel==="off"?Y.UNMUTE():Y.MUTE();i.setAttribute("aria-label",t)},md=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:_h,...e})}connectedCallback(){gh(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===s.MEDIA_VOLUME_LEVEL&&gh(this),super.attributeChangedCallback(e,t,a)}get mediaVolumeLevel(){return I(this,s.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){k(this,s.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel==="off"?h.MEDIA_UNMUTE_REQUEST:h.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",md);var Ah=`<svg aria-hidden="true" viewBox="0 0 28 24">
|
|
622
1024
|
<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"/>
|
|
623
|
-
</svg>`,
|
|
1025
|
+
</svg>`,Th=m.createElement("template");Th.innerHTML=`
|
|
624
1026
|
<style>
|
|
625
|
-
:host([${
|
|
1027
|
+
:host([${s.MEDIA_IS_PIP}]) slot:not([name=exit]):not([name=icon]) {
|
|
626
1028
|
display: none !important;
|
|
627
1029
|
}
|
|
628
1030
|
|
|
629
1031
|
|
|
630
|
-
:host(:not([${
|
|
1032
|
+
:host(:not([${s.MEDIA_IS_PIP}])) slot:not([name=enter]):not([name=icon]) {
|
|
631
1033
|
display: none !important;
|
|
632
1034
|
}
|
|
633
1035
|
</style>
|
|
634
1036
|
|
|
635
1037
|
<slot name="icon">
|
|
636
|
-
<slot name="enter">${
|
|
637
|
-
<slot name="exit">${
|
|
1038
|
+
<slot name="enter">${Ah}</slot>
|
|
1039
|
+
<slot name="exit">${Ah}</slot>
|
|
638
1040
|
</slot>
|
|
639
|
-
`;var
|
|
1041
|
+
`;var yh=i=>{let e=i.mediaIsPip?Y.EXIT_PIP():Y.ENTER_PIP();i.setAttribute("aria-label",e)},hd=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_IS_PIP,s.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Th,...e})}connectedCallback(){yh(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===s.MEDIA_IS_PIP&&yh(this),super.attributeChangedCallback(e,t,a)}get mediaPipUnavailable(){return I(this,s.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){k(this,s.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return H(this,s.MEDIA_IS_PIP)}set mediaIsPip(e){B(this,s.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?h.MEDIA_EXIT_PIP_REQUEST:h.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",hd);var Yf=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},jn=(i,e,t)=>(Yf(i,e,"read from private field"),t?t.call(i):e.get(i)),Gf=(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,pd={RATES:"rates"},tr=[1,1.2,1.5,1.7,2],Kt=1,kh=m.createElement("template");kh.innerHTML=`
|
|
1042
|
+
<style>
|
|
1043
|
+
:host {
|
|
1044
|
+
min-width: 5ch;
|
|
1045
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
|
|
1046
|
+
}
|
|
1047
|
+
</style>
|
|
1048
|
+
<slot name="icon"></slot>
|
|
1049
|
+
`;var vd=class extends P{constructor(e={}){super({slotTemplate:kh,...e}),Gf(this,Qi,new Me(this,pd.RATES,{defaultValue:tr})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${Kt}x`}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_PLAYBACK_RATE,pd.RATES]}attributeChangedCallback(e,t,a){if(super.attributeChangedCallback(e,t,a),e===pd.RATES&&(jn(this,Qi).value=a),e===s.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?Kt:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",K.PLAYBACK_RATE({playbackRate:n}))}}get rates(){return jn(this,Qi)}set rates(e){e?Array.isArray(e)&&(jn(this,Qi).value=e.join(" ")):jn(this,Qi).value=""}get mediaPlaybackRate(){return x(this,s.MEDIA_PLAYBACK_RATE,Kt)}set mediaPlaybackRate(e){U(this,s.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let a=Array.from(this.rates.values(),o=>+o).sort((o,d)=>o-d),r=(t=(e=a.find(o=>o>this.mediaPlaybackRate))!=null?e:a[0])!=null?t:Kt,n=new l.CustomEvent(h.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};Qi=new WeakMap;l.customElements.get("media-playback-rate-button")||l.customElements.define("media-playback-rate-button",vd);var Sh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},es=(i,e,t)=>(Sh(i,e,"read from private field"),t?t.call(i):e.get(i)),fd=(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)},ir=(i,e,t)=>(Sh(i,e,"access private method"),t),zi,ar,ts,is,Ed,bd={RATES:"rates"},gd=class extends ce{constructor(){super(),fd(this,ar),fd(this,is),fd(this,zi,new Me(this,bd.RATES,{defaultValue:tr})),ir(this,ar,ts).call(this)}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_PLAYBACK_RATE,bd.RATES]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_PLAYBACK_RATE&&t!=a?this.value=a:e===bd.RATES&&t!=a&&(es(this,zi).value=a,ir(this,ar,ts).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ir(this,is,Ed))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ir(this,is,Ed))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:X(this).querySelector("media-playback-rate-menu-button")}get rates(){return es(this,zi)}set rates(e){e?Array.isArray(e)&&(es(this,zi).value=e.join(" ")):es(this,zi).value="",ir(this,ar,ts).call(this)}get mediaPlaybackRate(){return x(this,s.MEDIA_PLAYBACK_RATE,Kt)}set mediaPlaybackRate(e){U(this,s.MEDIA_PLAYBACK_RATE,e)}};zi=new WeakMap;ar=new WeakSet;ts=function(){this.defaultSlot.textContent="";for(let i of this.rates){let e=tt({type:"radio",text:this.formatMenuItemText(`${i}x`,i),value:i,checked:this.mediaPlaybackRate==i});e.prepend($e(this,"checked-indicator")),this.defaultSlot.append(e)}};is=new WeakSet;Ed=function(){if(!this.value)return;let i=new l.CustomEvent(h.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-playback-rate-menu")||l.customElements.define("media-playback-rate-menu",gd);var qf=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},as=(i,e,t)=>(qf(i,e,"read from private field"),t?t.call(i):e.get(i)),Zf=(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)},Xi,_d={RATES:"rates"},Qf=[1,1.2,1.5,1.7,2],Ad=1,Ih=m.createElement("template");Ih.innerHTML=`
|
|
1050
|
+
<style>
|
|
1051
|
+
:host {
|
|
1052
|
+
min-width: 5ch;
|
|
1053
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
|
|
1054
|
+
}
|
|
1055
|
+
</style>
|
|
1056
|
+
<slot name="icon"></slot>
|
|
1057
|
+
`;var yd=class extends ke{constructor(e={}){super({slotTemplate:Ih,...e}),Zf(this,Xi,new Me(this,_d.RATES,{defaultValue:Qf})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${Ad}x`}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_PLAYBACK_RATE,_d.RATES]}attributeChangedCallback(e,t,a){if(super.attributeChangedCallback(e,t,a),e===_d.RATES&&(as(this,Xi).value=a),e===s.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?Ad:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",K.PLAYBACK_RATE({playbackRate:n}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:X(this).querySelector("media-playback-rate-menu")}get rates(){return as(this,Xi)}set rates(e){e?Array.isArray(e)&&(as(this,Xi).value=e.join(" ")):as(this,Xi).value=""}get mediaPlaybackRate(){return x(this,s.MEDIA_PLAYBACK_RATE,Ad)}set mediaPlaybackRate(e){U(this,s.MEDIA_PLAYBACK_RATE,e)}};Xi=new WeakMap;l.customElements.get("media-playback-rate-menu-button")||l.customElements.define("media-playback-rate-menu-button",yd);var zf=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
640
1058
|
<path d="m6 21 15-9L6 3v18Z"/>
|
|
641
|
-
</svg>`,
|
|
1059
|
+
</svg>`,Xf=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
642
1060
|
<path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
|
|
643
|
-
</svg>`,
|
|
1061
|
+
</svg>`,Lh=m.createElement("template");Lh.innerHTML=`
|
|
644
1062
|
<style>
|
|
645
|
-
:host([${
|
|
1063
|
+
:host([${s.MEDIA_PAUSED}]) slot[name=pause] {
|
|
646
1064
|
display: none !important;
|
|
647
1065
|
}
|
|
648
1066
|
|
|
649
|
-
:host(:not([${
|
|
1067
|
+
:host(:not([${s.MEDIA_PAUSED}])) slot[name=play] {
|
|
650
1068
|
display: none !important;
|
|
651
1069
|
}
|
|
652
1070
|
</style>
|
|
653
1071
|
|
|
654
1072
|
<slot name="icon">
|
|
655
|
-
<slot name="play">${
|
|
656
|
-
<slot name="pause">${
|
|
1073
|
+
<slot name="play">${zf}</slot>
|
|
1074
|
+
<slot name="pause">${Xf}</slot>
|
|
657
1075
|
</slot>
|
|
658
|
-
`;var
|
|
659
|
-
<style>
|
|
660
|
-
:host {
|
|
661
|
-
min-width: 5ch;
|
|
662
|
-
padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
|
|
663
|
-
}
|
|
664
|
-
</style>
|
|
665
|
-
<slot name="icon"></slot>
|
|
666
|
-
`;var ko=class extends x{constructor(e={}){super({slotTemplate:Ld,...e}),fm(this,ni,new ot(this,Io.RATES,{defaultValue:So})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${oi}x`}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE,Io.RATES]}attributeChangedCallback(e,t,a){if(super.attributeChangedCallback(e,t,a),e===Io.RATES&&(lr(this,ni).value=a),e===o.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?oi:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",X.PLAYBACK_RATE({playbackRate:n}))}}get rates(){return lr(this,ni)}set rates(e){e?Array.isArray(e)&&(lr(this,ni).value=e.join(" ")):lr(this,ni).value=""}get mediaPlaybackRate(){return R(this,o.MEDIA_PLAYBACK_RATE,oi)}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:oi,n=new l.CustomEvent(v.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};ni=new WeakMap;l.customElements.get("media-playback-rate-button")||l.customElements.define("media-playback-rate-button",ko);var Pe={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"},Rd=c.createElement("template");Rd.innerHTML=`
|
|
1076
|
+
`;var Ch=i=>{let e=i.mediaPaused?Y.PLAY():Y.PAUSE();i.setAttribute("aria-label",e)},Td=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_PAUSED,s.MEDIA_ENDED]}constructor(e={}){super({slotTemplate:Lh,...e})}connectedCallback(){Ch(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===s.MEDIA_PAUSED&&Ch(this),super.attributeChangedCallback(e,t,a)}get mediaPaused(){return H(this,s.MEDIA_PAUSED)}set mediaPaused(e){B(this,s.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?h.MEDIA_PLAY_REQUEST:h.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",Td);var ut={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"},Mh=m.createElement("template");Mh.innerHTML=`
|
|
667
1077
|
<style>
|
|
668
1078
|
:host {
|
|
669
1079
|
pointer-events: none;
|
|
@@ -685,9 +1095,7 @@
|
|
|
685
1095
|
</style>
|
|
686
1096
|
|
|
687
1097
|
<img part="poster img" aria-hidden="true" id="image"/>
|
|
688
|
-
`;var
|
|
689
|
-
<slot name="icon">${_m}</slot>
|
|
690
|
-
`;var ym=0,Mo=class extends x{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,si.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:wd,...e})}connectedCallback(){this.seekOffset=R(this,si.SEEK_OFFSET,dr),super.connectedCallback()}attributeChangedCallback(e,t,a){e===si.SEEK_OFFSET&&(this.seekOffset=R(this,si.SEEK_OFFSET,dr)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return R(this,si.SEEK_OFFSET,dr)}set seekOffset(e){O(this,si.SEEK_OFFSET,e),this.setAttribute("aria-label",D.SEEK_BACK_N_SECS({seekOffset:this.seekOffset})),ka(Sa(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return R(this,o.MEDIA_CURRENT_TIME,ym)}set mediaCurrentTime(e){O(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new l.CustomEvent(v.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",Mo);var Dd=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},xd=(i,e,t)=>(Dd(i,e,"read from private field"),t?t.call(i):e.get(i)),Tm=(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)},Im=(i,e,t,a)=>(Dd(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Vi,Lo=class extends Ne{constructor(){super(),Tm(this,Vi,void 0),Im(this,Vi,this.shadowRoot.querySelector("slot")),xd(this,Vi).textContent=Le(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_PREVIEW_TIME&&a!=null&&(xd(this,Vi).textContent=Le(a))}get mediaPreviewTime(){return R(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",Lo);var Od=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ur=(i,e,t)=>(Od(i,e,"read from private field"),t?t.call(i):e.get(i)),km=(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)},cr=(i,e,t,a)=>(Od(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ue,Nd=c.createElement("template");Nd.innerHTML=`
|
|
1098
|
+
`;var Jf=i=>{i.style.removeProperty("background-image")},jf=(i,e)=>{i.style["background-image"]=`url('${e}')`},kd=class extends l.HTMLElement{static get observedAttributes(){return[ut.PLACEHOLDER_SRC,ut.SRC]}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Mh.content.cloneNode(!0))),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,a){e===ut.SRC&&(a==null?this.image.removeAttribute(ut.SRC):this.image.setAttribute(ut.SRC,a)),e===ut.PLACEHOLDER_SRC&&(a==null?Jf(this.image):jf(this.image,a))}get placeholderSrc(){return I(this,ut.PLACEHOLDER_SRC)}set placeholderSrc(e){k(this,ut.SRC,e)}get src(){return I(this,ut.SRC)}set src(e){k(this,ut.SRC,e)}};l.customElements.get("media-poster-image")||l.customElements.define("media-poster-image",kd);var wh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},eb=(i,e,t)=>(wh(i,e,"read from private field"),t?t.call(i):e.get(i)),tb=(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)},ib=(i,e,t,a)=>(wh(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),rs,Sd=class extends sh{constructor(){super(),tb(this,rs,void 0),ib(this,rs,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_PREVIEW_CHAPTER]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_PREVIEW_CHAPTER&&a!==t&&a!=null&&(eb(this,rs).textContent=a,a!==""?this.setAttribute("aria-valuetext",`chapter: ${a}`):this.removeAttribute("aria-valuetext"))}get mediaPreviewChapter(){return I(this,s.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){k(this,s.MEDIA_PREVIEW_CHAPTER,e)}};rs=new WeakMap;l.customElements.get("media-preview-chapter-display")||l.customElements.define("media-preview-chapter-display",Sd);var Rh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ns=(i,e,t)=>(Rh(i,e,"read from private field"),t?t.call(i):e.get(i)),ab=(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)},ss=(i,e,t,a)=>(Rh(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ct,xh=m.createElement("template");xh.innerHTML=`
|
|
691
1099
|
<style>
|
|
692
1100
|
:host {
|
|
693
1101
|
box-sizing: border-box;
|
|
@@ -701,12 +1109,74 @@
|
|
|
701
1109
|
}
|
|
702
1110
|
</style>
|
|
703
1111
|
<img crossorigin loading="eager" decoding="async">
|
|
704
|
-
`;var
|
|
1112
|
+
`;var Id=class extends l.HTMLElement{constructor(){super(),ab(this,ct,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(xh.content.cloneNode(!0)))}static get observedAttributes(){return[y.MEDIA_CONTROLLER,s.MEDIA_PREVIEW_IMAGE,s.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,a;let r=this.getAttribute(y.MEDIA_CONTROLLER);r&&(ss(this,ct,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=ns(this,ct))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=ns(this,ct))==null?void 0:e.unassociateElement)==null||t.call(e,this),ss(this,ct,null)}attributeChangedCallback(e,t,a){var r,n,o,d,u;[s.MEDIA_PREVIEW_IMAGE,s.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===y.MEDIA_CONTROLLER&&(t&&((n=(r=ns(this,ct))==null?void 0:r.unassociateElement)==null||n.call(r,this),ss(this,ct,null)),a&&this.isConnected&&(ss(this,ct,(o=this.getRootNode())==null?void 0:o.getElementById(a)),(u=(d=ns(this,ct))==null?void 0:d.associateElement)==null||u.call(d,this)))}get mediaPreviewImage(){return I(this,s.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){k(this,s.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(s.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(t=>+t)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(s.MEDIA_PREVIEW_COORDS);return}this.setAttribute(s.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!(e&&t))return;let[a,r,n,o]=e,d=t.split("#")[0],u=getComputedStyle(this),{maxWidth:c,maxHeight:f,minWidth:E,minHeight:v}=u,b=Math.min(parseInt(c)/n,parseInt(f)/o),w=Math.max(parseInt(E)/n,parseInt(v)/o),_=b<1,T=_?b:w>1?w:1,{style:D}=N(this.shadowRoot,":host"),oe=N(this.shadowRoot,"img").style,ge=this.shadowRoot.querySelector("img"),Ot=_?"min":"max";D.setProperty(`${Ot}-width`,"initial","important"),D.setProperty(`${Ot}-height`,"initial","important"),D.width=`${n*T}px`,D.height=`${o*T}px`;let _t=()=>{oe.width=`${this.imgWidth*T}px`,oe.height=`${this.imgHeight*T}px`,oe.display="block"};ge.src!==d&&(ge.onload=()=>{this.imgWidth=ge.naturalWidth,this.imgHeight=ge.naturalHeight,_t()},ge.src=d,_t()),_t(),oe.transform=`translate(-${a*T}px, -${r*T}px)`}};ct=new WeakMap;l.customElements.get("media-preview-thumbnail")||l.customElements.define("media-preview-thumbnail",Id);var Oh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Dh=(i,e,t)=>(Oh(i,e,"read from private field"),t?t.call(i):e.get(i)),rb=(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)},nb=(i,e,t,a)=>(Oh(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),rr,Cd=class extends lt{constructor(){super(),rb(this,rr,void 0),nb(this,rr,this.shadowRoot.querySelector("slot")),Dh(this,rr).textContent=ze(0)}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_PREVIEW_TIME&&a!=null&&(Dh(this,rr).textContent=ze(a))}get mediaPreviewTime(){return x(this,s.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){U(this,s.MEDIA_PREVIEW_TIME,e)}};rr=new WeakMap;l.customElements.get("media-preview-time-display")||l.customElements.define("media-preview-time-display",Cd);var xd=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ph=(i,e,t)=>(xd(i,e,"read from private field"),t?t.call(i):e.get(i)),os=(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)},Ld=(i,e,t,a)=>(xd(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ls=(i,e,t)=>(xd(i,e,"access private method"),t),nr,cs,ds,Md,us,wd,Rd=class extends ce{constructor(){super(...arguments),os(this,ds),os(this,us),os(this,nr,[]),os(this,cs,void 0)}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_RENDITION_LIST,s.MEDIA_RENDITION_SELECTED,s.MEDIA_RENDITION_UNAVAILABLE]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_RENDITION_SELECTED&&t!==a?this.value=a!=null?a:"auto":e===s.MEDIA_RENDITION_LIST&&t!==a&&(Ld(this,nr,Hr(a)),ls(this,ds,Md).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ls(this,us,wd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ls(this,us,wd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:X(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return Ph(this,nr)}set mediaRenditionList(e){Ld(this,nr,e),ls(this,ds,Md).call(this)}get mediaRenditionSelected(){return I(this,s.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){k(this,s.MEDIA_RENDITION_SELECTED,e)}};nr=new WeakMap;cs=new WeakMap;ds=new WeakSet;Md=function(){if(Ph(this,cs)===JSON.stringify(this.mediaRenditionList))return;Ld(this,cs,JSON.stringify(this.mediaRenditionList));let i=this.mediaRenditionList.sort((a,r)=>r.height-a.height);this.defaultSlot.textContent="";let e=!this.mediaRenditionSelected;for(let a of i){let r=this.formatMenuItemText(`${Math.min(a.width,a.height)}p`,a),n=tt({type:"radio",text:r,value:`${a.id}`,checked:a.selected&&!e});n.prepend($e(this,"checked-indicator")),this.defaultSlot.append(n)}let t=tt({type:"radio",text:this.formatMenuItemText("Auto"),value:"auto",checked:e});t.prepend($e(this,"checked-indicator")),this.defaultSlot.append(t)};us=new WeakSet;wd=function(){if(this.value==null)return;let i=new l.CustomEvent(h.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-rendition-menu")||l.customElements.define("media-rendition-menu",Rd);var sb=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1113
|
+
<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" />
|
|
1114
|
+
</svg>`,Nh=m.createElement("template");Nh.innerHTML=`
|
|
1115
|
+
<slot name="icon">${sb}</slot>
|
|
1116
|
+
`;var Dd=class extends ke{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_RENDITION_SELECTED,s.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:Nh})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",K.QUALITY())}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:X(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return I(this,s.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){k(this,s.MEDIA_RENDITION_SELECTED,e)}};l.customElements.get("media-rendition-menu-button")||l.customElements.define("media-rendition-menu-button",Dd);var Ji={SEEK_OFFSET:"seekoffset"},ms=30,ob=`<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)">${ms}</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>`,Uh=m.createElement("template");Uh.innerHTML=`
|
|
1117
|
+
<slot name="icon">${ob}</slot>
|
|
1118
|
+
`;var lb=0,Od=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_CURRENT_TIME,Ji.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:Uh,...e})}connectedCallback(){this.seekOffset=x(this,Ji.SEEK_OFFSET,ms),super.connectedCallback()}attributeChangedCallback(e,t,a){e===Ji.SEEK_OFFSET&&(this.seekOffset=x(this,Ji.SEEK_OFFSET,ms)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return x(this,Ji.SEEK_OFFSET,ms)}set seekOffset(e){U(this,Ji.SEEK_OFFSET,e),this.setAttribute("aria-label",Y.SEEK_BACK_N_SECS({seekOffset:this.seekOffset})),Zr(Qr(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return x(this,s.MEDIA_CURRENT_TIME,lb)}set mediaCurrentTime(e){U(this,s.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new l.CustomEvent(h.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",Od);var ji={SEEK_OFFSET:"seekoffset"},hs=30,db=`<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)">${hs}</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>`,Bh=m.createElement("template");Bh.innerHTML=`
|
|
1119
|
+
<slot name="icon">${db}</slot>
|
|
1120
|
+
`;var ub=0,Pd=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_CURRENT_TIME,ji.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:Bh,...e})}connectedCallback(){this.seekOffset=x(this,ji.SEEK_OFFSET,hs),super.connectedCallback()}attributeChangedCallback(e,t,a){e===ji.SEEK_OFFSET&&(this.seekOffset=x(this,ji.SEEK_OFFSET,hs)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return x(this,ji.SEEK_OFFSET,hs)}set seekOffset(e){U(this,ji.SEEK_OFFSET,e),this.setAttribute("aria-label",Y.SEEK_FORWARD_N_SECS({seekOffset:this.seekOffset})),Zr(Qr(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return x(this,s.MEDIA_CURRENT_TIME,ub)}set mediaCurrentTime(e){U(this,s.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new l.CustomEvent(h.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",Pd);var cb=Object.defineProperty,mb=(i,e,t)=>e in i?cb(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,hb=(i,e,t)=>(mb(i,typeof e!="symbol"?e+"":e,t),t),Wh=m.createElement("template");Wh.innerHTML=ce.template.innerHTML+`
|
|
1121
|
+
<style>
|
|
1122
|
+
:host {
|
|
1123
|
+
background: var(--media-settings-menu-background,
|
|
1124
|
+
var(--media-menu-background,
|
|
1125
|
+
var(--media-control-background,
|
|
1126
|
+
var(--media-secondary-color, rgb(20 20 30 / .8)))));
|
|
1127
|
+
min-width: var(--media-settings-menu-min-width, 160px);
|
|
1128
|
+
border-radius: 2px 2px 0 0;
|
|
1129
|
+
overflow: hidden;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
:host([role="menu"]) {
|
|
1133
|
+
|
|
1134
|
+
justify-content: end;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
slot:not([name]) {
|
|
1138
|
+
justify-content: var(--media-settings-menu-justify-content);
|
|
1139
|
+
flex-direction: var(--media-settings-menu-flex-direction, column);
|
|
1140
|
+
overflow: visible;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
#container.has-expanded {
|
|
1144
|
+
--media-settings-menu-item-opacity: 0;
|
|
1145
|
+
}
|
|
1146
|
+
</style>
|
|
1147
|
+
`;var ps=class extends ce{get anchorElement(){return this.anchor!=="auto"?super.anchorElement:X(this).querySelector("media-settings-menu-button")}};hb(ps,"template",Wh);l.customElements.get("media-settings-menu")||l.customElements.define("media-settings-menu",ps);var Hh=m.createElement("template");Hh.innerHTML=`
|
|
1148
|
+
<slot name="icon">
|
|
1149
|
+
<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1150
|
+
<path d="M4.5 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/>
|
|
1151
|
+
</svg>
|
|
1152
|
+
</slot>
|
|
1153
|
+
`;var Nd=class extends ke{static get observedAttributes(){return[...super.observedAttributes,"target"]}constructor(){super({slotTemplate:Hh})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",K.SETTINGS())}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:X(this).querySelector("media-settings-menu")}};l.customElements.get("media-settings-menu-button")||l.customElements.define("media-settings-menu-button",Nd);var pb=Object.defineProperty,vb=(i,e,t)=>e in i?pb(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,fb=(i,e,t)=>(vb(i,typeof e!="symbol"?e+"":e,t),t),$h,vs=m.createElement("template");vs.innerHTML=bi.template.innerHTML+`
|
|
1154
|
+
<style>
|
|
1155
|
+
slot:not([name="submenu"]) {
|
|
1156
|
+
opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity));
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
:host([aria-expanded="true"]:hover) {
|
|
1160
|
+
background: transparent;
|
|
1161
|
+
}
|
|
1162
|
+
</style>
|
|
1163
|
+
`;($h=vs.content)!=null&&$h.querySelector&&(vs.content.querySelector('slot[name="suffix"]').innerHTML=`
|
|
1164
|
+
<svg aria-hidden="true" viewBox="0 0 20 24">
|
|
1165
|
+
<path d="m8.12 17.585-.742-.669 4.2-4.665-4.2-4.666.743-.669 4.803 5.335-4.803 5.334Z"/>
|
|
1166
|
+
</svg>
|
|
1167
|
+
`);var fs=class extends bi{};fb(fs,"template",vs);l.customElements.get("media-settings-menu-item")||l.customElements.define("media-settings-menu-item",fs);var Yh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ud=(i,e,t)=>(Yh(i,e,"read from private field"),t?t.call(i):e.get(i)),bb=(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)},Eb=(i,e,t,a)=>(Yh(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ea,Ke={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Fh=[...Object.values(Ke),s.MEDIA_CURRENT_TIME,s.MEDIA_DURATION,s.MEDIA_SEEKABLE],Vh=["Enter"," "],gb=" / ",Kh=(i,{timesSep:e=gb}={})=>{var t,a;let r=i.hasAttribute(Ke.REMAINING),n=i.hasAttribute(Ke.SHOW_DURATION),o=(t=i.mediaCurrentTime)!=null?t:0,[,d]=(a=i.mediaSeekable)!=null?a:[],u=0;Number.isFinite(i.mediaDuration)?u=i.mediaDuration:Number.isFinite(d)&&(u=d);let c=r?ze(0-(u-o)):ze(o);return n?`${c}${e}${ze(u)}`:c},_b="video not loaded, unknown time.",Ab=i=>{var e;let t=i.mediaCurrentTime,[,a]=(e=i.mediaSeekable)!=null?e:[],r=null;if(Number.isFinite(i.mediaDuration)?r=i.mediaDuration:Number.isFinite(a)&&(r=a),t==null||r===null){i.setAttribute("aria-valuetext",_b);return}let n=i.hasAttribute(Ke.REMAINING),o=i.hasAttribute(Ke.SHOW_DURATION),d=n?ii(0-(r-t)):ii(t);if(!o){i.setAttribute("aria-valuetext",d);return}let u=ii(r),c=`${d} of ${u}`;i.setAttribute("aria-valuetext",c)},Bd=class extends lt{constructor(){super(),bb(this,ea,void 0),Eb(this,ea,this.shadowRoot.querySelector("slot")),Ud(this,ea).innerHTML=`${Kh(this)}`}static get observedAttributes(){return[...super.observedAttributes,...Fh,"disabled"]}connectedCallback(){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))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",K.PLAYBACK_TIME());let t=a=>{let{key:r}=a;if(!Vh.includes(r)){this.removeEventListener("keyup",t);return}this.toggleTimeDisplay()};this.addEventListener("keydown",a=>{let{metaKey:r,altKey:n,key:o}=a;if(r||n||!Vh.includes(o)){this.removeEventListener("keyup",t);return}this.addEventListener("keyup",t)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,t,a){Fh.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 H(this,Ke.REMAINING)}set remaining(e){B(this,Ke.REMAINING,e)}get showDuration(){return H(this,Ke.SHOW_DURATION)}set showDuration(e){B(this,Ke.SHOW_DURATION,e)}get noToggle(){return H(this,Ke.NO_TOGGLE)}set noToggle(e){B(this,Ke.NO_TOGGLE,e)}get mediaDuration(){return x(this,s.MEDIA_DURATION)}set mediaDuration(e){U(this,s.MEDIA_DURATION,e)}get mediaCurrentTime(){return x(this,s.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){U(this,s.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(s.MEDIA_SEEKABLE);if(e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(s.MEDIA_SEEKABLE);return}this.setAttribute(s.MEDIA_SEEKABLE,e.join(":"))}update(){let e=Kh(this);Ab(this),e!==Ud(this,ea).innerHTML&&(Ud(this,ea).innerHTML=e)}};ea=new WeakMap;l.customElements.get("media-time-display")||l.customElements.define("media-time-display",Bd);var Gh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ne=(i,e,t)=>(Gh(i,e,"read from private field"),t?t.call(i):e.get(i)),mt=(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)},Se=(i,e,t,a)=>(Gh(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),yb=(i,e,t,a)=>({set _(r){Se(i,e,r,t)},get _(){return ne(i,e,a)}}),ta,bs,ia,sr,Es,gs,_s,aa,gi,As,ys=class{constructor(e,t,a){mt(this,ta,void 0),mt(this,bs,void 0),mt(this,ia,void 0),mt(this,sr,void 0),mt(this,Es,void 0),mt(this,gs,void 0),mt(this,_s,void 0),mt(this,aa,void 0),mt(this,gi,0),mt(this,As,(r=performance.now())=>{Se(this,gi,requestAnimationFrame(ne(this,As))),Se(this,sr,performance.now()-ne(this,ia));let n=1e3/this.fps;if(ne(this,sr)>n){Se(this,ia,r-ne(this,sr)%n);let o=1e3/((r-ne(this,bs))/++yb(this,Es)._),d=(r-ne(this,gs))/1e3/this.duration,u=ne(this,_s)+d*this.playbackRate;u-ne(this,ta).valueAsNumber>0?Se(this,aa,this.playbackRate/this.duration/o):(Se(this,aa,.995*ne(this,aa)),u=ne(this,ta).valueAsNumber+ne(this,aa)),this.callback(u)}}),Se(this,ta,e),this.callback=t,this.fps=a}start(){ne(this,gi)===0&&(Se(this,ia,performance.now()),Se(this,bs,ne(this,ia)),Se(this,Es,0),ne(this,As).call(this))}stop(){ne(this,gi)!==0&&(cancelAnimationFrame(ne(this,gi)),Se(this,gi,0))}update({start:e,duration:t,playbackRate:a}){let r=e-ne(this,ta).valueAsNumber,n=Math.abs(t-this.duration);(r>0||r<-.03||n>=.5)&&this.callback(e),Se(this,_s,e),Se(this,gs,performance.now()),this.duration=t,this.playbackRate=a}};ta=new WeakMap;bs=new WeakMap;ia=new WeakMap;sr=new WeakMap;Es=new WeakMap;gs=new WeakMap;_s=new WeakMap;aa=new WeakMap;gi=new WeakMap;As=new WeakMap;var Vd=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ie=(i,e,t)=>(Vd(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)},ht=(i,e,t,a)=>(Vd(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),me=(i,e,t)=>(Vd(i,e,"access private method"),t),ra,_i,Ss,lr,Is,ks,dr,ur,na,sa,or,Kd,qh,Wd,Cs,Yd,Ls,Gd,Ms,qd,Hd,Zh,cr,ws,$d,Qh,Tb="video not loaded, unknown time.",kb=i=>{let e=i.range,t=ii(+Xh(i)),a=ii(+i.mediaSeekableEnd),r=t&&a?`${t} of ${a}`:Tb;e.setAttribute("aria-valuetext",r)},zh=m.createElement("template");zh.innerHTML=`
|
|
705
1168
|
<style>
|
|
706
1169
|
:host {
|
|
707
|
-
--media-
|
|
1170
|
+
--media-box-border-radius: 4px;
|
|
708
1171
|
--media-box-padding-left: 10px;
|
|
709
1172
|
--media-box-padding-right: 10px;
|
|
1173
|
+
--media-preview-border-radius: var(--media-box-border-radius);
|
|
1174
|
+
--media-box-arrow-offset: var(--media-box-border-radius);
|
|
1175
|
+
--_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
1176
|
+
--_preview-background: var(--media-preview-background, var(--_control-background));
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
contain: layout;
|
|
710
1180
|
}
|
|
711
1181
|
|
|
712
1182
|
#highlight {
|
|
@@ -715,8 +1185,7 @@
|
|
|
715
1185
|
|
|
716
1186
|
#preview-rail,
|
|
717
1187
|
#current-rail {
|
|
718
|
-
|
|
719
|
-
width: 1%;
|
|
1188
|
+
width: 100%;
|
|
720
1189
|
position: absolute;
|
|
721
1190
|
left: 0;
|
|
722
1191
|
bottom: 100%;
|
|
@@ -725,16 +1194,24 @@
|
|
|
725
1194
|
}
|
|
726
1195
|
|
|
727
1196
|
[part~="box"] {
|
|
1197
|
+
width: min-content;
|
|
728
1198
|
|
|
729
1199
|
position: absolute;
|
|
730
1200
|
bottom: 100%;
|
|
731
|
-
display: flex;
|
|
732
1201
|
flex-direction: column;
|
|
733
1202
|
align-items: center;
|
|
734
1203
|
transform: translateX(-50%);
|
|
735
1204
|
}
|
|
736
1205
|
|
|
1206
|
+
[part~="current-box"] {
|
|
1207
|
+
display: var(--media-current-box-display, var(--media-box-display, flex));
|
|
1208
|
+
margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));
|
|
1209
|
+
visibility: hidden;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
737
1212
|
[part~="preview-box"] {
|
|
1213
|
+
display: var(--media-preview-box-display, var(--media-box-display, flex));
|
|
1214
|
+
margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));
|
|
738
1215
|
transition-property: var(--media-preview-transition-property, visibility, opacity);
|
|
739
1216
|
transition-duration: var(--media-preview-transition-duration-out, .25s);
|
|
740
1217
|
transition-delay: var(--media-preview-transition-delay-out, 0s);
|
|
@@ -742,7 +1219,7 @@
|
|
|
742
1219
|
opacity: 0;
|
|
743
1220
|
}
|
|
744
1221
|
|
|
745
|
-
:host(:is([${
|
|
1222
|
+
:host(:is([${s.MEDIA_PREVIEW_IMAGE}], [${s.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {
|
|
746
1223
|
transition-duration: var(--media-preview-transition-duration-in, .5s);
|
|
747
1224
|
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
748
1225
|
visibility: visible;
|
|
@@ -750,7 +1227,7 @@
|
|
|
750
1227
|
}
|
|
751
1228
|
|
|
752
1229
|
@media (hover: hover) {
|
|
753
|
-
:host(:is([${
|
|
1230
|
+
:host(:is([${s.MEDIA_PREVIEW_IMAGE}], [${s.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {
|
|
754
1231
|
transition-duration: var(--media-preview-transition-duration-in, .5s);
|
|
755
1232
|
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
756
1233
|
visibility: visible;
|
|
@@ -764,7 +1241,7 @@
|
|
|
764
1241
|
|
|
765
1242
|
transition: visibility 0s .25s;
|
|
766
1243
|
transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
|
|
767
|
-
background: var(--media-preview-thumbnail-background, var(--
|
|
1244
|
+
background: var(--media-preview-thumbnail-background, var(--_preview-background));
|
|
768
1245
|
box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));
|
|
769
1246
|
max-width: var(--media-preview-thumbnail-max-width, 180px);
|
|
770
1247
|
max-height: var(--media-preview-thumbnail-max-height, 160px);
|
|
@@ -775,88 +1252,122 @@
|
|
|
775
1252
|
var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);
|
|
776
1253
|
}
|
|
777
1254
|
|
|
778
|
-
:host([${
|
|
779
|
-
:host([${
|
|
1255
|
+
:host([${s.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,
|
|
1256
|
+
:host([${s.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {
|
|
780
1257
|
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
781
1258
|
visibility: visible;
|
|
782
1259
|
}
|
|
783
1260
|
|
|
784
1261
|
@media (hover: hover) {
|
|
785
|
-
:host([${
|
|
786
|
-
:host([${
|
|
1262
|
+
:host([${s.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,
|
|
1263
|
+
:host([${s.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {
|
|
787
1264
|
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
788
1265
|
visibility: visible;
|
|
789
1266
|
}
|
|
790
1267
|
|
|
791
|
-
:host([${
|
|
1268
|
+
:host([${s.MEDIA_PREVIEW_TIME}]:hover) {
|
|
792
1269
|
--media-time-range-hover-display: block;
|
|
793
1270
|
}
|
|
794
1271
|
}
|
|
795
1272
|
|
|
796
1273
|
media-preview-chapter-display,
|
|
797
1274
|
::slotted(media-preview-chapter-display) {
|
|
798
|
-
|
|
799
|
-
line-height:
|
|
1275
|
+
font-size: var(--media-font-size, 13px);
|
|
1276
|
+
line-height: 17px;
|
|
800
1277
|
min-width: 0;
|
|
1278
|
+
visibility: hidden;
|
|
801
1279
|
|
|
802
|
-
transition: min-width 0s, border-radius 0s, margin 0s, padding 0s;
|
|
1280
|
+
transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;
|
|
803
1281
|
transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
|
|
804
|
-
background: var(--media-preview-chapter-background, var(--
|
|
1282
|
+
background: var(--media-preview-chapter-background, var(--_preview-background));
|
|
805
1283
|
border-radius: var(--media-preview-chapter-border-radius,
|
|
806
1284
|
var(--media-preview-border-radius) var(--media-preview-border-radius)
|
|
807
1285
|
var(--media-preview-border-radius) var(--media-preview-border-radius));
|
|
808
|
-
padding: var(--media-preview-chapter-padding,
|
|
1286
|
+
padding: var(--media-preview-chapter-padding, 3.5px 9px);
|
|
809
1287
|
margin: var(--media-preview-chapter-margin, 0 0 5px);
|
|
810
1288
|
text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));
|
|
811
1289
|
}
|
|
812
1290
|
|
|
813
|
-
:host([${
|
|
814
|
-
:host([${
|
|
1291
|
+
:host([${s.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,
|
|
1292
|
+
:host([${s.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {
|
|
815
1293
|
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
816
1294
|
border-radius: var(--media-preview-chapter-border-radius, 0);
|
|
817
|
-
padding: var(--media-preview-chapter-padding,
|
|
1295
|
+
padding: var(--media-preview-chapter-padding, 3.5px 9px 0);
|
|
818
1296
|
margin: var(--media-preview-chapter-margin, 0);
|
|
819
1297
|
min-width: 100%;
|
|
820
1298
|
}
|
|
821
1299
|
|
|
822
|
-
media-preview-chapter-display[${
|
|
823
|
-
::slotted(media-preview-chapter-display[${
|
|
824
|
-
|
|
1300
|
+
media-preview-chapter-display[${s.MEDIA_PREVIEW_CHAPTER}],
|
|
1301
|
+
::slotted(media-preview-chapter-display[${s.MEDIA_PREVIEW_CHAPTER}]) {
|
|
1302
|
+
visibility: visible;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
media-preview-chapter-display:not([aria-valuetext]),
|
|
1306
|
+
::slotted(media-preview-chapter-display:not([aria-valuetext])) {
|
|
1307
|
+
display: none;
|
|
825
1308
|
}
|
|
826
1309
|
|
|
827
1310
|
media-preview-time-display,
|
|
828
|
-
::slotted(media-preview-time-display)
|
|
829
|
-
|
|
1311
|
+
::slotted(media-preview-time-display),
|
|
1312
|
+
media-time-display,
|
|
1313
|
+
::slotted(media-time-display) {
|
|
1314
|
+
font-size: var(--media-font-size, 13px);
|
|
1315
|
+
line-height: 17px;
|
|
830
1316
|
min-width: 0;
|
|
831
1317
|
|
|
832
1318
|
transition: min-width 0s, border-radius 0s;
|
|
833
1319
|
transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
|
|
834
|
-
background: var(--media-preview-time-background, var(--
|
|
1320
|
+
background: var(--media-preview-time-background, var(--_preview-background));
|
|
835
1321
|
border-radius: var(--media-preview-time-border-radius,
|
|
836
1322
|
var(--media-preview-border-radius) var(--media-preview-border-radius)
|
|
837
1323
|
var(--media-preview-border-radius) var(--media-preview-border-radius));
|
|
838
|
-
padding: var(--media-preview-time-padding,
|
|
839
|
-
margin: var(--media-preview-time-margin, 0
|
|
1324
|
+
padding: var(--media-preview-time-padding, 3.5px 9px);
|
|
1325
|
+
margin: var(--media-preview-time-margin, 0);
|
|
840
1326
|
text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));
|
|
1327
|
+
transform: translateX(min(
|
|
1328
|
+
max(calc(50% - var(--_box-width) / 2),
|
|
1329
|
+
calc(var(--_box-shift, 0))),
|
|
1330
|
+
calc(var(--_box-width) / 2 - 50%)
|
|
1331
|
+
));
|
|
841
1332
|
}
|
|
842
1333
|
|
|
843
|
-
:host([${
|
|
844
|
-
:host([${
|
|
1334
|
+
:host([${s.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,
|
|
1335
|
+
:host([${s.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {
|
|
845
1336
|
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
846
1337
|
border-radius: var(--media-preview-time-border-radius,
|
|
847
1338
|
0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));
|
|
848
1339
|
min-width: 100%;
|
|
1340
|
+
transform: translateX(0);
|
|
849
1341
|
}
|
|
850
1342
|
|
|
851
|
-
:host([${
|
|
1343
|
+
:host([${s.MEDIA_PREVIEW_TIME}]:hover) {
|
|
852
1344
|
--media-time-range-hover-display: block;
|
|
853
1345
|
}
|
|
1346
|
+
|
|
1347
|
+
[part~="arrow"],
|
|
1348
|
+
::slotted([part~="arrow"]) {
|
|
1349
|
+
display: var(--media-box-arrow-display, inline-block);
|
|
1350
|
+
transform: translateX(min(
|
|
1351
|
+
max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),
|
|
1352
|
+
calc(var(--_box-shift, 0))),
|
|
1353
|
+
calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))
|
|
1354
|
+
));
|
|
1355
|
+
|
|
1356
|
+
border-color: transparent;
|
|
1357
|
+
border-top-color: var(--media-box-arrow-background, var(--_control-background));
|
|
1358
|
+
border-width: var(--media-box-arrow-border-width,
|
|
1359
|
+
var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);
|
|
1360
|
+
border-style: solid;
|
|
1361
|
+
justify-content: center;
|
|
1362
|
+
height: 0;
|
|
1363
|
+
}
|
|
854
1364
|
</style>
|
|
855
1365
|
<div id="preview-rail">
|
|
856
1366
|
<slot name="preview" part="box preview-box">
|
|
857
1367
|
<media-preview-thumbnail></media-preview-thumbnail>
|
|
858
1368
|
<media-preview-chapter-display></media-preview-chapter-display>
|
|
859
1369
|
<media-preview-time-display></media-preview-time-display>
|
|
1370
|
+
<slot name="preview-arrow"><div part="arrow"></div></slot>
|
|
860
1371
|
</slot>
|
|
861
1372
|
</div>
|
|
862
1373
|
<div id="current-rail">
|
|
@@ -864,70 +1375,10 @@
|
|
|
864
1375
|
|
|
865
1376
|
</slot>
|
|
866
1377
|
</div>
|
|
867
|
-
`;var
|
|
868
|
-
<svg aria-hidden="true" viewBox="0 0 100 100">
|
|
869
|
-
<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">
|
|
870
|
-
<animateTransform
|
|
871
|
-
attributeName="transform"
|
|
872
|
-
attributeType="XML"
|
|
873
|
-
type="rotate"
|
|
874
|
-
dur="1s"
|
|
875
|
-
from="0 50 50"
|
|
876
|
-
to="360 50 50"
|
|
877
|
-
repeatCount="indefinite" />
|
|
878
|
-
</path>
|
|
879
|
-
</svg>
|
|
880
|
-
`;Zd.innerHTML=`
|
|
881
|
-
<style>
|
|
882
|
-
:host {
|
|
883
|
-
display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
|
|
884
|
-
vertical-align: middle;
|
|
885
|
-
box-sizing: border-box;
|
|
886
|
-
--_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${qd}ms);
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
#status {
|
|
890
|
-
color: rgba(0,0,0,0);
|
|
891
|
-
width: 0px;
|
|
892
|
-
height: 0px;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
:host slot[name=icon] > *,
|
|
896
|
-
:host ::slotted([slot=icon]) {
|
|
897
|
-
opacity: var(--media-loading-indicator-opacity, 0);
|
|
898
|
-
transition: opacity 0.15s;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
:host([${o.MEDIA_LOADING}]:not([${o.MEDIA_PAUSED}])) slot[name=icon] > *,
|
|
902
|
-
:host([${o.MEDIA_LOADING}]:not([${o.MEDIA_PAUSED}])) ::slotted([slot=icon]) {
|
|
903
|
-
opacity: var(--media-loading-indicator-opacity, 1);
|
|
904
|
-
transition: opacity 0.15s var(--_loading-indicator-delay);
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
:host #status {
|
|
908
|
-
visibility: var(--media-loading-indicator-opacity, hidden);
|
|
909
|
-
transition: visibility 0.15s;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
:host([${o.MEDIA_LOADING}]:not([${o.MEDIA_PAUSED}])) #status {
|
|
913
|
-
visibility: var(--media-loading-indicator-opacity, visible);
|
|
914
|
-
transition: visibility 0.15s var(--_loading-indicator-delay);
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
svg, img, ::slotted(svg), ::slotted(img) {
|
|
918
|
-
width: var(--media-loading-indicator-icon-width);
|
|
919
|
-
height: var(--media-loading-indicator-icon-height, 100px);
|
|
920
|
-
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
921
|
-
vertical-align: middle;
|
|
922
|
-
}
|
|
923
|
-
</style>
|
|
924
|
-
|
|
925
|
-
<slot name="icon">${wm}</slot>
|
|
926
|
-
<div id="status" role="status" aria-live="polite">${X.MEDIA_LOADING()}</div>
|
|
927
|
-
`;var Ho=class extends l.HTMLElement{constructor(){if(super(),Kd(this,Ve,void 0),Kd(this,kr,qd),!this.shadowRoot){let e=this.attachShadow({mode:"open"}),t=Zd.content.cloneNode(!0);e.appendChild(t)}}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED,o.MEDIA_LOADING,Yd.LOADING_DELAY]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===Yd.LOADING_DELAY&&t!==a?this.loadingDelay=Number(a):e===A.MEDIA_CONTROLLER&&(t&&((n=(r=qi(this,Ve))==null?void 0:r.unassociateElement)==null||n.call(r,this),Zi(this,Ve,null)),a&&this.isConnected&&(Zi(this,Ve,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=qi(this,Ve))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Zi(this,Ve,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=qi(this,Ve))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=qi(this,Ve))==null?void 0:e.unassociateElement)==null||t.call(e,this),Zi(this,Ve,null)}get loadingDelay(){return qi(this,kr)}set loadingDelay(e){Zi(this,kr,e);let{style:t}=N(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return w(this,o.MEDIA_PAUSED)}set mediaPaused(e){M(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return w(this,o.MEDIA_LOADING)}set mediaLoading(e){M(this,o.MEDIA_LOADING,e)}};Ve=new WeakMap;kr=new WeakMap;l.customElements.get("media-loading-indicator")||l.customElements.define("media-loading-indicator",Ho);var xm=1,Dm=i=>i.mediaMuted?0:i.mediaVolume,Om=({value:i})=>`${Math.round(i*100)}%`,Vo=class extends Mt{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(v.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",X.VOLUME())}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED)&&(this.range.valueAsNumber=Dm(this),this.range.setAttribute("aria-valuetext",Om(this.range)),this.updateBar())}get mediaVolume(){return R(this,o.MEDIA_VOLUME,xm)}set mediaVolume(e){O(this,o.MEDIA_VOLUME,e)}get mediaMuted(){return w(this,o.MEDIA_MUTED)}set mediaMuted(e){M(this,o.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return L(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",Vo);var Go=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},z=(i,e,t)=>(Go(i,e,"read from private field"),t?t.call(i):e.get(i)),ce=(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)},Ie=(i,e,t,a)=>(Go(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Te=(i,e,t)=>(Go(i,e,"access private method"),t),We,dt,bi,Qi,Sr,Cr,Wo,pi,$o,Mr,Fo,zi,Lr,Rr,Ko,Yo,Qd,qo,zd,Nm=`
|
|
1378
|
+
`;var Ts=(i,e=i.mediaCurrentTime)=>{let t=Number.isFinite(i.mediaSeekableStart)?i.mediaSeekableStart:0,a=Number.isFinite(i.mediaDuration)?i.mediaDuration:i.mediaSeekableEnd;if(Number.isNaN(a))return 0;let r=(e-t)/(a-t);return Math.max(0,Math.min(r,1))},Xh=(i,e=i.range.valueAsNumber)=>{let t=Number.isFinite(i.mediaSeekableStart)?i.mediaSeekableStart:0,a=Number.isFinite(i.mediaDuration)?i.mediaDuration:i.mediaSeekableEnd;return Number.isNaN(a)?0:e*(a-t)+t},Fd=class extends Ei{constructor(){super(),se(this,sa),se(this,Kd),se(this,Cs),se(this,Ls),se(this,Ms),se(this,Hd),se(this,cr),se(this,$d),se(this,ra,void 0),se(this,_i,void 0),se(this,Ss,void 0),se(this,lr,void 0),se(this,Is,void 0),se(this,ks,void 0),se(this,dr,void 0),se(this,ur,void 0),se(this,na,void 0),se(this,Wd,t=>{this.dragging||(this.range.valueAsNumber=t,this.updateBar())}),this.container.appendChild(zh.content.cloneNode(!0)),ht(this,Ss,this.shadowRoot.querySelectorAll('[part~="box"]')),ht(this,Is,this.shadowRoot.querySelector('[part~="preview-box"]')),ht(this,ks,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);ht(this,dr,parseInt(e.getPropertyValue("--media-box-padding-left"))),ht(this,ur,parseInt(e.getPropertyValue("--media-box-padding-right"))),ht(this,_i,new ys(this.range,ie(this,Wd),60))}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_PAUSED,s.MEDIA_DURATION,s.MEDIA_SEEKABLE,s.MEDIA_CURRENT_TIME,s.MEDIA_PREVIEW_IMAGE,s.MEDIA_PREVIEW_TIME,s.MEDIA_PREVIEW_CHAPTER,s.MEDIA_BUFFERED,s.MEDIA_PLAYBACK_RATE,s.MEDIA_LOADING,s.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",K.SEEK()),me(this,sa,or).call(this),ht(this,ra,this.getRootNode()),(e=ie(this,ra))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),me(this,sa,or).call(this),(e=ie(this,ra))==null||e.removeEventListener("transitionstart",this),ht(this,ra,null)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),t!=a&&(e===s.MEDIA_CURRENT_TIME||e===s.MEDIA_PAUSED||e===s.MEDIA_ENDED||e===s.MEDIA_LOADING||e===s.MEDIA_DURATION||e===s.MEDIA_SEEKABLE?(ie(this,_i).update({start:Ts(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),me(this,sa,or).call(this),kb(this)):e===s.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===s.MEDIA_DURATION||e===s.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=ie(this,na),this.updateBar()))}get mediaChaptersCues(){return ie(this,na)}set mediaChaptersCues(e){var t;ht(this,na,e),this.updateSegments((t=ie(this,na))==null?void 0:t.map(a=>({start:Ts(this,a.startTime),end:Ts(this,a.endTime)})))}get mediaPaused(){return H(this,s.MEDIA_PAUSED)}set mediaPaused(e){B(this,s.MEDIA_PAUSED,e)}get mediaLoading(){return H(this,s.MEDIA_LOADING)}set mediaLoading(e){B(this,s.MEDIA_LOADING,e)}get mediaDuration(){return x(this,s.MEDIA_DURATION)}set mediaDuration(e){U(this,s.MEDIA_DURATION,e)}get mediaCurrentTime(){return x(this,s.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){U(this,s.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return x(this,s.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){U(this,s.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(s.MEDIA_BUFFERED);return e?e.split(" ").map(t=>t.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(s.MEDIA_BUFFERED);return}let t=e.map(a=>a.join(":")).join(" ");this.setAttribute(s.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(s.MEDIA_SEEKABLE);if(e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(s.MEDIA_SEEKABLE);return}this.setAttribute(s.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 I(this,s.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){k(this,s.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return x(this,s.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){U(this,s.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return H(this,s.MEDIA_ENDED)}set mediaEnded(e){B(this,s.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,[,o=this.mediaSeekableStart]=(e=t.find(([d,u])=>d<=n&&n<=u))!=null?e:[];a=Ts(this,o)}let{style:r}=N(this.shadowRoot,"#highlight");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let t=N(this.shadowRoot,"#current-rail"),a=N(this.shadowRoot,'[part~="current-box"]'),r=me(this,Cs,Yd).call(this,ie(this,ks)),n=me(this,Ls,Gd).call(this,r,this.range.valueAsNumber),o=me(this,Ms,qd).call(this,r,this.range.valueAsNumber);t.style.transform=`translateX(${n})`,t.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${o}`),a.style.setProperty("--_box-width",`${r.box.width}px`),a.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":me(this,$d,Qh).call(this);break;case"pointermove":me(this,Hd,Zh).call(this,e);break;case"pointerup":case"pointerleave":me(this,cr,ws).call(this,null);break;case"transitionstart":ue(e.target,this)&&setTimeout(()=>me(this,sa,or).call(this),0);break}}};ra=new WeakMap;_i=new WeakMap;Ss=new WeakMap;lr=new WeakMap;Is=new WeakMap;ks=new WeakMap;dr=new WeakMap;ur=new WeakMap;na=new WeakMap;sa=new WeakSet;or=function(){me(this,Kd,qh).call(this)?ie(this,_i).start():ie(this,_i).stop()};Kd=new WeakSet;qh=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&Rc(this)};Wd=new WeakMap;Cs=new WeakSet;Yd=function(i){var e;let a=((e=this.getAttribute("bounds")?Be(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),r=this.range.getBoundingClientRect(),n=i.offsetWidth,o=-(r.left-a.left-n/2),d=a.right-r.left-n/2;return{box:{width:n,min:o,max:d},bounds:a,range:r}};Ls=new WeakSet;Gd=function(i,e){let t=`${e*100}%`,{width:a,min:r,max:n}=i.box;if(!a)return t;if(Number.isNaN(r)||(t=`max(${`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`}, ${t})`),!Number.isNaN(n)){let d=`calc(1 / var(--_range-width) * 100 * ${n}% - var(--media-box-padding-right))`;t=`min(${t}, ${d})`}return t};Ms=new WeakSet;qd=function(i,e){let{width:t,min:a,max:r}=i.box,n=e*i.range.width;if(n<a+ie(this,dr)){let o=i.range.left-i.bounds.left-ie(this,dr);return`${n-t/2+o}px`}if(n>r-ie(this,ur)){let o=i.bounds.right-i.range.right-ie(this,ur);return`${n+t/2-o-i.range.width}px`}return 0};Hd=new WeakSet;Zh=function(i){let e=[...ie(this,Ss)].some(f=>i.composedPath().includes(f));if(!this.dragging&&(e||!i.composedPath().includes(this))){me(this,cr,ws).call(this,null);return}let t=this.mediaSeekableEnd;if(!t)return;let a=N(this.shadowRoot,"#preview-rail"),r=N(this.shadowRoot,'[part~="preview-box"]'),n=me(this,Cs,Yd).call(this,ie(this,Is)),o=(i.clientX-n.range.left)/n.range.width;o=Math.max(0,Math.min(1,o));let d=me(this,Ls,Gd).call(this,n,o),u=me(this,Ms,qd).call(this,n,o);a.style.transform=`translateX(${d})`,a.style.setProperty("--_range-width",`${n.range.width}`),r.style.setProperty("--_box-shift",`${u}`),r.style.setProperty("--_box-width",`${n.box.width}px`);let c=Math.round(ie(this,lr))-Math.round(o*t);Math.abs(c)<1&&o>.01&&o<.99||(ht(this,lr,o*t),me(this,cr,ws).call(this,ie(this,lr)))};cr=new WeakSet;ws=function(i){this.dispatchEvent(new l.CustomEvent(h.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:i}))};$d=new WeakSet;Qh=function(){ie(this,_i).stop();let i=Xh(this);this.dispatchEvent(new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:i}))};l.customElements.get("media-time-range")||l.customElements.define("media-time-range",Fd);var Sb=1,Ib=i=>i.mediaMuted?0:i.mediaVolume,Cb=({value:i})=>`${Math.round(i*100)}%`,Zd=class extends Ei{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_VOLUME,s.MEDIA_MUTED,s.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{let e=this.range.value,t=new l.CustomEvent(h.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",K.VOLUME())}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),(e===s.MEDIA_VOLUME||e===s.MEDIA_MUTED)&&(this.range.valueAsNumber=Ib(this),this.range.setAttribute("aria-valuetext",Cb(this.range)),this.updateBar())}get mediaVolume(){return x(this,s.MEDIA_VOLUME,Sb)}set mediaVolume(e){U(this,s.MEDIA_VOLUME,e)}get mediaMuted(){return H(this,s.MEDIA_MUTED)}set mediaMuted(e){B(this,s.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return I(this,s.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){k(this,s.MEDIA_VOLUME_UNAVAILABLE,e)}};l.customElements.get("media-volume-range")||l.customElements.define("media-volume-range",Zd);var eu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},de=(i,e,t)=>(eu(i,e,"read from private field"),t?t.call(i):e.get(i)),Ie=(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)=>(eu(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ye=(i,e,t)=>(eu(i,e,"access private method"),t),pt,Yt,la,mr,Rs,xs,Qd,oa,zd,Ds,Xd,hr,Os,Ps,Jd,jd,Jh,tu,jh,Lb=`
|
|
928
1379
|
<svg aria-hidden="true" viewBox="0 1 24 24" part="select-indicator indicator">
|
|
929
1380
|
<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"/>
|
|
930
|
-
</svg>`;function
|
|
1381
|
+
</svg>`;function vt(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 qe(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 ep=m.createElement("template");ep.innerHTML=`
|
|
931
1382
|
<style>
|
|
932
1383
|
:host {
|
|
933
1384
|
font: var(--media-font,
|
|
@@ -1006,8 +1457,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
1006
1457
|
</style>
|
|
1007
1458
|
<slot name="header"></slot>
|
|
1008
1459
|
<slot id="container"></slot>
|
|
1009
|
-
<slot name="select-indicator" hidden>${
|
|
1010
|
-
`;var
|
|
1460
|
+
<slot name="select-indicator" hidden>${Lb}</slot>
|
|
1461
|
+
`;var xe=class extends l.HTMLElement{constructor(e={}){super(),Ie(this,xs),Ie(this,Ds),Ie(this,hr),Ie(this,Ps),Ie(this,jd),Ie(this,tu),Ie(this,pt,void 0),Ie(this,Yt,""),Ie(this,la,null),Ie(this,mr,!1),Ie(this,Rs,t=>{this.handleClick(t)}),Ie(this,oa,t=>{let{key:a}=t;if(a==="Escape"){this.removeEventListener("keyup",de(this,oa));return}if(a==="Meta"){Ge(this,mr,!1);return}Ye(this,xs,Qd).call(this,t)}),Ie(this,zd,t=>{let{key:a,altKey:r}=t;if(r){this.removeEventListener("keyup",de(this,oa));return}if(a==="Meta"){Ge(this,mr,!0);return}if(this.keysUsed.includes(a)&&t.preventDefault(),de(this,mr)&&this.keysUsed.includes(a)){Ye(this,xs,Qd).call(this,t);return}this.addEventListener("keyup",de(this,oa),{once:!0})}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=ep.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",y.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&&Ye(this,Ps,Jd).call(this,t)}focus(){var e;(e=this.selectedOptions[0])==null||e.focus()}enable(){this.addEventListener("click",de(this,Rs)),this.addEventListener("keydown",de(this,zd))}disable(){this.removeEventListener("click",de(this,Rs)),this.removeEventListener("keyup",de(this,oa))}attributeChangedCallback(e,t,a){var r,n,o,d,u;e==="style"&&a!==t?Ye(this,Ds,Xd).call(this):e===y.MEDIA_CONTROLLER?(t&&((n=(r=de(this,pt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ge(this,pt,null)),a&&this.isConnected&&(Ge(this,pt,(o=this.getRootNode())==null?void 0:o.getElementById(a)),(u=(d=de(this,pt))==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;Ye(this,Ds,Xd).call(this),this.hasAttribute("disabled")||this.enable(),this.hasAttribute("role")||this.setAttribute("role","listbox");let r=this.getAttribute(y.MEDIA_CONTROLLER);r&&(Ge(this,pt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=de(this,pt))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=de(this,pt))==null?void 0:e.unassociateElement)==null||t.call(e,this),Ge(this,pt,null)}get keysUsed(){return["Enter"," ","ArrowDown","ArrowUp","Home","End"]}handleSelection(e,t){let a=Ye(this,hr,Os).call(this,e);a&&Ye(this,Ps,Jd).call(this,a,t)}handleMovement(e){let{key:t}=e,a=this.options,r=Ye(this,hr,Os).call(this,e);r||(r=a.filter(o=>o.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=Ye(this,jd,Jh).call(this,t);break}n&&(a.forEach(o=>o.setAttribute("tabindex","-1")),n.setAttribute("tabindex","0"),n.focus())}handleClick(e){let t=Ye(this,hr,Os).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"))}};pt=new WeakMap;Yt=new WeakMap;la=new WeakMap;mr=new WeakMap;Rs=new WeakMap;xs=new WeakSet;Qd=function(i){let{key:e}=i;e==="Enter"||e===" "?this.handleSelection(i,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"):this.handleMovement(i)};oa=new WeakMap;zd=new WeakMap;Ds=new WeakSet;Xd=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")};hr=new WeakSet;Os=function(i){let e=i.composedPath(),t=e.findIndex(a=>a.nodeName==="MEDIA-CHROME-OPTION");return e[t]};Ps=new WeakSet;Jd=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}))};jd=new WeakSet;Jh=function(i){Ye(this,tu,jh).call(this);let e=this.options,t=e.findIndex(c=>c.getAttribute("tabindex")==="0");Ge(this,Yt,de(this,Yt)+i);let a=de(this,Yt).split("").every(c=>c===i),r=e.slice(t+(a?1:0)).filter(c=>c.textContent.toLowerCase().startsWith(de(this,Yt))),n=e.slice(0,t-(a?1:0)).filter(c=>c.textContent.toLowerCase().startsWith(de(this,Yt))),o=[],d=[];return a&&(o=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,...o,...d][0]};tu=new WeakSet;jh=function(){clearTimeout(de(this,la)),Ge(this,la,null),Ge(this,la,setTimeout(()=>{Ge(this,Yt,""),Ge(this,la,null)},500))};l.customElements.get("media-chrome-listbox")||l.customElements.define("media-chrome-listbox",xe);var ou=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ru=(i,e,t)=>(ou(i,e,"read from private field"),t?t.call(i):e.get(i)),iu=(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)},au=(i,e,t,a)=>(ou(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),tp=(i,e,t)=>(ou(i,e,"access private method"),t),Ns,da,Us,nu,ip=m.createElement("template");ip.innerHTML=`
|
|
1011
1462
|
<style>
|
|
1012
1463
|
:host {
|
|
1013
1464
|
cursor: pointer;
|
|
@@ -1045,7 +1496,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
1045
1496
|
}
|
|
1046
1497
|
</style>
|
|
1047
1498
|
<slot></slot>
|
|
1048
|
-
`;var
|
|
1499
|
+
`;var Gt={VALUE:"value",SELECTED:"selected",DISABLED:"disabled"},Bs=class extends l.HTMLElement{constructor(){super(),iu(this,Us),iu(this,Ns,!1),iu(this,da,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(ip.content.cloneNode(!0)))}static get observedAttributes(){return[Gt.DISABLED,Gt.SELECTED,Gt.VALUE]}get value(){var e;return(e=this.getAttribute(Gt.VALUE))!=null?e:this.text}set value(e){this.setAttribute(Gt.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get selected(){return this.getAttribute("aria-selected")==="true"}set selected(e){au(this,Ns,!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===Gt.SELECTED&&!ru(this,Ns)?this.setAttribute("aria-selected",a!=null?"true":"false"):e===Gt.DISABLED&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Gt.DISABLED)||this.enable(),this.setAttribute("role","option"),au(this,da,su(this,this.parentNode)),tp(this,Us,nu).call(this)}disconnectedCallback(){this.disable(),tp(this,Us,nu).call(this),au(this,da,null)}handleClick(){}};Ns=new WeakMap;da=new WeakMap;Us=new WeakSet;nu=function(){var i;let e=(i=ru(this,da))==null?void 0:i.options;if(!e)return;let t=e.filter(a=>a.getAttribute("aria-selected")==="true").pop();t||(t=e[0]),ru(this,da).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 su(i,e){if(!i)return null;let{host:t}=i.getRootNode();return!e&&t?su(i,t):e!=null&&e.options?e:su(e,e==null?void 0:e.parentNode)}l.customElements.get("media-chrome-option")||l.customElements.define("media-chrome-option",Bs);var du=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},g=(i,e,t)=>(du(i,e,"read from private field"),t?t.call(i):e.get(i)),Ee=(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)},ft=(i,e,t,a)=>(du(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ai=(i,e,t)=>(du(i,e,"access private method"),t),bt,he,pr,J,Ze,ua,Ws,Hs,$s,Fs,Vs,lu,uu,ap,ca,vr,yi,rp=m.createElement("template");rp.innerHTML=`
|
|
1049
1500
|
<style>
|
|
1050
1501
|
:host {
|
|
1051
1502
|
font: var(--media-font,
|
|
@@ -1096,22 +1547,22 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
1096
1547
|
<slot></slot>
|
|
1097
1548
|
</media-chrome-listbox>
|
|
1098
1549
|
</slot>
|
|
1099
|
-
`;var
|
|
1550
|
+
`;var De=class extends l.HTMLElement{constructor(){var e;super(),Ee(this,Vs),Ee(this,uu),Ee(this,ca),Ee(this,bt,void 0),Ee(this,he,void 0),Ee(this,pr,void 0),Ee(this,J,void 0),Ee(this,Ze,void 0),Ee(this,ua,t=>{let{key:a}=t;if(!this.keysUsed.includes(a)){this.removeEventListener("keyup",g(this,ua));return}t.composedPath().includes(g(this,he))&&(a==="Enter"||a===" ")?Ai(this,Vs,lu).call(this):a==="Escape"&&Ai(this,ca,vr).call(this)}),Ee(this,Ws,t=>{let{metaKey:a,altKey:r,key:n}=t;if(a||r||!this.keysUsed.includes(n)){this.removeEventListener("keyup",g(this,ua));return}t.preventDefault(),this.addEventListener("keyup",g(this,ua),{once:!0})}),Ee(this,Hs,t=>{t.composedPath().includes(this)||Ai(this,ca,vr).call(this)}),Ee(this,$s,t=>{t.composedPath().includes(g(this,he))&&Ai(this,Vs,lu).call(this)}),Ee(this,Fs,()=>{Ai(this,ca,vr).call(this)}),Ee(this,yi,()=>{if(g(this,J).offsetWidth===0)return;let t=g(this,J).offsetWidth,a=g(this,he).getBoundingClientRect();if(this.hasAttribute("mediacontroller")||g(this,he).hasAttribute("mediacontroller")||g(this,J).hasAttribute("mediacontroller")){g(this,J).style.zIndex="1",g(this,J).style.bottom="unset",g(this,J).style.right=null,g(this,J).style.left="0",g(this,J).style.top=`${a.height}px`;return}let n=fr(this).getBoundingClientRect(),o=a.x+t,d=Math.max(a.right-o,a.right-n.right);g(this,J).style.left=null,g(this,J).style.right=`${d}px`,g(this,J).style.maxHeight=`${n.height-a.height}px`}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(rp.content.cloneNode(!0))),(e=this.init)==null||e.call(this),ft(this,he,this.shadowRoot.querySelector("[part=button]")),ft(this,J,this.shadowRoot.querySelector("[part=listbox]")),ft(this,pr,this.shadowRoot.querySelector("slot[name=button]")),g(this,pr).addEventListener("slotchange",()=>{let t=g(this,pr).assignedElements()[0];if(!t)return;ft(this,he,t),g(this,he).preventClick=!0,this.hasAttribute("disabled")||g(this,he).hasAttribute("disabled")?this.disable():(this.enable(),g(this,he).setAttribute("aria-haspopup","listbox"))}),ft(this,Ze,this.shadowRoot.querySelector("slot[name=listbox]")),g(this,Ze).addEventListener("slotchange",()=>{ft(this,J,g(this,Ze).assignedElements()[0]||g(this,J))})}static get observedAttributes(){return["disabled",y.MEDIA_CONTROLLER]}enable(){g(this,he).toggleAttribute("disabled",!1),this.addEventListener("change",g(this,Fs)),this.addEventListener("keydown",g(this,Ws)),this.addEventListener("click",g(this,$s)),m.addEventListener("click",g(this,Hs))}disable(){g(this,he).toggleAttribute("disabled",!0),this.removeEventListener("change",g(this,Fs)),this.removeEventListener("keydown",g(this,Ws)),this.removeEventListener("keyup",g(this,ua)),this.removeEventListener("click",g(this,$s)),m.removeEventListener("click",g(this,Hs))}attributeChangedCallback(e,t,a){var r,n,o,d,u;e===y.MEDIA_CONTROLLER?(t&&((n=(r=g(this,bt))==null?void 0:r.unassociateElement)==null||n.call(r,this),ft(this,bt,null),g(this,J).removeAttribute(y.MEDIA_CONTROLLER)),a&&this.isConnected&&(ft(this,bt,(o=this.getRootNode())==null?void 0:o.getElementById(a)),(u=(d=g(this,bt))==null?void 0:d.associateElement)==null||u.call(d,this),g(this,J).setAttribute(y.MEDIA_CONTROLLER,a))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;let{style:r}=N(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let n=this.getAttribute(y.MEDIA_CONTROLLER);n&&(ft(this,bt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(t=g(this,bt))==null?void 0:t.associateElement)==null||a.call(t,this),g(this,J).setAttribute(y.MEDIA_CONTROLLER,n)),this.hasAttribute("disabled")||this.enable(),g(this,Ze).hidden||Le(fr(this),g(this,yi))}disconnectedCallback(){var e,t;Xe(fr(this),g(this,yi)),this.disable(),(t=(e=g(this,bt))==null?void 0:e.unassociateElement)==null||t.call(e,this),ft(this,bt,null),g(this,J).removeAttribute(y.MEDIA_CONTROLLER)}get keysUsed(){return["Enter","Escape"," ","ArrowUp","ArrowDown","f","c","k","m"]}};bt=new WeakMap;he=new WeakMap;pr=new WeakMap;J=new WeakMap;Ze=new WeakMap;ua=new WeakMap;Ws=new WeakMap;Hs=new WeakMap;$s=new WeakMap;Fs=new WeakMap;Vs=new WeakSet;lu=function(){g(this,Ze).hidden?Ai(this,uu,ap).call(this):Ai(this,ca,vr).call(this)};uu=new WeakSet;ap=function(){g(this,Ze).hidden&&(g(this,Ze).hidden=!1,g(this,he).setAttribute("aria-expanded","true"),g(this,yi).call(this),g(this,J).focus(),Le(fr(this),g(this,yi)))};ca=new WeakSet;vr=function(){if(g(this,Ze).hidden)return;Xe(fr(this),g(this,yi));let i=ai();g(this,Ze).hidden=!0,g(this,he).setAttribute("aria-expanded","false"),ue(g(this,J),i)&&g(this,he).focus()};yi=new WeakMap;function fr(i){var e;return(e=i.getAttribute("bounds")?Be(i,`#${i.getAttribute("bounds")}`):Mb(i)||i.parentElement)!=null?e:i}function Mb(i){var e;let t=i.getAttribute(y.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):Be(i,"media-controller")}l.customElements.get("media-chrome-selectmenu")||l.customElements.define("media-chrome-selectmenu",De);var vu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},wb=(i,e,t)=>(vu(i,e,"read from private field"),t?t.call(i):e.get(i)),cu=(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)},Rb=(i,e,t,a)=>(vu(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),mu=(i,e,t)=>(vu(i,e,"access private method"),t),Ys,hu,op,Ks,pu,xb=`
|
|
1100
1551
|
<svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
|
|
1101
1552
|
<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"/>
|
|
1102
|
-
</svg>`,
|
|
1103
|
-
<slot name="captions-indicator" hidden>${
|
|
1104
|
-
`;var
|
|
1553
|
+
</svg>`,lp=m.createElement("template");lp.innerHTML=`
|
|
1554
|
+
<slot name="captions-indicator" hidden>${xb}</slot>
|
|
1555
|
+
`;var Gs=class extends xe{constructor(){super({slotTemplate:lp}),cu(this,hu),cu(this,Ks),cu(this,Ys,void 0)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",s.MEDIA_SUBTITLES_LIST,s.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_SUBTITLES_LIST&&t!==a?mu(this,hu,op).call(this):e===s.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",mu(this,Ks,pu))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",mu(this,Ks,pu))}get mediaSubtitlesList(){return np(this,s.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){sp(this,s.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return np(this,s.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){sp(this,s.MEDIA_SUBTITLES_SHOWING,e)}};Ys=new WeakMap;hu=new WeakSet;op=function(){var i;if(wb(this,Ys)===JSON.stringify(this.mediaSubtitlesList))return;Rb(this,Ys,JSON.stringify(this.mediaSubtitlesList));let e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.value,a=vt(this.formatOptionText("Off"),"off",t);a.prepend(qe(this,"select-indicator")),e.append(a);let r=this.mediaSubtitlesList;for(let n of r){let o=vt(this.formatOptionText(n.label,n),oi(n),this.value==oi(n));o.prepend(qe(this,"select-indicator")),((i=n.kind)!=null?i:"subs")==="captions"&&o.append(qe(this,"captions-indicator")),e.append(o)}};Ks=new WeakSet;pu=function(){let i=this.mediaSubtitlesShowing,e=this.getAttribute(s.MEDIA_SUBTITLES_SHOWING),t=this.value!==e;if(i!=null&&i.length&&t&&this.dispatchEvent(new l.CustomEvent(h.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:i})),!this.value||!t)return;let a=new l.CustomEvent(h.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};var np=(i,e)=>{let t=i.getAttribute(e);return t?kt(t):[]},sp=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=He(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-listbox")||l.customElements.define("media-captions-listbox",Gs);var qs=class extends De{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",qs);var dp=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Zs=(i,e,t)=>(dp(i,e,"read from private field"),t?t.call(i):e.get(i)),fu=(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)},br=(i,e,t)=>(dp(i,e,"access private method"),t),ma,Er,Qs,zs,Eu,bu={RATES:"rates"},Xs=class extends xe{constructor(){super(),fu(this,Er),fu(this,zs),fu(this,ma,new Me(this,bu.RATES,{defaultValue:tr})),br(this,Er,Qs).call(this)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",s.MEDIA_PLAYBACK_RATE,bu.RATES]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_PLAYBACK_RATE&&t!=a?this.value=a:e===bu.RATES&&t!=a&&(Zs(this,ma).value=a,br(this,Er,Qs).call(this))}get rates(){return Zs(this,ma)}set rates(e){e?Array.isArray(e)&&(Zs(this,ma).value=e.join(" ")):Zs(this,ma).value="",br(this,Er,Qs).call(this)}get mediaPlaybackRate(){return x(this,s.MEDIA_PLAYBACK_RATE,Kt)}set mediaPlaybackRate(e){U(this,s.MEDIA_PLAYBACK_RATE,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",br(this,zs,Eu))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",br(this,zs,Eu))}};ma=new WeakMap;Er=new WeakSet;Qs=function(){let i=this.shadowRoot.querySelector("#container");i.textContent="";for(let e of this.rates){let t=vt(this.formatOptionText(`${e}x`,e),e,this.mediaPlaybackRate==e);t.prepend(qe(this,"select-indicator")),i.append(t)}};zs=new WeakSet;Eu=function(){if(!this.value)return;let i=new l.CustomEvent(h.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",Xs);var Js=class extends De{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",Js);var yu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},up=(i,e,t)=>(yu(i,e,"read from private field"),t?t.call(i):e.get(i)),js=(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)},gu=(i,e,t,a)=>(yu(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),eo=(i,e,t)=>(yu(i,e,"access private method"),t),gr,ao,to,_u,io,Au,ro=class extends xe{constructor(){super(...arguments),js(this,to),js(this,io),js(this,gr,[]),js(this,ao,void 0)}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_RENDITION_LIST,s.MEDIA_RENDITION_SELECTED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_RENDITION_SELECTED&&t!==a?this.value=a!=null?a:"auto":e===s.MEDIA_RENDITION_LIST&&t!==a&&(gu(this,gr,Hr(a)),eo(this,to,_u).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",eo(this,io,Au))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",eo(this,io,Au))}get mediaRenditionList(){return up(this,gr)}set mediaRenditionList(e){gu(this,gr,e),eo(this,to,_u).call(this)}get mediaRenditionSelected(){return I(this,s.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){k(this,s.MEDIA_RENDITION_SELECTED,e)}};gr=new WeakMap;ao=new WeakMap;to=new WeakSet;_u=function(){if(up(this,ao)===JSON.stringify(this.mediaRenditionList))return;gu(this,ao,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),o=vt(n,`${r.id}`,r.selected&&!t);o.prepend(qe(this,"select-indicator")),e.append(o)}let a=vt(this.formatOptionText("Auto"),"auto",t);a.prepend(qe(this,"select-indicator")),e.append(a)};io=new WeakSet;Au=function(){if(this.value==null)return;let i=new l.CustomEvent(h.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",ro);var Db=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1105
1556
|
<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" />
|
|
1106
|
-
</svg>`,
|
|
1107
|
-
<slot name="icon">${
|
|
1108
|
-
`;var
|
|
1557
|
+
</svg>`,cp=m.createElement("template");cp.innerHTML=`
|
|
1558
|
+
<slot name="icon">${Db}</slot>
|
|
1559
|
+
`;var Tu=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_RENDITION_SELECTED,s.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:cp})}get mediaRenditionSelected(){return I(this,s.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){k(this,s.MEDIA_RENDITION_SELECTED,e)}};l.customElements.get("media-rendition-button")||l.customElements.define("media-rendition-button",Tu);var no=class extends De{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_RENDITION_SELECTED,s.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",no);var Cu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},mp=(i,e,t)=>(Cu(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)},ku=(i,e,t,a)=>(Cu(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),oo=(i,e,t)=>(Cu(i,e,"access private method"),t),_r,co,lo,Su,uo,Iu,mo=class extends xe{constructor(){super(...arguments),so(this,lo),so(this,uo),so(this,_r,[]),so(this,co,void 0)}static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_AUDIO_TRACK_LIST,s.MEDIA_AUDIO_TRACK_ENABLED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===s.MEDIA_AUDIO_TRACK_ENABLED&&t!==a?this.value=a:e===s.MEDIA_AUDIO_TRACK_LIST&&t!==a&&(ku(this,_r,$r(a)),oo(this,lo,Su).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",oo(this,uo,Iu))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",oo(this,uo,Iu))}get mediaAudioTrackList(){return mp(this,_r)}set mediaAudioTrackList(e){ku(this,_r,e),oo(this,lo,Su).call(this)}get mediaAudioTrackEnabled(){return I(this,s.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){k(this,s.MEDIA_AUDIO_TRACK_ENABLED,e)}};_r=new WeakMap;co=new WeakMap;lo=new WeakSet;Su=function(){if(mp(this,co)===JSON.stringify(this.mediaAudioTrackList))return;ku(this,co,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=vt(a,`${t.id}`,t.enabled);r.prepend(qe(this,"select-indicator")),e.append(r)}};uo=new WeakSet;Iu=function(){if(this.value==null)return;let i=new l.CustomEvent(h.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",mo);var Ob=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1109
1560
|
<path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
|
|
1110
1561
|
<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"/>
|
|
1111
|
-
</svg>`,
|
|
1112
|
-
<slot name="icon">${
|
|
1113
|
-
`;var
|
|
1114
|
-
${a}${i.file}`}mt(e)}var ee={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Pt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},gu=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}}),qm=Au.VideoEvents.filter(i=>i!=="error"),Zm=Object.values(ee).filter(i=>![ee.PLAYSINLINE].includes(i)),Qm=Object.values(Pt);function _u(i){i.querySelectorAll(":scope > track").forEach(e=>{var t;(t=i.media)==null||t.append(e.cloneNode())}),qm.forEach(e=>{var t;(t=i.media)==null||t.addEventListener(e,a=>{i.dispatchEvent(new Event(a.type))})})}var ks=class extends U.HTMLElement{static get observedAttributes(){return[...Zm,...Qm]}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 Pt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case Pt.VOLUME:{let s=(r=Ye(a))!=null?r:1;this.media&&(this.media.volume=s);return}case Pt.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:gu}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:gu}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(Pt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(Pt.PLAYBACKRATE,`${e}`):this.removeAttribute(Pt.PLAYBACKRATE)}get crossOrigin(){return na(this,ee.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(ee.CROSSORIGIN,`${e}`)}get autoplay(){return na(this,ee.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(ee.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(ee.AUTOPLAY)}get loop(){return na(this,ee.LOOP)!=null}set loop(e){e?this.setAttribute(ee.LOOP,""):this.removeAttribute(ee.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 na(this,ee.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(ee.MUTED,""):this.removeAttribute(ee.MUTED)}get playsInline(){return na(this,ee.PLAYSINLINE)!=null}set playsInline(e){ve("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(ee.PRELOAD,e):this.removeAttribute(ee.PRELOAD)}};function na(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var Ss=ks;var zm=Object.defineProperty,Xm=(i,e,t)=>e in i?zm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Jm=(i,e,t)=>(Xm(i,typeof e!="symbol"?e+"":e,t),t),Su=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},y=(i,e,t)=>(Su(i,e,"read from private field"),t?t.call(i):e.get(i)),Ge=(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)},Qe=(i,e,t,a)=>(Su(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ai,pn,Ut,oa,ht,pt,bt,Bt,_i,bn,Ce,yu=1,Tu=0,jm=1,eh={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 ae&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof ae?r.element[r.attributeName]=n:r.value=n}}}},ze=class extends l.DocumentFragment{constructor(e,t,a=eh){var r;super(),Ge(this,Ai,void 0),Ge(this,pn,void 0),this.append(e.content.cloneNode(!0)),Qe(this,Ai,Cu(this)),Qe(this,pn,a),(r=a.createCallback)==null||r.call(a,this,y(this,Ai),t),a.processCallback(this,y(this,Ai),t)}update(e){y(this,pn).processCallback(this,y(this,Ai),e)}};Ai=new WeakMap;pn=new WeakMap;var Cu=(i,e=[])=>{let t,a;for(let r of i.attributes||[])if(r.value.includes("{{")){let n=new Cs;for([t,a]of ku(r.value))if(!t)n.append(a);else{let s=new ae(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===yu&&!(r instanceof HTMLTemplateElement))Cu(r,e);else if(r.nodeType===yu||r.data.includes("{{")){let n=[];if(r.data)for([t,a]of ku(r.data))if(!t)n.push(new Text(a));else{let s=new Xe(i);n.push(s),e.push([a,s])}else if(r instanceof HTMLTemplateElement){let s=new sa(i,r);n.push(s),e.push([s.expression,s])}r.replaceWith(...n.flatMap(s=>s.replacementNodes||[s]))}return e},Iu={},ku=i=>{let e="",t=0,a=Iu[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([Tu,e]),e="",r++):n==="}"&&i[r+1]==="}"&&i[r-1]!=="\\"&&!--t?(a.push([jm,e.trim()]),e="",r++):e+=n||"";return e&&a.push([Tu,(t>0?"{{":"")+e]),Iu[i]=a},th=11,En=class{get value(){return""}set value(e){}toString(){return this.value}},Mu=new WeakMap,Cs=class{constructor(){Ge(this,Ut,[])}[Symbol.iterator](){return y(this,Ut).values()}get length(){return y(this,Ut).length}item(e){return y(this,Ut)[e]}append(...e){for(let t of e)t instanceof ae&&Mu.set(t,this),y(this,Ut).push(t)}toString(){return y(this,Ut).join("")}};Ut=new WeakMap;var ae=class extends En{constructor(e,t,a){super(),Ge(this,Bt),Ge(this,oa,""),Ge(this,ht,void 0),Ge(this,pt,void 0),Ge(this,bt,void 0),Qe(this,ht,e),Qe(this,pt,t),Qe(this,bt,a)}get attributeName(){return y(this,pt)}get attributeNamespace(){return y(this,bt)}get element(){return y(this,ht)}get value(){return y(this,oa)}set value(e){y(this,oa)!==e&&(Qe(this,oa,e),!y(this,Bt,_i)||y(this,Bt,_i).length===1?e==null?y(this,ht).removeAttributeNS(y(this,bt),y(this,pt)):y(this,ht).setAttributeNS(y(this,bt),y(this,pt),e):y(this,ht).setAttributeNS(y(this,bt),y(this,pt),y(this,Bt,_i)))}get booleanValue(){return y(this,ht).hasAttributeNS(y(this,bt),y(this,pt))}set booleanValue(e){if(!y(this,Bt,_i)||y(this,Bt,_i).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};oa=new WeakMap;ht=new WeakMap;pt=new WeakMap;bt=new WeakMap;Bt=new WeakSet;_i=function(){return Mu.get(this)};var Xe=class extends En{constructor(e,t){super(),Ge(this,bn,void 0),Ge(this,Ce,void 0),Qe(this,bn,e),Qe(this,Ce,t?[...t]:[new Text])}get replacementNodes(){return y(this,Ce)}get parentNode(){return y(this,bn)}get nextSibling(){return y(this,Ce)[y(this,Ce).length-1].nextSibling}get previousSibling(){return y(this,Ce)[0].previousSibling}get value(){return y(this,Ce).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===th?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);t.length||t.push(new Text),Qe(this,Ce,ih(y(this,Ce)[0].parentNode,y(this,Ce),t,this.nextSibling))}};bn=new WeakMap;Ce=new WeakMap;var sa=class extends Xe{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),Jm(this,"directive"),this.expression=r,this.template=t,this.directive=a}};function ih(i,e,t,a=null){let r=0,n,s,d,u=t.length,m=e.length;for(;r<u&&r<m&&e[r]==t[r];)r++;for(;r<u&&r<m&&t[u-1]==e[m-1];)a=t[--m,--u];if(r==m)for(;r<u;)i.insertBefore(t[r++],a);if(r==u)for(;r<m;)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 Lu={string:i=>String(i)},fn=class{constructor(e){this.template=e,this.state=void 0}},Ht=new WeakMap,Vt=new WeakMap,Ms={partial:(i,e)=>{e[i.expression]=new fn(i.template)},if:(i,e)=>{var t;if(wu(i.expression,e))if(Ht.get(i)!==i.template){Ht.set(i,i.template);let a=new ze(i.template,e,gn);i.replace(a),Vt.set(i,a)}else(t=Vt.get(i))==null||t.update(e);else i.replace(""),Ht.delete(i),Vt.delete(i)}},ah=Object.keys(Ms),gn={processCallback(i,e,t){var a,r;if(t)for(let[n,s]of e){if(s instanceof sa){if(!s.directive){let u=ah.find(m=>s.template.hasAttribute(m));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=Ms[s.directive])==null||a.call(Ms,s,t);continue}let d=wu(n,t);if(d instanceof fn){Ht.get(s)!==d.template?(Ht.set(s,d.template),d=new ze(d.template,d.state,gn),s.value=d,Vt.set(s,d)):(r=Vt.get(s))==null||r.update(d.state);continue}d?(s instanceof ae&&s.attributeName.startsWith("aria-")&&(d=String(d)),s instanceof ae?typeof d=="boolean"?s.booleanValue=d:typeof d=="function"?s.element[s.attributeName]=d:s.value=d:(s.value=d,Ht.delete(s),Vt.delete(s))):s instanceof ae?s.value=void 0:(s.value=void 0,Ht.delete(s),Vt.delete(s))}}},Ru={"!":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=Lu[e])==null?void 0:t.call(Lu,i)}};function rh(i){return nh(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function wu(i,e={}){var t,a,r,n,s,d,u;let m=rh(i);if(m.length===0||m.some(({type:h})=>!h))return la(i);if(((t=m[0])==null?void 0:t.token)===">"){let h=e[(a=m[1])==null?void 0:a.token];if(!h)return la(i);let p={...e};h.state=p;let b=m.slice(2);for(let _=0;_<b.length;_+=3){let P=(r=b[_])==null?void 0:r.token,I=(n=b[_+1])==null?void 0:n.token,V=(s=b[_+2])==null?void 0:s.token;P&&I==="="&&(p[P]=da(V,e))}return h}if(m.length===1)return vn(m[0])?da(m[0].token,e):la(i);if(m.length===2){let h=(d=m[0])==null?void 0:d.token,p=Ru[h];if(!p||!vn(m[1]))return la(i);let b=da(m[1].token,e);return p(b)}if(m.length===3){let h=(u=m[1])==null?void 0:u.token,p=Ru[h];if(!p||!vn(m[0])||!vn(m[2]))return la(i);let b=da(m[0].token,e);if(h==="|")return p(b,m[2].token);let _=da(m[2].token,e);return p(b,_)}}function la(i){return console.warn(`Warning: invalid expression \`${i}\``),!1}function vn({type:i}){return["number","boolean","string","param"].includes(i)}function da(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):Ta(i)?parseFloat(i):e[i]}function nh(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 oh=Object.defineProperty,sh=(i,e,t)=>e in i?oh(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ca=(i,e,t)=>(sh(i,typeof e!="symbol"?e+"":e,t),t),Os=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ws=(i,e,t)=>(Os(i,e,"read from private field"),t?t.call(i):e.get(i)),ua=(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)},Wt=(i,e,t,a)=>(Os(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ls=(i,e,t)=>(Os(i,e,"access private method"),t),yi,An,Ti,xs,xu,_n,Ds,Rs={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},Du=c.createElement("template");Du.innerHTML=`
|
|
1562
|
+
</svg>`,hp=m.createElement("template");hp.innerHTML=`
|
|
1563
|
+
<slot name="icon">${Ob}</slot>
|
|
1564
|
+
`;var Lu=class extends P{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_AUDIO_TRACK_ENABLED,s.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:hp})}get mediaAudioTrackEnabled(){return I(this,s.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){k(this,s.MEDIA_AUDIO_TRACK_ENABLED,e)}};l.customElements.get("media-audio-track-button")||l.customElements.define("media-audio-track-button",Lu);var ho=class extends De{static get observedAttributes(){return[...super.observedAttributes,s.MEDIA_AUDIO_TRACK_ENABLED,s.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",ho);var A=fv(require("@mux/mux-video")),z=require("@mux/playback-core");var Tp=require("@mux/mux-video");var Pb="en",Ti={code:Pb};var pp="en";function C(i,e=!0){var r,n;let t=e&&(n=(r=Ti)==null?void 0:r[i])!=null?n:i,a=e?Ti.code:pp;return new Mu(t,a)}var Mu=class{constructor(e,t=(a=>(a=Ti.code)!=null?a:pp)()){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 vp(i){let e="";return Object.entries(i).forEach(([t,a])=>{a!=null&&(e+=`${po(t)}: ${a}; `)}),e?e.trim():void 0}function po(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function vo(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Et(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function wu(i){let e=Nb(i).toString();return e?"?"+e:""}function Nb(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}function qt(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 Ru=(i,e)=>!i||!e?!1:i.contains(e)?!0:Ru(i,e.getRootNode().host);var fo=require("@mux/playback-core");var fp="mux.com",Ub=()=>{try{return"2.4.0"}catch{}return"UNKNOWN"},Bb=Ub(),Eo=()=>Bb,bp=(i,{token:e,customDomain:t=fp,thumbnailTime:a}={})=>{let r=e==null?a:void 0,{aud:n}=qt(e);if(!(e&&n!=="t"))return`https://image.${t}/${i}/thumbnail.webp${wu({token:e,time:r})}`},Ep=(i,{token:e,customDomain:t=fp}={})=>{let{aud:a}=qt(e);if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${wu({token:e,format:"webp"})}`},Ar=i=>{if(i){if([fo.StreamTypes.LIVE,fo.StreamTypes.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return fo.StreamTypes.LIVE}};var Wb={crossorigin:"crossOrigin",playsinline:"playsInline"};function gp(i){var e;return(e=Wb[i])!=null?e:vo(i)}var ki,Si,ve,bo=class{constructor(e,t){ee(this,ki,void 0);ee(this,Si,void 0);ee(this,ve,[]);Ce(this,ki,e),Ce(this,Si,t)}[Symbol.iterator](){return O(this,ve).values()}get length(){return O(this,ve).length}get value(){var e;return(e=O(this,ve).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(Ce(this,ve,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return O(this,ve)[e]}values(){return O(this,ve).values()}keys(){return O(this,ve).keys()}forEach(e){O(this,ve).forEach(e)}add(...e){var t,a;e.forEach(r=>{this.contains(r)||O(this,ve).push(r)}),!(this.value===""&&!((t=O(this,ki))!=null&&t.hasAttribute(`${O(this,Si)}`)))&&((a=O(this,ki))==null||a.setAttribute(`${O(this,Si)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>{O(this,ve).splice(O(this,ve).indexOf(a),1)}),(t=O(this,ki))==null||t.setAttribute(`${O(this,Si)}`,`${this.value}`)}contains(e){return O(this,ve).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)}};ki=new WeakMap,Si=new WeakMap,ve=new WeakMap;var _p=`[mux-player ${Eo()}]`;function Zt(...i){console.warn(_p,...i)}function Oe(...i){console.error(_p,...i)}function xu(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+=` ${C("Read more: ")}
|
|
1565
|
+
${a}${i.file}`}Zt(e)}var pe={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Ii={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},yp=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}}),Hb=Tp.VideoEvents.filter(i=>i!=="error"),$b=Object.values(pe).filter(i=>![pe.PLAYSINLINE].includes(i)),Fb=Object.values(Ii);function kp(i){i.querySelectorAll(":scope > track").forEach(e=>{var t;(t=i.media)==null||t.append(e.cloneNode())}),Hb.forEach(e=>{var t;(t=i.media)==null||t.addEventListener(e,a=>{i.dispatchEvent(new Event(a.type))})})}var Du=class extends Z.HTMLElement{static get observedAttributes(){return[...$b,...Fb]}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 o=(d=this.media)==null?void 0:d.querySelector(`track[src="${n.src}"]`);o&&((u=this.media)==null||u.removeChild(o))}),r.addedNodes.forEach(n=>{var o;(o=this.media)==null||o.append(n.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,t,a){var r,n;switch(e){case Ii.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case Ii.VOLUME:{let o=(r=Et(a))!=null?r:1;this.media&&(this.media.volume=o);return}case Ii.PLAYBACKRATE:{let o=(n=Et(a))!=null?n:1;this.media&&(this.media.playbackRate=o,this.media.defaultPlaybackRate=o);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:yp}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:yp}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=Et(this.getAttribute(Ii.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(Ii.PLAYBACKRATE,`${e}`):this.removeAttribute(Ii.PLAYBACKRATE)}get crossOrigin(){return yr(this,pe.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(pe.CROSSORIGIN,`${e}`)}get autoplay(){return yr(this,pe.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(pe.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(pe.AUTOPLAY)}get loop(){return yr(this,pe.LOOP)!=null}set loop(e){e?this.setAttribute(pe.LOOP,""):this.removeAttribute(pe.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 yr(this,pe.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(pe.MUTED,""):this.removeAttribute(pe.MUTED)}get playsInline(){return yr(this,pe.PLAYSINLINE)!=null}set playsInline(e){Oe("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(pe.PRELOAD,e):this.removeAttribute(pe.PRELOAD)}};function yr(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var Ou=Du;var Vb=Object.defineProperty,Kb=(i,e,t)=>e in i?Vb(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Yb=(i,e,t)=>(Kb(i,typeof e!="symbol"?e+"":e,t),t),Mp=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},S=(i,e,t)=>(Mp(i,e,"read from private field"),t?t.call(i):e.get(i)),gt=(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)},Lt=(i,e,t,a)=>(Mp(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ha,go,Ci,Tr,Qt,zt,Xt,Li,pa,_o,Qe,Sp=1,Ip=0,Gb=1,qb={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 fe&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof fe?r.element[r.attributeName]=n:r.value=n}}}},Mt=class extends l.DocumentFragment{constructor(e,t,a=qb){var r;super(),gt(this,ha,void 0),gt(this,go,void 0),this.append(e.content.cloneNode(!0)),Lt(this,ha,wp(this)),Lt(this,go,a),(r=a.createCallback)==null||r.call(a,this,S(this,ha),t),a.processCallback(this,S(this,ha),t)}update(e){S(this,go).processCallback(this,S(this,ha),e)}};ha=new WeakMap;go=new WeakMap;var wp=(i,e=[])=>{let t,a;for(let r of i.attributes||[])if(r.value.includes("{{")){let n=new Pu;for([t,a]of Lp(r.value))if(!t)n.append(a);else{let o=new fe(i,r.name,r.namespaceURI);n.append(o),e.push([a,o])}r.value=n.toString()}for(let r of i.childNodes)if(r.nodeType===Sp&&!(r instanceof HTMLTemplateElement))wp(r,e);else if(r.nodeType===Sp||r.data.includes("{{")){let n=[];if(r.data)for([t,a]of Lp(r.data))if(!t)n.push(new Text(a));else{let o=new wt(i);n.push(o),e.push([a,o])}else if(r instanceof HTMLTemplateElement){let o=new kr(i,r);n.push(o),e.push([o.expression,o])}r.replaceWith(...n.flatMap(o=>o.replacementNodes||[o]))}return e},Cp={},Lp=i=>{let e="",t=0,a=Cp[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([Ip,e]),e="",r++):n==="}"&&i[r+1]==="}"&&i[r-1]!=="\\"&&!--t?(a.push([Gb,e.trim()]),e="",r++):e+=n||"";return e&&a.push([Ip,(t>0?"{{":"")+e]),Cp[i]=a},Zb=11,Ao=class{get value(){return""}set value(e){}toString(){return this.value}},Rp=new WeakMap,Pu=class{constructor(){gt(this,Ci,[])}[Symbol.iterator](){return S(this,Ci).values()}get length(){return S(this,Ci).length}item(e){return S(this,Ci)[e]}append(...e){for(let t of e)t instanceof fe&&Rp.set(t,this),S(this,Ci).push(t)}toString(){return S(this,Ci).join("")}};Ci=new WeakMap;var fe=class extends Ao{constructor(e,t,a){super(),gt(this,Li),gt(this,Tr,""),gt(this,Qt,void 0),gt(this,zt,void 0),gt(this,Xt,void 0),Lt(this,Qt,e),Lt(this,zt,t),Lt(this,Xt,a)}get attributeName(){return S(this,zt)}get attributeNamespace(){return S(this,Xt)}get element(){return S(this,Qt)}get value(){return S(this,Tr)}set value(e){S(this,Tr)!==e&&(Lt(this,Tr,e),!S(this,Li,pa)||S(this,Li,pa).length===1?e==null?S(this,Qt).removeAttributeNS(S(this,Xt),S(this,zt)):S(this,Qt).setAttributeNS(S(this,Xt),S(this,zt),e):S(this,Qt).setAttributeNS(S(this,Xt),S(this,zt),S(this,Li,pa)))}get booleanValue(){return S(this,Qt).hasAttributeNS(S(this,Xt),S(this,zt))}set booleanValue(e){if(!S(this,Li,pa)||S(this,Li,pa).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};Tr=new WeakMap;Qt=new WeakMap;zt=new WeakMap;Xt=new WeakMap;Li=new WeakSet;pa=function(){return Rp.get(this)};var wt=class extends Ao{constructor(e,t){super(),gt(this,_o,void 0),gt(this,Qe,void 0),Lt(this,_o,e),Lt(this,Qe,t?[...t]:[new Text])}get replacementNodes(){return S(this,Qe)}get parentNode(){return S(this,_o)}get nextSibling(){return S(this,Qe)[S(this,Qe).length-1].nextSibling}get previousSibling(){return S(this,Qe)[0].previousSibling}get value(){return S(this,Qe).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===Zb?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);t.length||t.push(new Text),Lt(this,Qe,Qb(S(this,Qe)[0].parentNode,S(this,Qe),t,this.nextSibling))}};_o=new WeakMap;Qe=new WeakMap;var kr=class extends wt{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),Yb(this,"directive"),this.expression=r,this.template=t,this.directive=a}};function Qb(i,e,t,a=null){let r=0,n,o,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++],o=n?n.nextSibling:a,n==d?n=o:r<u&&t[r]==o?(i.replaceChild(d,n),n=o):i.insertBefore(d,n);for(;n!=a;)o=n.nextSibling,i.removeChild(n),n=o}return t}var xp={string:i=>String(i)},To=class{constructor(e){this.template=e,this.state=void 0}},Mi=new WeakMap,wi=new WeakMap,Nu={partial:(i,e)=>{e[i.expression]=new To(i.template)},if:(i,e)=>{var t;if(Op(i.expression,e))if(Mi.get(i)!==i.template){Mi.set(i,i.template);let a=new Mt(i.template,e,ko);i.replace(a),wi.set(i,a)}else(t=wi.get(i))==null||t.update(e);else i.replace(""),Mi.delete(i),wi.delete(i)}},zb=Object.keys(Nu),ko={processCallback(i,e,t){var a,r;if(t)for(let[n,o]of e){if(o instanceof kr){if(!o.directive){let u=zb.find(c=>o.template.hasAttribute(c));u&&(o.directive=u,o.expression=o.template.getAttribute(u))}(a=Nu[o.directive])==null||a.call(Nu,o,t);continue}let d=Op(n,t);if(d instanceof To){Mi.get(o)!==d.template?(Mi.set(o,d.template),d=new Mt(d.template,d.state,ko),o.value=d,wi.set(o,d)):(r=wi.get(o))==null||r.update(d.state);continue}d?(o instanceof fe&&o.attributeName.startsWith("aria-")&&(d=String(d)),o instanceof fe?typeof d=="boolean"?o.booleanValue=d:typeof d=="function"?o.element[o.attributeName]=d:o.value=d:(o.value=d,Mi.delete(o),wi.delete(o))):o instanceof fe?o.value=void 0:(o.value=void 0,Mi.delete(o),wi.delete(o))}}},Dp={"!":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=xp[e])==null?void 0:t.call(xp,i)}};function Xb(i){return Jb(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function Op(i,e={}){var t,a,r,n,o,d,u;let c=Xb(i);if(c.length===0||c.some(({type:f})=>!f))return Sr(i);if(((t=c[0])==null?void 0:t.token)===">"){let f=e[(a=c[1])==null?void 0:a.token];if(!f)return Sr(i);let E={...e};f.state=E;let v=c.slice(2);for(let b=0;b<v.length;b+=3){let w=(r=v[b])==null?void 0:r.token,_=(n=v[b+1])==null?void 0:n.token,T=(o=v[b+2])==null?void 0:o.token;w&&_==="="&&(E[w]=Ir(T,e))}return f}if(c.length===1)return yo(c[0])?Ir(c[0].token,e):Sr(i);if(c.length===2){let f=(d=c[0])==null?void 0:d.token,E=Dp[f];if(!E||!yo(c[1]))return Sr(i);let v=Ir(c[1].token,e);return E(v)}if(c.length===3){let f=(u=c[1])==null?void 0:u.token,E=Dp[f];if(!E||!yo(c[0])||!yo(c[2]))return Sr(i);let v=Ir(c[0].token,e);if(f==="|")return E(v,c[2].token);let b=Ir(c[2].token,e);return E(v,b)}}function Sr(i){return console.warn(`Warning: invalid expression \`${i}\``),!1}function yo({type:i}){return["number","boolean","string","param"].includes(i)}function Ir(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):Fr(i)?parseFloat(i):e[i]}function Jb(i,e){let t,a,r,n=[];for(;i;){r=null,t=i.length;for(let o in e)a=e[o].exec(i),a&&a.index<t&&(r={token:a[0],type:o,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 jb=Object.defineProperty,e0=(i,e,t)=>e in i?jb(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Lr=(i,e,t)=>(e0(i,typeof e!="symbol"?e+"":e,t),t),Fu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Wu=(i,e,t)=>(Fu(i,e,"read from private field"),t?t.call(i):e.get(i)),Cr=(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)},Ri=(i,e,t,a)=>(Fu(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Uu=(i,e,t)=>(Fu(i,e,"access private method"),t),va,So,fa,Hu,Pp,Io,$u,Bu={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},Np=m.createElement("template");Np.innerHTML=`
|
|
1115
1566
|
<style>
|
|
1116
1567
|
:host {
|
|
1117
1568
|
display: inline-block;
|
|
@@ -1135,7 +1586,7 @@ ${a}${i.file}`}mt(e)}var ee={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:
|
|
|
1135
1586
|
display: none;
|
|
1136
1587
|
}
|
|
1137
1588
|
</style>
|
|
1138
|
-
`;var
|
|
1589
|
+
`;var Jt=class extends l.HTMLElement{constructor(){super(),Cr(this,Hu),Cr(this,Io),Lr(this,"renderRoot"),Lr(this,"renderer"),Cr(this,va,void 0),Cr(this,So,void 0),Cr(this,fa,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:!!(Bu[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(yt.BREAKPOINTS_COMPUTED,this.render),Uu(this,Hu,Pp).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=Wu(this,va))!=null?e:this.constructor.template}set template(e){Ri(this,fa,null),Ri(this,va,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:o})=>Bu[o]||o.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(let o of r){let d=(a=Bu[o.name])!=null?a:Tc(o.name),{value:u}=o;u!=null?(Fr(u)&&(u=parseFloat(u)),n[d]=u===""?!0:u):n[d]=!1}return n}attributeChangedCallback(e,t,a){e==="template"&&t!=a&&Uu(this,Io,$u).call(this)}connectedCallback(){Uu(this,Io,$u).call(this)}createRenderer(){this.template&&this.template!==Wu(this,So)&&(Ri(this,So,this.template),this.renderer=new Mt(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(Np.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};va=new WeakMap;So=new WeakMap;fa=new WeakMap;Hu=new WeakSet;Pp=function(i){if(Object.prototype.hasOwnProperty.call(this,i)){let e=this[i];delete this[i],this[i]=e}};Io=new WeakSet;$u=function(){var i;let e=this.getAttribute("template");if(!e||e===Wu(this,fa))return;let t=this.getRootNode(),a=(i=t==null?void 0:t.getElementById)==null?void 0:i.call(t,e);if(a){Ri(this,fa,e),Ri(this,va,a),this.createRenderer();return}t0(e)&&(Ri(this,fa,e),i0(e).then(r=>{let n=m.createElement("template");n.innerHTML=r,Ri(this,va,n),this.createRenderer()}).catch(console.error))};Lr(Jt,"template");Lr(Jt,"observedAttributes",["template"]);Lr(Jt,"processor",ko);function t0(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 i0(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",Jt);var Up=`:host {
|
|
1139
1590
|
--media-control-display: var(--controls);
|
|
1140
1591
|
--media-loading-indicator-display: var(--loading-indicator);
|
|
1141
1592
|
--media-dialog-display: var(--dialog);
|
|
@@ -1282,7 +1733,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
1282
1733
|
--media-duration-display-display: var(--duration-display, var(--bottom-duration-display));
|
|
1283
1734
|
--media-title-display-display: var(--title-display, var(--bottom-title-display));
|
|
1284
1735
|
}
|
|
1285
|
-
`;var
|
|
1736
|
+
`;var Wp=`
|
|
1286
1737
|
:host {
|
|
1287
1738
|
z-index: 100;
|
|
1288
1739
|
display: var(--media-dialog-display, flex);
|
|
@@ -1334,17 +1785,17 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
1334
1785
|
text-align: center;
|
|
1335
1786
|
line-height: 1.4;
|
|
1336
1787
|
}
|
|
1337
|
-
`,
|
|
1788
|
+
`,Hp=ye.createElement("template");Hp.innerHTML=`
|
|
1338
1789
|
<style>
|
|
1339
|
-
${
|
|
1790
|
+
${Wp}
|
|
1340
1791
|
</style>
|
|
1341
1792
|
|
|
1342
1793
|
<div class="dialog">
|
|
1343
1794
|
<slot></slot>
|
|
1344
1795
|
</div>
|
|
1345
|
-
`;var
|
|
1796
|
+
`;var jt=class extends Z.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})),Bp(this)}close(){this.hasAttribute("open")&&(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),r0(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")&&Bp(this)}};jt.styles=Wp,jt.template=Hp,jt.observedAttributes=["open"];function Bp(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=$p(i.shadowRoot)),i._previouslyFocusedElement=ye.activeElement,ye.activeElement instanceof HTMLElement&&ye.activeElement.blur(),i.addEventListener("transitionend",()=>{t instanceof HTMLElement&&t.focus({preventScroll:!0})},{once:!0})}function $p(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=$p(r[n].shadowRoot),a));n++);}return a}function r0(i){i._previouslyFocusedElement instanceof HTMLElement&&i._previouslyFocusedElement.focus()}Z.customElements.get("media-dialog")||(Z.customElements.define("media-dialog",jt),Z.MediaDialog=jt);var Vu=jt;var Fp=ye.createElement("template");Fp.innerHTML=`
|
|
1346
1797
|
<style>
|
|
1347
|
-
${
|
|
1798
|
+
${Vu.styles}
|
|
1348
1799
|
|
|
1349
1800
|
.close {
|
|
1350
1801
|
background: none;
|
|
@@ -1373,86 +1824,86 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
1373
1824
|
</svg>
|
|
1374
1825
|
</button>
|
|
1375
1826
|
</slot>
|
|
1376
|
-
`;var
|
|
1827
|
+
`;var Mr=class extends Vu{constructor(){var e,t;super(),(t=(e=this.shadowRoot)==null?void 0:e.querySelector(".close"))==null||t.addEventListener("click",()=>{this.close()})}};Mr.template=Fp;Z.customElements.get("mxp-dialog")||(Z.customElements.define("mxp-dialog",Mr),Z.MxpDialog=Mr);var wr=new WeakMap,Yu=class i{constructor(e,t){this.element=e;this.type=t;this.element.addEventListener(this.type,this);let a=wr.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=wr.get(this.element);t&&t.delete(this.type)}}static for(e){wr.has(e.element)||wr.set(e.element,new Map);let t=e.attributeName.slice(2),a=wr.get(e.element);return a&&a.has(t)?a.get(t):new i(e.element,t)}};function n0(i,e){return i instanceof fe&&i.attributeName.startsWith("on")?(Yu.for(i).set(e),i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),!0):!1}function s0(i,e){return e instanceof Co&&i instanceof wt?(e.renderInto(i),!0):!1}function o0(i,e){return e instanceof DocumentFragment&&i instanceof wt?(e.childNodes.length&&i.replace(...e.childNodes),!0):!1}function l0(i,e){if(i instanceof fe){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 d0(i,e){if(i instanceof fe&&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 u0(i,e){if(typeof e=="boolean"&&i instanceof fe){let t=i.attributeNamespace,a=i.element.hasAttributeNS(t,i.attributeName);return e!==a&&(i.booleanValue=e),!0}return!1}function c0(i,e){return e===!1&&i instanceof wt?(i.replace(""),!0):!1}function m0(i,e){d0(i,e)||u0(i,e)||n0(i,e)||c0(i,e)||s0(i,e)||o0(i,e)||l0(i,e)}var Ku=new Map,Vp=new WeakMap,Kp=new WeakMap,Co=class{constructor(e,t,a){this.strings=e;this.values=t;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(Ku.has(this.stringsKey))return Ku.get(this.stringsKey);{let e=ye.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<t?`{{ ${n} }}`:""),""),Ku.set(this.stringsKey,e),e}}renderInto(e){var r;let t=this.template;if(Vp.get(e)!==t){Vp.set(e,t);let n=new Mt(t,this.values,this.processor);Kp.set(e,n),e instanceof wt?e.replace(...n.children):e.appendChild(n);return}let a=Kp.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},h0={processCallback(i,e,t){var a;if(t){for(let[r,n]of e)if(r in t){let o=(a=t[r])!=null?a:"";m0(n,o)}}}};function Rt(i,...e){return new Co(i,e,h0)}function Yp(i,e){i.renderInto(e)}var Rr=require("@mux/playback-core"),Gp=i=>Rt`
|
|
1377
1828
|
<style>
|
|
1378
|
-
${
|
|
1829
|
+
${Up}
|
|
1379
1830
|
</style>
|
|
1380
|
-
${
|
|
1381
|
-
`,
|
|
1831
|
+
${b0(i)}
|
|
1832
|
+
`,p0=i=>{let e=i.hotKeys?`${i.hotKeys}`:"";return Ar(i.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},v0={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"},f0=Object.values(v0).join(", "),b0=i=>{var e,t,a,r,n,o,d,u,c,f,E,v,b,w,_,T,D,oe,ge,Ot,_t,Ea,ga,_a,Aa,ya,Ta,ka,Sa,Ia,Ca,La,Br,At,Ma;return Rt`
|
|
1382
1833
|
<media-theme
|
|
1383
1834
|
template="${i.themeTemplate||!1}"
|
|
1384
1835
|
defaultstreamtype="${(e=i.defaultStreamType)!=null?e:!1}"
|
|
1385
|
-
hotkeys="${
|
|
1836
|
+
hotkeys="${p0(i)||!1}"
|
|
1386
1837
|
nohotkeys="${i.noHotKeys||!i.hasSrc||i.isDialogOpen||!1}"
|
|
1387
|
-
noautoseektolive="${!!((t=i.streamType)!=null&&t.includes(
|
|
1838
|
+
noautoseektolive="${!!((t=i.streamType)!=null&&t.includes(Rr.StreamTypes.LIVE))&&i.targetLiveWindow!==0}"
|
|
1388
1839
|
novolumepref="${i.novolumepref||!1}"
|
|
1389
1840
|
disabled="${!i.hasSrc||i.isDialogOpen}"
|
|
1390
1841
|
audio="${(a=i.audio)!=null?a:!1}"
|
|
1391
|
-
style="${(r=
|
|
1842
|
+
style="${(r=vp({"--media-primary-color":i.primaryColor,"--media-secondary-color":i.secondaryColor,"--media-accent-color":i.accentColor}))!=null?r:!1}"
|
|
1392
1843
|
defaultsubtitles="${!i.defaultHiddenCaptions}"
|
|
1393
1844
|
forwardseekoffset="${(n=i.forwardSeekOffset)!=null?n:!1}"
|
|
1394
|
-
backwardseekoffset="${(
|
|
1845
|
+
backwardseekoffset="${(o=i.backwardSeekOffset)!=null?o:!1}"
|
|
1395
1846
|
playbackrates="${(d=i.playbackRates)!=null?d:!1}"
|
|
1396
1847
|
defaultshowremainingtime="${(u=i.defaultShowRemainingTime)!=null?u:!1}"
|
|
1397
|
-
defaultduration="${(
|
|
1398
|
-
hideduration="${(
|
|
1399
|
-
title="${(
|
|
1400
|
-
exportparts="${
|
|
1848
|
+
defaultduration="${(c=i.defaultDuration)!=null?c:!1}"
|
|
1849
|
+
hideduration="${(f=i.hideDuration)!=null?f:!1}"
|
|
1850
|
+
title="${(E=i.title)!=null?E:!1}"
|
|
1851
|
+
exportparts="${f0}"
|
|
1401
1852
|
>
|
|
1402
1853
|
<mux-video
|
|
1403
1854
|
slot="media"
|
|
1404
|
-
target-live-window="${(
|
|
1405
|
-
stream-type="${(
|
|
1406
|
-
crossorigin="${(
|
|
1855
|
+
target-live-window="${(v=i.targetLiveWindow)!=null?v:!1}"
|
|
1856
|
+
stream-type="${(b=Ar(i.streamType))!=null?b:!1}"
|
|
1857
|
+
crossorigin="${(w=i.crossOrigin)!=null?w:""}"
|
|
1407
1858
|
playsinline
|
|
1408
|
-
autoplay="${(
|
|
1409
|
-
muted="${(
|
|
1410
|
-
loop="${(
|
|
1411
|
-
preload="${(
|
|
1412
|
-
debug="${(
|
|
1413
|
-
prefer-cmcd="${(
|
|
1414
|
-
disable-cookies="${(
|
|
1415
|
-
prefer-playback="${(
|
|
1859
|
+
autoplay="${(_=i.autoplay)!=null?_:!1}"
|
|
1860
|
+
muted="${(T=i.muted)!=null?T:!1}"
|
|
1861
|
+
loop="${(D=i.loop)!=null?D:!1}"
|
|
1862
|
+
preload="${(oe=i.preload)!=null?oe:!1}"
|
|
1863
|
+
debug="${(ge=i.debug)!=null?ge:!1}"
|
|
1864
|
+
prefer-cmcd="${(Ot=i.preferCmcd)!=null?Ot:!1}"
|
|
1865
|
+
disable-cookies="${(_t=i.disableCookies)!=null?_t:!1}"
|
|
1866
|
+
prefer-playback="${(Ea=i.preferPlayback)!=null?Ea:!1}"
|
|
1416
1867
|
start-time="${i.startTime!=null?i.startTime:!1}"
|
|
1417
|
-
beacon-collection-domain="${(
|
|
1418
|
-
player-software-name="${(
|
|
1419
|
-
player-software-version="${(
|
|
1420
|
-
env-key="${(
|
|
1421
|
-
custom-domain="${(
|
|
1422
|
-
src="${i.src?i.src:i.playbackId?(0,
|
|
1423
|
-
cast-src="${i.src?i.src:i.playbackId?(0,
|
|
1868
|
+
beacon-collection-domain="${(ga=i.beaconCollectionDomain)!=null?ga:!1}"
|
|
1869
|
+
player-software-name="${(_a=i.playerSoftwareName)!=null?_a:!1}"
|
|
1870
|
+
player-software-version="${(Aa=i.playerSoftwareVersion)!=null?Aa:!1}"
|
|
1871
|
+
env-key="${(ya=i.envKey)!=null?ya:!1}"
|
|
1872
|
+
custom-domain="${(Ta=i.customDomain)!=null?Ta:!1}"
|
|
1873
|
+
src="${i.src?i.src:i.playbackId?(0,Rr.toMuxVideoURL)(i):!1}"
|
|
1874
|
+
cast-src="${i.src?i.src:i.playbackId?(0,Rr.toMuxVideoURL)(i):!1}"
|
|
1424
1875
|
exportparts="video"
|
|
1425
1876
|
>
|
|
1426
|
-
${i.storyboard?
|
|
1877
|
+
${i.storyboard?Rt`<track label="thumbnails" default kind="metadata" src="${i.storyboard}" />`:Rt``}
|
|
1427
1878
|
</mux-video>
|
|
1428
1879
|
<slot name="poster" slot="poster">
|
|
1429
1880
|
<media-poster-image
|
|
1430
1881
|
part="poster"
|
|
1431
1882
|
exportparts="poster, img"
|
|
1432
|
-
src="${i.poster===""?!1:(
|
|
1433
|
-
placeholdersrc="${(
|
|
1883
|
+
src="${i.poster===""?!1:(ka=i.poster)!=null?ka:!1}"
|
|
1884
|
+
placeholdersrc="${(Sa=i.placeholder)!=null?Sa:!1}"
|
|
1434
1885
|
></media-poster-image>
|
|
1435
1886
|
</slot>
|
|
1436
1887
|
<mxp-dialog
|
|
1437
1888
|
no-auto-hide
|
|
1438
|
-
open="${(
|
|
1889
|
+
open="${(Ia=i.isDialogOpen)!=null?Ia:!1}"
|
|
1439
1890
|
onclose="${i.onCloseErrorDialog}"
|
|
1440
1891
|
oninitfocus="${i.onInitFocusDialog}"
|
|
1441
1892
|
>
|
|
1442
|
-
${(
|
|
1893
|
+
${(Ca=i.dialog)!=null&&Ca.title?Rt`<h3>${i.dialog.title}</h3>`:Rt``}
|
|
1443
1894
|
<p>
|
|
1444
|
-
${(
|
|
1445
|
-
${(
|
|
1895
|
+
${(La=i.dialog)==null?void 0:La.message}
|
|
1896
|
+
${(Br=i.dialog)!=null&&Br.linkUrl?Rt`<a
|
|
1446
1897
|
href="${i.dialog.linkUrl}"
|
|
1447
1898
|
target="_blank"
|
|
1448
1899
|
rel="external noopener"
|
|
1449
|
-
aria-label="${(
|
|
1450
|
-
>${(
|
|
1451
|
-
>`:
|
|
1900
|
+
aria-label="${(At=i.dialog.linkText)!=null?At:""} ${C("(opens in a new window)")}"
|
|
1901
|
+
>${(Ma=i.dialog.linkText)!=null?Ma:i.dialog.linkUrl}</a
|
|
1902
|
+
>`:Rt``}
|
|
1452
1903
|
</p>
|
|
1453
1904
|
</mxp-dialog>
|
|
1454
1905
|
</media-theme>
|
|
1455
|
-
`};var
|
|
1906
|
+
`};var xr=require("@mux/mux-video");function Lo(i,e,t,a,r){var d,u,c;let n={},o={};switch(i.code){case xr.MediaError.MEDIA_ERR_NETWORK:{switch(n.title=C("Network Error",r),n.message=i.message,(d=i.data)==null?void 0:d.response.code){case 412:{n.title=C("Video is not currently available",r),n.message=C("The live stream or video file are not yet ready.",r),o.message=C("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),o.file="412-not-playable.md";break}case 404:{n.title=C("Video does not exist",r),n.message="",o.message=C("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),o.file="404-not-found.md";break}case 403:{if(n.title=C("Invalid playback URL",r),n.message=C("The video URL or playback-token are formatted with incorrect or incomplete information.",r),o.message=C("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",r),o.file="missing-signed-tokens.md",!a)break;let{exp:f,aud:E,sub:v}=qt(a),b=Date.now()>f*1e3,w=v!==t,_=E!=="v",T={timeStyle:"medium",dateStyle:"medium"};if(b){n.title=C("Video URL has expired",r),n.message=C("The video\u2019s secured playback-token has expired.",r),o.message=C("The video\u2019s secured playback-token has expired.",r),o.context=C("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat(Ti.code,T).format(f*1e3),currentDate:new Intl.DateTimeFormat(Ti.code,T).format(Date.now())}),o.file="403-expired-token.md";break}if(w){n.title=C("Video URL is formatted incorrectly",r),n.message=C("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),o.message=C("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),o.context=C("Specified playback ID: {playbackId} and the playback ID encoded in the playback-token: {tokenPlaybackId}",r).format({playbackId:t,tokenPlaybackId:v}),o.file="403-playback-id-mismatch.md";break}if(_){n.title=C("Video URL is formatted incorrectly",r),n.message=C("The playback-token is formatted with incorrect information.",r),o.message=C("The playback-token is formatted with incorrect information.",r),o.context=C("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",r).format({tokenType:E}),o.file="403-incorrect-aud-value.md";break}o.message=C("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",r),o.file="403-malformatted-token.md";break}}break}case xr.MediaError.MEDIA_ERR_DECODE:{let{message:f}=i;n={title:C("Media Error",r),message:f},o.file="media-decode-error.md";break}case xr.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:{let f=(c=(u=i.data)==null?void 0:u.response)==null?void 0:c.code;if(f>=400&&f<500){i.code=xr.MediaError.MEDIA_ERR_NETWORK,i.data={response:{code:f}},{dialog:n,devlog:o}=Lo(i,e,t,a);break}n={title:C("Source Not Supported",r),message:i.message},o.file="media-src-not-supported.md";break}default:n={title:C("Error",r),message:i.message};break}return e&&(n={title:C("Your device appears to be offline",r),message:C("Check your internet connection and try reloading this video.",r)}),{dialog:n,devlog:o}}var qp=`<template id="media-theme-gerwig">
|
|
1456
1907
|
<style>
|
|
1457
1908
|
@keyframes pre-play-hide {
|
|
1458
1909
|
0% {
|
|
@@ -1480,10 +1931,6 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
1480
1931
|
--media-control-background: var(--_secondary-color);
|
|
1481
1932
|
--media-control-hover-background: var(--_accent-color);
|
|
1482
1933
|
--media-time-buffered-color: rgba(255, 255, 255, 0.4);
|
|
1483
|
-
--media-preview-thumbnail-border: 0;
|
|
1484
|
-
--media-preview-thumbnail-border-radius: 2px 2px 0 0;
|
|
1485
|
-
--media-preview-time-border-radius: 0 0 2px 2px;
|
|
1486
|
-
--media-preview-time-margin: 0 0 8px;
|
|
1487
1934
|
--media-preview-time-text-shadow: none;
|
|
1488
1935
|
--media-control-height: 14px;
|
|
1489
1936
|
--media-control-padding: 6px;
|
|
@@ -1496,8 +1943,6 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
1496
1943
|
|
|
1497
1944
|
:host([audio]) {
|
|
1498
1945
|
--_secondary-color: var(--media-secondary-color, black);
|
|
1499
|
-
--media-preview-time-border-radius: 3px;
|
|
1500
|
-
--media-preview-time-margin: 0 0 5px;
|
|
1501
1946
|
--media-preview-time-text-shadow: none;
|
|
1502
1947
|
}
|
|
1503
1948
|
|
|
@@ -1536,6 +1981,8 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
1536
1981
|
}
|
|
1537
1982
|
|
|
1538
1983
|
media-time-range {
|
|
1984
|
+
--media-box-padding-left: 6px;
|
|
1985
|
+
--media-box-padding-right: 6px;
|
|
1539
1986
|
--media-range-bar-color: var(--_accent-color);
|
|
1540
1987
|
--media-time-range-buffered-color: var(--_primary-color);
|
|
1541
1988
|
--media-range-track-color: transparent;
|
|
@@ -1552,41 +1999,27 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
1552
1999
|
--media-range-thumb-transform: scale(0);
|
|
1553
2000
|
--media-range-thumb-transition: transform 0.3s;
|
|
1554
2001
|
--media-range-thumb-opacity: 1;
|
|
1555
|
-
--media-preview-
|
|
2002
|
+
--media-preview-background: var(--_primary-color);
|
|
2003
|
+
--media-box-arrow-background: var(--_primary-color);
|
|
1556
2004
|
--media-preview-thumbnail-border: 5px solid var(--_primary-color);
|
|
1557
|
-
--media-preview-
|
|
1558
|
-
--media-preview-time-background: var(--_primary-color);
|
|
1559
|
-
--media-preview-time-border-radius: 0 0 5px 5px;
|
|
1560
|
-
--media-preview-time-margin: 0 0 10px;
|
|
1561
|
-
--media-preview-time-padding: 2px 0 6px;
|
|
2005
|
+
--media-preview-border-radius: 5px;
|
|
1562
2006
|
--media-text-color: var(--_text-color);
|
|
1563
|
-
--media-preview-thumbnail-max-width: 150px;
|
|
1564
|
-
--media-range-track-pointer-border-right: 2px solid #000;
|
|
1565
2007
|
--media-control-hover-background: transparent;
|
|
1566
2008
|
color: var(--_accent-color);
|
|
1567
2009
|
padding: 0 6px;
|
|
1568
2010
|
}
|
|
1569
2011
|
|
|
1570
2012
|
:host([audio]) media-time-range {
|
|
1571
|
-
--media-preview-time-
|
|
1572
|
-
--media-preview-
|
|
2013
|
+
--media-preview-time-padding: 1.5px 6px;
|
|
2014
|
+
--media-preview-box-margin: 0 0 -5px;
|
|
1573
2015
|
}
|
|
1574
2016
|
|
|
1575
2017
|
media-time-range:hover {
|
|
1576
2018
|
--media-range-thumb-transform: scale(1);
|
|
1577
2019
|
}
|
|
1578
2020
|
|
|
1579
|
-
media-
|
|
1580
|
-
|
|
1581
|
-
content: '';
|
|
1582
|
-
width: 0;
|
|
1583
|
-
height: 0;
|
|
1584
|
-
border-style: solid;
|
|
1585
|
-
border-width: 10px 8.5px 0 8.5px;
|
|
1586
|
-
border-color: var(--_primary-color) transparent transparent transparent;
|
|
1587
|
-
top: 100%;
|
|
1588
|
-
left: 50%;
|
|
1589
|
-
transform: translate(-50%, -10px);
|
|
2021
|
+
media-preview-thumbnail {
|
|
2022
|
+
border-bottom-width: 0;
|
|
1590
2023
|
}
|
|
1591
2024
|
|
|
1592
2025
|
[part~='listbox'] {
|
|
@@ -1677,12 +2110,20 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
1677
2110
|
pointer-events: none;
|
|
1678
2111
|
}
|
|
1679
2112
|
|
|
2113
|
+
media-control-bar {
|
|
2114
|
+
--gradient-steps: hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.013) 8.1%, hsl(0 0% 0% / 0.049) 15.5%,
|
|
2115
|
+
hsl(0 0% 0% / 0.104) 22.5%, hsl(0 0% 0% / 0.175) 29%, hsl(0 0% 0% / 0.259) 35.3%, hsl(0 0% 0% / 0.352) 41.2%,
|
|
2116
|
+
hsl(0 0% 0% / 0.45) 47.1%, hsl(0 0% 0% / 0.55) 52.9%, hsl(0 0% 0% / 0.648) 58.8%, hsl(0 0% 0% / 0.741) 64.7%,
|
|
2117
|
+
hsl(0 0% 0% / 0.825) 71%, hsl(0 0% 0% / 0.896) 77.5%, hsl(0 0% 0% / 0.951) 84.5%, hsl(0 0% 0% / 0.987) 91.9%,
|
|
2118
|
+
hsl(0 0% 0%) 100%;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
1680
2121
|
:host([title]:not([audio])) media-control-bar[slot='top-chrome']::before {
|
|
1681
2122
|
content: '';
|
|
1682
2123
|
position: absolute;
|
|
1683
2124
|
width: 100%;
|
|
1684
2125
|
padding-bottom: min(100px, 25%);
|
|
1685
|
-
background: linear-gradient(
|
|
2126
|
+
background: linear-gradient(to top, var(--gradient-steps));
|
|
1686
2127
|
opacity: 0.8;
|
|
1687
2128
|
pointer-events: none;
|
|
1688
2129
|
}
|
|
@@ -1694,7 +2135,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
1694
2135
|
bottom: 0;
|
|
1695
2136
|
left: 0;
|
|
1696
2137
|
padding-bottom: min(100px, 25%);
|
|
1697
|
-
background: linear-gradient(
|
|
2138
|
+
background: linear-gradient(to bottom, var(--gradient-steps));
|
|
1698
2139
|
opacity: 0.8;
|
|
1699
2140
|
z-index: 1;
|
|
1700
2141
|
pointer-events: none;
|
|
@@ -1844,7 +2285,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
1844
2285
|
}
|
|
1845
2286
|
|
|
1846
2287
|
/* Intentionally don't target the div for transition but the children
|
|
1847
|
-
|
|
2288
|
+
of the div. Prevents messing with media-chrome's autohide feature. */
|
|
1848
2289
|
media-loading-indicator + div * {
|
|
1849
2290
|
transition: opacity 0.15s;
|
|
1850
2291
|
opacity: 1;
|
|
@@ -2241,7 +2682,12 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
2241
2682
|
</template>
|
|
2242
2683
|
|
|
2243
2684
|
<template partial="TimeRange">
|
|
2244
|
-
<media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}"
|
|
2685
|
+
<media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
2686
|
+
<media-preview-thumbnail slot="preview"></media-preview-thumbnail>
|
|
2687
|
+
<media-preview-chapter-display slot="preview"></media-preview-chapter-display>
|
|
2688
|
+
<media-preview-time-display slot="preview"></media-preview-time-display>
|
|
2689
|
+
<div slot="preview" part="arrow"></div>
|
|
2690
|
+
</media-time-range>
|
|
2245
2691
|
</template>
|
|
2246
2692
|
|
|
2247
2693
|
<template partial="AudioTrackSelect">
|
|
@@ -2331,6 +2777,8 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
2331
2777
|
noautoseektolive="{{noautoseektolive}}"
|
|
2332
2778
|
defaultsubtitles="{{defaultsubtitles}}"
|
|
2333
2779
|
defaultduration="{{defaultduration ?? false}}"
|
|
2780
|
+
keyboardforwardseekoffset="{{forwardseekoffset}}"
|
|
2781
|
+
keyboardbackwardseekoffset="{{backwardseekoffset}}"
|
|
2334
2782
|
exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
|
|
2335
2783
|
style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}"
|
|
2336
2784
|
>
|
|
@@ -2446,5 +2894,5 @@ media-poster-image:not([src]):not([placeholdersrc]) {
|
|
|
2446
2894
|
<slot></slot>
|
|
2447
2895
|
</media-controller>
|
|
2448
2896
|
</template>
|
|
2449
|
-
`;var Bs=le.createElement("template");"innerHTML"in Bs&&(Bs.innerHTML=Ku);var Yu,Gu,In=class extends Et{};In.template=(Gu=(Yu=Bs.content)==null?void 0:Yu.children)==null?void 0:Gu[0];U.customElements.get("media-theme-gerwig")||U.customElements.define("media-theme-gerwig",In);var Sh="gerwig";var je={SRC:"src",POSTER:"poster"},E={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"},Hs=["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(E.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(E.NOHOTKEYS),hotKeys:i.getAttribute(E.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:ra(i.getAttribute(g.Attributes.STREAM_TYPE)),primaryColor:i.getAttribute(E.PRIMARY_COLOR),secondaryColor:i.getAttribute(E.SECONDARY_COLOR),accentColor:i.getAttribute(E.ACCENT_COLOR),forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultDuration:i.defaultDuration,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:Lh(i),playbackRates:i.getAttribute(E.PLAYBACK_RATES),customDomain:(a=i.getAttribute(g.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,title:i.getAttribute(E.TITLE),novolumepref:i.hasAttribute(E.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 Lh(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 qu(i){let e=i.hasAttribute(E.TITLE)?{video_title:i.getAttribute(E.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 Rh=Object.values(g.Attributes),wh=Object.values(je),xh=Object.values(E),Dh=hn(),Oh="mux-player",Zu={dialog:void 0,isDialogOpen:!1},Nh={redundant_streams:!0},va,fa,ft,ga,Kt,et,$t,kn,Qu,Aa,Vs,gt,Ii,Sn,zu,Cn,Xu,Mn,Ju,Ln,ju,Ea=class extends Ss{constructor(){super();K(this,et);K(this,kn);K(this,Aa);K(this,gt);K(this,Sn);K(this,Cn);K(this,Mn);K(this,Ln);K(this,va,!1);K(this,fa,{});K(this,ft,!0);K(this,ga,new mn(this,"hotkeys"));K(this,Kt,{...Zu,onCloseErrorDialog:()=>Y(this,Aa,Vs).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:t=>{Ts(this,le.activeElement)||t.preventDefault()}});this.attachShadow({mode:"open"}),Y(this,kn,Qu).call(this),this.isConnected&&Y(this,et,$t).call(this)}static get observedAttributes(){var t;return[...(t=Ss.observedAttributes)!=null?t:[],...wh,...Rh,...xh]}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=qu(this))}attributeChangedCallback(t,a,r){switch(Y(this,et,$t).call(this),super.attributeChangedCallback(t,a,r),t){case E.HOTKEYS:S(this,ga).value=r;break;case E.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&mt(T("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case E.THUMBNAIL_TOKEN:{let{aud:s}=ct(r);r&&s!=="t"&&mt(T("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case E.STORYBOARD_TOKEN:{let{aud:s}=ct(r);r&&s!=="s"&&mt(T("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")&&ve(T("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&&![H.StreamTypes.LIVE,H.StreamTypes.ON_DEMAND,H.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:Is({file:"invalid-stream-type.md",message:T("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):r===H.StreamTypes.LIVE?this.getAttribute(E.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN}[g.Attributes.PLAYBACK_ID,je.SRC,E.PLAYBACK_TOKEN].includes(t)&&a!==r&&me(this,Kt,{...S(this,Kt),...Zu}),Y(this,gt,Ii).call(this,{[Eu(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?H.CmcdTypeValues.includes(t)?this.setAttribute(g.Attributes.PREFER_CMCD,t):mt(`Invalid value for preferCmcd. Must be one of ${H.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(E.THEME))!=null?t:Sh}set theme(t){this.setAttribute(E.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let a={};for(let r of t.getAttributeNames()){if(Hs.includes(r))continue;let n=t.getAttribute(r);a[un(r)]=n===""?!0:n}return a}set themeProps(t){var r,n;Y(this,et,$t).call(this);let a={...this.themeProps,...t};for(let s in a){if(Hs.includes(s))continue;let d=t==null?void 0:t[s];typeof d=="boolean"||d==null?(r=this.mediaTheme)==null||r.toggleAttribute(dn(s),!!d):(n=this.mediaTheme)==null||n.setAttribute(dn(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=Ft(this,je.SRC))!=null?t:void 0:(a=this.getAttribute(je.SRC))!=null?a:void 0}set src(t){t?this.setAttribute(je.SRC,t):this.removeAttribute(je.SRC)}get poster(){var a;let t=this.getAttribute(je.POSTER);if(t!=null)return t;if(this.playbackId&&!this.audio)return pu(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(a=this.thumbnailTime)!=null?a:this.startTime,token:this.tokens.thumbnail})}set poster(t){t||t===""?this.setAttribute(je.POSTER,t):this.removeAttribute(je.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(E.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(E.STORYBOARD_SRC,t):this.removeAttribute(E.STORYBOARD_SRC)}get storyboard(){if(this.storyboardSrc&&!this.tokens.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[H.StreamTypes.LIVE,H.StreamTypes.UNKNOWN].includes(this.streamType)))return bu(this.playbackId,{customDomain:this.customDomain,token:this.tokens.storyboard})}get audio(){return this.hasAttribute(E.AUDIO)}set audio(t){if(!t){this.removeAttribute(E.AUDIO);return}this.setAttribute(E.AUDIO,"")}get hotkeys(){return S(this,ga)}get nohotkeys(){return this.hasAttribute(E.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(E.NOHOTKEYS);return}this.setAttribute(E.NOHOTKEYS,"")}get thumbnailTime(){return Ye(this.getAttribute(E.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(E.THUMBNAIL_TIME,`${t}`)}get title(){var t;return(t=this.getAttribute(E.TITLE))!=null?t:""}set title(t){t!==this.title&&(t?this.setAttribute(E.TITLE,t):this.removeAttribute("title"),super.title=t)}get placeholder(){var t;return(t=Ft(this,E.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(E.PLACEHOLDER,`${t}`)}get primaryColor(){var a,r;let t=this.getAttribute(E.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(E.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var a,r;let t=this.getAttribute(E.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(E.SECONDARY_COLOR,`${t}`)}get accentColor(){var a,r;let t=this.getAttribute(E.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(E.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(E.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(E.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(E.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(E.PLAYBACK_RATES))return this.getAttribute(E.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(E.PLAYBACK_RATES);return}this.setAttribute(E.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=Ye(this.getAttribute(E.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(E.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=Ye(this.getAttribute(E.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(E.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(E.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(E.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(E.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return Ye(this.getAttribute(E.DEFAULT_DURATION))}set defaultDuration(t){t==null?this.removeAttribute(E.DEFAULT_DURATION):this.setAttribute(E.DEFAULT_DURATION,`${t}`)}get playerSoftwareName(){var t;return(t=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_NAME))!=null?t:Oh}get playerSoftwareVersion(){var t;return(t=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_VERSION))!=null?t:Dh}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(E.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(E.EXTRA_SOURCE_PARAMS)).entries()].reduce((t,[a,r])=>(t[a]=r,t),{}):Nh}set extraSourceParams(t){t==null?this.removeAttribute(E.EXTRA_SOURCE_PARAMS):this.setAttribute(E.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=Ft(this,g.Attributes.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(g.Attributes.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(E.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(E.NO_VOLUME_PREF,""):this.removeAttribute(E.NO_VOLUME_PREF)}get debug(){return Ft(this,g.Attributes.DEBUG)!=null}set debug(t){t?this.setAttribute(g.Attributes.DEBUG,""):this.removeAttribute(g.Attributes.DEBUG)}get disableCookies(){return Ft(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:H.StreamTypes.UNKNOWN}set streamType(t){this.setAttribute(g.Attributes.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,a,r;return(r=(a=this.getAttribute(E.DEFAULT_STREAM_TYPE))!=null?a:(t=this.mediaController)==null?void 0:t.getAttribute(E.DEFAULT_STREAM_TYPE))!=null?r:H.StreamTypes.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(E.DEFAULT_STREAM_TYPE,t):this.removeAttribute(E.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,a;return this.hasAttribute(E.TARGET_LIVE_WINDOW)?+this.getAttribute(E.TARGET_LIVE_WINDOW):(a=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(t){t==this.targetLiveWindow||Number.isNaN(t)&&Number.isNaN(this.targetLiveWindow)||(t==null?this.removeAttribute(E.TARGET_LIVE_WINDOW):this.setAttribute(E.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return Ye(Ft(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===H.PlaybackTypes.MSE||t===H.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===H.PlaybackTypes.MSE||t===H.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(Y(this,et,$t).call(this),!this.media){ve("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...qu(this),...t}}get _hlsConfig(){var t;return(t=this.media)==null?void 0:t._hlsConfig}set _hlsConfig(t){if(Y(this,et,$t).call(this),!this.media){ve("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(Y(this,et,$t).call(this),!this.media){ve("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(E.PLAYBACK_TOKEN),a=this.getAttribute(E.THUMBNAIL_TOKEN),r=this.getAttribute(E.STORYBOARD_TOKEN);return{...S(this,fa),...t!=null?{playback:t}:{},...a!=null?{thumbnail:a}:{},...r!=null?{storyboard:r}:{}}}set tokens(t){me(this,fa,t!=null?t:{})}get playbackToken(){var t;return(t=this.getAttribute(E.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(E.PLAYBACK_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(E.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(E.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(E.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(E.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,a,r,n){var d;let s=(d=this.media)==null?void 0:d.nativeEl;if(s)return(0,H.addTextTrack)(s,t,a,r,n)}removeTextTrack(t){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(a)return(0,H.removeTextTrack)(a,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}};va=new WeakMap,fa=new WeakMap,ft=new WeakMap,ga=new WeakMap,Kt=new WeakMap,et=new WeakSet,$t=function(){var t,a,r;if(!S(this,va)){me(this,va,!0),Y(this,gt,Ii).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof U.HTMLElement))throw""}catch{ve("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof g.default))throw""}catch{ve("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof io))throw""}catch{ve("<media-controller> failed to upgrade!")}_u(this),Y(this,Sn,zu).call(this),Y(this,Cn,Xu).call(this),Y(this,Mn,Ju).call(this),me(this,ft,(a=(t=this.mediaController)==null?void 0:t.hasAttribute(k.USER_INACTIVE))!=null?a:!0),Y(this,Ln,ju).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>{Y(this,gt,Ii).call(this)})}},kn=new WeakSet,Qu=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,Vs=function(t){Object.assign(S(this,Kt),t),Y(this,gt,Ii).call(this)},gt=new WeakSet,Ii=function(t={}){$u(Fu(Ch(this,{...S(this,Kt),...t})),this.shadowRoot)},Sn=new WeakSet,zu=function(){let t=r=>{var d,u;if(!(r!=null&&r.startsWith("theme-")))return;let n=r.replace(/^theme-/,"");if(Hs.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)},Cn=new WeakSet,Xu=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)){mt(n),n.data&&mt(`${n.name} data:`,n.data);return}let{dialog:s,devlog:d}=Tn(n,!window.navigator.onLine,this.playbackId,this.playbackToken);d.message&&Is(d),ve(n),n.data&&ve(`${n.name} data:`,n.data),Y(this,Aa,Vs).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}=Tn((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:m}=(d=(s=this.media)==null?void 0:s.error)!=null?d:{};n=new g.MediaError(u,m)}n!=null&&n.fatal&&this.dispatchEvent(new CustomEvent("error",{detail:n}))})},Mn=new WeakSet,Ju=function(){var a,r,n,s;let t=()=>Y(this,gt,Ii).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)},Ln=new WeakSet,ju=function(){var m,h;if(!/Firefox/i.test(navigator.userAgent))return;let a,r=new WeakMap,n=()=>this.streamType===H.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,s=(p,b,_=!1)=>{if(n())return;Array.from(p&&p.activeCues||[]).forEach(I=>{if(!(!I.snapToLines||I.line<-5||I.line>=0&&I.line<10))if(!b||this.paused){let V=I.text.split(`
|
|
2450
|
-
`).length,
|
|
2897
|
+
`;var Gu=ye.createElement("template");"innerHTML"in Gu&&(Gu.innerHTML=qp);var Zp,Qp,Mo=class extends Jt{};Mo.template=(Qp=(Zp=Gu.content)==null?void 0:Zp.children)==null?void 0:Qp[0];Z.customElements.get("media-theme-gerwig")||Z.customElements.define("media-theme-gerwig",Mo);var g0="gerwig";var xt={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",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"},qu=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function _0(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:A0(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(A.Attributes.TARGET_LIVE_WINDOW),streamType:Ar(i.getAttribute(A.Attributes.STREAM_TYPE)),primaryColor:i.getAttribute(p.PRIMARY_COLOR),secondaryColor:i.getAttribute(p.SECONDARY_COLOR),accentColor:i.getAttribute(p.ACCENT_COLOR),forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultDuration:i.defaultDuration,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:y0(i),playbackRates:i.getAttribute(p.PLAYBACK_RATES),customDomain:(a=i.getAttribute(A.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,title:i.getAttribute(p.TITLE),novolumepref:i.hasAttribute(p.NO_VOLUME_PREF),...e,extraSourceParams:i.extraSourceParams}}function A0(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=Z.customElements.get(e);if(n!=null&&n.template)return n.template}}function y0(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 zp(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 T0=Object.values(A.Attributes),k0=Object.values(xt),S0=Object.values(p),I0=Eo(),C0="mux-player",Xp={dialog:void 0,isDialogOpen:!1},L0={redundant_streams:!0},Or,Pr,ei,Nr,Oi,Dt,xi,wo,Jp,Ur,Zu,ti,ba,Ro,jp,xo,ev,Do,tv,Oo,iv,Dr=class extends Ou{constructor(){super();ee(this,Dt);ee(this,wo);ee(this,Ur);ee(this,ti);ee(this,Ro);ee(this,xo);ee(this,Do);ee(this,Oo);ee(this,Or,!1);ee(this,Pr,{});ee(this,ei,!0);ee(this,Nr,new bo(this,"hotkeys"));ee(this,Oi,{...Xp,onCloseErrorDialog:()=>te(this,Ur,Zu).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:t=>{Ru(this,ye.activeElement)||t.preventDefault()}});this.attachShadow({mode:"open"}),te(this,wo,Jp).call(this),this.isConnected&&te(this,Dt,xi).call(this)}static get observedAttributes(){var t;return[...(t=Ou.observedAttributes)!=null?t:[],...k0,...T0,...S0]}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=zp(this))}attributeChangedCallback(t,a,r){switch(te(this,Dt,xi).call(this),super.attributeChangedCallback(t,a,r),t){case p.HOTKEYS:O(this,Nr).value=r;break;case p.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&Zt(C("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case p.THUMBNAIL_TOKEN:{let{aud:o}=qt(r);r&&o!=="t"&&Zt(C("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:o}));break}case p.STORYBOARD_TOKEN:{let{aud:o}=qt(r);r&&o!=="s"&&Zt(C("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:o}));break}case A.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&Oe(C("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case A.Attributes.STREAM_TYPE:r&&![z.StreamTypes.LIVE,z.StreamTypes.ON_DEMAND,z.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:xu({file:"invalid-stream-type.md",message:C("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):r===z.StreamTypes.LIVE?this.getAttribute(p.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN}[A.Attributes.PLAYBACK_ID,xt.SRC,p.PLAYBACK_TOKEN].includes(t)&&a!==r&&Ce(this,Oi,{...O(this,Oi),...Xp}),te(this,ti,ba).call(this,{[gp(t)]:r})}get preferCmcd(){var t;return(t=this.getAttribute(A.Attributes.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?z.CmcdTypeValues.includes(t)?this.setAttribute(A.Attributes.PREFER_CMCD,t):Zt(`Invalid value for preferCmcd. Must be one of ${z.CmcdTypeValues.join()}`):this.removeAttribute(A.Attributes.PREFER_CMCD))}get hasPlayed(){var t,a;return(a=(t=this.mediaController)==null?void 0:t.hasAttribute(s.MEDIA_HAS_PLAYED))!=null?a:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute(s.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:g0}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(qu.includes(r))continue;let n=t.getAttribute(r);a[vo(r)]=n===""?!0:n}return a}set themeProps(t){var r,n;te(this,Dt,xi).call(this);let a={...this.themeProps,...t};for(let o in a){if(qu.includes(o))continue;let d=t==null?void 0:t[o];typeof d=="boolean"||d==null?(r=this.mediaTheme)==null||r.toggleAttribute(po(o),!!d):(n=this.mediaTheme)==null||n.setAttribute(po(o),d)}}get playbackId(){var t;return(t=this.getAttribute(A.Attributes.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(A.Attributes.PLAYBACK_ID,t):this.removeAttribute(A.Attributes.PLAYBACK_ID)}get src(){var t,a;return this.playbackId?(t=Di(this,xt.SRC))!=null?t:void 0:(a=this.getAttribute(xt.SRC))!=null?a:void 0}set src(t){t?this.setAttribute(xt.SRC,t):this.removeAttribute(xt.SRC)}get poster(){var a;let t=this.getAttribute(xt.POSTER);if(t!=null)return t;if(this.playbackId&&!this.audio)return bp(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(a=this.thumbnailTime)!=null?a:this.startTime,token:this.tokens.thumbnail})}set poster(t){t||t===""?this.setAttribute(xt.POSTER,t):this.removeAttribute(xt.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||[z.StreamTypes.LIVE,z.StreamTypes.UNKNOWN].includes(this.streamType)))return Ep(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 O(this,Nr)}get nohotkeys(){return this.hasAttribute(p.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(p.NOHOTKEYS);return}this.setAttribute(p.NOHOTKEYS,"")}get thumbnailTime(){return Et(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=Di(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=Z.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=Z.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=Z.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=Et(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=Et(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 defaultDuration(){return Et(this.getAttribute(p.DEFAULT_DURATION))}set defaultDuration(t){t==null?this.removeAttribute(p.DEFAULT_DURATION):this.setAttribute(p.DEFAULT_DURATION,`${t}`)}get playerSoftwareName(){var t;return(t=this.getAttribute(A.Attributes.PLAYER_SOFTWARE_NAME))!=null?t:C0}get playerSoftwareVersion(){var t;return(t=this.getAttribute(A.Attributes.PLAYER_SOFTWARE_VERSION))!=null?t:I0}get beaconCollectionDomain(){var t;return(t=this.getAttribute(A.Attributes.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(A.Attributes.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(A.Attributes.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(A.Attributes.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(A.Attributes.MAX_RESOLUTION,t):this.removeAttribute(A.Attributes.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(A.Attributes.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(A.Attributes.MIN_RESOLUTION,t):this.removeAttribute(A.Attributes.MIN_RESOLUTION))}get renditionOrder(){var t;return(t=this.getAttribute(A.Attributes.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(A.Attributes.RENDITION_ORDER,t):this.removeAttribute(A.Attributes.RENDITION_ORDER))}get extraSourceParams(){return this.hasAttribute(p.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(p.EXTRA_SOURCE_PARAMS)).entries()].reduce((t,[a,r])=>(t[a]=r,t),{}):L0}set extraSourceParams(t){t==null?this.removeAttribute(p.EXTRA_SOURCE_PARAMS):this.setAttribute(p.EXTRA_SOURCE_PARAMS,new URLSearchParams(t).toString())}get customDomain(){var t;return(t=this.getAttribute(A.Attributes.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(A.Attributes.CUSTOM_DOMAIN,t):this.removeAttribute(A.Attributes.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Di(this,A.Attributes.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(A.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 Di(this,A.Attributes.DEBUG)!=null}set debug(t){t?this.setAttribute(A.Attributes.DEBUG,""):this.removeAttribute(A.Attributes.DEBUG)}get disableCookies(){return Di(this,A.Attributes.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(A.Attributes.DISABLE_COOKIES,""):this.removeAttribute(A.Attributes.DISABLE_COOKIES)}get streamType(){var t,a,r;return(r=(a=this.getAttribute(A.Attributes.STREAM_TYPE))!=null?a:(t=this.media)==null?void 0:t.streamType)!=null?r:z.StreamTypes.UNKNOWN}set streamType(t){this.setAttribute(A.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:z.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||Number.isNaN(t)&&Number.isNaN(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 Et(Di(this,A.Attributes.START_TIME))}set startTime(t){this.setAttribute(A.Attributes.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(A.Attributes.PREFER_PLAYBACK);if(t===z.PlaybackTypes.MSE||t===z.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===z.PlaybackTypes.MSE||t===z.PlaybackTypes.NATIVE?this.setAttribute(A.Attributes.PREFER_PLAYBACK,t):this.removeAttribute(A.Attributes.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(te(this,Dt,xi).call(this),!this.media){Oe("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...zp(this),...t}}get _hlsConfig(){var t;return(t=this.media)==null?void 0:t._hlsConfig}set _hlsConfig(t){if(te(this,Dt,xi).call(this),!this.media){Oe("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(te(this,Dt,xi).call(this),!this.media){Oe("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{...O(this,Pr),...t!=null?{playback:t}:{},...a!=null?{thumbnail:a}:{},...r!=null?{storyboard:r}:{}}}set tokens(t){Ce(this,Pr,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 o=(d=this.media)==null?void 0:d.nativeEl;if(o)return(0,z.addTextTrack)(o,t,a,r,n)}removeTextTrack(t){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(a)return(0,z.removeTextTrack)(a,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}};Or=new WeakMap,Pr=new WeakMap,ei=new WeakMap,Nr=new WeakMap,Oi=new WeakMap,Dt=new WeakSet,xi=function(){var t,a,r;if(!O(this,Or)){Ce(this,Or,!0),te(this,ti,ba).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof Z.HTMLElement))throw""}catch{Oe("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof A.default))throw""}catch{Oe("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof sl))throw""}catch{Oe("<media-controller> failed to upgrade!")}kp(this),te(this,Ro,jp).call(this),te(this,xo,ev).call(this),te(this,Do,tv).call(this),Ce(this,ei,(a=(t=this.mediaController)==null?void 0:t.hasAttribute(M.USER_INACTIVE))!=null?a:!0),te(this,Oo,iv).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>{te(this,ti,ba).call(this)})}},wo=new WeakSet,Jp=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{}},Ur=new WeakSet,Zu=function(t){Object.assign(O(this,Oi),t),te(this,ti,ba).call(this)},ti=new WeakSet,ba=function(t={}){Yp(Gp(_0(this,{...O(this,Oi),...t})),this.shadowRoot)},Ro=new WeakSet,jp=function(){let t=r=>{var d,u;if(!(r!=null&&r.startsWith("theme-")))return;let n=r.replace(/^theme-/,"");if(qu.includes(n))return;let o=this.getAttribute(r);o!=null?(d=this.mediaTheme)==null||d.setAttribute(n,o):(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)},xo=new WeakSet,ev=function(){var a;let t=r=>{let{detail:n}=r;if(n instanceof A.MediaError||(n=new A.MediaError(n.message,n.code,n.fatal)),!(n!=null&&n.fatal)){Zt(n),n.data&&Zt(`${n.name} data:`,n.data);return}let{dialog:o,devlog:d}=Lo(n,!window.navigator.onLine,this.playbackId,this.playbackToken);d.message&&xu(d),Oe(n),n.data&&Oe(`${n.name} data:`,n.data),te(this,Ur,Zu).call(this,{isDialogOpen:!0,dialog:o})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(r={})=>{var o,d,u;if(!(((o=this.media)==null?void 0:o.error)instanceof A.MediaError))return r;let{devlog:n}=Lo((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 o,d;let{detail:n}=r;if(!n){let{message:u,code:c}=(d=(o=this.media)==null?void 0:o.error)!=null?d:{};n=new A.MediaError(u,c)}n!=null&&n.fatal&&this.dispatchEvent(new CustomEvent("error",{detail:n}))})},Do=new WeakSet,tv=function(){var a,r,n,o;let t=()=>te(this,ti,ba).call(this);(r=(a=this.media)==null?void 0:a.textTracks)==null||r.addEventListener("addtrack",t),(o=(n=this.media)==null?void 0:n.textTracks)==null||o.addEventListener("removetrack",t)},Oo=new WeakSet,iv=function(){var c,f;if(!/Firefox/i.test(navigator.userAgent))return;let a,r=new WeakMap,n=()=>this.streamType===z.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,o=(E,v,b=!1)=>{if(n())return;Array.from(E&&E.activeCues||[]).forEach(_=>{if(!(!_.snapToLines||_.line<-5||_.line>=0&&_.line<10))if(!v||this.paused){let T=_.text.split(`
|
|
2898
|
+
`).length,D=-3;this.streamType===z.StreamTypes.LIVE&&(D=-2);let oe=D-T;if(_.line===oe&&!b)return;r.has(_)||r.set(_,_.line),_.line=oe}else setTimeout(()=>{_.line=r.get(_)||"auto"},500)})},d=()=>{var E,v;o(a,(v=(E=this.mediaController)==null?void 0:E.hasAttribute(M.USER_INACTIVE))!=null?v:!1)},u=()=>{var b,w;let v=Array.from(((w=(b=this.mediaController)==null?void 0:b.media)==null?void 0:w.textTracks)||[]).filter(_=>["subtitles","captions"].includes(_.kind)&&_.mode==="showing")[0];v!==a&&(a==null||a.removeEventListener("cuechange",d)),a=v,a==null||a.addEventListener("cuechange",d),o(a,O(this,ei))};u(),(c=this.textTracks)==null||c.addEventListener("change",u),(f=this.textTracks)==null||f.addEventListener("addtrack",u),this.addEventListener("userinactivechange",()=>{var v,b;let E=(b=(v=this.mediaController)==null?void 0:v.hasAttribute(M.USER_INACTIVE))!=null?b:!0;O(this,ei)!==E&&(Ce(this,ei,E),o(a,O(this,ei)))})};function Di(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}Z.customElements.get("mux-player")||(Z.customElements.define("mux-player",Dr),Z.MuxPlayerElement=Dr);var M0=Dr;
|