@mux/mux-player 1.11.4 → 1.12.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 +433 -374
- package/dist/index.mjs +250 -239
- package/dist/mux-player.js +489 -430
- package/dist/mux-player.mjs +489 -430
- package/dist/themes/2023/index.cjs.js +1819 -0
- package/dist/themes/2023/index.js +1821 -0
- package/dist/themes/2023/index.mjs +1797 -0
- package/dist/themes/classic/index.cjs.js +1740 -0
- package/dist/themes/classic/index.js +1742 -0
- package/dist/themes/classic/index.mjs +1718 -0
- package/dist/themes/microvideo/index.cjs.js +1370 -0
- package/dist/themes/microvideo/index.js +1372 -0
- package/dist/themes/microvideo/index.mjs +1351 -0
- package/dist/themes/minimal/index.cjs.js +1273 -0
- package/dist/themes/minimal/index.js +1275 -0
- package/dist/themes/minimal/index.mjs +1254 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/themes/2023/index.d.ts +5 -0
- package/dist/types/themes/classic/index.d.ts +5 -0
- package/dist/types/video-api.d.ts +4 -0
- package/dist/types-ts3.4/index.d.ts +3 -2
- package/dist/types-ts3.4/themes/2023/index.d.ts +5 -0
- package/dist/types-ts3.4/themes/classic/index.d.ts +5 -0
- package/dist/types-ts3.4/themes/microvideo/index.d.ts +1 -0
- package/dist/types-ts3.4/themes/minimal/index.d.ts +1 -0
- package/dist/types-ts3.4/video-api.d.ts +4 -0
- package/package.json +52 -17
- /package/{themes/microvideo.js → dist/types/themes/microvideo/index.d.ts} +0 -0
- /package/{themes/minimal.js → dist/types/themes/minimal/index.d.ts} +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Fl=Object.create;var qi=Object.defineProperty;var Kl=Object.getOwnPropertyDescriptor;var Yl=Object.getOwnPropertyNames;var Gl=Object.getPrototypeOf,Zl=Object.prototype.hasOwnProperty;var ql=(i,e)=>{for(var t in e)qi(i,t,{get:e[t],enumerable:!0})},hs=(i,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Yl(e))!Zl.call(i,r)&&r!==t&&qi(i,r,{get:()=>e[r],enumerable:!(a=Kl(e,r))||a.enumerable});return i};var Ql=(i,e,t)=>(t=i!=null?Fl(Gl(i)):{},hs(e||!i||!i.__esModule?qi(t,"default",{value:i,enumerable:!0}):t,i)),zl=i=>hs(qi({},"__esModule",{value:!0}),i);var vr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var k=(i,e,t)=>(vr(i,e,"read from private field"),t?t.call(i):e.get(i)),H=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},le=(i,e,t,a)=>(vr(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t);var Y=(i,e,t)=>(vr(i,e,"access private method"),t);var uc={};ql(uc,{MediaError:()=>A.MediaError,default:()=>dc,getVideoAttribute:()=>kt});module.exports=zl(uc);var Lt=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Lt{}globalThis.DocumentFragment=i}var li=class extends Lt{},fr=class extends Lt{},Xl={get(i){},define(i,e,t){},upgrade(i){},whenDefined(i){return Promise.resolve(li)}},di,gr=class{constructor(e,t={}){H(this,di,void 0);le(this,di,t==null?void 0:t.detail)}get detail(){return k(this,di)}initCustomEvent(){}};di=new WeakMap;function Jl(i,e){return new li}var ps={document:{createElement:Jl},DocumentFragment,customElements:Xl,CustomEvent:gr,EventTarget:Lt,HTMLElement:li,HTMLVideoElement:fr},Es=typeof window=="undefined"||typeof globalThis.customElements=="undefined",F=Es?ps:globalThis,se=Es?ps.document:globalThis.document;var b={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},g={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},rt={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_PAUSED:"mediaPaused",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_ENDED:"mediaEnded",MEDIA_MUTED:"mediaMuted",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_IS_PIP:"mediaIsPip",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive"},bs=Object.entries(rt),o=bs.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{}),wt=bs.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange"}),pc=Object.entries(wt).reduce((i,[e,t])=>{let a=o[e];return a&&(i[t]=a),i},{userinactivechange:"userinactive"}),vs=Object.entries(o).reduce((i,[e,t])=>{let a=wt[e];return a&&(i[t]=a),i},{userinactive:"userinactivechange"}),Ct={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Qi={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Ar={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},Le={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},he={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var q={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:i=1}={})=>`current playback rate ${i}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading"},x={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",AIRPLAY:()=>"air play",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:i=30}={})=>`seek forward ${i} seconds`,SEEK_BACK_N_SECS:({seekOffset:i=30}={})=>`seek back ${i} seconds`,SEEK_LIVE:()=>"seek to live",PLAYING_LIVE:()=>"playing live"},ed={...q,...x};function zi(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 fs(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function gs(i){return typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i)}function Xi(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))}var Ji=i=>new Promise(e=>setTimeout(e,i));var As=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],td=(i,e)=>{let t=i===1?As[e].singular:As[e].plural;return`${i} ${t}`},nt=i=>{if(!gs(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((l,u)=>l&&td(l,u)).filter(l=>l).join(", ")}${t?" remaining":""}`};function fe(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),l=Math.floor(e/3600);return(isNaN(i)||i===1/0)&&(n=r=a="-"),n=n>0||l>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(t?"-":"")+n+r+a}var fc=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 _s=(i,e,t=".value")=>{let a=i.querySelector(t);!a||(a.textContent=e)},ad=(i,e)=>{let t=`slot[name="${e}"]`,a=i.shadowRoot.querySelector(t);return a?a.children:[]},ys=(i,e)=>ad(i,e)[0],ui=(i,e)=>!i||!e?!1:i.contains(e)?!0:ui(i,e.getRootNode().host),st=(i,e)=>{if(!i)return null;let t=i.closest(e);return t||st(i.getRootNode().host,e)};function C(i,e){var t;let a;for(a of i.querySelectorAll("style")){let r;try{r=(t=a.sheet)==null?void 0:t.cssRules}catch{continue}for(let n of r!=null?r:[])if(n.selectorText===e)return n}return a!=null&&a.sheet?(a.sheet.insertRule(`${e}{}`,a.sheet.cssRules.length),a.sheet.cssRules[a.sheet.cssRules.length-1]):{style:{setProperty:()=>{},removeProperty:()=>{}}}}function N(i,e,t=Number.NaN){let a=i.getAttribute(e);return a!=null?+a:t}function D(i,e,t){let a=+t;if(t==null||Number.isNaN(a)){i.hasAttribute(e)&&i.removeAttribute(e);return}N(i,e,void 0)!==a&&i.setAttribute(e,`${a}`)}function w(i,e){return i.hasAttribute(e)}function S(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}w(i,e)!=t&&i.toggleAttribute(e,t)}function W(i,e,t=null){var a;return(a=i.getAttribute(e))!=null?a:t}function $(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}let a=`${t}`;W(i,e,void 0)!==a&&i.setAttribute(e,a)}var ji=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},_r=class{observe(){}},Ts={ResizeObserver:_r,HTMLElement:class extends ji{},DocumentFragment:class extends ji{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},CustomEvent:function(){},getComputedStyle:function(){},requestAnimationFrame:function(i){return 1},queueMicrotask:function(i){}},rd={createElement:function(){return new Ts.HTMLElement},addEventListener(){},removeEventListener(){}},Is=typeof window=="undefined"||typeof window.customElements=="undefined",d=Is?Ts:window,c=Is?rd:window.document;var nd=Object.defineProperty,sd=(i,e,t)=>e in i?nd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,od=(i,e,t)=>(sd(i,typeof e!="symbol"?e+"":e,t),t),ks=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},de=(i,e,t)=>(ks(i,e,"read from private field"),t?t.call(i):e.get(i)),ea=(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)},ta=(i,e,t,a)=>(ks(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ge,ia,Rt,aa,Ss=c.createElement("template");Ss.innerHTML=`
|
|
1
|
+
"use strict";var Ad=Object.create;var Zi=Object.defineProperty;var _d=Object.getOwnPropertyDescriptor;var yd=Object.getOwnPropertyNames;var Td=Object.getPrototypeOf,Id=Object.prototype.hasOwnProperty;var Sd=(i,e)=>{for(var t in e)Zi(i,t,{get:e[t],enumerable:!0})},Hs=(i,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of yd(e))!Id.call(i,r)&&r!==t&&Zi(i,r,{get:()=>e[r],enumerable:!(a=_d(e,r))||a.enumerable});return i};var kd=(i,e,t)=>(t=i!=null?Ad(Td(i)):{},Hs(e||!i||!i.__esModule?Zi(t,"default",{value:i,enumerable:!0}):t,i)),Md=i=>Hs(Zi({},"__esModule",{value:!0}),i);var Or=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var S=(i,e,t)=>(Or(i,e,"read from private field"),t?t.call(i):e.get(i)),W=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},oe=(i,e,t,a)=>(Or(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t);var K=(i,e,t)=>(Or(i,e,"access private method"),t);var Zc={};Sd(Zc,{MediaError:()=>g.MediaError,default:()=>Gc,getVideoAttribute:()=>kt});module.exports=Md(Zc);var Ct=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Ct{}globalThis.DocumentFragment=i}var si=class extends Ct{},Nr=class extends Ct{},Ld={get(i){},define(i,e,t){},upgrade(i){},whenDefined(i){return Promise.resolve(si)}},oi,Pr=class{constructor(e,t={}){W(this,oi,void 0);oe(this,oi,t==null?void 0:t.detail)}get detail(){return S(this,oi)}initCustomEvent(){}};oi=new WeakMap;function Cd(i,e){return new si}var Ws={document:{createElement:Cd},DocumentFragment,customElements:Ld,CustomEvent:Pr,EventTarget:Ct,HTMLElement:si,HTMLVideoElement:Nr},Fs=typeof window=="undefined"||typeof globalThis.customElements=="undefined",B=Fs?Ws:globalThis,ne=Fs?Ws.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_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},A={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},lt={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_PAUSED:"mediaPaused",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_ENDED:"mediaEnded",MEDIA_MUTED:"mediaMuted",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_IS_PIP:"mediaIsPip",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected"},Ks=Object.entries(lt),o=Ks.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{}),Rt=Ks.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange"}),Xc=Object.entries(Rt).reduce((i,[e,t])=>{let a=o[e];return a&&(i[t]=a),i},{userinactivechange:"userinactive"}),Ys=Object.entries(o).reduce((i,[e,t])=>{let a=Rt[e];return a&&(i[t]=a),i},{userinactive:"userinactivechange"}),wt={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},qi={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Ur={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},le={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},ce={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var Q={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:i=1}={})=>`current playback rate ${i}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading"},x={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",AIRPLAY:()=>"air play",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:i=30}={})=>`seek forward ${i} seconds`,SEEK_BACK_N_SECS:({seekOffset:i=30}={})=>`seek back ${i} seconds`,SEEK_LIVE:()=>"seek to live",PLAYING_LIVE:()=>"playing live"},wd={...Q,...x};function Gs(i){return i==null?void 0:i.map(xd).join(" ")}function Zs(i){return i==null?void 0:i.split(/\s+/).map(Dd)}function xd(i){if(i){let{id:e,width:t,height:a}=i;return[e,t,a].filter(r=>r!=null).join(":")}}function Dd(i){if(i){let[e,t,a]=i.split(":");return{id:e,width:t,height:a}}}function Qi(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 qs(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Qs(i){return typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i)}function zi(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))}var Xi=i=>new Promise(e=>setTimeout(e,i));var zs=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],Od=(i,e)=>{let t=i===1?zs[e].singular:zs[e].plural;return`${i} ${t}`},dt=i=>{if(!Qs(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((l,u)=>l&&Od(l,u)).filter(l=>l).join(", ")}${t?" remaining":""}`};function be(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),l=Math.floor(e/3600);return(isNaN(i)||i===1/0)&&(n=r=a="0"),n=n>0||l>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(t?"-":"")+n+r+a}var tm=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 Ji=(i,e,t=".value")=>{let a=i.querySelector(t);!a||(a.textContent=e)},Pd=(i,e)=>{let t=`slot[name="${e}"]`,a=i.shadowRoot.querySelector(t);return a?a.children:[]},ji=(i,e)=>Pd(i,e)[0],li=(i,e)=>!i||!e?!1:i.contains(e)?!0:li(i,e.getRootNode().host),ut=(i,e)=>{if(!i)return null;let t=i.closest(e);return t||ut(i.getRootNode().host,e)};function D(i,e){var t;let a;for(a of i.querySelectorAll("style")){let r;try{r=(t=a.sheet)==null?void 0:t.cssRules}catch{continue}for(let n of r!=null?r:[])if(n.selectorText===e)return n}return a!=null&&a.sheet?(a.sheet.insertRule(`${e}{}`,a.sheet.cssRules.length),a.sheet.cssRules[a.sheet.cssRules.length-1]):{style:{setProperty:()=>{},removeProperty:()=>{}}}}function k(i,e,t=Number.NaN){let a=i.getAttribute(e);return a!=null?+a:t}function w(i,e,t){let a=+t;if(t==null||Number.isNaN(a)){i.hasAttribute(e)&&i.removeAttribute(e);return}k(i,e,void 0)!==a&&i.setAttribute(e,`${a}`)}function C(i,e){return i.hasAttribute(e)}function M(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}C(i,e)!=t&&i.toggleAttribute(e,t)}function N(i,e,t=null){var a;return(a=i.getAttribute(e))!=null?a:t}function O(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}let a=`${t}`;N(i,e,void 0)!==a&&i.setAttribute(e,a)}var ea=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},Br=class{observe(){}},Xs={createElement:function(){return new $r.HTMLElement},addEventListener(){},removeEventListener(){}},$r={ResizeObserver:Br,document:Xs,HTMLElement:class extends ea{},DocumentFragment:class extends ea{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},CustomEvent:function(){},getComputedStyle:function(){}},Js=typeof window=="undefined"||typeof window.customElements=="undefined",js=Object.keys($r).every(i=>i in globalThis),d=Js&&!js?$r:globalThis,m=Js&&!js?Xs:globalThis.document;var Ud=Object.defineProperty,Bd=(i,e,t)=>e in i?Ud(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,$d=(i,e,t)=>(Bd(i,typeof e!="symbol"?e+"":e,t),t),eo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},de=(i,e,t)=>(eo(i,e,"read from private field"),t?t.call(i):e.get(i)),ta=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ia=(i,e,t,a)=>(eo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),fe,aa,xt,ra,to=m.createElement("template");to.innerHTML=`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
font: var(--media-font,
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
min-width: 100%;
|
|
47
47
|
}
|
|
48
48
|
</style>
|
|
49
|
-
`;var R=class extends d.HTMLElement{constructor(e={}){if(super(),
|
|
49
|
+
`;var R=class extends d.HTMLElement{constructor(e={}){if(super(),ta(this,fe,void 0),$d(this,"preventClick",!1),ta(this,aa,a=>{this.preventClick||this.handleClick(a)}),ta(this,xt,a=>{let{key:r}=a;if(!this.keysUsed.includes(r)){this.removeEventListener("keyup",de(this,xt));return}this.preventClick||this.handleClick(a)}),ta(this,ra,a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!this.keysUsed.includes(s)){this.removeEventListener("keyup",de(this,xt));return}this.addEventListener("keyup",de(this,xt),{once:!0})}),!this.shadowRoot){this.attachShadow({mode:"open"});let a=to.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=m.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),this.shadowRoot.appendChild(a)}let{style:t}=D(this.shadowRoot,":host");t.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`)}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",de(this,aa)),this.addEventListener("keydown",de(this,ra)),this.tabIndex=0}disable(){this.removeEventListener("click",de(this,aa)),this.removeEventListener("keydown",de(this,ra)),this.removeEventListener("keyup",de(this,xt)),this.tabIndex=-1}attributeChangedCallback(e,t,a){var r,n,s,l,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=de(this,fe))==null?void 0:r.unassociateElement)==null||n.call(r,this),ia(this,fe,null)),a&&(ia(this,fe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=de(this,fe))==null?void 0:l.associateElement)==null||u.call(l,this))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","button");let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ia(this,fe,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=de(this,fe))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=de(this,fe))==null?void 0:e.unassociateElement)==null||t.call(e,this),ia(this,fe,null)}get keysUsed(){return["Enter"," "]}handleClick(e){}};fe=new WeakMap;aa=new WeakMap;xt=new WeakMap;ra=new WeakMap;d.customElements.get("media-chrome-button")||d.customElements.define("media-chrome-button",R);var Vd=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
50
50
|
<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"/>
|
|
51
51
|
</svg>
|
|
52
|
-
`,
|
|
53
|
-
<slot name="icon">${
|
|
54
|
-
`;var
|
|
52
|
+
`,io=m.createElement("template");io.innerHTML=`
|
|
53
|
+
<slot name="icon">${Vd}</slot>
|
|
54
|
+
`;var Vr=class extends R{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:io,...e})}connectedCallback(){this.setAttribute("aria-label",x.AIRPLAY()),super.connectedCallback()}get mediaAirplayUnavailable(){return N(this,o.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){O(this,o.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new d.CustomEvent(v.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};d.customElements.get("media-airplay-button")||d.customElements.define("media-airplay-button",Vr);var Hd='<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>',Wd='<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>',ro=m.createElement("template");ro.innerHTML=`
|
|
55
55
|
<style>
|
|
56
56
|
:host([${o.MEDIA_IS_CASTING}]) slot:not([name=exit]):not([name=icon]) {
|
|
57
57
|
display: none !important;
|
|
@@ -64,17 +64,17 @@
|
|
|
64
64
|
</style>
|
|
65
65
|
|
|
66
66
|
<slot name="icon">
|
|
67
|
-
<slot name="enter">${
|
|
68
|
-
<slot name="exit">${
|
|
67
|
+
<slot name="enter">${Hd}</slot>
|
|
68
|
+
<slot name="exit">${Wd}</slot>
|
|
69
69
|
</slot>
|
|
70
|
-
`;var
|
|
70
|
+
`;var ao=i=>{let t=i.getAttribute(o.MEDIA_IS_CASTING)!=null?x.EXIT_CAST():x.ENTER_CAST();i.setAttribute("aria-label",t)},Hr=class extends R{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_CASTING,o.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:ro,...e})}connectedCallback(){ao(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_CASTING&&ao(this),super.attributeChangedCallback(e,t,a)}get mediaIsCasting(){return C(this,o.MEDIA_IS_CASTING)}set mediaIsCasting(e){M(this,o.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return N(this,o.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){O(this,o.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?v.MEDIA_EXIT_CAST_REQUEST:v.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};d.customElements.get("media-cast-button")||d.customElements.define("media-cast-button",Hr);var no=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ke=(i,e,t)=>(no(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)},na=(i,e,t,a)=>(no(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),te,so=m.createElement("template");so.innerHTML=`
|
|
71
71
|
<style>
|
|
72
72
|
:host {
|
|
73
73
|
display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
|
|
74
74
|
box-sizing: border-box;
|
|
75
75
|
}
|
|
76
76
|
</style>
|
|
77
|
-
`;var
|
|
77
|
+
`;var Wr=class extends d.HTMLElement{constructor(e={}){if(super(),Fd(this,te,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=so.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=m.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),t.appendChild(a)}}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED]}attributeChangedCallback(e,t,a){var r,n,s,l,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Ke(this,te))==null?void 0:r.unassociateElement)==null||n.call(r,this),na(this,te,null)),a&&(na(this,te,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=Ke(this,te))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,t,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),na(this,te,Kd(this)),this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=Ke(this,te))==null?void 0:e.associateElement)==null||t.call(e,this)),(a=Ke(this,te))==null||a.addEventListener("pointerdown",this),(r=Ke(this,te))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,t,a,r;this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=Ke(this,te))==null?void 0:e.unassociateElement)==null||t.call(e,this)),(a=Ke(this,te))==null||a.removeEventListener("pointerdown",this),(r=Ke(this,te))==null||r.removeEventListener("click",this),na(this,te,null)}handleEvent(e){var t;let a=(t=e.composedPath())==null?void 0:t[0];if(!!["video","media-controller"].includes(a==null?void 0:a.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){let{clientX:n,clientY:s}=e,{left:l,top:u,width:c,height:E}=this.getBoundingClientRect(),f=n-l,b=s-u;if(f<0||b<0||f>c||b>E||c===0&&E===0)return;let{pointerType:T=this._pointerType}=e;if(this._pointerType=void 0,T===Ur.TOUCH){this.handleTap(e);return}else if(T===Ur.MOUSE){this.handleMouseClick(e);return}}}}get mediaPaused(){return C(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 d.CustomEvent(t,{composed:!0,bubbles:!0}))}};te=new WeakMap;function Kd(i){var e;let t=i.getAttribute(A.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):ut(i,"media-controller")}d.customElements.get("media-gesture-receiver")||d.customElements.define("media-gesture-receiver",Wr);var L={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive"},oo=m.createElement("template");oo.innerHTML=`
|
|
78
78
|
<style>
|
|
79
79
|
|
|
80
80
|
:host([${o.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
background-color: var(--media-background-color, #000);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
:host(:not([${
|
|
92
|
+
:host(:not([${L.AUDIO}])) [part~=layer]:not([part~=media-layer]) {
|
|
93
93
|
position: absolute;
|
|
94
94
|
top: 0;
|
|
95
95
|
left: 0;
|
|
@@ -107,19 +107,19 @@
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
:host([${
|
|
110
|
+
:host([${L.AUDIO}]) slot[name=media] {
|
|
111
111
|
display: var(--media-slot-display, none);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
:host([${
|
|
115
|
+
:host([${L.AUDIO}]) [part~=layer][part~=gesture-layer] {
|
|
116
116
|
height: 0;
|
|
117
117
|
display: block;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
:host(:not([${
|
|
122
|
-
:host(:not([${
|
|
121
|
+
:host(:not([${L.AUDIO}])[${L.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),
|
|
122
|
+
:host(:not([${L.AUDIO}])[${L.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {
|
|
123
123
|
display: none;
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -128,13 +128,13 @@
|
|
|
128
128
|
pointer-events: auto;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
:host(:not([${
|
|
131
|
+
:host(:not([${L.AUDIO}])) *[part~=layer][part~=centered-layer] {
|
|
132
132
|
align-items: center;
|
|
133
133
|
justify-content: center;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
:host(:not([${
|
|
137
|
-
:host(:not([${
|
|
136
|
+
:host(:not([${L.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
|
|
137
|
+
:host(:not([${L.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {
|
|
138
138
|
align-self: stretch;
|
|
139
139
|
flex-grow: 1;
|
|
140
140
|
}
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
:host(:not([${
|
|
157
|
+
:host(:not([${L.AUDIO}])) .spacer {
|
|
158
158
|
flex-grow: 1;
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -166,13 +166,13 @@
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
|
|
169
|
-
::slotted(:not([slot=media]):not([${
|
|
169
|
+
::slotted(:not([slot=media]):not([${L.NO_AUTOHIDE}])) {
|
|
170
170
|
opacity: 1;
|
|
171
171
|
transition: opacity 0.25s;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
|
|
175
|
-
:host([${
|
|
175
|
+
:host([${L.USER_INACTIVE}]:not([${o.MEDIA_PAUSED}]):not([${o.MEDIA_IS_CASTING}]):not([${L.AUDIO}])) ::slotted(:not([slot=media]):not([${L.NO_AUTOHIDE}])) {
|
|
176
176
|
opacity: 0;
|
|
177
177
|
transition: opacity 1s;
|
|
178
178
|
}
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
|
|
199
199
|
<slot part="bottom chrome"></slot>
|
|
200
200
|
</span>
|
|
201
|
-
`;var hd=Object.values(o),pd="sm:384 md:576 lg:768 xl:960",Ed=i=>{var e;for(let t of i){let a=t.target;if(!a.isConnected)continue;let r=(e=a.getAttribute(M.BREAKPOINTS))!=null?e:pd,n=bd(r),s=vd(n,t.contentRect),l=!1;if(Object.keys(n).forEach(u=>{if(s.includes(u)){a.hasAttribute(`breakpoint${u}`)||(a.setAttribute(`breakpoint${u}`,""),l=!0);return}a.hasAttribute(`breakpoint${u}`)&&(a.removeAttribute(`breakpoint${u}`),l=!0)}),l){let u=new CustomEvent(wt.BREAKPOINTS_CHANGE,{detail:s});a.dispatchEvent(u)}}};function bd(i){let e=i.split(/\s+/);return Object.fromEntries(e.map(t=>t.split(":")))}function vd(i,e){return Object.keys(i).filter(t=>e.width>=i[t])}var na=class extends d.HTMLElement{constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(xs.content.cloneNode(!0)));let e=u=>{let m=this.media;for(let p of u)p.type==="childList"&&(p.removedNodes.forEach(f=>{if(f.slot=="media"&&p.target==this){let v=p.previousSibling&&p.previousSibling.previousElementSibling;if(!v||!m)this.mediaUnsetCallback(f);else{let T=v.slot!=="media";for(;(v=v.previousSibling)!==null;)v.slot=="media"&&(T=!1);T&&this.mediaUnsetCallback(f)}}}),m&&p.addedNodes.forEach(f=>{f==m&&this.handleMediaUpdated(m).then(v=>this.mediaSetCallback(v))}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0});let a=!1,r=u=>{a||(d.setTimeout(()=>{Ed(u),a=!1},16),a=!0)},n=new ResizeObserver(r);this.resizeObserver=n,n.observe(this);let s=this.media,l=this.querySelector(":scope > slot[slot=media]");l&&l.addEventListener("slotchange",()=>{if(!l.assignedElements({flatten:!0}).length){this.mediaUnsetCallback(s);return}this.media&&(s=this.media,this.handleMediaUpdated(this.media).then(m=>this.mediaSetCallback(m)))})}static get observedAttributes(){return[M.AUTOHIDE,M.GESTURES_DISABLED].concat(hd)}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}mediaSetCallback(e){this._mediaClickPlayToggle=()=>{let t=e.paused?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new d.CustomEvent(t,{composed:!0,bubbles:!0}))}}handleMediaUpdated(e){let t=n=>Promise.resolve(n),a=n=>(console.error('<media-chrome>: Media element set with slot="media" does not appear to be compatible.',n),Promise.reject(n));if(!e)return a(e);let r=e.nodeName.toLowerCase();return r.includes("-")?d.customElements.whenDefined(r).then(()=>t(e)):t(e)}mediaUnsetCallback(e){}connectedCallback(){let t=this.getAttribute(M.AUDIO)!=null?q.AUDIO_PLAYER():q.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.media&&this.handleMediaUpdated(this.media).then(s=>this.mediaSetCallback(s)),this.setAttribute(M.USER_INACTIVE,"");let a=()=>{if(this.autohide<0||this.hasAttribute(M.USER_INACTIVE))return;this.setAttribute(M.USER_INACTIVE,"");let s=new d.CustomEvent(wt.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(s)},r=()=>{if(!this.hasAttribute(M.USER_INACTIVE))return;this.removeAttribute(M.USER_INACTIVE);let s=new d.CustomEvent(wt.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(s)},n=()=>{r(),d.clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=d.setTimeout(()=>{a()},this.autohide*1e3))};this.addEventListener("keyup",()=>{n()}),this.addEventListener("pointerup",s=>{s.pointerType==="touch"?[this,this.media].includes(s.target)&&!this.hasAttribute(M.USER_INACTIVE)?a():n():s.composedPath().some(l=>{var u;return["media-play-button","media-fullscreen-button"].includes((u=l==null?void 0:l.nodeName)==null?void 0:u.toLowerCase())})&&n()}),this.addEventListener("pointermove",s=>{s.pointerType==="mouse"&&(r(),d.clearTimeout(this._inactiveTimeout),[this,this.media].includes(s.target)&&n())}),this.addEventListener("mouseleave",()=>{a()}),this.addEventListener("keyup",()=>{this.setAttribute(M.KEYBOARD_CONTROL,"")}),d.addEventListener("mouseup",()=>{this.removeAttribute(M.KEYBOARD_CONTROL)})}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return this._autohide===void 0?2:this._autohide}};var Ds=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},G=(i,e,t)=>(Ds(i,e,"read from private field"),t?t.call(i):e.get(i)),ci=(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)},sa=(i,e,t,a)=>(Ds(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),xt,Dt,oa,ot,we,Ke,Ot=class{constructor(e,t,{defaultValue:a}={defaultValue:void 0}){ci(this,we),ci(this,xt,void 0),ci(this,Dt,void 0),ci(this,oa,void 0),ci(this,ot,new Set),sa(this,xt,e),sa(this,Dt,t),sa(this,oa,new Set(a))}[Symbol.iterator](){return G(this,we,Ke).values()}get length(){return G(this,we,Ke).size}get value(){var e;return(e=[...G(this,we,Ke)].join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(sa(this,ot,new Set),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return[...G(this,we,Ke)][e]}values(){return G(this,we,Ke).values()}forEach(e){G(this,we,Ke).forEach(e)}add(...e){var t,a;e.forEach(r=>G(this,ot).add(r)),!(this.value===""&&!((t=G(this,xt))!=null&&t.hasAttribute(`${G(this,Dt)}`)))&&((a=G(this,xt))==null||a.setAttribute(`${G(this,Dt)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>G(this,ot).delete(a)),(t=G(this,xt))==null||t.setAttribute(`${G(this,Dt)}`,`${this.value}`)}contains(e){return G(this,we,Ke).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}};xt=new WeakMap;Dt=new WeakMap;oa=new WeakMap;ot=new WeakMap;we=new WeakSet;Ke=function(){return G(this,ot).size?G(this,ot):G(this,oa)};var Os=(i="")=>i.split(/\s+/),Ns=(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}},Nt=(i="",e={})=>Os(i).map(t=>{let a=Ns(t);return{...e,...a}}),fd=i=>Array.isArray(i)?i.map(e=>typeof e=="string"?Ns(e):e):typeof i=="string"?Nt(i):[i],kr=({kind:i,label:e,language:t}={kind:"subtitles"})=>e?`${i==="captions"?"cc":"sb"}:${t}:${encodeURIComponent(e)}`:t,mi=(i=[])=>Array.prototype.map.call(i,kr).join(" "),gd=(i,e)=>t=>t[i]===e,Ps=i=>{let e=Object.entries(i).map(([t,a])=>gd(t,a));return t=>e.every(a=>a(t))},Sr=(i,e=[],t=[])=>{let a=fd(t).map(Ps),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=i})},la=(i,e=()=>!0)=>{if(!(i!=null&&i.textTracks))return[];let t=typeof e=="function"?e:Ps(e);return Array.from(i.textTracks).filter(t)},Mr=i=>!!i.getAttribute(o.MEDIA_SUBTITLES_SHOWING),Ce=(i,e)=>{var t,a;let r=Mr(i);if(r||e===!1){let n=i.getAttribute(o.MEDIA_SUBTITLES_SHOWING);if(n){let s=new window.CustomEvent(b.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:n});i.dispatchEvent(s)}}else if(!r||e===!0){let[n]=(a=Os((t=i.getAttribute(o.MEDIA_SUBTITLES_LIST))!=null?t:""))!=null?a:[];if(n){let s=new window.CustomEvent(b.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:n});i.dispatchEvent(s)}}else console.error("Attempting to enable captions or subtitles but none are available! Please verify your media content if this is unexpected.")};var U={enter:"requestFullscreen",exit:"exitFullscreen",rootEvents:["fullscreenchange"],mediaEvents:[],element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};c.fullscreenElement===void 0&&(U.enter="webkitRequestFullScreen",U.exit=c.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",U.rootEvents=["webkitfullscreenchange"],U.mediaEvents=["webkitbeginfullscreen","webkitendfullscreen"],U.element="webkitFullscreenElement",U.error="webkitfullscreenerror",U.enabled="webkitFullscreenEnabled");var da,Lr=()=>{var i,e;return da||(da=(e=(i=c)==null?void 0:i.createElement)==null?void 0:e.call(i,"video"),da)},Us=async(i=Lr())=>{if(!i)return!1;let e=i.volume;return i.volume=e/2+.1,await Ji(0),i.volume!==e},Ad=(i=Lr())=>typeof(i==null?void 0:i.requestPictureInPicture)=="function",_d=(i=Lr())=>{let e=c[U.enabled];return!e&&i&&(e="webkitSupportsFullscreen"in i),e},wr=_d(),Bs=Ad(),$s=!!d.WebKitPlaybackTargetAvailabilityEvent,Vs=!!d.chrome;var ua,Hs=Us().then(i=>(ua=i,ua)),yd=Object.values(he),Cr=i=>la(i.media,e=>[Ct.SUBTITLES,Ct.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),Td=i=>la(i.media,e=>e.mode===Qi.SHOWING&&[Ct.SUBTITLES,Ct.CAPTIONS].includes(e.kind)),ie={MEDIA_PAUSED:{get:function(i){let{media:e}=i;return e?e.paused:!0},mediaEvents:["play","playing","pause","emptied"]},MEDIA_HAS_PLAYED:{get:function(i){let{media:e}=i;return e?!e.paused:!1},mediaEvents:["playing","emptied"]},MEDIA_ENDED:{get:function(i){let{media:e}=i;return e?e.ended:!1},mediaEvents:["seeked","ended","emptied"]},MEDIA_PLAYBACK_RATE:{get:function(i){let{media:e}=i;return!e||typeof e.playbackRate=="undefined"?1:e.playbackRate},mediaEvents:["ratechange","loadstart"]},MEDIA_MUTED:{get:function(i){let{media:e}=i;return!e||typeof e.muted=="undefined"?!1:e.muted},mediaEvents:["volumechange"]},MEDIA_VOLUME:{get:function(i){let{media:e}=i;return!e||typeof e.volume=="undefined"?1:Number(e.volume)},mediaEvents:["volumechange"]},MEDIA_VOLUME_LEVEL:{get:function(i){let{media:e}=i,t="high";if(!e||typeof e.volume=="undefined")return t;let{muted:a,volume:r}=e;return r===0||a?t="off":r<.5?t="low":r<.75&&(t="medium"),t},mediaEvents:["volumechange"]},MEDIA_CURRENT_TIME:{get:function(i){let{media:e}=i;return!e||typeof e.currentTime=="undefined"?0:e.currentTime},mediaEvents:["timeupdate","loadedmetadata"]},MEDIA_DURATION:{get:function(i){let{media:e}=i;return!e||!Number.isFinite(e.duration)?NaN:e.duration},mediaEvents:["durationchange","loadedmetadata","emptied"]},MEDIA_SEEKABLE:{get:function(i){var e;let{media:t}=i;if(!((e=t==null?void 0:t.seekable)!=null&&e.length))return;let a=t.seekable.start(0),r=t.seekable.end(t.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress"]},MEDIA_LOADING:{get:function(i){var e;return((e=i.media)==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},MEDIA_BUFFERED:{get:function(i){var e,t,a;let r=(e=i.media)==null?void 0:e.buffered;return Array.from((a=(t=i.media)==null?void 0:t.buffered)!=null?a:[]).map((n,s)=>[Number(r.start(s)).toFixed(3),Number(r.end(s)).toFixed(3)])},mediaEvents:["progress","emptied"]},MEDIA_STREAM_TYPE:{get:function(i){let{media:e}=i;if(!e)return;let{streamType:t}=e;if(yd.includes(t)){if(t===he.UNKNOWN){let r=i.getAttribute("defaultstreamtype");return[he.LIVE,he.ON_DEMAND].includes(r)?r:void 0}return t}let a=e.duration;if(a===1/0)return he.LIVE;if(Number.isFinite(a))return he.ON_DEMAND;{let r=i.getAttribute("defaultstreamtype");if([he.LIVE,he.ON_DEMAND].includes(r))return r}},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},MEDIA_TARGET_LIVE_WINDOW:{get:function(i){let{media:e}=i;if(!e)return Number.NaN;let{targetLiveWindow:t}=e,a=ie.MEDIA_STREAM_TYPE.get(i);return(t==null||Number.isNaN(t))&&a===he.LIVE?0:t},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},MEDIA_TIME_IS_LIVE:{get:function(i){let{media:e}=i;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(ie.MEDIA_STREAM_TYPE.get(i)==="live"))return!1;let a=e.seekable;if(!a)return!0;if(!a.length)return!1;let r=i.hasAttribute("liveedgeoffset")?Number(i.getAttribute("liveedgeoffset")):10,n=a.end(a.length-1)-r;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},MEDIA_IS_FULLSCREEN:{get:function(i,e){var t;let a=i.media;if(a&&c[U.element]===void 0&&"webkitDisplayingFullscreen"in a)return a.webkitDisplayingFullscreen&&a.webkitPresentationMode==="fullscreen";let r;return e?r=c[U.element]?e.target:null:r=(t=i.getRootNode().fullscreenElement)!=null?t:c[U.element],ui(i.fullscreenElement,r)},rootEvents:U.rootEvents,mediaEvents:U.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 ui(a,r)}},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},MEDIA_IS_CASTING:{get:function(i,e){var t;let{media:a}=i;if(!a)return!1;let r=(t=globalThis.CastableVideoElement)==null?void 0:t.castElement,n=ui(a,r);return(e==null?void 0:e.type)==="castchange"&&(e==null?void 0:e.detail)==="CONNECTING"&&(n="connecting"),n},mediaEvents:["entercast","leavecast","castchange"]},MEDIA_AIRPLAY_UNAVAILABLE:{get:function(i,e){if(!$s)return Le.UNSUPPORTED;if(!!e&&e.availability!=="available"&&e.availability==="not-available")return Le.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"]},MEDIA_CAST_UNAVAILABLE:{get:function(){var i;let e=(i=globalThis.CastableVideoElement)==null?void 0:i.castState;if(!Vs||!e)return Le.UNSUPPORTED;if(!e.includes("CONNECT"))return Le.UNAVAILABLE},mediaEvents:["castchange"]},MEDIA_FULLSCREEN_UNAVAILABLE:{get:function(){return wr?void 0:Le.UNAVAILABLE}},MEDIA_PIP_UNAVAILABLE:{get:function(){return Bs?void 0:Le.UNSUPPORTED}},MEDIA_VOLUME_UNAVAILABLE:{get:function(i){if(ua!==void 0&&!ua)return Le.UNSUPPORTED;let{media:e}=i;if(e&&typeof e.volume=="undefined")return Le.UNAVAILABLE},mediaEvents:["loadstart"]},MEDIA_SUBTITLES_LIST:{get:function(i){return Cr(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],trackListEvents:["addtrack","removetrack"]},MEDIA_SUBTITLES_SHOWING:{get:function(i){return i.hasAttribute("defaultsubtitles")&&!i.hasAttribute(o.MEDIA_HAS_PLAYED)&&!i.hasAttribute(o.MEDIA_SUBTITLES_SHOWING)&&Ce(i,!0),Td(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],trackListEvents:["addtrack","removetrack","change"]}},ca={MEDIA_PLAY_REQUEST:(i,e,t)=>{var a;let r=ie.MEDIA_STREAM_TYPE.get(t),n=t.getAttribute("noautoseektolive")===null;r==he.LIVE&&n&&ca.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{d.localStorage.setItem("media-chrome-pref-volume",a.toString())}catch{}},MEDIA_ENTER_FULLSCREEN_REQUEST:(i,e,t)=>{if(!wr){console.warn("Fullscreen support is unavailable; not entering fullscreen");return}c.pictureInPictureElement&&c.exitPictureInPicture(),t[U.enter]?t.fullscreenElement[U.enter]():i.webkitEnterFullscreen?i.webkitEnterFullscreen():i.requestFullscreen?i.requestFullscreen():console.warn("MediaChrome: Fullscreen not supported")},MEDIA_EXIT_FULLSCREEN_REQUEST:()=>{c[U.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[U.element]&&c[U.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:i=>{var e;!((e=globalThis.CastableVideoElement)!=null&&e.castEnabled)||(c[U.element]&&c[U.exit](),i.requestCast())},MEDIA_EXIT_CAST_REQUEST:async()=>{var i;(i=globalThis.CastableVideoElement)!=null&&i.castElement&&globalThis.CastableVideoElement.exitCast()},MEDIA_SEEK_REQUEST:(i,e)=>{let t=e.detail;(i.readyState>0||i.readyState===void 0)&&(i.currentTime=t)},MEDIA_PLAYBACK_RATE_REQUEST:(i,e)=>{i.playbackRate=e.detail},MEDIA_PREVIEW_REQUEST:(i,e,t)=>{var a;if(!i)return;let r=e.detail;r===null&&t.propagateMediaState(o.MEDIA_PREVIEW_TIME,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_TIME,r);let[n]=la(i,{kind:Ct.METADATA,label:"thumbnails"});if(!(n&&n.cues))return;if(r===null){t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,void 0);return}let s=Array.prototype.find.call(n.cues,p=>p.startTime>=r);if(!s)return;let l=/'^(?:[a-z]+:)?\/\//i.test(s.text)||(a=i.querySelector('track[label="thumbnails"]'))==null?void 0:a.src,u=new URL(s.text,l),m=new URLSearchParams(u.hash).get("#xywh");t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,u.href),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,m.split(","))},MEDIA_SHOW_SUBTITLES_REQUEST:(i,e,t)=>{let a=Cr(t),{detail:r=[]}=e;Sr(Qi.SHOWING,a,r)},MEDIA_DISABLE_SUBTITLES_REQUEST:(i,e,t)=>{let a=Cr(t),{detail:r=[]}=e;Sr(Qi.DISABLED,a,r)},MEDIA_AIRPLAY_REQUEST:i=>{if(!!i){if(!(i.webkitShowPlaybackTargetPicker&&d.WebKitPlaybackTargetAvailabilityEvent)){console.warn("received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},MEDIA_SEEK_TO_LIVE_REQUEST:i=>{let e=i.seekable;if(!e){console.warn("MediaController: Media element does not support seeking to live.");return}if(!e.length){console.warn("MediaController: Media is unable to seek to live.");return}i.currentTime=e.end(e.length-1)}};var Dr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},dt=(i,e,t)=>(Dr(i,e,"read from private field"),t?t.call(i):e.get(i)),ma=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ws=(i,e,t,a)=>(Dr(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Pt=(i,e,t)=>(Dr(i,e,"access private method"),t),Ye,hi,Ut,pi,ha,Rr,Zs=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],Id=10,Fs=0,ae={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys"},pa=class extends na{constructor(){super(),ma(this,Ut),ma(this,ha),ma(this,Ye,new Ot(this,ae.HOTKEYS)),ma(this,hi,void 0),ie.MEDIA_VOLUME_UNAVAILABLE.get(this)===void 0&&Hs.then(()=>{this.propagateMediaState(o.MEDIA_VOLUME_UNAVAILABLE,ie.MEDIA_VOLUME_UNAVAILABLE.get(this))}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this),Object.keys(ca).forEach(e=>{let t=`_handle${zi(e,!0)}`;this[t]=a=>{if(a.stopPropagation(),!this.media){console.warn("MediaController: No media available.");return}ca[e](this.media,a,this)},this.addEventListener(b[e],this[t])}),this._mediaStatePropagators={},Object.keys(ie).forEach(e=>{this._mediaStatePropagators[e]=t=>{this.propagateMediaState(rt[e],ie[e].get(this,t))}}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(ae.NO_HOTKEYS,ae.HOTKEYS,ae.DEFAULT_STREAM_TYPE,ae.DEFAULT_SUBTITLES)}get fullscreenElement(){var e;return(e=dt(this,hi))!=null?e:this}set fullscreenElement(e){this.hasAttribute(ae.FULLSCREEN_ELEMENT)&&this.removeAttribute(ae.FULLSCREEN_ELEMENT),Ws(this,hi,e)}attributeChangedCallback(e,t,a){var r;if(e===ae.NO_HOTKEYS)a!==t&&a===""?(this.hasAttribute(ae.HOTKEYS)&&console.warn("Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==t&&a===null&&this.enableHotkeys();else if(e===ae.HOTKEYS)dt(this,Ye).value=a;else if(e===ae.DEFAULT_SUBTITLES&&a!==t&&a==="")Ce(this,!0);else if(e===ae.DEFAULT_STREAM_TYPE)this.propagateMediaState(rt.MEDIA_STREAM_TYPE);else if(e===ae.FULLSCREEN_ELEMENT){let n=a?(r=this.getRootNode())==null?void 0:r.getElementById(a):void 0;Ws(this,hi,n)}super.attributeChangedCallback(e,t,a)}mediaSetCallback(e){if(super.mediaSetCallback(e),e.hasAttribute("tabindex")||(e.tabIndex=-1),Object.keys(ie).forEach(t=>{let{mediaEvents:a,rootEvents:r,trackListEvents:n}=ie[t],s=this._mediaStatePropagators[t];a==null||a.forEach(l=>{e.addEventListener(l,s),s()}),r==null||r.forEach(l=>{this.getRootNode().addEventListener(l,s),s()}),n==null||n.forEach(l=>{var u;(u=e.textTracks)==null||u.addEventListener(l,s),s()})}),!this.hasAttribute("novolumepref"))try{let t=d.localStorage.getItem("media-chrome-pref-volume");t!==null&&(e.volume=t)}catch(t){console.debug("Error getting volume pref",t)}}mediaUnsetCallback(e){super.mediaUnsetCallback(e),Object.keys(ie).forEach(t=>{let{mediaEvents:a,rootEvents:r,trackListEvents:n}=ie[t],s=this._mediaStatePropagators[t];a==null||a.forEach(l=>{e.removeEventListener(l,s)}),r==null||r.forEach(l=>{this.getRootNode().removeEventListener(l,s)}),n==null||n.forEach(l=>{var u;(u=e.textTracks)==null||u.removeEventListener(l,s)})}),this.propagateMediaState(rt.MEDIA_PAUSED,!0)}propagateMediaState(e,t){let a=e.toLowerCase(),r=this.getAttribute(a);if(Gs(this.mediaStateReceivers,e,t),r===this.getAttribute(a))return;let n=new d.CustomEvent(vs[a],{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=Cd(e,a,r);Object.keys(b).forEach(s=>{e.addEventListener(b[s],this[`_handle${zi(s,!0)}`])}),t.set(e,n)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(!t.has(e))return;t.get(e)(),t.delete(e),Object.keys(b).forEach(r=>{e.removeEventListener(b[r],this[`_handle${zi(r,!0)}`])})}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),Object.keys(ie).forEach(r=>{let n=ie[r];Gs([e],rt[r],n.get(this))}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,a=t.indexOf(e);a<0||t.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",Pt(this,ha,Rr))}disableHotkeys(){this.removeEventListener("keydown",Pt(this,ha,Rr)),this.removeEventListener("keyup",Pt(this,Ut,pi))}get hotkeys(){return dt(this,Ye)}keyboardShortcutHandler(e){var t,a,r,n;if(((n=(r=(t=e.target.getAttribute(ae.KEYS_USED))==null?void 0:t.split(" "))!=null?r:(a=e.target)==null?void 0:a.keysUsed)!=null?n:[]).map(T=>T==="Space"?" ":T).filter(Boolean).includes(e.key))return;let l,u,m,p,f,v=Id;if(!dt(this,Ye).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&dt(this,Ye).contains("nospace")))switch(e.key){case" ":case"k":l=this.getAttribute(o.MEDIA_PAUSED)!=null?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new d.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"m":l=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?b.MEDIA_UNMUTE_REQUEST:b.MEDIA_MUTE_REQUEST,this.dispatchEvent(new d.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"f":l=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?b.MEDIA_EXIT_FULLSCREEN_REQUEST:b.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new d.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"c":Ce(this);break;case"ArrowLeft":u=this.getAttribute(o.MEDIA_CURRENT_TIME),m=u&&!Number.isNaN(+u)?+u:Fs,p=Math.max(m-v,0),f=new d.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:p}),this.dispatchEvent(f);break;case"ArrowRight":u=this.getAttribute(o.MEDIA_CURRENT_TIME),m=u&&!Number.isNaN(+u)?+u:Fs,p=Math.max(m+v,0),f=new d.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:p}),this.dispatchEvent(f);break;default:break}}};Ye=new WeakMap;hi=new WeakMap;Ut=new WeakSet;pi=function(i){let{key:e}=i;if(!Zs.includes(e)){this.removeEventListener("keyup",Pt(this,Ut,pi));return}this.keyboardShortcutHandler(i)};ha=new WeakSet;Rr=function(i){let{metaKey:e,altKey:t,key:a}=i;if(e||t||!Zs.includes(a)){this.removeEventListener("keyup",Pt(this,Ut,pi));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(dt(this,Ye).contains(`no${a.toLowerCase()}`)||a===" "&&dt(this,Ye).contains("nospace"))&&i.preventDefault(),this.addEventListener("keyup",Pt(this,Ut,pi),{once:!0})};var kd=Object.values(o),Sd=Object.values(rt),qs=i=>{var e,t,a,r;let{observedAttributes:n}=i.constructor;!n&&((e=i.nodeName)==null?void 0:e.includes("-"))&&(d.customElements.upgrade(i),{observedAttributes:n}=i.constructor);let s=(r=(a=(t=i==null?void 0:i.getAttribute)==null?void 0:t.call(i,g.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(l=>kd.includes(l)):[]},Md=i=>{var e,t;return((e=i.nodeName)==null?void 0:e.includes("-"))&&!!d.customElements.get((t=i.nodeName)==null?void 0:t.toLowerCase())&&!(i instanceof d.customElements.get(i.nodeName.toLowerCase()))&&d.customElements.upgrade(i),Sd.some(a=>a in i)},xr=i=>Md(i)||!!qs(i).length,Ks=i=>{var e;return(e=i==null?void 0:i.join)==null?void 0:e.call(i,":")},Ys={[o.MEDIA_SUBTITLES_LIST]:mi,[o.MEDIA_SUBTITLES_SHOWING]:mi,[o.MEDIA_SEEKABLE]:Ks,[o.MEDIA_BUFFERED]:i=>i==null?void 0:i.map(Ks).join(" "),[o.MEDIA_PREVIEW_COORDS]:i=>i==null?void 0:i.join(" ")},Ld=async(i,e,t)=>{var a,r;if(i.isConnected||await Ji(0),typeof t=="boolean"||t==null)return S(i,e,t);if(typeof t=="number")return D(i,e,t);if(typeof t=="string")return $(i,e,t);if(Array.isArray(t)&&!t.length)return i.removeAttribute(e);let n=(r=(a=Ys[e])==null?void 0:a.call(Ys,t))!=null?r:t;return i.setAttribute(e,n)},wd=i=>{var e;return!!((e=i.closest)!=null&&e.call(i,'*[slot="media"]'))},lt=(i,e)=>{if(wd(i))return;let t=(r,n)=>{var s,l;xr(r)&&n(r);let{children:u=[]}=r!=null?r:{},m=(l=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?l:[];[...u,...m].forEach(f=>lt(f,n))},a=i==null?void 0:i.nodeName.toLowerCase();if(a.includes("-")&&!xr(i)){d.customElements.whenDefined(a).then(()=>{t(i,e)});return}t(i,e)},Gs=(i,e,t)=>{i.forEach(a=>{if(e in a){a[e]=t;return}let r=qs(a),n=e.toLowerCase();!r.includes(n)||Ld(a,n,t)})},Cd=(i,e,t)=>{lt(i,e);let a=p=>{var f;let v=(f=p==null?void 0:p.composedPath()[0])!=null?f:p.target;e(v)},r=p=>{var f;let v=(f=p==null?void 0:p.composedPath()[0])!=null?f:p.target;t(v)};i.addEventListener(b.REGISTER_MEDIA_STATE_RECEIVER,a),i.addEventListener(b.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=p=>{p.forEach(f=>{let{addedNodes:v=[],removedNodes:T=[],type:B,target:Z,attributeName:I}=f;B==="childList"?(Array.prototype.forEach.call(v,ne=>lt(ne,e)),Array.prototype.forEach.call(T,ne=>lt(ne,t))):B==="attributes"&&I===g.MEDIA_CHROME_ATTRIBUTES&&(xr(Z)?e(Z):t(Z))})},s=[],l=p=>{let f=p.target;f.name!=="media"&&(s.forEach(v=>lt(v,t)),s=[...f.assignedElements({flatten:!0})],s.forEach(v=>lt(v,e)))};i.addEventListener("slotchange",l);let u=new MutationObserver(n);return u.observe(i,{childList:!0,attributes:!0,subtree:!0}),()=>{lt(i,t),i.removeEventListener("slotchange",l),u.disconnect(),i.removeEventListener(b.REGISTER_MEDIA_STATE_RECEIVER,a),i.removeEventListener(b.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};d.customElements.get("media-controller")||d.customElements.define("media-controller",pa);var Or=pa;var Rd=Object.defineProperty,xd=(i,e,t)=>e in i?Rd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Dd=(i,e,t)=>(xd(i,typeof e!="symbol"?e+"":e,t),t),zs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ge=(i,e,t)=>(zs(i,e,"read from private field"),t?t.call(i):e.get(i)),Nr=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ea=(i,e,t,a)=>(zs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ae,ba,va,Xs=c.createElement("template"),Qs=`
|
|
201
|
+
`;var Yd=Object.values(o),Gd="sm:384 md:576 lg:768 xl:960";function Zd(i){for(let e of i)qd(e.target,e.contentRect.width)}function qd(i,e){var t;if(!i.isConnected)return;let a=(t=i.getAttribute(L.BREAKPOINTS))!=null?t:Gd,r=Qd(a),n=zd(r,e),s=!1;if(Object.keys(r).forEach(l=>{if(n.includes(l)){i.hasAttribute(`breakpoint${l}`)||(i.setAttribute(`breakpoint${l}`,""),s=!0);return}i.hasAttribute(`breakpoint${l}`)&&(i.removeAttribute(`breakpoint${l}`),s=!0)}),s){let l=new CustomEvent(Rt.BREAKPOINTS_CHANGE,{detail:n});i.dispatchEvent(l)}}function Qd(i){let e=i.split(/\s+/);return Object.fromEntries(e.map(t=>t.split(":")))}function zd(i,e){return Object.keys(i).filter(t=>e>=i[t])}var sa=class extends d.HTMLElement{static get observedAttributes(){return[L.AUTOHIDE,L.GESTURES_DISABLED].concat(Yd).filter(e=>![o.MEDIA_RENDITION_LIST].includes(e))}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(oo.content.cloneNode(!0)));let e=u=>{let c=this.media;for(let E of u)E.type==="childList"&&(E.removedNodes.forEach(f=>{if(f.slot=="media"&&E.target==this){let b=E.previousSibling&&E.previousSibling.previousElementSibling;if(!b||!c)this.mediaUnsetCallback(f);else{let T=b.slot!=="media";for(;(b=b.previousSibling)!==null;)b.slot=="media"&&(T=!1);T&&this.mediaUnsetCallback(f)}}}),c&&E.addedNodes.forEach(f=>{f==c&&this.handleMediaUpdated(c).then(b=>this.mediaSetCallback(b))}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0});let a=!1,r=u=>{a||(setTimeout(()=>{Zd(u),a=!1},0),a=!0)},n=new ResizeObserver(r);this.resizeObserver=n,n.observe(this);let s=this.media,l=this.querySelector(":scope > slot[slot=media]");l&&l.addEventListener("slotchange",()=>{if(!l.assignedElements({flatten:!0}).length){this.mediaUnsetCallback(s);return}this.media&&(s=this.media,this.handleMediaUpdated(this.media).then(c=>this.mediaSetCallback(c)))})}attributeChangedCallback(e,t,a){e.toLowerCase()==L.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return(e==null?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}mediaSetCallback(e){this._mediaClickPlayToggle=()=>{let t=e.paused?v.MEDIA_PLAY_REQUEST:v.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new d.CustomEvent(t,{composed:!0,bubbles:!0}))}}handleMediaUpdated(e){let t=n=>Promise.resolve(n),a=n=>(console.error('<media-chrome>: Media element set with slot="media" does not appear to be compatible.',n),Promise.reject(n));if(!e)return a(e);let r=e.nodeName.toLowerCase();return r.includes("-")?d.customElements.whenDefined(r).then(()=>t(e)):t(e)}mediaUnsetCallback(e){}connectedCallback(){var e;let a=this.getAttribute(L.AUDIO)!=null?Q.AUDIO_PLAYER():Q.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.media&&this.handleMediaUpdated(this.media).then(l=>this.mediaSetCallback(l)),this.setAttribute(L.USER_INACTIVE,"");let r=()=>{if(this.autohide<0||this.hasAttribute(L.USER_INACTIVE))return;this.setAttribute(L.USER_INACTIVE,"");let l=new d.CustomEvent(Rt.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(l)},n=()=>{if(!this.hasAttribute(L.USER_INACTIVE))return;this.removeAttribute(L.USER_INACTIVE);let l=new d.CustomEvent(Rt.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(l)},s=()=>{n(),clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=setTimeout(()=>{r()},this.autohide*1e3))};this.addEventListener("keyup",()=>{s()}),this.addEventListener("pointerup",l=>{l.pointerType==="touch"?[this,this.media].includes(l.target)&&!this.hasAttribute(L.USER_INACTIVE)?r():s():l.composedPath().some(u=>{var c;return["media-play-button","media-fullscreen-button"].includes((c=u==null?void 0:u.nodeName)==null?void 0:c.toLowerCase())})&&s()}),this.addEventListener("pointermove",l=>{l.pointerType==="mouse"&&(n(),clearTimeout(this._inactiveTimeout),[this,this.media].includes(l.target)&&s())}),this.addEventListener("mouseleave",()=>{r()}),this.addEventListener("keyup",()=>{this.setAttribute(L.KEYBOARD_CONTROL,"")}),(e=d.window)==null||e.addEventListener("mouseup",()=>{this.removeAttribute(L.KEYBOARD_CONTROL)})}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return this._autohide===void 0?2:this._autohide}};var lo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Y=(i,e,t)=>(lo(i,e,"read from private field"),t?t.call(i):e.get(i)),di=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},oa=(i,e,t,a)=>(lo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Dt,Ot,la,ct,we,Ye,Ge=class{constructor(e,t,{defaultValue:a}={defaultValue:void 0}){di(this,we),di(this,Dt,void 0),di(this,Ot,void 0),di(this,la,void 0),di(this,ct,new Set),oa(this,Dt,e),oa(this,Ot,t),oa(this,la,new Set(a))}[Symbol.iterator](){return Y(this,we,Ye).values()}get length(){return Y(this,we,Ye).size}get value(){var e;return(e=[...Y(this,we,Ye)].join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(oa(this,ct,new Set),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return[...Y(this,we,Ye)][e]}values(){return Y(this,we,Ye).values()}forEach(e){Y(this,we,Ye).forEach(e)}add(...e){var t,a;e.forEach(r=>Y(this,ct).add(r)),!(this.value===""&&!((t=Y(this,Dt))!=null&&t.hasAttribute(`${Y(this,Ot)}`)))&&((a=Y(this,Dt))==null||a.setAttribute(`${Y(this,Ot)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>Y(this,ct).delete(a)),(t=Y(this,Dt))==null||t.setAttribute(`${Y(this,Ot)}`,`${this.value}`)}contains(e){return Y(this,we,Ye).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}};Dt=new WeakMap;Ot=new WeakMap;la=new WeakMap;ct=new WeakMap;we=new WeakSet;Ye=function(){return Y(this,ct).size?Y(this,ct):Y(this,la)};var uo=(i="")=>i.split(/\s+/),co=(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}},ui=(i="",e={})=>uo(i).map(t=>{let a=co(t);return{...e,...a}}),Xd=i=>Array.isArray(i)?i.map(e=>typeof e=="string"?co(e):e):typeof i=="string"?ui(i):[i],da=({kind:i,label:e,language:t}={kind:"subtitles"})=>e?`${i==="captions"?"cc":"sb"}:${t}:${encodeURIComponent(e)}`:t,mt=(i=[])=>Array.prototype.map.call(i,da).join(" "),Jd=(i,e)=>t=>t[i]===e,mo=i=>{let e=Object.entries(i).map(([t,a])=>Jd(t,a));return t=>e.every(a=>a(t))},Fr=(i,e=[],t=[])=>{let a=Xd(t).map(mo),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=i})},ua=(i,e=()=>!0)=>{if(!(i!=null&&i.textTracks))return[];let t=typeof e=="function"?e:mo(e);return Array.from(i.textTracks).filter(t)},Kr=i=>!!i.getAttribute(o.MEDIA_SUBTITLES_SHOWING),xe=(i,e)=>{var t,a;let r=Kr(i);if(r||e===!1){let n=i.getAttribute(o.MEDIA_SUBTITLES_SHOWING);if(n){let s=new d.CustomEvent(v.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:n});i.dispatchEvent(s)}}else if(!r||e===!0){let[n]=(a=uo((t=i.getAttribute(o.MEDIA_SUBTITLES_LIST))!=null?t:""))!=null?a:[];if(n){let s=new d.CustomEvent(v.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:n});i.dispatchEvent(s)}}else console.error("Attempting to enable captions or subtitles but none are available! Please verify your media content if this is unexpected.")};var $={enter:"requestFullscreen",exit:"exitFullscreen",rootEvents:["fullscreenchange"],mediaEvents:[],element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};m.fullscreenElement===void 0&&($.enter="webkitRequestFullScreen",$.exit=m.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",$.rootEvents=["webkitfullscreenchange"],$.mediaEvents=["webkitbeginfullscreen","webkitendfullscreen"],$.element="webkitFullscreenElement",$.error="webkitfullscreenerror",$.enabled="webkitFullscreenEnabled");var ca,Yr=()=>{var i,e;return ca||(ca=(e=(i=m)==null?void 0:i.createElement)==null?void 0:e.call(i,"video"),ca)},ho=async(i=Yr())=>{if(!i)return!1;let e=i.volume;return i.volume=e/2+.1,await Xi(0),i.volume!==e},jd=(i=Yr())=>typeof(i==null?void 0:i.requestPictureInPicture)=="function",eu=(i=Yr())=>{let e=m[$.enabled];return!e&&i&&(e="webkitSupportsFullscreen"in i),e},Gr=eu(),po=jd(),Eo=!!d.WebKitPlaybackTargetAvailabilityEvent,vo=!!d.chrome;var ma,bo=ho().then(i=>(ma=i,ma)),tu=Object.values(ce),Zr=i=>ua(i.media,e=>[wt.SUBTITLES,wt.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),iu=i=>ua(i.media,e=>e.mode===qi.SHOWING&&[wt.SUBTITLES,wt.CAPTIONS].includes(e.kind)),ie={MEDIA_PAUSED:{get:function(i){let{media:e}=i;return e?e.paused:!0},mediaEvents:["play","playing","pause","emptied"]},MEDIA_HAS_PLAYED:{get:function(i){let{media:e}=i;return e?!e.paused:!1},mediaEvents:["playing","emptied"]},MEDIA_ENDED:{get:function(i){let{media:e}=i;return e?e.ended:!1},mediaEvents:["seeked","ended","emptied"]},MEDIA_PLAYBACK_RATE:{get:function(i){let{media:e}=i;return!e||typeof e.playbackRate=="undefined"?1:e.playbackRate},mediaEvents:["ratechange","loadstart"]},MEDIA_MUTED:{get:function(i){let{media:e}=i;return!e||typeof e.muted=="undefined"?!1:e.muted},mediaEvents:["volumechange"]},MEDIA_VOLUME:{get:function(i){let{media:e}=i;return!e||typeof e.volume=="undefined"?1:Number(e.volume)},mediaEvents:["volumechange"]},MEDIA_VOLUME_LEVEL:{get:function(i){let{media:e}=i,t="high";if(!e||typeof e.volume=="undefined")return t;let{muted:a,volume:r}=e;return r===0||a?t="off":r<.5?t="low":r<.75&&(t="medium"),t},mediaEvents:["volumechange"]},MEDIA_CURRENT_TIME:{get:function(i){let{media:e}=i;return!e||typeof e.currentTime=="undefined"?0:e.currentTime},mediaEvents:["timeupdate","loadedmetadata"]},MEDIA_DURATION:{get:function(i){let{media:e}=i;return!e||!Number.isFinite(e.duration)?NaN:e.duration},mediaEvents:["durationchange","loadedmetadata","emptied"]},MEDIA_SEEKABLE:{get:function(i){var e;let{media:t}=i;if(!((e=t==null?void 0:t.seekable)!=null&&e.length))return;let a=t.seekable.start(0),r=t.seekable.end(t.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress"]},MEDIA_LOADING:{get:function(i){var e;return((e=i.media)==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},MEDIA_BUFFERED:{get:function(i){var e,t,a;let r=(e=i.media)==null?void 0:e.buffered;return Array.from((a=(t=i.media)==null?void 0:t.buffered)!=null?a:[]).map((n,s)=>[Number(r.start(s)).toFixed(3),Number(r.end(s)).toFixed(3)])},mediaEvents:["progress","emptied"]},MEDIA_STREAM_TYPE:{get:function(i){let{media:e}=i;if(!e)return;let{streamType:t}=e;if(tu.includes(t)){if(t===ce.UNKNOWN){let r=i.getAttribute("defaultstreamtype");return[ce.LIVE,ce.ON_DEMAND].includes(r)?r:void 0}return t}let a=e.duration;if(a===1/0)return ce.LIVE;if(Number.isFinite(a))return ce.ON_DEMAND;{let r=i.getAttribute("defaultstreamtype");if([ce.LIVE,ce.ON_DEMAND].includes(r))return r}},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},MEDIA_TARGET_LIVE_WINDOW:{get:function(i){let{media:e}=i;if(!e)return Number.NaN;let{targetLiveWindow:t}=e,a=ie.MEDIA_STREAM_TYPE.get(i);return(t==null||Number.isNaN(t))&&a===ce.LIVE?0:t},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},MEDIA_TIME_IS_LIVE:{get:function(i){let{media:e}=i;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(ie.MEDIA_STREAM_TYPE.get(i)==="live"))return!1;let a=e.seekable;if(!a)return!0;if(!a.length)return!1;let r=i.hasAttribute("liveedgeoffset")?Number(i.getAttribute("liveedgeoffset")):10,n=a.end(a.length-1)-r;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},MEDIA_IS_FULLSCREEN:{get:function(i,e){var t;let a=i.media;if(a&&m[$.element]===void 0&&"webkitDisplayingFullscreen"in a)return a.webkitDisplayingFullscreen&&a.webkitPresentationMode==="fullscreen";let r;return e?r=m[$.element]?e.target:null:r=(t=i.getRootNode().fullscreenElement)!=null?t:m[$.element],li(i.fullscreenElement,r)},rootEvents:$.rootEvents,mediaEvents:$.mediaEvents},MEDIA_IS_PIP:{get:function(i,e){var t;let a=i.media;if(!a)return!1;if(e)return e.type=="enterpictureinpicture";{let r=(t=i.getRootNode().pictureInPictureElement)!=null?t:m.pictureInPictureElement;return li(a,r)}},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},MEDIA_IS_CASTING:{get:function(i,e){var t;let{media:a}=i;if(!a)return!1;let r=(t=d.CastableVideoElement)==null?void 0:t.castElement,n=li(a,r);return(e==null?void 0:e.type)==="castchange"&&(e==null?void 0:e.detail)==="CONNECTING"&&(n="connecting"),n},mediaEvents:["entercast","leavecast","castchange"]},MEDIA_AIRPLAY_UNAVAILABLE:{get:function(i,e){if(!Eo)return le.UNSUPPORTED;if(!!e&&e.availability!=="available"&&e.availability==="not-available")return le.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"]},MEDIA_CAST_UNAVAILABLE:{get:function(){var i;let e=(i=d.CastableVideoElement)==null?void 0:i.castState;if(!vo||!e)return le.UNSUPPORTED;if(!e.includes("CONNECT"))return le.UNAVAILABLE},mediaEvents:["castchange"]},MEDIA_FULLSCREEN_UNAVAILABLE:{get:function(){return Gr?void 0:le.UNAVAILABLE}},MEDIA_PIP_UNAVAILABLE:{get:function(){return po?void 0:le.UNSUPPORTED}},MEDIA_RENDITION_UNAVAILABLE:{get:function(i){var e;let{media:t}=i;if(!t)return le.UNSUPPORTED;if(!t.videoRenditions)return le.UNSUPPORTED;if(!((e=t.videoRenditions)!=null&&e.length))return le.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},MEDIA_VOLUME_UNAVAILABLE:{get:function(i){if(ma!==void 0&&!ma)return le.UNSUPPORTED;let{media:e}=i;if(e&&typeof e.volume=="undefined")return le.UNAVAILABLE},mediaEvents:["loadstart"]},MEDIA_SUBTITLES_LIST:{get:function(i){return Zr(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},MEDIA_SUBTITLES_SHOWING:{get:function(i){return i.hasAttribute("defaultsubtitles")&&!i.hasAttribute(o.MEDIA_HAS_PLAYED)&&!i.hasAttribute(o.MEDIA_SUBTITLES_SHOWING)&&xe(i,!0),iu(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"]},MEDIA_RENDITION_LIST:{get:function(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.videoRenditions)!=null?e:[]]},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},MEDIA_RENDITION_SELECTED:{get:function(i){var e,t,a;let{media:r}=i;return(a=(t=r==null?void 0:r.videoRenditions)==null?void 0:t[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]}},ha={MEDIA_PLAY_REQUEST:(i,e,t)=>{var a;let r=ie.MEDIA_STREAM_TYPE.get(t),n=t.getAttribute("noautoseektolive")===null;r==ce.LIVE&&n&&ha.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{d.localStorage.setItem("media-chrome-pref-volume",a.toString())}catch{}},MEDIA_ENTER_FULLSCREEN_REQUEST:(i,e,t)=>{if(!Gr){console.warn("Fullscreen support is unavailable; not entering fullscreen");return}m.pictureInPictureElement&&m.exitPictureInPicture(),t[$.enter]?t.fullscreenElement[$.enter]():i.webkitEnterFullscreen?i.webkitEnterFullscreen():i.requestFullscreen?i.requestFullscreen():console.warn("MediaChrome: Fullscreen not supported")},MEDIA_EXIT_FULLSCREEN_REQUEST:()=>{m[$.exit]()},MEDIA_ENTER_PIP_REQUEST:i=>{if(!m.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}m[$.element]&&m[$.exit]();let e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(t=>{if(t.code===11)if(i.readyState===0&&i.preload==="none"){let a=()=>{i.removeEventListener("loadedmetadata",r),i.preload="none"},r=()=>{i.requestPictureInPicture().catch(e),a()};i.addEventListener("loadedmetadata",r),i.preload="metadata",setTimeout(()=>{i.readyState===0&&e(),a()},1e3)}else throw t;else throw t})},MEDIA_EXIT_PIP_REQUEST:()=>{m.pictureInPictureElement&&m.exitPictureInPicture()},MEDIA_ENTER_CAST_REQUEST:i=>{var e;!((e=d.CastableVideoElement)!=null&&e.castEnabled)||(m[$.element]&&m[$.exit](),i.requestCast())},MEDIA_EXIT_CAST_REQUEST:async()=>{var i;(i=d.CastableVideoElement)!=null&&i.castElement&&d.CastableVideoElement.exitCast()},MEDIA_SEEK_REQUEST:(i,e)=>{let t=e.detail;(i.readyState>0||i.readyState===void 0)&&(i.currentTime=t)},MEDIA_PLAYBACK_RATE_REQUEST:(i,e)=>{i.playbackRate=e.detail},MEDIA_PREVIEW_REQUEST:(i,e,t)=>{var a;if(!i)return;let r=e.detail;r===null&&t.propagateMediaState(o.MEDIA_PREVIEW_TIME,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_TIME,r);let[n]=ua(i,{kind:wt.METADATA,label:"thumbnails"});if(!(n&&n.cues))return;if(r===null){t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,void 0);return}let s=Array.prototype.find.call(n.cues,E=>E.startTime>=r);if(!s)return;let l=/'^(?:[a-z]+:)?\/\//i.test(s.text)||(a=i.querySelector('track[label="thumbnails"]'))==null?void 0:a.src,u=new URL(s.text,l),c=new URLSearchParams(u.hash).get("#xywh");t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,u.href),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,c.split(","))},MEDIA_SHOW_SUBTITLES_REQUEST:(i,e,t)=>{let a=Zr(t),{detail:r=[]}=e;Fr(qi.SHOWING,a,r)},MEDIA_DISABLE_SUBTITLES_REQUEST:(i,e,t)=>{let a=Zr(t),{detail:r=[]}=e;Fr(qi.DISABLED,a,r)},MEDIA_AIRPLAY_REQUEST:i=>{if(!!i){if(!(i.webkitShowPlaybackTargetPicker&&d.WebKitPlaybackTargetAvailabilityEvent)){console.warn("received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},MEDIA_SEEK_TO_LIVE_REQUEST:i=>{let e=i.seekable;if(!e){console.warn("MediaController: Media element does not support seeking to live.");return}if(!e.length){console.warn("MediaController: Media is unable to seek to live.");return}i.currentTime=e.end(e.length-1)},MEDIA_RENDITION_REQUEST:(i,e)=>{if(!(i!=null&&i.videoRenditions)){console.warn("MediaController: Rendition selection not supported by this media.");return}let t=e.detail,a=[...i.videoRenditions].findIndex(r=>r.id==t);i.videoRenditions.selectedIndex!=a&&(i.videoRenditions.selectedIndex=a)}};var zr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},pt=(i,e,t)=>(zr(i,e,"read from private field"),t?t.call(i):e.get(i)),pa=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},fo=(i,e,t,a)=>(zr(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Nt=(i,e,t)=>(zr(i,e,"access private method"),t),Ze,ci,Pt,mi,Ea,qr,Io=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],au=10,go=0,ae={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys"},va=class extends sa{constructor(){super(),pa(this,Pt),pa(this,Ea),pa(this,Ze,new Ge(this,ae.HOTKEYS)),pa(this,ci,void 0),ie.MEDIA_VOLUME_UNAVAILABLE.get(this)===void 0&&bo.then(()=>{this.propagateMediaState(o.MEDIA_VOLUME_UNAVAILABLE,ie.MEDIA_VOLUME_UNAVAILABLE.get(this))}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this),Object.keys(ha).forEach(e=>{let t=`_handle${Qi(e,!0)}`;this[t]=a=>{if(a.stopPropagation(),!this.media){console.warn("MediaController: No media available.");return}ha[e](this.media,a,this)},this.addEventListener(v[e],this[t])}),this._mediaStatePropagators={},Object.keys(ie).forEach(e=>{this._mediaStatePropagators[e]=t=>{this.propagateMediaState(lt[e],ie[e].get(this,t))}}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(ae.NO_HOTKEYS,ae.HOTKEYS,ae.DEFAULT_STREAM_TYPE,ae.DEFAULT_SUBTITLES)}get fullscreenElement(){var e;return(e=pt(this,ci))!=null?e:this}set fullscreenElement(e){this.hasAttribute(ae.FULLSCREEN_ELEMENT)&&this.removeAttribute(ae.FULLSCREEN_ELEMENT),fo(this,ci,e)}attributeChangedCallback(e,t,a){var r;if(e===ae.NO_HOTKEYS)a!==t&&a===""?(this.hasAttribute(ae.HOTKEYS)&&console.warn("Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==t&&a===null&&this.enableHotkeys();else if(e===ae.HOTKEYS)pt(this,Ze).value=a;else if(e===ae.DEFAULT_SUBTITLES&&a!==t&&a==="")xe(this,!0);else if(e===ae.DEFAULT_STREAM_TYPE)this.propagateMediaState(lt.MEDIA_STREAM_TYPE);else if(e===ae.FULLSCREEN_ELEMENT){let n=a?(r=this.getRootNode())==null?void 0:r.getElementById(a):void 0;fo(this,ci,n)}super.attributeChangedCallback(e,t,a)}mediaSetCallback(e){if(super.mediaSetCallback(e),e.hasAttribute("tabindex")||(e.tabIndex=-1),Object.keys(ie).forEach(t=>{let{mediaEvents:a,rootEvents:r,textTracksEvents:n,videoRenditionsEvents:s}=ie[t],l=this._mediaStatePropagators[t];a==null||a.forEach(u=>{e.addEventListener(u,l),l()}),r==null||r.forEach(u=>{this.getRootNode().addEventListener(u,l),l()}),n==null||n.forEach(u=>{var c;(c=e.textTracks)==null||c.addEventListener(u,l),l()}),s==null||s.forEach(u=>{var c;(c=e.videoRenditions)==null||c.addEventListener(u,l),l()})}),!this.hasAttribute("novolumepref"))try{let t=d.localStorage.getItem("media-chrome-pref-volume");t!==null&&(e.volume=t)}catch(t){console.debug("Error getting volume pref",t)}}mediaUnsetCallback(e){super.mediaUnsetCallback(e),Object.keys(ie).forEach(t=>{let{mediaEvents:a,rootEvents:r,textTracksEvents:n,videoRenditionsEvents:s}=ie[t],l=this._mediaStatePropagators[t];a==null||a.forEach(u=>{e.removeEventListener(u,l)}),r==null||r.forEach(u=>{this.getRootNode().removeEventListener(u,l)}),n==null||n.forEach(u=>{var c;(c=e.textTracks)==null||c.removeEventListener(u,l)}),s==null||s.forEach(u=>{var c;(c=e.videoRenditions)==null||c.removeEventListener(u,l),l()})}),this.propagateMediaState(lt.MEDIA_PAUSED,!0)}propagateMediaState(e,t){let a=To(this.mediaStateReceivers,e);if(yo(this.mediaStateReceivers,e,t),a===To(this.mediaStateReceivers,e))return;let r=e.toLowerCase(),n=new d.CustomEvent(Ys[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=du(e,a,r);Object.keys(v).forEach(s=>{e.addEventListener(v[s],this[`_handle${Qi(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${Qi(r,!0)}`])})}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),Object.keys(ie).forEach(r=>{let n=ie[r];yo([e],lt[r],n.get(this))}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,a=t.indexOf(e);a<0||t.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",Nt(this,Ea,qr))}disableHotkeys(){this.removeEventListener("keydown",Nt(this,Ea,qr)),this.removeEventListener("keyup",Nt(this,Pt,mi))}get hotkeys(){return pt(this,Ze)}keyboardShortcutHandler(e){var t,a,r,n;if(((n=(r=(t=e.target.getAttribute(ae.KEYS_USED))==null?void 0:t.split(" "))!=null?r:(a=e.target)==null?void 0:a.keysUsed)!=null?n:[]).map(T=>T==="Space"?" ":T).filter(Boolean).includes(e.key))return;let l,u,c,E,f,b=au;if(!pt(this,Ze).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&pt(this,Ze).contains("nospace")))switch(e.key){case" ":case"k":l=this.getAttribute(o.MEDIA_PAUSED)!=null?v.MEDIA_PLAY_REQUEST:v.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new d.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"m":l=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?v.MEDIA_UNMUTE_REQUEST:v.MEDIA_MUTE_REQUEST,this.dispatchEvent(new d.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"f":l=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?v.MEDIA_EXIT_FULLSCREEN_REQUEST:v.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new d.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"c":xe(this);break;case"ArrowLeft":u=this.getAttribute(o.MEDIA_CURRENT_TIME),c=u&&!Number.isNaN(+u)?+u:go,E=Math.max(c-b,0),f=new d.CustomEvent(v.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:E}),this.dispatchEvent(f);break;case"ArrowRight":u=this.getAttribute(o.MEDIA_CURRENT_TIME),c=u&&!Number.isNaN(+u)?+u:go,E=Math.max(c+b,0),f=new d.CustomEvent(v.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:E}),this.dispatchEvent(f);break;default:break}}};Ze=new WeakMap;ci=new WeakMap;Pt=new WeakSet;mi=function(i){let{key:e}=i;if(!Io.includes(e)){this.removeEventListener("keyup",Nt(this,Pt,mi));return}this.keyboardShortcutHandler(i)};Ea=new WeakSet;qr=function(i){let{metaKey:e,altKey:t,key:a}=i;if(e||t||!Io.includes(a)){this.removeEventListener("keyup",Nt(this,Pt,mi));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(pt(this,Ze).contains(`no${a.toLowerCase()}`)||a===" "&&pt(this,Ze).contains("nospace"))&&i.preventDefault(),this.addEventListener("keyup",Nt(this,Pt,mi),{once:!0})};var ru=Object.values(o),nu=Object.values(lt),Xr=i=>{var e,t,a,r;let{observedAttributes:n}=i.constructor;!n&&((e=i.nodeName)==null?void 0:e.includes("-"))&&(d.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(l=>ru.includes(l)):[]},su=i=>{var e,t;return((e=i.nodeName)==null?void 0:e.includes("-"))&&!!d.customElements.get((t=i.nodeName)==null?void 0:t.toLowerCase())&&!(i instanceof d.customElements.get(i.nodeName.toLowerCase()))&&d.customElements.upgrade(i),nu.some(a=>a in i)},Qr=i=>su(i)||!!Xr(i).length,Ao=i=>{var e;return(e=i==null?void 0:i.join)==null?void 0:e.call(i,":")},_o={[o.MEDIA_SUBTITLES_LIST]:mt,[o.MEDIA_SUBTITLES_SHOWING]:mt,[o.MEDIA_SEEKABLE]:Ao,[o.MEDIA_BUFFERED]:i=>i==null?void 0:i.map(Ao).join(" "),[o.MEDIA_PREVIEW_COORDS]:i=>i==null?void 0:i.join(" "),[o.MEDIA_RENDITION_LIST]:Gs},ou=async(i,e,t)=>{var a,r;if(i.isConnected||await Xi(0),typeof t=="boolean"||t==null)return M(i,e,t);if(typeof t=="number")return w(i,e,t);if(typeof t=="string")return O(i,e,t);if(Array.isArray(t)&&!t.length)return i.removeAttribute(e);let n=(r=(a=_o[e])==null?void 0:a.call(_o,t))!=null?r:t;return i.setAttribute(e,n)},lu=i=>{var e;return!!((e=i.closest)!=null&&e.call(i,'*[slot="media"]'))},ht=(i,e)=>{if(lu(i))return;let t=(r,n)=>{var s,l;Qr(r)&&n(r);let{children:u=[]}=r!=null?r:{},c=(l=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?l:[];[...u,...c].forEach(f=>ht(f,n))},a=i==null?void 0:i.nodeName.toLowerCase();if(a.includes("-")&&!Qr(i)){d.customElements.whenDefined(a).then(()=>{t(i,e)});return}t(i,e)},yo=(i,e,t)=>{i.forEach(a=>{if(e in a){a[e]=t;return}let r=Xr(a),n=e.toLowerCase();!r.includes(n)||ou(a,n,t)})},To=(i,e)=>{for(let t of i){if(e in t)return t[e];let a=Xr(t),r=e.toLowerCase();if(!!a.includes(r))return t.getAttribute(r)}},du=(i,e,t)=>{ht(i,e);let a=E=>{var f;let b=(f=E==null?void 0:E.composedPath()[0])!=null?f:E.target;e(b)},r=E=>{var f;let b=(f=E==null?void 0:E.composedPath()[0])!=null?f:E.target;t(b)};i.addEventListener(v.REGISTER_MEDIA_STATE_RECEIVER,a),i.addEventListener(v.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=E=>{E.forEach(f=>{let{addedNodes:b=[],removedNodes:T=[],type:V,target:G,attributeName:I}=f;V==="childList"?(Array.prototype.forEach.call(b,re=>ht(re,e)),Array.prototype.forEach.call(T,re=>ht(re,t))):V==="attributes"&&I===A.MEDIA_CHROME_ATTRIBUTES&&(Qr(G)?e(G):t(G))})},s=[],l=E=>{let f=E.target;f.name!=="media"&&(s.forEach(b=>ht(b,t)),s=[...f.assignedElements({flatten:!0})],s.forEach(b=>ht(b,e)))};i.addEventListener("slotchange",l);let u=new MutationObserver(n);return u.observe(i,{childList:!0,attributes:!0,subtree:!0}),()=>{ht(i,t),i.removeEventListener("slotchange",l),u.disconnect(),i.removeEventListener(v.REGISTER_MEDIA_STATE_RECEIVER,a),i.removeEventListener(v.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};d.customElements.get("media-controller")||d.customElements.define("media-controller",va);var Jr=va;var uu=Object.defineProperty,cu=(i,e,t)=>e in i?uu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,mu=(i,e,t)=>(cu(i,typeof e!="symbol"?e+"":e,t),t),ko=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},qe=(i,e,t)=>(ko(i,e,"read from private field"),t?t.call(i):e.get(i)),jr=(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)=>(ko(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ge,fa,ga,Mo=m.createElement("template"),So=`
|
|
202
202
|
height: var(--thumb-height);
|
|
203
203
|
width: var(--media-range-thumb-width, 10px);
|
|
204
204
|
border: var(--media-range-thumb-border, none);
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
transition: var(--media-range-thumb-transition, none);
|
|
210
210
|
transform: var(--media-range-thumb-transform, none);
|
|
211
211
|
opacity: var(--media-range-thumb-opacity, 1);
|
|
212
|
-
`,
|
|
212
|
+
`,en=`
|
|
213
213
|
min-width: 40px;
|
|
214
214
|
height: var(--track-height);
|
|
215
215
|
border: var(--media-range-track-border, none);
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
transition: var(--media-range-track-transition, none);
|
|
223
223
|
transform: translate(var(--media-range-track-translate-x, 0), var(--media-range-track-translate-y, 0));
|
|
224
224
|
cursor: pointer;
|
|
225
|
-
`;
|
|
225
|
+
`;Mo.innerHTML=`
|
|
226
226
|
<style>
|
|
227
227
|
:host {
|
|
228
228
|
--thumb-height: var(--media-range-thumb-height, 10px);
|
|
@@ -280,19 +280,19 @@
|
|
|
280
280
|
|
|
281
281
|
input[type=range]::-webkit-slider-thumb {
|
|
282
282
|
-webkit-appearance: none;
|
|
283
|
-
${
|
|
283
|
+
${So}
|
|
284
284
|
|
|
285
285
|
margin-top: calc(calc(0px - var(--thumb-height) + var(--track-height)) / 2);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
|
|
289
289
|
input[type=range]::-moz-range-thumb {
|
|
290
|
-
${
|
|
290
|
+
${So}
|
|
291
291
|
translate: var(--media-range-track-translate-x, 0) var(--media-range-track-translate-y, 0);
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
input[type=range]::-webkit-slider-runnable-track { ${
|
|
295
|
-
input[type=range]::-moz-range-track { ${
|
|
294
|
+
input[type=range]::-webkit-slider-runnable-track { ${en} }
|
|
295
|
+
input[type=range]::-moz-range-track { ${en} }
|
|
296
296
|
input[type=range]::-ms-track {
|
|
297
297
|
|
|
298
298
|
width: 100%;
|
|
@@ -302,7 +302,7 @@
|
|
|
302
302
|
border-color: transparent;
|
|
303
303
|
color: transparent;
|
|
304
304
|
|
|
305
|
-
${
|
|
305
|
+
${en}
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
#background,
|
|
@@ -365,7 +365,7 @@
|
|
|
365
365
|
<div id="hoverzone"></div>
|
|
366
366
|
<input id="range" type="range" min="0" max="1000" step="any" value="0">
|
|
367
367
|
</div>
|
|
368
|
-
`;var
|
|
368
|
+
`;var Et=class extends d.HTMLElement{constructor(){super(),mu(this,"thumbWidth"),jr(this,ge,void 0),jr(this,fa,()=>{if(this.range.matches(":focus-visible")){let{style:t}=D(this.shadowRoot,":host");t.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),jr(this,ga,()=>{let{style:t}=D(this.shadowRoot,":host");t.removeProperty("--_focus-visible-box-shadow")}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Mo.content.cloneNode(!0)));let{style:e}=D(this.shadowRoot,":host");e.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-block))`),this.container=this.shadowRoot.querySelector("#container"),this.range=this.shadowRoot.querySelector("#range"),this.range.addEventListener("input",this.updateBar.bind(this)),this.thumbWidth=parseInt(getComputedStyle(this).getPropertyValue("--media-range-thumb-width")||"10",10)}static get observedAttributes(){return["disabled","aria-disabled",A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,l,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=qe(this,ge))==null?void 0:r.unassociateElement)==null||n.call(r,this),ba(this,ge,null)),a&&(ba(this,ge,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=qe(this,ge))==null?void 0:l.associateElement)==null||u.call(l,this))):(e==="disabled"||e==="aria-disabled"&&t!==a)&&(a==null?this.range.removeAttribute(e):this.range.setAttribute(e,a))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ba(this,ge,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=qe(this,ge))==null?void 0:t.associateElement)==null||a.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",qe(this,fa)),this.shadowRoot.addEventListener("focusout",qe(this,ga))}disconnectedCallback(){var e,t;(t=(e=qe(this,ge))==null?void 0:e.unassociateElement)==null||t.call(e,this),ba(this,ge,null),this.shadowRoot.removeEventListener("focusin",qe(this,fa)),this.shadowRoot.removeEventListener("focusout",qe(this,ga))}updatePointerBar(e){let t=this.range.getBoundingClientRect(),a=(e.clientX-t.left)/t.width;a=Math.max(0,Math.min(1,a));let{style:r}=D(this.shadowRoot,"#pointer");r.setProperty("width",`${a*t.width}px`)}updateBar(){let e=this.getBarColors(),t="linear-gradient(to right, ",a=0;e.forEach(n=>{n[1]<a||(t=t+`${n[0]} ${a}%, ${n[0]} ${n[1]}%,`,a=n[1])}),t=t.slice(0,t.length-1)+")";let{style:r}=D(this.shadowRoot,"#range");r.setProperty("--media-range-track-progress-internal",t)}getRelativeValues(){let{range:e}=this;return{relativeValue:e.value-e.min,relativeMax:e.max-e.min}}getBarColors(){let e=this.range,{relativeValue:t,relativeMax:a}=this.getRelativeValues(),r=t/a*100,n=0;return!!t&&t<a&&(n=this.thumbWidth*(.5-r/100)/e.offsetWidth*100),[["var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)))",r+n],["var(--media-range-track-color, transparent)",100]]}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};ge=new WeakMap;fa=new WeakMap;ga=new WeakMap;d.customElements.get("media-chrome-range")||d.customElements.define("media-chrome-range",Et);var Lo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Aa=(i,e,t)=>(Lo(i,e,"read from private field"),t?t.call(i):e.get(i)),hu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},_a=(i,e,t,a)=>(Lo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ae,Co=m.createElement("template");Co.innerHTML=`
|
|
369
369
|
<style>
|
|
370
370
|
:host {
|
|
371
371
|
|
|
@@ -391,7 +391,7 @@
|
|
|
391
391
|
</style>
|
|
392
392
|
|
|
393
393
|
<slot></slot>
|
|
394
|
-
`;var
|
|
394
|
+
`;var tn=class extends d.HTMLElement{constructor(){super(),hu(this,Ae,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Co.content.cloneNode(!0))),this.shadowRoot.querySelector("slot").addEventListener("slotchange",({target:e})=>{let t=e.assignedElements({flatten:!0}).every(n=>["media-time-range","media-volume-range"].includes(n.nodeName.toLowerCase())),{style:a}=D(this.shadowRoot,":host"),r=t?"unset":"initial";a.setProperty("--_range-auto-size",r)})}static get observedAttributes(){return[A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,l,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Aa(this,Ae))==null?void 0:r.unassociateElement)==null||n.call(r,this),_a(this,Ae,null)),a&&(_a(this,Ae,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=Aa(this,Ae))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(_a(this,Ae,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Aa(this,Ae))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Aa(this,Ae))==null?void 0:e.unassociateElement)==null||t.call(e,this),_a(this,Ae,null)}};Ae=new WeakMap;d.customElements.get("media-control-bar")||d.customElements.define("media-control-bar",tn);var Ro=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ya=(i,e,t)=>(Ro(i,e,"read from private field"),t?t.call(i):e.get(i)),pu=(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)},Ta=(i,e,t,a)=>(Ro(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),_e,wo=m.createElement("template");wo.innerHTML=`
|
|
395
395
|
<style>
|
|
396
396
|
:host {
|
|
397
397
|
font: var(--media-font,
|
|
@@ -424,11 +424,11 @@
|
|
|
424
424
|
}
|
|
425
425
|
</style>
|
|
426
426
|
<slot></slot>
|
|
427
|
-
`;var
|
|
427
|
+
`;var De=class extends d.HTMLElement{constructor(){super(),pu(this,_e,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(wo.content.cloneNode(!0)));let{style:e}=D(this.shadowRoot,":host");e.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`)}static get observedAttributes(){return[A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,l,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=ya(this,_e))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ta(this,_e,null)),a&&(Ta(this,_e,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=ya(this,_e))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Ta(this,_e,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=ya(this,_e))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=ya(this,_e))==null?void 0:e.unassociateElement)==null||t.call(e,this),Ta(this,_e,null)}};_e=new WeakMap;d.customElements.get("media-text-display")||d.customElements.define("media-text-display",De);var Do=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},xo=(i,e,t)=>(Do(i,e,"read from private field"),t?t.call(i):e.get(i)),Eu=(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)},vu=(i,e,t,a)=>(Do(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),hi,an=class extends De{constructor(){super(),Eu(this,hi,void 0),vu(this,hi,this.shadowRoot.querySelector("slot")),xo(this,hi).textContent=be(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_DURATION]}attributeChangedCallback(e,t,a){e===o.MEDIA_DURATION&&(xo(this,hi).textContent=be(a)),super.attributeChangedCallback(e,t,a)}get mediaDuration(){return k(this,o.MEDIA_DURATION)}set mediaDuration(e){w(this,o.MEDIA_DURATION,e)}};hi=new WeakMap;d.customElements.get("media-duration-display")||d.customElements.define("media-duration-display",an);var Uo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},rn=(i,e,t)=>(Uo(i,e,"read from private field"),t?t.call(i):e.get(i)),bu=(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)},fu=(i,e,t,a)=>(Uo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ut,me={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Oo=[...Object.values(me),o.MEDIA_CURRENT_TIME,o.MEDIA_DURATION,o.MEDIA_SEEKABLE],No=["Enter"," "],gu=" / ",Po=(i,{timesSep:e=gu}={})=>{var t,a,r,n;let s=i.hasAttribute(me.REMAINING),l=i.hasAttribute(me.SHOW_DURATION),u=(t=i.mediaCurrentTime)!=null?t:0,[,c]=(a=i.mediaSeekable)!=null?a:[],E=(n=(r=i.mediaDuration)!=null?r:c)!=null?n:0,f=s?be(0-(E-u)):be(u);return l?`${f}${e}${be(E)}`:f},Au="video not loaded, unknown time.",_u=i=>{var e;let t=i.mediaCurrentTime,[,a]=(e=i.mediaSeekable)!=null?e:[],r=i.mediaDuration||a;if(t==null||r==null){i.setAttribute("aria-valuetext",Au);return}let n=i.hasAttribute(me.REMAINING),s=i.hasAttribute(me.SHOW_DURATION),l=n?dt(0-(r-t)):dt(t);if(!s){i.setAttribute("aria-valuetext",l);return}let u=dt(r),c=`${l} of ${u}`;i.setAttribute("aria-valuetext",c)},nn=class extends De{constructor(){super(),bu(this,Ut,void 0),fu(this,Ut,this.shadowRoot.querySelector("slot")),rn(this,Ut).innerHTML=`${Po(this)}`;let{style:e}=D(this.shadowRoot,":host:not([notoggle])");e.setProperty("cursor","pointer");let{style:t}=D(this.shadowRoot,":host(:hover:not([notoggle]))");t.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))")}static get observedAttributes(){return[...super.observedAttributes,...Oo,"disabled"]}connectedCallback(){this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",Q.PLAYBACK_TIME());let e=t=>{let{key:a}=t;if(!No.includes(a)){this.removeEventListener("keyup",e);return}this.toggleTimeDisplay()};this.addEventListener("keydown",t=>{let{metaKey:a,altKey:r,key:n}=t;if(a||r||!No.includes(n)){this.removeEventListener("keyup",e);return}this.addEventListener("keyup",e)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,t,a){Oo.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 C(this,me.REMAINING)}set remaining(e){M(this,me.REMAINING,e)}get showDuration(){return C(this,me.SHOW_DURATION)}set showDuration(e){M(this,me.SHOW_DURATION,e)}get noToggle(){return C(this,me.NO_TOGGLE)}set noToggle(e){M(this,me.NO_TOGGLE,e)}get mediaDuration(){return k(this,o.MEDIA_DURATION)}set mediaDuration(e){w(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return k(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){w(this,o.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(!!e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}update(){let e=Po(this);_u(this),e!==rn(this,Ut).innerHTML&&(rn(this,Ut).innerHTML=e)}};Ut=new WeakMap;d.customElements.get("media-time-display")||d.customElements.define("media-time-display",nn);var yu=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
428
428
|
<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"/>
|
|
429
|
-
</svg>`,
|
|
429
|
+
</svg>`,Tu=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
430
430
|
<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"/>
|
|
431
|
-
</svg>`,
|
|
431
|
+
</svg>`,Ho=m.createElement("template");Ho.innerHTML=`
|
|
432
432
|
<style>
|
|
433
433
|
:host([aria-checked="true"]) slot[name=off] {
|
|
434
434
|
display: none !important;
|
|
@@ -441,16 +441,16 @@
|
|
|
441
441
|
</style>
|
|
442
442
|
|
|
443
443
|
<slot name="icon">
|
|
444
|
-
<slot name="on">${
|
|
445
|
-
<slot name="off">${
|
|
444
|
+
<slot name="on">${yu}</slot>
|
|
445
|
+
<slot name="off">${Tu}</slot>
|
|
446
446
|
</slot>
|
|
447
|
-
`;var
|
|
448
|
-
<slot name="icon">${
|
|
449
|
-
`;var
|
|
447
|
+
`;var Bo=i=>{i.setAttribute("aria-checked",Kr(i))},sn=class extends R{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:Ho,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",Q.CLOSED_CAPTIONS()),Bo(this)}attributeChangedCallback(e,t,a){e===o.MEDIA_SUBTITLES_SHOWING&&Bo(this),super.attributeChangedCallback(e,t,a)}get mediaSubtitlesList(){return $o(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Vo(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return $o(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Vo(this,o.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){xe(this)}},$o=(i,e)=>{let t=i.getAttribute(e);return t?ui(t):[]},Vo=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=mt(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};d.customElements.get("media-captions-button")||d.customElements.define("media-captions-button",sn);var Bt={SEEK_OFFSET:"seekoffset"},Ia=30,Iu=`<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)">${Ia}</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>`,Wo=m.createElement("template");Wo.innerHTML=`
|
|
448
|
+
<slot name="icon">${Iu}</slot>
|
|
449
|
+
`;var Su=0,on=class extends R{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,Bt.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:Wo,...e})}connectedCallback(){this.seekOffset=k(this,Bt.SEEK_OFFSET,Ia),super.connectedCallback()}attributeChangedCallback(e,t,a){e===Bt.SEEK_OFFSET&&(this.seekOffset=k(this,Bt.SEEK_OFFSET,Ia)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return k(this,Bt.SEEK_OFFSET,Ia)}set seekOffset(e){w(this,Bt.SEEK_OFFSET,e),this.setAttribute("aria-label",x.SEEK_FORWARD_N_SECS({seekOffset:this.seekOffset})),Ji(ji(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return k(this,o.MEDIA_CURRENT_TIME,Su)}set mediaCurrentTime(e){w(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new d.CustomEvent(v.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};d.customElements.get("media-seek-forward-button")||d.customElements.define("media-seek-forward-button",on);var ku=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
450
450
|
<path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
|
|
451
|
-
</svg>`,
|
|
451
|
+
</svg>`,Mu=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
452
452
|
<path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
|
|
453
|
-
</svg>`,
|
|
453
|
+
</svg>`,Ko=m.createElement("template");Ko.innerHTML=`
|
|
454
454
|
<style>
|
|
455
455
|
:host([${o.MEDIA_IS_FULLSCREEN}]) slot:not([name=exit]):not([name=icon]) {
|
|
456
456
|
display: none !important;
|
|
@@ -463,10 +463,10 @@
|
|
|
463
463
|
</style>
|
|
464
464
|
|
|
465
465
|
<slot name="icon">
|
|
466
|
-
<slot name="enter">${
|
|
467
|
-
<slot name="exit">${
|
|
466
|
+
<slot name="enter">${ku}</slot>
|
|
467
|
+
<slot name="exit">${Mu}</slot>
|
|
468
468
|
</slot>
|
|
469
|
-
`;var
|
|
469
|
+
`;var Fo=i=>{let e=i.mediaIsFullscreen?x.EXIT_FULLSCREEN():x.ENTER_FULLSCREEN();i.setAttribute("aria-label",e)},ln=class extends R{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_FULLSCREEN,o.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Ko,...e})}connectedCallback(){Fo(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_FULLSCREEN&&Fo(this),super.attributeChangedCallback(e,t,a)}get mediaFullscreenUnavailable(){return N(this,o.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){O(this,o.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return C(this,o.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){M(this,o.MEDIA_IS_FULLSCREEN,e)}handleClick(){let e=this.mediaIsFullscreen?v.MEDIA_EXIT_FULLSCREEN_REQUEST:v.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};d.customElements.get("media-fullscreen-button")||d.customElements.define("media-fullscreen-button",ln);var{MEDIA_TIME_IS_LIVE:Sa,MEDIA_PAUSED:pi}=o,{MEDIA_SEEK_TO_LIVE_REQUEST:Lu,MEDIA_PLAY_REQUEST:Cu}=v,Ru='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>',Go=m.createElement("template");Go.innerHTML=`
|
|
470
470
|
<style>
|
|
471
471
|
|
|
472
472
|
slot[name=indicator] > *,
|
|
@@ -477,57 +477,57 @@
|
|
|
477
477
|
color: var(--media-live-button-icon-color, rgb(140, 140, 140));
|
|
478
478
|
}
|
|
479
479
|
|
|
480
|
-
:host([${
|
|
481
|
-
:host([${
|
|
480
|
+
:host([${Sa}]:not([${pi}])) slot[name=indicator] > *,
|
|
481
|
+
:host([${Sa}]:not([${pi}])) ::slotted([slot=indicator]) {
|
|
482
482
|
fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
|
|
483
483
|
color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
-
:host([${
|
|
486
|
+
:host([${Sa}]:not([${pi}])) {
|
|
487
487
|
cursor: not-allowed;
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
</style>
|
|
491
491
|
|
|
492
|
-
<slot name="indicator">${
|
|
492
|
+
<slot name="indicator">${Ru}</slot>
|
|
493
493
|
|
|
494
494
|
<slot name="spacer"> </slot><slot name="text">LIVE</slot>
|
|
495
|
-
`;var
|
|
495
|
+
`;var Yo=i=>{let e=i.mediaPaused||!i.mediaTimeIsLive,t=e?x.SEEK_LIVE():x.PLAYING_LIVE();i.setAttribute("aria-label",t),e?i.removeAttribute("aria-disabled"):i.setAttribute("aria-disabled","true")},dn=class extends R{static get observedAttributes(){return[...super.observedAttributes,pi,Sa]}constructor(e={}){super({slotTemplate:Go,...e})}connectedCallback(){Yo(this),super.connectedCallback()}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),Yo(this)}get mediaPaused(){return C(this,o.MEDIA_PAUSED)}set mediaPaused(e){M(this,o.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return C(this,o.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){M(this,o.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new d.CustomEvent(Lu,{composed:!0,bubbles:!0})),this.hasAttribute(pi)&&this.dispatchEvent(new d.CustomEvent(Cu,{composed:!0,bubbles:!0})))}};d.customElements.get("media-live-button")||d.customElements.define("media-live-button",dn);var{MEDIA_VOLUME_LEVEL:Ei}=o,wu=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
496
496
|
<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"/>
|
|
497
|
-
</svg>`,
|
|
497
|
+
</svg>`,Zo=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
498
498
|
<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"/>
|
|
499
|
-
</svg>`,
|
|
499
|
+
</svg>`,xu=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
500
500
|
<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"/>
|
|
501
|
-
</svg>`,
|
|
501
|
+
</svg>`,Qo=m.createElement("template");Qo.innerHTML=`
|
|
502
502
|
<style>
|
|
503
503
|
|
|
504
|
-
:host(:not([${
|
|
505
|
-
:host([${
|
|
504
|
+
:host(:not([${Ei}])) slot:not([name=high]):not([name=icon]),
|
|
505
|
+
:host([${Ei}=high]) slot:not([name=high]):not([name=icon]) {
|
|
506
506
|
display: none !important;
|
|
507
507
|
}
|
|
508
508
|
|
|
509
|
-
:host([${
|
|
509
|
+
:host([${Ei}=off]) slot:not([name=off]):not([name=icon]) {
|
|
510
510
|
display: none !important;
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
-
:host([${
|
|
513
|
+
:host([${Ei}=low]) slot:not([name=low]):not([name=icon]) {
|
|
514
514
|
display: none !important;
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
-
:host([${
|
|
517
|
+
:host([${Ei}=medium]) slot:not([name=medium]):not([name=icon]) {
|
|
518
518
|
display: none !important;
|
|
519
519
|
}
|
|
520
520
|
</style>
|
|
521
521
|
|
|
522
522
|
<slot name="icon">
|
|
523
|
-
<slot name="off">${
|
|
524
|
-
<slot name="low">${
|
|
525
|
-
<slot name="medium">${
|
|
526
|
-
<slot name="high">${
|
|
523
|
+
<slot name="off">${wu}</slot>
|
|
524
|
+
<slot name="low">${Zo}</slot>
|
|
525
|
+
<slot name="medium">${Zo}</slot>
|
|
526
|
+
<slot name="high">${xu}</slot>
|
|
527
527
|
</slot>
|
|
528
|
-
`;var
|
|
528
|
+
`;var qo=i=>{let t=i.mediaVolumeLevel==="off"?x.UNMUTE():x.MUTE();i.setAttribute("aria-label",t)},un=class extends R{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:Qo,...e})}connectedCallback(){qo(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_VOLUME_LEVEL&&qo(this),super.attributeChangedCallback(e,t,a)}get mediaVolumeLevel(){return N(this,o.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){O(this,o.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel==="off"?v.MEDIA_UNMUTE_REQUEST:v.MEDIA_MUTE_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};d.customElements.get("media-mute-button")||d.customElements.define("media-mute-button",un);var zo=`<svg aria-hidden="true" viewBox="0 0 28 24">
|
|
529
529
|
<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"/>
|
|
530
|
-
</svg>`,
|
|
530
|
+
</svg>`,Jo=m.createElement("template");Jo.innerHTML=`
|
|
531
531
|
<style>
|
|
532
532
|
:host([${o.MEDIA_IS_PIP}]) slot:not([name=exit]):not([name=icon]) {
|
|
533
533
|
display: none !important;
|
|
@@ -540,14 +540,14 @@
|
|
|
540
540
|
</style>
|
|
541
541
|
|
|
542
542
|
<slot name="icon">
|
|
543
|
-
<slot name="enter">${
|
|
544
|
-
<slot name="exit">${
|
|
543
|
+
<slot name="enter">${zo}</slot>
|
|
544
|
+
<slot name="exit">${zo}</slot>
|
|
545
545
|
</slot>
|
|
546
|
-
`;var
|
|
546
|
+
`;var Xo=i=>{let e=i.mediaIsPip?x.EXIT_PIP():x.ENTER_PIP();i.setAttribute("aria-label",e)},cn=class extends R{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_PIP,o.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Jo,...e})}connectedCallback(){Xo(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_PIP&&Xo(this),super.attributeChangedCallback(e,t,a)}get mediaPipUnavailable(){return N(this,o.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){O(this,o.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return C(this,o.MEDIA_IS_PIP)}set mediaIsPip(e){M(this,o.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?v.MEDIA_EXIT_PIP_REQUEST:v.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};d.customElements.get("media-pip-button")||d.customElements.define("media-pip-button",cn);var Du=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
547
547
|
<path d="m6 21 15-9L6 3v18Z"/>
|
|
548
|
-
</svg>`,
|
|
548
|
+
</svg>`,Ou=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
549
549
|
<path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
|
|
550
|
-
</svg>`,
|
|
550
|
+
</svg>`,el=m.createElement("template");el.innerHTML=`
|
|
551
551
|
<style>
|
|
552
552
|
:host([${o.MEDIA_PAUSED}]) slot[name=pause] {
|
|
553
553
|
display: none !important;
|
|
@@ -559,12 +559,12 @@
|
|
|
559
559
|
</style>
|
|
560
560
|
|
|
561
561
|
<slot name="icon">
|
|
562
|
-
<slot name="play">${
|
|
563
|
-
<slot name="pause">${
|
|
562
|
+
<slot name="play">${Du}</slot>
|
|
563
|
+
<slot name="pause">${Ou}</slot>
|
|
564
564
|
</slot>
|
|
565
|
-
`;var
|
|
565
|
+
`;var jo=i=>{let e=i.mediaPaused?x.PLAY():x.PAUSE();i.setAttribute("aria-label",e)},mn=class extends R{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_ENDED]}constructor(e={}){super({slotTemplate:el,...e})}connectedCallback(){jo(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_PAUSED&&jo(this),super.attributeChangedCallback(e,t,a)}get mediaPaused(){return C(this,o.MEDIA_PAUSED)}set mediaPaused(e){M(this,o.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?v.MEDIA_PLAY_REQUEST:v.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};d.customElements.get("media-play-button")||d.customElements.define("media-play-button",mn);var Nu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ka=(i,e,t)=>(Nu(i,e,"read from private field"),t?t.call(i):e.get(i)),Pu=(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)},$t,hn={RATES:"rates"},En=[1,1.25,1.5,1.75,2],Vt=1,tl=m.createElement("template");tl.innerHTML=`
|
|
566
566
|
<span id="container"></span>
|
|
567
|
-
`;var
|
|
567
|
+
`;var pn=class extends R{constructor(e={}){super({slotTemplate:tl,...e}),Pu(this,$t,new Ge(this,hn.RATES,{defaultValue:En})),this.container=this.shadowRoot.querySelector("#container"),this.container.innerHTML=`${Vt}x`}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE,hn.RATES]}attributeChangedCallback(e,t,a){if(e===hn.RATES&&(ka(this,$t).value=a),e===o.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?Vt:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",Q.PLAYBACK_RATE({playbackRate:n}));return}super.attributeChangedCallback(e,t,a)}get rates(){return ka(this,$t)}set rates(e){e?Array.isArray(e)&&(ka(this,$t).value=e.join(" ")):ka(this,$t).value=""}get mediaPlaybackRate(){return k(this,o.MEDIA_PLAYBACK_RATE,Vt)}set mediaPlaybackRate(e){w(this,o.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let a=Array.from(this.rates.values(),s=>+s).sort((s,l)=>s-l),r=(t=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?t:Vt,n=new d.CustomEvent(v.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};$t=new WeakMap;d.customElements.get("media-playback-rate-button")||d.customElements.define("media-playback-rate-button",pn);var ye={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"},il=m.createElement("template");il.innerHTML=`
|
|
568
568
|
<style>
|
|
569
569
|
:host {
|
|
570
570
|
pointer-events: none;
|
|
@@ -585,10 +585,10 @@
|
|
|
585
585
|
}
|
|
586
586
|
</style>
|
|
587
587
|
|
|
588
|
-
<img aria-hidden="true" id="image"/>
|
|
589
|
-
`;var
|
|
590
|
-
<slot name="icon">${
|
|
591
|
-
`;var
|
|
588
|
+
<img part="poster img" aria-hidden="true" id="image"/>
|
|
589
|
+
`;var Uu=i=>{i.style.removeProperty("background-image")},Bu=(i,e)=>{i.style["background-image"]=`url('${e}')`},vn=class extends d.HTMLElement{static get observedAttributes(){return[ye.PLACEHOLDER_SRC,ye.SRC]}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(il.content.cloneNode(!0))),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,a){e===ye.SRC&&(a==null?this.image.removeAttribute(ye.SRC):this.image.setAttribute(ye.SRC,a)),e===ye.PLACEHOLDER_SRC&&(a==null?Uu(this.image):Bu(this.image,a))}get placeholderSrc(){return N(this,ye.PLACEHOLDER_SRC)}set placeholderSrc(e){O(this,ye.SRC,e)}get src(){return N(this,ye.SRC)}set src(e){O(this,ye.SRC,e)}};d.customElements.get("media-poster-image")||d.customElements.define("media-poster-image",vn);var Ht={SEEK_OFFSET:"seekoffset"},Ma=30,$u=`<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)">${Ma}</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>`,al=m.createElement("template");al.innerHTML=`
|
|
590
|
+
<slot name="icon">${$u}</slot>
|
|
591
|
+
`;var Vu=0,bn=class extends R{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,Ht.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:al,...e})}connectedCallback(){this.seekOffset=k(this,Ht.SEEK_OFFSET,Ma),super.connectedCallback()}attributeChangedCallback(e,t,a){e===Ht.SEEK_OFFSET&&(this.seekOffset=k(this,Ht.SEEK_OFFSET,Ma)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return k(this,Ht.SEEK_OFFSET,Ma)}set seekOffset(e){w(this,Ht.SEEK_OFFSET,e),this.setAttribute("aria-label",x.SEEK_BACK_N_SECS({seekOffset:this.seekOffset})),Ji(ji(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return k(this,o.MEDIA_CURRENT_TIME,Vu)}set mediaCurrentTime(e){w(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new d.CustomEvent(v.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};d.customElements.get("media-seek-backward-button")||d.customElements.define("media-seek-backward-button",bn);var nl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},rl=(i,e,t)=>(nl(i,e,"read from private field"),t?t.call(i):e.get(i)),Hu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Wu=(i,e,t,a)=>(nl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),vi,fn=class extends De{constructor(){super(),Hu(this,vi,void 0),Wu(this,vi,this.shadowRoot.querySelector("slot")),rl(this,vi).textContent=be(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,a){e===o.MEDIA_PREVIEW_TIME&&a!=null&&(rl(this,vi).textContent=be(a)),super.attributeChangedCallback(e,t,a)}get mediaPreviewTime(){return k(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){w(this,o.MEDIA_PREVIEW_TIME,e)}};vi=new WeakMap;d.customElements.get("media-preview-time-display")||d.customElements.define("media-preview-time-display",fn);var sl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},La=(i,e,t)=>(sl(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)},Ca=(i,e,t,a)=>(sl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Te,ol=m.createElement("template");ol.innerHTML=`
|
|
592
592
|
<style>
|
|
593
593
|
:host {
|
|
594
594
|
box-sizing: border-box;
|
|
@@ -602,7 +602,7 @@
|
|
|
602
602
|
}
|
|
603
603
|
</style>
|
|
604
604
|
<img crossorigin loading="eager" decoding="async">
|
|
605
|
-
`;var
|
|
605
|
+
`;var gn=class extends d.HTMLElement{constructor(){super(),Fu(this,Te,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(ol.content.cloneNode(!0)))}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Ca(this,Te,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=La(this,Te))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=La(this,Te))==null?void 0:e.unassociateElement)==null||t.call(e,this),Ca(this,Te,null)}attributeChangedCallback(e,t,a){var r,n,s,l,u;[o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===A.MEDIA_CONTROLLER&&(t&&((n=(r=La(this,Te))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ca(this,Te,null)),a&&(Ca(this,Te,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=La(this,Te))==null?void 0:l.associateElement)==null||u.call(l,this)))}get mediaPreviewImage(){return N(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){O(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(o.MEDIA_PREVIEW_COORDS);if(!!e)return e.split(/\s+/).map(t=>+t)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(o.MEDIA_PREVIEW_COORDS);return}this.setAttribute(o.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!(e&&t))return;let[a,r,n,s]=e,l=t.split("#")[0],u=getComputedStyle(this),{maxWidth:c,maxHeight:E,minWidth:f,minHeight:b}=u,T=Math.min(parseInt(c)/n,parseInt(E)/s),V=Math.max(parseInt(f)/n,parseInt(b)/s),G=T<1,I=G?T:V>1?V:1,{style:re}=D(this.shadowRoot,":host"),ve=D(this.shadowRoot,"img").style,se=this.shadowRoot.querySelector("img"),ni=G?"min":"max";re.setProperty(`${ni}-width`,"initial","important"),re.setProperty(`${ni}-height`,"initial","important"),re.width=`${n*I}px`,re.height=`${s*I}px`;let Lt=()=>{ve.width=`${this.imgWidth*I}px`,ve.height=`${this.imgHeight*I}px`,ve.display="block"};se.src!==l&&(se.onload=()=>{this.imgWidth=se.naturalWidth,this.imgHeight=se.naturalHeight,Lt()},se.src=l,Lt()),Lt(),ve.transform=`translate(-${a*I}px, -${r*I}px)`}};Te=new WeakMap;d.customElements.get("media-preview-thumbnail")||d.customElements.define("media-preview-thumbnail",gn);var Ln=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},H=(i,e,t)=>(Ln(i,e,"read from private field"),t?t.call(i):e.get(i)),z=(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)=>(Ln(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),bi=(i,e,t)=>(Ln(i,e,"access private method"),t),fi,Ra,gi,Na,Pa,wa,_n,yn,ll,xa,Tn,Da,Wt,Ai,In,Ua,Ba,Oa,Sn,kn,dl,Ku="video not loaded, unknown time.",An=i=>{let e=i.range,t=dt(+e.value),a=dt(+e.max),r=t&&a?`${t} of ${a}`:Ku;e.setAttribute("aria-valuetext",r)},ul=m.createElement("template");ul.innerHTML=`
|
|
606
606
|
<style>
|
|
607
607
|
:host {
|
|
608
608
|
--media-preview-border-radius: 3px;
|
|
@@ -707,7 +707,7 @@
|
|
|
707
707
|
|
|
708
708
|
</slot>
|
|
709
709
|
</div>
|
|
710
|
-
`;var
|
|
710
|
+
`;var Mn=class extends Et{constructor(){super(),z(this,wa),z(this,yn),z(this,xa),z(this,Oa),z(this,kn),z(this,fi,void 0),z(this,Ra,void 0),z(this,gi,void 0),z(this,Na,void 0),z(this,Pa,void 0),z(this,Da,t=>{if([...H(this,fi)].some(E=>t.composedPath().includes(E)))return;this.updatePointerBar(t);let a=this.mediaDuration;if(!a)return;let r=this.range.getBoundingClientRect(),n=(t.clientX-r.left-this.thumbWidth/2)/(r.width-this.thumbWidth);n=Math.max(0,Math.min(1,n));let s=bi(this,xa,Tn).call(this,H(this,Ra),n),{style:l}=D(this.shadowRoot,"#preview-rail");l.transform=`translateX(${s})`;let u=n*a,c=new d.CustomEvent(v.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:u});this.dispatchEvent(c)}),z(this,Wt,!1),z(this,Ai,t=>{var a;(!t.composedPath().includes(this)||[...H(this,fi)].some(r=>t.composedPath().includes(r)))&&((a=d.window)==null||a.removeEventListener("pointermove",H(this,Ai)),Qe(this,Wt,!1),H(this,Ua).call(this))}),z(this,In,()=>{var t;(t=d.window)==null||t.addEventListener("pointermove",H(this,Da),!1)}),z(this,Ua,()=>{var t;(t=d.window)==null||t.removeEventListener("pointermove",H(this,Da));let a=new d.CustomEvent(v.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:null});this.dispatchEvent(a)}),z(this,Ba,()=>{var t;let a=this.getAttribute(o.MEDIA_DURATION);!H(this,Wt)&&a&&(Qe(this,Wt,!0),H(this,In).call(this),(t=d.window)==null||t.addEventListener("pointermove",H(this,Ai),!1))}),this.container.appendChild(ul.content.cloneNode(!0)),this.range.addEventListener("input",()=>{cancelAnimationFrame(this._refreshId);let a=this.range.value,r=new d.CustomEvent(v.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}),this._refreshBar=()=>{let t=(performance.now()-this._updateTimestamp)/1e3;this.range.value=this.mediaCurrentTime+t*this.mediaPlaybackRate,this.updateBar(),this.updateCurrentBox(),this._refreshId=requestAnimationFrame(this._refreshBar)},Qe(this,fi,this.shadowRoot.querySelectorAll('[part~="box"]')),Qe(this,Ra,this.shadowRoot.querySelector('[part~="preview-box"]')),Qe(this,gi,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);Qe(this,Na,parseInt(e.getPropertyValue("--media-box-padding-left"))),Qe(this,Pa,parseInt(e.getPropertyValue("--media-box-padding-right"))),bi(this,Oa,Sn).call(this)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_DURATION,o.MEDIA_SEEKABLE,o.MEDIA_CURRENT_TIME,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_TIME,o.MEDIA_BUFFERED,o.MEDIA_PLAYBACK_RATE,o.MEDIA_LOADING,o.MEDIA_ENDED]}connectedCallback(){this.range.setAttribute("aria-label",Q.SEEK()),super.connectedCallback()}disconnectedCallback(){cancelAnimationFrame(this._refreshId),super.disconnectedCallback()}attributeChangedCallback(e,t,a){var r,n,s,l,u;(e===o.MEDIA_CURRENT_TIME||e===o.MEDIA_PAUSED||e===o.MEDIA_ENDED||e===o.MEDIA_LOADING)&&(this._updateTimestamp=performance.now(),this.range.value=this.mediaCurrentTime,An(this),this.updateBar(),this.updateCurrentBox(),cancelAnimationFrame(this._refreshId),!this.mediaPaused&&!this.mediaLoading&&(this._refreshId=requestAnimationFrame(this._refreshBar))),e===o.MEDIA_DURATION&&(this.range.max=(n=(r=H(this,wa,_n))!=null?r:this.mediaDuration)!=null?n:1e3,An(this),this.updateBar(),this.updateCurrentBox()),e===o.MEDIA_SEEKABLE&&(this.range.min=(s=H(this,yn,ll))!=null?s:0,this.range.max=(u=(l=H(this,wa,_n))!=null?l:this.mediaDuration)!=null?u:1e3,An(this),this.updateBar()),e===o.MEDIA_BUFFERED&&this.updateBar(),e==="disabled"&&(a==null?bi(this,Oa,Sn).call(this):bi(this,kn,dl).call(this)),super.attributeChangedCallback(e,t,a)}get mediaPaused(){return C(this,o.MEDIA_PAUSED)}set mediaPaused(e){M(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return C(this,o.MEDIA_LOADING)}set mediaLoading(e){M(this,o.MEDIA_LOADING,e)}get mediaDuration(){return k(this,o.MEDIA_DURATION)}set mediaDuration(e){w(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return k(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){w(this,o.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return k(this,o.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){w(this,o.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(o.MEDIA_BUFFERED);return e?e.split(" ").map(t=>t.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(o.MEDIA_BUFFERED);return}let t=e.map((a,r)=>`${a}:${r}`).join(" ");this.setAttribute(o.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(!!e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}get mediaPreviewImage(){return N(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){O(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return k(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){w(this,o.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return C(this,o.MEDIA_ENDED)}set mediaEnded(e){M(this,o.MEDIA_ENDED,e)}getRelativeValues(){let e=super.getRelativeValues();return this.mediaEnded?{...e,relativeValue:e.relativeMax}:e}getBarColors(){var e;let t=super.getBarColors(),{range:a}=this,r=a.max-a.min,n=this.mediaBuffered;if(!n.length||!Number.isFinite(r)||r<=0)return t;let s;if(this.mediaEnded)s=r;else{let u=this.mediaCurrentTime,[,c=a.min]=(e=n.find(([E,f])=>E<=u&&u<=f))!=null?e:[];s=c-a.min}let l=s/r*100;return t.splice(1,0,["var(--media-time-range-buffered-color, rgb(255 255 255 / .4))",l]),t}updateCurrentBox(){if(!H(this,gi).assignedElements().length)return;let e=this.range.value/(this.range.max-this.range.min),t=bi(this,xa,Tn).call(this,H(this,gi),e),{style:a}=D(this.shadowRoot,"#current-rail");a.transform=`translateX(${t})`}};fi=new WeakMap;Ra=new WeakMap;gi=new WeakMap;Na=new WeakMap;Pa=new WeakMap;wa=new WeakSet;_n=function(){var i;let[,e]=(i=this.mediaSeekable)!=null?i:[];return e};yn=new WeakSet;ll=function(){var i;let[e]=(i=this.mediaSeekable)!=null?i:[];return e};xa=new WeakSet;Tn=function(i,e){var t;let a=`${e*100*100}%`,r=i.offsetWidth;if(!r)return a;let n=(t=this.getAttribute("bounds")?ut(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?t:this,s=this.range.getBoundingClientRect(),l=n.getBoundingClientRect(),u=(H(this,Na)-(s.left-l.left-r/2))/s.width*100,c=(l.right-s.left-r/2-H(this,Pa))/s.width*100;return Number.isNaN(u)||(a=`max(${u*100}%, ${a})`),Number.isNaN(c)||(a=`min(${a}, ${c*100}%)`),a};Da=new WeakMap;Wt=new WeakMap;Ai=new WeakMap;In=new WeakMap;Ua=new WeakMap;Ba=new WeakMap;Oa=new WeakSet;Sn=function(){this.addEventListener("pointermove",H(this,Ba),!1)};kn=new WeakSet;dl=function(){var i;(i=d.window)==null||i.removeEventListener("pointermove",H(this,Ai)),this.removeEventListener("pointermove",H(this,Ba)),Qe(this,Wt,!1),H(this,Ua).call(this)};d.customElements.get("media-time-range")||d.customElements.define("media-time-range",Mn);var ml=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ft=(i,e,t)=>(ml(i,e,"read from private field"),t?t.call(i):e.get(i)),Cn=(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)},Kt=(i,e,t,a)=>(ml(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ie,$a,Va,cl={LOADING_DELAY:"loadingdelay"},hl=500,pl=m.createElement("template"),Yu=`
|
|
711
711
|
<svg aria-hidden="true" viewBox="0 0 100 100">
|
|
712
712
|
<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">
|
|
713
713
|
<animateTransform
|
|
@@ -720,13 +720,13 @@
|
|
|
720
720
|
repeatCount="indefinite" />
|
|
721
721
|
</path>
|
|
722
722
|
</svg>
|
|
723
|
-
`;
|
|
723
|
+
`;pl.innerHTML=`
|
|
724
724
|
<style>
|
|
725
725
|
:host {
|
|
726
726
|
display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
|
|
727
727
|
vertical-align: middle;
|
|
728
728
|
box-sizing: border-box;
|
|
729
|
-
--_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${
|
|
729
|
+
--_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${hl}ms);
|
|
730
730
|
}
|
|
731
731
|
|
|
732
732
|
#status {
|
|
@@ -765,49 +765,101 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
765
765
|
}
|
|
766
766
|
</style>
|
|
767
767
|
|
|
768
|
-
<slot name="icon">${
|
|
769
|
-
<div id="status" role="status" aria-live="polite">${
|
|
770
|
-
`;var
|
|
768
|
+
<slot name="icon">${Yu}</slot>
|
|
769
|
+
<div id="status" role="status" aria-live="polite">${Q.MEDIA_LOADING()}</div>
|
|
770
|
+
`;var Rn=class extends d.HTMLElement{constructor(){if(super(),Cn(this,Ie,void 0),Cn(this,$a,hl),Cn(this,Va,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=pl.content.cloneNode(!0);t.appendChild(a)}let{style:e}=D(this.shadowRoot,":host");Kt(this,Va,e)}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED,o.MEDIA_LOADING,cl.LOADING_DELAY]}attributeChangedCallback(e,t,a){var r,n,s,l,u;e===cl.LOADING_DELAY&&t!==a?this.loadingDelay=Number(a):e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Ft(this,Ie))==null?void 0:r.unassociateElement)==null||n.call(r,this),Kt(this,Ie,null)),a&&(Kt(this,Ie,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=Ft(this,Ie))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Kt(this,Ie,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Ft(this,Ie))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Ft(this,Ie))==null?void 0:e.unassociateElement)==null||t.call(e,this),Kt(this,Ie,null)}get loadingDelay(){return Ft(this,$a)}set loadingDelay(e){Kt(this,$a,e),Ft(this,Va).setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return C(this,o.MEDIA_PAUSED)}set mediaPaused(e){M(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return C(this,o.MEDIA_LOADING)}set mediaLoading(e){M(this,o.MEDIA_LOADING,e)}};Ie=new WeakMap;$a=new WeakMap;Va=new WeakMap;d.customElements.get("media-loading-indicator")||d.customElements.define("media-loading-indicator",Rn);var Gu=100,Zu=1,qu=i=>i.mediaMuted?0:Math.round(i.mediaVolume*i.range.max),Qu=({value:i,max:e})=>`${Math.round(i/e*100)}%`,wn=class extends Et{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME,o.MEDIA_MUTED,o.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.max=Gu,this.range.addEventListener("input",()=>{let t=this.range.value/this.range.max,a=new d.CustomEvent(v.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(a)})}connectedCallback(){this.range.setAttribute("aria-label",Q.VOLUME()),super.connectedCallback()}attributeChangedCallback(e,t,a){if(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED){let r=qu(this);this.range.value=r,this.range.setAttribute("aria-valuetext",Qu(this.range)),this.updateBar()}super.attributeChangedCallback(e,t,a)}get mediaVolume(){return k(this,o.MEDIA_VOLUME,Zu)}set mediaVolume(e){w(this,o.MEDIA_VOLUME,e)}get mediaMuted(){return C(this,o.MEDIA_MUTED)}set mediaMuted(e){M(this,o.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return N(this,o.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){O(this,o.MEDIA_VOLUME_UNAVAILABLE,e)}};d.customElements.get("media-volume-range")||d.customElements.define("media-volume-range",wn);var Pn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Z=(i,e,t)=>(Pn(i,e,"read from private field"),t?t.call(i):e.get(i)),ue=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},he=(i,e,t,a)=>(Pn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Oe=(i,e,t)=>(Pn(i,e,"access private method"),t),Se,ze,Gt,_i,Ha,Wa,xn,Yt,Dn,yi,Fa,Ka,On,Nn,El,Un,vl,zu=`
|
|
771
|
+
<svg aria-hidden="true" viewBox="0 1 24 24" part="select-indicator indicator">
|
|
772
|
+
<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"/>
|
|
773
|
+
</svg>`;function Xe(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 Ne(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 bl=m.createElement("template");bl.innerHTML=`
|
|
771
774
|
<style>
|
|
772
|
-
:host
|
|
775
|
+
:host {
|
|
773
776
|
font: var(--media-font,
|
|
774
777
|
var(--media-font-weight, normal)
|
|
775
|
-
var(--media-font-size,
|
|
778
|
+
var(--media-font-size, 15px) /
|
|
776
779
|
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
777
780
|
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
778
781
|
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
779
782
|
background: var(--media-listbox-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8))));
|
|
780
|
-
|
|
781
|
-
display: inline-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
783
|
+
border-radius: var(--media-listbox-border-radius);
|
|
784
|
+
display: inline-block;
|
|
785
|
+
padding-block: .5em;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
::slotted([slot="header"]) {
|
|
789
|
+
padding: 0 1.4em .4em;
|
|
790
|
+
margin-bottom: .5em;
|
|
791
|
+
border-bottom: 1px solid rgb(255 255 255 / .25);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
media-chrome-option {
|
|
795
|
+
padding-inline: .7em 1.4em;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
media-chrome-option > span {
|
|
799
|
+
margin-inline: .5ch;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
[part~="indicator"] {
|
|
803
|
+
fill: var(--media-option-indicator-fill, var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));
|
|
804
|
+
height: var(--media-option-indicator-height, 1.25em);
|
|
805
|
+
vertical-align: var(--media-option-indicator-vertical-align, text-top);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
[part~="select-indicator"] {
|
|
809
|
+
visibility: hidden;
|
|
786
810
|
}
|
|
787
811
|
|
|
788
|
-
|
|
789
|
-
|
|
812
|
+
[aria-selected="true"] > [part~="select-indicator"] {
|
|
813
|
+
visibility: visible;
|
|
814
|
+
}
|
|
815
|
+
</style>
|
|
816
|
+
<slot name="header"></slot>
|
|
817
|
+
<slot id="container"></slot>
|
|
818
|
+
<slot name="select-indicator" hidden>${zu}</slot>
|
|
819
|
+
`;var ke=class extends d.HTMLElement{constructor(e={}){super(),ue(this,Wa),ue(this,yi),ue(this,Ka),ue(this,Nn),ue(this,Un),ue(this,Se,void 0),ue(this,ze,""),ue(this,Gt,null),ue(this,_i,!1),ue(this,Ha,t=>{this.handleClick(t)}),ue(this,Yt,t=>{let{key:a}=t;if(a==="Escape"){this.removeEventListener("keyup",Z(this,Yt));return}if(a==="Meta"){he(this,_i,!1);return}Oe(this,Wa,xn).call(this,t)}),ue(this,Dn,t=>{let{key:a,altKey:r}=t;if(r){this.removeEventListener("keyup",Z(this,Yt));return}if(a==="Meta"){he(this,_i,!0);return}if(this.keysUsed.includes(a)&&t.preventDefault(),Z(this,_i)&&this.keysUsed.includes(a)){Oe(this,Wa,xn).call(this,t);return}this.addEventListener("keyup",Z(this,Yt),{once:!0})}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=bl.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",A.MEDIA_CONTROLLER]}static formatOptionText(e){return e}formatOptionText(e,t){return this.constructor.formatOptionText(e,t)}get options(){var e;let t=this.querySelectorAll("media-chrome-option");return t.length||(t=(e=this.container)==null?void 0:e.querySelectorAll("media-chrome-option")),Array.from(t)}get selectedOptions(){return this.options.filter(e=>e.selected)}get value(){var e,t;return(t=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?t:""}set value(e){let t=this.options.find(a=>a.value===e);!t||Oe(this,Ka,On).call(this,t)}focus(){var e;(e=this.selectedOptions[0])==null||e.focus()}enable(){this.addEventListener("click",Z(this,Ha)),this.addEventListener("keydown",Z(this,Dn))}disable(){this.removeEventListener("click",Z(this,Ha)),this.removeEventListener("keyup",Z(this,Yt))}attributeChangedCallback(e,t,a){var r,n,s,l,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=Z(this,Se))==null?void 0:r.unassociateElement)==null||n.call(r,this),he(this,Se,null)),a&&(he(this,Se,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=Z(this,Se))==null?void 0:l.associateElement)==null||u.call(l,this))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;this.hasAttribute("disabled")||this.enable(),this.hasAttribute("role")||this.setAttribute("role","listbox");let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(he(this,Se,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Z(this,Se))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=Z(this,Se))==null?void 0:e.unassociateElement)==null||t.call(e,this),he(this,Se,null)}get keysUsed(){return["Enter"," ","ArrowDown","ArrowUp","Home","End"]}handleSelection(e,t){let a=Oe(this,yi,Fa).call(this,e);!a||Oe(this,Ka,On).call(this,a,t)}handleMovement(e){let{key:t}=e,a=this.options,r=Oe(this,yi,Fa).call(this,e);r||(r=a.filter(s=>s.getAttribute("tabindex")==="0")[0]);let n;switch(t){case"ArrowDown":n=r.nextElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.nextElementSibling);break;case"ArrowUp":n=r.previousElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.previousElementSibling);break;case"Home":n=a[0];break;case"End":n=a[a.length-1];break;default:n=Oe(this,Nn,El).call(this,t);break}n&&(a.forEach(s=>s.setAttribute("tabindex","-1")),n.setAttribute("tabindex","0"),n.focus())}handleClick(e){let t=Oe(this,yi,Fa).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"))}};Se=new WeakMap;ze=new WeakMap;Gt=new WeakMap;_i=new WeakMap;Ha=new WeakMap;Wa=new WeakSet;xn=function(i){let{key:e}=i;e==="Enter"||e===" "?this.handleSelection(i,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"):this.handleMovement(i)};Yt=new WeakMap;Dn=new WeakMap;yi=new WeakSet;Fa=function(i){let e=i.composedPath(),t=e.findIndex(a=>a.nodeName==="MEDIA-CHROME-OPTION");return e[t]};Ka=new WeakSet;On=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"))};Nn=new WeakSet;El=function(i){Oe(this,Un,vl).call(this);let e=this.options,t=e.findIndex(c=>c.getAttribute("tabindex")==="0");he(this,ze,Z(this,ze)+i);let a=Z(this,ze).split("").every(c=>c===i),r=e.slice(t+(a?1:0)).filter(c=>c.textContent.toLowerCase().startsWith(Z(this,ze))),n=e.slice(0,t-(a?1:0)).filter(c=>c.textContent.toLowerCase().startsWith(Z(this,ze))),s=[],l=[];return a&&(s=e.slice(t+(a?1:0)).filter(c=>c.textContent.startsWith(i)),l=e.slice(0,t-(a?1:0)).filter(c=>c.textContent.startsWith(i))),[...r,...n,...s,...l][0]};Un=new WeakSet;vl=function(){clearTimeout(Z(this,Gt)),he(this,Gt,null),he(this,Gt,setTimeout(()=>{he(this,ze,""),he(this,Gt,null)},500))};d.customElements.get("media-chrome-listbox")||d.customElements.define("media-chrome-listbox",ke);var Fn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Vn=(i,e,t)=>(Fn(i,e,"read from private field"),t?t.call(i):e.get(i)),Bn=(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)=>(Fn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),fl=(i,e,t)=>(Fn(i,e,"access private method"),t),Ya,Zt,Ga,Hn,gl=m.createElement("template");gl.innerHTML=`
|
|
820
|
+
<style>
|
|
821
|
+
:host {
|
|
822
|
+
cursor: pointer;
|
|
823
|
+
display: block;
|
|
824
|
+
line-height: revert;
|
|
825
|
+
white-space: nowrap;
|
|
826
|
+
white-space-collapse: collapse;
|
|
827
|
+
text-wrap: nowrap;
|
|
828
|
+
min-height: 1.2em;
|
|
829
|
+
padding: .4em .5em;
|
|
830
|
+
transition: var(--media-option-transition);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
:host(:focus-visible) {
|
|
790
834
|
box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9);
|
|
791
835
|
outline: 0;
|
|
792
836
|
}
|
|
793
837
|
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
background
|
|
838
|
+
:host(:hover) {
|
|
839
|
+
cursor: pointer;
|
|
840
|
+
background: var(--media-option-hover-background, rgb(82 82 122 / .8));
|
|
841
|
+
outline: var(--media-option-hover-outline);
|
|
797
842
|
}
|
|
798
843
|
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
844
|
+
:host([aria-selected="true"]) {
|
|
845
|
+
background: var(--media-option-selected-background);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
:host([disabled]) {
|
|
849
|
+
pointer-events: none;
|
|
850
|
+
color: rgba(255, 255, 255, .3);
|
|
803
851
|
}
|
|
804
852
|
</style>
|
|
805
|
-
<
|
|
806
|
-
|
|
807
|
-
</ul>
|
|
808
|
-
`;var Ka=class extends d.HTMLElement{constructor(e={}){if(super(),J(this,De),J(this,qe),J(this,Ha),J(this,ki),J(this,Fa),J(this,vn),J(this,gn),J(this,Qe,""),J(this,Gt,null),J(this,Ti,void 0),J(this,Zt,void 0),J(this,Ii,!1),J(this,Va,t=>{this.handleClick(t)}),J(this,Yt,t=>{let{key:a}=t;if(a==="Escape"){this.removeEventListener("keyup",L(this,Yt));return}if(a==="Meta"){ue(this,Ii,!1);return}xe(this,Ha,pn).call(this,t)}),J(this,En,t=>{let{key:a,altKey:r}=t;if(r){this.removeEventListener("keyup",L(this,Yt));return}if(a==="Meta"){ue(this,Ii,!0);return}if(this.keysUsed.includes(a)&&t.preventDefault(),L(this,Ii)&&this.keysUsed.includes(a)){xe(this,Ha,pn).call(this,t);return}this.addEventListener("keyup",L(this,Yt),{once:!0})}),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=Fo.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)}ue(this,Ti,this.shadowRoot.querySelector("slot")),L(this,Ti).addEventListener("slotchange",()=>{ue(this,De,L(this,Ti).assignedElements({flatten:!0}),hn),L(this,De,qt).length===1&&L(this,De,qt)[0].nodeName.toLowerCase()==="slot"&&ue(this,De,L(this,De,qt)[0].assignedElements({flatten:!0}),hn);let t=L(this,qe,ct);if(t.some(n=>n.getAttribute("tabindex")==="0"))return;let r=t.filter(n=>n.getAttribute("aria-selected")==="true")[0];r||(r=t[0]),r&&(r.setAttribute("tabindex",0),r.setAttribute("aria-selected","true"))})}static get observedAttributes(){return["disabled",g.MEDIA_CONTROLLER]}get selectedOptions(){return L(this,qe,ct).filter(e=>e.getAttribute("aria-selected")==="true")}get value(){return this.selectedOptions[0].value||this.selectedOptions[0].textContent}set value(e){let t=L(this,qe,ct).find(a=>a.value===e||a.textContent===e);!t||xe(this,Fa,bn).call(this,t)}focus(){var e;(e=this.selectedOptions[0])==null||e.focus()}enable(){this.addEventListener("click",L(this,Va)),this.addEventListener("keydown",L(this,En))}disable(){this.removeEventListener("click",L(this,Va)),this.removeEventListener("keyup",L(this,Yt))}attributeChangedCallback(e,t,a){var r,n;if(e===g.MEDIA_CONTROLLER){if(t){let s=c.getElementById(t);(r=s==null?void 0:s.unassociateElement)==null||r.call(s,this)}if(a){let s=c.getElementById(a);(n=s==null?void 0:s.associateElement)==null||n.call(s,this)}}else e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e;this.hasAttribute("disabled")||this.enable(),this.hasAttribute("role")||this.setAttribute("role","listbox");let t=this.getAttribute(g.MEDIA_CONTROLLER);if(t){let a=c.getElementById(t);(e=a==null?void 0:a.associateElement)==null||e.call(a,this)}}disconnectedCallback(){var e;this.disable();let t=this.getAttribute(g.MEDIA_CONTROLLER);if(t){let a=c.getElementById(t);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}get keysUsed(){return["Enter"," ","ArrowDown","ArrowUp","Home","End"]}handleSelection(e,t){let a=xe(this,ki,Wa).call(this,e);!a||xe(this,Fa,bn).call(this,a,t)}handleMovement(e){let{key:t}=e,a=L(this,qe,ct),r=xe(this,ki,Wa).call(this,e);r||(r=a.filter(s=>s.getAttribute("tabindex")==="0")[0]);let n;switch(t){case"ArrowDown":n=r.nextElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.nextElementSibling);break;case"ArrowUp":n=r.previousElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.previousElementSibling);break;case"Home":n=a[0];break;case"End":n=a[a.length-1];break;default:n=xe(this,vn,Ho).call(this,t);break}n&&(a.forEach(s=>s.setAttribute("tabindex","-1")),n.setAttribute("tabindex","0"),n.focus())}handleClick(e){let t=xe(this,ki,Wa).call(this,e);!t||t.hasAttribute("disabled")||(L(this,qe,ct).forEach(a=>a.setAttribute("tabindex","-1")),t.setAttribute("tabindex","0"),this.handleSelection(e,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"))}};Qe=new WeakMap;Gt=new WeakMap;Ti=new WeakMap;Zt=new WeakMap;Ii=new WeakMap;De=new WeakSet;qt=function(){return L(this,Zt)||ue(this,Zt,Array.from(this.shadowRoot.querySelectorAll("media-chrome-listitem"))),L(this,Zt)};hn=function(i){ue(this,Zt,i)};qe=new WeakSet;ct=function(){return L(this,De,qt).filter(i=>!i.hasAttribute("disabled"))};Va=new WeakMap;Ha=new WeakSet;pn=function(i){let{key:e}=i;e==="Enter"||e===" "?this.handleSelection(i,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"):this.handleMovement(i)};Yt=new WeakMap;En=new WeakMap;ki=new WeakSet;Wa=function(i){let e=i.composedPath(),t=e.findIndex(a=>a.nodeName==="MEDIA-CHROME-LISTITEM");return e[t]};Fa=new WeakSet;bn=function(i,e){(!this.hasAttribute("aria-multiselectable")||this.getAttribute("aria-multiselectable")!=="true")&&L(this,De,qt).forEach(t=>t.setAttribute("aria-selected","false")),e&&i.getAttribute("aria-selected")==="true"?i.setAttribute("aria-selected","false"):i.setAttribute("aria-selected","true"),this.dispatchEvent(new Event("change"))};vn=new WeakSet;Ho=function(i){xe(this,gn,Wo).call(this);let e=L(this,qe,ct),t=e.findIndex(m=>m.getAttribute("tabindex")==="0");ue(this,Qe,L(this,Qe)+i);let a=L(this,Qe).split("").every(m=>m===i),r=e.slice(t+(a?1:0)).filter(m=>m.textContent.toLowerCase().startsWith(L(this,Qe))),n=e.slice(0,t-(a?1:0)).filter(m=>m.textContent.toLowerCase().startsWith(L(this,Qe))),s=[],l=[];return a&&(s=e.slice(t+(a?1:0)).filter(m=>m.textContent.startsWith(i)),l=e.slice(0,t-(a?1:0)).filter(m=>m.textContent.startsWith(i))),[...r,...n,...s,...l][0]};gn=new WeakSet;Wo=function(){d.clearTimeout(L(this,Gt)),ue(this,Gt,null),ue(this,Gt,d.setTimeout(()=>{ue(this,Qe,""),ue(this,Gt,null)},500))};d.customElements.get("media-chrome-listbox")||d.customElements.define("media-chrome-listbox",Ka);var Ko=Ka;var yn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},E=(i,e,t)=>(yn(i,e,"read from private field"),t?t.call(i):e.get(i)),z=(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)=>(yn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Oe=(i,e,t)=>(yn(i,e,"access private method"),t),Qt,Si,zt,K,Mi,O,Se,Li,mt,Xt,Ya,An,Yo,_n,Go,Jt,wi,Tn,Zo,Ga,In,qo=c.createElement("template");qo.innerHTML=`
|
|
853
|
+
<slot></slot>
|
|
854
|
+
`;var Je={VALUE:"value",SELECTED:"selected",DISABLED:"disabled"},Za=class extends d.HTMLElement{constructor(){super(),Bn(this,Ga),Bn(this,Ya,!1),Bn(this,Zt,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(gl.content.cloneNode(!0)))}static get observedAttributes(){return[Je.DISABLED,Je.SELECTED,Je.VALUE]}get value(){var e;return(e=this.getAttribute(Je.VALUE))!=null?e:this.text}set value(e){this.setAttribute(Je.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get selected(){return this.getAttribute("aria-selected")==="true"}set selected(e){$n(this,Ya,!0),this.setAttribute("aria-selected",e?"true":"false")}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===Je.SELECTED&&!Vn(this,Ya)?this.setAttribute("aria-selected",a!=null?"true":"false"):e===Je.DISABLED&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Je.DISABLED)||this.enable(),this.setAttribute("role","option"),$n(this,Zt,Wn(this,this.parentNode)),fl(this,Ga,Hn).call(this)}disconnectedCallback(){this.disable(),fl(this,Ga,Hn).call(this),$n(this,Zt,null)}handleClick(){}};Ya=new WeakMap;Zt=new WeakMap;Ga=new WeakSet;Hn=function(){var i;let e=(i=Vn(this,Zt))==null?void 0:i.options;if(!e)return;let t=e.filter(a=>a.getAttribute("aria-selected")==="true").pop();t||(t=e[0]),Vn(this,Zt).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 Wn(i,e){if(!i)return null;let{host:t}=i.getRootNode();return!e&&t?Wn(i,t):e!=null&&e.options?e:Wn(e,e==null?void 0:e.parentNode)}d.customElements.get("media-chrome-option")||d.customElements.define("media-chrome-option",Za);var Gn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},h=(i,e,t)=>(Gn(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)},X=(i,e,t,a)=>(Gn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Pe=(i,e,t)=>(Gn(i,e,"access private method"),t),Me,qt,Ti,Qt,F,Ii,P,Le,Si,vt,zt,qa,Kn,Al,Yn,_l,Xt,ki,Zn,yl,Qa,qn,Tl=m.createElement("template");Tl.innerHTML=`
|
|
809
855
|
<style>
|
|
810
856
|
:host {
|
|
857
|
+
font: var(--media-font,
|
|
858
|
+
var(--media-font-weight, normal)
|
|
859
|
+
var(--media-font-size, 15px) /
|
|
860
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
861
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
862
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
811
863
|
display: inline-flex;
|
|
812
864
|
position: relative;
|
|
813
865
|
flex-shrink: .5;
|
|
@@ -820,6 +872,24 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
820
872
|
bottom: 100%;
|
|
821
873
|
max-height: 300px;
|
|
822
874
|
overflow: hidden auto;
|
|
875
|
+
transition: var(--media-selectmenu-transition-in,
|
|
876
|
+
visibility 0s, transform .15s ease-out, opacity .15s ease-out);
|
|
877
|
+
transform: var(--media-listbox-transform-in, translateY(0) scale(1));
|
|
878
|
+
visibility: visible;
|
|
879
|
+
opacity: 1;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
[name="listbox"][hidden]::slotted(*),
|
|
883
|
+
[hidden] [part=listbox] {
|
|
884
|
+
transition: var(--media-selectmenu-transition-out,
|
|
885
|
+
visibility .15s ease-out, transform .15s ease-out, opacity .15s ease-out);
|
|
886
|
+
transform: var(--media-listbox-transform-out, translateY(2px) scale(.99));
|
|
887
|
+
visibility: hidden;
|
|
888
|
+
opacity: 0;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
slot[name="listbox"][hidden] {
|
|
892
|
+
display: block;
|
|
823
893
|
}
|
|
824
894
|
</style>
|
|
825
895
|
|
|
@@ -833,40 +903,17 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
833
903
|
<slot></slot>
|
|
834
904
|
</media-chrome-listbox>
|
|
835
905
|
</slot>
|
|
836
|
-
`;var
|
|
837
|
-
<
|
|
838
|
-
:host {
|
|
839
|
-
display: list-item;
|
|
840
|
-
line-height: 1em;
|
|
841
|
-
padding: 0.5em;
|
|
842
|
-
margin: 0em;
|
|
843
|
-
cursor: pointer;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
::slotted:not(:focus-visible) {
|
|
847
|
-
outline: none;
|
|
848
|
-
}
|
|
849
|
-
</style>
|
|
850
|
-
<li>
|
|
851
|
-
<slot></slot>
|
|
852
|
-
</li>
|
|
853
|
-
`;var kn={VALUE:"value"},Sn=class extends d.HTMLElement{static get observedAttributes(){return["disabled","aria-selected",kn.VALUE,g.MEDIA_CONTROLLER]}constructor(){if(super(),!this.shadowRoot){let e=this.attachShadow({mode:"open"}),t=zo.content.cloneNode(!0);this.nativeEl=t,e.appendChild(t)}}set value(e){this.setAttribute(kn.VALUE,e)}get value(){return this.getAttribute(kn.VALUE)}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){var r,n;if(e===g.MEDIA_CONTROLLER){if(t){let s=c.getElementById(t);(r=s==null?void 0:s.unassociateElement)==null||r.call(s,this)}if(a){let s=c.getElementById(a);(n=s==null?void 0:s.associateElement)==null||n.call(s,this)}}else e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e;this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","option");let t=this.getAttribute(g.MEDIA_CONTROLLER);if(t){let a=c.getElementById(t);(e=a==null?void 0:a.associateElement)==null||e.call(a,this)}}disconnectedCallback(){var e;this.disable();let t=this.getAttribute(g.MEDIA_CONTROLLER);if(t){let a=c.getElementById(t);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}handleClick(){}};d.customElements.get("media-chrome-listitem")||d.customElements.define("media-chrome-listitem",Sn);var Cn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},re=(i,e,t)=>(Cn(i,e,"read from private field"),t?t.call(i):e.get(i)),ht=(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)},pt=(i,e,t,a)=>(Cn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Et=(i,e,t)=>(Cn(i,e,"access private method"),t),jt,Ne,me,Mn,Jo,Rn,jo,Ci,qa,Qa,Ln,el=`
|
|
854
|
-
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
855
|
-
height: var(--media-captions-indicator-height, 1em);
|
|
856
|
-
vertical-align: var(--media-captions-indicator-vertical-align, bottom);
|
|
857
|
-
margin-inline-start: 1ch;
|
|
858
|
-
`,fu=`
|
|
859
|
-
<svg style="${el}" aria-hidden="true" viewBox="0 0 26 24">
|
|
906
|
+
`;var Ce=class extends d.HTMLElement{constructor(){var e;super(),q(this,Kn),q(this,Yn),q(this,Xt),q(this,Zn),q(this,Qa),q(this,Me,void 0),q(this,qt,void 0),q(this,Ti,void 0),q(this,Qt,!0),q(this,F,void 0),q(this,Ii,void 0),q(this,P,void 0),q(this,Le,void 0),q(this,Si,!1),q(this,vt,a=>{let{key:r}=a;if(!this.keysUsed.includes(r)){this.removeEventListener("keyup",h(this,vt));return}a.composedPath().includes(h(this,F))&&(r==="Enter"||r===" ")?h(this,qt).call(this):r==="Escape"&&!h(this,Le).hidden&&Pe(this,Xt,ki).call(this)}),q(this,zt,a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!this.keysUsed.includes(s)){this.removeEventListener("keyup",h(this,vt));return}a.preventDefault(),this.addEventListener("keyup",h(this,vt),{once:!0})}),q(this,qa,a=>{a.composedPath().includes(this)||h(this,Le).hidden||Pe(this,Xt,ki).call(this)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Tl.content.cloneNode(!0)));let{style:t}=D(this.shadowRoot,":host");t.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),X(this,qt,Pe(this,Kn,Al).bind(this)),X(this,Ti,Pe(this,Yn,_l).bind(this)),(e=this.init)==null||e.call(this),X(this,F,this.shadowRoot.querySelector("[part=button]")),X(this,P,this.shadowRoot.querySelector("[part=listbox]")),X(this,Ii,this.shadowRoot.querySelector("slot[name=button]")),h(this,Ii).addEventListener("slotchange",()=>{let a=h(this,Ii).assignedElements()[0];!a||(this.disable(),X(this,F,a),h(this,F).preventClick=!0,h(this,F).hasAttribute("disabled")&&X(this,Qt,!1),h(this,Qt)?(this.enable(),h(this,F).setAttribute("aria-haspopup","listbox")):this.disable())}),X(this,Le,this.shadowRoot.querySelector("slot[name=listbox]")),h(this,Le).addEventListener("slotchange",()=>{this.disable(),X(this,P,h(this,Le).assignedElements()[0]||h(this,P)),this.enable()})}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){h(this,F).removeAttribute("disabled"),h(this,F).addEventListener("click",h(this,qt)),h(this,F).addEventListener("keydown",h(this,zt)),h(this,P).addEventListener("keydown",h(this,zt)),Pe(this,Qa,qn).call(this),h(this,P).addEventListener("change",h(this,Ti)),m.addEventListener("click",h(this,qa))}disable(){h(this,F).setAttribute("disabled",""),h(this,F).removeEventListener("click",h(this,qt)),h(this,F).removeEventListener("keydown",h(this,zt)),h(this,F).removeEventListener("keyup",h(this,vt)),h(this,P).removeEventListener("keydown",h(this,zt)),h(this,P).removeEventListener("keyup",h(this,vt)),h(this,P).addEventListener("change",h(this,Ti)),m.removeEventListener("click",h(this,qa))}attributeChangedCallback(e,t,a){var r,n,s,l,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=h(this,Me))==null?void 0:r.unassociateElement)==null||n.call(r,this),X(this,Me,null),h(this,P).removeAttribute(A.MEDIA_CONTROLLER)),a&&(X(this,Me,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=h(this,Me))==null?void 0:l.associateElement)==null||u.call(l,this),h(this,P).setAttribute(A.MEDIA_CONTROLLER,a))):e==="disabled"&&a!==t&&(a==null?(X(this,Qt,!0),this.enable()):(X(this,Qt,!1),this.disable()))}connectedCallback(){var e,t,a;this.hasAttribute("disabled")||this.enable();let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(X(this,Me,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=h(this,Me))==null?void 0:t.associateElement)==null||a.call(t,this),h(this,P).setAttribute(A.MEDIA_CONTROLLER,r))}disconnectedCallback(){var e,t;this.disable(),(t=(e=h(this,Me))==null?void 0:e.unassociateElement)==null||t.call(e,this),X(this,Me,null),h(this,P).removeAttribute(A.MEDIA_CONTROLLER)}get keysUsed(){return["Enter","Escape"," ","ArrowUp","ArrowDown","f","c","k","m"]}};Me=new WeakMap;qt=new WeakMap;Ti=new WeakMap;Qt=new WeakMap;F=new WeakMap;Ii=new WeakMap;P=new WeakMap;Le=new WeakMap;Si=new WeakMap;vt=new WeakMap;zt=new WeakMap;qa=new WeakMap;Kn=new WeakSet;Al=function(){Pe(this,Xt,ki).call(this)};Yn=new WeakSet;_l=function(){Pe(this,Xt,ki).call(this,!0)};Xt=new WeakSet;ki=function(i){h(this,Le).hidden=!h(this,Le).hidden||i,Pe(this,Qa,qn).call(this,i),h(this,Le).hidden?(this.shadowRoot.activeElement===h(this,P)||h(this,P).contains(this.shadowRoot.activeElement))&&h(this,F).focus():(h(this,P).focus(),Pe(this,Zn,yl).call(this))};Zn=new WeakSet;yl=function(){var i;if(h(this,P).offsetWidth===0)return;let e=h(this,F).getBoundingClientRect();if(this.hasAttribute("mediacontroller")||h(this,F).hasAttribute("mediacontroller")||h(this,P).hasAttribute("mediacontroller")){h(this,P).style.zIndex="1",h(this,P).style.bottom="unset",h(this,P).style.top=e.height+"px";return}let t=(i=this.getAttribute("bounds")?ut(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?i:this,a=h(this,P).offsetWidth,r=t.getBoundingClientRect(),n=-Math.max(e.x+a-r.right,0);h(this,P).style.left=`${n}px`};Qa=new WeakSet;qn=function(i=!1){X(this,Si,!h(this,Si)||i),h(this,F).setAttribute("aria-expanded",h(this,Si))};d.customElements.get("media-chrome-selectmenu")||d.customElements.define("media-chrome-selectmenu",Ce);var jn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Xu=(i,e,t)=>(jn(i,e,"read from private field"),t?t.call(i):e.get(i)),Qn=(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)},Ju=(i,e,t,a)=>(jn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),zn=(i,e,t)=>(jn(i,e,"access private method"),t),Xa,Xn,kl,za,Jn,ju=`
|
|
907
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
|
|
860
908
|
<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"/>
|
|
861
|
-
</svg>`,
|
|
862
|
-
<
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
</
|
|
867
|
-
|
|
868
|
-
`;var Xo=(i,e)=>i.label===e.label&&i.language===e.language,wn=class extends Ko{constructor(){super({slotTemplate:tl}),ht(this,Mn),ht(this,Rn),ht(this,Ci),ht(this,Qa),ht(this,jt,[]),ht(this,Ne,void 0),ht(this,me,void 0);let e=c.createElement("media-chrome-listitem");e.part.add("listitem"),e.value="off",e.textContent="Off",pt(this,Ne,e);let t=this.shadowRoot.querySelector('[name="captions-indicator"]');pt(this,me,t.firstElementChild),t.addEventListener("slotchange",()=>{let a=t.assignedElements();if(a.length===1&&a[0].nodeName.toLowerCase()==="slot"){let r=a[0].assignedElements();r.length===0?pt(this,me,a[0].firstElementChild):r.length===1&&pt(this,me,r[0])}re(this,me)||pt(this,me,t.firstElementChild),pt(this,me,re(this,me).cloneNode(!0)),re(this,me).removeAttribute("slot"),re(this,me).setAttribute("style",el)})}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,a){if(e===o.MEDIA_SUBTITLES_LIST&&t!==a)pt(this,jt,Et(this,Mn,Jo).call(this,a,re(this,jt))),Et(this,Ci,qa).call(this);else if(e===o.MEDIA_SUBTITLES_SHOWING&&t!==a){let r=Nt(a!=null?a:"")[0];re(this,jt).forEach(n=>{n.selected=n.language===r.language&&n.label===r.label}),Et(this,Ci,qa).call(this)}else e==="aria-multiselectable"&&(this.removeAttribute("aria-multiselectable"),console.warn("Captions List doesn't currently support multiple selections. You can enable multiple items via the media.textTrack API."));super.attributeChangedCallback(e,t,a)}connectedCallback(){Et(this,Ci,qa).call(this),this.addEventListener("change",Et(this,Qa,Ln)),super.connectedCallback()}disconnectedCallback(){this.removeEventListener("change",Et(this,Qa,Ln)),super.disconnectedCallback()}};jt=new WeakMap;Ne=new WeakMap;me=new WeakMap;Mn=new WeakSet;Jo=function(i,e){let t=i?Nt(i!=null?i:""):[],a=[],r=[];return e.forEach(n=>{t.some(s=>Xo(s,n))||a.push(n)}),t.forEach(n=>{e.some(s=>Xo(s,n))||r.push(n)}),a.forEach(n=>n.el.remove()),e.filter(n=>!a.includes(n)).concat(r)};Rn=new WeakSet;jo=function(i){let e=this.shadowRoot.querySelector("ul slot");i.forEach(t=>{var a;let r=t.el,n=!0,s=(a=t.kind)!=null?a:"subs";if(!r){r=c.createElement("media-chrome-listitem"),n=!1,r.part.add("listitem"),r.value=kr(t);let l=c.createElement("span");l.textContent=t.label,r.append(l),s==="captions"&&r.append(re(this,me).cloneNode(!0))}t.selected?r.setAttribute("aria-selected","true"):r.setAttribute("aria-selected","false"),n||(e.append(r),t.el=r)})};Ci=new WeakSet;qa=function(){let i=this.shadowRoot.querySelector("ul slot");i.contains(re(this,Ne))||i.append(re(this,Ne)),this.hasAttribute(o.MEDIA_SUBTITLES_SHOWING)?(re(this,Ne).setAttribute("aria-selected","false"),re(this,Ne).setAttribute("tabindex","-1")):(re(this,Ne).setAttribute("aria-selected","true"),re(this,Ne).setAttribute("tabindex","0")),Et(this,Rn,jo).call(this,re(this,jt))};Qa=new WeakSet;Ln=function(){var i;let e=(i=this.selectedOptions[0])==null?void 0:i.value;if(Ce(this,!1),!e)return;let t=new d.CustomEvent(b.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)};d.customElements.get("media-captions-listbox")||d.customElements.define("media-captions-listbox",wn);var xn=class extends Qo{constructor(){super()}init(){let e=c.createElement("media-captions-button");e.part.add("button"),e.preventClick=!0;let t=c.createElement("media-captions-listbox");t.part.add("listbox"),t.setAttribute("exportparts","listitem");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)}};d.customElements.get("media-captions-selectmenu")||d.customElements.define("media-captions-selectmenu",xn);var A=Ql(require("@mux/mux-video")),P=require("@mux/playback-core");var ul=require("@mux/mux-video");var gu="en",bt={code:gu};var il="en";function y(i,e=!0){var r,n;let t=e&&(n=(r=bt)==null?void 0:r[i])!=null?n:i,a=e?bt.code:il;return new Dn(t,a)}var Dn=class{constructor(e,t=(a=>(a=bt.code)!=null?a:il)()){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 al(i){let e="";return Object.entries(i).forEach(([t,a])=>{a!=null&&(e+=`${za(t)}: ${a}; `)}),e?e.trim():void 0}function za(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Xa(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Pe(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function Ja(i){let e=Au(i).toString();return e?"?"+e:""}function Au(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}function ze(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 On=(i,e)=>!i||!e?!1:i.contains(e)?!0:On(i,e.getRootNode().host);var ja=require("@mux/playback-core");var Nn="mux.com",_u=()=>{try{return"1.11.4"}catch{}return"UNKNOWN"},yu=_u(),tr=()=>yu,Pn=(i,{maxResolution:e,token:t,domain:a=Nn}={})=>{let s=!!t?{token:t}:{redundant_streams:!0,...e?{max_resolution:e}:{}};return`https://stream.${a}/${i}.m3u8${Ja(s)}`},rl=(i,{token:e,thumbnailTime:t,domain:a=Nn}={})=>{let r=e==null?t:void 0,{aud:n}=ze(e);if(!(e&&n!=="t"))return`https://image.${a}/${i}/thumbnail.webp${Ja({token:e,time:r})}`},nl=(i,{token:e,domain:t=Nn}={})=>{let{aud:a}=ze(e);if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${Ja({token:e,format:"webp"})}`},Ri=i=>{if(!!i){if([ja.StreamTypes.LIVE,ja.StreamTypes.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return ja.StreamTypes.LIVE}};var Tu={crossorigin:"crossOrigin",playsinline:"playsInline"};function sl(i){var e;return(e=Tu[i])!=null?e:Xa(i)}var vt,ft,j,er=class{constructor(e,t){H(this,vt,void 0);H(this,ft,void 0);H(this,j,[]);le(this,vt,e),le(this,ft,t)}[Symbol.iterator](){return k(this,j).values()}get length(){return k(this,j).length}get value(){var e;return(e=k(this,j).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(le(this,j,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return k(this,j)[e]}values(){return k(this,j).values()}keys(){return k(this,j).keys()}forEach(e){k(this,j).forEach(e)}add(...e){var t,a;e.forEach(r=>{this.contains(r)||k(this,j).push(r)}),!(this.value===""&&!((t=k(this,vt))!=null&&t.hasAttribute(`${k(this,ft)}`)))&&((a=k(this,vt))==null||a.setAttribute(`${k(this,ft)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>{k(this,j).splice(k(this,j).indexOf(a),1)}),(t=k(this,vt))==null||t.setAttribute(`${k(this,ft)}`,`${this.value}`)}contains(e){return k(this,j).includes(e)}toggle(e,t){return typeof t!="undefined"?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){this.remove(e),this.add(t)}};vt=new WeakMap,ft=new WeakMap,j=new WeakMap;var ol=`[mux-player ${tr()}]`;function Xe(...i){console.warn(ol,...i)}function Ee(...i){console.error(ol,...i)}function Un(i){var t;let e=(t=i.message)!=null?t:"";if(i.context&&(e+=` ${i.context}`),i.file){let a="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${y("Read more: ")}
|
|
869
|
-
${a}${i.file}`}Xe(e)}var X={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},gt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},dl=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}}),Iu=ul.VideoEvents.filter(i=>i!=="error"),ku=Object.values(X).filter(i=>![X.PLAYSINLINE].includes(i)),Su=Object.values(gt);function cl(i){i.querySelectorAll(":scope > track").forEach(e=>{var t;(t=i.media)==null||t.append(e.cloneNode())}),Iu.forEach(e=>{var t;(t=i.media)==null||t.addEventListener(e,a=>{i.dispatchEvent(new Event(a.type))})})}var Bn=class extends F.HTMLElement{static get observedAttributes(){return[...ku,...Su]}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 l,u;let s=(l=this.media)==null?void 0:l.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 gt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case gt.VOLUME:{let s=(r=Pe(a))!=null?r:1;this.media&&(this.media.volume=s);return}case gt.PLAYBACKRATE:{let s=(n=Pe(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 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:dl}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:dl}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=Pe(this.getAttribute(gt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(gt.PLAYBACKRATE,`${e}`):this.removeAttribute(gt.PLAYBACKRATE)}get crossOrigin(){return xi(this,X.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(X.CROSSORIGIN,`${e}`)}get autoplay(){return xi(this,X.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(X.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(X.AUTOPLAY)}get loop(){return xi(this,X.LOOP)!=null}set loop(e){e?this.setAttribute(X.LOOP,""):this.removeAttribute(X.LOOP)}get muted(){var e,t;return(t=(e=this.media)==null?void 0:e.muted)!=null?t:!1}set muted(e){this.media&&(this.media.muted=Boolean(e))}get defaultMuted(){return xi(this,X.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(X.MUTED,""):this.removeAttribute(X.MUTED)}get playsInline(){return xi(this,X.PLAYSINLINE)!=null}set playsInline(e){Ee("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(e){["","none","metadata","auto"].includes(e)?this.setAttribute(X.PRELOAD,e):this.removeAttribute(X.PRELOAD)}};function xi(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var $n=Bn;var Mu=Object.defineProperty,Lu=(i,e,t)=>e in i?Mu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,wu=(i,e,t)=>(Lu(i,typeof e!="symbol"?e+"":e,t),t),bl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_=(i,e,t)=>(bl(i,e,"read from private field"),t?t.call(i):e.get(i)),Me=(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)},Ue=(i,e,t,a)=>(bl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ei,ir,At,Di,Je,je,et,_t,ti,ar,be,ml=1,hl=0,Cu=1,Ru={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 ee&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof ee?r.element[r.attributeName]=n:r.value=n}}}},Be=class extends d.DocumentFragment{constructor(e,t,a=Ru){var r;super(),Me(this,ei,void 0),Me(this,ir,void 0),this.append(e.content.cloneNode(!0)),Ue(this,ei,vl(this)),Ue(this,ir,a),(r=a.createCallback)==null||r.call(a,this,_(this,ei),t),a.processCallback(this,_(this,ei),t)}update(e){_(this,ir).processCallback(this,_(this,ei),e)}};ei=new WeakMap;ir=new WeakMap;var vl=(i,e=[])=>{let t,a;for(let r of i.attributes||[])if(r.value.includes("{{")){let n=new Vn;for([t,a]of El(r.value))if(!t)n.append(a);else{let s=new ee(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===ml&&!(r instanceof HTMLTemplateElement))vl(r,e);else if(r.nodeType===ml||r.data.includes("{{")){let n=[];if(r.data)for([t,a]of El(r.data))if(!t)n.push(new Text(a));else{let s=new $e(i);n.push(s),e.push([a,s])}else if(r instanceof HTMLTemplateElement){let s=new Oi(i,r);n.push(s),e.push([s.expression,s])}r.replaceWith(...n.flatMap(s=>s.replacementNodes||[s]))}return e},pl={},El=i=>{let e="",t=0,a=pl[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([hl,e]),e="",r++):n==="}"&&i[r+1]==="}"&&i[r-1]!=="\\"&&!--t?(a.push([Cu,e.trim()]),e="",r++):e+=n||"";return e&&a.push([hl,(t>0?"{{":"")+e]),pl[i]=a},xu=11,rr=class{get value(){return""}set value(e){}toString(){return this.value}},fl=new WeakMap,Vn=class{constructor(){Me(this,At,[])}[Symbol.iterator](){return _(this,At).values()}get length(){return _(this,At).length}item(e){return _(this,At)[e]}append(...e){for(let t of e)t instanceof ee&&fl.set(t,this),_(this,At).push(t)}toString(){return _(this,At).join("")}};At=new WeakMap;var ee=class extends rr{constructor(e,t,a){super(),Me(this,_t),Me(this,Di,""),Me(this,Je,void 0),Me(this,je,void 0),Me(this,et,void 0),Ue(this,Je,e),Ue(this,je,t),Ue(this,et,a)}get attributeName(){return _(this,je)}get attributeNamespace(){return _(this,et)}get element(){return _(this,Je)}get value(){return _(this,Di)}set value(e){_(this,Di)!==e&&(Ue(this,Di,e),!_(this,_t,ti)||_(this,_t,ti).length===1?e==null?_(this,Je).removeAttributeNS(_(this,et),_(this,je)):_(this,Je).setAttributeNS(_(this,et),_(this,je),e):_(this,Je).setAttributeNS(_(this,et),_(this,je),_(this,_t,ti)))}get booleanValue(){return _(this,Je).hasAttributeNS(_(this,et),_(this,je))}set booleanValue(e){if(!_(this,_t,ti)||_(this,_t,ti).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};Di=new WeakMap;Je=new WeakMap;je=new WeakMap;et=new WeakMap;_t=new WeakSet;ti=function(){return fl.get(this)};var $e=class extends rr{constructor(e,t){super(),Me(this,ar,void 0),Me(this,be,void 0),Ue(this,ar,e),Ue(this,be,t?[...t]:[new Text])}get replacementNodes(){return _(this,be)}get parentNode(){return _(this,ar)}get nextSibling(){return _(this,be)[_(this,be).length-1].nextSibling}get previousSibling(){return _(this,be)[0].previousSibling}get value(){return _(this,be).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===xu?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);t.length||t.push(new Text),Ue(this,be,Du(_(this,be)[0].parentNode,_(this,be),t,this.nextSibling))}};ar=new WeakMap;be=new WeakMap;var Oi=class extends $e{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),wu(this,"directive"),this.expression=r,this.template=t,this.directive=a}};function Du(i,e,t,a=null){let r=0,n,s,l,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;)l=t[r++],s=n?n.nextSibling:a,n==l?n=s:r<u&&t[r]==s?(i.replaceChild(l,n),n=s):i.insertBefore(l,n);for(;n!=a;)s=n.nextSibling,i.removeChild(n),n=s}return t}var gl={string:i=>String(i)},sr=class{constructor(e){this.template=e,this.state=void 0}},yt=new WeakMap,Tt=new WeakMap,Hn={partial:(i,e)=>{e[i.expression]=new sr(i.template)},if:(i,e)=>{var t;if(_l(i.expression,e))if(yt.get(i)!==i.template){yt.set(i,i.template);let a=new Be(i.template,e,or);i.replace(a),Tt.set(i,a)}else(t=Tt.get(i))==null||t.update(e);else i.replace(""),yt.delete(i),Tt.delete(i)}},Ou=Object.keys(Hn),or={processCallback(i,e,t){var a,r;if(!!t)for(let[n,s]of e){if(s instanceof Oi){if(!s.directive){let u=Ou.find(m=>s.template.hasAttribute(m));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=Hn[s.directive])==null||a.call(Hn,s,t);continue}let l=_l(n,t);if(l instanceof sr){yt.get(s)!==l.template?(yt.set(s,l.template),l=new Be(l.template,l.state,or),s.value=l,Tt.set(s,l)):(r=Tt.get(s))==null||r.update(l.state);continue}l?(s instanceof ee&&s.attributeName.startsWith("aria-")&&(l=String(l)),s instanceof ee?typeof l=="boolean"?s.booleanValue=l:typeof l=="function"?s.element[s.attributeName]=l:s.value=l:(s.value=l,yt.delete(s),Tt.delete(s))):s instanceof ee?s.value=void 0:(s.value=void 0,yt.delete(s),Tt.delete(s))}}},Al={"!":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=gl[e])==null?void 0:t.call(gl,i)}};function Nu(i){return Pu(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function _l(i,e={}){var t,a,r,n,s,l,u;let m=Nu(i);if(m.length===0||m.some(({type:p})=>!p))return Ni(i);if(((t=m[0])==null?void 0:t.token)===">"){let p=e[(a=m[1])==null?void 0:a.token];if(!p)return Ni(i);let f={...e};p.state=f;let v=m.slice(2);for(let T=0;T<v.length;T+=3){let B=(r=v[T])==null?void 0:r.token,Z=(n=v[T+1])==null?void 0:n.token,I=(s=v[T+2])==null?void 0:s.token;B&&Z==="="&&(f[B]=Pi(I,e))}return p}if(m.length===1)return nr(m[0])?Pi(m[0].token,e):Ni(i);if(m.length===2){let p=(l=m[0])==null?void 0:l.token,f=Al[p];if(!f||!nr(m[1]))return Ni(i);let v=Pi(m[1].token,e);return f(v)}if(m.length===3){let p=(u=m[1])==null?void 0:u.token,f=Al[p];if(!f||!nr(m[0])||!nr(m[2]))return Ni(i);let v=Pi(m[0].token,e);if(p==="|")return f(v,m[2].token);let T=Pi(m[2].token,e);return f(v,T)}}function Ni(i){return console.warn(`Warning: invalid expression \`${i}\``),!1}function nr({type:i}){return["number","boolean","string","param"].includes(i)}function Pi(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):Xi(i)?parseFloat(i):e[i]}function Pu(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 Uu=Object.defineProperty,Bu=(i,e,t)=>e in i?Uu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Bi=(i,e,t)=>(Bu(i,typeof e!="symbol"?e+"":e,t),t),Zn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Kn=(i,e,t)=>(Zn(i,e,"read from private field"),t?t.call(i):e.get(i)),Ui=(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)=>(Zn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Wn=(i,e,t)=>(Zn(i,e,"access private method"),t),ii,lr,ai,Yn,yl,dr,Gn,Fn={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},Tl=c.createElement("template");Tl.innerHTML=`
|
|
909
|
+
</svg>`,Ml=m.createElement("template");Ml.innerHTML=`
|
|
910
|
+
<slot name="captions-indicator" hidden>${ju}</slot>
|
|
911
|
+
`;var Ja=class extends ke{constructor(){super({slotTemplate:Ml}),Qn(this,Xn),Qn(this,za),Qn(this,Xa,void 0)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_SUBTITLES_LIST&&t!==a?zn(this,Xn,kl).call(this):e===o.MEDIA_SUBTITLES_SHOWING&&t!==a?this.value=a:e==="aria-multiselectable"&&(this.removeAttribute("aria-multiselectable"),console.warn("Captions List doesn't currently support multiple selections. You can enable multiple items via the media.textTrack API."))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",zn(this,za,Jn))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",zn(this,za,Jn))}get mediaSubtitlesList(){return Il(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Sl(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Il(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Sl(this,o.MEDIA_SUBTITLES_SHOWING,e)}};Xa=new WeakMap;Xn=new WeakSet;kl=function(){var i;if(Xu(this,Xa)===JSON.stringify(this.mediaSubtitlesList))return;Ju(this,Xa,JSON.stringify(this.mediaSubtitlesList));let e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.value,a=Xe(this.formatOptionText("Off"),"off",t);a.prepend(Ne(this,"select-indicator")),e.append(a);let r=this.mediaSubtitlesList;for(let n of r){let s=Xe(this.formatOptionText(n.label,n),da(n),this.value==da(n));s.prepend(Ne(this,"select-indicator")),((i=n.kind)!=null?i:"subs")==="captions"&&s.append(Ne(this,"captions-indicator")),e.append(s)}};za=new WeakSet;Jn=function(){if(xe(this,!1),!this.value)return;let i=new d.CustomEvent(v.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};var Il=(i,e)=>{let t=i.getAttribute(e);return t?ui(t):[]},Sl=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=mt(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};d.customElements.get("media-captions-listbox")||d.customElements.define("media-captions-listbox",Ja);var ja=class extends Ce{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, 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)}};d.customElements.get("media-captions-selectmenu")||d.customElements.define("media-captions-selectmenu",ja);var Ll=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},er=(i,e,t)=>(Ll(i,e,"read from private field"),t?t.call(i):e.get(i)),es=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Mi=(i,e,t)=>(Ll(i,e,"access private method"),t),Jt,Li,tr,ir,is,ts={RATES:"rates"},ar=class extends ke{constructor(){super(),es(this,Li),es(this,ir),es(this,Jt,new Ge(this,ts.RATES,{defaultValue:En})),Mi(this,Li,tr).call(this)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_PLAYBACK_RATE,ts.RATES]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_PLAYBACK_RATE&&t!=a?this.value=a:e===ts.RATES&&t!=a&&(er(this,Jt).value=a,Mi(this,Li,tr).call(this))}get rates(){return er(this,Jt)}set rates(e){e?Array.isArray(e)&&(er(this,Jt).value=e.join(" ")):er(this,Jt).value="",Mi(this,Li,tr).call(this)}get mediaPlaybackRate(){return k(this,o.MEDIA_PLAYBACK_RATE,Vt)}set mediaPlaybackRate(e){w(this,o.MEDIA_PLAYBACK_RATE,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Mi(this,ir,is))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Mi(this,ir,is))}};Jt=new WeakMap;Li=new WeakSet;tr=function(){let i=this.shadowRoot.querySelector("#container");i.textContent="";for(let e of this.rates){let t=Xe(this.formatOptionText(`${e}x`,e),e,this.mediaPlaybackRate==e);t.prepend(Ne(this,"select-indicator")),i.append(t)}};ir=new WeakSet;is=function(){if(!this.value)return;let i=new d.CustomEvent(v.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};d.customElements.get("media-playback-rate-listbox")||d.customElements.define("media-playback-rate-listbox",ar);var rr=class extends Ce{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, 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)}};d.customElements.get("media-playback-rate-selectmenu")||d.customElements.define("media-playback-rate-selectmenu",rr);var ss=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Cl=(i,e,t)=>(ss(i,e,"read from private field"),t?t.call(i):e.get(i)),nr=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},as=(i,e,t,a)=>(ss(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),sr=(i,e,t)=>(ss(i,e,"access private method"),t),Ci,dr,or,rs,lr,ns,ur=class extends ke{constructor(){super(...arguments),nr(this,or),nr(this,lr),nr(this,Ci,[]),nr(this,dr,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_LIST,o.MEDIA_RENDITION_SELECTED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_RENDITION_SELECTED&&t!==a?this.value=a!=null?a:"auto":e===o.MEDIA_RENDITION_LIST&&t!==a&&(as(this,Ci,Zs(a)),sr(this,or,rs).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",sr(this,lr,ns))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",sr(this,lr,ns))}get mediaRenditionList(){return Cl(this,Ci)}set mediaRenditionList(e){as(this,Ci,e),sr(this,or,rs).call(this)}get mediaRenditionSelected(){return N(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){O(this,o.MEDIA_RENDITION_SELECTED,e)}};Ci=new WeakMap;dr=new WeakMap;or=new WeakSet;rs=function(){if(Cl(this,dr)===JSON.stringify(this.mediaRenditionList))return;as(this,dr,JSON.stringify(this.mediaRenditionList));let i=this.mediaRenditionList.sort((r,n)=>n.height-r.height),e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.mediaRenditionSelected;for(let r of i){let n=this.formatOptionText(`${Math.min(r.width,r.height)}p`,r),s=Xe(n,`${r.id}`,r.selected&&!t);s.prepend(Ne(this,"select-indicator")),e.append(s)}let a=Xe(this.formatOptionText("Auto"),"auto",t);a.prepend(Ne(this,"select-indicator")),e.append(a)};lr=new WeakSet;ns=function(){if(this.value==null)return;let i=new d.CustomEvent(v.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};d.customElements.get("media-rendition-listbox")||d.customElements.define("media-rendition-listbox",ur);var ec=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
912
|
+
<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" />
|
|
913
|
+
</svg>`,Rl=m.createElement("template");Rl.innerHTML=`
|
|
914
|
+
<slot name="icon">${ec}</slot>
|
|
915
|
+
`;var os=class extends R{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:Rl})}get mediaRenditionSelected(){return N(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){O(this,o.MEDIA_RENDITION_SELECTED,e)}};d.customElements.get("media-rendition-button")||d.customElements.define("media-rendition-button",os);var cr=class extends Ce{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE]}init(){let e=m.createElement("media-rendition-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-rendition-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, 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)}};d.customElements.get("media-rendition-selectmenu")||d.customElements.define("media-rendition-selectmenu",cr);var g=kd(require("@mux/mux-video"),1),U=require("@mux/playback-core");var $l=require("@mux/mux-video");var tc="en",bt={code:tc};var wl="en";function y(i,e=!0){var r,n;let t=e&&(n=(r=bt)==null?void 0:r[i])!=null?n:i,a=e?bt.code:wl;return new ls(t,a)}var ls=class{constructor(e,t=(a=>(a=bt.code)!=null?a:wl)()){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 xl(i){let e="";return Object.entries(i).forEach(([t,a])=>{a!=null&&(e+=`${mr(t)}: ${a}; `)}),e?e.trim():void 0}function mr(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function hr(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Ue(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function pr(i){let e=ic(i).toString();return e?"?"+e:""}function ic(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}function je(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 ds=(i,e)=>!i||!e?!1:i.contains(e)?!0:ds(i,e.getRootNode().host);var Er=require("@mux/playback-core");var us="mux.com",ac=()=>{try{return"1.12.0"}catch{}return"UNKNOWN"},rc=ac(),br=()=>rc,cs=(i,{maxResolution:e,token:t,domain:a=us}={})=>{let s=!!t?{token:t}:{redundant_streams:!0,...e?{max_resolution:e}:{}};return`https://stream.${a}/${i}.m3u8${pr(s)}`},Dl=(i,{token:e,thumbnailTime:t,domain:a=us}={})=>{let r=e==null?t:void 0,{aud:n}=je(e);if(!(e&&n!=="t"))return`https://image.${a}/${i}/thumbnail.webp${pr({token:e,time:r})}`},Ol=(i,{token:e,domain:t=us}={})=>{let{aud:a}=je(e);if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${pr({token:e,format:"webp"})}`},Ri=i=>{if(!!i){if([Er.StreamTypes.LIVE,Er.StreamTypes.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return Er.StreamTypes.LIVE}};var nc={crossorigin:"crossOrigin",playsinline:"playsInline"};function Nl(i){var e;return(e=nc[i])!=null?e:hr(i)}var ft,gt,j,vr=class{constructor(e,t){W(this,ft,void 0);W(this,gt,void 0);W(this,j,[]);oe(this,ft,e),oe(this,gt,t)}[Symbol.iterator](){return S(this,j).values()}get length(){return S(this,j).length}get value(){var e;return(e=S(this,j).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(oe(this,j,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return S(this,j)[e]}values(){return S(this,j).values()}keys(){return S(this,j).keys()}forEach(e){S(this,j).forEach(e)}add(...e){var t,a;e.forEach(r=>{this.contains(r)||S(this,j).push(r)}),!(this.value===""&&!((t=S(this,ft))!=null&&t.hasAttribute(`${S(this,gt)}`)))&&((a=S(this,ft))==null||a.setAttribute(`${S(this,gt)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>{S(this,j).splice(S(this,j).indexOf(a),1)}),(t=S(this,ft))==null||t.setAttribute(`${S(this,gt)}`,`${this.value}`)}contains(e){return S(this,j).includes(e)}toggle(e,t){return typeof t!="undefined"?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){this.remove(e),this.add(t)}};ft=new WeakMap,gt=new WeakMap,j=new WeakMap;var Pl=`[mux-player ${br()}]`;function et(...i){console.warn(Pl,...i)}function pe(...i){console.error(Pl,...i)}function ms(i){var t;let e=(t=i.message)!=null?t:"";if(i.context&&(e+=` ${i.context}`),i.file){let a="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${y("Read more: ")}
|
|
916
|
+
${a}${i.file}`}et(e)}var J={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},At={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Bl=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}}),sc=$l.VideoEvents.filter(i=>i!=="error"),oc=Object.values(J).filter(i=>![J.PLAYSINLINE].includes(i)),lc=Object.values(At);function Vl(i){i.querySelectorAll(":scope > track").forEach(e=>{var t;(t=i.media)==null||t.append(e.cloneNode())}),sc.forEach(e=>{var t;(t=i.media)==null||t.addEventListener(e,a=>{i.dispatchEvent(new Event(a.type))})})}var hs=class extends B.HTMLElement{static get observedAttributes(){return[...oc,...lc]}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 l,u;let s=(l=this.media)==null?void 0:l.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 At.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case At.VOLUME:{let s=(r=Ue(a))!=null?r:1;this.media&&(this.media.volume=s);return}case At.PLAYBACKRATE:{let s=(n=Ue(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:Bl}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:Bl}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=Ue(this.getAttribute(At.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(At.PLAYBACKRATE,`${e}`):this.removeAttribute(At.PLAYBACKRATE)}get crossOrigin(){return wi(this,J.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(J.CROSSORIGIN,`${e}`)}get autoplay(){return wi(this,J.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(J.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(J.AUTOPLAY)}get loop(){return wi(this,J.LOOP)!=null}set loop(e){e?this.setAttribute(J.LOOP,""):this.removeAttribute(J.LOOP)}get muted(){var e,t;return(t=(e=this.media)==null?void 0:e.muted)!=null?t:!1}set muted(e){this.media&&(this.media.muted=Boolean(e))}get defaultMuted(){return wi(this,J.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(J.MUTED,""):this.removeAttribute(J.MUTED)}get playsInline(){return wi(this,J.PLAYSINLINE)!=null}set playsInline(e){pe("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(J.PRELOAD,e):this.removeAttribute(J.PRELOAD)}};function wi(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var ps=hs;var dc=Object.defineProperty,uc=(i,e,t)=>e in i?dc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,cc=(i,e,t)=>(uc(i,typeof e!="symbol"?e+"":e,t),t),Yl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_=(i,e,t)=>(Yl(i,e,"read from private field"),t?t.call(i):e.get(i)),Re=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Be=(i,e,t,a)=>(Yl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),jt,fr,_t,xi,tt,it,at,yt,ei,gr,Ee,Hl=1,Wl=0,mc=1,hc={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 ee&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof ee?r.element[r.attributeName]=n:r.value=n}}}},$e=class extends d.DocumentFragment{constructor(e,t,a=hc){var r;super(),Re(this,jt,void 0),Re(this,fr,void 0),this.append(e.content.cloneNode(!0)),Be(this,jt,Gl(this)),Be(this,fr,a),(r=a.createCallback)==null||r.call(a,this,_(this,jt),t),a.processCallback(this,_(this,jt),t)}update(e){_(this,fr).processCallback(this,_(this,jt),e)}};jt=new WeakMap;fr=new WeakMap;var Gl=(i,e=[])=>{let t,a;for(let r of i.attributes||[])if(r.value.includes("{{")){let n=new Es;for([t,a]of Kl(r.value))if(!t)n.append(a);else{let s=new ee(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===Hl&&!(r instanceof HTMLTemplateElement))Gl(r,e);else if(r.nodeType===Hl||r.data.includes("{{")){let n=[];if(r.data)for([t,a]of Kl(r.data))if(!t)n.push(new Text(a));else{let s=new Ve(i);n.push(s),e.push([a,s])}else if(r instanceof HTMLTemplateElement){let s=new Di(i,r);n.push(s),e.push([s.expression,s])}r.replaceWith(...n.flatMap(s=>s.replacementNodes||[s]))}return e},Fl={},Kl=i=>{let e="",t=0,a=Fl[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([Wl,e]),e="",r++):n==="}"&&i[r+1]==="}"&&i[r-1]!=="\\"&&!--t?(a.push([mc,e.trim()]),e="",r++):e+=n||"";return e&&a.push([Wl,(t>0?"{{":"")+e]),Fl[i]=a},pc=11,Ar=class{get value(){return""}set value(e){}toString(){return this.value}},Zl=new WeakMap,Es=class{constructor(){Re(this,_t,[])}[Symbol.iterator](){return _(this,_t).values()}get length(){return _(this,_t).length}item(e){return _(this,_t)[e]}append(...e){for(let t of e)t instanceof ee&&Zl.set(t,this),_(this,_t).push(t)}toString(){return _(this,_t).join("")}};_t=new WeakMap;var ee=class extends Ar{constructor(e,t,a){super(),Re(this,yt),Re(this,xi,""),Re(this,tt,void 0),Re(this,it,void 0),Re(this,at,void 0),Be(this,tt,e),Be(this,it,t),Be(this,at,a)}get attributeName(){return _(this,it)}get attributeNamespace(){return _(this,at)}get element(){return _(this,tt)}get value(){return _(this,xi)}set value(e){_(this,xi)!==e&&(Be(this,xi,e),!_(this,yt,ei)||_(this,yt,ei).length===1?e==null?_(this,tt).removeAttributeNS(_(this,at),_(this,it)):_(this,tt).setAttributeNS(_(this,at),_(this,it),e):_(this,tt).setAttributeNS(_(this,at),_(this,it),_(this,yt,ei)))}get booleanValue(){return _(this,tt).hasAttributeNS(_(this,at),_(this,it))}set booleanValue(e){if(!_(this,yt,ei)||_(this,yt,ei).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};xi=new WeakMap;tt=new WeakMap;it=new WeakMap;at=new WeakMap;yt=new WeakSet;ei=function(){return Zl.get(this)};var Ve=class extends Ar{constructor(e,t){super(),Re(this,gr,void 0),Re(this,Ee,void 0),Be(this,gr,e),Be(this,Ee,t?[...t]:[new Text])}get replacementNodes(){return _(this,Ee)}get parentNode(){return _(this,gr)}get nextSibling(){return _(this,Ee)[_(this,Ee).length-1].nextSibling}get previousSibling(){return _(this,Ee)[0].previousSibling}get value(){return _(this,Ee).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===pc?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);t.length||t.push(new Text),Be(this,Ee,Ec(_(this,Ee)[0].parentNode,_(this,Ee),t,this.nextSibling))}};gr=new WeakMap;Ee=new WeakMap;var Di=class extends Ve{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),cc(this,"directive"),this.expression=r,this.template=t,this.directive=a}};function Ec(i,e,t,a=null){let r=0,n,s,l,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;)l=t[r++],s=n?n.nextSibling:a,n==l?n=s:r<u&&t[r]==s?(i.replaceChild(l,n),n=s):i.insertBefore(l,n);for(;n!=a;)s=n.nextSibling,i.removeChild(n),n=s}return t}var ql={string:i=>String(i)},yr=class{constructor(e){this.template=e,this.state=void 0}},Tt=new WeakMap,It=new WeakMap,vs={partial:(i,e)=>{e[i.expression]=new yr(i.template)},if:(i,e)=>{var t;if(zl(i.expression,e))if(Tt.get(i)!==i.template){Tt.set(i,i.template);let a=new $e(i.template,e,Tr);i.replace(a),It.set(i,a)}else(t=It.get(i))==null||t.update(e);else i.replace(""),Tt.delete(i),It.delete(i)}},vc=Object.keys(vs),Tr={processCallback(i,e,t){var a,r;if(!!t)for(let[n,s]of e){if(s instanceof Di){if(!s.directive){let u=vc.find(c=>s.template.hasAttribute(c));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=vs[s.directive])==null||a.call(vs,s,t);continue}let l=zl(n,t);if(l instanceof yr){Tt.get(s)!==l.template?(Tt.set(s,l.template),l=new $e(l.template,l.state,Tr),s.value=l,It.set(s,l)):(r=It.get(s))==null||r.update(l.state);continue}l?(s instanceof ee&&s.attributeName.startsWith("aria-")&&(l=String(l)),s instanceof ee?typeof l=="boolean"?s.booleanValue=l:typeof l=="function"?s.element[s.attributeName]=l:s.value=l:(s.value=l,Tt.delete(s),It.delete(s))):s instanceof ee?s.value=void 0:(s.value=void 0,Tt.delete(s),It.delete(s))}}},Ql={"!":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=ql[e])==null?void 0:t.call(ql,i)}};function bc(i){return fc(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function zl(i,e={}){var t,a,r,n,s,l,u;let c=bc(i);if(c.length===0||c.some(({type:E})=>!E))return Oi(i);if(((t=c[0])==null?void 0:t.token)===">"){let E=e[(a=c[1])==null?void 0:a.token];if(!E)return Oi(i);let f={...e};E.state=f;let b=c.slice(2);for(let T=0;T<b.length;T+=3){let V=(r=b[T])==null?void 0:r.token,G=(n=b[T+1])==null?void 0:n.token,I=(s=b[T+2])==null?void 0:s.token;V&&G==="="&&(f[V]=Ni(I,e))}return E}if(c.length===1)return _r(c[0])?Ni(c[0].token,e):Oi(i);if(c.length===2){let E=(l=c[0])==null?void 0:l.token,f=Ql[E];if(!f||!_r(c[1]))return Oi(i);let b=Ni(c[1].token,e);return f(b)}if(c.length===3){let E=(u=c[1])==null?void 0:u.token,f=Ql[E];if(!f||!_r(c[0])||!_r(c[2]))return Oi(i);let b=Ni(c[0].token,e);if(E==="|")return f(b,c[2].token);let T=Ni(c[2].token,e);return f(b,T)}}function Oi(i){return console.warn(`Warning: invalid expression \`${i}\``),!1}function _r({type:i}){return["number","boolean","string","param"].includes(i)}function Ni(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):zi(i)?parseFloat(i):e[i]}function fc(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 gc=Object.defineProperty,Ac=(i,e,t)=>e in i?gc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ui=(i,e,t)=>(Ac(i,typeof e!="symbol"?e+"":e,t),t),ys=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},gs=(i,e,t)=>(ys(i,e,"read from private field"),t?t.call(i):e.get(i)),Pi=(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)},St=(i,e,t,a)=>(ys(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),bs=(i,e,t)=>(ys(i,e,"access private method"),t),ti,Ir,ii,As,Xl,Sr,_s,fs={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},Jl=m.createElement("template");Jl.innerHTML=`
|
|
870
917
|
<style>
|
|
871
918
|
:host {
|
|
872
919
|
display: inline-block;
|
|
@@ -880,6 +927,7 @@ ${a}${i.file}`}Xe(e)}var X={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"
|
|
|
880
927
|
|
|
881
928
|
media-controller:not([mediasubtitleslist]) media-captions-selectmenu,
|
|
882
929
|
media-captions-button:not([mediasubtitleslist]),
|
|
930
|
+
media-rendition-selectmenu[mediarenditionunavailable],
|
|
883
931
|
media-volume-range[mediavolumeunavailable],
|
|
884
932
|
media-airplay-button[mediaairplayunavailable],
|
|
885
933
|
media-fullscreen-button[mediafullscreenunavailable],
|
|
@@ -888,7 +936,7 @@ ${a}${i.file}`}Xe(e)}var X={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"
|
|
|
888
936
|
display: none;
|
|
889
937
|
}
|
|
890
938
|
</style>
|
|
891
|
-
`;var
|
|
939
|
+
`;var rt=class extends d.HTMLElement{constructor(){super(),Pi(this,As),Pi(this,Sr),Ui(this,"renderRoot"),Ui(this,"renderer"),Pi(this,ti,void 0),Pi(this,Ir,void 0),Pi(this,ii,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());let e=new MutationObserver(t=>{t.some(a=>{let r=a.target;return r===this?!0:r.localName!=="media-controller"?!1:!!(fs[a.attributeName]||a.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),bs(this,As,Xl).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=gs(this,ti))!=null?e:this.constructor.template}set template(e){St(this,ii,null),St(this,ti,e),this.createRenderer()}get props(){var e,t,a;let r=[...Array.from((t=(e=this.mediaController)==null?void 0:e.attributes)!=null?t:[]).filter(({name:s})=>fs[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(let s of r){let l=(a=fs[s.name])!=null?a:qs(s.name),{value:u}=s;u!=null?(zi(u)&&(u=parseFloat(u)),n[l]=u===""?!0:u):n[l]=!1}return n}attributeChangedCallback(e,t,a){e==="template"&&t!=a&&bs(this,Sr,_s).call(this)}connectedCallback(){bs(this,Sr,_s).call(this)}createRenderer(){this.template&&this.template!==gs(this,Ir)&&(St(this,Ir,this.template),this.renderer=new $e(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(Jl.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};ti=new WeakMap;Ir=new WeakMap;ii=new WeakMap;As=new WeakSet;Xl=function(i){if(Object.prototype.hasOwnProperty.call(this,i)){let e=this[i];delete this[i],this[i]=e}};Sr=new WeakSet;_s=function(){var i;let e=this.getAttribute("template");if(!e||e===gs(this,ii))return;let t=this.getRootNode(),a=(i=t==null?void 0:t.getElementById)==null?void 0:i.call(t,e);if(a){St(this,ii,e),St(this,ti,a),this.createRenderer();return}_c(e)&&(St(this,ii,e),yc(e).then(r=>{let n=m.createElement("template");n.innerHTML=r,St(this,ti,n),this.createRenderer()}).catch(console.error))};Ui(rt,"template");Ui(rt,"observedAttributes",["template"]);Ui(rt,"processor",Tr);function _c(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 yc(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()}d.customElements.get("media-theme")||d.customElements.define("media-theme",rt);var jl=`:host {
|
|
892
940
|
--media-control-display: var(--controls);
|
|
893
941
|
--media-loading-indicator-display: var(--loading-indicator);
|
|
894
942
|
--media-dialog-display: var(--dialog);
|
|
@@ -899,6 +947,7 @@ ${a}${i.file}`}Xe(e)}var X={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"
|
|
|
899
947
|
--media-mute-button-display: var(--mute-button);
|
|
900
948
|
--media-captions-button-display: var(--captions-button);
|
|
901
949
|
--media-captions-selectmenu-display: var(--captions-selectmenu, var(--media-captions-button-display));
|
|
950
|
+
--media-rendition-selectmenu-display: var(--rendition-selectmenu);
|
|
902
951
|
--media-airplay-button-display: var(--airplay-button);
|
|
903
952
|
--media-pip-button-display: var(--pip-button);
|
|
904
953
|
--media-fullscreen-button-display: var(--fullscreen-button);
|
|
@@ -944,6 +993,7 @@ media-theme {
|
|
|
944
993
|
--captions-selectmenu,
|
|
945
994
|
var(--media-captions-button-display, var(--top-captions-selectmenu))
|
|
946
995
|
);
|
|
996
|
+
--media-rendition-selectmenu-display: var(--rendition-selectmenu, var(--top-rendition-selectmenu));
|
|
947
997
|
--media-airplay-button-display: var(--airplay-button, var(--top-airplay-button));
|
|
948
998
|
--media-pip-button-display: var(--pip-button, var(--top-pip-button));
|
|
949
999
|
--media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button));
|
|
@@ -969,6 +1019,7 @@ media-theme {
|
|
|
969
1019
|
--captions-selectmenu,
|
|
970
1020
|
var(--media-captions-button-display, var(--center-captions-selectmenu))
|
|
971
1021
|
);
|
|
1022
|
+
--media-rendition-selectmenu-display: var(--rendition-selectmenu, var(--center-rendition-selectmenu));
|
|
972
1023
|
--media-airplay-button-display: var(--airplay-button, var(--center-airplay-button));
|
|
973
1024
|
--media-pip-button-display: var(--pip-button, var(--center-pip-button));
|
|
974
1025
|
--media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button));
|
|
@@ -993,6 +1044,7 @@ media-theme {
|
|
|
993
1044
|
--captions-selectmenu,
|
|
994
1045
|
var(--media-captions-button-display, var(--bottom-captions-selectmenu))
|
|
995
1046
|
);
|
|
1047
|
+
--media-rendition-selectmenu-display: var(--rendition-selectmenu, var(--bottom-rendition-selectmenu));
|
|
996
1048
|
--media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button));
|
|
997
1049
|
--media-pip-button-display: var(--pip-button, var(--bottom-pip-button));
|
|
998
1050
|
--media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button));
|
|
@@ -1004,8 +1056,176 @@ media-theme {
|
|
|
1004
1056
|
--media-duration-display-display: var(--duration-display, var(--bottom-duration-display));
|
|
1005
1057
|
--media-title-display-display: var(--title-display, var(--bottom-title-display));
|
|
1006
1058
|
}
|
|
1007
|
-
`;var
|
|
1008
|
-
|
|
1059
|
+
`;var td=`
|
|
1060
|
+
:host {
|
|
1061
|
+
z-index: 100;
|
|
1062
|
+
display: var(--media-dialog-display, flex);
|
|
1063
|
+
justify-content: center;
|
|
1064
|
+
align-items: center;
|
|
1065
|
+
width: 100%;
|
|
1066
|
+
height: 100%;
|
|
1067
|
+
position: absolute;
|
|
1068
|
+
top: 0;
|
|
1069
|
+
left: 0;
|
|
1070
|
+
box-sizing: border-box;
|
|
1071
|
+
color: #fff;
|
|
1072
|
+
line-height: 18px;
|
|
1073
|
+
font-family: Arial, sans-serif;
|
|
1074
|
+
padding: var(--media-dialog-backdrop-padding, 0);
|
|
1075
|
+
background: var(--media-dialog-backdrop-background,
|
|
1076
|
+
linear-gradient(to bottom, rgba(20, 20, 30, 0.7) 50%, rgba(20, 20, 30, 0.9))
|
|
1077
|
+
);
|
|
1078
|
+
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
1079
|
+
transition: var(--media-dialog-transition-open, visibility .2s, opacity .2s) !important;
|
|
1080
|
+
transform: var(--media-dialog-transform-open, none) !important;
|
|
1081
|
+
visibility: visible !important;
|
|
1082
|
+
opacity: 1 !important;
|
|
1083
|
+
pointer-events: auto !important;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
:host(:not([open])) {
|
|
1087
|
+
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
1088
|
+
transition: var(--media-dialog-transition-close, visibility .1s, opacity .1s) !important;
|
|
1089
|
+
transform: var(--media-dialog-transform-close, none) !important;
|
|
1090
|
+
visibility: hidden !important;
|
|
1091
|
+
opacity: 0 !important;
|
|
1092
|
+
pointer-events: none !important;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
:focus-visible {
|
|
1096
|
+
box-shadow: 0 0 0 2px rgba(27, 127, 204, 0.9);
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.dialog {
|
|
1100
|
+
position: relative;
|
|
1101
|
+
box-sizing: border-box;
|
|
1102
|
+
background: var(--media-dialog-background, none);
|
|
1103
|
+
padding: var(--media-dialog-padding, 10px);
|
|
1104
|
+
width: min(320px, 100%);
|
|
1105
|
+
word-wrap: break-word;
|
|
1106
|
+
max-height: 100%;
|
|
1107
|
+
overflow: auto;
|
|
1108
|
+
text-align: center;
|
|
1109
|
+
line-height: 1.4;
|
|
1110
|
+
}
|
|
1111
|
+
`,id=ne.createElement("template");id.innerHTML=`
|
|
1112
|
+
<style>
|
|
1113
|
+
${td}
|
|
1114
|
+
</style>
|
|
1115
|
+
|
|
1116
|
+
<div class="dialog">
|
|
1117
|
+
<slot></slot>
|
|
1118
|
+
</div>
|
|
1119
|
+
`;var nt=class extends B.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})),ed(this)}close(){!this.hasAttribute("open")||(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),Ic(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")&&ed(this)}};nt.styles=td,nt.template=id,nt.observedAttributes=["open"];function ed(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=ad(i.shadowRoot)),i._previouslyFocusedElement=ne.activeElement,ne.activeElement instanceof HTMLElement&&ne.activeElement.blur(),i.addEventListener("transitionend",()=>{t instanceof HTMLElement&&t.focus({preventScroll:!0})},{once:!0})}function ad(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=ad(r[n].shadowRoot),a));n++);}return a}function Ic(i){i._previouslyFocusedElement instanceof HTMLElement&&i._previouslyFocusedElement.focus()}B.customElements.get("media-dialog")||(B.customElements.define("media-dialog",nt),B.MediaDialog=nt);var Ts=nt;var rd=ne.createElement("template");rd.innerHTML=`
|
|
1120
|
+
<style>
|
|
1121
|
+
${Ts.styles}
|
|
1122
|
+
|
|
1123
|
+
.close {
|
|
1124
|
+
background: none;
|
|
1125
|
+
color: inherit;
|
|
1126
|
+
border: none;
|
|
1127
|
+
padding: 0;
|
|
1128
|
+
font: inherit;
|
|
1129
|
+
cursor: pointer;
|
|
1130
|
+
outline: inherit;
|
|
1131
|
+
width: 28px;
|
|
1132
|
+
height: 28px;
|
|
1133
|
+
position: absolute;
|
|
1134
|
+
top: 1rem;
|
|
1135
|
+
right: 1rem;
|
|
1136
|
+
}
|
|
1137
|
+
</style>
|
|
1138
|
+
|
|
1139
|
+
<div class="dialog">
|
|
1140
|
+
<slot></slot>
|
|
1141
|
+
</div>
|
|
1142
|
+
|
|
1143
|
+
<slot name="close">
|
|
1144
|
+
<button class="close" tabindex="0">
|
|
1145
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1146
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
1147
|
+
</svg>
|
|
1148
|
+
</button>
|
|
1149
|
+
</slot>
|
|
1150
|
+
`;var Bi=class extends Ts{constructor(){var e,t;super(),(t=(e=this.shadowRoot)==null?void 0:e.querySelector(".close"))==null||t.addEventListener("click",()=>{this.close()})}};Bi.template=rd;B.customElements.get("mxp-dialog")||(B.customElements.define("mxp-dialog",Bi),B.MxpDialog=Bi);var $i=new WeakMap,Vi=class{constructor(e,t){this.element=e;this.type=t;this.element.addEventListener(this.type,this);let a=$i.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=$i.get(this.element);t&&t.delete(this.type)}}static for(e){$i.has(e.element)||$i.set(e.element,new Map);let t=e.attributeName.slice(2),a=$i.get(e.element);return a&&a.has(t)?a.get(t):new Vi(e.element,t)}};function Sc(i,e){return i instanceof ee&&i.attributeName.startsWith("on")?(Vi.for(i).set(e),i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),!0):!1}function kc(i,e){return e instanceof kr&&i instanceof Ve?(e.renderInto(i),!0):!1}function Mc(i,e){return e instanceof DocumentFragment&&i instanceof Ve?(e.childNodes.length&&i.replace(...e.childNodes),!0):!1}function Lc(i,e){if(i instanceof ee){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 Cc(i,e){if(i instanceof ee&&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 Rc(i,e){if(typeof e=="boolean"&&i instanceof ee){let t=i.attributeNamespace,a=i.element.hasAttributeNS(t,i.attributeName);return e!==a&&(i.booleanValue=e),!0}return!1}function wc(i,e){return e===!1&&i instanceof Ve?(i.replace(""),!0):!1}function xc(i,e){Cc(i,e)||Rc(i,e)||Sc(i,e)||wc(i,e)||kc(i,e)||Mc(i,e)||Lc(i,e)}var Is=new Map,nd=new WeakMap,sd=new WeakMap,kr=class{constructor(e,t,a){this.strings=e;this.values=t;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(Is.has(this.stringsKey))return Is.get(this.stringsKey);{let e=ne.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<t?`{{ ${n} }}`:""),""),Is.set(this.stringsKey,e),e}}renderInto(e){var r;let t=this.template;if(nd.get(e)!==t){nd.set(e,t);let n=new $e(t,this.values,this.processor);sd.set(e,n),e instanceof Ve?e.replace(...n.children):e.appendChild(n);return}let a=sd.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},Dc={processCallback(i,e,t){var a;if(!!t){for(let[r,n]of e)if(r in t){let s=(a=t[r])!=null?a:"";xc(n,s)}}}};function He(i,...e){return new kr(i,e,Dc)}function od(i,e){i.renderInto(e)}var ld=require("@mux/playback-core"),dd=i=>He`
|
|
1151
|
+
<style>
|
|
1152
|
+
${jl}
|
|
1153
|
+
</style>
|
|
1154
|
+
${Nc(i)}
|
|
1155
|
+
`,Oc=i=>{let e=i.hotKeys?`${i.hotKeys}`:"";return Ri(i.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},Nc=i=>{var e,t,a,r,n,s,l,u,c,E,f,b,T,V,G,I,re,ve,se,ni,Lt,Ls,Cs,Rs,ws,xs,Ds,Os,Ns,Ps,Us,Bs,$s,Vs;return He`
|
|
1156
|
+
<media-theme
|
|
1157
|
+
template="${i.themeTemplate||!1}"
|
|
1158
|
+
defaultstreamtype="${(e=i.defaultStreamType)!=null?e:!1}"
|
|
1159
|
+
hotkeys="${Oc(i)||!1}"
|
|
1160
|
+
nohotkeys="${i.noHotKeys||!i.hasSrc||i.isDialogOpen||!1}"
|
|
1161
|
+
noautoseektolive="${!!((t=i.streamType)!=null&&t.includes(ld.StreamTypes.LIVE))&&i.targetLiveWindow!==0}"
|
|
1162
|
+
novolumepref="${i.novolumepref||!1}"
|
|
1163
|
+
disabled="${!i.hasSrc||i.isDialogOpen}"
|
|
1164
|
+
audio="${(a=i.audio)!=null?a:!1}"
|
|
1165
|
+
style="${(r=xl({"--media-primary-color":i.primaryColor,"--media-secondary-color":i.secondaryColor}))!=null?r:!1}"
|
|
1166
|
+
defaultsubtitles="${!i.defaultHiddenCaptions}"
|
|
1167
|
+
forwardseekoffset="${(n=i.forwardSeekOffset)!=null?n:!1}"
|
|
1168
|
+
backwardseekoffset="${(s=i.backwardSeekOffset)!=null?s:!1}"
|
|
1169
|
+
playbackrates="${(l=i.playbackRates)!=null?l:!1}"
|
|
1170
|
+
defaultshowremainingtime="${(u=i.defaultShowRemainingTime)!=null?u:!1}"
|
|
1171
|
+
hideduration="${(c=i.hideDuration)!=null?c:!1}"
|
|
1172
|
+
title="${(E=i.title)!=null?E:!1}"
|
|
1173
|
+
exportparts="top, center, bottom, layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer, controller, poster, live, play, button, seek-backward, seek-forward, mute, captions, airplay, pip, fullscreen, cast, playback-rate, volume, range, time, display"
|
|
1174
|
+
>
|
|
1175
|
+
<mux-video
|
|
1176
|
+
slot="media"
|
|
1177
|
+
target-live-window="${(f=i.targetLiveWindow)!=null?f:!1}"
|
|
1178
|
+
stream-type="${(b=Ri(i.streamType))!=null?b:!1}"
|
|
1179
|
+
crossorigin="${(T=i.crossOrigin)!=null?T:""}"
|
|
1180
|
+
playsinline
|
|
1181
|
+
autoplay="${(V=i.autoplay)!=null?V:!1}"
|
|
1182
|
+
muted="${(G=i.muted)!=null?G:!1}"
|
|
1183
|
+
loop="${(I=i.loop)!=null?I:!1}"
|
|
1184
|
+
preload="${(re=i.preload)!=null?re:!1}"
|
|
1185
|
+
debug="${(ve=i.debug)!=null?ve:!1}"
|
|
1186
|
+
prefer-cmcd="${(se=i.preferCmcd)!=null?se:!1}"
|
|
1187
|
+
disable-cookies="${(ni=i.disableCookies)!=null?ni:!1}"
|
|
1188
|
+
prefer-playback="${(Lt=i.preferPlayback)!=null?Lt:!1}"
|
|
1189
|
+
start-time="${i.startTime!=null?i.startTime:!1}"
|
|
1190
|
+
beacon-collection-domain="${(Ls=i.beaconCollectionDomain)!=null?Ls:!1}"
|
|
1191
|
+
player-software-name="${(Cs=i.playerSoftwareName)!=null?Cs:!1}"
|
|
1192
|
+
player-software-version="${(Rs=i.playerSoftwareVersion)!=null?Rs:!1}"
|
|
1193
|
+
env-key="${(ws=i.envKey)!=null?ws:!1}"
|
|
1194
|
+
custom-domain="${(xs=i.customDomain)!=null?xs:!1}"
|
|
1195
|
+
src="${i.src?i.src:i.playbackId?cs(i.playbackId,{maxResolution:i.maxResolution,domain:i.customDomain,token:i.tokens.playback}):!1}"
|
|
1196
|
+
cast-src="${i.src?i.src:i.playbackId?cs(i.playbackId,{maxResolution:i.maxResolution,domain:i.customDomain,token:i.tokens.playback}):!1}"
|
|
1197
|
+
exportparts="video"
|
|
1198
|
+
>
|
|
1199
|
+
${i.storyboard?He`<track label="thumbnails" default kind="metadata" src="${i.storyboard}" />`:He``}
|
|
1200
|
+
</mux-video>
|
|
1201
|
+
<media-poster-image
|
|
1202
|
+
slot="poster"
|
|
1203
|
+
part="poster"
|
|
1204
|
+
exportparts="poster, img"
|
|
1205
|
+
src="${i.poster===""?!1:(Ds=i.poster)!=null?Ds:!1}"
|
|
1206
|
+
placeholder-src="${(Os=i.placeholder)!=null?Os:!1}"
|
|
1207
|
+
></media-poster-image>
|
|
1208
|
+
<mxp-dialog
|
|
1209
|
+
no-auto-hide
|
|
1210
|
+
open="${(Ns=i.isDialogOpen)!=null?Ns:!1}"
|
|
1211
|
+
onclose="${i.onCloseErrorDialog}"
|
|
1212
|
+
oninitfocus="${i.onInitFocusDialog}"
|
|
1213
|
+
>
|
|
1214
|
+
${(Ps=i.dialog)!=null&&Ps.title?He`<h3>${i.dialog.title}</h3>`:He``}
|
|
1215
|
+
<p>
|
|
1216
|
+
${(Us=i.dialog)==null?void 0:Us.message}
|
|
1217
|
+
${(Bs=i.dialog)!=null&&Bs.linkUrl?He`<a
|
|
1218
|
+
href="${i.dialog.linkUrl}"
|
|
1219
|
+
target="_blank"
|
|
1220
|
+
rel="external noopener"
|
|
1221
|
+
aria-label="${($s=i.dialog.linkText)!=null?$s:""} ${y("(opens in a new window)")}"
|
|
1222
|
+
>${(Vs=i.dialog.linkText)!=null?Vs:i.dialog.linkUrl}</a
|
|
1223
|
+
>`:He``}
|
|
1224
|
+
</p>
|
|
1225
|
+
</mxp-dialog>
|
|
1226
|
+
</media-theme>
|
|
1227
|
+
`};var Hi=require("@mux/mux-video");function Mr(i,e,t,a,r){var l,u,c;let n={},s={};switch(i.code){case Hi.MediaError.MEDIA_ERR_NETWORK:{switch(n.title=y("Network Error",r),n.message=i.message,(l=i.data)==null?void 0:l.response.code){case 412:{n.title=y("Video is not currently available",r),n.message=y("The live stream or video file are not yet ready.",r),s.message=y("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),s.file="412-not-playable.md";break}case 404:{n.title=y("Video does not exist",r),n.message="",s.message=y("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),s.file="404-not-found.md";break}case 403:{if(n.title=y("Invalid playback URL",r),n.message=y("The video URL or playback-token are formatted with incorrect or incomplete information.",r),s.message=y("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",r),s.file="missing-signed-tokens.md",!a)break;let{exp:E,aud:f,sub:b}=je(a),T=Date.now()>E*1e3,V=b!==t,G=f!=="v",I={timeStyle:"medium",dateStyle:"medium"};if(T){n.title=y("Video URL has expired",r),n.message=y("The video\u2019s secured playback-token has expired.",r),s.message=y("The video\u2019s secured playback-token has expired.",r),s.context=y("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat(bt.code,I).format(E*1e3),currentDate:new Intl.DateTimeFormat(bt.code,I).format(Date.now())}),s.file="403-expired-token.md";break}if(V){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.context=y("Specified playback ID: {playbackId} and the playback ID encoded in the playback-token: {tokenPlaybackId}",r).format({playbackId:t,tokenPlaybackId:b}),s.file="403-playback-id-mismatch.md";break}if(G){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The playback-token is formatted with incorrect information.",r),s.message=y("The playback-token is formatted with incorrect information.",r),s.context=y("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",r).format({tokenType:f}),s.file="403-incorrect-aud-value.md";break}s.message=y("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",r),s.file="403-malformatted-token.md";break}}break}case Hi.MediaError.MEDIA_ERR_DECODE:{let{message:E}=i;n={title:y("Media Error",r),message:E},s.file="media-decode-error.md";break}case Hi.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:{let E=(c=(u=i.data)==null?void 0:u.response)==null?void 0:c.code;if(E>=400&&E<500){i.code=Hi.MediaError.MEDIA_ERR_NETWORK,i.data={response:{code:E}},{dialog:n,devlog:s}=Mr(i,e,t,a);break}n={title:y("Source Not Supported",r),message:i.message},s.file="media-src-not-supported.md";break}default:n={title:y("Error",r),message:i.message};break}return e&&(n={title:y("Your device appears to be offline",r),message:y("Check your internet connection and try reloading this video.",r)}),{dialog:n,devlog:s}}var ud=`<!-- prettier-ignore -->
|
|
1228
|
+
<template id="media-theme-classic">
|
|
1009
1229
|
<style>
|
|
1010
1230
|
:host {
|
|
1011
1231
|
--_primary-color: var(--media-primary-color, white);
|
|
@@ -1025,6 +1245,10 @@ media-theme {
|
|
|
1025
1245
|
--media-preview-time-border-radius: 0 0 2px 2px;
|
|
1026
1246
|
--media-preview-time-margin: 0 0 8px;
|
|
1027
1247
|
--media-preview-time-text-shadow: none;
|
|
1248
|
+
--media-listbox-border-radius: 2px;
|
|
1249
|
+
--media-listbox-transform-in: translateY(-8px) scale(1);
|
|
1250
|
+
--media-listbox-transform-out: translateY(-6px) scale(.99);
|
|
1251
|
+
--media-option-hover-background: rgba(255, 255, 255, 0.28);
|
|
1028
1252
|
|
|
1029
1253
|
color: var(--_primary-color);
|
|
1030
1254
|
display: inline-block;
|
|
@@ -1065,15 +1289,10 @@ media-theme {
|
|
|
1065
1289
|
cursor: not-allowed;
|
|
1066
1290
|
}
|
|
1067
1291
|
|
|
1068
|
-
:host(:not([audio])) media-captions-selectmenu::part(listbox) {
|
|
1069
|
-
z-index: 10;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
1292
|
media-controller:not([mediasubtitleslist]) media-captions-selectmenu {
|
|
1073
1293
|
--captions-selectmenu: none;
|
|
1074
1294
|
}
|
|
1075
1295
|
|
|
1076
|
-
|
|
1077
1296
|
/* 0.433s is the transition duration for VTT Regions.
|
|
1078
1297
|
* Borrowed here, so the captions don't move too fast. */
|
|
1079
1298
|
media-controller ::slotted([slot='media']) {
|
|
@@ -1086,14 +1305,6 @@ media-theme {
|
|
|
1086
1305
|
--media-webkit-text-track-transition: transform 0.15s ease;
|
|
1087
1306
|
}
|
|
1088
1307
|
|
|
1089
|
-
media-captions-selectmenu {
|
|
1090
|
-
--media-listbox-background: var(--_secondary-color);
|
|
1091
|
-
--media-listbox-selected-background: rgba(255, 255, 255, 0.28);
|
|
1092
|
-
--media-listbox-hover-background: none;
|
|
1093
|
-
--media-listbox-hover-outline: white solid 1px;
|
|
1094
|
-
--media-text-color: white;
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
1308
|
media-volume-range[mediavolumeunavailable] {
|
|
1098
1309
|
--volume-range: none;
|
|
1099
1310
|
}
|
|
@@ -1361,37 +1572,30 @@ media-theme {
|
|
|
1361
1572
|
</media-mute-button>
|
|
1362
1573
|
</template>
|
|
1363
1574
|
|
|
1364
|
-
<template partial="
|
|
1365
|
-
<media-
|
|
1366
|
-
<
|
|
1367
|
-
<
|
|
1368
|
-
d="
|
|
1369
|
-
|
|
1370
|
-
</
|
|
1371
|
-
<
|
|
1372
|
-
<
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
</svg>
|
|
1376
|
-
</media-pip-button>
|
|
1575
|
+
<template partial="RenditionSelect">
|
|
1576
|
+
<media-rendition-selectmenu part="bottom rendition selectmenu" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1577
|
+
<media-rendition-button slot="button" part="bottom rendition button">
|
|
1578
|
+
<svg slot="icon" viewBox="0 0 18 24">
|
|
1579
|
+
<path d="M2.25 14.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6.75 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6.75 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/>
|
|
1580
|
+
</svg>
|
|
1581
|
+
</media-rendition-button>
|
|
1582
|
+
<media-rendition-listbox slot="listbox" part="bottom rendition listbox">
|
|
1583
|
+
<div slot="header">Quality</div>
|
|
1584
|
+
</media-rendition-listbox>
|
|
1585
|
+
</media-rendition-selectmenu>
|
|
1377
1586
|
</template>
|
|
1378
1587
|
|
|
1379
|
-
<template partial="
|
|
1380
|
-
<media-captions-selectmenu
|
|
1381
|
-
part="bottom captions
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
<svg aria-hidden="true" viewBox="0 0 26 24" slot="off">
|
|
1391
|
-
<path
|
|
1392
|
-
d="M22.832 5.68a2.58 2.58 0 0 0-2.3-2.5c-1.81-.12-4.67-.18-7.53-.18-2.86 0-5.72.06-7.53.18a2.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.5c1.81.12 4.67.18 7.53.18 2.86 0 5.72-.06 7.53-.18a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-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.137-.21-8.283 0-12.42a1.11 1.11 0 0 1 .91-1.11c1.67-.11 4.43-.18 7.43-.18s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.137.21 8.283 0 12.42ZM10.843 14a1.55 1.55 0 0 1-.76.18 1.57 1.57 0 0 1-.71-.18 1.69 1.69 0 0 1-.57-.42 2.099 2.099 0 0 1-.38-.58 2.47 2.47 0 0 1 0-1.64 2 2 0 0 1 .39-.66 1.73 1.73 0 0 1 .58-.42c.23-.103.479-.158.73-.16.241-.004.48.044.7.14.199.088.373.222.51.39l1.08-.89a2.179 2.179 0 0 0-.47-.44 2.81 2.81 0 0 0-.54-.32 2.91 2.91 0 0 0-.58-.15 2.71 2.71 0 0 0-.56 0 4.08 4.08 0 0 0-1.38.15 3.27 3.27 0 0 0-1.09.67 3.14 3.14 0 0 0-.71 1.06 3.62 3.62 0 0 0-.26 1.39 3.57 3.57 0 0 0 .26 1.38 3 3 0 0 0 .71 1.06c.316.293.687.52 1.09.67.443.16.91.238 1.38.23a3.2 3.2 0 0 0 1.28-.27c.401-.183.747-.47 1-.83l-1.17-.88a1.42 1.42 0 0 1-.53.52Zm6.62 0a1.58 1.58 0 0 1-.76.18 1.54 1.54 0 0 1-.7-.18 1.69 1.69 0 0 1-.57-.42 2.12 2.12 0 0 1-.43-.58 2.29 2.29 0 0 1 .39-2.3 1.84 1.84 0 0 1 1.32-.58c.241-.003.48.045.7.14.199.088.373.222.51.39l1.08-.92a2.43 2.43 0 0 0-.47-.44 3.22 3.22 0 0 0-.53-.29 2.999 2.999 0 0 0-.57-.15 2.87 2.87 0 0 0-.57 0 4.06 4.06 0 0 0-1.36.15 3.17 3.17 0 0 0-1.09.67 3 3 0 0 0-.72 1.06 3.62 3.62 0 0 0-.25 1.39 3.57 3.57 0 0 0 .25 1.38c.16.402.405.764.72 1.06a3.17 3.17 0 0 0 1.09.67c.44.16.904.237 1.37.23.441 0 .877-.092 1.28-.27a2.45 2.45 0 0 0 1-.83l-1.15-.85a1.49 1.49 0 0 1-.54.49Z"
|
|
1393
|
-
/>
|
|
1394
|
-
</svg>
|
|
1588
|
+
<template partial="CaptionsSelect">
|
|
1589
|
+
<media-captions-selectmenu part="bottom captions selectmenu" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1590
|
+
<media-captions-button slot="button" part="bottom captions button">
|
|
1591
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="on">
|
|
1592
|
+
<path d="M22.832 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.41 10.1a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 4 4 0 0 1-1.28-.83 3.67 3.67 0 0 1-.84-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.53 3.53 0 0 1 .84-1.21 3.89 3.89 0 0 1 1.29-.8 4.76 4.76 0 0 1 1.63-.27 4.06 4.06 0 0 1 1.35.24c.225.091.44.205.64.34a2.7 2.7 0 0 1 .55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.35 2.35 0 0 0-.46.77 2.78 2.78 0 0 0-.16 1c-.009.34.046.68.16 1 .104.283.26.545.46.77.188.21.415.38.67.5a2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.88 2.88 0 0 1-1.22 1.01Zm7.52 0a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 3.89 3.89 0 0 1-1.28-.83 3.55 3.55 0 0 1-.85-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.43 3.43 0 0 1 .85-1.25 3.75 3.75 0 0 1 1.28-.8 4.76 4.76 0 0 1 1.63-.27 4 4 0 0 1 1.35.24c.225.091.44.205.64.34.21.144.395.32.55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.352 2.352 0 0 0-.46.77 3.01 3.01 0 0 0-.16 1c-.003.34.05.678.16 1 .108.282.263.542.46.77.188.21.416.38.67.5a2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.82 2.82 0 0 1-1.21 1.05Z"/>
|
|
1593
|
+
</svg>
|
|
1594
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="off">
|
|
1595
|
+
<path d="M22.832 5.68a2.58 2.58 0 0 0-2.3-2.5c-1.81-.12-4.67-.18-7.53-.18-2.86 0-5.72.06-7.53.18a2.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.5c1.81.12 4.67.18 7.53.18 2.86 0 5.72-.06 7.53-.18a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-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.137-.21-8.283 0-12.42a1.11 1.11 0 0 1 .91-1.11c1.67-.11 4.43-.18 7.43-.18s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.137.21 8.283 0 12.42ZM10.843 14a1.55 1.55 0 0 1-.76.18 1.57 1.57 0 0 1-.71-.18 1.69 1.69 0 0 1-.57-.42 2.099 2.099 0 0 1-.38-.58 2.47 2.47 0 0 1 0-1.64 2 2 0 0 1 .39-.66 1.73 1.73 0 0 1 .58-.42c.23-.103.479-.158.73-.16.241-.004.48.044.7.14.199.088.373.222.51.39l1.08-.89a2.179 2.179 0 0 0-.47-.44 2.81 2.81 0 0 0-.54-.32 2.91 2.91 0 0 0-.58-.15 2.71 2.71 0 0 0-.56 0 4.08 4.08 0 0 0-1.38.15 3.27 3.27 0 0 0-1.09.67 3.14 3.14 0 0 0-.71 1.06 3.62 3.62 0 0 0-.26 1.39 3.57 3.57 0 0 0 .26 1.38 3 3 0 0 0 .71 1.06c.316.293.687.52 1.09.67.443.16.91.238 1.38.23a3.2 3.2 0 0 0 1.28-.27c.401-.183.747-.47 1-.83l-1.17-.88a1.42 1.42 0 0 1-.53.52Zm6.62 0a1.58 1.58 0 0 1-.76.18 1.54 1.54 0 0 1-.7-.18 1.69 1.69 0 0 1-.57-.42 2.12 2.12 0 0 1-.43-.58 2.29 2.29 0 0 1 .39-2.3 1.84 1.84 0 0 1 1.32-.58c.241-.003.48.045.7.14.199.088.373.222.51.39l1.08-.92a2.43 2.43 0 0 0-.47-.44 3.22 3.22 0 0 0-.53-.29 2.999 2.999 0 0 0-.57-.15 2.87 2.87 0 0 0-.57 0 4.06 4.06 0 0 0-1.36.15 3.17 3.17 0 0 0-1.09.67 3 3 0 0 0-.72 1.06 3.62 3.62 0 0 0-.25 1.39 3.57 3.57 0 0 0 .25 1.38c.16.402.405.764.72 1.06a3.17 3.17 0 0 0 1.09.67c.44.16.904.237 1.37.23.441 0 .877-.092 1.28-.27a2.45 2.45 0 0 0 1-.83l-1.15-.85a1.49 1.49 0 0 1-.54.49Z"/>
|
|
1596
|
+
</svg>
|
|
1597
|
+
</media-captions-button>
|
|
1598
|
+
<media-captions-listbox slot="listbox" part="bottom captions listbox"></media-captions-listbox>
|
|
1395
1599
|
</media-captions-selectmenu>
|
|
1396
1600
|
</template>
|
|
1397
1601
|
|
|
@@ -1408,21 +1612,6 @@ media-theme {
|
|
|
1408
1612
|
</media-airplay-button>
|
|
1409
1613
|
</template>
|
|
1410
1614
|
|
|
1411
|
-
<template partial="FullscreenButton">
|
|
1412
|
-
<media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1413
|
-
<svg aria-hidden="true" viewBox="0 0 24 24" slot="enter">
|
|
1414
|
-
<path
|
|
1415
|
-
d="M20.25 14.5a.76.76 0 0 0-.75.75v4.25h-4.25a.75.75 0 1 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5a.76.76 0 0 0-.75-.75Zm0-11.5h-5a.76.76 0 0 0-.75.75.76.76 0 0 0 .75.75h4.25v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75ZM8.75 19.5H4.5v-4.25a.76.76 0 0 0-.75-.75.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75h5a.75.75 0 1 0 0-1.5Zm0-16.5h-5a.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75.76.76 0 0 0 .75-.75V4.5h4.25a.76.76 0 0 0 .75-.75.76.76 0 0 0-.75-.75Z"
|
|
1416
|
-
/>
|
|
1417
|
-
</svg>
|
|
1418
|
-
<svg aria-hidden="true" viewBox="0 0 24 24" slot="exit">
|
|
1419
|
-
<path
|
|
1420
|
-
d="M20.25 14.5h-5a.76.76 0 0 0-.75.75v5a.75.75 0 1 0 1.5 0V16h4.25a.75.75 0 1 0 0-1.5Zm-5-5h5a.75.75 0 1 0 0-1.5H16V3.75a.75.75 0 1 0-1.5 0v5a.76.76 0 0 0 .75.75Zm-6.5 5h-5a.75.75 0 1 0 0 1.5H8v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75Zm0-11.5a.76.76 0 0 0-.75.75V8H3.75a.75.75 0 0 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5A.76.76 0 0 0 8.75 3Z"
|
|
1421
|
-
/>
|
|
1422
|
-
</svg>
|
|
1423
|
-
</media-fullscreen-button>
|
|
1424
|
-
</template>
|
|
1425
|
-
|
|
1426
1615
|
<template partial="CastButton">
|
|
1427
1616
|
<media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1428
1617
|
<svg aria-hidden="true" viewBox="0 0 26 24" slot="enter">
|
|
@@ -1443,6 +1632,36 @@ media-theme {
|
|
|
1443
1632
|
</media-cast-button>
|
|
1444
1633
|
</template>
|
|
1445
1634
|
|
|
1635
|
+
<template partial="PipButton">
|
|
1636
|
+
<media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1637
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="enter">
|
|
1638
|
+
<path
|
|
1639
|
+
d="M22 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V4.25h17.5v6.5H23V4a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7v5Z"
|
|
1640
|
+
/>
|
|
1641
|
+
</svg>
|
|
1642
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="exit">
|
|
1643
|
+
<path
|
|
1644
|
+
d="M22 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V4.25h17.5v6.5H23V4a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7v5Z"
|
|
1645
|
+
/>
|
|
1646
|
+
</svg>
|
|
1647
|
+
</media-pip-button>
|
|
1648
|
+
</template>
|
|
1649
|
+
|
|
1650
|
+
<template partial="FullscreenButton">
|
|
1651
|
+
<media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
1652
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="enter">
|
|
1653
|
+
<path
|
|
1654
|
+
d="M20.25 14.5a.76.76 0 0 0-.75.75v4.25h-4.25a.75.75 0 1 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5a.76.76 0 0 0-.75-.75Zm0-11.5h-5a.76.76 0 0 0-.75.75.76.76 0 0 0 .75.75h4.25v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75ZM8.75 19.5H4.5v-4.25a.76.76 0 0 0-.75-.75.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75h5a.75.75 0 1 0 0-1.5Zm0-16.5h-5a.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75.76.76 0 0 0 .75-.75V4.5h4.25a.76.76 0 0 0 .75-.75.76.76 0 0 0-.75-.75Z"
|
|
1655
|
+
/>
|
|
1656
|
+
</svg>
|
|
1657
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="exit">
|
|
1658
|
+
<path
|
|
1659
|
+
d="M20.25 14.5h-5a.76.76 0 0 0-.75.75v5a.75.75 0 1 0 1.5 0V16h4.25a.75.75 0 1 0 0-1.5Zm-5-5h5a.75.75 0 1 0 0-1.5H16V3.75a.75.75 0 1 0-1.5 0v5a.76.76 0 0 0 .75.75Zm-6.5 5h-5a.75.75 0 1 0 0 1.5H8v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75Zm0-11.5a.76.76 0 0 0-.75.75V8H3.75a.75.75 0 0 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5A.76.76 0 0 0 8.75 3Z"
|
|
1660
|
+
/>
|
|
1661
|
+
</svg>
|
|
1662
|
+
</media-fullscreen-button>
|
|
1663
|
+
</template>
|
|
1664
|
+
|
|
1446
1665
|
<template partial="LiveButton">
|
|
1447
1666
|
<media-live-button
|
|
1448
1667
|
part="{{section ?? 'top'}} live button"
|
|
@@ -1487,6 +1706,7 @@ media-theme {
|
|
|
1487
1706
|
</template>
|
|
1488
1707
|
|
|
1489
1708
|
<media-controller
|
|
1709
|
+
part="controller"
|
|
1490
1710
|
defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}"
|
|
1491
1711
|
breakpoints="sm:300 md:700"
|
|
1492
1712
|
gesturesdisabled="{{disabled}}"
|
|
@@ -1571,7 +1791,7 @@ media-theme {
|
|
|
1571
1791
|
{{>PlayButton}}
|
|
1572
1792
|
{{>MuteButton}}
|
|
1573
1793
|
<div class="spacer"></div>
|
|
1574
|
-
{{>
|
|
1794
|
+
{{>CaptionsSelect}}
|
|
1575
1795
|
{{>FullscreenButton}}
|
|
1576
1796
|
</media-control-bar>
|
|
1577
1797
|
</template>
|
|
@@ -1593,8 +1813,9 @@ media-theme {
|
|
|
1593
1813
|
{{>MuteButton}}
|
|
1594
1814
|
{{>VolumeRange}}
|
|
1595
1815
|
<div class="spacer"></div>
|
|
1816
|
+
{{>RenditionSelect}}
|
|
1596
1817
|
{{>PlaybackRateButton}}
|
|
1597
|
-
{{>
|
|
1818
|
+
{{>CaptionsSelect}}
|
|
1598
1819
|
{{>AirplayButton}}
|
|
1599
1820
|
{{>CastButton}}
|
|
1600
1821
|
{{>PipButton}}
|
|
@@ -1619,8 +1840,9 @@ media-theme {
|
|
|
1619
1840
|
{{>MuteButton}}
|
|
1620
1841
|
{{>VolumeRange}}
|
|
1621
1842
|
<div class="spacer"></div>
|
|
1843
|
+
{{>RenditionSelect}}
|
|
1622
1844
|
{{>PlaybackRateButton}}
|
|
1623
|
-
{{>
|
|
1845
|
+
{{>CaptionsSelect}}
|
|
1624
1846
|
{{>AirplayButton}}
|
|
1625
1847
|
{{>CastButton}}
|
|
1626
1848
|
{{>PipButton}}
|
|
@@ -1642,7 +1864,7 @@ media-theme {
|
|
|
1642
1864
|
{{>PlayButton}}
|
|
1643
1865
|
{{>MuteButton}}
|
|
1644
1866
|
<div class="spacer"></div>
|
|
1645
|
-
{{>
|
|
1867
|
+
{{>CaptionsSelect}}
|
|
1646
1868
|
{{>FullscreenButton}}
|
|
1647
1869
|
</media-control-bar>
|
|
1648
1870
|
</template>
|
|
@@ -1661,7 +1883,8 @@ media-theme {
|
|
|
1661
1883
|
{{>MuteButton}}
|
|
1662
1884
|
{{>VolumeRange}}
|
|
1663
1885
|
<div class="spacer"></div>
|
|
1664
|
-
{{>
|
|
1886
|
+
{{>RenditionSelect}}
|
|
1887
|
+
{{>CaptionsSelect}}
|
|
1665
1888
|
{{>AirplayButton}}
|
|
1666
1889
|
{{>CastButton}}
|
|
1667
1890
|
{{>PipButton}}
|
|
@@ -1683,7 +1906,8 @@ media-theme {
|
|
|
1683
1906
|
{{>MuteButton}}
|
|
1684
1907
|
{{>VolumeRange}}
|
|
1685
1908
|
<div class="spacer"></div>
|
|
1686
|
-
{{>
|
|
1909
|
+
{{>RenditionSelect}}
|
|
1910
|
+
{{>CaptionsSelect}}
|
|
1687
1911
|
{{>AirplayButton}}
|
|
1688
1912
|
{{>CastButton}}
|
|
1689
1913
|
{{>PipButton}}
|
|
@@ -1703,7 +1927,7 @@ media-theme {
|
|
|
1703
1927
|
{{>PlayButton}}
|
|
1704
1928
|
{{>MuteButton}}
|
|
1705
1929
|
<div class="spacer"></div>
|
|
1706
|
-
{{>
|
|
1930
|
+
{{>CaptionsSelect}}
|
|
1707
1931
|
{{>FullscreenButton}}
|
|
1708
1932
|
</media-control-bar>
|
|
1709
1933
|
</template>
|
|
@@ -1725,7 +1949,8 @@ media-theme {
|
|
|
1725
1949
|
{{>MuteButton}}
|
|
1726
1950
|
{{>VolumeRange}}
|
|
1727
1951
|
<div class="spacer"></div>
|
|
1728
|
-
{{>
|
|
1952
|
+
{{>RenditionSelect}}
|
|
1953
|
+
{{>CaptionsSelect}}
|
|
1729
1954
|
{{>AirplayButton}}
|
|
1730
1955
|
{{>CastButton}}
|
|
1731
1956
|
{{>PipButton}}
|
|
@@ -1750,7 +1975,8 @@ media-theme {
|
|
|
1750
1975
|
{{>MuteButton}}
|
|
1751
1976
|
{{>VolumeRange}}
|
|
1752
1977
|
<div class="spacer"></div>
|
|
1753
|
-
{{>
|
|
1978
|
+
{{>RenditionSelect}}
|
|
1979
|
+
{{>CaptionsSelect}}
|
|
1754
1980
|
{{>AirplayButton}}
|
|
1755
1981
|
{{>CastButton}}
|
|
1756
1982
|
{{>PipButton}}
|
|
@@ -1768,172 +1994,5 @@ media-theme {
|
|
|
1768
1994
|
|
|
1769
1995
|
</media-controller>
|
|
1770
1996
|
</template>
|
|
1771
|
-
`;var Ml=`
|
|
1772
|
-
|
|
1773
|
-
z-index: 100;
|
|
1774
|
-
display: var(--media-dialog-display, flex);
|
|
1775
|
-
justify-content: center;
|
|
1776
|
-
align-items: center;
|
|
1777
|
-
width: 100%;
|
|
1778
|
-
height: 100%;
|
|
1779
|
-
position: absolute;
|
|
1780
|
-
top: 0;
|
|
1781
|
-
left: 0;
|
|
1782
|
-
box-sizing: border-box;
|
|
1783
|
-
color: #fff;
|
|
1784
|
-
line-height: 18px;
|
|
1785
|
-
font-family: Arial, sans-serif;
|
|
1786
|
-
padding: var(--media-dialog-backdrop-padding, 0);
|
|
1787
|
-
background: var(--media-dialog-backdrop-background,
|
|
1788
|
-
linear-gradient(to bottom, rgba(20, 20, 30, 0.7) 50%, rgba(20, 20, 30, 0.9))
|
|
1789
|
-
);
|
|
1790
|
-
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
1791
|
-
transition: var(--media-dialog-transition-open, visibility .2s, opacity .2s) !important;
|
|
1792
|
-
transform: var(--media-dialog-transform-open, none) !important;
|
|
1793
|
-
visibility: visible !important;
|
|
1794
|
-
opacity: 1 !important;
|
|
1795
|
-
pointer-events: auto !important;
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
:host(:not([open])) {
|
|
1799
|
-
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
1800
|
-
transition: var(--media-dialog-transition-close, visibility .1s, opacity .1s) !important;
|
|
1801
|
-
transform: var(--media-dialog-transform-close, none) !important;
|
|
1802
|
-
visibility: hidden !important;
|
|
1803
|
-
opacity: 0 !important;
|
|
1804
|
-
pointer-events: none !important;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
:focus-visible {
|
|
1808
|
-
box-shadow: 0 0 0 2px rgba(27, 127, 204, 0.9);
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
|
-
.dialog {
|
|
1812
|
-
position: relative;
|
|
1813
|
-
box-sizing: border-box;
|
|
1814
|
-
background: var(--media-dialog-background, none);
|
|
1815
|
-
padding: var(--media-dialog-padding, 10px);
|
|
1816
|
-
width: min(320px, 100%);
|
|
1817
|
-
word-wrap: break-word;
|
|
1818
|
-
max-height: 100%;
|
|
1819
|
-
overflow: auto;
|
|
1820
|
-
text-align: center;
|
|
1821
|
-
line-height: 1.4;
|
|
1822
|
-
}
|
|
1823
|
-
`,Ll=se.createElement("template");Ll.innerHTML=`
|
|
1824
|
-
<style>
|
|
1825
|
-
${Ml}
|
|
1826
|
-
</style>
|
|
1827
|
-
|
|
1828
|
-
<div class="dialog">
|
|
1829
|
-
<slot></slot>
|
|
1830
|
-
</div>
|
|
1831
|
-
`;var tt=class extends F.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})),Sl(this)}close(){!this.hasAttribute("open")||(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),Fu(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")&&Sl(this)}};tt.styles=Ml,tt.template=Ll,tt.observedAttributes=["open"];function Sl(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=wl(i.shadowRoot)),i._previouslyFocusedElement=se.activeElement,se.activeElement instanceof HTMLElement&&se.activeElement.blur(),i.addEventListener("transitionend",()=>{t instanceof HTMLElement&&t.focus({preventScroll:!0})},{once:!0})}function wl(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=wl(r[n].shadowRoot),a));n++);}return a}function Fu(i){i._previouslyFocusedElement instanceof HTMLElement&&i._previouslyFocusedElement.focus()}F.customElements.get("media-dialog")||(F.customElements.define("media-dialog",tt),F.MediaDialog=tt);var qn=tt;var Cl=se.createElement("template");Cl.innerHTML=`
|
|
1832
|
-
<style>
|
|
1833
|
-
${qn.styles}
|
|
1834
|
-
|
|
1835
|
-
.close {
|
|
1836
|
-
background: none;
|
|
1837
|
-
color: inherit;
|
|
1838
|
-
border: none;
|
|
1839
|
-
padding: 0;
|
|
1840
|
-
font: inherit;
|
|
1841
|
-
cursor: pointer;
|
|
1842
|
-
outline: inherit;
|
|
1843
|
-
width: 28px;
|
|
1844
|
-
height: 28px;
|
|
1845
|
-
position: absolute;
|
|
1846
|
-
top: 1rem;
|
|
1847
|
-
right: 1rem;
|
|
1848
|
-
}
|
|
1849
|
-
</style>
|
|
1850
|
-
|
|
1851
|
-
<div class="dialog">
|
|
1852
|
-
<slot></slot>
|
|
1853
|
-
</div>
|
|
1854
|
-
|
|
1855
|
-
<slot name="close">
|
|
1856
|
-
<button class="close" tabindex="0">
|
|
1857
|
-
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1858
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
1859
|
-
</svg>
|
|
1860
|
-
</button>
|
|
1861
|
-
</slot>
|
|
1862
|
-
`;var $i=class extends qn{constructor(){var e,t;super(),(t=(e=this.shadowRoot)==null?void 0:e.querySelector(".close"))==null||t.addEventListener("click",()=>{this.close()})}};$i.template=Cl;F.customElements.get("mxp-dialog")||(F.customElements.define("mxp-dialog",$i),F.MxpDialog=$i);var Vi=new WeakMap,Hi=class{constructor(e,t){this.element=e;this.type=t;this.element.addEventListener(this.type,this);let a=Vi.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=Vi.get(this.element);t&&t.delete(this.type)}}static for(e){Vi.has(e.element)||Vi.set(e.element,new Map);let t=e.attributeName.slice(2),a=Vi.get(e.element);return a&&a.has(t)?a.get(t):new Hi(e.element,t)}};function Ku(i,e){return i instanceof ee&&i.attributeName.startsWith("on")?(Hi.for(i).set(e),i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),!0):!1}function Yu(i,e){return e instanceof ur&&i instanceof $e?(e.renderInto(i),!0):!1}function Gu(i,e){return e instanceof DocumentFragment&&i instanceof $e?(e.childNodes.length&&i.replace(...e.childNodes),!0):!1}function Zu(i,e){if(i instanceof ee){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 qu(i,e){if(i instanceof ee&&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 Qu(i,e){if(typeof e=="boolean"&&i instanceof ee){let t=i.attributeNamespace,a=i.element.hasAttributeNS(t,i.attributeName);return e!==a&&(i.booleanValue=e),!0}return!1}function zu(i,e){return e===!1&&i instanceof $e?(i.replace(""),!0):!1}function Xu(i,e){qu(i,e)||Qu(i,e)||Ku(i,e)||zu(i,e)||Yu(i,e)||Gu(i,e)||Zu(i,e)}var Qn=new Map,Rl=new WeakMap,xl=new WeakMap,ur=class{constructor(e,t,a){this.strings=e;this.values=t;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(Qn.has(this.stringsKey))return Qn.get(this.stringsKey);{let e=se.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<t?`{{ ${n} }}`:""),""),Qn.set(this.stringsKey,e),e}}renderInto(e){var r;let t=this.template;if(Rl.get(e)!==t){Rl.set(e,t);let n=new Be(t,this.values,this.processor);xl.set(e,n),e instanceof $e?e.replace(...n.children):e.appendChild(n);return}let a=xl.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},Ju={processCallback(i,e,t){var a;if(!!t){for(let[r,n]of e)if(r in t){let s=(a=t[r])!=null?a:"";Xu(n,s)}}}};function Ve(i,...e){return new ur(i,e,Ju)}function Dl(i,e){i.renderInto(e)}var Ol=require("@mux/playback-core"),zn=se.createElement("template");"innerHTML"in zn&&(zn.innerHTML=kl);var Nl=i=>Ve`
|
|
1863
|
-
<style>
|
|
1864
|
-
${Il}
|
|
1865
|
-
</style>
|
|
1866
|
-
${ec(i)}
|
|
1867
|
-
`,ju=i=>{let e=i.hotKeys?`${i.hotKeys}`:"";return Ri(i.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},ec=i=>{var e,t,a,r,n,s,l,u,m,p,f,v,T,B,Z,I,ne,ve,oe,oi,Mt,jn,es,ts,is,as,rs,ns,ss,os,ls,ds,us,cs,ms;return Ve`
|
|
1868
|
-
<media-theme
|
|
1869
|
-
template="${(e=i.themeTemplate)!=null?e:zn.content.children[0]}"
|
|
1870
|
-
defaultstreamtype="${(t=i.defaultStreamType)!=null?t:!1}"
|
|
1871
|
-
hotkeys="${ju(i)||!1}"
|
|
1872
|
-
nohotkeys="${i.noHotKeys||!i.hasSrc||i.isDialogOpen||!1}"
|
|
1873
|
-
noautoseektolive="${!!((a=i.streamType)!=null&&a.includes(Ol.StreamTypes.LIVE))&&i.targetLiveWindow!==0}"
|
|
1874
|
-
novolumepref="${i.novolumepref||!1}"
|
|
1875
|
-
disabled="${!i.hasSrc||i.isDialogOpen}"
|
|
1876
|
-
audio="${(r=i.audio)!=null?r:!1}"
|
|
1877
|
-
style="${(n=al({"--media-primary-color":i.primaryColor,"--media-secondary-color":i.secondaryColor}))!=null?n:!1}"
|
|
1878
|
-
defaultsubtitles="${!i.defaultHiddenCaptions}"
|
|
1879
|
-
forwardseekoffset="${(s=i.forwardSeekOffset)!=null?s:!1}"
|
|
1880
|
-
backwardseekoffset="${(l=i.backwardSeekOffset)!=null?l:!1}"
|
|
1881
|
-
playbackrates="${(u=i.playbackRates)!=null?u:!1}"
|
|
1882
|
-
defaultshowremainingtime="${(m=i.defaultShowRemainingTime)!=null?m:!1}"
|
|
1883
|
-
hideduration="${(p=i.hideDuration)!=null?p:!1}"
|
|
1884
|
-
title="${(f=i.title)!=null?f:!1}"
|
|
1885
|
-
exportparts="top, center, bottom, layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer, poster, live, play, button, seek-backward, seek-forward, mute, captions, airplay, pip, fullscreen, cast, playback-rate, volume, range, time, display"
|
|
1886
|
-
>
|
|
1887
|
-
<mux-video
|
|
1888
|
-
slot="media"
|
|
1889
|
-
target-live-window="${(v=i.targetLiveWindow)!=null?v:!1}"
|
|
1890
|
-
stream-type="${(T=Ri(i.streamType))!=null?T:!1}"
|
|
1891
|
-
crossorigin="${(B=i.crossOrigin)!=null?B:""}"
|
|
1892
|
-
playsinline
|
|
1893
|
-
autoplay="${(Z=i.autoplay)!=null?Z:!1}"
|
|
1894
|
-
muted="${(I=i.muted)!=null?I:!1}"
|
|
1895
|
-
loop="${(ne=i.loop)!=null?ne:!1}"
|
|
1896
|
-
preload="${(ve=i.preload)!=null?ve:!1}"
|
|
1897
|
-
debug="${(oe=i.debug)!=null?oe:!1}"
|
|
1898
|
-
prefer-cmcd="${(oi=i.preferCmcd)!=null?oi:!1}"
|
|
1899
|
-
disable-cookies="${(Mt=i.disableCookies)!=null?Mt:!1}"
|
|
1900
|
-
prefer-playback="${(jn=i.preferPlayback)!=null?jn:!1}"
|
|
1901
|
-
start-time="${i.startTime!=null?i.startTime:!1}"
|
|
1902
|
-
beacon-collection-domain="${(es=i.beaconCollectionDomain)!=null?es:!1}"
|
|
1903
|
-
player-software-name="${(ts=i.playerSoftwareName)!=null?ts:!1}"
|
|
1904
|
-
player-software-version="${(is=i.playerSoftwareVersion)!=null?is:!1}"
|
|
1905
|
-
env-key="${(as=i.envKey)!=null?as:!1}"
|
|
1906
|
-
custom-domain="${(rs=i.customDomain)!=null?rs:!1}"
|
|
1907
|
-
src="${i.src?i.src:i.playbackId?Pn(i.playbackId,{maxResolution:i.maxResolution,domain:i.customDomain,token:i.tokens.playback}):!1}"
|
|
1908
|
-
cast-src="${i.src?i.src:i.playbackId?Pn(i.playbackId,{maxResolution:i.maxResolution,domain:i.customDomain,token:i.tokens.playback}):!1}"
|
|
1909
|
-
exportparts="video"
|
|
1910
|
-
>
|
|
1911
|
-
${i.storyboard?Ve`<track label="thumbnails" default kind="metadata" src="${i.storyboard}" />`:Ve``}
|
|
1912
|
-
</mux-video>
|
|
1913
|
-
<media-poster-image
|
|
1914
|
-
slot="poster"
|
|
1915
|
-
part="poster"
|
|
1916
|
-
src="${i.poster===""?!1:(ns=i.poster)!=null?ns:!1}"
|
|
1917
|
-
placeholder-src="${(ss=i.placeholder)!=null?ss:!1}"
|
|
1918
|
-
></media-poster-image>
|
|
1919
|
-
<mxp-dialog
|
|
1920
|
-
no-auto-hide
|
|
1921
|
-
open="${(os=i.isDialogOpen)!=null?os:!1}"
|
|
1922
|
-
onclose="${i.onCloseErrorDialog}"
|
|
1923
|
-
oninitfocus="${i.onInitFocusDialog}"
|
|
1924
|
-
>
|
|
1925
|
-
${(ls=i.dialog)!=null&&ls.title?Ve`<h3>${i.dialog.title}</h3>`:Ve``}
|
|
1926
|
-
<p>
|
|
1927
|
-
${(ds=i.dialog)==null?void 0:ds.message}
|
|
1928
|
-
${(us=i.dialog)!=null&&us.linkUrl?Ve`<a
|
|
1929
|
-
href="${i.dialog.linkUrl}"
|
|
1930
|
-
target="_blank"
|
|
1931
|
-
rel="external noopener"
|
|
1932
|
-
aria-label="${(cs=i.dialog.linkText)!=null?cs:""} ${y("(opens in a new window)")}"
|
|
1933
|
-
>${(ms=i.dialog.linkText)!=null?ms:i.dialog.linkUrl}</a
|
|
1934
|
-
>`:Ve``}
|
|
1935
|
-
</p>
|
|
1936
|
-
</mxp-dialog>
|
|
1937
|
-
</media-theme>
|
|
1938
|
-
`};var Wi=require("@mux/mux-video");function cr(i,e,t,a,r){var l,u,m;let n={},s={};switch(i.code){case Wi.MediaError.MEDIA_ERR_NETWORK:{switch(n.title=y("Network Error",r),n.message=i.message,(l=i.data)==null?void 0:l.response.code){case 412:{n.title=y("Video is not currently available",r),n.message=y("The live stream or video file are not yet ready.",r),s.message=y("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),s.file="412-not-playable.md";break}case 404:{n.title=y("Video does not exist",r),n.message="",s.message=y("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),s.file="404-not-found.md";break}case 403:{if(n.title=y("Invalid playback URL",r),n.message=y("The video URL or playback-token are formatted with incorrect or incomplete information.",r),s.message=y("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",r),s.file="missing-signed-tokens.md",!a)break;let{exp:p,aud:f,sub:v}=ze(a),T=Date.now()>p*1e3,B=v!==t,Z=f!=="v",I={timeStyle:"medium",dateStyle:"medium"};if(T){n.title=y("Video URL has expired",r),n.message=y("The video\u2019s secured playback-token has expired.",r),s.message=y("The video\u2019s secured playback-token has expired.",r),s.context=y("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat(bt.code,I).format(p*1e3),currentDate:new Intl.DateTimeFormat(bt.code,I).format(Date.now())}),s.file="403-expired-token.md";break}if(B){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.context=y("Specified playback ID: {playbackId} and the playback ID encoded in the playback-token: {tokenPlaybackId}",r).format({playbackId:t,tokenPlaybackId:v}),s.file="403-playback-id-mismatch.md";break}if(Z){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The playback-token is formatted with incorrect information.",r),s.message=y("The playback-token is formatted with incorrect information.",r),s.context=y("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",r).format({tokenType:f}),s.file="403-incorrect-aud-value.md";break}s.message=y("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",r),s.file="403-malformatted-token.md";break}}break}case Wi.MediaError.MEDIA_ERR_DECODE:{let{message:p}=i;n={title:y("Media Error",r),message:p},s.file="media-decode-error.md";break}case Wi.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:{let p=(m=(u=i.data)==null?void 0:u.response)==null?void 0:m.code;if(p>=400&&p<500){i.code=Wi.MediaError.MEDIA_ERR_NETWORK,i.data={response:{code:p}},{dialog:n,devlog:s}=cr(i,e,t,a);break}n={title:y("Source Not Supported",r),message:i.message},s.file="media-src-not-supported.md";break}default:n={title:y("Error",r),message:i.message};break}return e&&(n={title:y("Your device appears to be offline",r),message:y("Check your internet connection and try reloading this video.",r)}),{dialog:n,devlog:s}}var He={SRC:"src",POSTER:"poster"},h={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",TITLE:"title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",NO_VOLUME_PREF:"no-volume-pref"},Xn=["audio","backwardseekoffset","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function tc(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(h.STORYBOARD_SRC),placeholder:i.getAttribute("placeholder"),themeTemplate:ic(i),thumbnailTime:!i.tokens.thumbnail&&i.thumbnailTime,autoplay:i.autoplay,crossOrigin:i.crossOrigin,loop:i.loop,noHotKeys:i.hasAttribute(h.NOHOTKEYS),hotKeys:i.getAttribute(h.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,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:Ri(i.getAttribute(A.Attributes.STREAM_TYPE)),primaryColor:i.primaryColor,secondaryColor:i.secondaryColor,forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:ac(i),playbackRates:i.getAttribute(h.PLAYBACK_RATES),customDomain:(a=i.getAttribute(A.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,title:i.getAttribute(h.TITLE),novolumepref:i.hasAttribute(h.NO_VOLUME_PREF),...e}}function ic(i){var t,a;let e=i.getAttribute(h.THEME);if(e){let r=(a=(t=i.getRootNode())==null?void 0:t.getElementById)==null?void 0:a.call(t,e);if(r)return r;e.startsWith("media-theme-")||(e=`media-theme-${e}`);let n=F.customElements.get(e);if(n!=null&&n.template)return n.template}}function ac(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 Pl(i){return i.getAttributeNames().filter(e=>e.startsWith("metadata-")).reduce((e,t)=>{let a=i.getAttribute(t);return a!==null&&(e[t.replace(/^metadata-/,"").replace(/-/g,"_")]=a),e},{})}var rc=Object.values(A.Attributes),nc=Object.values(He),sc=Object.values(h),oc=tr(),lc="mux-player",Ul={dialog:void 0,isDialogOpen:!1},Ki,Yi,We,Gi,St,it,ni,mr,Bl,Zi,Jn,at,si,hr,$l,pr,Vl,Er,Hl,br,Wl,Fi=class extends $n{constructor(){super();H(this,it);H(this,mr);H(this,Zi);H(this,at);H(this,hr);H(this,pr);H(this,Er);H(this,br);H(this,Ki,!1);H(this,Yi,{});H(this,We,!0);H(this,Gi,new er(this,"hotkeys"));H(this,St,{...Ul,onCloseErrorDialog:()=>Y(this,Zi,Jn).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:t=>{On(this,se.activeElement)||t.preventDefault()}});this.attachShadow({mode:"open"}),Y(this,mr,Bl).call(this),this.isConnected&&Y(this,it,ni).call(this)}static get observedAttributes(){var t;return[...(t=$n.observedAttributes)!=null?t:[],...nc,...rc,...sc]}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=Pl(this))}attributeChangedCallback(t,a,r){switch(Y(this,it,ni).call(this),super.attributeChangedCallback(t,a,r),t){case h.HOTKEYS:k(this,Gi).value=r;break;case h.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&Xe(y("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case h.THUMBNAIL_TOKEN:{let{aud:s}=ze(r);r&&s!=="t"&&Xe(y("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case h.STORYBOARD_TOKEN:{let{aud:s}=ze(r);r&&s!=="s"&&Xe(y("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:s}));break}case A.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&Ee(y("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case A.Attributes.STREAM_TYPE:r&&![P.StreamTypes.LIVE,P.StreamTypes.ON_DEMAND,P.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:Un({file:"invalid-stream-type.md",message:y("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):this.targetLiveWindow=r===P.StreamTypes.LIVE?0:Number.NaN}[A.Attributes.PLAYBACK_ID,He.SRC,h.PLAYBACK_TOKEN].includes(t)&&a!==r&&le(this,St,{...k(this,St),...Ul}),Y(this,at,si).call(this,{[sl(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?P.CmcdTypeValues.includes(t)?this.setAttribute(A.Attributes.PREFER_CMCD,t):Xe(`Invalid value for preferCmcd. Must be one of ${P.CmcdTypeValues.join()}`):this.removeAttribute(A.Attributes.PREFER_CMCD))}get hasPlayed(){var t,a;return(a=(t=this.mediaController)==null?void 0:t.hasAttribute("media-has-played"))!=null?a:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute("media-time-is-live")}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(h.THEME))!=null?t:""}set theme(t){this.setAttribute(h.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let a={};for(let r of t.getAttributeNames()){if(Xn.includes(r))continue;let n=t.getAttribute(r);a[Xa(r)]=n===""?!0:n}return a}set themeProps(t){var r,n;Y(this,it,ni).call(this);let a={...this.themeProps,...t};for(let s in a){if(Xn.includes(s))continue;let l=t==null?void 0:t[s];typeof l=="boolean"||l==null?(r=this.mediaTheme)==null||r.toggleAttribute(za(s),Boolean(l)):(n=this.mediaTheme)==null||n.setAttribute(za(s),l)}}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=kt(this,He.SRC))!=null?t:void 0:(a=this.getAttribute(He.SRC))!=null?a:void 0}set src(t){t?this.setAttribute(He.SRC,t):this.removeAttribute(He.SRC)}get poster(){var a;let t=this.getAttribute(He.POSTER);if(t!=null)return t;if(this.playbackId&&!this.audio)return rl(this.playbackId,{domain:this.customDomain,thumbnailTime:(a=this.thumbnailTime)!=null?a:this.startTime,token:this.tokens.thumbnail})}set poster(t){t||t===""?this.setAttribute(He.POSTER,t):this.removeAttribute(He.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(h.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(h.STORYBOARD_SRC,t):this.removeAttribute(h.STORYBOARD_SRC)}get storyboard(){if(this.storyboardSrc&&!this.tokens.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[P.StreamTypes.LIVE,P.StreamTypes.UNKNOWN].includes(this.streamType)))return nl(this.playbackId,{domain:this.customDomain,token:this.tokens.storyboard})}get audio(){return this.hasAttribute(h.AUDIO)}set audio(t){if(!t){this.removeAttribute(h.AUDIO);return}this.setAttribute(h.AUDIO,"")}get hotkeys(){return k(this,Gi)}get nohotkeys(){return this.hasAttribute(h.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(h.NOHOTKEYS);return}this.setAttribute(h.NOHOTKEYS,"")}get thumbnailTime(){return Pe(this.getAttribute(h.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(h.THUMBNAIL_TIME,`${t}`)}get title(){var t;return(t=this.getAttribute(h.TITLE))!=null?t:""}set title(t){t!==this.title&&(t?this.setAttribute(h.TITLE,t):this.removeAttribute("title"),super.title=t)}get placeholder(){var t;return(t=kt(this,h.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(h.PLACEHOLDER,`${t}`)}get primaryColor(){var a,r;let t=this.getAttribute(h.PRIMARY_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=F.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_primary-color"))==null?void 0:r.trim(),t))return t}set primaryColor(t){this.setAttribute(h.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var a,r;let t=this.getAttribute(h.SECONDARY_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=F.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_secondary-color"))==null?void 0:r.trim(),t))return t}set secondaryColor(t){this.setAttribute(h.SECONDARY_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(h.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(h.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(h.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(!!this.hasAttribute(h.PLAYBACK_RATES))return this.getAttribute(h.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(h.PLAYBACK_RATES);return}this.setAttribute(h.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=Pe(this.getAttribute(h.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(h.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=Pe(this.getAttribute(h.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(h.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(h.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(h.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(h.DEFAULT_HIDDEN_CAPTIONS)}get playerSoftwareName(){var t;return(t=this.getAttribute(A.Attributes.PLAYER_SOFTWARE_NAME))!=null?t:lc}get playerSoftwareVersion(){var t;return(t=this.getAttribute(A.Attributes.PLAYER_SOFTWARE_VERSION))!=null?t:oc}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 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=kt(this,A.Attributes.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(A.Attributes.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(h.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(h.NO_VOLUME_PREF,""):this.removeAttribute(h.NO_VOLUME_PREF)}get debug(){return kt(this,A.Attributes.DEBUG)!=null}set debug(t){t?this.setAttribute(A.Attributes.DEBUG,""):this.removeAttribute(A.Attributes.DEBUG)}get disableCookies(){return kt(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:P.StreamTypes.UNKNOWN}set streamType(t){this.setAttribute(A.Attributes.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,a,r;return(r=(a=this.getAttribute(h.DEFAULT_STREAM_TYPE))!=null?a:(t=this.mediaController)==null?void 0:t.getAttribute(h.DEFAULT_STREAM_TYPE))!=null?r:P.StreamTypes.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(h.DEFAULT_STREAM_TYPE,t):this.removeAttribute(h.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,a;return this.hasAttribute(h.TARGET_LIVE_WINDOW)?+this.getAttribute(h.TARGET_LIVE_WINDOW):(a=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(t){t!=this.targetLiveWindow&&(t==null?this.removeAttribute(h.TARGET_LIVE_WINDOW):this.setAttribute(h.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return Pe(kt(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===P.PlaybackTypes.MSE||t===P.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===P.PlaybackTypes.MSE||t===P.PlaybackTypes.NATIVE?this.setAttribute(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(Y(this,it,ni).call(this),!this.media){Ee("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...Pl(this),...t}}async addCuePoints(t){var a;if(Y(this,it,ni).call(this),!this.media){Ee("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(a=this.media)==null?void 0:a.addCuePoints(t)}get activeCuePoint(){var t;return(t=this.media)==null?void 0:t.activeCuePoint}get cuePoints(){var t,a;return(a=(t=this.media)==null?void 0:t.cuePoints)!=null?a:[]}getStartDate(){var t;return(t=this.media)==null?void 0:t.getStartDate()}get currentPdt(){var t;return(t=this.media)==null?void 0:t.currentPdt}get tokens(){let t=this.getAttribute(h.PLAYBACK_TOKEN),a=this.getAttribute(h.THUMBNAIL_TOKEN),r=this.getAttribute(h.STORYBOARD_TOKEN);return{...k(this,Yi),...t!=null?{playback:t}:{},...a!=null?{thumbnail:a}:{},...r!=null?{storyboard:r}:{}}}set tokens(t){le(this,Yi,t!=null?t:{})}get playbackToken(){var t;return(t=this.getAttribute(h.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(h.PLAYBACK_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(h.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(h.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(h.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(h.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,a,r,n){var l;let s=(l=this.media)==null?void 0:l.nativeEl;if(!!s)return(0,P.addTextTrack)(s,t,a,r,n)}removeTextTrack(t){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(!!a)return(0,P.removeTextTrack)(a,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}};Ki=new WeakMap,Yi=new WeakMap,We=new WeakMap,Gi=new WeakMap,St=new WeakMap,it=new WeakSet,ni=function(){var t,a,r;if(!k(this,Ki)){le(this,Ki,!0),Y(this,at,si).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof F.HTMLElement))throw""}catch{Ee("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof A.default))throw""}catch{Ee("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof Or))throw""}catch{Ee("<media-controller> failed to upgrade!")}cl(this),Y(this,hr,$l).call(this),Y(this,pr,Vl).call(this),Y(this,Er,Hl).call(this),le(this,We,(a=(t=this.mediaController)==null?void 0:t.hasAttribute("userinactive"))!=null?a:!0),Y(this,br,Wl).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>{Y(this,at,si).call(this)})}},mr=new WeakSet,Bl=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{}},Zi=new WeakSet,Jn=function(t){Object.assign(k(this,St),t),Y(this,at,si).call(this)},at=new WeakSet,si=function(t={}){Dl(Nl(tc(this,{...k(this,St),...t})),this.shadowRoot)},hr=new WeakSet,$l=function(){let t=r=>{var l,u;if(!(r!=null&&r.startsWith("theme-")))return;let n=r.replace(/^theme-/,"");if(Xn.includes(n))return;let s=this.getAttribute(r);s!=null?(l=this.mediaTheme)==null||l.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)},pr=new WeakSet,Vl=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)){Xe(n),n.data&&Xe(`${n.name} data:`,n.data);return}let{dialog:s,devlog:l}=cr(n,!window.navigator.onLine,this.playbackId,this.playbackToken);l.message&&Un(l),Ee(n),n.data&&Ee(`${n.name} data:`,n.data),Y(this,Zi,Jn).call(this,{isDialogOpen:!0,dialog:s})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(r={})=>{var s,l,u;if(!(((s=this.media)==null?void 0:s.error)instanceof A.MediaError))return r;let{devlog:n}=cr((l=this.media)==null?void 0:l.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,l;let{detail:n}=r;if(!n){let{message:u,code:m}=(l=(s=this.media)==null?void 0:s.error)!=null?l:{};n=new A.MediaError(u,m)}!(n!=null&&n.fatal)||this.dispatchEvent(new CustomEvent("error",{detail:n}))})},Er=new WeakSet,Hl=function(){var a,r,n,s;let t=()=>Y(this,at,si).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)},br=new WeakSet,Wl=function(){var p,f;let t=/.*Version\/.*Safari\/.*/.test(navigator.userAgent);if(!/Firefox/i.test(navigator.userAgent))return;let r,n=new WeakMap,s=()=>this.streamType===P.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,l=(v,T,B=!1)=>{if(s())return;Array.from(v&&v.activeCues||[]).forEach(I=>{if(!(!I.snapToLines||I.line<-5||I.line>=0&&I.line<10))if(!T||this.paused){let ne=I.text.split(`
|
|
1939
|
-
`).length,ve=t?-2:-3;this.streamType===P.StreamTypes.LIVE&&(ve=t?-1:-2);let oe=ve-ne;if(I.line===oe&&!B)return;n.has(I)||n.set(I,I.line),I.line=oe-1,I.line=oe}else setTimeout(()=>{I.line=n.get(I)||"auto"},500)})},u=()=>{var v,T;l(r,(T=(v=this.mediaController)==null?void 0:v.hasAttribute("userinactive"))!=null?T:!1)},m=()=>{var B,Z;let T=Array.from(((Z=(B=this.mediaController)==null?void 0:B.media)==null?void 0:Z.textTracks)||[]).filter(I=>["subtitles","captions"].includes(I.kind)&&I.mode==="showing")[0];T!==r&&(r==null||r.removeEventListener("cuechange",u)),r=T,r==null||r.addEventListener("cuechange",u),l(r,k(this,We))};if(m(),(p=this.textTracks)==null||p.addEventListener("change",m),(f=this.textTracks)==null||f.addEventListener("addtrack",m),navigator.userAgent.includes("Chrome/")){let v=()=>{l(r,k(this,We),!0),this.paused||window.requestAnimationFrame(v)};this.addEventListener("playing",()=>{v()})}this.addEventListener("userinactivechange",()=>{var T,B;let v=(B=(T=this.mediaController)==null?void 0:T.hasAttribute("userinactive"))!=null?B:!0;k(this,We)!==v&&(le(this,We,v),l(r,k(this,We)))})};function kt(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}F.customElements.get("mux-player")||(F.customElements.define("mux-player",Fi),F.MuxPlayerElement=Fi);var dc=Fi;
|
|
1997
|
+
`;var Ss=ne.createElement("template");"innerHTML"in Ss&&(Ss.innerHTML=ud);var cd,md,Lr=class extends rt{};Lr.template=(md=(cd=Ss.content)==null?void 0:cd.children)==null?void 0:md[0];B.customElements.get("media-theme-classic")||B.customElements.define("media-theme-classic",Lr);var Uc="classic";var We={SRC:"src",POSTER:"poster"},p={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",TITLE:"title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",NO_VOLUME_PREF:"no-volume-pref"},ks=["audio","backwardseekoffset","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function Bc(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:$c(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,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:Ri(i.getAttribute(g.Attributes.STREAM_TYPE)),primaryColor:i.primaryColor,secondaryColor:i.secondaryColor,forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:Vc(i),playbackRates:i.getAttribute(p.PLAYBACK_RATES),customDomain:(a=i.getAttribute(g.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,title:i.getAttribute(p.TITLE),novolumepref:i.hasAttribute(p.NO_VOLUME_PREF),...e}}function $c(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=B.customElements.get(e);if(n!=null&&n.template)return n.template}}function Vc(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 hd(i){return i.getAttributeNames().filter(e=>e.startsWith("metadata-")).reduce((e,t)=>{let a=i.getAttribute(t);return a!==null&&(e[t.replace(/^metadata-/,"").replace(/-/g,"_")]=a),e},{})}var Hc=Object.values(g.Attributes),Wc=Object.values(We),Fc=Object.values(p),Kc=br(),Yc="mux-player",pd={dialog:void 0,isDialogOpen:!1},Fi,Ki,Fe,Yi,Mt,st,ai,Cr,Ed,Gi,Ms,ot,ri,Rr,vd,wr,bd,xr,fd,Dr,gd,Wi=class extends ps{constructor(){super();W(this,st);W(this,Cr);W(this,Gi);W(this,ot);W(this,Rr);W(this,wr);W(this,xr);W(this,Dr);W(this,Fi,!1);W(this,Ki,{});W(this,Fe,!0);W(this,Yi,new vr(this,"hotkeys"));W(this,Mt,{...pd,onCloseErrorDialog:()=>K(this,Gi,Ms).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:t=>{ds(this,ne.activeElement)||t.preventDefault()}});this.attachShadow({mode:"open"}),K(this,Cr,Ed).call(this),this.isConnected&&K(this,st,ai).call(this)}static get observedAttributes(){var t;return[...(t=ps.observedAttributes)!=null?t:[],...Wc,...Hc,...Fc]}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=hd(this))}attributeChangedCallback(t,a,r){switch(K(this,st,ai).call(this),super.attributeChangedCallback(t,a,r),t){case p.HOTKEYS:S(this,Yi).value=r;break;case p.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&et(y("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case p.THUMBNAIL_TOKEN:{let{aud:s}=je(r);r&&s!=="t"&&et(y("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case p.STORYBOARD_TOKEN:{let{aud:s}=je(r);r&&s!=="s"&&et(y("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:s}));break}case g.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&pe(y("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case g.Attributes.STREAM_TYPE:r&&![U.StreamTypes.LIVE,U.StreamTypes.ON_DEMAND,U.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:ms({file:"invalid-stream-type.md",message:y("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):this.targetLiveWindow=r===U.StreamTypes.LIVE?0:Number.NaN}[g.Attributes.PLAYBACK_ID,We.SRC,p.PLAYBACK_TOKEN].includes(t)&&a!==r&&oe(this,Mt,{...S(this,Mt),...pd}),K(this,ot,ri).call(this,{[Nl(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?U.CmcdTypeValues.includes(t)?this.setAttribute(g.Attributes.PREFER_CMCD,t):et(`Invalid value for preferCmcd. Must be one of ${U.CmcdTypeValues.join()}`):this.removeAttribute(g.Attributes.PREFER_CMCD))}get hasPlayed(){var t,a;return(a=(t=this.mediaController)==null?void 0:t.hasAttribute("media-has-played"))!=null?a:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute("media-time-is-live")}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(p.THEME))!=null?t:Uc}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(ks.includes(r))continue;let n=t.getAttribute(r);a[hr(r)]=n===""?!0:n}return a}set themeProps(t){var r,n;K(this,st,ai).call(this);let a={...this.themeProps,...t};for(let s in a){if(ks.includes(s))continue;let l=t==null?void 0:t[s];typeof l=="boolean"||l==null?(r=this.mediaTheme)==null||r.toggleAttribute(mr(s),Boolean(l)):(n=this.mediaTheme)==null||n.setAttribute(mr(s),l)}}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=kt(this,We.SRC))!=null?t:void 0:(a=this.getAttribute(We.SRC))!=null?a:void 0}set src(t){t?this.setAttribute(We.SRC,t):this.removeAttribute(We.SRC)}get poster(){var a;let t=this.getAttribute(We.POSTER);if(t!=null)return t;if(this.playbackId&&!this.audio)return Dl(this.playbackId,{domain:this.customDomain,thumbnailTime:(a=this.thumbnailTime)!=null?a:this.startTime,token:this.tokens.thumbnail})}set poster(t){t||t===""?this.setAttribute(We.POSTER,t):this.removeAttribute(We.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||[U.StreamTypes.LIVE,U.StreamTypes.UNKNOWN].includes(this.streamType)))return Ol(this.playbackId,{domain: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 S(this,Yi)}get nohotkeys(){return this.hasAttribute(p.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(p.NOHOTKEYS);return}this.setAttribute(p.NOHOTKEYS,"")}get thumbnailTime(){return Ue(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=kt(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=B.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=B.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 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=Ue(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=Ue(this.getAttribute(p.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(p.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(p.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(p.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(p.DEFAULT_HIDDEN_CAPTIONS)}get playerSoftwareName(){var t;return(t=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_NAME))!=null?t:Yc}get playerSoftwareVersion(){var t;return(t=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_VERSION))!=null?t:Kc}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 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=kt(this,g.Attributes.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(g.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 kt(this,g.Attributes.DEBUG)!=null}set debug(t){t?this.setAttribute(g.Attributes.DEBUG,""):this.removeAttribute(g.Attributes.DEBUG)}get disableCookies(){return kt(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:U.StreamTypes.UNKNOWN}set streamType(t){this.setAttribute(g.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:U.StreamTypes.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(p.DEFAULT_STREAM_TYPE,t):this.removeAttribute(p.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,a;return this.hasAttribute(p.TARGET_LIVE_WINDOW)?+this.getAttribute(p.TARGET_LIVE_WINDOW):(a=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(t){t!=this.targetLiveWindow&&(t==null?this.removeAttribute(p.TARGET_LIVE_WINDOW):this.setAttribute(p.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return Ue(kt(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===U.PlaybackTypes.MSE||t===U.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===U.PlaybackTypes.MSE||t===U.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(K(this,st,ai).call(this),!this.media){pe("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...hd(this),...t}}async addCuePoints(t){var a;if(K(this,st,ai).call(this),!this.media){pe("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{...S(this,Ki),...t!=null?{playback:t}:{},...a!=null?{thumbnail:a}:{},...r!=null?{storyboard:r}:{}}}set tokens(t){oe(this,Ki,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 l;let s=(l=this.media)==null?void 0:l.nativeEl;if(!!s)return(0,U.addTextTrack)(s,t,a,r,n)}removeTextTrack(t){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(!!a)return(0,U.removeTextTrack)(a,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}};Fi=new WeakMap,Ki=new WeakMap,Fe=new WeakMap,Yi=new WeakMap,Mt=new WeakMap,st=new WeakSet,ai=function(){var t,a,r;if(!S(this,Fi)){oe(this,Fi,!0),K(this,ot,ri).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof B.HTMLElement))throw""}catch{pe("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof g.default))throw""}catch{pe("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof Jr))throw""}catch{pe("<media-controller> failed to upgrade!")}Vl(this),K(this,Rr,vd).call(this),K(this,wr,bd).call(this),K(this,xr,fd).call(this),oe(this,Fe,(a=(t=this.mediaController)==null?void 0:t.hasAttribute("userinactive"))!=null?a:!0),K(this,Dr,gd).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>{K(this,ot,ri).call(this)})}},Cr=new WeakSet,Ed=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{}},Gi=new WeakSet,Ms=function(t){Object.assign(S(this,Mt),t),K(this,ot,ri).call(this)},ot=new WeakSet,ri=function(t={}){od(dd(Bc(this,{...S(this,Mt),...t})),this.shadowRoot)},Rr=new WeakSet,vd=function(){let t=r=>{var l,u;if(!(r!=null&&r.startsWith("theme-")))return;let n=r.replace(/^theme-/,"");if(ks.includes(n))return;let s=this.getAttribute(r);s!=null?(l=this.mediaTheme)==null||l.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)},wr=new WeakSet,bd=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)){et(n),n.data&&et(`${n.name} data:`,n.data);return}let{dialog:s,devlog:l}=Mr(n,!window.navigator.onLine,this.playbackId,this.playbackToken);l.message&&ms(l),pe(n),n.data&&pe(`${n.name} data:`,n.data),K(this,Gi,Ms).call(this,{isDialogOpen:!0,dialog:s})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(r={})=>{var s,l,u;if(!(((s=this.media)==null?void 0:s.error)instanceof g.MediaError))return r;let{devlog:n}=Mr((l=this.media)==null?void 0:l.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,l;let{detail:n}=r;if(!n){let{message:u,code:c}=(l=(s=this.media)==null?void 0:s.error)!=null?l:{};n=new g.MediaError(u,c)}!(n!=null&&n.fatal)||this.dispatchEvent(new CustomEvent("error",{detail:n}))})},xr=new WeakSet,fd=function(){var a,r,n,s;let t=()=>K(this,ot,ri).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)},Dr=new WeakSet,gd=function(){var E,f;let t=/.*Version\/.*Safari\/.*/.test(navigator.userAgent);if(!/Firefox/i.test(navigator.userAgent))return;let r,n=new WeakMap,s=()=>this.streamType===U.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,l=(b,T,V=!1)=>{if(s())return;Array.from(b&&b.activeCues||[]).forEach(I=>{if(!(!I.snapToLines||I.line<-5||I.line>=0&&I.line<10))if(!T||this.paused){let re=I.text.split(`
|
|
1998
|
+
`).length,ve=t?-2:-3;this.streamType===U.StreamTypes.LIVE&&(ve=t?-1:-2);let se=ve-re;if(I.line===se&&!V)return;n.has(I)||n.set(I,I.line),I.line=se-1,I.line=se}else setTimeout(()=>{I.line=n.get(I)||"auto"},500)})},u=()=>{var b,T;l(r,(T=(b=this.mediaController)==null?void 0:b.hasAttribute("userinactive"))!=null?T:!1)},c=()=>{var V,G;let T=Array.from(((G=(V=this.mediaController)==null?void 0:V.media)==null?void 0:G.textTracks)||[]).filter(I=>["subtitles","captions"].includes(I.kind)&&I.mode==="showing")[0];T!==r&&(r==null||r.removeEventListener("cuechange",u)),r=T,r==null||r.addEventListener("cuechange",u),l(r,S(this,Fe))};if(c(),(E=this.textTracks)==null||E.addEventListener("change",c),(f=this.textTracks)==null||f.addEventListener("addtrack",c),navigator.userAgent.includes("Chrome/")){let b=()=>{l(r,S(this,Fe),!0),this.paused||window.requestAnimationFrame(b)};this.addEventListener("playing",()=>{b()})}this.addEventListener("userinactivechange",()=>{var T,V;let b=(V=(T=this.mediaController)==null?void 0:T.hasAttribute("userinactive"))!=null?V:!0;S(this,Fe)!==b&&(oe(this,Fe,b),l(r,S(this,Fe)))})};function kt(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}B.customElements.get("mux-player")||(B.customElements.define("mux-player",Wi),B.MuxPlayerElement=Wi);var Gc=Wi;
|