@maveio/components 0.0.156 → 0.0.158
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/{chunk-45FW5DBN.js → chunk-24TUG5TP.js} +1 -1
- package/dist/{chunk-Z5AM3NST.cjs → chunk-32WXLTTE.cjs} +2 -2
- package/dist/{chunk-4CDE2QCJ.js → chunk-6XR2OUZW.js} +1 -1
- package/dist/chunk-7ZRXZY5C.js +20 -0
- package/dist/{chunk-TVNAG7X4.cjs → chunk-B3QILQEE.cjs} +3 -3
- package/dist/{chunk-6MCTUE3H.js → chunk-CHHWULL2.js} +4 -4
- package/dist/chunk-DITZCOYN.cjs +379 -0
- package/dist/{chunk-MKZYI5TY.cjs → chunk-EOHKHSQ3.cjs} +1 -1
- package/dist/{chunk-KTGL4HLA.cjs → chunk-FUSQ4EZG.cjs} +2 -2
- package/dist/chunk-JHSFSCC2.cjs +1 -0
- package/dist/chunk-KA24PL7V.js +1 -0
- package/dist/{chunk-VZKW2VWI.js → chunk-KNAAIER3.js} +2 -2
- package/dist/{chunk-5KQJTT3P.cjs → chunk-KVMGCTLR.cjs} +1 -1
- package/dist/{chunk-4DCPDVPE.js → chunk-LT26CEMU.js} +57 -5
- package/dist/{chunk-JBRRVOTV.cjs → chunk-MLZIA6JO.cjs} +5 -5
- package/dist/chunk-MSWONVA7.cjs +20 -0
- package/dist/{chunk-4AYP3SUJ.js → chunk-NKEVN7FX.js} +1 -1
- package/dist/{chunk-PLCF3Z5Q.cjs → chunk-OTRPT6Y4.cjs} +4 -4
- package/dist/{chunk-MC6T46LX.cjs → chunk-PHGKLFNF.cjs} +1 -1
- package/dist/chunk-QSQE5WBN.js +35 -0
- package/dist/chunk-QZSLJNS4.js +7 -0
- package/dist/chunk-STJ6CEFZ.cjs +1468 -0
- package/dist/chunk-T2P4BAWY.js +379 -0
- package/dist/chunk-ULZI6OGL.js +1468 -0
- package/dist/chunk-W3KNVBI3.cjs +213 -0
- package/dist/{chunk-CUGRXOA2.js → chunk-XLUB3ATV.js} +1 -1
- package/dist/{chunk-6NWQAHZT.cjs → chunk-ZLS57S3I.cjs} +1 -1
- package/dist/components/audio-track-menu.cjs +1 -0
- package/dist/components/audio-track-menu.d.cts +27 -0
- package/dist/components/audio-track-menu.d.ts +27 -0
- package/dist/components/audio-track-menu.js +1 -0
- package/dist/components/clip.cjs +1 -1
- package/dist/components/clip.js +1 -1
- package/dist/components/files.cjs +1 -1
- package/dist/components/files.js +1 -1
- package/dist/components/img.cjs +1 -1
- package/dist/components/img.js +1 -1
- package/dist/components/list.cjs +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/player.cjs +1 -1
- package/dist/components/player.d.cts +8 -0
- package/dist/components/player.d.ts +8 -0
- package/dist/components/player.js +1 -1
- package/dist/components/pop.cjs +1 -1
- package/dist/components/pop.js +1 -1
- package/dist/components/text.cjs +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/upload.cjs +1 -1
- package/dist/components/upload.d.cts +18 -1
- package/dist/components/upload.d.ts +18 -1
- package/dist/components/upload.js +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.js +1 -1
- package/dist/embed/api.cjs +1 -1
- package/dist/embed/api.d.cts +11 -1
- package/dist/embed/api.d.ts +11 -1
- package/dist/embed/api.js +1 -1
- package/dist/embed/caption.cjs +1 -1
- package/dist/embed/caption.js +1 -1
- package/dist/embed/controller.cjs +1 -1
- package/dist/embed/controller.js +1 -1
- package/dist/embed/socket.cjs +1 -1
- package/dist/embed/socket.d.cts +3 -5
- package/dist/embed/socket.d.ts +3 -5
- package/dist/embed/socket.js +1 -1
- package/dist/generated/locales/de.cjs +1 -1
- package/dist/generated/locales/de.d.cts +5 -0
- package/dist/generated/locales/de.d.ts +5 -0
- package/dist/generated/locales/de.js +1 -1
- package/dist/generated/locales/en.cjs +1 -1
- package/dist/generated/locales/en.d.cts +5 -0
- package/dist/generated/locales/en.d.ts +5 -0
- package/dist/generated/locales/en.js +1 -1
- package/dist/generated/locales/fr.cjs +1 -1
- package/dist/generated/locales/fr.d.cts +5 -0
- package/dist/generated/locales/fr.d.ts +5 -0
- package/dist/generated/locales/fr.js +1 -1
- package/dist/generated/locales/nl.cjs +1 -1
- package/dist/generated/locales/nl.d.cts +5 -0
- package/dist/generated/locales/nl.d.ts +5 -0
- package/dist/generated/locales/nl.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/themes/default.cjs +53 -1
- package/dist/themes/default.js +53 -1
- package/dist/themes/dolphin.cjs +1 -1
- package/dist/themes/dolphin.js +1 -1
- package/dist/themes/loader.cjs +1 -1
- package/dist/themes/loader.js +1 -1
- package/dist/themes/synthwave.cjs +1 -1
- package/dist/themes/synthwave.js +1 -1
- package/dist/utils/localization.cjs +1 -1
- package/dist/utils/localization.js +1 -1
- package/dist/utils/mave_element.cjs +1 -1
- package/dist/utils/mave_element.js +1 -1
- package/dist/utils/origin.cjs +1 -1
- package/dist/utils/origin.js +1 -1
- package/dist/utils/video_events.cjs +1 -1
- package/dist/utils/video_events.js +1 -1
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-5IPIXU3O.js +0 -1807
- package/dist/chunk-DESQSXZF.cjs +0 -161
- package/dist/chunk-IBTJ5OMP.js +0 -35
- package/dist/chunk-IPA5Q26W.cjs +0 -1
- package/dist/chunk-LGWESJBJ.cjs +0 -20
- package/dist/chunk-NDDFZTBA.js +0 -1
- package/dist/chunk-SRXHXTDF.js +0 -7
- package/dist/chunk-ZMMJMM4X.cjs +0 -1807
- package/dist/chunk-ZT2E4EC7.js +0 -20
- /package/dist/{chunk-NI57YLPL.cjs → chunk-BVMU4ZXD.cjs} +0 -0
- /package/dist/{chunk-EXNM5EV2.js → chunk-DFLPNNA4.js} +0 -0
- /package/dist/{chunk-FSFJQ67W.js → chunk-FRPU6QLJ.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-HMISRRKC.js';import {i,c as c$1}from'./chunk-A4GZBQEB.js';import {a as a$1}from'./chunk-JBV2AYRP.js';import {c}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-HMISRRKC.js';import {i,c as c$1}from'./chunk-A4GZBQEB.js';import {a as a$1}from'./chunk-JBV2AYRP.js';import {c}from'./chunk-KA24PL7V.js';var s=class extends i{constructor(){super(...arguments);this.EVENT_TYPES={CLICK:"user_click"};}get embed(){return this._embed}set embed(t){this._embed=t;}get embedId(){return this._embed?.substring(5,this._embed?.length)}get spaceId(){return this.embed?.substring(0,5)}get cdn_root(){return a$1.cdn.endpoint.replace("${this.spaceId}",this.spaceId)}get _stylesheets(){if(typeof document>"u")return c$1``;let t=document.querySelectorAll('style, link[rel="stylesheet"]');return c$1`${Array.from(t).map(e=>e.cloneNode(true))}`}durationToTime(t){let e=Math.floor(t),n=Math.floor(e/3600),i=Math.floor(e%3600/60),o=e%60;return n>0?`${n}:${i.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${i}:${o.toString().padStart(2,"0")}`}emit(t,e){this.dispatchEvent(new CustomEvent(`mave:${t}`,{detail:{...e,eventType:t}})),this.dispatchEvent(new CustomEvent("mave:*",{detail:{...e,eventType:t}}));}};c([a({type:String})],s.prototype,"embed",1);export{s as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkSTJ6CEFZ_cjs=require('./chunk-STJ6CEFZ.cjs'),chunkQ22T22LT_cjs=require('./chunk-Q22T22LT.cjs'),chunkFUBUUA7Y_cjs=require('./chunk-FUBUUA7Y.cjs'),chunk5NSCV6C2_cjs=require('./chunk-5NSCV6C2.cjs'),chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');var n=class extends chunk5NSCV6C2_cjs.i{get backdrop(){return this._backdropColor||"black"}set backdrop(t){this._backdropColor!=t&&(this._backdropColor=t);}get backdropFilter(){return this._backdropFilter}set backdropFilter(t){this._backdropFilter!=t&&(this._backdropFilter=t);}get styles(){let t={"--backdrop":this.backdrop,"--backdrop-filter":this.backdropFilter};return chunkQ22T22LT_cjs.a(t)}open(t){if(this._player=t,t.aspect_ratio){let[i,s]=t.aspect_ratio.split("/");this.style.setProperty("--frame-ratio-w",i),this.style.setProperty("--frame-ratio-h",s);}this.style.display="block";let o=i=>{this._frame.appendChild(t),setTimeout(()=>{this._dialog.showModal();},25),this._dialog.addEventListener("close",s=>{s.preventDefault(),this.close();},{once:true}),i(this);};return new Promise(i=>{if(this._dialog)o(i);else {let s=setInterval(()=>{this._dialog&&(o(i),clearInterval(s));},100);return}})}possibleClose(t){t.target!=this._player&&this.close();}close(){this._dialog.close(),this._backdrop.addEventListener("transitionend",()=>{this._frame.innerHTML="",this.dispatchEvent(new Event("closed",{bubbles:true}));},{once:true});}render(){return chunk5NSCV6C2_cjs.c`
|
|
2
2
|
<dialog style=${this.styles}>
|
|
3
3
|
<div class="backdrop"></div>
|
|
4
4
|
<div class="content" @click=${this.possibleClose}>
|
|
@@ -151,4 +151,4 @@
|
|
|
151
151
|
background-position: center center;
|
|
152
152
|
background-repeat: no-repeat;
|
|
153
153
|
}
|
|
154
|
-
`,
|
|
154
|
+
`,chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.c("dialog")],n.prototype,"_dialog",2),chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.c(".content")],n.prototype,"_content",2),chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.c(".frame")],n.prototype,"_frame",2),chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.c(".backdrop")],n.prototype,"_backdrop",2),chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.a()],n.prototype,"backdrop",1),chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.a({attribute:"backdrop-filter"})],n.prototype,"backdropFilter",1);typeof window<"u"&&window.customElements&&(window.customElements.get("mave-pop")||window.customElements.define("mave-pop",n));function E(l){let t={};if(!l)return t;for(let o=0;o<l.attributes.length;o++){let i=l.attributes[o];t[i.name]=i.value;}return t}var x=()=>typeof document<"u"?document:void 0,_=l=>{let t=x();if(!t)return;let o=t;function i(c){let e,r,a=o.querySelector(`mave-pop[embed="${c}"]`);if(a)return r=E(a.querySelector("mave-player")),e=a,{pop:e,attributes:r};let p=o.querySelector("mave-pop:not([embed])");return p?(r=E(p.querySelector("mave-player")),e=p,{pop:e,attributes:r}):(e=new n,o.body.appendChild(e),{pop:e})}function s(c,e){let r=new chunkSTJ6CEFZ_cjs.a;if(e)for(let a in e)r.setAttribute(a,e[a]);return r.embed=c,r}function g(c){c.querySelectorAll("[x-mave-pop]").forEach(e=>{let r=e.getAttribute("x-mave-pop")||e.getAttribute("embed");if(!r)return;let{pop:a,attributes:p}=i(r);s(r,p),e.addEventListener("click",L=>{L.preventDefault();let M=o.querySelectorAll("mave-player");if(!Array.from(M).find(m=>m.popped)){let m=s(r,p);a.open(m).then(()=>{m.play();}),a.addEventListener("closed",()=>{m.pause();});}});});}g(l),new MutationObserver(c=>{for(let e of c)e.type==="childList"&&e.addedNodes.forEach(r=>{r instanceof HTMLElement&&g(r);});}).observe(o.body,{childList:true,subtree:true});},f=x();f&&(f.readyState==="loading"?f.addEventListener("DOMContentLoaded",()=>{_(f);}):setTimeout(()=>_(f),500));exports.a=n;exports.b=_;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-24TUG5TP.js';import {h,c}from'./chunk-A4GZBQEB.js';var e=class extends a{get poster(){return `${this.cdn_root}/${this.embedId}/poster.webp`}render(){return c`<img src=${this.poster} />`}};e.styles=h`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {b as b$1}from'./chunk-HX6F65VL.js';import {a as a$1}from'./chunk-24TUG5TP.js';import {a}from'./chunk-HMISRRKC.js';import {h,c as c$1}from'./chunk-A4GZBQEB.js';import {c,e,g}from'./chunk-KA24PL7V.js';var n,l,C,x,b,v,y,z,L,T,U,f=class extends a$1{constructor(){super(...arguments);e(this,n);this.embedController=new b$1(this);}get embed(){return this._embed}set embed(t){this._embed!==t&&(this._embed=t,this.requestUpdate("embed"),this.embedController.embed=this.embed);}get _slottedChildren(){return this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:true})||[]}render(){return c$1`
|
|
2
|
+
${this.embedController.render({pending:this.renderPending,complete:t=>{if(this._data=t,!t)return;let i=g(this,n,T).call(this),e=g(this,n,U).call(this),o=this._slottedChildren.map(d=>{function m(){let r;return d.nodeName==="TEMPLATE"?r=d.content.cloneNode(true):r=d.cloneNode(true),r}if(d.getAttribute("name")=="mave-files-video"){if(!i)return;let r=m(),a=Number(this._data.created_at),h=a&&a<1e12?a*1e3:a;Number.isFinite(h)&&g(this,n,l).call(this,r,"date",new Date(h).toLocaleDateString().replaceAll("/","-"));let p=this._data.video.duration;p&&g(this,n,l).call(this,r,"duration",this.durationToTime(p));let u=this._data.video.filetype;u&&g(this,n,l).call(this,r,"filetype",u);let _=i.file_size||this._data.video.size;_&&g(this,n,l).call(this,r,"size",g(this,n,v).call(this,_));let M=g(this,n,z).call(this,i),F=i.container||"mp4",g$1=g(this,n,b).call(this,M,`${this._data.name}.${F}`);return g$1.setAttribute("aria-label","Download video"),g$1.appendChild(r),c$1`${g$1}`}if(e&&this._data.video.audio&&d.getAttribute("name")=="mave-files-audio"){let r=m(),a=e.container||"mp3";g(this,n,l).call(this,r,"filetype",a);let h=e.file_size;h&&g(this,n,l).call(this,r,"size",g(this,n,v).call(this,h));let p=g(this,n,L).call(this,e),u=g(this,n,b).call(this,p,`${this._data.name}.${a}`);return u.setAttribute("aria-label","Download audio"),u.appendChild(r),c$1`${u}`}let w=this._data.subtitles.find(r=>r.language==this._data.video.language);if(w&&d.getAttribute("name")=="mave-files-subtitles"){let r=m();g(this,n,l).call(this,r,"filetype","vtt");let a=g(this,n,b).call(this,w.path,`${this._data.name}.vtt`);return a.setAttribute("aria-label","Download subtitles"),a.appendChild(r),c$1`${a}`}});return c$1`${this._stylesheets} ${o}`}})}
|
|
3
|
+
`}renderPending(){return c$1`<slot style="display: none"></slot>`}};n=new WeakSet,l=function(t,i,e){let o=t.querySelector(`[slot="${i}"], [data-slot="${i}"]`);o&&(o.textContent=e,o.removeAttribute("slot"),o.removeAttribute("data-slot"));},C=function(t,i){let e=window.URL.createObjectURL(t),o=document.createElement("a");o.style.display="none",o.href=e,o.download=i,this.appendChild(o),o.click(),window.URL.revokeObjectURL(e),this.removeChild(o);},x=function(t,i){return fetch(t).then(e=>{if(!e.ok)throw new Error("Network response was not ok");return e.blob()}).then(e=>g(this,n,C).call(this,e,i)).catch(e=>console.error("Something went wrong:",e))},b=function(t,i){let e=document.createElement("a");e.classList.add("link"),e.setAttribute("href",t),e.setAttribute("download",i),e.setAttribute("target","new");let o=false;return e.addEventListener("click",d=>{d.preventDefault(),!o&&(o=true,e.style.cursor="wait",e.style.opacity="0.5",g(this,n,x).call(this,t,i).then(()=>{o=false,e.style.cursor="pointer",e.style.opacity="1";}));}),e},v=function(t){let i=t/1e6;if(i<10)return `${i.toFixed(1)} MB`;let e=i%1!==0;return `${i.toFixed(e?1:0)} MB`},y=function(t){let i=this._data?.video?.version&&this._data.video.version>0?`v${this._data.video.version}/`:"";return `${this.cdn_root}/${this.embedId}/${i}${t}`},z=function(t){let i=t?.codec||"h264",e=t?.size||"hd",o=t?.container||"mp4";return g(this,n,y).call(this,`${i}_${e}.${o}`)},L=function(t){let i=t?.container||"mp3";return g(this,n,y).call(this,`audio.${i}`)},T=function(){let t=this._data?.video?.renditions||[];if(!t.length)return;let i=t.filter(o=>o.container==="mp4"&&o.codec==="h264"&&(!o.type||o.type==="video")),e=["hd","fhd","sd","qhd","uhd"];for(let o of e){let d=i.find(m=>m.size===o);if(d)return d}return i[0]||t.find(o=>o.type==="video")},U=function(){let t=this._data?.video?.renditions||[];if(t.length)return t.find(i=>i.type==="audio"||i.container==="mp3"||i.codec==="mp3")},f.styles=h`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
--link-color: #006fc6;
|
|
7
|
+
--link-decoration: underline;
|
|
8
|
+
--link-decoration-thickness: 1px;
|
|
9
|
+
--link-decoration-offset: 1px;
|
|
10
|
+
--link-cursor: pointer;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
a {
|
|
14
|
+
text-decoration: var(--link-decoration);
|
|
15
|
+
text-decoration-thickness: var(--link-decoration-thickness);
|
|
16
|
+
text-underline-offset: var(--link-decoration-thickness);
|
|
17
|
+
color: var(--link-color);
|
|
18
|
+
cursor: var(--link-cursor);
|
|
19
|
+
}
|
|
20
|
+
`,c([a({type:String})],f.prototype,"embed",1);typeof window<"u"&&window.customElements&&(window.customElements.get("mave-files")||window.customElements.define("mave-files",f));export{f as a};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkQ22T22LT_cjs=require('./chunk-Q22T22LT.cjs'),chunkQJHVSRHC_cjs=require('./chunk-QJHVSRHC.cjs'),chunkH57FX4I6_cjs=require('./chunk-H57FX4I6.cjs'),chunkFUBUUA7Y_cjs=require('./chunk-FUBUUA7Y.cjs'),chunk5NSCV6C2_cjs=require('./chunk-5NSCV6C2.cjs'),chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');var o,k,C,S,n=class extends chunk5NSCV6C2_cjs.i{constructor(){super(...arguments);chunkJHSFSCC2_cjs.e(this,o);this._clickable=true;this._autoscroll=true;this._lastScrollTime=0;this.currentTime=0;}get embed(){return this._embedId}set embed(t){this._embedId!=t&&(this._embedId=t,this.captionController=new chunkQJHVSRHC_cjs.a(this,this.embed),this.reset(),this.requestUpdate("embed"));}get clickable(){return this._clickable}set clickable(t){this._clickable!=t&&(typeof t=="string"?this._clickable=t==="true"||t==="":this._clickable=t,this.requestUpdate("clickable"));}get autoscroll(){return this._autoscroll}set autoscroll(t){this._autoscroll!=t&&(typeof t=="string"?this._autoscroll=t==="true"||t==="":this._autoscroll=t,this.requestUpdate("autoscroll"));}get wordIndex(){return this._wordIndex}set wordIndex(t){if(this._wordIndex!=t&&(this._wordIndex=t,this.autoscroll)){let e=this.shadowRoot?.querySelector(`[data-word-id="word-${this.segmentIndex}-${this.wordIndex}"]`);if(e&&this._lastScrollTime+2500<Date.now()){let r=this.getBoundingClientRect(),i=e.getBoundingClientRect(),s=i.top-r.top;if(s>0){let c=this.scrollTop+s;chunkJHSFSCC2_cjs.g(this,o,k).call(this,this,c-i.height/2);}}}}get segmentIndex(){return this._segmentIndex}set segmentIndex(t){this._segmentIndex!=t&&(this._segmentIndex=t);}connectedCallback(){super.connectedCallback(),this.addEventListener("scroll",chunkJHSFSCC2_cjs.g(this,o,C).bind(this)),this.reset();}reset(){if(typeof document>"u")return;this.loop=false,this.currentTime=0,this.wordIndex=0,this.segmentIndex=0;let t=document.querySelector(`mave-player[embed="${this.embed}"]`);t&&(this.player=t,t.addEventListener("play",()=>{this.loop=true,this.loopUpdateTime();}),t.addEventListener("pause",()=>{this.loop=false;}));}updateTime(){this.currentTime=this.player.currentTime;}loopUpdateTime(){this.updateTime(),setTimeout(()=>{this.loop&&requestAnimationFrame(this.loopUpdateTime.bind(this));},10);}inRange({start:t,end:e},r,i,s){if(this.currentTime>=t&&this.currentTime<=e)return s&&(this.wordIndex=s),i&&(this.segmentIndex=i),r||true}segmentStyle(){return this.clickable?{cursor:"pointer"}:{}}wordStyle(t){return t?{"background-color":this.highlight}:{}}render(){return this.captionController?this.captionController.render({complete:t=>(this.captions=t,chunk5NSCV6C2_cjs.c`
|
|
2
2
|
<div>
|
|
3
3
|
${this.captions.segments.map((e,r)=>chunk5NSCV6C2_cjs.c`
|
|
4
4
|
<p
|
|
5
5
|
data-segment-id="segment-${r}"
|
|
6
6
|
style=${chunkQ22T22LT_cjs.a(this.segmentStyle())}
|
|
7
|
-
@click=${this.clickable?
|
|
7
|
+
@click=${this.clickable?chunkJHSFSCC2_cjs.g(this,o,S):chunk5NSCV6C2_cjs.f}
|
|
8
8
|
part=${chunkH57FX4I6_cjs.a(this.inRange(e,"segment"))}
|
|
9
9
|
x-caption-segment-start="${e.start}"
|
|
10
10
|
x-caption-segment-end="${e.end}"
|
|
@@ -32,4 +32,4 @@
|
|
|
32
32
|
[part='word'] {
|
|
33
33
|
background-color: rgba(255, 210, 42, 0.5);
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
35
|
+
`,chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.a()],n.prototype,"embed",1),chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.a()],n.prototype,"highlight",2),chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.a()],n.prototype,"clickable",1),chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.a()],n.prototype,"autoscroll",1),chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.b()],n.prototype,"currentTime",2),chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.b()],n.prototype,"captions",2);typeof window<"u"&&window.customElements&&(window.customElements.get("mave-text")||window.customElements.define("mave-text",n));exports.a=n;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {b as b$2,a as a$1,c as c$2}from'./chunk-XLUB3ATV.js';import {a as a$3}from'./chunk-MK4VIJT3.js';import {a as a$2}from'./chunk-3R7TX6NC.js';import {b as b$4}from'./chunk-HX6F65VL.js';import {a,b as b$3}from'./chunk-HMISRRKC.js';import {h,i as i$1,c as c$3}from'./chunk-A4GZBQEB.js';import {a as a$4}from'./chunk-JBV2AYRP.js';import {b as b$1,c as c$1,e,g,d}from'./chunk-KA24PL7V.js';var b=b$1(b$2(),1);var i,v,c,u,y,M,p,I,S,T,r=class extends i$1{constructor(){super(...arguments);e(this,i);this.autoplay="lazy";this.quality="auto";this.fallback="placeholder";this._queue=[];this._failedPlay=false;this._intersectionObserver=new a$1(this,{callback:g(this,i,S).bind(this)});this.embedController=new b$4(this);}get embed(){return this._embedId}set embed(t){this._embedId!=t&&(this._embedId=t,this.requestUpdate("embed"),this.embedController.embed=this.embed);}set loop(t){this._loop=(t===""||t=="true"||t==true)??false;}get loop(){return this._loop}get poster(){return this.embedController.embedFile(`${this.fallback}.jpg`)}set poster(t){if(t){let s=this._poster;this._poster=t,this.requestUpdate("poster",s);}}get token(){return this._token}set token(t){this._token!=t&&(this._token=t,this.requestUpdate("token"),this.embedController.token=this._token);}get sources(){let t=this.autoplay==="scroll"?["clip_keyframes"]:["video","clip"],s=this._embed.video.renditions.filter(e=>(this.quality=="auto"?e.size!=="uhd":d(this,i,c).indexOf(e.size)<=d(this,i,c).indexOf(this.quality))&&e.container==="mp4"&&d(this,i,u).includes(e.codec)&&(!e.type||t.includes(e.type))).sort((e,o)=>e.size===o.size?d(this,i,u).indexOf(e.codec)-d(this,i,u).indexOf(o.codec):d(this,i,c).indexOf(o.size)-d(this,i,c).indexOf(e.size)).map(e=>{let o=d(this,i,M).find(g=>g.size===e.size)?.media,m=`${e.codec}_${e.size}${e.type&&e.type!="video"?`_${e.type}`:""}.mp4`;return {media:o,src:this.embedController.embedFile(m),codec:d(this,i,y)[e.codec]??e.codec}}),d$1=this._embed.video.renditions.filter(e=>d(this,i,c).indexOf(e.size)<=d(this,i,c).indexOf("fhd")&&e.container==="mp4"&&d(this,i,u).includes(e.codec)&&(!e.type||t.includes(e.type))).sort((e,o)=>d(this,i,c).indexOf(o.size)-d(this,i,c).indexOf(e.size));if(d$1.length>0){let e=d$1[0],o=`${e.codec}_${e.size}${e.type&&e.type!="video"?`_${e.type}`:""}.mp4`,m={media:void 0,src:this.embedController.embedFile(o),codec:d(this,i,y)[e.codec]??e.codec};s.push(m);}return s}connectedCallback(){super.connectedCallback(),typeof document<"u"&&this.autoplay==="scroll"&&document.addEventListener("scroll",g(this,i,v).bind(this));}disconnectedCallback(){super.disconnectedCallback(),typeof document<"u"&&this.autoplay==="scroll"&&document.removeEventListener("scroll",g(this,i,v).bind(this)),this._metricsInstance?.demonitor();}set muted(t){this._videoElement?this._videoElement.muted=t:this._queue.push(()=>this._videoElement.muted=t);}get muted(){return this._videoElement?.muted||false}get paused(){return this._videoElement?.paused||true}get duration(){return new Promise((t,s)=>{if(this._videoElement&&!isNaN(this._videoElement.duration))return t(this._videoElement.duration);let d=()=>{this._videoElement?.addEventListener("loadedmetadata",()=>{this._videoElement&&t(this._videoElement.duration);}),this._videoElement?.addEventListener("error",e=>{s(new Error("Failed to load video metadata."));});};this._videoElement?d():this.addEventListener("mave:video_element_ready",()=>{d();});})}set currentTime(t){this._videoElement?this._videoElement.currentTime=t:this._queue.push(()=>this._videoElement.currentTime=t);}get currentTime(){return this._videoElement?this._videoElement?.currentTime:0}play(){this._videoElement?g(this,i,p).call(this):this._queue.push(()=>g(this,i,p).call(this));}pause(){this._videoElement?this._videoElement.pause():this._queue.push(()=>this._videoElement?.pause());}render(){return c$3`
|
|
2
2
|
${this.embedController.render({complete:t=>{if(this._embed=t,!!t)return c$3`
|
|
3
3
|
<video
|
|
4
|
-
@click=${
|
|
4
|
+
@click=${g(this,i,T)}
|
|
5
5
|
preload="metadata"
|
|
6
6
|
style=${a$2(this._failedPlay||this.autoplay==="off"?"cursor: pointer":void 0)}
|
|
7
7
|
muted
|
|
8
8
|
playsinline
|
|
9
9
|
poster=${a$2(this._failedPlay?this.poster:void 0)}
|
|
10
|
-
${c$2(
|
|
10
|
+
${c$2(g(this,i,I))}
|
|
11
11
|
?autoplay=${this.autoplay==="always"}
|
|
12
12
|
?loop=${this.loop||true}
|
|
13
13
|
>
|
|
@@ -20,7 +20,7 @@ import {a as a$2}from'./chunk-3R7TX6NC.js';import {b as b$2,a as a$1,c as c$2}fr
|
|
|
20
20
|
`)}
|
|
21
21
|
</video>
|
|
22
22
|
`}})}
|
|
23
|
-
`}};i=new WeakSet,v=function(){if(typeof window>"u")return;let{height:t,top:s,bottom:d}=this.getBoundingClientRect(),e=window.innerHeight;if(this._videoElement){this._videoElement.duration||this._videoElement.load();let o=0;if(s<e&&d>0){let m=t+e;o=(e-s)/m*this._videoElement.duration;}o>=0&&o<=this._videoElement.duration&&(this._videoElement.currentTime=o);}},c=function(){return ["sd","hd","fhd","qhd","uhd"]},u=function(){let t=navigator.userAgent,s=/Edg/.test(t)&&/Mac OS/.test(t),d=/Safari/.test(t)&&!/Chrome/.test(t),e=/Mac OS/.test(t),o=/iPhone|iPad/.test(t);return e&&(d||s)||o?["hevc","h264"]:["av1","h264"]},y=function(){return {av1:"av01.0.08M.08.0.110.01.01.01.0,opus",hevc:"hevc.01.00.78,mp4a.40.2",h264:"avc1.64.00.28,mp4a.40.2"}},M=function(){return [{size:"qhd",media:1280},{size:"fhd",media:1080},{size:"hd",media:720},{size:"sd",media:640}]},p=function(){this._metricsInstance?.monitor(),this._videoElement&&(this._videoElement.muted=true,this._videoElement.play().catch(t=>{this._failedPlay=true;}));},I=function(t){if(this._videoElement||(this._videoElement=t,this.dispatchEvent(new CustomEvent("mave:video_element_ready",{detail:this._videoElement,bubbles:true,composed:true}))),this._intersectionObserver.observe(this._videoElement),this._videoElement&&this._embed){a$3.forEach(d=>{this._videoElement?.addEventListener(d,e=>{!this._canPlay&&this.autoplay==="scroll"&&d==="canplay"&&(this._canPlay=true,
|
|
23
|
+
`}};i=new WeakSet,v=function(){if(typeof window>"u")return;let{height:t,top:s,bottom:d}=this.getBoundingClientRect(),e=window.innerHeight;if(this._videoElement){this._videoElement.duration||this._videoElement.load();let o=0;if(s<e&&d>0){let m=t+e;o=(e-s)/m*this._videoElement.duration;}o>=0&&o<=this._videoElement.duration&&(this._videoElement.currentTime=o);}},c=function(){return ["sd","hd","fhd","qhd","uhd"]},u=function(){let t=navigator.userAgent,s=/Edg/.test(t)&&/Mac OS/.test(t),d=/Safari/.test(t)&&!/Chrome/.test(t),e=/Mac OS/.test(t),o=/iPhone|iPad/.test(t);return e&&(d||s)||o?["hevc","h264"]:["av1","h264"]},y=function(){return {av1:"av01.0.08M.08.0.110.01.01.01.0,opus",hevc:"hevc.01.00.78,mp4a.40.2",h264:"avc1.64.00.28,mp4a.40.2"}},M=function(){return [{size:"qhd",media:1280},{size:"fhd",media:1080},{size:"hd",media:720},{size:"sd",media:640}]},p=function(){this._metricsInstance?.monitor(),this._videoElement&&(this._videoElement.muted=true,this._videoElement.play().catch(t=>{this._failedPlay=true;}));},I=function(t){if(this._videoElement||(this._videoElement=t,this.dispatchEvent(new CustomEvent("mave:video_element_ready",{detail:this._videoElement,bubbles:true,composed:true}))),this._intersectionObserver.observe(this._videoElement),this._videoElement&&this._embed){a$3.forEach(d=>{this._videoElement?.addEventListener(d,e=>{!this._canPlay&&this.autoplay==="scroll"&&d==="canplay"&&(this._canPlay=true,g(this,i,v).call(this)),this.dispatchEvent(new CustomEvent(d,{detail:e,bubbles:true,composed:true}));});});let s={component:"clip",video_id:this._embed.video.id,space_id:this._embed.space_id};b.Metrics.config={socketPath:a$4.metrics.socket,apiKey:this._embed.metrics_key},a$4.metrics.enabled&&(this._metricsInstance=new b.Metrics(this._videoElement,this.embed,s));}this._queue.length&&(this._queue.forEach(s=>s()),this._queue=[]);},S=function(t){for(let{isIntersecting:s}of t){if(this.autoplay==="always")return;s&&(this.autoplay==="lazy"||this.autoplay==="true")?this._videoElement?.paused&&g(this,i,p).call(this):this._videoElement?.paused||this._videoElement?.pause();}},T=function(){(this.autoplay==="off"||this._failedPlay)&&(this._videoElement?.paused?g(this,i,p).call(this):this._videoElement?.pause());},r.styles=h`
|
|
24
24
|
:host {
|
|
25
25
|
display: block;
|
|
26
26
|
position: relative;
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
'use strict';var chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');var ct={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},E={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},Wt={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},ut=Object.entries(Wt),K=ut.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{}),Bt={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},ht=ut.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{...Bt});Object.entries(ht).reduce((t,[e,i])=>{let o=K[e];return o&&(t[i]=o),t},{userinactivechange:"userinactive"});var ni=Object.entries(K).reduce((t,[e,i])=>{let o=ht[e];return o&&(t[i]=o),t},{userinactive:"userinactivechange"}),ai={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},ri={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var si={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},li={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},di={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var ci={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"};var le=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return true}},de=class extends le{},ce=class extends de{constructor(){super(...arguments),this.role=null;}},xe=class{observe(){}unobserve(){}disconnect(){}},mt={createElement:function(){return new z.HTMLElement},createElementNS:function(){return new z.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(t){return false}},z={ResizeObserver:xe,document:mt,Node:de,Element:ce,HTMLElement:class extends ce{constructor(){super(...arguments),this.innerHTML="";}get content(){return new z.DocumentFragment}},DocumentFragment:class extends le{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(t){return null},setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return ""}},matchMedia(t){return {matches:false,media:t}},DOMParser:class{parseFromString(e,i){return {body:{textContent:e}}}}},pt=typeof window>"u"||typeof window.customElements>"u",ft=Object.keys(z).every(t=>t in globalThis),u=pt&&!ft?z:globalThis,Le=pt&&!ft?mt:globalThis.document;function Et({anchor:t,floating:e,placement:i}){let o=qt({anchor:t,floating:e}),{x:n,y:a}=$t(o,i);return {x:n,y:a}}function qt({anchor:t,floating:e}){return {anchor:Vt(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function Vt(t,e){var i;let o=t.getBoundingClientRect(),n=(i=e?.getBoundingClientRect())!=null?i:{x:0,y:0};return {x:o.x-n.x,y:o.y-n.y,width:o.width,height:o.height}}function $t({anchor:t,floating:e},i){let o=Gt(i)==="x"?"y":"x",n=o==="y"?"height":"width",a=vt(i),r=t.x+t.width/2-e.width/2,h=t.y+t.height/2-e.height/2,c=t[n]/2-e[n]/2,p;switch(a){case "top":p={x:r,y:t.y-e.height};break;case "bottom":p={x:r,y:t.y+t.height};break;case "right":p={x:t.x+t.width,y:h};break;case "left":p={x:t.x-e.width,y:h};break;default:p={x:t.x,y:t.y};}switch(i.split("-")[1]){case "start":p[o]-=c;break;case "end":p[o]+=c;break}return p}function vt(t){return t.split("-")[0]}function Gt(t){return ["top","bottom"].includes(vt(t))?"y":"x"}var gt=new WeakMap,Re=t=>{let e=gt.get(t);return e||gt.set(t,e=new Set),e},bt=new u.ResizeObserver(t=>{for(let e of t)for(let i of Re(e.target))i(e);});function Y(t,e){Re(t).add(e),bt.observe(t);}function X(t,e){let i=Re(t);i.delete(e),i.size||bt.unobserve(t);}var O=class extends Event{constructor({action:e="auto",relatedTarget:i,...o}){super("invoke",o),this.action=e,this.relatedTarget=i;}},ue=class extends Event{constructor({newState:e,oldState:i,...o}){super("toggle",o),this.newState=e,this.oldState=i;}};function P(t){let e={};for(let i of t)e[i.name]=i.value;return e}function he(t){var e;return (e=me(t))!=null?e:N(t,"media-controller")}function me(t){var e;let{MEDIA_CONTROLLER:i}=E,o=t.getAttribute(i);if(o)return (e=Z(t))==null?void 0:e.getElementById(o)}var Ai=(t,e,i=".value")=>{let o=t.querySelector(i);o&&(o.textContent=e);},Qt=(t,e)=>{let i=`slot[name="${e}"]`,o=t.shadowRoot.querySelector(i);return o?o.children:[]},Ti=(t,e)=>Qt(t,e)[0],pe=(t,e)=>!t||!e?false:t?.contains(e)?true:pe(t,e.getRootNode().host),N=(t,e)=>{if(!t)return null;let i=t.closest(e);return i||N(t.getRootNode().host,e)};function De(t=document){var e;let i=t?.activeElement;return i?(e=De(i.shadowRoot))!=null?e:i:null}function Z(t){var e;let i=(e=t?.getRootNode)==null?void 0:e.call(t);return i instanceof ShadowRoot||i instanceof Document?i:null}function _t(t,{depth:e=3,checkOpacity:i=true,checkVisibilityCSS:o=true}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:i,checkVisibilityCSS:o});let n=t;for(;n&&e>0;){let a=getComputedStyle(n);if(i&&a.opacity==="0"||o&&a.visibility==="hidden"||a.display==="none")return false;n=n.parentElement,e--;}return true}function yi(t,e,i,o){let n=o.x-i.x,a=o.y-i.y,r=n*n+a*a;if(r===0)return 0;let h=((t-i.x)*n+(e-i.y)*a)/r;return Math.max(0,Math.min(1,h))}function At(t,e){let i=Ft(t,o=>o===e);return i||Ce(t,e)}function Ft(t,e){var i,o;let n;for(n of (i=t.querySelectorAll("style:not([media])"))!=null?i:[]){let a;try{a=(o=n.sheet)==null?void 0:o.cssRules;}catch{continue}for(let r of a??[])if(e(r.selectorText))return r}}function Ce(t,e){var i,o;let n=(i=t.querySelectorAll("style:not([media])"))!=null?i:[],a=n?.[n.length-1];return a?.sheet?(a?.sheet.insertRule(`${e}{}`,a.sheet.cssRules.length),(o=a.sheet.cssRules)==null?void 0:o[a.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function Kt(t,e,i=Number.NaN){let o=t.getAttribute(e);return o!=null?+o:i}function ki(t,e,i){let o=+i;if(i==null||Number.isNaN(o)){t.hasAttribute(e)&&t.removeAttribute(e);return}Kt(t,e,void 0)!==o&&t.setAttribute(e,`${o}`);}function fe(t,e){return t.hasAttribute(e)}function Oe(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}fe(t,e)!=i&&t.toggleAttribute(e,i);}function M(t,e,i=null){var o;return (o=t.getAttribute(e))!=null?o:i}function U(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}let o=`${i}`;M(t,e,void 0)!==o&&t.setAttribute(e,o);}var Fe=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},s=(t,e,i)=>(Fe(t,e,"read from private field"),i?i.call(t):e.get(t)),l=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i);},v=(t,e,i,o)=>(Fe(t,e,"write to private field"),e.set(t,i),i),d=(t,e,i)=>(Fe(t,e,"access private method"),i),g,L,S,Ee,ve,R,ee,Pe,Tt,_e,Ke,Ae,ge,Ne,Ue,yt,He,kt,We,St,H,W,B,te,Te,ze,Be,It,Ye,wt,qe,Mt,Xe,xt,Ve,Lt,$e,Rt,J,ye,Ge,Dt,j,ke,be,Qe;function Ct({type:t,text:e,value:i,checked:o}){let n=Le.createElement("media-chrome-menu-item");n.type=t??"",n.part.add("menu-item"),t&&n.part.add(t),n.value=i,n.checked=o;let a=Le.createElement("span");return a.textContent=e,n.append(a),n}function Ot(t,e){let i=t.querySelector(`:scope > [slot="${e}"]`);if(i?.nodeName=="SLOT"&&(i=i.assignedElements({flatten:true})[0]),i)return i=i.cloneNode(true),i;let o=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return o?o.cloneNode(true):""}function zt(t){return `
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
font: var(--media-font,
|
|
5
|
+
var(--media-font-weight, normal)
|
|
6
|
+
var(--media-font-size, 14px) /
|
|
7
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
8
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
9
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
10
|
+
--_menu-bg: rgb(20 20 30 / .8);
|
|
11
|
+
background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg))));
|
|
12
|
+
border-radius: var(--media-menu-border-radius);
|
|
13
|
+
border: var(--media-menu-border, none);
|
|
14
|
+
display: var(--media-menu-display, inline-flex) !important;
|
|
15
|
+
|
|
16
|
+
transition: var(--media-menu-transition-in,
|
|
17
|
+
visibility 0s,
|
|
18
|
+
opacity .2s ease-out,
|
|
19
|
+
transform .15s ease-out,
|
|
20
|
+
left .2s ease-in-out,
|
|
21
|
+
min-width .2s ease-in-out,
|
|
22
|
+
min-height .2s ease-in-out
|
|
23
|
+
) !important;
|
|
24
|
+
|
|
25
|
+
visibility: var(--media-menu-visibility, visible);
|
|
26
|
+
opacity: var(--media-menu-opacity, 1);
|
|
27
|
+
max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));
|
|
28
|
+
transform: var(--media-menu-transform-in, translateY(0) scale(1));
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
|
|
31
|
+
min-height: 0;
|
|
32
|
+
position: relative;
|
|
33
|
+
bottom: var(--_menu-bottom);
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@-moz-document url-prefix() {
|
|
38
|
+
:host{
|
|
39
|
+
--_menu-bg: rgb(20 20 30);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host([hidden]) {
|
|
44
|
+
transition: var(--media-menu-transition-out,
|
|
45
|
+
visibility .15s ease-in,
|
|
46
|
+
opacity .15s ease-in,
|
|
47
|
+
transform .15s ease-in
|
|
48
|
+
) !important;
|
|
49
|
+
visibility: var(--media-menu-hidden-visibility, hidden);
|
|
50
|
+
opacity: var(--media-menu-hidden-opacity, 0);
|
|
51
|
+
max-height: var(--media-menu-hidden-max-height,
|
|
52
|
+
var(--media-menu-max-height, var(--_menu-max-height, 300px)));
|
|
53
|
+
transform: var(--media-menu-transform-out, translateY(2px) scale(.99));
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:host([slot="submenu"]) {
|
|
58
|
+
background: none;
|
|
59
|
+
width: 100%;
|
|
60
|
+
min-height: 100%;
|
|
61
|
+
position: absolute;
|
|
62
|
+
bottom: 0;
|
|
63
|
+
right: -100%;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#container {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
min-height: 0;
|
|
70
|
+
transition: transform .2s ease-out;
|
|
71
|
+
transform: translate(0, 0);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
#container.has-expanded {
|
|
75
|
+
transition: transform .2s ease-in;
|
|
76
|
+
transform: translate(-100%, 0);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
button {
|
|
80
|
+
background: none;
|
|
81
|
+
color: inherit;
|
|
82
|
+
border: none;
|
|
83
|
+
padding: 0;
|
|
84
|
+
font: inherit;
|
|
85
|
+
outline: inherit;
|
|
86
|
+
display: inline-flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
slot[name="header"][hidden] {
|
|
91
|
+
display: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
slot[name="header"] > *,
|
|
95
|
+
slot[name="header"]::slotted(*) {
|
|
96
|
+
padding: .4em .7em;
|
|
97
|
+
border-bottom: 1px solid rgb(255 255 255 / .25);
|
|
98
|
+
cursor: var(--media-cursor, default);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
slot[name="header"] > button[part~="back"],
|
|
102
|
+
slot[name="header"]::slotted(button[part~="back"]) {
|
|
103
|
+
cursor: var(--media-cursor, pointer);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
svg[part~="back"] {
|
|
107
|
+
height: var(--media-menu-icon-height, var(--media-control-height, 24px));
|
|
108
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
109
|
+
display: block;
|
|
110
|
+
margin-right: .5ch;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
slot:not([name]) {
|
|
114
|
+
gap: var(--media-menu-gap);
|
|
115
|
+
flex-direction: var(--media-menu-flex-direction, column);
|
|
116
|
+
overflow: var(--media-menu-overflow, hidden auto);
|
|
117
|
+
display: flex;
|
|
118
|
+
min-height: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host([role="menu"]) slot:not([name]) {
|
|
122
|
+
padding-block: .4em;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
slot:not([name])::slotted([role="menu"]) {
|
|
126
|
+
background: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
media-chrome-menu-item > span {
|
|
130
|
+
margin-right: .5ch;
|
|
131
|
+
max-width: var(--media-menu-item-max-width);
|
|
132
|
+
text-overflow: ellipsis;
|
|
133
|
+
overflow: hidden;
|
|
134
|
+
}
|
|
135
|
+
</style>
|
|
136
|
+
<style id="layout-row" media="width:0">
|
|
137
|
+
|
|
138
|
+
slot[name="header"] > *,
|
|
139
|
+
slot[name="header"]::slotted(*) {
|
|
140
|
+
padding: .4em .5em;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
slot:not([name]) {
|
|
144
|
+
gap: var(--media-menu-gap, .25em);
|
|
145
|
+
flex-direction: var(--media-menu-flex-direction, row);
|
|
146
|
+
padding-inline: .5em;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
media-chrome-menu-item {
|
|
150
|
+
padding: .3em .5em;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
media-chrome-menu-item[aria-checked="true"] {
|
|
154
|
+
background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
media-chrome-menu-item::part(checked-indicator) {
|
|
159
|
+
display: var(--media-menu-item-checked-indicator-display, none);
|
|
160
|
+
}
|
|
161
|
+
</style>
|
|
162
|
+
<div id="container" part="container">
|
|
163
|
+
<slot name="header" hidden>
|
|
164
|
+
<button part="back button" aria-label="Back to previous menu">
|
|
165
|
+
<slot name="back-icon">
|
|
166
|
+
<svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">
|
|
167
|
+
<path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/>
|
|
168
|
+
</svg>
|
|
169
|
+
</slot>
|
|
170
|
+
<slot name="title"></slot>
|
|
171
|
+
</button>
|
|
172
|
+
</slot>
|
|
173
|
+
<slot></slot>
|
|
174
|
+
</div>
|
|
175
|
+
<slot name="checked-indicator" hidden></slot>
|
|
176
|
+
`}var x={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"},D=class extends u.HTMLElement{constructor(){if(super(),l(this,Pe),l(this,_e),l(this,ge),l(this,Ue),l(this,He),l(this,We),l(this,B),l(this,Te),l(this,Be),l(this,Ye),l(this,qe),l(this,Xe),l(this,Ve),l(this,$e),l(this,J),l(this,Ge),l(this,j),l(this,be),l(this,g,null),l(this,L,null),l(this,S,null),l(this,Ee,new Set),l(this,ve,void 0),l(this,R,false),l(this,ee,null),l(this,Ae,()=>{let e=s(this,Ee),i=new Set(this.items);for(let o of e)i.has(o)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:o}));for(let o of i)e.has(o)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:o}));v(this,Ee,i);}),l(this,H,()=>{d(this,B,te).call(this),d(this,Te,ze).call(this,false);}),l(this,W,()=>{d(this,B,te).call(this);}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=P(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e);}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),v(this,ve,new MutationObserver(s(this,Ae))),s(this,ve).observe(this.defaultSlot,{childList:true});}static get observedAttributes(){return [x.DISABLED,x.HIDDEN,x.STYLE,x.ANCHOR,E.MEDIA_CONTROLLER]}static formatMenuItemText(e,i){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this);}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this);}handleEvent(e){switch(e.type){case "slotchange":d(this,Pe,Tt).call(this,e);break;case "invoke":d(this,Ue,yt).call(this,e);break;case "click":d(this,Be,It).call(this,e);break;case "toggle":d(this,qe,Mt).call(this,e);break;case "focusout":d(this,Ve,Lt).call(this,e);break;case "keydown":d(this,$e,Rt).call(this,e);break}}connectedCallback(){var e,i;v(this,ee,Ce(this.shadowRoot,":host")),d(this,ge,Ne).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),v(this,g,me(this)),(i=(e=s(this,g))==null?void 0:e.associateElement)==null||i.call(e,this),this.hidden||(Y(ie(this),s(this,H)),Y(this,s(this,W))),d(this,_e,Ke).call(this);}disconnectedCallback(){var e,i;X(ie(this),s(this,H)),X(this,s(this,W)),this.disable(),(i=(e=s(this,g))==null?void 0:e.unassociateElement)==null||i.call(e,this),v(this,g,null);}attributeChangedCallback(e,i,o){var n,a,r,h;e===x.HIDDEN&&o!==i?(s(this,R)||v(this,R,true),this.hidden?d(this,We,St).call(this):d(this,He,kt).call(this),this.dispatchEvent(new ue({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:true}))):e===E.MEDIA_CONTROLLER?(i&&((a=(n=s(this,g))==null?void 0:n.unassociateElement)==null||a.call(n,this),v(this,g,null)),o&&this.isConnected&&(v(this,g,me(this)),(h=(r=s(this,g))==null?void 0:r.associateElement)==null||h.call(r,this))):e===x.DISABLED&&o!==i?o==null?this.enable():this.disable():e===x.STYLE&&o!==i&&d(this,ge,Ne).call(this);}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`);}get anchorElement(){var e;return this.anchor?(e=Z(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:true}).filter(Yt)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,i;return (i=(e=this.checkedItems[0])==null?void 0:e.value)!=null?i:""}set value(e){let i=this.items.find(o=>o.value===e);i&&d(this,be,Qe).call(this,i);}focus(){if(v(this,L,De()),this.items.length){d(this,j,ke).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e?.focus();}handleSelect(e){var i;let o=d(this,J,ye).call(this,e);o&&(d(this,be,Qe).call(this,o,o.type==="checkbox"),s(this,S)&&!this.hidden&&((i=s(this,L))==null||i.focus(),this.hidden=true));}get keysUsed(){return ["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var i,o;let{key:n}=e,a=this.items,r=(o=(i=d(this,J,ye).call(this,e))!=null?i:d(this,Ge,Dt).call(this))!=null?o:a[0],h=a.indexOf(r),c=Math.max(0,h);n==="ArrowDown"?c++:n==="ArrowUp"?c--:e.key==="Home"?c=0:e.key==="End"&&(c=a.length-1),c<0&&(c=a.length-1),c>a.length-1&&(c=0),d(this,j,ke).call(this,a[c]),a[c].focus();}};g=new WeakMap;L=new WeakMap;S=new WeakMap;Ee=new WeakMap;ve=new WeakMap;R=new WeakMap;ee=new WeakMap;Pe=new WeakSet;Tt=function(t){let e=t.target;for(let i of e.assignedNodes({flatten:true}))i.nodeType===3&&i.textContent.trim()===""&&i.remove();["header","title"].includes(e.name)&&d(this,_e,Ke).call(this),e.name||s(this,Ae).call(this);};_e=new WeakSet;Ke=function(){let t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=e.assignedNodes().length===0&&t.assignedNodes().length===0;};Ae=new WeakMap;ge=new WeakSet;Ne=function(){var t;let e=this.shadowRoot.querySelector("#layout-row"),i=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",i==="row"?"":"width:0");};Ue=new WeakSet;yt=function(t){v(this,S,t.relatedTarget),pe(this,t.relatedTarget)||(this.hidden=!this.hidden);};He=new WeakSet;kt=function(){var t;(t=s(this,S))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:true}),Y(ie(this),s(this,H)),Y(this,s(this,W));};We=new WeakSet;St=function(){var t;(t=s(this,S))==null||t.setAttribute("aria-expanded","false"),X(ie(this),s(this,H)),X(this,s(this,W));};H=new WeakMap;W=new WeakMap;B=new WeakSet;te=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:e,y:i}=Et({anchor:this.anchorElement,floating:this,placement:"top-start"});t??(t=this.offsetWidth);let n=ie(this).getBoundingClientRect(),a=n.width-e-t,r=n.height-i-this.offsetHeight,{style:h}=s(this,ee);h.setProperty("position","absolute"),h.setProperty("right",`${Math.max(0,a)}px`),h.setProperty("--_menu-bottom",`${r}px`);let c=getComputedStyle(this),Me=h.getPropertyValue("--_menu-bottom")===c.bottom?r:parseFloat(c.bottom),se=n.height-Me-parseFloat(c.marginBottom);this.style.setProperty("--_menu-max-height",`${se}px`);};Te=new WeakSet;ze=function(t){let e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=e?.querySelector('[role="menu"]'),{style:o}=s(this,ee);if(t||o.setProperty("--media-menu-transition-in","none"),i){let n=i.offsetHeight,a=Math.max(i.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${a}px`),this.style.setProperty("min-height",`${n}px`),d(this,B,te).call(this,a);}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),d(this,B,te).call(this);o.removeProperty("--media-menu-transition-in");};Be=new WeakSet;It=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(s(this,Ye,wt))){(e=s(this,L))==null||e.focus(),this.hidden=true;return}let i=d(this,J,ye).call(this,t);!i||i.hasAttribute("disabled")||(d(this,j,ke).call(this,i),this.handleSelect(t));};Ye=new WeakSet;wt=function(){var t;return (t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:true}))==null?void 0:t.find(i=>i.matches('button[part~="back"]'))};qe=new WeakSet;Mt=function(t){if(t.target===this)return;d(this,Xe,xt).call(this);let e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of e)i.invokeTargetElement!=t.target&&t.newState=="open"&&i.getAttribute("aria-expanded")=="true"&&!i.invokeTargetElement.hidden&&i.invokeTargetElement.dispatchEvent(new O({relatedTarget:i}));for(let i of e)i.setAttribute("aria-expanded",`${!i.submenuElement.hidden}`);d(this,Te,ze).call(this,true);};Xe=new WeakSet;xt=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e);};Ve=new WeakSet;Lt=function(t){var e;pe(this,t.relatedTarget)||(s(this,R)&&((e=s(this,L))==null||e.focus()),s(this,S)&&s(this,S)!==t.relatedTarget&&!this.hidden&&(this.hidden=true));};$e=new WeakSet;Rt=function(t){var e,i,o,n,a;let{key:r,ctrlKey:h,altKey:c,metaKey:p}=t;if(!(h||c||p)&&this.keysUsed.includes(r))if(t.preventDefault(),t.stopPropagation(),r==="Tab"){if(s(this,R)){this.hidden=true;return}t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(n=(o=this.nextElementSibling)==null?void 0:o.focus)==null||n.call(o),this.blur();}else r==="Escape"?((a=s(this,L))==null||a.focus(),s(this,R)&&(this.hidden=true)):r==="Enter"||r===" "?this.handleSelect(t):this.handleMove(t);};J=new WeakSet;ye=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};Ge=new WeakSet;Dt=function(){return this.items.find(t=>t.tabIndex===0)};j=new WeakSet;ke=function(t){for(let e of this.items)e.tabIndex=e===t?0:-1;};be=new WeakSet;Qe=function(t,e){let i=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(o=>o.checked=false),e?t.checked=!t.checked:t.checked=true,this.checkedItems.some((o,n)=>o!=i[n])&&this.dispatchEvent(new Event("change",{bubbles:true,composed:true}));};D.shadowRootOptions={mode:"open"};D.getTemplateHTML=zt;function Yt(t){return ["menuitem","menuitemradio","menuitemcheckbox"].includes(t?.role)}function ie(t){var e;return (e=t.getAttribute("bounds")?N(t,`#${t.getAttribute("bounds")}`):he(t)||t.parentElement)!=null?e:t}u.customElements.get("media-chrome-menu")||u.customElements.define("media-chrome-menu",D);var q={PLACEMENT:"placement",BOUNDS:"bounds"};function Xt(t){return `
|
|
177
|
+
<style>
|
|
178
|
+
:host {
|
|
179
|
+
--_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
|
|
180
|
+
--_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));
|
|
181
|
+
--_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);
|
|
182
|
+
--_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);
|
|
183
|
+
--_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));
|
|
184
|
+
position: relative;
|
|
185
|
+
pointer-events: none;
|
|
186
|
+
display: var(--media-tooltip-display, inline-flex);
|
|
187
|
+
justify-content: center;
|
|
188
|
+
align-items: center;
|
|
189
|
+
box-sizing: border-box;
|
|
190
|
+
z-index: var(--media-tooltip-z-index, 1);
|
|
191
|
+
background: var(--_tooltip-background);
|
|
192
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
193
|
+
font: var(--media-font,
|
|
194
|
+
var(--media-font-weight, 400)
|
|
195
|
+
var(--media-font-size, 13px) /
|
|
196
|
+
var(--media-text-content-height, var(--media-control-height, 18px))
|
|
197
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
198
|
+
padding: var(--media-tooltip-padding, .35em .7em);
|
|
199
|
+
border: var(--media-tooltip-border, none);
|
|
200
|
+
border-radius: var(--media-tooltip-border-radius, 5px);
|
|
201
|
+
filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));
|
|
202
|
+
white-space: var(--media-tooltip-white-space, nowrap);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:host([hidden]) {
|
|
206
|
+
display: none;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
img, svg {
|
|
210
|
+
display: inline-block;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
#arrow {
|
|
214
|
+
position: absolute;
|
|
215
|
+
width: 0px;
|
|
216
|
+
height: 0px;
|
|
217
|
+
border-style: solid;
|
|
218
|
+
display: var(--media-tooltip-arrow-display, block);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
:host(:not([placement])),
|
|
222
|
+
:host([placement="top"]) {
|
|
223
|
+
position: absolute;
|
|
224
|
+
bottom: calc(100% + var(--media-tooltip-distance, 12px));
|
|
225
|
+
left: 50%;
|
|
226
|
+
transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
|
|
227
|
+
}
|
|
228
|
+
:host(:not([placement])) #arrow,
|
|
229
|
+
:host([placement="top"]) #arrow {
|
|
230
|
+
top: 100%;
|
|
231
|
+
left: 50%;
|
|
232
|
+
border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);
|
|
233
|
+
border-color: var(--_tooltip-arrow-background) transparent transparent transparent;
|
|
234
|
+
transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
:host([placement="right"]) {
|
|
238
|
+
position: absolute;
|
|
239
|
+
left: calc(100% + var(--media-tooltip-distance, 12px));
|
|
240
|
+
top: 50%;
|
|
241
|
+
transform: translate(0, -50%);
|
|
242
|
+
}
|
|
243
|
+
:host([placement="right"]) #arrow {
|
|
244
|
+
top: 50%;
|
|
245
|
+
right: 100%;
|
|
246
|
+
border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;
|
|
247
|
+
border-color: transparent var(--_tooltip-arrow-background) transparent transparent;
|
|
248
|
+
transform: translate(0, -50%);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
:host([placement="bottom"]) {
|
|
252
|
+
position: absolute;
|
|
253
|
+
top: calc(100% + var(--media-tooltip-distance, 12px));
|
|
254
|
+
left: 50%;
|
|
255
|
+
transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
|
|
256
|
+
}
|
|
257
|
+
:host([placement="bottom"]) #arrow {
|
|
258
|
+
bottom: 100%;
|
|
259
|
+
left: 50%;
|
|
260
|
+
border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);
|
|
261
|
+
border-color: transparent transparent var(--_tooltip-arrow-background) transparent;
|
|
262
|
+
transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
:host([placement="left"]) {
|
|
266
|
+
position: absolute;
|
|
267
|
+
right: calc(100% + var(--media-tooltip-distance, 12px));
|
|
268
|
+
top: 50%;
|
|
269
|
+
transform: translate(0, -50%);
|
|
270
|
+
}
|
|
271
|
+
:host([placement="left"]) #arrow {
|
|
272
|
+
top: 50%;
|
|
273
|
+
left: 100%;
|
|
274
|
+
border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);
|
|
275
|
+
border-color: transparent transparent transparent var(--_tooltip-arrow-background);
|
|
276
|
+
transform: translate(0, -50%);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
:host([placement="none"]) #arrow {
|
|
280
|
+
display: none;
|
|
281
|
+
}
|
|
282
|
+
</style>
|
|
283
|
+
<slot></slot>
|
|
284
|
+
<div id="arrow"></div>
|
|
285
|
+
`}var V=class extends u.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!_t(this,{checkOpacity:false,checkVisibilityCSS:false}))return;let i=this.placement;if(i==="left"||i==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}let o=getComputedStyle(this),n=(e=N(this,"#"+this.bounds))!=null?e:he(this);if(!n)return;let{x:a,width:r}=n.getBoundingClientRect(),{x:h,width:c}=this.getBoundingClientRect(),p=h+c,Me=a+r,se=o.getPropertyValue("--media-tooltip-offset-x"),at=se?parseFloat(se.replace("px","")):0,rt=o.getPropertyValue("--media-tooltip-container-margin"),st=rt?parseFloat(rt.replace("px","")):0,lt=h-a+at-st,dt=p-Me+at+st;if(lt<0){this.style.setProperty("--media-tooltip-offset-x",`${lt}px`);return}if(dt>0){this.style.setProperty("--media-tooltip-offset-x",`${dt}px`);return}this.style.removeProperty("--media-tooltip-offset-x");},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=P(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e);}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let e=this.placement;delete this.placement,this.placement=e;}}static get observedAttributes(){return [q.PLACEMENT,q.BOUNDS]}get placement(){return M(this,q.PLACEMENT)}set placement(e){U(this,q.PLACEMENT,e);}get bounds(){return M(this,q.BOUNDS)}set bounds(e){U(this,q.BOUNDS,e);}};V.shadowRootOptions={mode:"open"};V.getTemplateHTML=Xt;u.customElements.get("media-tooltip")||u.customElements.define("media-tooltip",V);var Ze=V;var je=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},m=(t,e,i)=>(je(t,e,"read from private field"),i?i.call(t):e.get(t)),$=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i);},Se=(t,e,i,o)=>(je(t,e,"write to private field"),e.set(t,i),i),Zt=(t,e,i)=>(je(t,e,"access private method"),i),b,Q,w,G,Ie,Je,Pt,I={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function Jt(t,e={}){return `
|
|
286
|
+
<style>
|
|
287
|
+
:host {
|
|
288
|
+
position: relative;
|
|
289
|
+
font: var(--media-font,
|
|
290
|
+
var(--media-font-weight, bold)
|
|
291
|
+
var(--media-font-size, 14px) /
|
|
292
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
293
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
294
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
295
|
+
background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
296
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px));
|
|
297
|
+
justify-content: var(--media-button-justify-content, center);
|
|
298
|
+
display: inline-flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
vertical-align: middle;
|
|
301
|
+
box-sizing: border-box;
|
|
302
|
+
transition: background .15s linear;
|
|
303
|
+
pointer-events: auto;
|
|
304
|
+
cursor: var(--media-cursor, pointer);
|
|
305
|
+
-webkit-tap-highlight-color: transparent;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
:host(:focus-visible) {
|
|
310
|
+
box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
311
|
+
outline: 0;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
:host(:where(:focus)) {
|
|
315
|
+
box-shadow: none;
|
|
316
|
+
outline: 0;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
:host(:hover) {
|
|
320
|
+
background: var(--media-control-hover-background, rgba(50 50 70 / .7));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
324
|
+
width: var(--media-button-icon-width);
|
|
325
|
+
height: var(--media-button-icon-height, var(--media-control-height, 24px));
|
|
326
|
+
transform: var(--media-button-icon-transform);
|
|
327
|
+
transition: var(--media-button-icon-transition);
|
|
328
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
329
|
+
vertical-align: middle;
|
|
330
|
+
max-width: 100%;
|
|
331
|
+
max-height: 100%;
|
|
332
|
+
min-width: 100%;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
media-tooltip {
|
|
336
|
+
|
|
337
|
+
max-width: 0;
|
|
338
|
+
overflow-x: clip;
|
|
339
|
+
opacity: 0;
|
|
340
|
+
transition: opacity .3s, max-width 0s 9s;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
:host(:hover) media-tooltip,
|
|
344
|
+
:host(:focus-visible) media-tooltip {
|
|
345
|
+
max-width: 100vw;
|
|
346
|
+
opacity: 1;
|
|
347
|
+
transition: opacity .3s;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
:host([notooltip]) slot[name="tooltip"] {
|
|
351
|
+
display: none;
|
|
352
|
+
}
|
|
353
|
+
</style>
|
|
354
|
+
|
|
355
|
+
${this.getSlotTemplateHTML(t,e)}
|
|
356
|
+
|
|
357
|
+
<slot name="tooltip">
|
|
358
|
+
<media-tooltip part="tooltip" aria-hidden="true">
|
|
359
|
+
<template shadowrootmode="${Ze.shadowRootOptions.mode}">
|
|
360
|
+
${Ze.getTemplateHTML({})}
|
|
361
|
+
</template>
|
|
362
|
+
<slot name="tooltip-content">
|
|
363
|
+
${this.getTooltipContentHTML(t)}
|
|
364
|
+
</slot>
|
|
365
|
+
</media-tooltip>
|
|
366
|
+
</slot>
|
|
367
|
+
`}function jt(t,e){return `
|
|
368
|
+
<slot></slot>
|
|
369
|
+
`}function ei(){return ""}var T=class extends u.HTMLElement{constructor(){if(super(),$(this,Je),$(this,b,void 0),this.preventClick=false,this.tooltipEl=null,$(this,Q,e=>{this.preventClick||this.handleClick(e),setTimeout(m(this,w),0);}),$(this,w,()=>{var e,i;(i=(e=this.tooltipEl)==null?void 0:e.updateXOffset)==null||i.call(e);}),$(this,G,e=>{let{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",m(this,G));return}this.preventClick||this.handleClick(e);}),$(this,Ie,e=>{let{metaKey:i,altKey:o,key:n}=e;if(i||o||!this.keysUsed.includes(n)){this.removeEventListener("keyup",m(this,G));return}this.addEventListener("keyup",m(this,G),{once:true});}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=P(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i;}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip");}static get observedAttributes(){return ["disabled",I.TOOLTIP_PLACEMENT,E.MEDIA_CONTROLLER,K.MEDIA_LANG]}enable(){this.addEventListener("click",m(this,Q)),this.addEventListener("keydown",m(this,Ie)),this.tabIndex=0;}disable(){this.removeEventListener("click",m(this,Q)),this.removeEventListener("keydown",m(this,Ie)),this.removeEventListener("keyup",m(this,G)),this.tabIndex=-1;}attributeChangedCallback(e,i,o){var n,a,r,h,c;e===E.MEDIA_CONTROLLER?(i&&((a=(n=m(this,b))==null?void 0:n.unassociateElement)==null||a.call(n,this),Se(this,b,null)),o&&this.isConnected&&(Se(this,b,(r=this.getRootNode())==null?void 0:r.getElementById(o)),(c=(h=m(this,b))==null?void 0:h.associateElement)==null||c.call(h,this))):e==="disabled"&&o!==i?o==null?this.enable():this.disable():e===I.TOOLTIP_PLACEMENT&&this.tooltipEl&&o!==i?this.tooltipEl.placement=o:e===K.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),m(this,w).call(this);}connectedCallback(){var e,i,o;let{style:n}=At(this.shadowRoot,":host");n.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");let a=this.getAttribute(E.MEDIA_CONTROLLER);a&&(Se(this,b,(e=this.getRootNode())==null?void 0:e.getElementById(a)),(o=(i=m(this,b))==null?void 0:i.associateElement)==null||o.call(i,this)),u.customElements.whenDefined("media-tooltip").then(()=>Zt(this,Je,Pt).call(this));}disconnectedCallback(){var e,i;this.disable(),(i=(e=m(this,b))==null?void 0:e.unassociateElement)==null||i.call(e,this),Se(this,b,null),this.removeEventListener("mouseenter",m(this,w)),this.removeEventListener("focus",m(this,w)),this.removeEventListener("click",m(this,Q));}get keysUsed(){return ["Enter"," "]}get tooltipPlacement(){return M(this,I.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){U(this,I.TOOLTIP_PLACEMENT,e);}get mediaController(){return M(this,E.MEDIA_CONTROLLER)}set mediaController(e){U(this,E.MEDIA_CONTROLLER,e);}get disabled(){return fe(this,I.DISABLED)}set disabled(e){Oe(this,I.DISABLED,e);}get noTooltip(){return fe(this,I.NO_TOOLTIP)}set noTooltip(e){Oe(this,I.NO_TOOLTIP,e);}handleClick(e){}};b=new WeakMap;Q=new WeakMap;w=new WeakMap;G=new WeakMap;Ie=new WeakMap;Je=new WeakSet;Pt=function(){this.addEventListener("mouseenter",m(this,w)),this.addEventListener("focus",m(this,w)),this.addEventListener("click",m(this,Q));let t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t);};T.shadowRootOptions={mode:"open"};T.getTemplateHTML=Jt;T.getSlotTemplateHTML=jt;T.getTooltipContentHTML=ei;u.customElements.get("media-chrome-button")||u.customElements.define("media-chrome-button",T);var oe=class extends T{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu");}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`);}get invokeTargetElement(){var e;return this.invokeTarget?(e=Z(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;(e=this.invokeTargetElement)==null||e.dispatchEvent(new O({relatedTarget:this}));}};u.customElements.get("media-chrome-menu-button")||u.customElements.define("media-chrome-menu-button",oe);var Nt={"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it."};var Ut,et={en:Nt},tt=((Ut=globalThis.navigator)==null?void 0:Ut.language)||"en",zi=t=>{tt=t;};var ti=t=>{var e,i,o;let[n]=tt.split("-");return ((e=et[tt])==null?void 0:e[t])||((i=et[n])==null?void 0:i[t])||((o=et.en)==null?void 0:o[t])||t},it=(t,e={})=>ti(t).replace(/\{(\w+)\}/g,(i,o)=>o in e?String(e[o]):`{${o}}`);var ii=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
370
|
+
<path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
|
|
371
|
+
<path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/>
|
|
372
|
+
</svg>`,y,_,A,nt,ne,re,ot=class extends D{constructor(){super(...arguments);chunkJHSFSCC2_cjs.e(this,A);chunkJHSFSCC2_cjs.e(this,y,[]);chunkJHSFSCC2_cjs.e(this,_);chunkJHSFSCC2_cjs.e(this,re,()=>{let i=this.value??chunkJHSFSCC2_cjs.d(this,_);i!=null&&(chunkJHSFSCC2_cjs.f(this,_,String(i)),this.dispatchEvent(new u.CustomEvent(ct.MEDIA_AUDIO_TRACK_REQUEST,{detail:chunkJHSFSCC2_cjs.d(this,_),composed:true,bubbles:true})),chunkJHSFSCC2_cjs.g(this,A,ne).call(this));});}get tracks(){return chunkJHSFSCC2_cjs.d(this,y)}set tracks(i){chunkJHSFSCC2_cjs.f(this,y,[...i??[]]),chunkJHSFSCC2_cjs.g(this,A,nt).call(this);}get selected(){return chunkJHSFSCC2_cjs.d(this,_)}set selected(i){chunkJHSFSCC2_cjs.f(this,_,i??void 0),chunkJHSFSCC2_cjs.g(this,A,ne).call(this);}connectedCallback(){super.connectedCallback(),this.addEventListener("change",chunkJHSFSCC2_cjs.d(this,re)),chunkJHSFSCC2_cjs.g(this,A,nt).call(this),chunkJHSFSCC2_cjs.g(this,A,ne).call(this);}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",chunkJHSFSCC2_cjs.d(this,re));}};y=new WeakMap,_=new WeakMap,A=new WeakSet,nt=function(){let i=this.defaultSlot;if(i){i.textContent="";for(let o of chunkJHSFSCC2_cjs.d(this,y)){let n=Ct({type:"radio",text:o.label??o.language??"",value:o.id,checked:!!o.enabled});n.prepend(Ot(this,"checked-indicator")),i.append(n);}chunkJHSFSCC2_cjs.g(this,A,ne).call(this);}},ne=function(){let i=chunkJHSFSCC2_cjs.d(this,y).find(r=>r.enabled)??(chunkJHSFSCC2_cjs.d(this,y).length?chunkJHSFSCC2_cjs.d(this,y)[0]:void 0),o=chunkJHSFSCC2_cjs.d(this,_)??i?.id;chunkJHSFSCC2_cjs.f(this,_,o);let a=this.defaultSlot?.querySelectorAll("media-chrome-menu-item")??this.querySelectorAll("media-chrome-menu-item");for(let r of Array.from(a))"checked"in r&&"value"in r&&(r.checked=r.value===o);o!=null?this.value=o:(this.value="",this.removeAttribute("value"));},re=new WeakMap;var we,Ht,ae=class extends oe{constructor(){super(...arguments);chunkJHSFSCC2_cjs.e(this,we);}connectedCallback(){super.connectedCallback(),chunkJHSFSCC2_cjs.g(this,we,Ht).call(this);}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:this.closest("media-controller, mave-player")?.querySelector("mave-audio-track-menu")??null}};we=new WeakSet,Ht=function(){let i=it("Audio");this.setAttribute("aria-label",i);},ae.getSlotTemplateHTML=()=>`
|
|
373
|
+
<style>
|
|
374
|
+
:host([aria-expanded="true"]) slot[name='tooltip'] {
|
|
375
|
+
display: none;
|
|
376
|
+
}
|
|
377
|
+
</style>
|
|
378
|
+
<slot name="icon">${ii}</slot>
|
|
379
|
+
`,ae.getTooltipContentHTML=()=>it("Audio");u.customElements.get("mave-audio-track-menu")||u.customElements.define("mave-audio-track-menu",ot);u.customElements.get("mave-audio-track-menu-button")||u.customElements.define("mave-audio-track-menu-button",ae);exports.A=_t;exports.B=yi;exports.C=At;exports.D=Kt;exports.E=ki;exports.F=fe;exports.G=Oe;exports.H=M;exports.I=U;exports.J=T;exports.K=O;exports.L=Ct;exports.M=Ot;exports.N=D;exports.O=oe;exports.P=ot;exports.Q=ae;exports.a=ct;exports.b=E;exports.c=Wt;exports.d=K;exports.e=ht;exports.f=ni;exports.g=ai;exports.h=ri;exports.i=si;exports.j=li;exports.k=di;exports.l=ci;exports.m=zi;exports.n=it;exports.o=u;exports.p=Le;exports.q=Y;exports.r=X;exports.s=P;exports.t=he;exports.u=Ai;exports.v=Ti;exports.w=pe;exports.x=N;exports.y=De;exports.z=Z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkFUBUUA7Y_cjs=require('./chunk-FUBUUA7Y.cjs'),chunk5NSCV6C2_cjs=require('./chunk-5NSCV6C2.cjs'),chunk5STN56TL_cjs=require('./chunk-5STN56TL.cjs'),
|
|
1
|
+
'use strict';var chunkFUBUUA7Y_cjs=require('./chunk-FUBUUA7Y.cjs'),chunk5NSCV6C2_cjs=require('./chunk-5NSCV6C2.cjs'),chunk5STN56TL_cjs=require('./chunk-5STN56TL.cjs'),chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');var s=class extends chunk5NSCV6C2_cjs.i{constructor(){super(...arguments);this.EVENT_TYPES={CLICK:"user_click"};}get embed(){return this._embed}set embed(t){this._embed=t;}get embedId(){return this._embed?.substring(5,this._embed?.length)}get spaceId(){return this.embed?.substring(0,5)}get cdn_root(){return chunk5STN56TL_cjs.a.cdn.endpoint.replace("${this.spaceId}",this.spaceId)}get _stylesheets(){if(typeof document>"u")return chunk5NSCV6C2_cjs.c``;let t=document.querySelectorAll('style, link[rel="stylesheet"]');return chunk5NSCV6C2_cjs.c`${Array.from(t).map(e=>e.cloneNode(true))}`}durationToTime(t){let e=Math.floor(t),n=Math.floor(e/3600),i=Math.floor(e%3600/60),o=e%60;return n>0?`${n}:${i.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${i}:${o.toString().padStart(2,"0")}`}emit(t,e){this.dispatchEvent(new CustomEvent(`mave:${t}`,{detail:{...e,eventType:t}})),this.dispatchEvent(new CustomEvent("mave:*",{detail:{...e,eventType:t}}));}};chunkJHSFSCC2_cjs.c([chunkFUBUUA7Y_cjs.a({type:String})],s.prototype,"embed",1);exports.a=s;
|