@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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';var chunkNPP5B5PV_cjs=require('./chunk-NPP5B5PV.cjs');var N=globalThis,W=n=>n,w=N.trustedTypes,z=w?w.createPolicy("lit-html",{createHTML:n=>n}):void 0,P="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,U="?"+A,et=`<${U}>`,g=document,b=()=>g.createComment(""),T=n=>n===null||typeof n!="object"&&typeof n!="function",k=Array.isArray,J=n=>k(n)||typeof n?.[Symbol.iterator]=="function",D=`[
|
|
2
|
+
\f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,K=/>/g,u=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,q=/"/g,Q=/^(?:script|style|textarea|title)$/i,V=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),nt=V(1),ot=V(2),rt=V(3),f=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),G=new WeakMap,m=g.createTreeWalker(g,129);function X(n,t){if(!k(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return z!==void 0?z.createHTML(t):t}var Y=(n,t)=>{let e=n.length-1,s=[],i,o=t===2?"<svg>":t===3?"<math>":"",r=C;for(let d=0;d<e;d++){let h=n[d],a,c,l=-1,_=0;for(;_<h.length&&(r.lastIndex=_,c=r.exec(h),c!==null);)_=r.lastIndex,r===C?c[1]==="!--"?r=F:c[1]!==void 0?r=K:c[2]!==void 0?(Q.test(c[2])&&(i=RegExp("</"+c[2],"g")),r=u):c[3]!==void 0&&(r=u):r===u?c[0]===">"?(r=i??C,l=-1):c[1]===void 0?l=-2:(l=r.lastIndex-c[2].length,a=c[1],r=c[3]===void 0?u:c[3]==='"'?q:Z):r===q||r===Z?r=u:r===F||r===K?r=C:(r=u,i=void 0);let p=r===u&&n[d+1].startsWith("/>")?" ":"";o+=r===C?h+et:l>=0?(s.push(a),h.slice(0,l)+P+h.slice(l)+A+p):h+A+(l===-2?d:p);}return [X(n,o+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},E=class n{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0,d=t.length-1,h=this.parts,[a,c]=Y(t,e);if(this.el=n.createElement(a,s),m.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes);}for(;(i=m.nextNode())!==null&&h.length<d;){if(i.nodeType===1){if(i.hasAttributes())for(let l of i.getAttributeNames())if(l.endsWith(P)){let _=c[r++],p=i.getAttribute(l).split(A),S=/([.?@])?(.*)/.exec(_);h.push({type:1,index:o,name:S[2],strings:p,ctor:S[1]==="."?L:S[1]==="?"?R:S[1]==="@"?I:y}),i.removeAttribute(l);}else l.startsWith(A)&&(h.push({type:6,index:o}),i.removeAttribute(l));if(Q.test(i.tagName)){let l=i.textContent.split(A),_=l.length-1;if(_>0){i.textContent=w?w.emptyScript:"";for(let p=0;p<_;p++)i.append(l[p],b()),m.nextNode(),h.push({type:2,index:++o});i.append(l[_],b());}}}else if(i.nodeType===8)if(i.data===U)h.push({type:2,index:o});else {let l=-1;for(;(l=i.data.indexOf(A,l+1))!==-1;)h.push({type:7,index:o}),l+=A.length-1;}o++;}}static createElement(t,e){let s=g.createElement("template");return s.innerHTML=t,s}};function v(n,t,e=n,s){if(t===f)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,o=T(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(false),o===void 0?i=void 0:(i=new o(n),i._$AT(n,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=v(n,i._$AS(n,t.values),i,s)),t}var B=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??g).importNode(e,true);m.currentNode=i;let o=m.nextNode(),r=0,d=0,h=s[0];for(;h!==void 0;){if(r===h.index){let a;h.type===2?a=new x(o,o.nextSibling,this,t):h.type===1?a=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(a=new O(o,this,t)),this._$AV.push(a),h=s[++d];}r!==h?.index&&(o=m.nextNode(),r++);}return m.currentNode=g,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++;}},x=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=$,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=v(this,t,e),T(t)?t===$||t==null||t===""?(this._$AH!==$&&this._$AR(),this._$AH=$):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):J(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==$&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(g.createTextNode(t)),this._$AH=t;}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=E.createElement(X(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else {let o=new B(i,this),r=o.u(this.options);o.p(e),this.T(r),this._$AH=o;}}_$AC(t){let e=G.get(t.strings);return e===void 0&&G.set(t.strings,e=new E(t)),e}k(t){k(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let o of t)i===e.length?e.push(s=new n(this.O(b()),this.O(b()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i);}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let s=W(t).nextSibling;W(t).remove(),t=s;}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t));}},y=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=$,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=$;}_$AI(t,e=this,s,i){let o=this.strings,r=false;if(o===void 0)t=v(this,t,e,0),r=!T(t)||t!==this._$AH&&t!==f,r&&(this._$AH=t);else {let d=t,h,a;for(t=o[0],h=0;h<o.length-1;h++)a=v(this,d[s+h],e,h),a===f&&(a=this._$AH[h]),r||(r=!T(a)||a!==this._$AH[h]),a===$?t=$:t!==$&&(t+=(a??"")+o[h+1]),this._$AH[h]=a;}r&&!i&&this.j(t);}j(t){t===$?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}},L=class extends y{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===$?void 0:t;}},R=class extends y{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==$);}},I=class extends y{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5;}_$AI(t,e=this){if((t=v(this,t,e,0)??$)===f)return;let s=this._$AH,i=t===$&&s!==$||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==$&&(s===$||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}},O=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){v(this,t);}},ht={M:P,P:A,A:U,C:1,L:Y,R:B,D:J,V:v,I:x,H:y,N:R,U:I,B:L,F:O},st=N.litHtmlPolyfillSupport;st?.(E,x),(N.litHtmlVersions??(N.litHtmlVersions=[])).push("3.3.2");var tt=(n,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let o=e?.renderBefore??null;s._$litPart$=i=new x(t.insertBefore(b(),o),o,void 0,e??{});}return i._$AI(n),i};var M=globalThis,H=class extends chunkNPP5B5PV_cjs.d{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var e;let t=super.createRenderRoot();return (e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=tt(e,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return f}};H._$litElement$=true,H.finalized=true,M.litElementHydrateSupport?.({LitElement:H});var it=M.litElementPolyfillSupport;it?.({LitElement:H});(M.litElementVersions??(M.litElementVersions=[])).push("4.2.2");/*! Bundled license information:
|
|
4
|
+
|
|
5
|
+
lit-html/lit-html.js:
|
|
6
|
+
lit-element/lit-element.js:
|
|
7
|
+
(**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2017 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*)
|
|
12
|
+
|
|
13
|
+
lit-html/is-server.js:
|
|
14
|
+
(**
|
|
15
|
+
* @license
|
|
16
|
+
* Copyright 2022 Google LLC
|
|
17
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
|
+
*)
|
|
19
|
+
*/exports.a=nt;exports.b=ot;exports.c=rt;exports.d=f;exports.e=$;exports.f=ht;exports.g=H;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';var chunkQQDH35OW_cjs=require('./chunk-QQDH35OW.cjs'),chunkK5Z7QHTN_cjs=require('./chunk-K5Z7QHTN.cjs'),chunkFAONFKQ2_cjs=require('./chunk-FAONFKQ2.cjs'),chunkDL4BV5IH_cjs=require('./chunk-DL4BV5IH.cjs'),chunk2E5GLLOS_cjs=require('./chunk-2E5GLLOS.cjs'),chunkNPP5B5PV_cjs=require('./chunk-NPP5B5PV.cjs'),chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');var o,k,C,S,n=class extends chunk2E5GLLOS_cjs.g{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 chunkK5Z7QHTN_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,chunk2E5GLLOS_cjs.a`
|
|
2
|
+
<div>
|
|
3
|
+
${this.captions.segments.map((e,r)=>chunk2E5GLLOS_cjs.a`
|
|
4
|
+
<p
|
|
5
|
+
data-segment-id="segment-${r}"
|
|
6
|
+
style=${chunkQQDH35OW_cjs.a(this.segmentStyle())}
|
|
7
|
+
@click=${this.clickable?chunkJHSFSCC2_cjs.g(this,o,S):chunk2E5GLLOS_cjs.e}
|
|
8
|
+
part=${chunkFAONFKQ2_cjs.a(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)=>chunk2E5GLLOS_cjs.a`
|
|
13
|
+
<span
|
|
14
|
+
data-word-id="word-${r}-${s}"
|
|
15
|
+
style=${chunkQQDH35OW_cjs.a(this.wordStyle(this.inRange(i)))}
|
|
16
|
+
part=${chunkFAONFKQ2_cjs.a(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
|
+
`)}):chunk2E5GLLOS_cjs.e}};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=chunkNPP5B5PV_cjs.a`
|
|
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
|
+
`,chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],n.prototype,"embed",1),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],n.prototype,"highlight",2),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],n.prototype,"clickable",1),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],n.prototype,"autoscroll",1),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.b()],n.prototype,"currentTime",2),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_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;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';var chunk474VILDO_cjs=require('./chunk-474VILDO.cjs'),chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');var M=(t="")=>t.split(/\s+/),A=(t="")=>{let[e,n,o]=t.split(":"),i=o?decodeURIComponent(o):void 0;return {kind:e==="cc"?chunk474VILDO_cjs.g.CAPTIONS:chunk474VILDO_cjs.g.SUBTITLES,language:n,label:i}},T=(t="",e={})=>M(t).map(n=>{let o=A(n);return {...e,...o}}),k=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?A(e):e):typeof t=="string"?T(t):[t]:[],y=({kind:t,label:e,language:n}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${n}:${encodeURIComponent(e)}`:n,h=(t=[])=>Array.prototype.map.call(t,y).join(" "),U=(t,e)=>n=>n[t]===e,I=t=>{let e=Object.entries(t).map(([n,o])=>U(n,o));return n=>e.every(o=>o(n))},Z=(t,e=[],n=[])=>{let o=k(n).map(I),i=d=>o.some(x=>x(d));Array.from(e).filter(i).forEach(d=>{d.mode=t;});},$=(t,e=()=>true)=>{if(!t?.textTracks)return [];let n=typeof e=="function"?e:I(e);return Array.from(t.textTracks).filter(n)},L=t=>{var e;return !!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(chunk474VILDO_cjs.d.MEDIA_SUBTITLES_SHOWING)};var B=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
2
|
+
<path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
|
|
3
|
+
</svg>`,D=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
4
|
+
<path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
|
|
5
|
+
</svg>`;function H(){return `
|
|
6
|
+
<style>
|
|
7
|
+
:host([data-captions-enabled="true"]) slot[name=off] {
|
|
8
|
+
display: none !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
:host(:not([data-captions-enabled="true"])) slot[name=on] {
|
|
13
|
+
display: none !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host([aria-expanded="true"]) slot[name=tooltip] {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
20
|
+
|
|
21
|
+
<slot name="icon">
|
|
22
|
+
<slot name="on">${B}</slot>
|
|
23
|
+
<slot name="off">${D}</slot>
|
|
24
|
+
</slot>
|
|
25
|
+
`}function w(){return chunk474VILDO_cjs.n("Captions")}var E=t=>{t.setAttribute("data-captions-enabled",L(t).toString());},v=t=>{t.setAttribute("aria-label",chunk474VILDO_cjs.n("closed captions"));},r=class extends chunk474VILDO_cjs.M{static get observedAttributes(){return [...super.observedAttributes,chunk474VILDO_cjs.d.MEDIA_SUBTITLES_LIST,chunk474VILDO_cjs.d.MEDIA_SUBTITLES_SHOWING,chunk474VILDO_cjs.d.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),v(this),E(this);}attributeChangedCallback(e,n,o){super.attributeChangedCallback(e,n,o),e===chunk474VILDO_cjs.d.MEDIA_SUBTITLES_SHOWING?E(this):e===chunk474VILDO_cjs.d.MEDIA_LANG&&v(this);}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=chunk474VILDO_cjs.r(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return C(this,chunk474VILDO_cjs.d.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){_(this,chunk474VILDO_cjs.d.MEDIA_SUBTITLES_LIST,e);}get mediaSubtitlesShowing(){return C(this,chunk474VILDO_cjs.d.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){_(this,chunk474VILDO_cjs.d.MEDIA_SUBTITLES_SHOWING,e);}};r.getSlotTemplateHTML=H;r.getTooltipContentHTML=w;var C=(t,e)=>{let n=t.getAttribute(e);return n?T(n):[]},_=(t,e,n)=>{if(!n?.length){t.removeAttribute(e);return}let o=h(n);t.getAttribute(e)!==o&&t.setAttribute(e,o);};chunk474VILDO_cjs.o.customElements.get("media-captions-menu-button")||chunk474VILDO_cjs.o.customElements.define("media-captions-menu-button",r);var l,b,u=class extends r{constructor(){super(...arguments);chunkJHSFSCC2_cjs.e(this,l);}connectedCallback(){super.connectedCallback(),chunkJHSFSCC2_cjs.g(this,l,b).call(this);}attributeChangedCallback(n,o,i){super.attributeChangedCallback(n,o,i),chunkJHSFSCC2_cjs.g(this,l,b).call(this);}};l=new WeakSet,b=function(){this.setAttribute("aria-label",chunk474VILDO_cjs.n("Captions"));},u.getTooltipContentHTML=()=>chunk474VILDO_cjs.n("Captions");chunk474VILDO_cjs.o.customElements.get("mave-captions-menu-button")||chunk474VILDO_cjs.o.customElements.define("mave-captions-menu-button",u);exports.a=T;exports.b=k;exports.c=y;exports.d=h;exports.e=Z;exports.f=$;exports.g=L;exports.h=u;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
var St={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",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"},p={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},dt={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_LOOP:"mediaLoop",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"},Y=Object.entries(dt),b=Y.reduce((e,[t,o])=>(e[t]=o.toLowerCase(),e),{}),ct={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},z=Y.reduce((e,[t,o])=>(e[t]=o.toLowerCase(),e),{...ct});Object.entries(z).reduce((e,[t,o])=>{let i=b[t];return i&&(e[o]=i),e},{userinactivechange:"userinactive"});var yt=Object.entries(b).reduce((e,[t,o])=>{let i=z[t];return i&&(e[o]=i),e},{userinactive:"userinactivechange"}),Lt={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Rt={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var wt={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},Dt={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},kt={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var Ct={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"};var j={"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",Loop:"Loop","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 J,x={en:j},U=((J=globalThis.navigator)==null?void 0:J.language)||"en",Nt=e=>{U=e;};var ut=e=>{var t,o,i;let[r]=U.split("-");return ((t=x[U])==null?void 0:t[e])||((o=x[r])==null?void 0:o[e])||((i=x.en)==null?void 0:i[e])||e},Pt=(e,t={})=>ut(e).replace(/\{(\w+)\}/g,(o,i)=>i in t?String(t[i]):`{${i}}`);var M=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return true}},y=class extends M{},L=class extends y{constructor(){super(...arguments),this.role=null;}},N=class{observe(){}unobserve(){}disconnect(){}},Z={createElement:function(){return new I.HTMLElement},createElementNS:function(){return new I.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(e){return false}},I={ResizeObserver:N,document:Z,Node:y,Element:L,HTMLElement:class extends L{constructor(){super(...arguments),this.innerHTML="";}get content(){return new I.DocumentFragment}},DocumentFragment:class extends M{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(e){return null},setItem(e,t){},removeItem(e){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return ""}},matchMedia(e){return {matches:false,media:e}},DOMParser:class{parseFromString(t,o){return {body:{textContent:t}}}}},tt="global"in globalThis&&globalThis?.global===globalThis||typeof window>"u"||typeof window.customElements>"u",et=Object.keys(I).every(e=>e in globalThis),s=tt&&!et?I:globalThis,Qt=tt&&!et?Z:globalThis.document;function R(e){let t={};for(let o of e)t[o.name]=o.value;return t}function ot(e){var t;return (t=pt(e))!=null?t:w(e,"media-controller")}function pt(e){var t;let{MEDIA_CONTROLLER:o}=p,i=e.getAttribute(o);if(i)return (t=P(e))==null?void 0:t.getElementById(i)}var Ft=(e,t,o=".value")=>{let i=e.querySelector(o);i&&(i.textContent=t);},mt=(e,t)=>{let o=`slot[name="${t}"]`,i=e.shadowRoot.querySelector(o);return i?i.children:[]},Kt=(e,t)=>mt(e,t)[0],Et=(e,t)=>!e||!t?false:e?.contains(t)?true:Et(e,t.getRootNode().host),w=(e,t)=>{if(!e)return null;let o=e.closest(t);return o||w(e.getRootNode().host,t)};function ht(e=document){var t;let o=e?.activeElement;return o?(t=ht(o.shadowRoot))!=null?t:o:null}function P(e){var t;let o=(t=e?.getRootNode)==null?void 0:t.call(e);return o instanceof ShadowRoot||o instanceof Document?o:null}function it(e,{depth:t=3,checkOpacity:o=true,checkVisibilityCSS:i=true}={}){if(e.checkVisibility)return e.checkVisibility({checkOpacity:o,checkVisibilityCSS:i});let r=e;for(;r&&t>0;){let a=getComputedStyle(r);if(o&&a.opacity==="0"||i&&a.visibility==="hidden"||a.display==="none")return false;r=r.parentElement,t--;}return true}function $t(e,t,o,i){let r=i.x-o.x,a=i.y-o.y,l=r*r+a*a;if(l===0)return 0;let u=((e-o.x)*r+(t-o.y)*a)/l;return Math.max(0,Math.min(1,u))}function rt(e,t){let o=_t(e,i=>i===t);return o||vt(e,t)}function _t(e,t){var o,i;let r;for(r of (o=e.querySelectorAll("style:not([media])"))!=null?o:[]){let a;try{a=(i=r.sheet)==null?void 0:i.cssRules;}catch{continue}for(let l of a??[])if(t(l.selectorText))return l}}function vt(e,t){var o,i;let r=(o=e.querySelectorAll("style:not([media])"))!=null?o:[],a=r?.[r.length-1];return a?.sheet?(a?.sheet.insertRule(`${t}{}`,a.sheet.cssRules.length),(i=a.sheet.cssRules)==null?void 0:i[a.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function ft(e,t,o=Number.NaN){let i=e.getAttribute(t);return i!=null?+i:o}function Xt(e,t,o){let i=+o;if(o==null||Number.isNaN(i)){e.hasAttribute(t)&&e.removeAttribute(t);return}ft(e,t,void 0)!==i&&e.setAttribute(t,`${i}`);}function D(e,t){return e.hasAttribute(t)}function H(e,t,o){if(o==null){e.hasAttribute(t)&&e.removeAttribute(t);return}D(e,t)!=o&&e.toggleAttribute(t,o);}function h(e,t,o=null){var i;return (i=e.getAttribute(t))!=null?i:o}function _(e,t,o){if(o==null){e.hasAttribute(t)&&e.removeAttribute(t);return}let i=`${o}`;h(e,t,void 0)!==i&&e.setAttribute(t,i);}var v={PLACEMENT:"placement",BOUNDS:"bounds"};function At(e){return `
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
--_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
|
|
5
|
+
--_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));
|
|
6
|
+
--_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);
|
|
7
|
+
--_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);
|
|
8
|
+
--_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));
|
|
9
|
+
position: relative;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
display: var(--media-tooltip-display, inline-flex);
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
z-index: var(--media-tooltip-z-index, 1);
|
|
16
|
+
background: var(--_tooltip-background);
|
|
17
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
18
|
+
font: var(--media-font,
|
|
19
|
+
var(--media-font-weight, 400)
|
|
20
|
+
var(--media-font-size, 13px) /
|
|
21
|
+
var(--media-text-content-height, var(--media-control-height, 18px))
|
|
22
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
23
|
+
padding: var(--media-tooltip-padding, .35em .7em);
|
|
24
|
+
border: var(--media-tooltip-border, none);
|
|
25
|
+
border-radius: var(--media-tooltip-border-radius, 5px);
|
|
26
|
+
filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));
|
|
27
|
+
white-space: var(--media-tooltip-white-space, nowrap);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([hidden]) {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
img, svg {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#arrow {
|
|
39
|
+
position: absolute;
|
|
40
|
+
width: 0px;
|
|
41
|
+
height: 0px;
|
|
42
|
+
border-style: solid;
|
|
43
|
+
display: var(--media-tooltip-arrow-display, block);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host(:not([placement])),
|
|
47
|
+
:host([placement="top"]) {
|
|
48
|
+
position: absolute;
|
|
49
|
+
bottom: calc(100% + var(--media-tooltip-distance, 12px));
|
|
50
|
+
left: 50%;
|
|
51
|
+
transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
|
|
52
|
+
}
|
|
53
|
+
:host(:not([placement])) #arrow,
|
|
54
|
+
:host([placement="top"]) #arrow {
|
|
55
|
+
top: 100%;
|
|
56
|
+
left: 50%;
|
|
57
|
+
border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);
|
|
58
|
+
border-color: var(--_tooltip-arrow-background) transparent transparent transparent;
|
|
59
|
+
transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([placement="right"]) {
|
|
63
|
+
position: absolute;
|
|
64
|
+
left: calc(100% + var(--media-tooltip-distance, 12px));
|
|
65
|
+
top: 50%;
|
|
66
|
+
transform: translate(0, -50%);
|
|
67
|
+
}
|
|
68
|
+
:host([placement="right"]) #arrow {
|
|
69
|
+
top: 50%;
|
|
70
|
+
right: 100%;
|
|
71
|
+
border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;
|
|
72
|
+
border-color: transparent var(--_tooltip-arrow-background) transparent transparent;
|
|
73
|
+
transform: translate(0, -50%);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([placement="bottom"]) {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: calc(100% + var(--media-tooltip-distance, 12px));
|
|
79
|
+
left: 50%;
|
|
80
|
+
transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
|
|
81
|
+
}
|
|
82
|
+
:host([placement="bottom"]) #arrow {
|
|
83
|
+
bottom: 100%;
|
|
84
|
+
left: 50%;
|
|
85
|
+
border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);
|
|
86
|
+
border-color: transparent transparent var(--_tooltip-arrow-background) transparent;
|
|
87
|
+
transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host([placement="left"]) {
|
|
91
|
+
position: absolute;
|
|
92
|
+
right: calc(100% + var(--media-tooltip-distance, 12px));
|
|
93
|
+
top: 50%;
|
|
94
|
+
transform: translate(0, -50%);
|
|
95
|
+
}
|
|
96
|
+
:host([placement="left"]) #arrow {
|
|
97
|
+
top: 50%;
|
|
98
|
+
left: 100%;
|
|
99
|
+
border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);
|
|
100
|
+
border-color: transparent transparent transparent var(--_tooltip-arrow-background);
|
|
101
|
+
transform: translate(0, -50%);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host([placement="none"]) #arrow {
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
107
|
+
</style>
|
|
108
|
+
<slot></slot>
|
|
109
|
+
<div id="arrow"></div>
|
|
110
|
+
`}var f=class extends s.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var t;if(!it(this,{checkOpacity:false,checkVisibilityCSS:false}))return;let o=this.placement;if(o==="left"||o==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}let i=getComputedStyle(this),r=(t=w(this,"#"+this.bounds))!=null?t:ot(this);if(!r)return;let{x:a,width:l}=r.getBoundingClientRect(),{x:u,width:S}=this.getBoundingClientRect(),st=u+S,lt=a+l,W=i.getPropertyValue("--media-tooltip-offset-x"),G=W?parseFloat(W.replace("px","")):0,F=i.getPropertyValue("--media-tooltip-container-margin"),K=F?parseFloat(F.replace("px","")):0,$=u-a+G-K,X=st-lt+G+K;if($<0){this.style.setProperty("--media-tooltip-offset-x",`${$}px`);return}if(X>0){this.style.setProperty("--media-tooltip-offset-x",`${X}px`);return}this.style.removeProperty("--media-tooltip-offset-x");},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let t=R(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t);}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let t=this.placement;delete this.placement,this.placement=t;}}static get observedAttributes(){return [v.PLACEMENT,v.BOUNDS]}get placement(){return h(this,v.PLACEMENT)}set placement(t){_(this,v.PLACEMENT,t);}get bounds(){return h(this,v.BOUNDS)}set bounds(t){_(this,v.BOUNDS,t);}};f.shadowRootOptions={mode:"open"};f.getTemplateHTML=At;s.customElements.get("media-tooltip")||s.customElements.define("media-tooltip",f);var B=f;var q=(e,t,o)=>{if(!t.has(e))throw TypeError("Cannot "+o)},n=(e,t,o)=>(q(e,t,"read from private field"),o?o.call(e):t.get(e)),A=(e,t,o)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,o);},k=(e,t,o,i)=>(q(e,t,"write to private field"),t.set(e,o),o),gt=(e,t,o)=>(q(e,t,"access private method"),o),d,T,E,g,C,V,at,m={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function Tt(e,t={}){return `
|
|
111
|
+
<style>
|
|
112
|
+
:host {
|
|
113
|
+
position: relative;
|
|
114
|
+
font: var(--media-font,
|
|
115
|
+
var(--media-font-weight, bold)
|
|
116
|
+
var(--media-font-size, 14px) /
|
|
117
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
118
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
119
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
120
|
+
background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
121
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px));
|
|
122
|
+
justify-content: var(--media-button-justify-content, center);
|
|
123
|
+
display: inline-flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
vertical-align: middle;
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
transition: background .15s linear;
|
|
128
|
+
pointer-events: auto;
|
|
129
|
+
cursor: var(--media-cursor, pointer);
|
|
130
|
+
-webkit-tap-highlight-color: transparent;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
:host(:focus-visible) {
|
|
135
|
+
box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
136
|
+
outline: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:host(:where(:focus)) {
|
|
140
|
+
box-shadow: none;
|
|
141
|
+
outline: 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host(:hover) {
|
|
145
|
+
background: var(--media-control-hover-background, rgba(50 50 70 / .7));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
149
|
+
width: var(--media-button-icon-width);
|
|
150
|
+
height: var(--media-button-icon-height, var(--media-control-height, 24px));
|
|
151
|
+
transform: var(--media-button-icon-transform);
|
|
152
|
+
transition: var(--media-button-icon-transition);
|
|
153
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
154
|
+
vertical-align: middle;
|
|
155
|
+
max-width: 100%;
|
|
156
|
+
max-height: 100%;
|
|
157
|
+
min-width: 100%;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
media-tooltip {
|
|
161
|
+
|
|
162
|
+
max-width: 0;
|
|
163
|
+
overflow-x: clip;
|
|
164
|
+
opacity: 0;
|
|
165
|
+
transition: opacity .3s, max-width 0s 9s;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:host(:hover) media-tooltip,
|
|
169
|
+
:host(:focus-visible) media-tooltip {
|
|
170
|
+
max-width: 100vw;
|
|
171
|
+
opacity: 1;
|
|
172
|
+
transition: opacity .3s;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host([notooltip]) slot[name="tooltip"] {
|
|
176
|
+
display: none;
|
|
177
|
+
}
|
|
178
|
+
</style>
|
|
179
|
+
|
|
180
|
+
${this.getSlotTemplateHTML(e,t)}
|
|
181
|
+
|
|
182
|
+
<slot name="tooltip">
|
|
183
|
+
<media-tooltip part="tooltip" aria-hidden="true">
|
|
184
|
+
<template shadowrootmode="${B.shadowRootOptions.mode}">
|
|
185
|
+
${B.getTemplateHTML({})}
|
|
186
|
+
</template>
|
|
187
|
+
<slot name="tooltip-content">
|
|
188
|
+
${this.getTooltipContentHTML(e)}
|
|
189
|
+
</slot>
|
|
190
|
+
</media-tooltip>
|
|
191
|
+
</slot>
|
|
192
|
+
`}function bt(e,t){return `
|
|
193
|
+
<slot></slot>
|
|
194
|
+
`}function It(){return ""}var c=class extends s.HTMLElement{constructor(){if(super(),A(this,V),A(this,d,void 0),this.preventClick=false,this.tooltipEl=null,A(this,T,t=>{this.preventClick||this.handleClick(t),setTimeout(n(this,E),0);}),A(this,E,()=>{var t,o;(o=(t=this.tooltipEl)==null?void 0:t.updateXOffset)==null||o.call(t);}),A(this,g,t=>{let{key:o}=t;if(!this.keysUsed.includes(o)){this.removeEventListener("keyup",n(this,g));return}this.preventClick||this.handleClick(t);}),A(this,C,t=>{let{metaKey:o,altKey:i,key:r}=t;if(o||i||!this.keysUsed.includes(r)){this.removeEventListener("keyup",n(this,g));return}this.addEventListener("keyup",n(this,g),{once:true});}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let t=R(this.attributes),o=this.constructor.getTemplateHTML(t);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(o):this.shadowRoot.innerHTML=o;}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip");}static get observedAttributes(){return ["disabled",m.TOOLTIP_PLACEMENT,p.MEDIA_CONTROLLER,b.MEDIA_LANG]}enable(){this.addEventListener("click",n(this,T)),this.addEventListener("keydown",n(this,C)),this.tabIndex=0;}disable(){this.removeEventListener("click",n(this,T)),this.removeEventListener("keydown",n(this,C)),this.removeEventListener("keyup",n(this,g)),this.tabIndex=-1;}attributeChangedCallback(t,o,i){var r,a,l,u,S;t===p.MEDIA_CONTROLLER?(o&&((a=(r=n(this,d))==null?void 0:r.unassociateElement)==null||a.call(r,this),k(this,d,null)),i&&this.isConnected&&(k(this,d,(l=this.getRootNode())==null?void 0:l.getElementById(i)),(S=(u=n(this,d))==null?void 0:u.associateElement)==null||S.call(u,this))):t==="disabled"&&i!==o?i==null?this.enable():this.disable():t===m.TOOLTIP_PLACEMENT&&this.tooltipEl&&i!==o?this.tooltipEl.placement=i:t===b.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),n(this,E).call(this);}connectedCallback(){var t,o,i;let{style:r}=rt(this.shadowRoot,":host");r.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(p.MEDIA_CONTROLLER);a&&(k(this,d,(t=this.getRootNode())==null?void 0:t.getElementById(a)),(i=(o=n(this,d))==null?void 0:o.associateElement)==null||i.call(o,this)),s.customElements.whenDefined("media-tooltip").then(()=>gt(this,V,at).call(this));}disconnectedCallback(){var t,o;this.disable(),(o=(t=n(this,d))==null?void 0:t.unassociateElement)==null||o.call(t,this),k(this,d,null),this.removeEventListener("mouseenter",n(this,E)),this.removeEventListener("focus",n(this,E)),this.removeEventListener("click",n(this,T));}get keysUsed(){return ["Enter"," "]}get tooltipPlacement(){return h(this,m.TOOLTIP_PLACEMENT)}set tooltipPlacement(t){_(this,m.TOOLTIP_PLACEMENT,t);}get mediaController(){return h(this,p.MEDIA_CONTROLLER)}set mediaController(t){_(this,p.MEDIA_CONTROLLER,t);}get disabled(){return D(this,m.DISABLED)}set disabled(t){H(this,m.DISABLED,t);}get noTooltip(){return D(this,m.NO_TOOLTIP)}set noTooltip(t){H(this,m.NO_TOOLTIP,t);}handleClick(t){}};d=new WeakMap;T=new WeakMap;E=new WeakMap;g=new WeakMap;C=new WeakMap;V=new WeakSet;at=function(){this.addEventListener("mouseenter",n(this,E)),this.addEventListener("focus",n(this,E)),this.addEventListener("click",n(this,T));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e);};c.shadowRootOptions={mode:"open"};c.getTemplateHTML=Tt;c.getSlotTemplateHTML=bt;c.getTooltipContentHTML=It;s.customElements.get("media-chrome-button")||s.customElements.define("media-chrome-button",c);var O=class extends Event{constructor({action:t="auto",relatedTarget:o,...i}){super("invoke",i),this.action=t,this.relatedTarget=o;}},nt=class extends Event{constructor({newState:t,oldState:o,...i}){super("toggle",i),this.newState=t,this.oldState=o;}};var Q=class extends c{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu");}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(t){this.setAttribute("invoketarget",`${t}`);}get invokeTargetElement(){var t;return this.invokeTarget?(t=P(this))==null?void 0:t.querySelector(`#${this.invokeTarget}`):null}handleClick(){var t;(t=this.invokeTargetElement)==null||t.dispatchEvent(new O({relatedTarget:this}));}};s.customElements.get("media-chrome-menu-button")||s.customElements.define("media-chrome-menu-button",Q);export{$t as A,rt as B,vt as C,ft as D,Xt as E,D as F,H as G,h as H,_ as I,c as J,O as K,nt as L,Q as M,St as a,p as b,dt as c,b as d,z as e,yt as f,Lt as g,Rt as h,wt as i,Dt as j,kt as k,Ct as l,Nt as m,Pt as n,s as o,Qt as p,R as q,ot as r,pt as s,Ft as t,Kt as u,Et as v,w,ht as x,P as y,it as z};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
'use strict';var St={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",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"},p={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},dt={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_LOOP:"mediaLoop",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"},Y=Object.entries(dt),b=Y.reduce((e,[t,o])=>(e[t]=o.toLowerCase(),e),{}),ct={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},z=Y.reduce((e,[t,o])=>(e[t]=o.toLowerCase(),e),{...ct});Object.entries(z).reduce((e,[t,o])=>{let i=b[t];return i&&(e[o]=i),e},{userinactivechange:"userinactive"});var yt=Object.entries(b).reduce((e,[t,o])=>{let i=z[t];return i&&(e[o]=i),e},{userinactive:"userinactivechange"}),Lt={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Rt={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var wt={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},Dt={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},kt={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var Ct={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"};var j={"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",Loop:"Loop","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 J,x={en:j},U=((J=globalThis.navigator)==null?void 0:J.language)||"en",Nt=e=>{U=e;};var ut=e=>{var t,o,i;let[r]=U.split("-");return ((t=x[U])==null?void 0:t[e])||((o=x[r])==null?void 0:o[e])||((i=x.en)==null?void 0:i[e])||e},Pt=(e,t={})=>ut(e).replace(/\{(\w+)\}/g,(o,i)=>i in t?String(t[i]):`{${i}}`);var M=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return true}},y=class extends M{},L=class extends y{constructor(){super(...arguments),this.role=null;}},N=class{observe(){}unobserve(){}disconnect(){}},Z={createElement:function(){return new I.HTMLElement},createElementNS:function(){return new I.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(e){return false}},I={ResizeObserver:N,document:Z,Node:y,Element:L,HTMLElement:class extends L{constructor(){super(...arguments),this.innerHTML="";}get content(){return new I.DocumentFragment}},DocumentFragment:class extends M{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(e){return null},setItem(e,t){},removeItem(e){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return ""}},matchMedia(e){return {matches:false,media:e}},DOMParser:class{parseFromString(t,o){return {body:{textContent:t}}}}},tt="global"in globalThis&&globalThis?.global===globalThis||typeof window>"u"||typeof window.customElements>"u",et=Object.keys(I).every(e=>e in globalThis),s=tt&&!et?I:globalThis,Qt=tt&&!et?Z:globalThis.document;function R(e){let t={};for(let o of e)t[o.name]=o.value;return t}function ot(e){var t;return (t=pt(e))!=null?t:w(e,"media-controller")}function pt(e){var t;let{MEDIA_CONTROLLER:o}=p,i=e.getAttribute(o);if(i)return (t=P(e))==null?void 0:t.getElementById(i)}var Ft=(e,t,o=".value")=>{let i=e.querySelector(o);i&&(i.textContent=t);},mt=(e,t)=>{let o=`slot[name="${t}"]`,i=e.shadowRoot.querySelector(o);return i?i.children:[]},Kt=(e,t)=>mt(e,t)[0],Et=(e,t)=>!e||!t?false:e?.contains(t)?true:Et(e,t.getRootNode().host),w=(e,t)=>{if(!e)return null;let o=e.closest(t);return o||w(e.getRootNode().host,t)};function ht(e=document){var t;let o=e?.activeElement;return o?(t=ht(o.shadowRoot))!=null?t:o:null}function P(e){var t;let o=(t=e?.getRootNode)==null?void 0:t.call(e);return o instanceof ShadowRoot||o instanceof Document?o:null}function it(e,{depth:t=3,checkOpacity:o=true,checkVisibilityCSS:i=true}={}){if(e.checkVisibility)return e.checkVisibility({checkOpacity:o,checkVisibilityCSS:i});let r=e;for(;r&&t>0;){let a=getComputedStyle(r);if(o&&a.opacity==="0"||i&&a.visibility==="hidden"||a.display==="none")return false;r=r.parentElement,t--;}return true}function $t(e,t,o,i){let r=i.x-o.x,a=i.y-o.y,l=r*r+a*a;if(l===0)return 0;let u=((e-o.x)*r+(t-o.y)*a)/l;return Math.max(0,Math.min(1,u))}function rt(e,t){let o=_t(e,i=>i===t);return o||vt(e,t)}function _t(e,t){var o,i;let r;for(r of (o=e.querySelectorAll("style:not([media])"))!=null?o:[]){let a;try{a=(i=r.sheet)==null?void 0:i.cssRules;}catch{continue}for(let l of a??[])if(t(l.selectorText))return l}}function vt(e,t){var o,i;let r=(o=e.querySelectorAll("style:not([media])"))!=null?o:[],a=r?.[r.length-1];return a?.sheet?(a?.sheet.insertRule(`${t}{}`,a.sheet.cssRules.length),(i=a.sheet.cssRules)==null?void 0:i[a.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function ft(e,t,o=Number.NaN){let i=e.getAttribute(t);return i!=null?+i:o}function Xt(e,t,o){let i=+o;if(o==null||Number.isNaN(i)){e.hasAttribute(t)&&e.removeAttribute(t);return}ft(e,t,void 0)!==i&&e.setAttribute(t,`${i}`);}function D(e,t){return e.hasAttribute(t)}function H(e,t,o){if(o==null){e.hasAttribute(t)&&e.removeAttribute(t);return}D(e,t)!=o&&e.toggleAttribute(t,o);}function h(e,t,o=null){var i;return (i=e.getAttribute(t))!=null?i:o}function _(e,t,o){if(o==null){e.hasAttribute(t)&&e.removeAttribute(t);return}let i=`${o}`;h(e,t,void 0)!==i&&e.setAttribute(t,i);}var v={PLACEMENT:"placement",BOUNDS:"bounds"};function At(e){return `
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
--_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
|
|
5
|
+
--_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));
|
|
6
|
+
--_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);
|
|
7
|
+
--_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);
|
|
8
|
+
--_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));
|
|
9
|
+
position: relative;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
display: var(--media-tooltip-display, inline-flex);
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
z-index: var(--media-tooltip-z-index, 1);
|
|
16
|
+
background: var(--_tooltip-background);
|
|
17
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
18
|
+
font: var(--media-font,
|
|
19
|
+
var(--media-font-weight, 400)
|
|
20
|
+
var(--media-font-size, 13px) /
|
|
21
|
+
var(--media-text-content-height, var(--media-control-height, 18px))
|
|
22
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
23
|
+
padding: var(--media-tooltip-padding, .35em .7em);
|
|
24
|
+
border: var(--media-tooltip-border, none);
|
|
25
|
+
border-radius: var(--media-tooltip-border-radius, 5px);
|
|
26
|
+
filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));
|
|
27
|
+
white-space: var(--media-tooltip-white-space, nowrap);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([hidden]) {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
img, svg {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#arrow {
|
|
39
|
+
position: absolute;
|
|
40
|
+
width: 0px;
|
|
41
|
+
height: 0px;
|
|
42
|
+
border-style: solid;
|
|
43
|
+
display: var(--media-tooltip-arrow-display, block);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host(:not([placement])),
|
|
47
|
+
:host([placement="top"]) {
|
|
48
|
+
position: absolute;
|
|
49
|
+
bottom: calc(100% + var(--media-tooltip-distance, 12px));
|
|
50
|
+
left: 50%;
|
|
51
|
+
transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
|
|
52
|
+
}
|
|
53
|
+
:host(:not([placement])) #arrow,
|
|
54
|
+
:host([placement="top"]) #arrow {
|
|
55
|
+
top: 100%;
|
|
56
|
+
left: 50%;
|
|
57
|
+
border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);
|
|
58
|
+
border-color: var(--_tooltip-arrow-background) transparent transparent transparent;
|
|
59
|
+
transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([placement="right"]) {
|
|
63
|
+
position: absolute;
|
|
64
|
+
left: calc(100% + var(--media-tooltip-distance, 12px));
|
|
65
|
+
top: 50%;
|
|
66
|
+
transform: translate(0, -50%);
|
|
67
|
+
}
|
|
68
|
+
:host([placement="right"]) #arrow {
|
|
69
|
+
top: 50%;
|
|
70
|
+
right: 100%;
|
|
71
|
+
border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;
|
|
72
|
+
border-color: transparent var(--_tooltip-arrow-background) transparent transparent;
|
|
73
|
+
transform: translate(0, -50%);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([placement="bottom"]) {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: calc(100% + var(--media-tooltip-distance, 12px));
|
|
79
|
+
left: 50%;
|
|
80
|
+
transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
|
|
81
|
+
}
|
|
82
|
+
:host([placement="bottom"]) #arrow {
|
|
83
|
+
bottom: 100%;
|
|
84
|
+
left: 50%;
|
|
85
|
+
border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);
|
|
86
|
+
border-color: transparent transparent var(--_tooltip-arrow-background) transparent;
|
|
87
|
+
transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host([placement="left"]) {
|
|
91
|
+
position: absolute;
|
|
92
|
+
right: calc(100% + var(--media-tooltip-distance, 12px));
|
|
93
|
+
top: 50%;
|
|
94
|
+
transform: translate(0, -50%);
|
|
95
|
+
}
|
|
96
|
+
:host([placement="left"]) #arrow {
|
|
97
|
+
top: 50%;
|
|
98
|
+
left: 100%;
|
|
99
|
+
border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);
|
|
100
|
+
border-color: transparent transparent transparent var(--_tooltip-arrow-background);
|
|
101
|
+
transform: translate(0, -50%);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host([placement="none"]) #arrow {
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
107
|
+
</style>
|
|
108
|
+
<slot></slot>
|
|
109
|
+
<div id="arrow"></div>
|
|
110
|
+
`}var f=class extends s.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var t;if(!it(this,{checkOpacity:false,checkVisibilityCSS:false}))return;let o=this.placement;if(o==="left"||o==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}let i=getComputedStyle(this),r=(t=w(this,"#"+this.bounds))!=null?t:ot(this);if(!r)return;let{x:a,width:l}=r.getBoundingClientRect(),{x:u,width:S}=this.getBoundingClientRect(),st=u+S,lt=a+l,W=i.getPropertyValue("--media-tooltip-offset-x"),G=W?parseFloat(W.replace("px","")):0,F=i.getPropertyValue("--media-tooltip-container-margin"),K=F?parseFloat(F.replace("px","")):0,$=u-a+G-K,X=st-lt+G+K;if($<0){this.style.setProperty("--media-tooltip-offset-x",`${$}px`);return}if(X>0){this.style.setProperty("--media-tooltip-offset-x",`${X}px`);return}this.style.removeProperty("--media-tooltip-offset-x");},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let t=R(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t);}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let t=this.placement;delete this.placement,this.placement=t;}}static get observedAttributes(){return [v.PLACEMENT,v.BOUNDS]}get placement(){return h(this,v.PLACEMENT)}set placement(t){_(this,v.PLACEMENT,t);}get bounds(){return h(this,v.BOUNDS)}set bounds(t){_(this,v.BOUNDS,t);}};f.shadowRootOptions={mode:"open"};f.getTemplateHTML=At;s.customElements.get("media-tooltip")||s.customElements.define("media-tooltip",f);var B=f;var q=(e,t,o)=>{if(!t.has(e))throw TypeError("Cannot "+o)},n=(e,t,o)=>(q(e,t,"read from private field"),o?o.call(e):t.get(e)),A=(e,t,o)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,o);},k=(e,t,o,i)=>(q(e,t,"write to private field"),t.set(e,o),o),gt=(e,t,o)=>(q(e,t,"access private method"),o),d,T,E,g,C,V,at,m={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function Tt(e,t={}){return `
|
|
111
|
+
<style>
|
|
112
|
+
:host {
|
|
113
|
+
position: relative;
|
|
114
|
+
font: var(--media-font,
|
|
115
|
+
var(--media-font-weight, bold)
|
|
116
|
+
var(--media-font-size, 14px) /
|
|
117
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
118
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
119
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
120
|
+
background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
121
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px));
|
|
122
|
+
justify-content: var(--media-button-justify-content, center);
|
|
123
|
+
display: inline-flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
vertical-align: middle;
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
transition: background .15s linear;
|
|
128
|
+
pointer-events: auto;
|
|
129
|
+
cursor: var(--media-cursor, pointer);
|
|
130
|
+
-webkit-tap-highlight-color: transparent;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
:host(:focus-visible) {
|
|
135
|
+
box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
136
|
+
outline: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:host(:where(:focus)) {
|
|
140
|
+
box-shadow: none;
|
|
141
|
+
outline: 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host(:hover) {
|
|
145
|
+
background: var(--media-control-hover-background, rgba(50 50 70 / .7));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
149
|
+
width: var(--media-button-icon-width);
|
|
150
|
+
height: var(--media-button-icon-height, var(--media-control-height, 24px));
|
|
151
|
+
transform: var(--media-button-icon-transform);
|
|
152
|
+
transition: var(--media-button-icon-transition);
|
|
153
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
154
|
+
vertical-align: middle;
|
|
155
|
+
max-width: 100%;
|
|
156
|
+
max-height: 100%;
|
|
157
|
+
min-width: 100%;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
media-tooltip {
|
|
161
|
+
|
|
162
|
+
max-width: 0;
|
|
163
|
+
overflow-x: clip;
|
|
164
|
+
opacity: 0;
|
|
165
|
+
transition: opacity .3s, max-width 0s 9s;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:host(:hover) media-tooltip,
|
|
169
|
+
:host(:focus-visible) media-tooltip {
|
|
170
|
+
max-width: 100vw;
|
|
171
|
+
opacity: 1;
|
|
172
|
+
transition: opacity .3s;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host([notooltip]) slot[name="tooltip"] {
|
|
176
|
+
display: none;
|
|
177
|
+
}
|
|
178
|
+
</style>
|
|
179
|
+
|
|
180
|
+
${this.getSlotTemplateHTML(e,t)}
|
|
181
|
+
|
|
182
|
+
<slot name="tooltip">
|
|
183
|
+
<media-tooltip part="tooltip" aria-hidden="true">
|
|
184
|
+
<template shadowrootmode="${B.shadowRootOptions.mode}">
|
|
185
|
+
${B.getTemplateHTML({})}
|
|
186
|
+
</template>
|
|
187
|
+
<slot name="tooltip-content">
|
|
188
|
+
${this.getTooltipContentHTML(e)}
|
|
189
|
+
</slot>
|
|
190
|
+
</media-tooltip>
|
|
191
|
+
</slot>
|
|
192
|
+
`}function bt(e,t){return `
|
|
193
|
+
<slot></slot>
|
|
194
|
+
`}function It(){return ""}var c=class extends s.HTMLElement{constructor(){if(super(),A(this,V),A(this,d,void 0),this.preventClick=false,this.tooltipEl=null,A(this,T,t=>{this.preventClick||this.handleClick(t),setTimeout(n(this,E),0);}),A(this,E,()=>{var t,o;(o=(t=this.tooltipEl)==null?void 0:t.updateXOffset)==null||o.call(t);}),A(this,g,t=>{let{key:o}=t;if(!this.keysUsed.includes(o)){this.removeEventListener("keyup",n(this,g));return}this.preventClick||this.handleClick(t);}),A(this,C,t=>{let{metaKey:o,altKey:i,key:r}=t;if(o||i||!this.keysUsed.includes(r)){this.removeEventListener("keyup",n(this,g));return}this.addEventListener("keyup",n(this,g),{once:true});}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let t=R(this.attributes),o=this.constructor.getTemplateHTML(t);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(o):this.shadowRoot.innerHTML=o;}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip");}static get observedAttributes(){return ["disabled",m.TOOLTIP_PLACEMENT,p.MEDIA_CONTROLLER,b.MEDIA_LANG]}enable(){this.addEventListener("click",n(this,T)),this.addEventListener("keydown",n(this,C)),this.tabIndex=0;}disable(){this.removeEventListener("click",n(this,T)),this.removeEventListener("keydown",n(this,C)),this.removeEventListener("keyup",n(this,g)),this.tabIndex=-1;}attributeChangedCallback(t,o,i){var r,a,l,u,S;t===p.MEDIA_CONTROLLER?(o&&((a=(r=n(this,d))==null?void 0:r.unassociateElement)==null||a.call(r,this),k(this,d,null)),i&&this.isConnected&&(k(this,d,(l=this.getRootNode())==null?void 0:l.getElementById(i)),(S=(u=n(this,d))==null?void 0:u.associateElement)==null||S.call(u,this))):t==="disabled"&&i!==o?i==null?this.enable():this.disable():t===m.TOOLTIP_PLACEMENT&&this.tooltipEl&&i!==o?this.tooltipEl.placement=i:t===b.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),n(this,E).call(this);}connectedCallback(){var t,o,i;let{style:r}=rt(this.shadowRoot,":host");r.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(p.MEDIA_CONTROLLER);a&&(k(this,d,(t=this.getRootNode())==null?void 0:t.getElementById(a)),(i=(o=n(this,d))==null?void 0:o.associateElement)==null||i.call(o,this)),s.customElements.whenDefined("media-tooltip").then(()=>gt(this,V,at).call(this));}disconnectedCallback(){var t,o;this.disable(),(o=(t=n(this,d))==null?void 0:t.unassociateElement)==null||o.call(t,this),k(this,d,null),this.removeEventListener("mouseenter",n(this,E)),this.removeEventListener("focus",n(this,E)),this.removeEventListener("click",n(this,T));}get keysUsed(){return ["Enter"," "]}get tooltipPlacement(){return h(this,m.TOOLTIP_PLACEMENT)}set tooltipPlacement(t){_(this,m.TOOLTIP_PLACEMENT,t);}get mediaController(){return h(this,p.MEDIA_CONTROLLER)}set mediaController(t){_(this,p.MEDIA_CONTROLLER,t);}get disabled(){return D(this,m.DISABLED)}set disabled(t){H(this,m.DISABLED,t);}get noTooltip(){return D(this,m.NO_TOOLTIP)}set noTooltip(t){H(this,m.NO_TOOLTIP,t);}handleClick(t){}};d=new WeakMap;T=new WeakMap;E=new WeakMap;g=new WeakMap;C=new WeakMap;V=new WeakSet;at=function(){this.addEventListener("mouseenter",n(this,E)),this.addEventListener("focus",n(this,E)),this.addEventListener("click",n(this,T));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e);};c.shadowRootOptions={mode:"open"};c.getTemplateHTML=Tt;c.getSlotTemplateHTML=bt;c.getTooltipContentHTML=It;s.customElements.get("media-chrome-button")||s.customElements.define("media-chrome-button",c);var O=class extends Event{constructor({action:t="auto",relatedTarget:o,...i}){super("invoke",i),this.action=t,this.relatedTarget=o;}},nt=class extends Event{constructor({newState:t,oldState:o,...i}){super("toggle",i),this.newState=t,this.oldState=o;}};var Q=class extends c{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu");}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(t){this.setAttribute("invoketarget",`${t}`);}get invokeTargetElement(){var t;return this.invokeTarget?(t=P(this))==null?void 0:t.querySelector(`#${this.invokeTarget}`):null}handleClick(){var t;(t=this.invokeTargetElement)==null||t.dispatchEvent(new O({relatedTarget:this}));}};s.customElements.get("media-chrome-menu-button")||s.customElements.define("media-chrome-menu-button",Q);exports.A=$t;exports.B=rt;exports.C=vt;exports.D=ft;exports.E=Xt;exports.F=D;exports.G=H;exports.H=h;exports.I=_;exports.J=c;exports.K=O;exports.L=nt;exports.M=Q;exports.a=St;exports.b=p;exports.c=dt;exports.d=b;exports.e=z;exports.f=yt;exports.g=Lt;exports.h=Rt;exports.i=wt;exports.j=Dt;exports.k=kt;exports.l=Ct;exports.m=Nt;exports.n=Pt;exports.o=s;exports.p=Qt;exports.q=R;exports.r=ot;exports.s=pt;exports.t=Ft;exports.u=Kt;exports.v=Et;exports.w=w;exports.x=ht;exports.y=P;exports.z=it;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {d}from'./chunk-YPCQNE3R.js';var N=globalThis,W=n=>n,w=N.trustedTypes,z=w?w.createPolicy("lit-html",{createHTML:n=>n}):void 0,P="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,U="?"+A,et=`<${U}>`,g=document,b=()=>g.createComment(""),T=n=>n===null||typeof n!="object"&&typeof n!="function",k=Array.isArray,J=n=>k(n)||typeof n?.[Symbol.iterator]=="function",D=`[
|
|
2
|
+
\f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,K=/>/g,u=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,q=/"/g,Q=/^(?:script|style|textarea|title)$/i,V=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),nt=V(1),ot=V(2),rt=V(3),f=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),G=new WeakMap,m=g.createTreeWalker(g,129);function X(n,t){if(!k(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return z!==void 0?z.createHTML(t):t}var Y=(n,t)=>{let e=n.length-1,s=[],i,o=t===2?"<svg>":t===3?"<math>":"",r=C;for(let d=0;d<e;d++){let h=n[d],a,c,l=-1,_=0;for(;_<h.length&&(r.lastIndex=_,c=r.exec(h),c!==null);)_=r.lastIndex,r===C?c[1]==="!--"?r=F:c[1]!==void 0?r=K:c[2]!==void 0?(Q.test(c[2])&&(i=RegExp("</"+c[2],"g")),r=u):c[3]!==void 0&&(r=u):r===u?c[0]===">"?(r=i??C,l=-1):c[1]===void 0?l=-2:(l=r.lastIndex-c[2].length,a=c[1],r=c[3]===void 0?u:c[3]==='"'?q:Z):r===q||r===Z?r=u:r===F||r===K?r=C:(r=u,i=void 0);let p=r===u&&n[d+1].startsWith("/>")?" ":"";o+=r===C?h+et:l>=0?(s.push(a),h.slice(0,l)+P+h.slice(l)+A+p):h+A+(l===-2?d:p);}return [X(n,o+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},E=class n{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0,d=t.length-1,h=this.parts,[a,c]=Y(t,e);if(this.el=n.createElement(a,s),m.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes);}for(;(i=m.nextNode())!==null&&h.length<d;){if(i.nodeType===1){if(i.hasAttributes())for(let l of i.getAttributeNames())if(l.endsWith(P)){let _=c[r++],p=i.getAttribute(l).split(A),S=/([.?@])?(.*)/.exec(_);h.push({type:1,index:o,name:S[2],strings:p,ctor:S[1]==="."?L:S[1]==="?"?R:S[1]==="@"?I:y}),i.removeAttribute(l);}else l.startsWith(A)&&(h.push({type:6,index:o}),i.removeAttribute(l));if(Q.test(i.tagName)){let l=i.textContent.split(A),_=l.length-1;if(_>0){i.textContent=w?w.emptyScript:"";for(let p=0;p<_;p++)i.append(l[p],b()),m.nextNode(),h.push({type:2,index:++o});i.append(l[_],b());}}}else if(i.nodeType===8)if(i.data===U)h.push({type:2,index:o});else {let l=-1;for(;(l=i.data.indexOf(A,l+1))!==-1;)h.push({type:7,index:o}),l+=A.length-1;}o++;}}static createElement(t,e){let s=g.createElement("template");return s.innerHTML=t,s}};function v(n,t,e=n,s){if(t===f)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,o=T(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(false),o===void 0?i=void 0:(i=new o(n),i._$AT(n,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=v(n,i._$AS(n,t.values),i,s)),t}var B=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??g).importNode(e,true);m.currentNode=i;let o=m.nextNode(),r=0,d=0,h=s[0];for(;h!==void 0;){if(r===h.index){let a;h.type===2?a=new x(o,o.nextSibling,this,t):h.type===1?a=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(a=new O(o,this,t)),this._$AV.push(a),h=s[++d];}r!==h?.index&&(o=m.nextNode(),r++);}return m.currentNode=g,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++;}},x=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=$,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=v(this,t,e),T(t)?t===$||t==null||t===""?(this._$AH!==$&&this._$AR(),this._$AH=$):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):J(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==$&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(g.createTextNode(t)),this._$AH=t;}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=E.createElement(X(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else {let o=new B(i,this),r=o.u(this.options);o.p(e),this.T(r),this._$AH=o;}}_$AC(t){let e=G.get(t.strings);return e===void 0&&G.set(t.strings,e=new E(t)),e}k(t){k(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let o of t)i===e.length?e.push(s=new n(this.O(b()),this.O(b()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i);}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let s=W(t).nextSibling;W(t).remove(),t=s;}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t));}},y=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=$,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=$;}_$AI(t,e=this,s,i){let o=this.strings,r=false;if(o===void 0)t=v(this,t,e,0),r=!T(t)||t!==this._$AH&&t!==f,r&&(this._$AH=t);else {let d=t,h,a;for(t=o[0],h=0;h<o.length-1;h++)a=v(this,d[s+h],e,h),a===f&&(a=this._$AH[h]),r||(r=!T(a)||a!==this._$AH[h]),a===$?t=$:t!==$&&(t+=(a??"")+o[h+1]),this._$AH[h]=a;}r&&!i&&this.j(t);}j(t){t===$?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}},L=class extends y{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===$?void 0:t;}},R=class extends y{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==$);}},I=class extends y{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5;}_$AI(t,e=this){if((t=v(this,t,e,0)??$)===f)return;let s=this._$AH,i=t===$&&s!==$||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==$&&(s===$||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}},O=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){v(this,t);}},ht={M:P,P:A,A:U,C:1,L:Y,R:B,D:J,V:v,I:x,H:y,N:R,U:I,B:L,F:O},st=N.litHtmlPolyfillSupport;st?.(E,x),(N.litHtmlVersions??(N.litHtmlVersions=[])).push("3.3.2");var tt=(n,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let o=e?.renderBefore??null;s._$litPart$=i=new x(t.insertBefore(b(),o),o,void 0,e??{});}return i._$AI(n),i};var M=globalThis,H=class extends d{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var e;let t=super.createRenderRoot();return (e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=tt(e,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return f}};H._$litElement$=true,H.finalized=true,M.litElementHydrateSupport?.({LitElement:H});var it=M.litElementPolyfillSupport;it?.({LitElement:H});(M.litElementVersions??(M.litElementVersions=[])).push("4.2.2");/*! Bundled license information:
|
|
4
|
+
|
|
5
|
+
lit-html/lit-html.js:
|
|
6
|
+
lit-element/lit-element.js:
|
|
7
|
+
(**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2017 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*)
|
|
12
|
+
|
|
13
|
+
lit-html/is-server.js:
|
|
14
|
+
(**
|
|
15
|
+
* @license
|
|
16
|
+
* Copyright 2022 Google LLC
|
|
17
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
|
+
*)
|
|
19
|
+
*/export{nt as a,ot as b,rt as c,f as d,$ as e,ht as f,H as g};
|