@maveio/components 0.0.168 → 0.0.170
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-2E5GLLOS.cjs +19 -0
- package/dist/chunk-2FUCHY2J.cjs +35 -0
- package/dist/chunk-3BAQWQNY.cjs +25 -0
- package/dist/chunk-3UQNIS3L.js +194 -0
- package/dist/chunk-474VILDO.cjs +194 -0
- package/dist/chunk-5PIHL662.js +19 -0
- package/dist/chunk-5QLIDHRT.cjs +33 -0
- package/dist/chunk-AOBEOJ2U.cjs +10 -0
- package/dist/chunk-B6P2GJBQ.js +9 -0
- package/dist/chunk-BTCK3T4L.cjs +24 -0
- package/dist/{chunk-H5YWUSBE.js → chunk-CNPQ5Q2M.js} +1 -1
- package/dist/chunk-CVXHA76S.js +3 -0
- package/dist/chunk-CZUMF7SR.cjs +1 -0
- package/dist/chunk-DL4BV5IH.cjs +24 -0
- package/dist/chunk-EA4QYQHD.js +1639 -0
- package/dist/chunk-FAONFKQ2.cjs +9 -0
- package/dist/{chunk-LHWG7RHD.js → chunk-GRBSIFM2.js} +3 -3
- package/dist/chunk-GSVKVWEI.js +33 -0
- package/dist/chunk-HMVS6DJE.js +186 -0
- package/dist/chunk-IBQULJZC.cjs +3 -0
- package/dist/chunk-IETV3B4F.cjs +38 -0
- package/dist/chunk-ITC5FANW.cjs +1639 -0
- package/dist/{chunk-LGKQ3C7I.cjs → chunk-K5Z7QHTN.cjs} +1 -1
- package/dist/chunk-KO3CETGD.js +25 -0
- package/dist/chunk-LVGLIRQU.cjs +186 -0
- package/dist/chunk-N2L5GXPF.cjs +211 -0
- package/dist/{chunk-NX7L7P75.js → chunk-NDPOBFNC.js} +4 -4
- package/dist/chunk-NPP5B5PV.cjs +16 -0
- package/dist/{chunk-RIIKHYMD.cjs → chunk-OFBA5VRE.cjs} +3 -3
- package/dist/{chunk-FLXLRYLI.js → chunk-OX42Y2HR.js} +1 -1
- package/dist/chunk-PTN427IG.js +24 -0
- package/dist/chunk-Q3FGRSLA.js +38 -0
- package/dist/chunk-QFF6OUH6.js +9 -0
- package/dist/chunk-QOM4AP6R.cjs +9 -0
- package/dist/chunk-QQDH35OW.cjs +9 -0
- package/dist/{chunk-ZZBI6DXY.js → chunk-R3SDTEHC.js} +1 -1
- package/dist/chunk-RHTBV6KZ.js +24 -0
- package/dist/{chunk-RBBM42XM.cjs → chunk-RQN3DXJB.cjs} +1 -1
- package/dist/chunk-RWRHU74Q.js +1 -0
- package/dist/{chunk-FQRZLSBE.js → chunk-SWRFZ3FV.js} +1 -1
- package/dist/chunk-TFOTA27Y.js +211 -0
- package/dist/chunk-TH3DUBVR.js +35 -0
- package/dist/{chunk-4UB3XJZV.cjs → chunk-TJ5F2FGY.cjs} +4 -4
- package/dist/{chunk-42VJWULJ.cjs → chunk-TKJYRGEU.cjs} +1 -1
- package/dist/chunk-WOXKZOJ3.js +10 -0
- package/dist/chunk-YPCQNE3R.js +16 -0
- package/dist/{chunk-6KO66K2G.cjs → chunk-YWYZKUFB.cjs} +4 -4
- package/dist/{chunk-62PQDUAE.js → chunk-ZWLZE25P.js} +4 -4
- package/dist/components/audio-track-menu.cjs +1 -1
- package/dist/components/audio-track-menu.js +1 -1
- package/dist/components/captions-menu-button.cjs +1 -0
- package/dist/components/captions-menu-button.d.cts +10 -0
- package/dist/components/captions-menu-button.d.ts +10 -0
- package/dist/components/captions-menu-button.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 +4 -0
- package/dist/components/player.d.ts +4 -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.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.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 +204 -28
- package/dist/themes/default.js +204 -28
- package/dist/themes/dolphin.cjs +192 -16
- package/dist/themes/dolphin.js +192 -16
- package/dist/themes/loader.cjs +1 -1
- package/dist/themes/loader.js +1 -1
- package/dist/themes/synthwave.cjs +192 -19
- package/dist/themes/synthwave.js +192 -19
- package/dist/utils/localization.cjs +1 -1
- package/dist/utils/localization.d.cts +2 -2
- package/dist/utils/localization.d.ts +2 -2
- 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/vue.cjs +1 -1
- package/dist/vue.d.cts +16 -16
- package/dist/vue.d.ts +16 -16
- package/dist/vue.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-27BWRXCN.js +0 -29
- package/dist/chunk-3J6Q5HPF.js +0 -37
- package/dist/chunk-3SSU5VNZ.cjs +0 -1532
- package/dist/chunk-43KJ6TMU.cjs +0 -17
- package/dist/chunk-6PSWE4MR.js +0 -3
- package/dist/chunk-6XBQ5C3V.js +0 -17
- package/dist/chunk-7SJMIXXD.js +0 -10
- package/dist/chunk-D75M3UFL.js +0 -1
- package/dist/chunk-D7LG2SMD.cjs +0 -33
- package/dist/chunk-DITZCOYN.cjs +0 -379
- package/dist/chunk-ES5FUTSE.cjs +0 -1
- package/dist/chunk-ETDEE7EL.cjs +0 -10
- package/dist/chunk-GO6BV3T4.cjs +0 -29
- package/dist/chunk-J74VK4RB.cjs +0 -9
- package/dist/chunk-M22WSPSU.js +0 -9
- package/dist/chunk-N27UPJGV.cjs +0 -37
- package/dist/chunk-NB5PC42C.js +0 -33
- package/dist/chunk-O2WRWRDO.cjs +0 -9
- package/dist/chunk-O4QBLS42.js +0 -17
- package/dist/chunk-OIZ5B5LE.cjs +0 -17
- package/dist/chunk-PJMR6NFX.js +0 -211
- package/dist/chunk-QPYU4D32.cjs +0 -3
- package/dist/chunk-T2P4BAWY.js +0 -379
- package/dist/chunk-VMGLCRPK.js +0 -35
- package/dist/chunk-WIS6FQDY.cjs +0 -24
- package/dist/chunk-WYXWOUKN.cjs +0 -211
- package/dist/chunk-XKFWCRVL.js +0 -1532
- package/dist/chunk-ZJWT7IOI.js +0 -24
- package/dist/chunk-ZQ3G5EQT.cjs +0 -35
package/dist/chunk-T2P4BAWY.js
DELETED
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
import {e,g as g$1,d as d$1,f}from'./chunk-KA24PL7V.js';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);e(this,A);e(this,y,[]);e(this,_);e(this,re,()=>{let i=this.value??d$1(this,_);i!=null&&(f(this,_,String(i)),this.dispatchEvent(new u.CustomEvent(ct.MEDIA_AUDIO_TRACK_REQUEST,{detail:d$1(this,_),composed:true,bubbles:true})),g$1(this,A,ne).call(this));});}get tracks(){return d$1(this,y)}set tracks(i){f(this,y,[...i??[]]),g$1(this,A,nt).call(this);}get selected(){return d$1(this,_)}set selected(i){f(this,_,i??void 0),g$1(this,A,ne).call(this);}connectedCallback(){super.connectedCallback(),this.addEventListener("change",d$1(this,re)),g$1(this,A,nt).call(this),g$1(this,A,ne).call(this);}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",d$1(this,re));}};y=new WeakMap,_=new WeakMap,A=new WeakSet,nt=function(){let i=this.defaultSlot;if(i){i.textContent="";for(let o of d$1(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);}g$1(this,A,ne).call(this);}},ne=function(){let i=d$1(this,y).find(r=>r.enabled)??(d$1(this,y).length?d$1(this,y)[0]:void 0),o=d$1(this,_)??i?.id;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);e(this,we);}connectedCallback(){super.connectedCallback(),g$1(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);export{_t as A,yi as B,At as C,Kt as D,ki as E,fe as F,Oe as G,M as H,U as I,T as J,O as K,Ct as L,Ot as M,D as N,oe as O,ot as P,ae as Q,ct as a,E as b,Wt as c,K as d,ht as e,ni as f,ai as g,ri as h,si as i,li as j,di as k,ci as l,zi as m,it as n,u as o,Le as p,Y as q,X as r,P as s,he as t,Ai as u,Ti as v,pe as w,N as x,De as y,Z as z};
|
package/dist/chunk-VMGLCRPK.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-M22WSPSU.js';import {a as a$1}from'./chunk-H5YWUSBE.js';import {a as a$3}from'./chunk-ZZBI6DXY.js';import {a,b}from'./chunk-ZJWT7IOI.js';import {h,i,f,c as c$1}from'./chunk-27BWRXCN.js';import {c,e,g}from'./chunk-KA24PL7V.js';var o,k,C,S,n=class extends i{constructor(){super(...arguments);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 a$1(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;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",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,c$1`
|
|
2
|
-
<div>
|
|
3
|
-
${this.captions.segments.map((e,r)=>c$1`
|
|
4
|
-
<p
|
|
5
|
-
data-segment-id="segment-${r}"
|
|
6
|
-
style=${a$2(this.segmentStyle())}
|
|
7
|
-
@click=${this.clickable?g(this,o,S):f}
|
|
8
|
-
part=${a$3(this.inRange(e,"segment"))}
|
|
9
|
-
x-caption-segment-start="${e.start}"
|
|
10
|
-
x-caption-segment-end="${e.end}"
|
|
11
|
-
>
|
|
12
|
-
${e.words.map((i,s)=>c$1`
|
|
13
|
-
<span
|
|
14
|
-
data-word-id="word-${r}-${s}"
|
|
15
|
-
style=${a$2(this.wordStyle(this.inRange(i)))}
|
|
16
|
-
part=${a$3(this.inRange(i,"word",r,s))}
|
|
17
|
-
x-caption-word-start="${i.start}"
|
|
18
|
-
x-caption-word-end="${i.end}"
|
|
19
|
-
>${i.word.trim()}</span
|
|
20
|
-
>
|
|
21
|
-
`)}
|
|
22
|
-
</p>
|
|
23
|
-
`)}
|
|
24
|
-
</div>
|
|
25
|
-
`)}):f}};o=new WeakSet,k=function(t,e,r=500){let i=this.scrollTop,s=e-i,c=null,p=false;function w(l){c||(c=l);let y=l-c,v=Math.min(y/r,1);t.scrollTop=i+s*x(v),y<r&&p?requestAnimationFrame(w):p=false;}function x(l){return l<.5?2*l*l:1-Math.pow(-2*l+2,2)/2}p=true,requestAnimationFrame(w);},C=function(){this._lastScrollTime=Date.now();},S=function(t){if(this.clickable){let e=t.target.closest("p");if(e&&this.player){let r=e.getAttribute("x-caption-segment-start");this.player.currentTime=Number(r),this.player.paused&&this.player.play();}}},n.styles=h`
|
|
26
|
-
:host {
|
|
27
|
-
display: block;
|
|
28
|
-
width: 100%;
|
|
29
|
-
height: 100%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
[part='word'] {
|
|
33
|
-
background-color: rgba(255, 210, 42, 0.5);
|
|
34
|
-
}
|
|
35
|
-
`,c([a()],n.prototype,"embed",1),c([a()],n.prototype,"highlight",2),c([a()],n.prototype,"clickable",1),c([a()],n.prototype,"autoscroll",1),c([b()],n.prototype,"currentTime",2),c([b()],n.prototype,"captions",2);typeof window<"u"&&window.customElements&&(window.customElements.get("mave-text")||window.customElements.define("mave-text",n));export{n as a};
|
package/dist/chunk-WIS6FQDY.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkGO6BV3T4_cjs=require('./chunk-GO6BV3T4.cjs');var f={attribute:true,type:String,converter:chunkGO6BV3T4_cjs.a,reflect:false,hasChanged:chunkGO6BV3T4_cjs.b},h=(e=f,n,t)=>{let{kind:s,metadata:i}=t,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),a.set(t.name,e),s==="accessor"){let{name:r}=t;return {set(c){let o=n.get.call(this);n.set.call(this,c),this.requestUpdate(r,o,e);},init(c){return c!==void 0&&this.P(r,void 0,e),c}}}if(s==="setter"){let{name:r}=t;return function(c){let o=this[r];n.call(this,c),this.requestUpdate(r,o,e);}}throw Error("Unsupported decorator location: "+s)};function d(e){return (n,t)=>typeof t=="object"?h(e,n,t):((s,i,a)=>{let r=i.hasOwnProperty(a);return i.constructor.createProperty(a,r?{...s,wrapped:true}:s),r?Object.getOwnPropertyDescriptor(i,a):void 0})(e,n,t)}function b(e){return d({...e,state:true,attribute:false})}var u=(e,n,t)=>(t.configurable=true,t.enumerable=true,Reflect.decorate&&typeof n!="object"&&Object.defineProperty(e,n,t),t);function E(e,n){return (t,s,i)=>{let a=r=>r.renderRoot?.querySelector(e)??null;if(n){let{get:r,set:c}=typeof s=="object"?t:i??(()=>{let o=Symbol();return {get(){return this[o]},set(m){this[o]=m;}}})();return u(t,s,{get(){let o=r.call(this);return o===void 0&&(o=a(this),(o!==null||this.hasUpdated)&&c.call(this,o)),o}})}return u(t,s,{get(){return a(this)}})}}/*! Bundled license information:
|
|
2
|
-
|
|
3
|
-
@lit/reactive-element/decorators/property.js:
|
|
4
|
-
@lit/reactive-element/decorators/state.js:
|
|
5
|
-
@lit/reactive-element/decorators/base.js:
|
|
6
|
-
@lit/reactive-element/decorators/query.js:
|
|
7
|
-
@lit/reactive-element/decorators/custom-element.js:
|
|
8
|
-
@lit/reactive-element/decorators/event-options.js:
|
|
9
|
-
@lit/reactive-element/decorators/query-all.js:
|
|
10
|
-
@lit/reactive-element/decorators/query-async.js:
|
|
11
|
-
@lit/reactive-element/decorators/query-assigned-nodes.js:
|
|
12
|
-
(**
|
|
13
|
-
* @license
|
|
14
|
-
* Copyright 2017 Google LLC
|
|
15
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
-
*)
|
|
17
|
-
|
|
18
|
-
@lit/reactive-element/decorators/query-assigned-elements.js:
|
|
19
|
-
(**
|
|
20
|
-
* @license
|
|
21
|
-
* Copyright 2021 Google LLC
|
|
22
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*)
|
|
24
|
-
*/exports.a=d;exports.b=b;exports.c=E;
|