@mux/mux-player 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +260 -324
- package/dist/index.mjs +57 -149
- package/dist/mux-player.js +264 -328
- package/dist/mux-player.mjs +264 -328
- package/dist/themes/classic/index.cjs.js +39 -56
- package/dist/themes/classic/index.js +39 -56
- package/dist/themes/classic/index.mjs +39 -56
- package/dist/themes/gerwig/index.cjs.js +39 -56
- package/dist/themes/gerwig/index.js +39 -56
- package/dist/themes/gerwig/index.mjs +39 -56
- package/dist/themes/microvideo/index.cjs.js +1164 -900
- package/dist/themes/microvideo/index.js +1164 -900
- package/dist/themes/microvideo/index.mjs +1164 -900
- package/dist/themes/minimal/index.cjs.js +1162 -898
- package/dist/themes/minimal/index.js +1162 -898
- package/dist/themes/minimal/index.mjs +1162 -898
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/errors.d.ts +2 -0
- package/dist/types/index.d.ts +8 -2
- package/dist/types/template.d.ts +0 -1
- package/dist/types/video-api.d.ts +1 -2
- package/dist/types-ts3.4/errors.d.ts +2 -0
- package/dist/types-ts3.4/index.d.ts +7 -2
- package/dist/types-ts3.4/template.d.ts +0 -1
- package/dist/types-ts3.4/video-api.d.ts +1 -2
- package/package.json +11 -14
- package/LICENSE +0 -9
- package/dist/types/dialog.d.ts +0 -6
- package/dist/types/media-chrome/dialog.d.ts +0 -13
- package/dist/types-ts3.4/dialog.d.ts +0 -6
- package/dist/types-ts3.4/media-chrome/dialog.d.ts +0 -13
|
@@ -22,7 +22,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
22
22
|
// src/themes/microvideo/index.ts
|
|
23
23
|
var microvideo_exports = {};
|
|
24
24
|
|
|
25
|
-
// ../../node_modules/
|
|
25
|
+
// ../../node_modules/media-chrome/dist/constants.js
|
|
26
26
|
var MediaUIEvents = {
|
|
27
27
|
MEDIA_PLAY_REQUEST: "mediaplayrequest",
|
|
28
28
|
MEDIA_PAUSE_REQUEST: "mediapauserequest",
|
|
@@ -56,42 +56,47 @@ var mediaThemeMicrovideo = (() => {
|
|
|
56
56
|
};
|
|
57
57
|
var MediaUIProps = {
|
|
58
58
|
MEDIA_AIRPLAY_UNAVAILABLE: "mediaAirplayUnavailable",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
MEDIA_CAST_UNAVAILABLE: "mediaCastUnavailable",
|
|
62
|
-
MEDIA_RENDITION_UNAVAILABLE: "mediaRenditionUnavailable",
|
|
59
|
+
MEDIA_AUDIO_TRACK_ENABLED: "mediaAudioTrackEnabled",
|
|
60
|
+
MEDIA_AUDIO_TRACK_LIST: "mediaAudioTrackList",
|
|
63
61
|
MEDIA_AUDIO_TRACK_UNAVAILABLE: "mediaAudioTrackUnavailable",
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
MEDIA_BUFFERED: "mediaBuffered",
|
|
63
|
+
MEDIA_CAST_UNAVAILABLE: "mediaCastUnavailable",
|
|
64
|
+
MEDIA_CHAPTERS_CUES: "mediaChaptersCues",
|
|
65
|
+
MEDIA_CURRENT_TIME: "mediaCurrentTime",
|
|
66
|
+
MEDIA_DURATION: "mediaDuration",
|
|
66
67
|
MEDIA_ENDED: "mediaEnded",
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
MEDIA_ERROR: "mediaError",
|
|
69
|
+
MEDIA_ERROR_CODE: "mediaErrorCode",
|
|
70
|
+
MEDIA_ERROR_MESSAGE: "mediaErrorMessage",
|
|
71
|
+
MEDIA_FULLSCREEN_UNAVAILABLE: "mediaFullscreenUnavailable",
|
|
72
|
+
MEDIA_HAS_PLAYED: "mediaHasPlayed",
|
|
73
|
+
MEDIA_HEIGHT: "mediaHeight",
|
|
73
74
|
MEDIA_IS_AIRPLAYING: "mediaIsAirplaying",
|
|
74
|
-
|
|
75
|
-
MEDIA_SUBTITLES_SHOWING: "mediaSubtitlesShowing",
|
|
75
|
+
MEDIA_IS_CASTING: "mediaIsCasting",
|
|
76
76
|
MEDIA_IS_FULLSCREEN: "mediaIsFullscreen",
|
|
77
|
+
MEDIA_IS_PIP: "mediaIsPip",
|
|
78
|
+
MEDIA_LOADING: "mediaLoading",
|
|
79
|
+
MEDIA_MUTED: "mediaMuted",
|
|
80
|
+
MEDIA_PAUSED: "mediaPaused",
|
|
81
|
+
MEDIA_PIP_UNAVAILABLE: "mediaPipUnavailable",
|
|
77
82
|
MEDIA_PLAYBACK_RATE: "mediaPlaybackRate",
|
|
78
|
-
MEDIA_CURRENT_TIME: "mediaCurrentTime",
|
|
79
|
-
MEDIA_DURATION: "mediaDuration",
|
|
80
|
-
MEDIA_SEEKABLE: "mediaSeekable",
|
|
81
|
-
MEDIA_PREVIEW_TIME: "mediaPreviewTime",
|
|
82
|
-
MEDIA_PREVIEW_IMAGE: "mediaPreviewImage",
|
|
83
|
-
MEDIA_PREVIEW_COORDS: "mediaPreviewCoords",
|
|
84
83
|
MEDIA_PREVIEW_CHAPTER: "mediaPreviewChapter",
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
MEDIA_PREVIEW_COORDS: "mediaPreviewCoords",
|
|
85
|
+
MEDIA_PREVIEW_IMAGE: "mediaPreviewImage",
|
|
86
|
+
MEDIA_PREVIEW_TIME: "mediaPreviewTime",
|
|
87
|
+
MEDIA_RENDITION_LIST: "mediaRenditionList",
|
|
88
|
+
MEDIA_RENDITION_SELECTED: "mediaRenditionSelected",
|
|
89
|
+
MEDIA_RENDITION_UNAVAILABLE: "mediaRenditionUnavailable",
|
|
90
|
+
MEDIA_SEEKABLE: "mediaSeekable",
|
|
87
91
|
MEDIA_STREAM_TYPE: "mediaStreamType",
|
|
92
|
+
MEDIA_SUBTITLES_LIST: "mediaSubtitlesList",
|
|
93
|
+
MEDIA_SUBTITLES_SHOWING: "mediaSubtitlesShowing",
|
|
88
94
|
MEDIA_TARGET_LIVE_WINDOW: "mediaTargetLiveWindow",
|
|
89
95
|
MEDIA_TIME_IS_LIVE: "mediaTimeIsLive",
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
MEDIA_CHAPTERS_CUES: "mediaChaptersCues"
|
|
96
|
+
MEDIA_VOLUME: "mediaVolume",
|
|
97
|
+
MEDIA_VOLUME_LEVEL: "mediaVolumeLevel",
|
|
98
|
+
MEDIA_VOLUME_UNAVAILABLE: "mediaVolumeUnavailable",
|
|
99
|
+
MEDIA_WIDTH: "mediaWidth"
|
|
95
100
|
};
|
|
96
101
|
var MediaUIPropsEntries = Object.entries(
|
|
97
102
|
MediaUIProps
|
|
@@ -171,7 +176,28 @@ var mediaThemeMicrovideo = (() => {
|
|
|
171
176
|
PICTURE_IN_PICTURE: "picture-in-picture"
|
|
172
177
|
};
|
|
173
178
|
|
|
174
|
-
// ../../node_modules/
|
|
179
|
+
// ../../node_modules/media-chrome/dist/labels/labels.js
|
|
180
|
+
var defaultErrorTitles = {
|
|
181
|
+
2: "Network Error",
|
|
182
|
+
3: "Decode Error",
|
|
183
|
+
4: "Source Not Supported",
|
|
184
|
+
5: "Encryption Error"
|
|
185
|
+
};
|
|
186
|
+
var defaultErrorMessages = {
|
|
187
|
+
2: "A network error caused the media download to fail.",
|
|
188
|
+
3: "A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.",
|
|
189
|
+
4: "An unsupported error occurred. The server or network failed, or your browser does not support this format.",
|
|
190
|
+
5: "The media is encrypted and there are no keys to decrypt it."
|
|
191
|
+
};
|
|
192
|
+
var formatError = (error) => {
|
|
193
|
+
var _a3, _b2;
|
|
194
|
+
if (error.code === 1)
|
|
195
|
+
return null;
|
|
196
|
+
return {
|
|
197
|
+
title: (_a3 = defaultErrorTitles[error.code]) != null ? _a3 : `Error ${error.code}`,
|
|
198
|
+
message: (_b2 = defaultErrorMessages[error.code]) != null ? _b2 : error.message
|
|
199
|
+
};
|
|
200
|
+
};
|
|
175
201
|
var tooltipLabels = {
|
|
176
202
|
ENTER_AIRPLAY: "Start airplay",
|
|
177
203
|
EXIT_AIRPLAY: "Stop airplay",
|
|
@@ -231,7 +257,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
231
257
|
...verbs
|
|
232
258
|
};
|
|
233
259
|
|
|
234
|
-
// ../../node_modules/
|
|
260
|
+
// ../../node_modules/media-chrome/dist/utils/utils.js
|
|
235
261
|
function stringifyRenditionList(renditions) {
|
|
236
262
|
return renditions == null ? void 0 : renditions.map(stringifyRendition).join(" ");
|
|
237
263
|
}
|
|
@@ -286,7 +312,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
286
312
|
}
|
|
287
313
|
var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
288
314
|
|
|
289
|
-
// ../../node_modules/
|
|
315
|
+
// ../../node_modules/media-chrome/dist/utils/time.js
|
|
290
316
|
var UnitLabels = [
|
|
291
317
|
{
|
|
292
318
|
singular: "hour",
|
|
@@ -364,7 +390,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
364
390
|
}
|
|
365
391
|
});
|
|
366
392
|
|
|
367
|
-
// ../../node_modules/
|
|
393
|
+
// ../../node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
368
394
|
var EventTarget = class {
|
|
369
395
|
addEventListener() {
|
|
370
396
|
}
|
|
@@ -401,12 +427,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
401
427
|
},
|
|
402
428
|
removeEventListener() {
|
|
403
429
|
},
|
|
404
|
-
|
|
405
|
-
*
|
|
406
|
-
* @param {Event} event
|
|
407
|
-
* @returns {boolean}
|
|
408
|
-
*/
|
|
409
|
-
dispatchEvent(event) {
|
|
430
|
+
dispatchEvent(_event) {
|
|
410
431
|
return false;
|
|
411
432
|
}
|
|
412
433
|
};
|
|
@@ -435,26 +456,13 @@ var mediaThemeMicrovideo = (() => {
|
|
|
435
456
|
}
|
|
436
457
|
},
|
|
437
458
|
localStorage: {
|
|
438
|
-
|
|
439
|
-
* @param {string} key
|
|
440
|
-
* @returns {string|null}
|
|
441
|
-
*/
|
|
442
|
-
getItem(key) {
|
|
459
|
+
getItem(_key) {
|
|
443
460
|
return null;
|
|
444
461
|
},
|
|
445
|
-
|
|
446
|
-
* @param {string} key
|
|
447
|
-
* @param {string} value
|
|
448
|
-
*/
|
|
449
|
-
setItem(key, value) {
|
|
462
|
+
setItem(_key, _value2) {
|
|
450
463
|
},
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* @param {string} key
|
|
454
|
-
*/
|
|
455
|
-
removeItem(key) {
|
|
464
|
+
removeItem(_key) {
|
|
456
465
|
}
|
|
457
|
-
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
458
466
|
},
|
|
459
467
|
CustomEvent: function CustomEvent2() {
|
|
460
468
|
},
|
|
@@ -466,9 +474,6 @@ var mediaThemeMicrovideo = (() => {
|
|
|
466
474
|
return "";
|
|
467
475
|
}
|
|
468
476
|
},
|
|
469
|
-
/**
|
|
470
|
-
* @param {string} media
|
|
471
|
-
*/
|
|
472
477
|
matchMedia(media) {
|
|
473
478
|
return {
|
|
474
479
|
matches: false,
|
|
@@ -481,7 +486,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
481
486
|
var GlobalThis = isServer && !isShimmed ? globalThisShim : globalThis;
|
|
482
487
|
var Document2 = isServer && !isShimmed ? documentShim : globalThis.document;
|
|
483
488
|
|
|
484
|
-
// ../../node_modules/
|
|
489
|
+
// ../../node_modules/media-chrome/dist/utils/resize-observer.js
|
|
485
490
|
var callbacksMap = /* @__PURE__ */ new WeakMap();
|
|
486
491
|
var getCallbacks = (element) => {
|
|
487
492
|
let callbacks = callbacksMap.get(element);
|
|
@@ -510,7 +515,14 @@ var mediaThemeMicrovideo = (() => {
|
|
|
510
515
|
}
|
|
511
516
|
}
|
|
512
517
|
|
|
513
|
-
// ../../node_modules/
|
|
518
|
+
// ../../node_modules/media-chrome/dist/utils/element-utils.js
|
|
519
|
+
function namedNodeMapToObject(namedNodeMap) {
|
|
520
|
+
const obj = {};
|
|
521
|
+
for (const attr of namedNodeMap) {
|
|
522
|
+
obj[attr.name] = attr.value;
|
|
523
|
+
}
|
|
524
|
+
return obj;
|
|
525
|
+
}
|
|
514
526
|
function getMediaController(host) {
|
|
515
527
|
var _a3;
|
|
516
528
|
return (_a3 = getAttributeMediaController(host)) != null ? _a3 : closestComposedNode(host, "media-controller");
|
|
@@ -575,17 +587,17 @@ var mediaThemeMicrovideo = (() => {
|
|
|
575
587
|
}
|
|
576
588
|
return null;
|
|
577
589
|
}
|
|
578
|
-
function isElementVisible(element, depth = 3) {
|
|
590
|
+
function isElementVisible(element, { depth = 3, checkOpacity = true, checkVisibilityCSS = true } = {}) {
|
|
579
591
|
if (element.checkVisibility) {
|
|
580
592
|
return element.checkVisibility({
|
|
581
|
-
checkOpacity
|
|
582
|
-
checkVisibilityCSS
|
|
593
|
+
checkOpacity,
|
|
594
|
+
checkVisibilityCSS
|
|
583
595
|
});
|
|
584
596
|
}
|
|
585
597
|
let el = element;
|
|
586
598
|
while (el && depth > 0) {
|
|
587
599
|
const style = getComputedStyle(el);
|
|
588
|
-
if (style.opacity === "0" || style.visibility === "hidden" || style.display === "none") {
|
|
600
|
+
if (checkOpacity && style.opacity === "0" || checkVisibilityCSS && style.visibility === "hidden" || style.display === "none") {
|
|
589
601
|
return false;
|
|
590
602
|
}
|
|
591
603
|
el = el.parentElement;
|
|
@@ -612,12 +624,12 @@ var mediaThemeMicrovideo = (() => {
|
|
|
612
624
|
return insertCSSRule(styleParent, selectorText);
|
|
613
625
|
}
|
|
614
626
|
function getCSSRule(styleParent, predicate) {
|
|
615
|
-
var _a3;
|
|
627
|
+
var _a3, _b2;
|
|
616
628
|
let style;
|
|
617
|
-
for (style of styleParent.querySelectorAll("style")) {
|
|
629
|
+
for (style of (_a3 = styleParent.querySelectorAll("style:not([media])")) != null ? _a3 : []) {
|
|
618
630
|
let cssRules;
|
|
619
631
|
try {
|
|
620
|
-
cssRules = (
|
|
632
|
+
cssRules = (_b2 = style.sheet) == null ? void 0 : _b2.cssRules;
|
|
621
633
|
} catch {
|
|
622
634
|
continue;
|
|
623
635
|
}
|
|
@@ -629,7 +641,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
629
641
|
}
|
|
630
642
|
function insertCSSRule(styleParent, selectorText) {
|
|
631
643
|
var _a3, _b2;
|
|
632
|
-
const styles = (_a3 = styleParent.querySelectorAll("style")) != null ? _a3 : [];
|
|
644
|
+
const styles = (_a3 = styleParent.querySelectorAll("style:not([media])")) != null ? _a3 : [];
|
|
633
645
|
const style = styles == null ? void 0 : styles[styles.length - 1];
|
|
634
646
|
if (!(style == null ? void 0 : style.sheet)) {
|
|
635
647
|
console.warn(
|
|
@@ -699,7 +711,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
699
711
|
el.setAttribute(attrName, nextValue);
|
|
700
712
|
}
|
|
701
713
|
|
|
702
|
-
// ../../node_modules/
|
|
714
|
+
// ../../node_modules/media-chrome/dist/media-gesture-receiver.js
|
|
703
715
|
var __accessCheck = (obj, member, msg) => {
|
|
704
716
|
if (!member.has(obj))
|
|
705
717
|
throw TypeError("Cannot " + msg);
|
|
@@ -859,7 +871,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
859
871
|
);
|
|
860
872
|
}
|
|
861
873
|
|
|
862
|
-
// ../../node_modules/
|
|
874
|
+
// ../../node_modules/media-chrome/dist/media-container.js
|
|
863
875
|
var __accessCheck2 = (obj, member, msg) => {
|
|
864
876
|
if (!member.has(obj))
|
|
865
877
|
throw TypeError("Cannot " + msg);
|
|
@@ -975,7 +987,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
975
987
|
* we'll want to add here any slotted elements that shouldn't get pointer-events by default when slotted
|
|
976
988
|
*/
|
|
977
989
|
""}
|
|
978
|
-
::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([hidden])) {
|
|
990
|
+
::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) {
|
|
979
991
|
pointer-events: auto;
|
|
980
992
|
}
|
|
981
993
|
|
|
@@ -1022,14 +1034,14 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1022
1034
|
|
|
1023
1035
|
${/* Only add these if auto hide is not disabled */
|
|
1024
1036
|
""}
|
|
1025
|
-
::slotted(:not([slot=media]):not([slot=poster]):not([${Attributes.NO_AUTOHIDE}]):not([hidden])) {
|
|
1037
|
+
::slotted(:not([slot=media]):not([slot=poster]):not([${Attributes.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) {
|
|
1026
1038
|
opacity: 1;
|
|
1027
1039
|
transition: opacity 0.25s;
|
|
1028
1040
|
}
|
|
1029
1041
|
|
|
1030
1042
|
${/* Hide controls when inactive, not paused, not audio and auto hide not disabled */
|
|
1031
1043
|
""}
|
|
1032
|
-
:host([${Attributes.USER_INACTIVE}]:not([${MediaUIAttributes.MEDIA_PAUSED}]):not([${MediaUIAttributes.MEDIA_IS_AIRPLAYING}]):not([${MediaUIAttributes.MEDIA_IS_CASTING}]):not([${Attributes.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${Attributes.NO_AUTOHIDE}])) {
|
|
1044
|
+
:host([${Attributes.USER_INACTIVE}]:not([${MediaUIAttributes.MEDIA_PAUSED}]):not([${MediaUIAttributes.MEDIA_IS_AIRPLAYING}]):not([${MediaUIAttributes.MEDIA_IS_CASTING}]):not([${Attributes.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${Attributes.NO_AUTOHIDE}]):not([role=dialog])) {
|
|
1033
1045
|
opacity: 0;
|
|
1034
1046
|
transition: opacity 1s;
|
|
1035
1047
|
}
|
|
@@ -1048,12 +1060,14 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1048
1060
|
display: none;
|
|
1049
1061
|
}
|
|
1050
1062
|
|
|
1051
|
-
::slotted([role=
|
|
1052
|
-
|
|
1063
|
+
::slotted([role=dialog]) {
|
|
1064
|
+
width: 100%;
|
|
1065
|
+
height: 100%;
|
|
1066
|
+
align-self: center;
|
|
1053
1067
|
}
|
|
1054
1068
|
|
|
1055
|
-
::slotted([role=
|
|
1056
|
-
align-self:
|
|
1069
|
+
::slotted([role=menu]) {
|
|
1070
|
+
align-self: end;
|
|
1057
1071
|
}
|
|
1058
1072
|
</style>
|
|
1059
1073
|
|
|
@@ -1070,6 +1084,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1070
1084
|
""}
|
|
1071
1085
|
<slot part="bottom chrome"></slot>
|
|
1072
1086
|
</span>
|
|
1087
|
+
<slot name="dialog" part="layer dialog-layer"></slot>
|
|
1073
1088
|
`;
|
|
1074
1089
|
var MEDIA_UI_ATTRIBUTE_NAMES = Object.values(MediaUIAttributes);
|
|
1075
1090
|
var defaultBreakpoints = "sm:384 md:576 lg:768 xl:960";
|
|
@@ -1203,36 +1218,27 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1203
1218
|
(name) => ![
|
|
1204
1219
|
MediaUIAttributes.MEDIA_RENDITION_LIST,
|
|
1205
1220
|
MediaUIAttributes.MEDIA_AUDIO_TRACK_LIST,
|
|
1206
|
-
MediaUIAttributes.MEDIA_CHAPTERS_CUES
|
|
1221
|
+
MediaUIAttributes.MEDIA_CHAPTERS_CUES,
|
|
1222
|
+
MediaUIAttributes.MEDIA_WIDTH,
|
|
1223
|
+
MediaUIAttributes.MEDIA_HEIGHT,
|
|
1224
|
+
MediaUIAttributes.MEDIA_ERROR,
|
|
1225
|
+
MediaUIAttributes.MEDIA_ERROR_MESSAGE
|
|
1207
1226
|
].includes(name)
|
|
1208
1227
|
);
|
|
1209
1228
|
}
|
|
1210
1229
|
// Could share this code with media-chrome-html-element instead
|
|
1211
|
-
attributeChangedCallback(attrName,
|
|
1230
|
+
attributeChangedCallback(attrName, _oldValue, newValue) {
|
|
1212
1231
|
if (attrName.toLowerCase() == Attributes.AUTOHIDE) {
|
|
1213
1232
|
this.autohide = newValue;
|
|
1214
1233
|
}
|
|
1215
1234
|
}
|
|
1216
1235
|
// First direct child with slot=media, or null
|
|
1217
|
-
/**
|
|
1218
|
-
* @returns {HTMLVideoElement &
|
|
1219
|
-
* {buffered,
|
|
1220
|
-
* webkitEnterFullscreen?,
|
|
1221
|
-
* webkitExitFullscreen?,
|
|
1222
|
-
* requestCast?,
|
|
1223
|
-
* webkitShowPlaybackTargetPicker?,
|
|
1224
|
-
* videoTracks?,
|
|
1225
|
-
* }}
|
|
1226
|
-
*/
|
|
1227
1236
|
get media() {
|
|
1228
1237
|
let media = this.querySelector(":scope > [slot=media]");
|
|
1229
1238
|
if ((media == null ? void 0 : media.nodeName) == "SLOT")
|
|
1230
1239
|
media = media.assignedElements({ flatten: true })[0];
|
|
1231
1240
|
return media;
|
|
1232
1241
|
}
|
|
1233
|
-
/**
|
|
1234
|
-
* @param {HTMLMediaElement} media
|
|
1235
|
-
*/
|
|
1236
1242
|
async handleMediaUpdated(media) {
|
|
1237
1243
|
if (!media)
|
|
1238
1244
|
return;
|
|
@@ -1266,15 +1272,10 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1266
1272
|
}
|
|
1267
1273
|
/**
|
|
1268
1274
|
* @abstract
|
|
1269
|
-
* @param {HTMLMediaElement} media
|
|
1270
1275
|
*/
|
|
1271
|
-
mediaSetCallback(
|
|
1276
|
+
mediaSetCallback(_media) {
|
|
1272
1277
|
}
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* @param {HTMLMediaElement} media
|
|
1276
|
-
*/
|
|
1277
|
-
mediaUnsetCallback(media) {
|
|
1278
|
+
mediaUnsetCallback(_media) {
|
|
1278
1279
|
__privateSet2(this, _currentMedia, null);
|
|
1279
1280
|
}
|
|
1280
1281
|
handleEvent(event) {
|
|
@@ -1381,7 +1382,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1381
1382
|
GlobalThis.customElements.define("media-container", MediaContainer);
|
|
1382
1383
|
}
|
|
1383
1384
|
|
|
1384
|
-
// ../../node_modules/
|
|
1385
|
+
// ../../node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
1385
1386
|
var __accessCheck3 = (obj, member, msg) => {
|
|
1386
1387
|
if (!member.has(obj))
|
|
1387
1388
|
throw TypeError("Cannot " + msg);
|
|
@@ -1494,7 +1495,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1494
1495
|
return __privateGet3(this, _tokenSet).size ? __privateGet3(this, _tokenSet) : __privateGet3(this, _defaultSet);
|
|
1495
1496
|
};
|
|
1496
1497
|
|
|
1497
|
-
// ../../node_modules/
|
|
1498
|
+
// ../../node_modules/media-chrome/dist/utils/captions.js
|
|
1498
1499
|
var splitTextTracksStr = (textTracksStr = "") => textTracksStr.split(/\s+/);
|
|
1499
1500
|
var parseTextTrackStr = (textTrackStr = "") => {
|
|
1500
1501
|
const [kind, language, encodedLabel] = textTrackStr.split(":");
|
|
@@ -1568,7 +1569,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1568
1569
|
return showingSubtitles;
|
|
1569
1570
|
};
|
|
1570
1571
|
|
|
1571
|
-
// ../../node_modules/
|
|
1572
|
+
// ../../node_modules/media-chrome/dist/utils/fullscreen-api.js
|
|
1572
1573
|
var enterFullscreen = (stateOwners) => {
|
|
1573
1574
|
var _a3;
|
|
1574
1575
|
const { media, fullscreenElement } = stateOwners;
|
|
@@ -1641,7 +1642,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1641
1642
|
return !!(documentElement == null ? void 0 : documentElement[fullscreenEnabledKey]) || media && "webkitSupportsFullscreen" in media;
|
|
1642
1643
|
};
|
|
1643
1644
|
|
|
1644
|
-
// ../../node_modules/
|
|
1645
|
+
// ../../node_modules/media-chrome/dist/utils/platform-tests.js
|
|
1645
1646
|
var testMediaEl;
|
|
1646
1647
|
var getTestMediaEl = () => {
|
|
1647
1648
|
var _a3, _b2;
|
|
@@ -1655,7 +1656,25 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1655
1656
|
return false;
|
|
1656
1657
|
const prevVolume = mediaEl.volume;
|
|
1657
1658
|
mediaEl.volume = prevVolume / 2 + 0.1;
|
|
1658
|
-
|
|
1659
|
+
const abortController = new AbortController();
|
|
1660
|
+
const volumeSupported2 = await Promise.race([
|
|
1661
|
+
dispatchedVolumeChange(mediaEl, abortController.signal),
|
|
1662
|
+
volumeChanged(mediaEl, prevVolume)
|
|
1663
|
+
]);
|
|
1664
|
+
abortController.abort();
|
|
1665
|
+
return volumeSupported2;
|
|
1666
|
+
};
|
|
1667
|
+
var dispatchedVolumeChange = (mediaEl, signal) => {
|
|
1668
|
+
return new Promise((resolve) => {
|
|
1669
|
+
mediaEl.addEventListener("volumechange", () => resolve(true), { signal });
|
|
1670
|
+
});
|
|
1671
|
+
};
|
|
1672
|
+
var volumeChanged = async (mediaEl, prevVolume) => {
|
|
1673
|
+
for (let i = 0; i < 10; i++) {
|
|
1674
|
+
if (mediaEl.volume === prevVolume)
|
|
1675
|
+
return false;
|
|
1676
|
+
await delay(10);
|
|
1677
|
+
}
|
|
1659
1678
|
return mediaEl.volume !== prevVolume;
|
|
1660
1679
|
};
|
|
1661
1680
|
var isSafari = /.*Version\/.*Safari\/.*/.test(
|
|
@@ -1674,7 +1693,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1674
1693
|
var airplaySupported = !!GlobalThis.WebKitPlaybackTargetAvailabilityEvent;
|
|
1675
1694
|
var castSupported = !!GlobalThis.chrome;
|
|
1676
1695
|
|
|
1677
|
-
// ../../node_modules/
|
|
1696
|
+
// ../../node_modules/media-chrome/dist/media-store/util.js
|
|
1678
1697
|
var getSubtitleTracks = (stateOwners) => {
|
|
1679
1698
|
return getTextTracksList(stateOwners.media, (textTrack) => {
|
|
1680
1699
|
return [TextTrackKinds.SUBTITLES, TextTrackKinds.CAPTIONS].includes(
|
|
@@ -1732,6 +1751,8 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1732
1751
|
var areValuesEq = (x, y) => {
|
|
1733
1752
|
if (x === y)
|
|
1734
1753
|
return true;
|
|
1754
|
+
if (x == null || y == null)
|
|
1755
|
+
return false;
|
|
1735
1756
|
if (typeof x !== typeof y)
|
|
1736
1757
|
return false;
|
|
1737
1758
|
if (typeof x === "number" && Number.isNaN(x) && Number.isNaN(y))
|
|
@@ -1757,7 +1778,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1757
1778
|
return xs.every((x, i) => areValuesEq(x, ys[i]));
|
|
1758
1779
|
};
|
|
1759
1780
|
|
|
1760
|
-
// ../../node_modules/
|
|
1781
|
+
// ../../node_modules/media-chrome/dist/media-store/state-mediator.js
|
|
1761
1782
|
var StreamTypeValues = Object.values(StreamTypes);
|
|
1762
1783
|
var volumeSupported;
|
|
1763
1784
|
var volumeSupportPromise = hasVolumeSupportAsync().then((supported) => {
|
|
@@ -1782,6 +1803,45 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1782
1803
|
);
|
|
1783
1804
|
};
|
|
1784
1805
|
var stateMediator = {
|
|
1806
|
+
mediaError: {
|
|
1807
|
+
get(stateOwners) {
|
|
1808
|
+
const { media } = stateOwners;
|
|
1809
|
+
return media == null ? void 0 : media.error;
|
|
1810
|
+
},
|
|
1811
|
+
mediaEvents: ["emptied", "error"]
|
|
1812
|
+
},
|
|
1813
|
+
mediaErrorCode: {
|
|
1814
|
+
get(stateOwners) {
|
|
1815
|
+
var _a3;
|
|
1816
|
+
const { media } = stateOwners;
|
|
1817
|
+
return (_a3 = media == null ? void 0 : media.error) == null ? void 0 : _a3.code;
|
|
1818
|
+
},
|
|
1819
|
+
mediaEvents: ["emptied", "error"]
|
|
1820
|
+
},
|
|
1821
|
+
mediaErrorMessage: {
|
|
1822
|
+
get(stateOwners) {
|
|
1823
|
+
var _a3, _b2;
|
|
1824
|
+
const { media } = stateOwners;
|
|
1825
|
+
return (_b2 = (_a3 = media == null ? void 0 : media.error) == null ? void 0 : _a3.message) != null ? _b2 : "";
|
|
1826
|
+
},
|
|
1827
|
+
mediaEvents: ["emptied", "error"]
|
|
1828
|
+
},
|
|
1829
|
+
mediaWidth: {
|
|
1830
|
+
get(stateOwners) {
|
|
1831
|
+
var _a3;
|
|
1832
|
+
const { media } = stateOwners;
|
|
1833
|
+
return (_a3 = media == null ? void 0 : media.videoWidth) != null ? _a3 : 0;
|
|
1834
|
+
},
|
|
1835
|
+
mediaEvents: ["resize"]
|
|
1836
|
+
},
|
|
1837
|
+
mediaHeight: {
|
|
1838
|
+
get(stateOwners) {
|
|
1839
|
+
var _a3;
|
|
1840
|
+
const { media } = stateOwners;
|
|
1841
|
+
return (_a3 = media == null ? void 0 : media.videoHeight) != null ? _a3 : 0;
|
|
1842
|
+
},
|
|
1843
|
+
mediaEvents: ["resize"]
|
|
1844
|
+
},
|
|
1785
1845
|
mediaPaused: {
|
|
1786
1846
|
get(stateOwners) {
|
|
1787
1847
|
var _a3;
|
|
@@ -1927,7 +1987,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
1927
1987
|
},
|
|
1928
1988
|
set(value, stateOwners) {
|
|
1929
1989
|
const { media } = stateOwners;
|
|
1930
|
-
if (!media ||
|
|
1990
|
+
if (!media || !isValidNumber(value))
|
|
1931
1991
|
return;
|
|
1932
1992
|
media.currentTime = value;
|
|
1933
1993
|
},
|
|
@@ -2134,15 +2194,21 @@ var mediaThemeMicrovideo = (() => {
|
|
|
2134
2194
|
textTracksEvents: ["addtrack", "removetrack", "change"],
|
|
2135
2195
|
stateOwnersUpdateHandlers: [
|
|
2136
2196
|
(handler, stateOwners) => {
|
|
2197
|
+
var _a3;
|
|
2137
2198
|
const { media } = stateOwners;
|
|
2138
2199
|
if (!media)
|
|
2139
2200
|
return;
|
|
2140
2201
|
const chaptersTrack = media.querySelector(
|
|
2141
2202
|
'track[kind="chapters"][default][src]'
|
|
2142
2203
|
);
|
|
2204
|
+
const shadowChaptersTrack = (_a3 = media.shadowRoot) == null ? void 0 : _a3.querySelector(
|
|
2205
|
+
':is(video,audio) > track[kind="chapters"][default][src]'
|
|
2206
|
+
);
|
|
2143
2207
|
chaptersTrack == null ? void 0 : chaptersTrack.addEventListener("load", handler);
|
|
2208
|
+
shadowChaptersTrack == null ? void 0 : shadowChaptersTrack.addEventListener("load", handler);
|
|
2144
2209
|
return () => {
|
|
2145
2210
|
chaptersTrack == null ? void 0 : chaptersTrack.removeEventListener("load", handler);
|
|
2211
|
+
shadowChaptersTrack == null ? void 0 : shadowChaptersTrack.removeEventListener("load", handler);
|
|
2146
2212
|
};
|
|
2147
2213
|
}
|
|
2148
2214
|
]
|
|
@@ -2516,7 +2582,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
2516
2582
|
}
|
|
2517
2583
|
};
|
|
2518
2584
|
|
|
2519
|
-
// ../../node_modules/
|
|
2585
|
+
// ../../node_modules/media-chrome/dist/media-store/request-map.js
|
|
2520
2586
|
var requestMap = {
|
|
2521
2587
|
/**
|
|
2522
2588
|
* @TODO Consider adding state to `StateMediator` for e.g. `mediaThumbnailCues` and use that for derived state here (CJP)
|
|
@@ -2621,7 +2687,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
2621
2687
|
var _a3;
|
|
2622
2688
|
const key = "mediaCurrentTime";
|
|
2623
2689
|
const value = (_a3 = stateMediator2.mediaSeekable.get(stateOwners)) == null ? void 0 : _a3[1];
|
|
2624
|
-
if (
|
|
2690
|
+
if (Number.isNaN(Number(value)))
|
|
2625
2691
|
return;
|
|
2626
2692
|
stateMediator2[key].set(value, stateOwners);
|
|
2627
2693
|
},
|
|
@@ -2706,7 +2772,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
2706
2772
|
}
|
|
2707
2773
|
};
|
|
2708
2774
|
|
|
2709
|
-
// ../../node_modules/
|
|
2775
|
+
// ../../node_modules/media-chrome/dist/media-store/media-store.js
|
|
2710
2776
|
var createMediaStore = ({
|
|
2711
2777
|
media,
|
|
2712
2778
|
fullscreenElement,
|
|
@@ -2944,7 +3010,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
2944
3010
|
// "heavy lifting" is now moved into the facade `set()`
|
|
2945
3011
|
dispatch(action) {
|
|
2946
3012
|
const { type, detail } = action;
|
|
2947
|
-
if (requestMap2[type]) {
|
|
3013
|
+
if (requestMap2[type] && state.mediaErrorCode == null) {
|
|
2948
3014
|
updateState(requestMap2[type](stateMediator2, stateOwners, action));
|
|
2949
3015
|
return;
|
|
2950
3016
|
}
|
|
@@ -2979,7 +3045,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
2979
3045
|
};
|
|
2980
3046
|
var media_store_default = createMediaStore;
|
|
2981
3047
|
|
|
2982
|
-
// ../../node_modules/
|
|
3048
|
+
// ../../node_modules/media-chrome/dist/media-controller.js
|
|
2983
3049
|
var __accessCheck4 = (obj, member, msg) => {
|
|
2984
3050
|
if (!member.has(obj))
|
|
2985
3051
|
throw TypeError("Cannot " + msg);
|
|
@@ -3434,15 +3500,15 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3434
3500
|
var MEDIA_UI_PROP_NAMES = Object.values(MediaUIProps);
|
|
3435
3501
|
var getMediaUIAttributesFrom = (child) => {
|
|
3436
3502
|
var _a3, _b2, _c, _d;
|
|
3437
|
-
let { observedAttributes } = child.constructor;
|
|
3438
|
-
if (!
|
|
3503
|
+
let { observedAttributes: observedAttributes2 } = child.constructor;
|
|
3504
|
+
if (!observedAttributes2 && ((_a3 = child.nodeName) == null ? void 0 : _a3.includes("-"))) {
|
|
3439
3505
|
GlobalThis.customElements.upgrade(child);
|
|
3440
|
-
({ observedAttributes } = child.constructor);
|
|
3506
|
+
({ observedAttributes: observedAttributes2 } = child.constructor);
|
|
3441
3507
|
}
|
|
3442
3508
|
const mediaChromeAttributesList = (_d = (_c = (_b2 = child == null ? void 0 : child.getAttribute) == null ? void 0 : _b2.call(child, MediaStateReceiverAttributes.MEDIA_CHROME_ATTRIBUTES)) == null ? void 0 : _c.split) == null ? void 0 : _d.call(_c, /\s+/);
|
|
3443
|
-
if (!Array.isArray(
|
|
3509
|
+
if (!Array.isArray(observedAttributes2 || mediaChromeAttributesList))
|
|
3444
3510
|
return [];
|
|
3445
|
-
return (
|
|
3511
|
+
return (observedAttributes2 || mediaChromeAttributesList).filter(
|
|
3446
3512
|
(attrName) => MEDIA_UI_ATTRIBUTE_NAMES2.includes(attrName)
|
|
3447
3513
|
);
|
|
3448
3514
|
};
|
|
@@ -3634,7 +3700,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3634
3700
|
GlobalThis.customElements.define("media-controller", MediaController);
|
|
3635
3701
|
}
|
|
3636
3702
|
|
|
3637
|
-
// ../../node_modules/
|
|
3703
|
+
// ../../node_modules/media-chrome/dist/media-chrome-button.js
|
|
3638
3704
|
var __accessCheck5 = (obj, member, msg) => {
|
|
3639
3705
|
if (!member.has(obj))
|
|
3640
3706
|
throw TypeError("Cannot " + msg);
|
|
@@ -3653,10 +3719,17 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3653
3719
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
3654
3720
|
return value;
|
|
3655
3721
|
};
|
|
3722
|
+
var __privateMethod3 = (obj, member, method) => {
|
|
3723
|
+
__accessCheck5(obj, member, "access private method");
|
|
3724
|
+
return method;
|
|
3725
|
+
};
|
|
3656
3726
|
var _mediaController2;
|
|
3657
3727
|
var _clickListener;
|
|
3728
|
+
var _positionTooltip;
|
|
3658
3729
|
var _keyupListener;
|
|
3659
3730
|
var _keydownListener;
|
|
3731
|
+
var _setupTooltip;
|
|
3732
|
+
var setupTooltip_fn;
|
|
3660
3733
|
var Attributes3 = {
|
|
3661
3734
|
TOOLTIP_PLACEMENT: "tooltipplacement"
|
|
3662
3735
|
};
|
|
@@ -3720,13 +3793,19 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3720
3793
|
}
|
|
3721
3794
|
|
|
3722
3795
|
media-tooltip {
|
|
3796
|
+
${/** Make sure unpositioned tooltip doesn't cause page overflow (scroll). */
|
|
3797
|
+
""}
|
|
3798
|
+
max-width: 0;
|
|
3799
|
+
overflow-x: clip;
|
|
3723
3800
|
opacity: 0;
|
|
3724
|
-
transition: opacity .3s;
|
|
3801
|
+
transition: opacity .3s, max-width 0s 9s;
|
|
3725
3802
|
}
|
|
3726
3803
|
|
|
3727
3804
|
:host(:hover) media-tooltip,
|
|
3728
3805
|
:host(:focus-visible) media-tooltip {
|
|
3806
|
+
max-width: 100vw;
|
|
3729
3807
|
opacity: 1;
|
|
3808
|
+
transition: opacity .3s;
|
|
3730
3809
|
}
|
|
3731
3810
|
|
|
3732
3811
|
:host([notooltip]) slot[name="tooltip"] {
|
|
@@ -3735,7 +3814,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3735
3814
|
</style>
|
|
3736
3815
|
|
|
3737
3816
|
<slot name="tooltip">
|
|
3738
|
-
<media-tooltip>
|
|
3817
|
+
<media-tooltip part="tooltip" aria-hidden="true">
|
|
3739
3818
|
<slot name="tooltip-content"></slot>
|
|
3740
3819
|
</media-tooltip>
|
|
3741
3820
|
</slot>
|
|
@@ -3744,6 +3823,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3744
3823
|
constructor(options = {}) {
|
|
3745
3824
|
var _a3;
|
|
3746
3825
|
super();
|
|
3826
|
+
__privateAdd5(this, _setupTooltip);
|
|
3747
3827
|
__privateAdd5(this, _mediaController2, void 0);
|
|
3748
3828
|
this.preventClick = false;
|
|
3749
3829
|
this.tooltipEl = null;
|
|
@@ -3752,7 +3832,11 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3752
3832
|
if (!this.preventClick) {
|
|
3753
3833
|
this.handleClick(e);
|
|
3754
3834
|
}
|
|
3755
|
-
setTimeout(this
|
|
3835
|
+
setTimeout(__privateGet5(this, _positionTooltip), 0);
|
|
3836
|
+
});
|
|
3837
|
+
__privateAdd5(this, _positionTooltip, () => {
|
|
3838
|
+
var _a4, _b2;
|
|
3839
|
+
(_b2 = (_a4 = this.tooltipEl) == null ? void 0 : _a4.updateXOffset) == null ? void 0 : _b2.call(_a4);
|
|
3756
3840
|
});
|
|
3757
3841
|
__privateAdd5(this, _keyupListener, (e) => {
|
|
3758
3842
|
const { key } = e;
|
|
@@ -3787,8 +3871,8 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3787
3871
|
}
|
|
3788
3872
|
this.nativeEl.appendChild(slotTemplate17.content.cloneNode(true));
|
|
3789
3873
|
this.shadowRoot.appendChild(buttonHTML);
|
|
3790
|
-
this.tooltipEl = this.shadowRoot.querySelector("media-tooltip");
|
|
3791
3874
|
}
|
|
3875
|
+
this.tooltipEl = this.shadowRoot.querySelector("media-tooltip");
|
|
3792
3876
|
}
|
|
3793
3877
|
static get observedAttributes() {
|
|
3794
3878
|
return [
|
|
@@ -3809,7 +3893,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3809
3893
|
this.tabIndex = -1;
|
|
3810
3894
|
}
|
|
3811
3895
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
3812
|
-
var _a3, _b2, _c, _d, _e
|
|
3896
|
+
var _a3, _b2, _c, _d, _e;
|
|
3813
3897
|
if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
3814
3898
|
if (oldValue) {
|
|
3815
3899
|
(_b2 = (_a3 = __privateGet5(this, _mediaController2)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
@@ -3828,9 +3912,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3828
3912
|
} else if (attrName === Attributes3.TOOLTIP_PLACEMENT && this.tooltipEl && newValue !== oldValue) {
|
|
3829
3913
|
this.tooltipEl.placement = newValue;
|
|
3830
3914
|
}
|
|
3831
|
-
|
|
3832
|
-
(_g = (_f = this.tooltipEl) == null ? void 0 : _f.updateXOffset) == null ? void 0 : _g.call(_f);
|
|
3833
|
-
}
|
|
3915
|
+
__privateGet5(this, _positionTooltip).call(this);
|
|
3834
3916
|
}
|
|
3835
3917
|
connectedCallback() {
|
|
3836
3918
|
var _a3, _b2, _c;
|
|
@@ -3855,17 +3937,16 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3855
3937
|
);
|
|
3856
3938
|
(_c = (_b2 = __privateGet5(this, _mediaController2)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
3857
3939
|
}
|
|
3858
|
-
GlobalThis.customElements.whenDefined("media-tooltip").then(this.
|
|
3940
|
+
GlobalThis.customElements.whenDefined("media-tooltip").then(() => __privateMethod3(this, _setupTooltip, setupTooltip_fn).call(this));
|
|
3859
3941
|
}
|
|
3860
3942
|
disconnectedCallback() {
|
|
3861
|
-
var _a3, _b2
|
|
3943
|
+
var _a3, _b2;
|
|
3862
3944
|
this.disable();
|
|
3863
3945
|
(_b2 = (_a3 = __privateGet5(this, _mediaController2)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
3864
3946
|
__privateSet5(this, _mediaController2, null);
|
|
3865
|
-
this.removeEventListener("mouseenter", (
|
|
3866
|
-
this.removeEventListener("focus", (
|
|
3947
|
+
this.removeEventListener("mouseenter", __privateGet5(this, _positionTooltip));
|
|
3948
|
+
this.removeEventListener("focus", __privateGet5(this, _positionTooltip));
|
|
3867
3949
|
this.removeEventListener("click", __privateGet5(this, _clickListener));
|
|
3868
|
-
this.tooltipEl = null;
|
|
3869
3950
|
}
|
|
3870
3951
|
get keysUsed() {
|
|
3871
3952
|
return ["Enter", " "];
|
|
@@ -3886,25 +3967,27 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3886
3967
|
handleClick(e) {
|
|
3887
3968
|
}
|
|
3888
3969
|
// eslint-disable-line
|
|
3889
|
-
// Called when we know the tooltip is ready / defined
|
|
3890
|
-
setupTooltip() {
|
|
3891
|
-
this.addEventListener("mouseenter", this.tooltipEl.updateXOffset);
|
|
3892
|
-
this.addEventListener("focus", this.tooltipEl.updateXOffset);
|
|
3893
|
-
this.addEventListener("click", __privateGet5(this, _clickListener));
|
|
3894
|
-
const initialPlacement = this.tooltipPlacement;
|
|
3895
|
-
if (initialPlacement)
|
|
3896
|
-
this.tooltipEl.placement = initialPlacement;
|
|
3897
|
-
}
|
|
3898
3970
|
};
|
|
3899
3971
|
_mediaController2 = /* @__PURE__ */ new WeakMap();
|
|
3900
3972
|
_clickListener = /* @__PURE__ */ new WeakMap();
|
|
3973
|
+
_positionTooltip = /* @__PURE__ */ new WeakMap();
|
|
3901
3974
|
_keyupListener = /* @__PURE__ */ new WeakMap();
|
|
3902
3975
|
_keydownListener = /* @__PURE__ */ new WeakMap();
|
|
3976
|
+
_setupTooltip = /* @__PURE__ */ new WeakSet();
|
|
3977
|
+
setupTooltip_fn = function() {
|
|
3978
|
+
this.addEventListener("mouseenter", __privateGet5(this, _positionTooltip));
|
|
3979
|
+
this.addEventListener("focus", __privateGet5(this, _positionTooltip));
|
|
3980
|
+
this.addEventListener("click", __privateGet5(this, _clickListener));
|
|
3981
|
+
const initialPlacement = this.tooltipPlacement;
|
|
3982
|
+
if (initialPlacement && this.tooltipEl) {
|
|
3983
|
+
this.tooltipEl.placement = initialPlacement;
|
|
3984
|
+
}
|
|
3985
|
+
};
|
|
3903
3986
|
if (!GlobalThis.customElements.get("media-chrome-button")) {
|
|
3904
3987
|
GlobalThis.customElements.define("media-chrome-button", MediaChromeButton);
|
|
3905
3988
|
}
|
|
3906
3989
|
|
|
3907
|
-
// ../../node_modules/
|
|
3990
|
+
// ../../node_modules/media-chrome/dist/media-airplay-button.js
|
|
3908
3991
|
var airplayIcon = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
3909
3992
|
<path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>
|
|
3910
3993
|
</svg>
|
|
@@ -3999,7 +4082,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
3999
4082
|
GlobalThis.customElements.define("media-airplay-button", MediaAirplayButton);
|
|
4000
4083
|
}
|
|
4001
4084
|
|
|
4002
|
-
// ../../node_modules/
|
|
4085
|
+
// ../../node_modules/media-chrome/dist/media-captions-button.js
|
|
4003
4086
|
var ccIconOn = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
4004
4087
|
<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"/>
|
|
4005
4088
|
</svg>`;
|
|
@@ -4119,7 +4202,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4119
4202
|
);
|
|
4120
4203
|
}
|
|
4121
4204
|
|
|
4122
|
-
// ../../node_modules/
|
|
4205
|
+
// ../../node_modules/media-chrome/dist/media-cast-button.js
|
|
4123
4206
|
var enterIcon = `<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg>`;
|
|
4124
4207
|
var exitIcon = `<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>`;
|
|
4125
4208
|
var slotTemplate3 = Document2.createElement("template");
|
|
@@ -4208,7 +4291,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4208
4291
|
GlobalThis.customElements.define("media-cast-button", MediaCastButton);
|
|
4209
4292
|
}
|
|
4210
4293
|
|
|
4211
|
-
// ../../node_modules/
|
|
4294
|
+
// ../../node_modules/media-chrome/dist/media-chrome-dialog.js
|
|
4212
4295
|
var __accessCheck6 = (obj, member, msg) => {
|
|
4213
4296
|
if (!member.has(obj))
|
|
4214
4297
|
throw TypeError("Cannot " + msg);
|
|
@@ -4227,12 +4310,15 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4227
4310
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
4228
4311
|
return value;
|
|
4229
4312
|
};
|
|
4230
|
-
var
|
|
4313
|
+
var __privateMethod4 = (obj, member, method) => {
|
|
4231
4314
|
__accessCheck6(obj, member, "access private method");
|
|
4232
4315
|
return method;
|
|
4233
4316
|
};
|
|
4317
|
+
var _isInit;
|
|
4234
4318
|
var _previouslyFocused;
|
|
4235
4319
|
var _invokerElement;
|
|
4320
|
+
var _init;
|
|
4321
|
+
var init_fn;
|
|
4236
4322
|
var _handleOpen;
|
|
4237
4323
|
var handleOpen_fn;
|
|
4238
4324
|
var _handleClosed;
|
|
@@ -4243,102 +4329,124 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4243
4329
|
var handleFocusOut_fn;
|
|
4244
4330
|
var _handleKeyDown;
|
|
4245
4331
|
var handleKeyDown_fn;
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
var(--media-font
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
opacity
|
|
4264
|
-
transform .
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4332
|
+
function getTemplateHTML(_attrs) {
|
|
4333
|
+
return (
|
|
4334
|
+
/*html*/
|
|
4335
|
+
`
|
|
4336
|
+
<style>
|
|
4337
|
+
:host {
|
|
4338
|
+
font: var(--media-font,
|
|
4339
|
+
var(--media-font-weight, normal)
|
|
4340
|
+
var(--media-font-size, 14px) /
|
|
4341
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
4342
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
4343
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
4344
|
+
display: var(--media-dialog-display, inline-flex);
|
|
4345
|
+
justify-content: center;
|
|
4346
|
+
align-items: center;
|
|
4347
|
+
transition: display .15s, opacity .15s ease-in, transform .15s ease-in;
|
|
4348
|
+
transition-behavior: allow-discrete;
|
|
4349
|
+
opacity: 0;
|
|
4350
|
+
transform: translateY(2px) scale(.99);
|
|
4351
|
+
pointer-events: none;
|
|
4352
|
+
}
|
|
4353
|
+
|
|
4354
|
+
:host([open]) {
|
|
4355
|
+
transition: display .2s, opacity .2s ease-out, transform .15s ease-out;
|
|
4356
|
+
transition-behavior: allow-discrete;
|
|
4357
|
+
opacity: 1;
|
|
4358
|
+
transform: translateY(0) scale(1);
|
|
4359
|
+
pointer-events: auto;
|
|
4360
|
+
}
|
|
4272
4361
|
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4362
|
+
#content {
|
|
4363
|
+
display: flex;
|
|
4364
|
+
position: relative;
|
|
4365
|
+
box-sizing: border-box;
|
|
4366
|
+
width: min(320px, 100%);
|
|
4367
|
+
word-wrap: break-word;
|
|
4368
|
+
max-height: 100%;
|
|
4369
|
+
overflow: auto;
|
|
4370
|
+
text-align: center;
|
|
4371
|
+
line-height: 1.4;
|
|
4372
|
+
}
|
|
4373
|
+
</style>
|
|
4374
|
+
${this.getSlotTemplateHTML(_attrs)}
|
|
4375
|
+
`
|
|
4376
|
+
);
|
|
4377
|
+
}
|
|
4378
|
+
function getSlotTemplateHTML(_attrs) {
|
|
4379
|
+
return (
|
|
4380
|
+
/*html*/
|
|
4381
|
+
`
|
|
4382
|
+
<slot id="content"></slot>
|
|
4383
|
+
`
|
|
4384
|
+
);
|
|
4385
|
+
}
|
|
4287
4386
|
var Attributes4 = {
|
|
4288
|
-
|
|
4387
|
+
OPEN: "open",
|
|
4289
4388
|
ANCHOR: "anchor"
|
|
4290
4389
|
};
|
|
4291
4390
|
var MediaChromeDialog = class extends GlobalThis.HTMLElement {
|
|
4292
4391
|
constructor() {
|
|
4293
4392
|
super();
|
|
4393
|
+
__privateAdd6(this, _init);
|
|
4294
4394
|
__privateAdd6(this, _handleOpen);
|
|
4295
4395
|
__privateAdd6(this, _handleClosed);
|
|
4296
4396
|
__privateAdd6(this, _handleInvoke);
|
|
4297
4397
|
__privateAdd6(this, _handleFocusOut);
|
|
4298
4398
|
__privateAdd6(this, _handleKeyDown);
|
|
4399
|
+
__privateAdd6(this, _isInit, false);
|
|
4299
4400
|
__privateAdd6(this, _previouslyFocused, null);
|
|
4300
4401
|
__privateAdd6(this, _invokerElement, null);
|
|
4301
|
-
if (!this.shadowRoot) {
|
|
4302
|
-
this.attachShadow({ mode: "open" });
|
|
4303
|
-
this.nativeEl = this.constructor.template.content.cloneNode(true);
|
|
4304
|
-
this.shadowRoot.append(this.nativeEl);
|
|
4305
|
-
}
|
|
4306
4402
|
this.addEventListener("invoke", this);
|
|
4307
4403
|
this.addEventListener("focusout", this);
|
|
4308
4404
|
this.addEventListener("keydown", this);
|
|
4309
4405
|
}
|
|
4310
4406
|
static get observedAttributes() {
|
|
4311
|
-
return [Attributes4.
|
|
4407
|
+
return [Attributes4.OPEN, Attributes4.ANCHOR];
|
|
4408
|
+
}
|
|
4409
|
+
get open() {
|
|
4410
|
+
return getBooleanAttr(this, Attributes4.OPEN);
|
|
4411
|
+
}
|
|
4412
|
+
set open(value) {
|
|
4413
|
+
setBooleanAttr(this, Attributes4.OPEN, value);
|
|
4312
4414
|
}
|
|
4313
4415
|
handleEvent(event) {
|
|
4314
4416
|
switch (event.type) {
|
|
4315
4417
|
case "invoke":
|
|
4316
|
-
|
|
4418
|
+
__privateMethod4(this, _handleInvoke, handleInvoke_fn).call(this, event);
|
|
4317
4419
|
break;
|
|
4318
4420
|
case "focusout":
|
|
4319
|
-
|
|
4421
|
+
__privateMethod4(this, _handleFocusOut, handleFocusOut_fn).call(this, event);
|
|
4320
4422
|
break;
|
|
4321
4423
|
case "keydown":
|
|
4322
|
-
|
|
4424
|
+
__privateMethod4(this, _handleKeyDown, handleKeyDown_fn).call(this, event);
|
|
4323
4425
|
break;
|
|
4324
4426
|
}
|
|
4325
4427
|
}
|
|
4326
4428
|
connectedCallback() {
|
|
4429
|
+
__privateMethod4(this, _init, init_fn).call(this);
|
|
4327
4430
|
if (!this.role) {
|
|
4328
4431
|
this.role = "dialog";
|
|
4329
4432
|
}
|
|
4330
4433
|
}
|
|
4331
4434
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4435
|
+
__privateMethod4(this, _init, init_fn).call(this);
|
|
4436
|
+
if (attrName === Attributes4.OPEN && newValue !== oldValue) {
|
|
4437
|
+
if (this.open) {
|
|
4438
|
+
__privateMethod4(this, _handleOpen, handleOpen_fn).call(this);
|
|
4335
4439
|
} else {
|
|
4336
|
-
|
|
4440
|
+
__privateMethod4(this, _handleClosed, handleClosed_fn).call(this);
|
|
4337
4441
|
}
|
|
4338
4442
|
}
|
|
4339
4443
|
}
|
|
4340
4444
|
focus() {
|
|
4341
4445
|
__privateSet6(this, _previouslyFocused, getActiveElement());
|
|
4446
|
+
const focusCancelled = !this.dispatchEvent(new Event("focus", { composed: true, cancelable: true }));
|
|
4447
|
+
const focusInCancelled = !this.dispatchEvent(new Event("focusin", { composed: true, bubbles: true, cancelable: true }));
|
|
4448
|
+
if (focusCancelled || focusInCancelled)
|
|
4449
|
+
return;
|
|
4342
4450
|
const focusable = this.querySelector(
|
|
4343
4451
|
'[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]'
|
|
4344
4452
|
);
|
|
@@ -4348,24 +4456,41 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4348
4456
|
return ["Escape", "Tab"];
|
|
4349
4457
|
}
|
|
4350
4458
|
};
|
|
4459
|
+
_isInit = /* @__PURE__ */ new WeakMap();
|
|
4351
4460
|
_previouslyFocused = /* @__PURE__ */ new WeakMap();
|
|
4352
4461
|
_invokerElement = /* @__PURE__ */ new WeakMap();
|
|
4462
|
+
_init = /* @__PURE__ */ new WeakSet();
|
|
4463
|
+
init_fn = function() {
|
|
4464
|
+
if (__privateGet6(this, _isInit))
|
|
4465
|
+
return;
|
|
4466
|
+
__privateSet6(this, _isInit, true);
|
|
4467
|
+
if (!this.shadowRoot) {
|
|
4468
|
+
this.attachShadow({ mode: "open" });
|
|
4469
|
+
const attrs = namedNodeMapToObject(this.attributes);
|
|
4470
|
+
this.shadowRoot.innerHTML = /*html*/
|
|
4471
|
+
`
|
|
4472
|
+
${this.constructor.getTemplateHTML(attrs)}
|
|
4473
|
+
`;
|
|
4474
|
+
}
|
|
4475
|
+
};
|
|
4353
4476
|
_handleOpen = /* @__PURE__ */ new WeakSet();
|
|
4354
4477
|
handleOpen_fn = function() {
|
|
4355
4478
|
var _a3;
|
|
4356
4479
|
(_a3 = __privateGet6(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "true");
|
|
4480
|
+
this.dispatchEvent(new Event("open", { composed: true, bubbles: true }));
|
|
4357
4481
|
this.addEventListener("transitionend", () => this.focus(), { once: true });
|
|
4358
4482
|
};
|
|
4359
4483
|
_handleClosed = /* @__PURE__ */ new WeakSet();
|
|
4360
4484
|
handleClosed_fn = function() {
|
|
4361
4485
|
var _a3;
|
|
4362
4486
|
(_a3 = __privateGet6(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "false");
|
|
4487
|
+
this.dispatchEvent(new Event("close", { composed: true, bubbles: true }));
|
|
4363
4488
|
};
|
|
4364
4489
|
_handleInvoke = /* @__PURE__ */ new WeakSet();
|
|
4365
4490
|
handleInvoke_fn = function(event) {
|
|
4366
4491
|
__privateSet6(this, _invokerElement, event.relatedTarget);
|
|
4367
4492
|
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
4368
|
-
this.
|
|
4493
|
+
this.open = !this.open;
|
|
4369
4494
|
}
|
|
4370
4495
|
};
|
|
4371
4496
|
_handleFocusOut = /* @__PURE__ */ new WeakSet();
|
|
@@ -4373,8 +4498,8 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4373
4498
|
var _a3;
|
|
4374
4499
|
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
4375
4500
|
(_a3 = __privateGet6(this, _previouslyFocused)) == null ? void 0 : _a3.focus();
|
|
4376
|
-
if (__privateGet6(this, _invokerElement) && __privateGet6(this, _invokerElement) !== event.relatedTarget &&
|
|
4377
|
-
this.
|
|
4501
|
+
if (__privateGet6(this, _invokerElement) && __privateGet6(this, _invokerElement) !== event.relatedTarget && this.open) {
|
|
4502
|
+
this.open = false;
|
|
4378
4503
|
}
|
|
4379
4504
|
}
|
|
4380
4505
|
};
|
|
@@ -4399,15 +4524,16 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4399
4524
|
this.blur();
|
|
4400
4525
|
} else if (key === "Escape") {
|
|
4401
4526
|
(_e = __privateGet6(this, _previouslyFocused)) == null ? void 0 : _e.focus();
|
|
4402
|
-
this.
|
|
4527
|
+
this.open = false;
|
|
4403
4528
|
}
|
|
4404
4529
|
};
|
|
4405
|
-
MediaChromeDialog.
|
|
4530
|
+
MediaChromeDialog.getTemplateHTML = getTemplateHTML;
|
|
4531
|
+
MediaChromeDialog.getSlotTemplateHTML = getSlotTemplateHTML;
|
|
4406
4532
|
if (!GlobalThis.customElements.get("media-chrome-dialog")) {
|
|
4407
4533
|
GlobalThis.customElements.define("media-chrome-dialog", MediaChromeDialog);
|
|
4408
4534
|
}
|
|
4409
4535
|
|
|
4410
|
-
// ../../node_modules/
|
|
4536
|
+
// ../../node_modules/media-chrome/dist/media-chrome-range.js
|
|
4411
4537
|
var __accessCheck7 = (obj, member, msg) => {
|
|
4412
4538
|
if (!member.has(obj))
|
|
4413
4539
|
throw TypeError("Cannot " + msg);
|
|
@@ -4426,7 +4552,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4426
4552
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
4427
4553
|
return value;
|
|
4428
4554
|
};
|
|
4429
|
-
var
|
|
4555
|
+
var __privateMethod5 = (obj, member, method) => {
|
|
4430
4556
|
__accessCheck7(obj, member, "access private method");
|
|
4431
4557
|
return method;
|
|
4432
4558
|
};
|
|
@@ -4455,8 +4581,8 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4455
4581
|
var handlePointerLeave_fn;
|
|
4456
4582
|
var _handlePointerMove2;
|
|
4457
4583
|
var handlePointerMove_fn2;
|
|
4458
|
-
var
|
|
4459
|
-
|
|
4584
|
+
var template4 = Document2.createElement("template");
|
|
4585
|
+
template4.innerHTML = /*html*/
|
|
4460
4586
|
`
|
|
4461
4587
|
<style>
|
|
4462
4588
|
:host {
|
|
@@ -4478,8 +4604,6 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4478
4604
|
cursor: pointer;
|
|
4479
4605
|
pointer-events: auto;
|
|
4480
4606
|
touch-action: none; ${/* Prevent scrolling when dragging on mobile. */
|
|
4481
|
-
""}
|
|
4482
|
-
z-index: 1; ${/* Apply z-index to overlap buttons below. */
|
|
4483
4607
|
""}
|
|
4484
4608
|
}
|
|
4485
4609
|
|
|
@@ -4583,32 +4707,22 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4583
4707
|
will-change: transform;
|
|
4584
4708
|
}
|
|
4585
4709
|
|
|
4586
|
-
#background,
|
|
4587
4710
|
#track {
|
|
4588
|
-
border-radius: var(--media-range-track-border-radius, 1px);
|
|
4589
|
-
position: absolute;
|
|
4590
|
-
width: 100%;
|
|
4591
|
-
height: 100%;
|
|
4592
|
-
}
|
|
4593
|
-
|
|
4594
|
-
#background {
|
|
4595
4711
|
background: var(--media-range-track-background, rgb(255 255 255 / .2));
|
|
4596
|
-
|
|
4597
|
-
-webkit-backdrop-filter: var(--media-range-track-background-backdrop-filter);
|
|
4598
|
-
}
|
|
4599
|
-
|
|
4600
|
-
#track {
|
|
4712
|
+
border-radius: var(--media-range-track-border-radius, 1px);
|
|
4601
4713
|
border: var(--media-range-track-border, none);
|
|
4602
4714
|
outline: var(--media-range-track-outline);
|
|
4603
4715
|
outline-offset: var(--media-range-track-outline-offset);
|
|
4604
4716
|
backdrop-filter: var(--media-range-track-backdrop-filter);
|
|
4605
4717
|
-webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
|
|
4606
4718
|
box-shadow: var(--media-range-track-box-shadow, none);
|
|
4719
|
+
position: absolute;
|
|
4720
|
+
width: 100%;
|
|
4721
|
+
height: 100%;
|
|
4607
4722
|
overflow: hidden;
|
|
4608
4723
|
}
|
|
4609
4724
|
|
|
4610
4725
|
#progress,
|
|
4611
|
-
#highlight,
|
|
4612
4726
|
#pointer {
|
|
4613
4727
|
position: absolute;
|
|
4614
4728
|
height: 100%;
|
|
@@ -4660,7 +4774,6 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4660
4774
|
height: var(--media-range-segment-hover-height, 7px);
|
|
4661
4775
|
}
|
|
4662
4776
|
|
|
4663
|
-
#background,
|
|
4664
4777
|
#track {
|
|
4665
4778
|
clip-path: url(#segments-clipping);
|
|
4666
4779
|
}
|
|
@@ -4692,14 +4805,12 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4692
4805
|
<div id="container">
|
|
4693
4806
|
<div id="startpoint"></div>
|
|
4694
4807
|
<div id="endpoint"></div>
|
|
4695
|
-
<div id="appearance"
|
|
4696
|
-
<div id="
|
|
4697
|
-
<div id="track">
|
|
4698
|
-
<div id="highlight"></div>
|
|
4808
|
+
<div id="appearance">
|
|
4809
|
+
<div id="track" part="track">
|
|
4699
4810
|
<div id="pointer"></div>
|
|
4700
|
-
<div id="progress"></div>
|
|
4811
|
+
<div id="progress" part="progress"></div>
|
|
4701
4812
|
</div>
|
|
4702
|
-
<div id="thumb"></div>
|
|
4813
|
+
<div id="thumb" part="thumb"></div>
|
|
4703
4814
|
<svg id="segments"><clipPath id="segments-clipping"></clipPath></svg>
|
|
4704
4815
|
</div>
|
|
4705
4816
|
<input id="range" type="range" min="0" max="1" step="any" value="0">
|
|
@@ -4743,7 +4854,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4743
4854
|
});
|
|
4744
4855
|
if (!this.shadowRoot) {
|
|
4745
4856
|
this.attachShadow({ mode: "open" });
|
|
4746
|
-
this.shadowRoot.appendChild(
|
|
4857
|
+
this.shadowRoot.appendChild(template4.content.cloneNode(true));
|
|
4747
4858
|
}
|
|
4748
4859
|
this.container = this.shadowRoot.querySelector("#container");
|
|
4749
4860
|
__privateSet7(this, _startpoint, this.shadowRoot.querySelector("#startpoint"));
|
|
@@ -4772,10 +4883,10 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4772
4883
|
} else if (attrName === "disabled" || attrName === "aria-disabled" && oldValue !== newValue) {
|
|
4773
4884
|
if (newValue == null) {
|
|
4774
4885
|
this.range.removeAttribute(attrName);
|
|
4775
|
-
|
|
4886
|
+
__privateMethod5(this, _enableUserEvents, enableUserEvents_fn).call(this);
|
|
4776
4887
|
} else {
|
|
4777
4888
|
this.range.setAttribute(attrName, newValue);
|
|
4778
|
-
|
|
4889
|
+
__privateMethod5(this, _disableUserEvents, disableUserEvents_fn).call(this);
|
|
4779
4890
|
}
|
|
4780
4891
|
}
|
|
4781
4892
|
}
|
|
@@ -4789,6 +4900,10 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4789
4900
|
__privateGet7(this, _cssRules).pointer = getOrInsertCSSRule(this.shadowRoot, "#pointer");
|
|
4790
4901
|
__privateGet7(this, _cssRules).progress = getOrInsertCSSRule(this.shadowRoot, "#progress");
|
|
4791
4902
|
__privateGet7(this, _cssRules).thumb = getOrInsertCSSRule(this.shadowRoot, "#thumb");
|
|
4903
|
+
__privateGet7(this, _cssRules).activeSegment = getOrInsertCSSRule(
|
|
4904
|
+
this.shadowRoot,
|
|
4905
|
+
"#segments-clipping rect:nth-child(0)"
|
|
4906
|
+
);
|
|
4792
4907
|
const mediaControllerId = this.getAttribute(
|
|
4793
4908
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER
|
|
4794
4909
|
);
|
|
@@ -4801,12 +4916,12 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4801
4916
|
this.updateBar();
|
|
4802
4917
|
this.shadowRoot.addEventListener("focusin", __privateGet7(this, _onFocusIn));
|
|
4803
4918
|
this.shadowRoot.addEventListener("focusout", __privateGet7(this, _onFocusOut));
|
|
4804
|
-
|
|
4919
|
+
__privateMethod5(this, _enableUserEvents, enableUserEvents_fn).call(this);
|
|
4805
4920
|
observeResize(this.container, __privateGet7(this, _updateComputedStyles));
|
|
4806
4921
|
}
|
|
4807
4922
|
disconnectedCallback() {
|
|
4808
4923
|
var _a3, _b2;
|
|
4809
|
-
|
|
4924
|
+
__privateMethod5(this, _disableUserEvents, disableUserEvents_fn).call(this);
|
|
4810
4925
|
(_b2 = (_a3 = __privateGet7(this, _mediaController3)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
4811
4926
|
__privateSet7(this, _mediaController3, null);
|
|
4812
4927
|
this.shadowRoot.removeEventListener("focusin", __privateGet7(this, _onFocusIn));
|
|
@@ -4832,10 +4947,6 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4832
4947
|
this.container.classList.toggle("segments", !!(segments == null ? void 0 : segments.length));
|
|
4833
4948
|
if (!(segments == null ? void 0 : segments.length))
|
|
4834
4949
|
return;
|
|
4835
|
-
__privateGet7(this, _cssRules).activeSegment = insertCSSRule(
|
|
4836
|
-
this.shadowRoot,
|
|
4837
|
-
"#segments-clipping rect:nth-child(0)"
|
|
4838
|
-
);
|
|
4839
4950
|
const normalized = [
|
|
4840
4951
|
.../* @__PURE__ */ new Set([
|
|
4841
4952
|
+this.range.min,
|
|
@@ -4878,22 +4989,22 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4878
4989
|
handleEvent(evt) {
|
|
4879
4990
|
switch (evt.type) {
|
|
4880
4991
|
case "pointermove":
|
|
4881
|
-
|
|
4992
|
+
__privateMethod5(this, _handlePointerMove2, handlePointerMove_fn2).call(this, evt);
|
|
4882
4993
|
break;
|
|
4883
4994
|
case "input":
|
|
4884
4995
|
this.updateBar();
|
|
4885
4996
|
break;
|
|
4886
4997
|
case "pointerenter":
|
|
4887
|
-
|
|
4998
|
+
__privateMethod5(this, _handlePointerEnter, handlePointerEnter_fn).call(this, evt);
|
|
4888
4999
|
break;
|
|
4889
5000
|
case "pointerdown":
|
|
4890
|
-
|
|
5001
|
+
__privateMethod5(this, _handlePointerDown, handlePointerDown_fn).call(this, evt);
|
|
4891
5002
|
break;
|
|
4892
5003
|
case "pointerup":
|
|
4893
|
-
|
|
5004
|
+
__privateMethod5(this, _handlePointerUp2, handlePointerUp_fn2).call(this);
|
|
4894
5005
|
break;
|
|
4895
5006
|
case "pointerleave":
|
|
4896
|
-
|
|
5007
|
+
__privateMethod5(this, _handlePointerLeave, handlePointerLeave_fn).call(this);
|
|
4897
5008
|
break;
|
|
4898
5009
|
}
|
|
4899
5010
|
}
|
|
@@ -4956,7 +5067,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4956
5067
|
handlePointerEnter_fn = function(evt) {
|
|
4957
5068
|
var _a3;
|
|
4958
5069
|
if (evt.pointerType !== "mouse")
|
|
4959
|
-
|
|
5070
|
+
__privateMethod5(this, _handlePointerDown, handlePointerDown_fn).call(this, evt);
|
|
4960
5071
|
this.addEventListener("pointerleave", this);
|
|
4961
5072
|
(_a3 = GlobalThis.window) == null ? void 0 : _a3.addEventListener("pointermove", this);
|
|
4962
5073
|
};
|
|
@@ -4983,7 +5094,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4983
5094
|
evt.buttons === 1 || evt.pointerType !== "mouse"
|
|
4984
5095
|
);
|
|
4985
5096
|
this.updatePointerBar(evt);
|
|
4986
|
-
|
|
5097
|
+
__privateMethod5(this, _updateActiveSegment, updateActiveSegment_fn).call(this, evt);
|
|
4987
5098
|
if (this.dragging && (evt.pointerType !== "mouse" || !__privateGet7(this, _isInputTarget))) {
|
|
4988
5099
|
this.range.disabled = true;
|
|
4989
5100
|
this.range.valueAsNumber = this.getPointerRatio(evt);
|
|
@@ -4996,7 +5107,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
4996
5107
|
GlobalThis.customElements.define("media-chrome-range", MediaChromeRange);
|
|
4997
5108
|
}
|
|
4998
5109
|
|
|
4999
|
-
// ../../node_modules/
|
|
5110
|
+
// ../../node_modules/media-chrome/dist/media-control-bar.js
|
|
5000
5111
|
var __accessCheck8 = (obj, member, msg) => {
|
|
5001
5112
|
if (!member.has(obj))
|
|
5002
5113
|
throw TypeError("Cannot " + msg);
|
|
@@ -5016,8 +5127,8 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5016
5127
|
return value;
|
|
5017
5128
|
};
|
|
5018
5129
|
var _mediaController4;
|
|
5019
|
-
var
|
|
5020
|
-
|
|
5130
|
+
var template5 = Document2.createElement("template");
|
|
5131
|
+
template5.innerHTML = /*html*/
|
|
5021
5132
|
`
|
|
5022
5133
|
<style>
|
|
5023
5134
|
:host {
|
|
@@ -5038,6 +5149,10 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5038
5149
|
::slotted(media-clip-selector) {
|
|
5039
5150
|
flex-grow: 1;
|
|
5040
5151
|
}
|
|
5152
|
+
|
|
5153
|
+
::slotted([role="menu"]) {
|
|
5154
|
+
position: absolute;
|
|
5155
|
+
}
|
|
5041
5156
|
</style>
|
|
5042
5157
|
|
|
5043
5158
|
<slot></slot>
|
|
@@ -5048,7 +5163,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5048
5163
|
__privateAdd8(this, _mediaController4, void 0);
|
|
5049
5164
|
if (!this.shadowRoot) {
|
|
5050
5165
|
this.attachShadow({ mode: "open" });
|
|
5051
|
-
this.shadowRoot.appendChild(
|
|
5166
|
+
this.shadowRoot.appendChild(template5.content.cloneNode(true));
|
|
5052
5167
|
}
|
|
5053
5168
|
}
|
|
5054
5169
|
static get observedAttributes() {
|
|
@@ -5090,7 +5205,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5090
5205
|
GlobalThis.customElements.define("media-control-bar", MediaControlBar);
|
|
5091
5206
|
}
|
|
5092
5207
|
|
|
5093
|
-
// ../../node_modules/
|
|
5208
|
+
// ../../node_modules/media-chrome/dist/media-text-display.js
|
|
5094
5209
|
var __accessCheck9 = (obj, member, msg) => {
|
|
5095
5210
|
if (!member.has(obj))
|
|
5096
5211
|
throw TypeError("Cannot " + msg);
|
|
@@ -5110,8 +5225,8 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5110
5225
|
return value;
|
|
5111
5226
|
};
|
|
5112
5227
|
var _mediaController5;
|
|
5113
|
-
var
|
|
5114
|
-
|
|
5228
|
+
var template6 = Document2.createElement("template");
|
|
5229
|
+
template6.innerHTML = /*html*/
|
|
5115
5230
|
`
|
|
5116
5231
|
<style>
|
|
5117
5232
|
:host {
|
|
@@ -5159,7 +5274,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5159
5274
|
__privateAdd9(this, _mediaController5, void 0);
|
|
5160
5275
|
if (!this.shadowRoot) {
|
|
5161
5276
|
this.attachShadow({ mode: "open" });
|
|
5162
|
-
this.shadowRoot.appendChild(
|
|
5277
|
+
this.shadowRoot.appendChild(template6.content.cloneNode(true));
|
|
5163
5278
|
}
|
|
5164
5279
|
}
|
|
5165
5280
|
static get observedAttributes() {
|
|
@@ -5205,9 +5320,8 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5205
5320
|
if (!GlobalThis.customElements.get("media-text-display")) {
|
|
5206
5321
|
GlobalThis.customElements.define("media-text-display", MediaTextDisplay);
|
|
5207
5322
|
}
|
|
5208
|
-
var media_text_display_default = MediaTextDisplay;
|
|
5209
5323
|
|
|
5210
|
-
// ../../node_modules/
|
|
5324
|
+
// ../../node_modules/media-chrome/dist/media-duration-display.js
|
|
5211
5325
|
var __accessCheck10 = (obj, member, msg) => {
|
|
5212
5326
|
if (!member.has(obj))
|
|
5213
5327
|
throw TypeError("Cannot " + msg);
|
|
@@ -5261,25 +5375,139 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5261
5375
|
);
|
|
5262
5376
|
}
|
|
5263
5377
|
|
|
5264
|
-
// ../../node_modules/
|
|
5265
|
-
var
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5378
|
+
// ../../node_modules/media-chrome/dist/media-error-dialog.js
|
|
5379
|
+
var __accessCheck11 = (obj, member, msg) => {
|
|
5380
|
+
if (!member.has(obj))
|
|
5381
|
+
throw TypeError("Cannot " + msg);
|
|
5382
|
+
};
|
|
5383
|
+
var __privateGet11 = (obj, member, getter) => {
|
|
5384
|
+
__accessCheck11(obj, member, "read from private field");
|
|
5385
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
5386
|
+
};
|
|
5387
|
+
var __privateAdd11 = (obj, member, value) => {
|
|
5388
|
+
if (member.has(obj))
|
|
5389
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
5390
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
5391
|
+
};
|
|
5392
|
+
var __privateSet11 = (obj, member, value, setter) => {
|
|
5393
|
+
__accessCheck11(obj, member, "write to private field");
|
|
5394
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
5395
|
+
return value;
|
|
5396
|
+
};
|
|
5397
|
+
var _mediaError;
|
|
5398
|
+
function getSlotTemplateHTML2(attrs) {
|
|
5399
|
+
return (
|
|
5400
|
+
/*html*/
|
|
5401
|
+
`
|
|
5402
|
+
<style>
|
|
5403
|
+
:host {
|
|
5404
|
+
background: rgb(20 20 30 / .8);
|
|
5405
|
+
}
|
|
5406
|
+
|
|
5407
|
+
#content {
|
|
5408
|
+
display: block;
|
|
5409
|
+
padding: 1.2em 1.5em;
|
|
5410
|
+
}
|
|
5411
|
+
|
|
5412
|
+
h3,
|
|
5413
|
+
p {
|
|
5414
|
+
margin-block: 0 .3em;
|
|
5415
|
+
}
|
|
5416
|
+
</style>
|
|
5417
|
+
<slot name="error-${attrs.mediaerrorcode}" id="content">
|
|
5418
|
+
${formatErrorMessage({ code: +attrs.mediaerrorcode, message: attrs.mediaerrormessage })}
|
|
5419
|
+
</slot>
|
|
5420
|
+
`
|
|
5421
|
+
);
|
|
5422
|
+
}
|
|
5423
|
+
function shouldOpenErrorDialog(error) {
|
|
5424
|
+
return error.code && formatError(error) !== null;
|
|
5425
|
+
}
|
|
5426
|
+
function formatErrorMessage(error) {
|
|
5427
|
+
var _a3;
|
|
5428
|
+
const { title, message } = (_a3 = formatError(error)) != null ? _a3 : {};
|
|
5429
|
+
let html = "";
|
|
5430
|
+
if (title)
|
|
5431
|
+
html += `<slot name="error-${error.code}-title"><h3>${title}</h3></slot>`;
|
|
5432
|
+
if (message)
|
|
5433
|
+
html += `<slot name="error-${error.code}-message"><p>${message}</p></slot>`;
|
|
5434
|
+
return html;
|
|
5435
|
+
}
|
|
5436
|
+
var observedAttributes = [
|
|
5437
|
+
MediaUIAttributes.MEDIA_ERROR_CODE,
|
|
5438
|
+
MediaUIAttributes.MEDIA_ERROR_MESSAGE
|
|
5439
|
+
];
|
|
5440
|
+
var MediaErrorDialog = class extends MediaChromeDialog {
|
|
5441
|
+
constructor() {
|
|
5442
|
+
super(...arguments);
|
|
5443
|
+
__privateAdd11(this, _mediaError, null);
|
|
5444
|
+
}
|
|
5445
|
+
static get observedAttributes() {
|
|
5446
|
+
return [...super.observedAttributes, ...observedAttributes];
|
|
5447
|
+
}
|
|
5448
|
+
formatErrorMessage(error) {
|
|
5449
|
+
return this.constructor.formatErrorMessage(error);
|
|
5450
|
+
}
|
|
5451
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
5452
|
+
var _a3;
|
|
5453
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
5454
|
+
if (!observedAttributes.includes(attrName))
|
|
5455
|
+
return;
|
|
5456
|
+
const mediaError = (_a3 = this.mediaError) != null ? _a3 : {
|
|
5457
|
+
code: this.mediaErrorCode,
|
|
5458
|
+
message: this.mediaErrorMessage
|
|
5459
|
+
};
|
|
5460
|
+
this.open = shouldOpenErrorDialog(mediaError);
|
|
5461
|
+
if (this.open) {
|
|
5462
|
+
this.shadowRoot.querySelector("slot").name = `error-${this.mediaErrorCode}`;
|
|
5463
|
+
this.shadowRoot.querySelector("#content").innerHTML = this.formatErrorMessage(mediaError);
|
|
5464
|
+
}
|
|
5465
|
+
}
|
|
5466
|
+
get mediaError() {
|
|
5467
|
+
return __privateGet11(this, _mediaError);
|
|
5468
|
+
}
|
|
5469
|
+
set mediaError(value) {
|
|
5470
|
+
__privateSet11(this, _mediaError, value);
|
|
5471
|
+
}
|
|
5472
|
+
get mediaErrorCode() {
|
|
5473
|
+
return getNumericAttr(this, "mediaerrorcode");
|
|
5474
|
+
}
|
|
5475
|
+
set mediaErrorCode(value) {
|
|
5476
|
+
setNumericAttr(this, "mediaerrorcode", value);
|
|
5477
|
+
}
|
|
5478
|
+
get mediaErrorMessage() {
|
|
5479
|
+
return getStringAttr(this, "mediaerrormessage");
|
|
5480
|
+
}
|
|
5481
|
+
set mediaErrorMessage(value) {
|
|
5482
|
+
setStringAttr(this, "mediaerrormessage", value);
|
|
5483
|
+
}
|
|
5484
|
+
};
|
|
5485
|
+
_mediaError = /* @__PURE__ */ new WeakMap();
|
|
5486
|
+
MediaErrorDialog.getSlotTemplateHTML = getSlotTemplateHTML2;
|
|
5487
|
+
MediaErrorDialog.formatErrorMessage = formatErrorMessage;
|
|
5488
|
+
if (!GlobalThis.customElements.get("media-error-dialog")) {
|
|
5489
|
+
GlobalThis.customElements.define("media-error-dialog", MediaErrorDialog);
|
|
5490
|
+
}
|
|
5491
|
+
|
|
5492
|
+
// ../../node_modules/media-chrome/dist/media-fullscreen-button.js
|
|
5493
|
+
var enterFullscreenIcon = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
5494
|
+
<path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
|
|
5495
|
+
</svg>`;
|
|
5496
|
+
var exitFullscreenIcon = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
5497
|
+
<path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
|
|
5498
|
+
</svg>`;
|
|
5499
|
+
var slotTemplate4 = Document2.createElement("template");
|
|
5500
|
+
slotTemplate4.innerHTML = /*html*/
|
|
5501
|
+
`
|
|
5502
|
+
<style>
|
|
5503
|
+
:host([${MediaUIAttributes.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {
|
|
5504
|
+
display: none !important;
|
|
5505
|
+
}
|
|
5506
|
+
|
|
5507
|
+
${/* Double negative, but safer if display doesn't equal 'block' */
|
|
5508
|
+
""}
|
|
5509
|
+
:host(:not([${MediaUIAttributes.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {
|
|
5510
|
+
display: none !important;
|
|
5283
5511
|
}
|
|
5284
5512
|
|
|
5285
5513
|
:host([${MediaUIAttributes.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],
|
|
@@ -5357,7 +5585,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5357
5585
|
);
|
|
5358
5586
|
}
|
|
5359
5587
|
|
|
5360
|
-
// ../../node_modules/
|
|
5588
|
+
// ../../node_modules/media-chrome/dist/media-live-button.js
|
|
5361
5589
|
var { MEDIA_TIME_IS_LIVE, MEDIA_PAUSED } = MediaUIAttributes;
|
|
5362
5590
|
var { MEDIA_SEEK_TO_LIVE_REQUEST, MEDIA_PLAY_REQUEST } = MediaUIEvents;
|
|
5363
5591
|
var indicatorSVG = '<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>';
|
|
@@ -5458,22 +5686,22 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5458
5686
|
GlobalThis.customElements.define("media-live-button", MediaLiveButton);
|
|
5459
5687
|
}
|
|
5460
5688
|
|
|
5461
|
-
// ../../node_modules/
|
|
5462
|
-
var
|
|
5689
|
+
// ../../node_modules/media-chrome/dist/media-loading-indicator.js
|
|
5690
|
+
var __accessCheck12 = (obj, member, msg) => {
|
|
5463
5691
|
if (!member.has(obj))
|
|
5464
5692
|
throw TypeError("Cannot " + msg);
|
|
5465
5693
|
};
|
|
5466
|
-
var
|
|
5467
|
-
|
|
5694
|
+
var __privateGet12 = (obj, member, getter) => {
|
|
5695
|
+
__accessCheck12(obj, member, "read from private field");
|
|
5468
5696
|
return getter ? getter.call(obj) : member.get(obj);
|
|
5469
5697
|
};
|
|
5470
|
-
var
|
|
5698
|
+
var __privateAdd12 = (obj, member, value) => {
|
|
5471
5699
|
if (member.has(obj))
|
|
5472
5700
|
throw TypeError("Cannot add the same private member more than once");
|
|
5473
5701
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
5474
5702
|
};
|
|
5475
|
-
var
|
|
5476
|
-
|
|
5703
|
+
var __privateSet12 = (obj, member, value, setter) => {
|
|
5704
|
+
__accessCheck12(obj, member, "write to private field");
|
|
5477
5705
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
5478
5706
|
return value;
|
|
5479
5707
|
};
|
|
@@ -5483,7 +5711,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5483
5711
|
LOADING_DELAY: "loadingdelay"
|
|
5484
5712
|
};
|
|
5485
5713
|
var DEFAULT_LOADING_DELAY = 500;
|
|
5486
|
-
var
|
|
5714
|
+
var template7 = Document2.createElement("template");
|
|
5487
5715
|
var loadingIndicatorIcon = `
|
|
5488
5716
|
<svg aria-hidden="true" viewBox="0 0 100 100">
|
|
5489
5717
|
<path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
|
|
@@ -5498,7 +5726,7 @@ var mediaThemeMicrovideo = (() => {
|
|
|
5498
5726
|
</path>
|
|
5499
5727
|
</svg>
|
|
5500
5728
|
`;
|
|
5501
|
-
|
|
5729
|
+
template7.innerHTML = /*html*/
|
|
5502
5730
|
`
|
|
5503
5731
|
<style>
|
|
5504
5732
|
:host {
|
|
@@ -5550,11 +5778,11 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
5550
5778
|
var MediaLoadingIndicator = class extends GlobalThis.HTMLElement {
|
|
5551
5779
|
constructor() {
|
|
5552
5780
|
super();
|
|
5553
|
-
|
|
5554
|
-
|
|
5781
|
+
__privateAdd12(this, _mediaController6, void 0);
|
|
5782
|
+
__privateAdd12(this, _delay, DEFAULT_LOADING_DELAY);
|
|
5555
5783
|
if (!this.shadowRoot) {
|
|
5556
5784
|
const shadow = this.attachShadow({ mode: "open" });
|
|
5557
|
-
const indicatorHTML =
|
|
5785
|
+
const indicatorHTML = template7.content.cloneNode(true);
|
|
5558
5786
|
shadow.appendChild(indicatorHTML);
|
|
5559
5787
|
}
|
|
5560
5788
|
}
|
|
@@ -5572,12 +5800,12 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
5572
5800
|
this.loadingDelay = Number(newValue);
|
|
5573
5801
|
} else if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
5574
5802
|
if (oldValue) {
|
|
5575
|
-
(_b2 = (_a3 =
|
|
5576
|
-
|
|
5803
|
+
(_b2 = (_a3 = __privateGet12(this, _mediaController6)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5804
|
+
__privateSet12(this, _mediaController6, null);
|
|
5577
5805
|
}
|
|
5578
5806
|
if (newValue && this.isConnected) {
|
|
5579
|
-
|
|
5580
|
-
(_e = (_d =
|
|
5807
|
+
__privateSet12(this, _mediaController6, (_c = this.getRootNode()) == null ? void 0 : _c.getElementById(newValue));
|
|
5808
|
+
(_e = (_d = __privateGet12(this, _mediaController6)) == null ? void 0 : _d.associateElement) == null ? void 0 : _e.call(_d, this);
|
|
5581
5809
|
}
|
|
5582
5810
|
}
|
|
5583
5811
|
}
|
|
@@ -5587,25 +5815,25 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
5587
5815
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER
|
|
5588
5816
|
);
|
|
5589
5817
|
if (mediaControllerId) {
|
|
5590
|
-
|
|
5818
|
+
__privateSet12(this, _mediaController6, (_a3 = this.getRootNode()) == null ? void 0 : _a3.getElementById(
|
|
5591
5819
|
mediaControllerId
|
|
5592
5820
|
));
|
|
5593
|
-
(_c = (_b2 =
|
|
5821
|
+
(_c = (_b2 = __privateGet12(this, _mediaController6)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
5594
5822
|
}
|
|
5595
5823
|
}
|
|
5596
5824
|
disconnectedCallback() {
|
|
5597
5825
|
var _a3, _b2;
|
|
5598
|
-
(_b2 = (_a3 =
|
|
5599
|
-
|
|
5826
|
+
(_b2 = (_a3 = __privateGet12(this, _mediaController6)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5827
|
+
__privateSet12(this, _mediaController6, null);
|
|
5600
5828
|
}
|
|
5601
5829
|
/**
|
|
5602
5830
|
* Delay in ms
|
|
5603
5831
|
*/
|
|
5604
5832
|
get loadingDelay() {
|
|
5605
|
-
return
|
|
5833
|
+
return __privateGet12(this, _delay);
|
|
5606
5834
|
}
|
|
5607
5835
|
set loadingDelay(delay2) {
|
|
5608
|
-
|
|
5836
|
+
__privateSet12(this, _delay, delay2);
|
|
5609
5837
|
const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
|
|
5610
5838
|
style.setProperty(
|
|
5611
5839
|
"--_loading-indicator-delay",
|
|
@@ -5640,7 +5868,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
5640
5868
|
);
|
|
5641
5869
|
}
|
|
5642
5870
|
|
|
5643
|
-
// ../../node_modules/
|
|
5871
|
+
// ../../node_modules/media-chrome/dist/media-mute-button.js
|
|
5644
5872
|
var { MEDIA_VOLUME_LEVEL } = MediaUIAttributes;
|
|
5645
5873
|
var offIcon = `<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
5646
5874
|
<path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/>
|
|
@@ -5736,7 +5964,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
5736
5964
|
GlobalThis.customElements.define("media-mute-button", MediaMuteButton);
|
|
5737
5965
|
}
|
|
5738
5966
|
|
|
5739
|
-
// ../../node_modules/
|
|
5967
|
+
// ../../node_modules/media-chrome/dist/media-pip-button.js
|
|
5740
5968
|
var pipIcon = `<svg aria-hidden="true" viewBox="0 0 28 24">
|
|
5741
5969
|
<path d="M24 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Zm-1 16H5V5h18v14Zm-3-8h-7v5h7v-5Z"/>
|
|
5742
5970
|
</svg>`;
|
|
@@ -5826,16 +6054,16 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
5826
6054
|
GlobalThis.customElements.define("media-pip-button", MediaPipButton);
|
|
5827
6055
|
}
|
|
5828
6056
|
|
|
5829
|
-
// ../../node_modules/
|
|
5830
|
-
var
|
|
6057
|
+
// ../../node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
6058
|
+
var __accessCheck13 = (obj, member, msg) => {
|
|
5831
6059
|
if (!member.has(obj))
|
|
5832
6060
|
throw TypeError("Cannot " + msg);
|
|
5833
6061
|
};
|
|
5834
|
-
var
|
|
5835
|
-
|
|
6062
|
+
var __privateGet13 = (obj, member, getter) => {
|
|
6063
|
+
__accessCheck13(obj, member, "read from private field");
|
|
5836
6064
|
return getter ? getter.call(obj) : member.get(obj);
|
|
5837
6065
|
};
|
|
5838
|
-
var
|
|
6066
|
+
var __privateAdd13 = (obj, member, value) => {
|
|
5839
6067
|
if (member.has(obj))
|
|
5840
6068
|
throw TypeError("Cannot add the same private member more than once");
|
|
5841
6069
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
@@ -5864,7 +6092,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
5864
6092
|
tooltipContent: tooltipLabels.PLAYBACK_RATE,
|
|
5865
6093
|
...options
|
|
5866
6094
|
});
|
|
5867
|
-
|
|
6095
|
+
__privateAdd13(this, _rates, new AttributeTokenList(this, Attributes6.RATES, {
|
|
5868
6096
|
defaultValue: DEFAULT_RATES
|
|
5869
6097
|
}));
|
|
5870
6098
|
this.container = this.shadowRoot.querySelector('slot[name="icon"]');
|
|
@@ -5880,7 +6108,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
5880
6108
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
5881
6109
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
5882
6110
|
if (attrName === Attributes6.RATES) {
|
|
5883
|
-
|
|
6111
|
+
__privateGet13(this, _rates).value = newValue;
|
|
5884
6112
|
}
|
|
5885
6113
|
if (attrName === MediaUIAttributes.MEDIA_PLAYBACK_RATE) {
|
|
5886
6114
|
const newPlaybackRate = newValue ? +newValue : Number.NaN;
|
|
@@ -5894,13 +6122,13 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
5894
6122
|
* Setting a value will accept an array of numbers.
|
|
5895
6123
|
*/
|
|
5896
6124
|
get rates() {
|
|
5897
|
-
return
|
|
6125
|
+
return __privateGet13(this, _rates);
|
|
5898
6126
|
}
|
|
5899
6127
|
set rates(value) {
|
|
5900
6128
|
if (!value) {
|
|
5901
|
-
|
|
6129
|
+
__privateGet13(this, _rates).value = "";
|
|
5902
6130
|
} else if (Array.isArray(value)) {
|
|
5903
|
-
|
|
6131
|
+
__privateGet13(this, _rates).value = value.join(" ");
|
|
5904
6132
|
}
|
|
5905
6133
|
}
|
|
5906
6134
|
/**
|
|
@@ -5937,7 +6165,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
5937
6165
|
);
|
|
5938
6166
|
}
|
|
5939
6167
|
|
|
5940
|
-
// ../../node_modules/
|
|
6168
|
+
// ../../node_modules/media-chrome/dist/media-play-button.js
|
|
5941
6169
|
var playIcon = `<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
5942
6170
|
<path d="m6 21 15-9L6 3v18Z"/>
|
|
5943
6171
|
</svg>`;
|
|
@@ -6016,13 +6244,13 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6016
6244
|
GlobalThis.customElements.define("media-play-button", MediaPlayButton);
|
|
6017
6245
|
}
|
|
6018
6246
|
|
|
6019
|
-
// ../../node_modules/
|
|
6247
|
+
// ../../node_modules/media-chrome/dist/media-poster-image.js
|
|
6020
6248
|
var Attributes7 = {
|
|
6021
6249
|
PLACEHOLDER_SRC: "placeholdersrc",
|
|
6022
6250
|
SRC: "src"
|
|
6023
6251
|
};
|
|
6024
|
-
var
|
|
6025
|
-
|
|
6252
|
+
var template8 = Document2.createElement("template");
|
|
6253
|
+
template8.innerHTML = /*html*/
|
|
6026
6254
|
`
|
|
6027
6255
|
<style>
|
|
6028
6256
|
:host {
|
|
@@ -6060,7 +6288,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6060
6288
|
super();
|
|
6061
6289
|
if (!this.shadowRoot) {
|
|
6062
6290
|
this.attachShadow({ mode: "open" });
|
|
6063
|
-
this.shadowRoot.appendChild(
|
|
6291
|
+
this.shadowRoot.appendChild(template8.content.cloneNode(true));
|
|
6064
6292
|
}
|
|
6065
6293
|
this.image = this.shadowRoot.querySelector("#image");
|
|
6066
6294
|
}
|
|
@@ -6103,31 +6331,31 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6103
6331
|
GlobalThis.customElements.define("media-poster-image", MediaPosterImage);
|
|
6104
6332
|
}
|
|
6105
6333
|
|
|
6106
|
-
// ../../node_modules/
|
|
6107
|
-
var
|
|
6334
|
+
// ../../node_modules/media-chrome/dist/media-preview-chapter-display.js
|
|
6335
|
+
var __accessCheck14 = (obj, member, msg) => {
|
|
6108
6336
|
if (!member.has(obj))
|
|
6109
6337
|
throw TypeError("Cannot " + msg);
|
|
6110
6338
|
};
|
|
6111
|
-
var
|
|
6112
|
-
|
|
6339
|
+
var __privateGet14 = (obj, member, getter) => {
|
|
6340
|
+
__accessCheck14(obj, member, "read from private field");
|
|
6113
6341
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6114
6342
|
};
|
|
6115
|
-
var
|
|
6343
|
+
var __privateAdd14 = (obj, member, value) => {
|
|
6116
6344
|
if (member.has(obj))
|
|
6117
6345
|
throw TypeError("Cannot add the same private member more than once");
|
|
6118
6346
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6119
6347
|
};
|
|
6120
|
-
var
|
|
6121
|
-
|
|
6348
|
+
var __privateSet13 = (obj, member, value, setter) => {
|
|
6349
|
+
__accessCheck14(obj, member, "write to private field");
|
|
6122
6350
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6123
6351
|
return value;
|
|
6124
6352
|
};
|
|
6125
6353
|
var _slot2;
|
|
6126
|
-
var MediaPreviewChapterDisplay = class extends
|
|
6354
|
+
var MediaPreviewChapterDisplay = class extends MediaTextDisplay {
|
|
6127
6355
|
constructor() {
|
|
6128
6356
|
super();
|
|
6129
|
-
|
|
6130
|
-
|
|
6357
|
+
__privateAdd14(this, _slot2, void 0);
|
|
6358
|
+
__privateSet13(this, _slot2, this.shadowRoot.querySelector("slot"));
|
|
6131
6359
|
}
|
|
6132
6360
|
static get observedAttributes() {
|
|
6133
6361
|
return [
|
|
@@ -6139,7 +6367,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6139
6367
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
6140
6368
|
if (attrName === MediaUIAttributes.MEDIA_PREVIEW_CHAPTER) {
|
|
6141
6369
|
if (newValue !== oldValue && newValue != null) {
|
|
6142
|
-
|
|
6370
|
+
__privateGet14(this, _slot2).textContent = newValue;
|
|
6143
6371
|
if (newValue !== "") {
|
|
6144
6372
|
this.setAttribute("aria-valuetext", `chapter: ${newValue}`);
|
|
6145
6373
|
} else {
|
|
@@ -6166,28 +6394,28 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6166
6394
|
);
|
|
6167
6395
|
}
|
|
6168
6396
|
|
|
6169
|
-
// ../../node_modules/
|
|
6170
|
-
var
|
|
6397
|
+
// ../../node_modules/media-chrome/dist/media-preview-thumbnail.js
|
|
6398
|
+
var __accessCheck15 = (obj, member, msg) => {
|
|
6171
6399
|
if (!member.has(obj))
|
|
6172
6400
|
throw TypeError("Cannot " + msg);
|
|
6173
6401
|
};
|
|
6174
|
-
var
|
|
6175
|
-
|
|
6402
|
+
var __privateGet15 = (obj, member, getter) => {
|
|
6403
|
+
__accessCheck15(obj, member, "read from private field");
|
|
6176
6404
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6177
6405
|
};
|
|
6178
|
-
var
|
|
6406
|
+
var __privateAdd15 = (obj, member, value) => {
|
|
6179
6407
|
if (member.has(obj))
|
|
6180
6408
|
throw TypeError("Cannot add the same private member more than once");
|
|
6181
6409
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6182
6410
|
};
|
|
6183
|
-
var
|
|
6184
|
-
|
|
6411
|
+
var __privateSet14 = (obj, member, value, setter) => {
|
|
6412
|
+
__accessCheck15(obj, member, "write to private field");
|
|
6185
6413
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6186
6414
|
return value;
|
|
6187
6415
|
};
|
|
6188
6416
|
var _mediaController7;
|
|
6189
|
-
var
|
|
6190
|
-
|
|
6417
|
+
var template9 = Document2.createElement("template");
|
|
6418
|
+
template9.innerHTML = /*html*/
|
|
6191
6419
|
`
|
|
6192
6420
|
<style>
|
|
6193
6421
|
:host {
|
|
@@ -6206,10 +6434,10 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6206
6434
|
var MediaPreviewThumbnail = class extends GlobalThis.HTMLElement {
|
|
6207
6435
|
constructor() {
|
|
6208
6436
|
super();
|
|
6209
|
-
|
|
6437
|
+
__privateAdd15(this, _mediaController7, void 0);
|
|
6210
6438
|
if (!this.shadowRoot) {
|
|
6211
6439
|
this.attachShadow({ mode: "open" });
|
|
6212
|
-
this.shadowRoot.appendChild(
|
|
6440
|
+
this.shadowRoot.appendChild(template9.content.cloneNode(true));
|
|
6213
6441
|
}
|
|
6214
6442
|
}
|
|
6215
6443
|
static get observedAttributes() {
|
|
@@ -6225,19 +6453,19 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6225
6453
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER
|
|
6226
6454
|
);
|
|
6227
6455
|
if (mediaControllerId) {
|
|
6228
|
-
|
|
6456
|
+
__privateSet14(
|
|
6229
6457
|
this,
|
|
6230
6458
|
_mediaController7,
|
|
6231
6459
|
// @ts-ignore
|
|
6232
6460
|
(_a3 = this.getRootNode()) == null ? void 0 : _a3.getElementById(mediaControllerId)
|
|
6233
6461
|
);
|
|
6234
|
-
(_c = (_b2 =
|
|
6462
|
+
(_c = (_b2 = __privateGet15(this, _mediaController7)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
6235
6463
|
}
|
|
6236
6464
|
}
|
|
6237
6465
|
disconnectedCallback() {
|
|
6238
6466
|
var _a3, _b2;
|
|
6239
|
-
(_b2 = (_a3 =
|
|
6240
|
-
|
|
6467
|
+
(_b2 = (_a3 = __privateGet15(this, _mediaController7)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
6468
|
+
__privateSet14(this, _mediaController7, null);
|
|
6241
6469
|
}
|
|
6242
6470
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
6243
6471
|
var _a3, _b2, _c, _d, _e;
|
|
@@ -6249,12 +6477,12 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6249
6477
|
}
|
|
6250
6478
|
if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
6251
6479
|
if (oldValue) {
|
|
6252
|
-
(_b2 = (_a3 =
|
|
6253
|
-
|
|
6480
|
+
(_b2 = (_a3 = __privateGet15(this, _mediaController7)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
6481
|
+
__privateSet14(this, _mediaController7, null);
|
|
6254
6482
|
}
|
|
6255
6483
|
if (newValue && this.isConnected) {
|
|
6256
|
-
|
|
6257
|
-
(_e = (_d =
|
|
6484
|
+
__privateSet14(this, _mediaController7, (_c = this.getRootNode()) == null ? void 0 : _c.getElementById(newValue));
|
|
6485
|
+
(_e = (_d = __privateGet15(this, _mediaController7)) == null ? void 0 : _d.associateElement) == null ? void 0 : _e.call(_d, this);
|
|
6258
6486
|
}
|
|
6259
6487
|
}
|
|
6260
6488
|
}
|
|
@@ -6330,22 +6558,22 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6330
6558
|
);
|
|
6331
6559
|
}
|
|
6332
6560
|
|
|
6333
|
-
// ../../node_modules/
|
|
6334
|
-
var
|
|
6561
|
+
// ../../node_modules/media-chrome/dist/media-preview-time-display.js
|
|
6562
|
+
var __accessCheck16 = (obj, member, msg) => {
|
|
6335
6563
|
if (!member.has(obj))
|
|
6336
6564
|
throw TypeError("Cannot " + msg);
|
|
6337
6565
|
};
|
|
6338
|
-
var
|
|
6339
|
-
|
|
6566
|
+
var __privateGet16 = (obj, member, getter) => {
|
|
6567
|
+
__accessCheck16(obj, member, "read from private field");
|
|
6340
6568
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6341
6569
|
};
|
|
6342
|
-
var
|
|
6570
|
+
var __privateAdd16 = (obj, member, value) => {
|
|
6343
6571
|
if (member.has(obj))
|
|
6344
6572
|
throw TypeError("Cannot add the same private member more than once");
|
|
6345
6573
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6346
6574
|
};
|
|
6347
|
-
var
|
|
6348
|
-
|
|
6575
|
+
var __privateSet15 = (obj, member, value, setter) => {
|
|
6576
|
+
__accessCheck16(obj, member, "write to private field");
|
|
6349
6577
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6350
6578
|
return value;
|
|
6351
6579
|
};
|
|
@@ -6353,9 +6581,9 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6353
6581
|
var MediaPreviewTimeDisplay = class extends MediaTextDisplay {
|
|
6354
6582
|
constructor() {
|
|
6355
6583
|
super();
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6584
|
+
__privateAdd16(this, _slot3, void 0);
|
|
6585
|
+
__privateSet15(this, _slot3, this.shadowRoot.querySelector("slot"));
|
|
6586
|
+
__privateGet16(this, _slot3).textContent = formatTime(0);
|
|
6359
6587
|
}
|
|
6360
6588
|
static get observedAttributes() {
|
|
6361
6589
|
return [...super.observedAttributes, MediaUIAttributes.MEDIA_PREVIEW_TIME];
|
|
@@ -6363,7 +6591,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6363
6591
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
6364
6592
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
6365
6593
|
if (attrName === MediaUIAttributes.MEDIA_PREVIEW_TIME && newValue != null) {
|
|
6366
|
-
|
|
6594
|
+
__privateGet16(this, _slot3).textContent = formatTime(parseFloat(newValue));
|
|
6367
6595
|
}
|
|
6368
6596
|
}
|
|
6369
6597
|
/**
|
|
@@ -6384,7 +6612,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6384
6612
|
);
|
|
6385
6613
|
}
|
|
6386
6614
|
|
|
6387
|
-
// ../../node_modules/
|
|
6615
|
+
// ../../node_modules/media-chrome/dist/media-seek-backward-button.js
|
|
6388
6616
|
var Attributes8 = {
|
|
6389
6617
|
SEEK_OFFSET: "seekoffset"
|
|
6390
6618
|
};
|
|
@@ -6474,7 +6702,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6474
6702
|
);
|
|
6475
6703
|
}
|
|
6476
6704
|
|
|
6477
|
-
// ../../node_modules/
|
|
6705
|
+
// ../../node_modules/media-chrome/dist/media-seek-forward-button.js
|
|
6478
6706
|
var Attributes9 = {
|
|
6479
6707
|
SEEK_OFFSET: "seekoffset"
|
|
6480
6708
|
};
|
|
@@ -6564,22 +6792,22 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6564
6792
|
);
|
|
6565
6793
|
}
|
|
6566
6794
|
|
|
6567
|
-
// ../../node_modules/
|
|
6568
|
-
var
|
|
6795
|
+
// ../../node_modules/media-chrome/dist/media-time-display.js
|
|
6796
|
+
var __accessCheck17 = (obj, member, msg) => {
|
|
6569
6797
|
if (!member.has(obj))
|
|
6570
6798
|
throw TypeError("Cannot " + msg);
|
|
6571
6799
|
};
|
|
6572
|
-
var
|
|
6573
|
-
|
|
6800
|
+
var __privateGet17 = (obj, member, getter) => {
|
|
6801
|
+
__accessCheck17(obj, member, "read from private field");
|
|
6574
6802
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6575
6803
|
};
|
|
6576
|
-
var
|
|
6804
|
+
var __privateAdd17 = (obj, member, value) => {
|
|
6577
6805
|
if (member.has(obj))
|
|
6578
6806
|
throw TypeError("Cannot add the same private member more than once");
|
|
6579
6807
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6580
6808
|
};
|
|
6581
|
-
var
|
|
6582
|
-
|
|
6809
|
+
var __privateSet16 = (obj, member, value, setter) => {
|
|
6810
|
+
__accessCheck17(obj, member, "write to private field");
|
|
6583
6811
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6584
6812
|
return value;
|
|
6585
6813
|
};
|
|
@@ -6643,9 +6871,9 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6643
6871
|
var MediaTimeDisplay = class extends MediaTextDisplay {
|
|
6644
6872
|
constructor() {
|
|
6645
6873
|
super();
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6874
|
+
__privateAdd17(this, _slot4, void 0);
|
|
6875
|
+
__privateSet16(this, _slot4, this.shadowRoot.querySelector("slot"));
|
|
6876
|
+
__privateGet17(this, _slot4).innerHTML = `${formatTimesLabel(this)}`;
|
|
6649
6877
|
}
|
|
6650
6878
|
static get observedAttributes() {
|
|
6651
6879
|
return [...super.observedAttributes, ...CombinedAttributes, "disabled"];
|
|
@@ -6783,8 +7011,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6783
7011
|
update() {
|
|
6784
7012
|
const timesLabel = formatTimesLabel(this);
|
|
6785
7013
|
updateAriaValueText(this);
|
|
6786
|
-
if (timesLabel !==
|
|
6787
|
-
|
|
7014
|
+
if (timesLabel !== __privateGet17(this, _slot4).innerHTML) {
|
|
7015
|
+
__privateGet17(this, _slot4).innerHTML = timesLabel;
|
|
6788
7016
|
}
|
|
6789
7017
|
}
|
|
6790
7018
|
};
|
|
@@ -6793,31 +7021,31 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6793
7021
|
GlobalThis.customElements.define("media-time-display", MediaTimeDisplay);
|
|
6794
7022
|
}
|
|
6795
7023
|
|
|
6796
|
-
// ../../node_modules/
|
|
6797
|
-
var
|
|
7024
|
+
// ../../node_modules/media-chrome/dist/utils/range-animation.js
|
|
7025
|
+
var __accessCheck18 = (obj, member, msg) => {
|
|
6798
7026
|
if (!member.has(obj))
|
|
6799
7027
|
throw TypeError("Cannot " + msg);
|
|
6800
7028
|
};
|
|
6801
|
-
var
|
|
6802
|
-
|
|
7029
|
+
var __privateGet18 = (obj, member, getter) => {
|
|
7030
|
+
__accessCheck18(obj, member, "read from private field");
|
|
6803
7031
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6804
7032
|
};
|
|
6805
|
-
var
|
|
7033
|
+
var __privateAdd18 = (obj, member, value) => {
|
|
6806
7034
|
if (member.has(obj))
|
|
6807
7035
|
throw TypeError("Cannot add the same private member more than once");
|
|
6808
7036
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6809
7037
|
};
|
|
6810
|
-
var
|
|
6811
|
-
|
|
7038
|
+
var __privateSet17 = (obj, member, value, setter) => {
|
|
7039
|
+
__accessCheck18(obj, member, "write to private field");
|
|
6812
7040
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6813
7041
|
return value;
|
|
6814
7042
|
};
|
|
6815
7043
|
var __privateWrapper = (obj, member, setter, getter) => ({
|
|
6816
7044
|
set _(value) {
|
|
6817
|
-
|
|
7045
|
+
__privateSet17(obj, member, value, setter);
|
|
6818
7046
|
},
|
|
6819
7047
|
get _() {
|
|
6820
|
-
return
|
|
7048
|
+
return __privateGet18(obj, member, getter);
|
|
6821
7049
|
}
|
|
6822
7050
|
});
|
|
6823
7051
|
var _range;
|
|
@@ -6832,60 +7060,60 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6832
7060
|
var _animate;
|
|
6833
7061
|
var RangeAnimation = class {
|
|
6834
7062
|
constructor(range, callback, fps) {
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
7063
|
+
__privateAdd18(this, _range, void 0);
|
|
7064
|
+
__privateAdd18(this, _startTime, void 0);
|
|
7065
|
+
__privateAdd18(this, _previousTime, void 0);
|
|
7066
|
+
__privateAdd18(this, _deltaTime, void 0);
|
|
7067
|
+
__privateAdd18(this, _frameCount, void 0);
|
|
7068
|
+
__privateAdd18(this, _updateTimestamp, void 0);
|
|
7069
|
+
__privateAdd18(this, _updateStartValue, void 0);
|
|
7070
|
+
__privateAdd18(this, _lastRangeIncrease, void 0);
|
|
7071
|
+
__privateAdd18(this, _id, 0);
|
|
7072
|
+
__privateAdd18(this, _animate, (now = performance.now()) => {
|
|
7073
|
+
__privateSet17(this, _id, requestAnimationFrame(__privateGet18(this, _animate)));
|
|
7074
|
+
__privateSet17(this, _deltaTime, performance.now() - __privateGet18(this, _previousTime));
|
|
6847
7075
|
const fpsInterval = 1e3 / this.fps;
|
|
6848
|
-
if (
|
|
6849
|
-
|
|
6850
|
-
const fps2 = 1e3 / ((now -
|
|
6851
|
-
const delta = (now -
|
|
6852
|
-
let value =
|
|
6853
|
-
const increase = value -
|
|
7076
|
+
if (__privateGet18(this, _deltaTime) > fpsInterval) {
|
|
7077
|
+
__privateSet17(this, _previousTime, now - __privateGet18(this, _deltaTime) % fpsInterval);
|
|
7078
|
+
const fps2 = 1e3 / ((now - __privateGet18(this, _startTime)) / ++__privateWrapper(this, _frameCount)._);
|
|
7079
|
+
const delta = (now - __privateGet18(this, _updateTimestamp)) / 1e3 / this.duration;
|
|
7080
|
+
let value = __privateGet18(this, _updateStartValue) + delta * this.playbackRate;
|
|
7081
|
+
const increase = value - __privateGet18(this, _range).valueAsNumber;
|
|
6854
7082
|
if (increase > 0) {
|
|
6855
|
-
|
|
7083
|
+
__privateSet17(this, _lastRangeIncrease, this.playbackRate / this.duration / fps2);
|
|
6856
7084
|
} else {
|
|
6857
|
-
|
|
6858
|
-
value =
|
|
7085
|
+
__privateSet17(this, _lastRangeIncrease, 0.995 * __privateGet18(this, _lastRangeIncrease));
|
|
7086
|
+
value = __privateGet18(this, _range).valueAsNumber + __privateGet18(this, _lastRangeIncrease);
|
|
6859
7087
|
}
|
|
6860
7088
|
this.callback(value);
|
|
6861
7089
|
}
|
|
6862
7090
|
});
|
|
6863
|
-
|
|
7091
|
+
__privateSet17(this, _range, range);
|
|
6864
7092
|
this.callback = callback;
|
|
6865
7093
|
this.fps = fps;
|
|
6866
7094
|
}
|
|
6867
7095
|
start() {
|
|
6868
|
-
if (
|
|
7096
|
+
if (__privateGet18(this, _id) !== 0)
|
|
6869
7097
|
return;
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
7098
|
+
__privateSet17(this, _previousTime, performance.now());
|
|
7099
|
+
__privateSet17(this, _startTime, __privateGet18(this, _previousTime));
|
|
7100
|
+
__privateSet17(this, _frameCount, 0);
|
|
7101
|
+
__privateGet18(this, _animate).call(this);
|
|
6874
7102
|
}
|
|
6875
7103
|
stop() {
|
|
6876
|
-
if (
|
|
7104
|
+
if (__privateGet18(this, _id) === 0)
|
|
6877
7105
|
return;
|
|
6878
|
-
cancelAnimationFrame(
|
|
6879
|
-
|
|
7106
|
+
cancelAnimationFrame(__privateGet18(this, _id));
|
|
7107
|
+
__privateSet17(this, _id, 0);
|
|
6880
7108
|
}
|
|
6881
7109
|
update({ start, duration, playbackRate }) {
|
|
6882
|
-
const increase = start -
|
|
7110
|
+
const increase = start - __privateGet18(this, _range).valueAsNumber;
|
|
6883
7111
|
const durationDelta = Math.abs(duration - this.duration);
|
|
6884
7112
|
if (increase > 0 || increase < -0.03 || durationDelta >= 0.5) {
|
|
6885
7113
|
this.callback(start);
|
|
6886
7114
|
}
|
|
6887
|
-
|
|
6888
|
-
|
|
7115
|
+
__privateSet17(this, _updateStartValue, start);
|
|
7116
|
+
__privateSet17(this, _updateTimestamp, performance.now());
|
|
6889
7117
|
this.duration = duration;
|
|
6890
7118
|
this.playbackRate = playbackRate;
|
|
6891
7119
|
}
|
|
@@ -6901,27 +7129,27 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6901
7129
|
_id = /* @__PURE__ */ new WeakMap();
|
|
6902
7130
|
_animate = /* @__PURE__ */ new WeakMap();
|
|
6903
7131
|
|
|
6904
|
-
// ../../node_modules/
|
|
6905
|
-
var
|
|
7132
|
+
// ../../node_modules/media-chrome/dist/media-time-range.js
|
|
7133
|
+
var __accessCheck19 = (obj, member, msg) => {
|
|
6906
7134
|
if (!member.has(obj))
|
|
6907
7135
|
throw TypeError("Cannot " + msg);
|
|
6908
7136
|
};
|
|
6909
|
-
var
|
|
6910
|
-
|
|
7137
|
+
var __privateGet19 = (obj, member, getter) => {
|
|
7138
|
+
__accessCheck19(obj, member, "read from private field");
|
|
6911
7139
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6912
7140
|
};
|
|
6913
|
-
var
|
|
7141
|
+
var __privateAdd19 = (obj, member, value) => {
|
|
6914
7142
|
if (member.has(obj))
|
|
6915
7143
|
throw TypeError("Cannot add the same private member more than once");
|
|
6916
7144
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6917
7145
|
};
|
|
6918
|
-
var
|
|
6919
|
-
|
|
7146
|
+
var __privateSet18 = (obj, member, value, setter) => {
|
|
7147
|
+
__accessCheck19(obj, member, "write to private field");
|
|
6920
7148
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6921
7149
|
return value;
|
|
6922
7150
|
};
|
|
6923
|
-
var
|
|
6924
|
-
|
|
7151
|
+
var __privateMethod6 = (obj, member, method) => {
|
|
7152
|
+
__accessCheck19(obj, member, "access private method");
|
|
6925
7153
|
return method;
|
|
6926
7154
|
};
|
|
6927
7155
|
var _rootNode;
|
|
@@ -6958,8 +7186,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6958
7186
|
const fullPhrase = !(currentTimePhrase && totalTimePhrase) ? DEFAULT_MISSING_TIME_PHRASE2 : `${currentTimePhrase} of ${totalTimePhrase}`;
|
|
6959
7187
|
range.setAttribute("aria-valuetext", fullPhrase);
|
|
6960
7188
|
};
|
|
6961
|
-
var
|
|
6962
|
-
|
|
7189
|
+
var template10 = Document2.createElement("template");
|
|
7190
|
+
template10.innerHTML = /*html*/
|
|
6963
7191
|
`
|
|
6964
7192
|
<style>
|
|
6965
7193
|
:host {
|
|
@@ -6977,8 +7205,11 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
6977
7205
|
contain: layout;
|
|
6978
7206
|
}
|
|
6979
7207
|
|
|
6980
|
-
#
|
|
7208
|
+
#buffered {
|
|
6981
7209
|
background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));
|
|
7210
|
+
position: absolute;
|
|
7211
|
+
height: 100%;
|
|
7212
|
+
will-change: width;
|
|
6982
7213
|
}
|
|
6983
7214
|
|
|
6984
7215
|
#preview-rail,
|
|
@@ -7199,41 +7430,45 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7199
7430
|
var MediaTimeRange = class extends MediaChromeRange {
|
|
7200
7431
|
constructor() {
|
|
7201
7432
|
super();
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7433
|
+
__privateAdd19(this, _toggleRangeAnimation);
|
|
7434
|
+
__privateAdd19(this, _shouldRangeAnimate);
|
|
7435
|
+
__privateAdd19(this, _getElementRects);
|
|
7436
|
+
__privateAdd19(this, _getBoxPosition);
|
|
7437
|
+
__privateAdd19(this, _getBoxShiftPosition);
|
|
7438
|
+
__privateAdd19(this, _handlePointerMove3);
|
|
7439
|
+
__privateAdd19(this, _previewRequest);
|
|
7440
|
+
__privateAdd19(this, _seekRequest);
|
|
7441
|
+
__privateAdd19(this, _rootNode, void 0);
|
|
7442
|
+
__privateAdd19(this, _animation, void 0);
|
|
7443
|
+
__privateAdd19(this, _boxes, void 0);
|
|
7444
|
+
__privateAdd19(this, _previewTime, void 0);
|
|
7445
|
+
__privateAdd19(this, _previewBox, void 0);
|
|
7446
|
+
__privateAdd19(this, _currentBox, void 0);
|
|
7447
|
+
__privateAdd19(this, _boxPaddingLeft, void 0);
|
|
7448
|
+
__privateAdd19(this, _boxPaddingRight, void 0);
|
|
7449
|
+
__privateAdd19(this, _mediaChaptersCues, void 0);
|
|
7450
|
+
__privateAdd19(this, _updateRange, (value) => {
|
|
7220
7451
|
if (this.dragging)
|
|
7221
7452
|
return;
|
|
7222
|
-
|
|
7453
|
+
if (isValidNumber(value)) {
|
|
7454
|
+
this.range.valueAsNumber = value;
|
|
7455
|
+
}
|
|
7223
7456
|
this.updateBar();
|
|
7224
7457
|
});
|
|
7225
|
-
this.container.appendChild(
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7458
|
+
this.container.appendChild(template10.content.cloneNode(true));
|
|
7459
|
+
const track = this.shadowRoot.querySelector("#track");
|
|
7460
|
+
track.insertAdjacentHTML("afterbegin", '<div id="buffered" part="buffered"></div>');
|
|
7461
|
+
__privateSet18(this, _boxes, this.shadowRoot.querySelectorAll('[part~="box"]'));
|
|
7462
|
+
__privateSet18(this, _previewBox, this.shadowRoot.querySelector('[part~="preview-box"]'));
|
|
7463
|
+
__privateSet18(this, _currentBox, this.shadowRoot.querySelector('[part~="current-box"]'));
|
|
7229
7464
|
const computedStyle = getComputedStyle(this);
|
|
7230
|
-
|
|
7465
|
+
__privateSet18(this, _boxPaddingLeft, parseInt(
|
|
7231
7466
|
computedStyle.getPropertyValue("--media-box-padding-left")
|
|
7232
7467
|
));
|
|
7233
|
-
|
|
7468
|
+
__privateSet18(this, _boxPaddingRight, parseInt(
|
|
7234
7469
|
computedStyle.getPropertyValue("--media-box-padding-right")
|
|
7235
7470
|
));
|
|
7236
|
-
|
|
7471
|
+
__privateSet18(this, _animation, new RangeAnimation(this.range, __privateGet19(this, _updateRange), 60));
|
|
7237
7472
|
}
|
|
7238
7473
|
static get observedAttributes() {
|
|
7239
7474
|
return [
|
|
@@ -7255,45 +7490,45 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7255
7490
|
var _a3;
|
|
7256
7491
|
super.connectedCallback();
|
|
7257
7492
|
this.range.setAttribute("aria-label", nouns.SEEK());
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
(_a3 =
|
|
7493
|
+
__privateMethod6(this, _toggleRangeAnimation, toggleRangeAnimation_fn).call(this);
|
|
7494
|
+
__privateSet18(this, _rootNode, this.getRootNode());
|
|
7495
|
+
(_a3 = __privateGet19(this, _rootNode)) == null ? void 0 : _a3.addEventListener("transitionstart", this);
|
|
7261
7496
|
}
|
|
7262
7497
|
disconnectedCallback() {
|
|
7263
7498
|
var _a3;
|
|
7264
7499
|
super.disconnectedCallback();
|
|
7265
|
-
|
|
7266
|
-
(_a3 =
|
|
7267
|
-
|
|
7500
|
+
__privateMethod6(this, _toggleRangeAnimation, toggleRangeAnimation_fn).call(this);
|
|
7501
|
+
(_a3 = __privateGet19(this, _rootNode)) == null ? void 0 : _a3.removeEventListener("transitionstart", this);
|
|
7502
|
+
__privateSet18(this, _rootNode, null);
|
|
7268
7503
|
}
|
|
7269
7504
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
7270
7505
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
7271
7506
|
if (oldValue == newValue)
|
|
7272
7507
|
return;
|
|
7273
7508
|
if (attrName === MediaUIAttributes.MEDIA_CURRENT_TIME || attrName === MediaUIAttributes.MEDIA_PAUSED || attrName === MediaUIAttributes.MEDIA_ENDED || attrName === MediaUIAttributes.MEDIA_LOADING || attrName === MediaUIAttributes.MEDIA_DURATION || attrName === MediaUIAttributes.MEDIA_SEEKABLE) {
|
|
7274
|
-
|
|
7509
|
+
__privateGet19(this, _animation).update({
|
|
7275
7510
|
start: calcRangeValueFromTime(this),
|
|
7276
7511
|
duration: this.mediaSeekableEnd - this.mediaSeekableStart,
|
|
7277
7512
|
playbackRate: this.mediaPlaybackRate
|
|
7278
7513
|
});
|
|
7279
|
-
|
|
7514
|
+
__privateMethod6(this, _toggleRangeAnimation, toggleRangeAnimation_fn).call(this);
|
|
7280
7515
|
updateAriaValueText2(this);
|
|
7281
7516
|
} else if (attrName === MediaUIAttributes.MEDIA_BUFFERED) {
|
|
7282
7517
|
this.updateBufferedBar();
|
|
7283
7518
|
}
|
|
7284
7519
|
if (attrName === MediaUIAttributes.MEDIA_DURATION || attrName === MediaUIAttributes.MEDIA_SEEKABLE) {
|
|
7285
|
-
this.mediaChaptersCues =
|
|
7520
|
+
this.mediaChaptersCues = __privateGet19(this, _mediaChaptersCues);
|
|
7286
7521
|
this.updateBar();
|
|
7287
7522
|
}
|
|
7288
7523
|
}
|
|
7289
7524
|
get mediaChaptersCues() {
|
|
7290
|
-
return
|
|
7525
|
+
return __privateGet19(this, _mediaChaptersCues);
|
|
7291
7526
|
}
|
|
7292
7527
|
set mediaChaptersCues(value) {
|
|
7293
7528
|
var _a3;
|
|
7294
|
-
|
|
7529
|
+
__privateSet18(this, _mediaChaptersCues, value);
|
|
7295
7530
|
this.updateSegments(
|
|
7296
|
-
(_a3 =
|
|
7531
|
+
(_a3 = __privateGet19(this, _mediaChaptersCues)) == null ? void 0 : _a3.map((c) => ({
|
|
7297
7532
|
start: calcRangeValueFromTime(this, c.startTime),
|
|
7298
7533
|
end: calcRangeValueFromTime(this, c.endTime)
|
|
7299
7534
|
}))
|
|
@@ -7441,7 +7676,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7441
7676
|
} else {
|
|
7442
7677
|
relativeBufferedEnd = 1;
|
|
7443
7678
|
}
|
|
7444
|
-
const { style } = getOrInsertCSSRule(this.shadowRoot, "#
|
|
7679
|
+
const { style } = getOrInsertCSSRule(this.shadowRoot, "#buffered");
|
|
7445
7680
|
style.setProperty("width", `${relativeBufferedEnd * 100}%`);
|
|
7446
7681
|
}
|
|
7447
7682
|
updateCurrentBox() {
|
|
@@ -7458,9 +7693,9 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7458
7693
|
this.shadowRoot,
|
|
7459
7694
|
'[part~="current-box"]'
|
|
7460
7695
|
);
|
|
7461
|
-
const rects =
|
|
7462
|
-
const boxPos =
|
|
7463
|
-
const boxShift =
|
|
7696
|
+
const rects = __privateMethod6(this, _getElementRects, getElementRects_fn).call(this, __privateGet19(this, _currentBox));
|
|
7697
|
+
const boxPos = __privateMethod6(this, _getBoxPosition, getBoxPosition_fn).call(this, rects, this.range.valueAsNumber);
|
|
7698
|
+
const boxShift = __privateMethod6(this, _getBoxShiftPosition, getBoxShiftPosition_fn).call(this, rects, this.range.valueAsNumber);
|
|
7464
7699
|
currentRailRule.style.transform = `translateX(${boxPos})`;
|
|
7465
7700
|
currentRailRule.style.setProperty("--_range-width", `${rects.range.width}`);
|
|
7466
7701
|
currentBoxRule.style.setProperty("--_box-shift", `${boxShift}`);
|
|
@@ -7471,18 +7706,18 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7471
7706
|
super.handleEvent(evt);
|
|
7472
7707
|
switch (evt.type) {
|
|
7473
7708
|
case "input":
|
|
7474
|
-
|
|
7709
|
+
__privateMethod6(this, _seekRequest, seekRequest_fn).call(this);
|
|
7475
7710
|
break;
|
|
7476
7711
|
case "pointermove":
|
|
7477
|
-
|
|
7712
|
+
__privateMethod6(this, _handlePointerMove3, handlePointerMove_fn3).call(this, evt);
|
|
7478
7713
|
break;
|
|
7479
7714
|
case "pointerup":
|
|
7480
7715
|
case "pointerleave":
|
|
7481
|
-
|
|
7716
|
+
__privateMethod6(this, _previewRequest, previewRequest_fn).call(this, null);
|
|
7482
7717
|
break;
|
|
7483
7718
|
case "transitionstart":
|
|
7484
7719
|
if (containsComposedNode(evt.target, this)) {
|
|
7485
|
-
setTimeout(() =>
|
|
7720
|
+
setTimeout(() => __privateMethod6(this, _toggleRangeAnimation, toggleRangeAnimation_fn).call(this), 0);
|
|
7486
7721
|
}
|
|
7487
7722
|
break;
|
|
7488
7723
|
}
|
|
@@ -7499,10 +7734,10 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7499
7734
|
_mediaChaptersCues = /* @__PURE__ */ new WeakMap();
|
|
7500
7735
|
_toggleRangeAnimation = /* @__PURE__ */ new WeakSet();
|
|
7501
7736
|
toggleRangeAnimation_fn = function() {
|
|
7502
|
-
if (
|
|
7503
|
-
|
|
7737
|
+
if (__privateMethod6(this, _shouldRangeAnimate, shouldRangeAnimate_fn).call(this)) {
|
|
7738
|
+
__privateGet19(this, _animation).start();
|
|
7504
7739
|
} else {
|
|
7505
|
-
|
|
7740
|
+
__privateGet19(this, _animation).stop();
|
|
7506
7741
|
}
|
|
7507
7742
|
};
|
|
7508
7743
|
_shouldRangeAnimate = /* @__PURE__ */ new WeakSet();
|
|
@@ -7547,23 +7782,23 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7547
7782
|
getBoxShiftPosition_fn = function(rects, ratio) {
|
|
7548
7783
|
const { width, min, max } = rects.box;
|
|
7549
7784
|
const pointerX = ratio * rects.range.width;
|
|
7550
|
-
if (pointerX < min +
|
|
7551
|
-
const offset = rects.range.left - rects.bounds.left -
|
|
7785
|
+
if (pointerX < min + __privateGet19(this, _boxPaddingLeft)) {
|
|
7786
|
+
const offset = rects.range.left - rects.bounds.left - __privateGet19(this, _boxPaddingLeft);
|
|
7552
7787
|
return `${pointerX - width / 2 + offset}px`;
|
|
7553
7788
|
}
|
|
7554
|
-
if (pointerX > max -
|
|
7555
|
-
const offset = rects.bounds.right - rects.range.right -
|
|
7789
|
+
if (pointerX > max - __privateGet19(this, _boxPaddingRight)) {
|
|
7790
|
+
const offset = rects.bounds.right - rects.range.right - __privateGet19(this, _boxPaddingRight);
|
|
7556
7791
|
return `${pointerX + width / 2 - offset - rects.range.width}px`;
|
|
7557
7792
|
}
|
|
7558
7793
|
return 0;
|
|
7559
7794
|
};
|
|
7560
7795
|
_handlePointerMove3 = /* @__PURE__ */ new WeakSet();
|
|
7561
7796
|
handlePointerMove_fn3 = function(evt) {
|
|
7562
|
-
const isOverBoxes = [...
|
|
7797
|
+
const isOverBoxes = [...__privateGet19(this, _boxes)].some(
|
|
7563
7798
|
(b) => evt.composedPath().includes(b)
|
|
7564
7799
|
);
|
|
7565
7800
|
if (!this.dragging && (isOverBoxes || !evt.composedPath().includes(this))) {
|
|
7566
|
-
|
|
7801
|
+
__privateMethod6(this, _previewRequest, previewRequest_fn).call(this, null);
|
|
7567
7802
|
return;
|
|
7568
7803
|
}
|
|
7569
7804
|
const duration = this.mediaSeekableEnd;
|
|
@@ -7577,20 +7812,20 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7577
7812
|
this.shadowRoot,
|
|
7578
7813
|
'[part~="preview-box"]'
|
|
7579
7814
|
);
|
|
7580
|
-
const rects =
|
|
7815
|
+
const rects = __privateMethod6(this, _getElementRects, getElementRects_fn).call(this, __privateGet19(this, _previewBox));
|
|
7581
7816
|
let pointerRatio = (evt.clientX - rects.range.left) / rects.range.width;
|
|
7582
7817
|
pointerRatio = Math.max(0, Math.min(1, pointerRatio));
|
|
7583
|
-
const boxPos =
|
|
7584
|
-
const boxShift =
|
|
7818
|
+
const boxPos = __privateMethod6(this, _getBoxPosition, getBoxPosition_fn).call(this, rects, pointerRatio);
|
|
7819
|
+
const boxShift = __privateMethod6(this, _getBoxShiftPosition, getBoxShiftPosition_fn).call(this, rects, pointerRatio);
|
|
7585
7820
|
previewRailRule.style.transform = `translateX(${boxPos})`;
|
|
7586
7821
|
previewRailRule.style.setProperty("--_range-width", `${rects.range.width}`);
|
|
7587
7822
|
previewBoxRule.style.setProperty("--_box-shift", `${boxShift}`);
|
|
7588
7823
|
previewBoxRule.style.setProperty("--_box-width", `${rects.box.width}px`);
|
|
7589
|
-
const diff = Math.round(
|
|
7824
|
+
const diff = Math.round(__privateGet19(this, _previewTime)) - Math.round(pointerRatio * duration);
|
|
7590
7825
|
if (Math.abs(diff) < 1 && pointerRatio > 0.01 && pointerRatio < 0.99)
|
|
7591
7826
|
return;
|
|
7592
|
-
|
|
7593
|
-
|
|
7827
|
+
__privateSet18(this, _previewTime, pointerRatio * duration);
|
|
7828
|
+
__privateMethod6(this, _previewRequest, previewRequest_fn).call(this, __privateGet19(this, _previewTime));
|
|
7594
7829
|
};
|
|
7595
7830
|
_previewRequest = /* @__PURE__ */ new WeakSet();
|
|
7596
7831
|
previewRequest_fn = function(detail) {
|
|
@@ -7604,7 +7839,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7604
7839
|
};
|
|
7605
7840
|
_seekRequest = /* @__PURE__ */ new WeakSet();
|
|
7606
7841
|
seekRequest_fn = function() {
|
|
7607
|
-
|
|
7842
|
+
__privateGet19(this, _animation).stop();
|
|
7608
7843
|
const detail = calcTimeFromRangeValue(this);
|
|
7609
7844
|
this.dispatchEvent(
|
|
7610
7845
|
new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_SEEK_REQUEST, {
|
|
@@ -7618,13 +7853,13 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7618
7853
|
GlobalThis.customElements.define("media-time-range", MediaTimeRange);
|
|
7619
7854
|
}
|
|
7620
7855
|
|
|
7621
|
-
// ../../node_modules/
|
|
7856
|
+
// ../../node_modules/media-chrome/dist/media-tooltip.js
|
|
7622
7857
|
var Attributes11 = {
|
|
7623
7858
|
PLACEMENT: "placement",
|
|
7624
7859
|
BOUNDS: "bounds"
|
|
7625
7860
|
};
|
|
7626
|
-
var
|
|
7627
|
-
|
|
7861
|
+
var template11 = Document2.createElement("template");
|
|
7862
|
+
template11.innerHTML = /*html*/
|
|
7628
7863
|
`
|
|
7629
7864
|
<style>
|
|
7630
7865
|
:host {
|
|
@@ -7741,6 +7976,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7741
7976
|
super();
|
|
7742
7977
|
this.updateXOffset = () => {
|
|
7743
7978
|
var _a3;
|
|
7979
|
+
if (!isElementVisible(this, { checkOpacity: false, checkVisibilityCSS: false }))
|
|
7980
|
+
return;
|
|
7744
7981
|
const placement = this.placement;
|
|
7745
7982
|
if (placement === "left" || placement === "right") {
|
|
7746
7983
|
this.style.removeProperty("--media-tooltip-offset-x");
|
|
@@ -7776,7 +8013,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7776
8013
|
};
|
|
7777
8014
|
if (!this.shadowRoot) {
|
|
7778
8015
|
this.attachShadow({ mode: "open" });
|
|
7779
|
-
this.shadowRoot.appendChild(
|
|
8016
|
+
this.shadowRoot.appendChild(template11.content.cloneNode(true));
|
|
7780
8017
|
}
|
|
7781
8018
|
this.arrowEl = this.shadowRoot.querySelector("#arrow");
|
|
7782
8019
|
if (Object.prototype.hasOwnProperty.call(this, "placement")) {
|
|
@@ -7812,14 +8049,14 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7812
8049
|
GlobalThis.customElements.define("media-tooltip", MediaTooltip);
|
|
7813
8050
|
}
|
|
7814
8051
|
|
|
7815
|
-
// ../../node_modules/
|
|
8052
|
+
// ../../node_modules/media-chrome/dist/media-volume-range.js
|
|
7816
8053
|
var DEFAULT_VOLUME = 1;
|
|
7817
8054
|
var toVolume = (el) => {
|
|
7818
8055
|
if (el.mediaMuted)
|
|
7819
8056
|
return 0;
|
|
7820
8057
|
return el.mediaVolume;
|
|
7821
8058
|
};
|
|
7822
|
-
var formatAsPercentString = (
|
|
8059
|
+
var formatAsPercentString = (value) => `${Math.round(value * 100)}%`;
|
|
7823
8060
|
var MediaVolumeRange = class extends MediaChromeRange {
|
|
7824
8061
|
static get observedAttributes() {
|
|
7825
8062
|
return [
|
|
@@ -7854,7 +8091,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7854
8091
|
this.range.valueAsNumber = toVolume(this);
|
|
7855
8092
|
this.range.setAttribute(
|
|
7856
8093
|
"aria-valuetext",
|
|
7857
|
-
formatAsPercentString(this.range)
|
|
8094
|
+
formatAsPercentString(this.range.valueAsNumber)
|
|
7858
8095
|
);
|
|
7859
8096
|
this.updateBar();
|
|
7860
8097
|
}
|
|
@@ -7891,22 +8128,22 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7891
8128
|
GlobalThis.customElements.define("media-volume-range", MediaVolumeRange);
|
|
7892
8129
|
}
|
|
7893
8130
|
|
|
7894
|
-
// ../../node_modules/
|
|
7895
|
-
var
|
|
8131
|
+
// ../../node_modules/media-chrome/dist/utils/template-parts.js
|
|
8132
|
+
var __accessCheck20 = (obj, member, msg) => {
|
|
7896
8133
|
if (!member.has(obj))
|
|
7897
8134
|
throw TypeError("Cannot " + msg);
|
|
7898
8135
|
};
|
|
7899
|
-
var
|
|
7900
|
-
|
|
8136
|
+
var __privateGet20 = (obj, member, getter) => {
|
|
8137
|
+
__accessCheck20(obj, member, "read from private field");
|
|
7901
8138
|
return getter ? getter.call(obj) : member.get(obj);
|
|
7902
8139
|
};
|
|
7903
|
-
var
|
|
8140
|
+
var __privateAdd20 = (obj, member, value) => {
|
|
7904
8141
|
if (member.has(obj))
|
|
7905
8142
|
throw TypeError("Cannot add the same private member more than once");
|
|
7906
8143
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
7907
8144
|
};
|
|
7908
|
-
var
|
|
7909
|
-
|
|
8145
|
+
var __privateSet19 = (obj, member, value, setter) => {
|
|
8146
|
+
__accessCheck20(obj, member, "write to private field");
|
|
7910
8147
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
7911
8148
|
return value;
|
|
7912
8149
|
};
|
|
@@ -7943,19 +8180,19 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
7943
8180
|
}
|
|
7944
8181
|
};
|
|
7945
8182
|
var TemplateInstance = class extends GlobalThis.DocumentFragment {
|
|
7946
|
-
constructor(
|
|
8183
|
+
constructor(template18, state, processor2 = defaultProcessor) {
|
|
7947
8184
|
var _a3;
|
|
7948
8185
|
super();
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
this.append(
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
(_a3 = processor2.createCallback) == null ? void 0 : _a3.call(processor2, this,
|
|
7955
|
-
processor2.processCallback(this,
|
|
8186
|
+
__privateAdd20(this, _parts, void 0);
|
|
8187
|
+
__privateAdd20(this, _processor, void 0);
|
|
8188
|
+
this.append(template18.content.cloneNode(true));
|
|
8189
|
+
__privateSet19(this, _parts, parse(this));
|
|
8190
|
+
__privateSet19(this, _processor, processor2);
|
|
8191
|
+
(_a3 = processor2.createCallback) == null ? void 0 : _a3.call(processor2, this, __privateGet20(this, _parts), state);
|
|
8192
|
+
processor2.processCallback(this, __privateGet20(this, _parts), state);
|
|
7956
8193
|
}
|
|
7957
8194
|
update(state) {
|
|
7958
|
-
|
|
8195
|
+
__privateGet20(this, _processor).processCallback(this, __privateGet20(this, _parts), state);
|
|
7959
8196
|
}
|
|
7960
8197
|
};
|
|
7961
8198
|
_parts = /* @__PURE__ */ new WeakMap();
|
|
@@ -8044,87 +8281,87 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8044
8281
|
var attrPartToList = /* @__PURE__ */ new WeakMap();
|
|
8045
8282
|
var AttrPartList = class {
|
|
8046
8283
|
constructor() {
|
|
8047
|
-
|
|
8284
|
+
__privateAdd20(this, _items, []);
|
|
8048
8285
|
}
|
|
8049
8286
|
[Symbol.iterator]() {
|
|
8050
|
-
return
|
|
8287
|
+
return __privateGet20(this, _items).values();
|
|
8051
8288
|
}
|
|
8052
8289
|
get length() {
|
|
8053
|
-
return
|
|
8290
|
+
return __privateGet20(this, _items).length;
|
|
8054
8291
|
}
|
|
8055
8292
|
item(index) {
|
|
8056
|
-
return
|
|
8293
|
+
return __privateGet20(this, _items)[index];
|
|
8057
8294
|
}
|
|
8058
8295
|
append(...items) {
|
|
8059
8296
|
for (const item of items) {
|
|
8060
8297
|
if (item instanceof AttrPart) {
|
|
8061
8298
|
attrPartToList.set(item, this);
|
|
8062
8299
|
}
|
|
8063
|
-
|
|
8300
|
+
__privateGet20(this, _items).push(item);
|
|
8064
8301
|
}
|
|
8065
8302
|
}
|
|
8066
8303
|
toString() {
|
|
8067
|
-
return
|
|
8304
|
+
return __privateGet20(this, _items).join("");
|
|
8068
8305
|
}
|
|
8069
8306
|
};
|
|
8070
8307
|
_items = /* @__PURE__ */ new WeakMap();
|
|
8071
8308
|
var AttrPart = class extends Part {
|
|
8072
8309
|
constructor(element, attributeName, namespaceURI) {
|
|
8073
8310
|
super();
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8311
|
+
__privateAdd20(this, _list);
|
|
8312
|
+
__privateAdd20(this, _value, "");
|
|
8313
|
+
__privateAdd20(this, _element, void 0);
|
|
8314
|
+
__privateAdd20(this, _attributeName, void 0);
|
|
8315
|
+
__privateAdd20(this, _namespaceURI, void 0);
|
|
8316
|
+
__privateSet19(this, _element, element);
|
|
8317
|
+
__privateSet19(this, _attributeName, attributeName);
|
|
8318
|
+
__privateSet19(this, _namespaceURI, namespaceURI);
|
|
8082
8319
|
}
|
|
8083
8320
|
get attributeName() {
|
|
8084
|
-
return
|
|
8321
|
+
return __privateGet20(this, _attributeName);
|
|
8085
8322
|
}
|
|
8086
8323
|
get attributeNamespace() {
|
|
8087
|
-
return
|
|
8324
|
+
return __privateGet20(this, _namespaceURI);
|
|
8088
8325
|
}
|
|
8089
8326
|
get element() {
|
|
8090
|
-
return
|
|
8327
|
+
return __privateGet20(this, _element);
|
|
8091
8328
|
}
|
|
8092
8329
|
get value() {
|
|
8093
|
-
return
|
|
8330
|
+
return __privateGet20(this, _value);
|
|
8094
8331
|
}
|
|
8095
8332
|
set value(newValue) {
|
|
8096
|
-
if (
|
|
8333
|
+
if (__privateGet20(this, _value) === newValue)
|
|
8097
8334
|
return;
|
|
8098
|
-
|
|
8099
|
-
if (!
|
|
8335
|
+
__privateSet19(this, _value, newValue);
|
|
8336
|
+
if (!__privateGet20(this, _list, list_get) || __privateGet20(this, _list, list_get).length === 1) {
|
|
8100
8337
|
if (newValue == null) {
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8338
|
+
__privateGet20(this, _element).removeAttributeNS(
|
|
8339
|
+
__privateGet20(this, _namespaceURI),
|
|
8340
|
+
__privateGet20(this, _attributeName)
|
|
8104
8341
|
);
|
|
8105
8342
|
} else {
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8343
|
+
__privateGet20(this, _element).setAttributeNS(
|
|
8344
|
+
__privateGet20(this, _namespaceURI),
|
|
8345
|
+
__privateGet20(this, _attributeName),
|
|
8109
8346
|
newValue
|
|
8110
8347
|
);
|
|
8111
8348
|
}
|
|
8112
8349
|
} else {
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8350
|
+
__privateGet20(this, _element).setAttributeNS(
|
|
8351
|
+
__privateGet20(this, _namespaceURI),
|
|
8352
|
+
__privateGet20(this, _attributeName),
|
|
8353
|
+
__privateGet20(this, _list, list_get).toString()
|
|
8117
8354
|
);
|
|
8118
8355
|
}
|
|
8119
8356
|
}
|
|
8120
8357
|
get booleanValue() {
|
|
8121
|
-
return
|
|
8122
|
-
|
|
8123
|
-
|
|
8358
|
+
return __privateGet20(this, _element).hasAttributeNS(
|
|
8359
|
+
__privateGet20(this, _namespaceURI),
|
|
8360
|
+
__privateGet20(this, _attributeName)
|
|
8124
8361
|
);
|
|
8125
8362
|
}
|
|
8126
8363
|
set booleanValue(value) {
|
|
8127
|
-
if (!
|
|
8364
|
+
if (!__privateGet20(this, _list, list_get) || __privateGet20(this, _list, list_get).length === 1)
|
|
8128
8365
|
this.value = value ? "" : null;
|
|
8129
8366
|
else
|
|
8130
8367
|
throw new DOMException("Value is not fully templatized");
|
|
@@ -8141,26 +8378,26 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8141
8378
|
var ChildNodePart = class extends Part {
|
|
8142
8379
|
constructor(parentNode, nodes) {
|
|
8143
8380
|
super();
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8381
|
+
__privateAdd20(this, _parentNode, void 0);
|
|
8382
|
+
__privateAdd20(this, _nodes, void 0);
|
|
8383
|
+
__privateSet19(this, _parentNode, parentNode);
|
|
8384
|
+
__privateSet19(this, _nodes, nodes ? [...nodes] : [new Text()]);
|
|
8148
8385
|
}
|
|
8149
8386
|
get replacementNodes() {
|
|
8150
|
-
return
|
|
8387
|
+
return __privateGet20(this, _nodes);
|
|
8151
8388
|
}
|
|
8152
8389
|
get parentNode() {
|
|
8153
|
-
return
|
|
8390
|
+
return __privateGet20(this, _parentNode);
|
|
8154
8391
|
}
|
|
8155
8392
|
get nextSibling() {
|
|
8156
|
-
return
|
|
8393
|
+
return __privateGet20(this, _nodes)[__privateGet20(this, _nodes).length - 1].nextSibling;
|
|
8157
8394
|
}
|
|
8158
8395
|
get previousSibling() {
|
|
8159
|
-
return
|
|
8396
|
+
return __privateGet20(this, _nodes)[0].previousSibling;
|
|
8160
8397
|
}
|
|
8161
8398
|
// FIXME: not sure why do we need string serialization here? Just because parent class has type DOMString?
|
|
8162
8399
|
get value() {
|
|
8163
|
-
return
|
|
8400
|
+
return __privateGet20(this, _nodes).map((node) => node.textContent).join("");
|
|
8164
8401
|
}
|
|
8165
8402
|
set value(newValue) {
|
|
8166
8403
|
this.replace(newValue);
|
|
@@ -8171,9 +8408,9 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8171
8408
|
);
|
|
8172
8409
|
if (!normalisedNodes.length)
|
|
8173
8410
|
normalisedNodes.push(new Text());
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
|
|
8411
|
+
__privateSet19(this, _nodes, swapdom(
|
|
8412
|
+
__privateGet20(this, _nodes)[0].parentNode,
|
|
8413
|
+
__privateGet20(this, _nodes),
|
|
8177
8414
|
normalisedNodes,
|
|
8178
8415
|
this.nextSibling
|
|
8179
8416
|
));
|
|
@@ -8182,14 +8419,14 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8182
8419
|
_parentNode = /* @__PURE__ */ new WeakMap();
|
|
8183
8420
|
_nodes = /* @__PURE__ */ new WeakMap();
|
|
8184
8421
|
var InnerTemplatePart = class extends ChildNodePart {
|
|
8185
|
-
constructor(parentNode,
|
|
8186
|
-
const directive =
|
|
8187
|
-
let expression =
|
|
8422
|
+
constructor(parentNode, template18) {
|
|
8423
|
+
const directive = template18.getAttribute("directive") || template18.getAttribute("type");
|
|
8424
|
+
let expression = template18.getAttribute("expression") || template18.getAttribute(directive) || "";
|
|
8188
8425
|
if (expression.startsWith("{{"))
|
|
8189
8426
|
expression = expression.trim().slice(2, -2).trim();
|
|
8190
8427
|
super(parentNode);
|
|
8191
8428
|
this.expression = expression;
|
|
8192
|
-
this.template =
|
|
8429
|
+
this.template = template18;
|
|
8193
8430
|
this.directive = directive;
|
|
8194
8431
|
}
|
|
8195
8432
|
};
|
|
@@ -8222,13 +8459,13 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8222
8459
|
return b;
|
|
8223
8460
|
}
|
|
8224
8461
|
|
|
8225
|
-
// ../../node_modules/
|
|
8462
|
+
// ../../node_modules/media-chrome/dist/utils/template-processor.js
|
|
8226
8463
|
var pipeModifiers = {
|
|
8227
8464
|
string: (value) => String(value)
|
|
8228
8465
|
};
|
|
8229
8466
|
var PartialTemplate = class {
|
|
8230
|
-
constructor(
|
|
8231
|
-
this.template =
|
|
8467
|
+
constructor(template18) {
|
|
8468
|
+
this.template = template18;
|
|
8232
8469
|
this.state = void 0;
|
|
8233
8470
|
}
|
|
8234
8471
|
};
|
|
@@ -8449,27 +8686,27 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8449
8686
|
return tokens;
|
|
8450
8687
|
}
|
|
8451
8688
|
|
|
8452
|
-
// ../../node_modules/
|
|
8453
|
-
var
|
|
8689
|
+
// ../../node_modules/media-chrome/dist/media-theme-element.js
|
|
8690
|
+
var __accessCheck21 = (obj, member, msg) => {
|
|
8454
8691
|
if (!member.has(obj))
|
|
8455
8692
|
throw TypeError("Cannot " + msg);
|
|
8456
8693
|
};
|
|
8457
|
-
var
|
|
8458
|
-
|
|
8694
|
+
var __privateGet21 = (obj, member, getter) => {
|
|
8695
|
+
__accessCheck21(obj, member, "read from private field");
|
|
8459
8696
|
return getter ? getter.call(obj) : member.get(obj);
|
|
8460
8697
|
};
|
|
8461
|
-
var
|
|
8698
|
+
var __privateAdd21 = (obj, member, value) => {
|
|
8462
8699
|
if (member.has(obj))
|
|
8463
8700
|
throw TypeError("Cannot add the same private member more than once");
|
|
8464
8701
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
8465
8702
|
};
|
|
8466
|
-
var
|
|
8467
|
-
|
|
8703
|
+
var __privateSet20 = (obj, member, value, setter) => {
|
|
8704
|
+
__accessCheck21(obj, member, "write to private field");
|
|
8468
8705
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
8469
8706
|
return value;
|
|
8470
8707
|
};
|
|
8471
|
-
var
|
|
8472
|
-
|
|
8708
|
+
var __privateMethod7 = (obj, member, method) => {
|
|
8709
|
+
__accessCheck21(obj, member, "access private method");
|
|
8473
8710
|
return method;
|
|
8474
8711
|
};
|
|
8475
8712
|
var _template;
|
|
@@ -8519,11 +8756,11 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8519
8756
|
var MediaThemeElement = class extends GlobalThis.HTMLElement {
|
|
8520
8757
|
constructor() {
|
|
8521
8758
|
super();
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8759
|
+
__privateAdd21(this, _upgradeProperty);
|
|
8760
|
+
__privateAdd21(this, _updateTemplate);
|
|
8761
|
+
__privateAdd21(this, _template, void 0);
|
|
8762
|
+
__privateAdd21(this, _prevTemplate, void 0);
|
|
8763
|
+
__privateAdd21(this, _prevTemplateId, void 0);
|
|
8527
8764
|
if (this.shadowRoot) {
|
|
8528
8765
|
this.renderRoot = this.shadowRoot;
|
|
8529
8766
|
} else {
|
|
@@ -8558,7 +8795,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8558
8795
|
MediaStateChangeEvents.BREAKPOINTS_COMPUTED,
|
|
8559
8796
|
this.render
|
|
8560
8797
|
);
|
|
8561
|
-
|
|
8798
|
+
__privateMethod7(this, _upgradeProperty, upgradeProperty_fn).call(this, "template");
|
|
8562
8799
|
}
|
|
8563
8800
|
/** @type {HTMLElement & { breakpointsComputed?: boolean }} */
|
|
8564
8801
|
get mediaController() {
|
|
@@ -8566,16 +8803,16 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8566
8803
|
}
|
|
8567
8804
|
get template() {
|
|
8568
8805
|
var _a3;
|
|
8569
|
-
return (_a3 =
|
|
8806
|
+
return (_a3 = __privateGet21(this, _template)) != null ? _a3 : this.constructor.template;
|
|
8570
8807
|
}
|
|
8571
8808
|
set template(element) {
|
|
8572
|
-
|
|
8573
|
-
|
|
8809
|
+
__privateSet20(this, _prevTemplateId, null);
|
|
8810
|
+
__privateSet20(this, _template, element);
|
|
8574
8811
|
this.createRenderer();
|
|
8575
8812
|
}
|
|
8576
8813
|
get props() {
|
|
8577
8814
|
var _a3, _b2, _c;
|
|
8578
|
-
const
|
|
8815
|
+
const observedAttributes2 = [
|
|
8579
8816
|
...Array.from((_b2 = (_a3 = this.mediaController) == null ? void 0 : _a3.attributes) != null ? _b2 : []).filter(
|
|
8580
8817
|
({ name }) => {
|
|
8581
8818
|
return observedMediaAttributes[name] || name.startsWith("breakpoint");
|
|
@@ -8584,7 +8821,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8584
8821
|
...Array.from(this.attributes)
|
|
8585
8822
|
];
|
|
8586
8823
|
const props = {};
|
|
8587
|
-
for (const attr of
|
|
8824
|
+
for (const attr of observedAttributes2) {
|
|
8588
8825
|
const name = (_c = observedMediaAttributes[attr.name]) != null ? _c : camelCase(attr.name);
|
|
8589
8826
|
let { value } = attr;
|
|
8590
8827
|
if (value != null) {
|
|
@@ -8600,15 +8837,15 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8600
8837
|
}
|
|
8601
8838
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
8602
8839
|
if (attrName === "template" && oldValue != newValue) {
|
|
8603
|
-
|
|
8840
|
+
__privateMethod7(this, _updateTemplate, updateTemplate_fn).call(this);
|
|
8604
8841
|
}
|
|
8605
8842
|
}
|
|
8606
8843
|
connectedCallback() {
|
|
8607
|
-
|
|
8844
|
+
__privateMethod7(this, _updateTemplate, updateTemplate_fn).call(this);
|
|
8608
8845
|
}
|
|
8609
8846
|
createRenderer() {
|
|
8610
|
-
if (this.template && this.template !==
|
|
8611
|
-
|
|
8847
|
+
if (this.template && this.template !== __privateGet21(this, _prevTemplate)) {
|
|
8848
|
+
__privateSet20(this, _prevTemplate, this.template);
|
|
8612
8849
|
this.renderer = new TemplateInstance(
|
|
8613
8850
|
this.template,
|
|
8614
8851
|
this.props,
|
|
@@ -8625,9 +8862,11 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8625
8862
|
render() {
|
|
8626
8863
|
var _a3;
|
|
8627
8864
|
(_a3 = this.renderer) == null ? void 0 : _a3.update(this.props);
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
style.
|
|
8865
|
+
if (this.renderRoot.isConnected) {
|
|
8866
|
+
const { style } = getOrInsertCSSRule(this.renderRoot, ":host");
|
|
8867
|
+
if (style.visibility === "hidden") {
|
|
8868
|
+
style.removeProperty("visibility");
|
|
8869
|
+
}
|
|
8631
8870
|
}
|
|
8632
8871
|
}
|
|
8633
8872
|
};
|
|
@@ -8646,22 +8885,22 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8646
8885
|
updateTemplate_fn = function() {
|
|
8647
8886
|
var _a3;
|
|
8648
8887
|
const templateId = this.getAttribute("template");
|
|
8649
|
-
if (!templateId || templateId ===
|
|
8888
|
+
if (!templateId || templateId === __privateGet21(this, _prevTemplateId))
|
|
8650
8889
|
return;
|
|
8651
8890
|
const rootNode = this.getRootNode();
|
|
8652
|
-
const
|
|
8653
|
-
if (
|
|
8654
|
-
|
|
8655
|
-
|
|
8891
|
+
const template18 = (_a3 = rootNode == null ? void 0 : rootNode.getElementById) == null ? void 0 : _a3.call(rootNode, templateId);
|
|
8892
|
+
if (template18) {
|
|
8893
|
+
__privateSet20(this, _prevTemplateId, templateId);
|
|
8894
|
+
__privateSet20(this, _template, template18);
|
|
8656
8895
|
this.createRenderer();
|
|
8657
8896
|
return;
|
|
8658
8897
|
}
|
|
8659
8898
|
if (isValidUrl(templateId)) {
|
|
8660
|
-
|
|
8899
|
+
__privateSet20(this, _prevTemplateId, templateId);
|
|
8661
8900
|
request(templateId).then((data) => {
|
|
8662
8901
|
const template22 = Document2.createElement("template");
|
|
8663
8902
|
template22.innerHTML = data;
|
|
8664
|
-
|
|
8903
|
+
__privateSet20(this, _template, template22);
|
|
8665
8904
|
this.createRenderer();
|
|
8666
8905
|
}).catch(console.error);
|
|
8667
8906
|
}
|
|
@@ -8692,7 +8931,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8692
8931
|
GlobalThis.customElements.define("media-theme", MediaThemeElement);
|
|
8693
8932
|
}
|
|
8694
8933
|
|
|
8695
|
-
// ../../node_modules/
|
|
8934
|
+
// ../../node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
8696
8935
|
function computePosition({
|
|
8697
8936
|
anchor,
|
|
8698
8937
|
floating,
|
|
@@ -8717,8 +8956,9 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8717
8956
|
};
|
|
8718
8957
|
}
|
|
8719
8958
|
function getRectRelativeToOffsetParent(element, offsetParent) {
|
|
8959
|
+
var _a3;
|
|
8720
8960
|
const rect = element.getBoundingClientRect();
|
|
8721
|
-
const offsetRect = offsetParent.getBoundingClientRect();
|
|
8961
|
+
const offsetRect = (_a3 = offsetParent == null ? void 0 : offsetParent.getBoundingClientRect()) != null ? _a3 : { x: 0, y: 0 };
|
|
8722
8962
|
return {
|
|
8723
8963
|
x: rect.x - offsetRect.x,
|
|
8724
8964
|
y: rect.y - offsetRect.y,
|
|
@@ -8767,7 +9007,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8767
9007
|
return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
|
|
8768
9008
|
}
|
|
8769
9009
|
|
|
8770
|
-
// ../../node_modules/
|
|
9010
|
+
// ../../node_modules/media-chrome/dist/utils/events.js
|
|
8771
9011
|
var InvokeEvent = class extends Event {
|
|
8772
9012
|
/**
|
|
8773
9013
|
* @param init - The event options.
|
|
@@ -8789,37 +9029,36 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8789
9029
|
}
|
|
8790
9030
|
};
|
|
8791
9031
|
|
|
8792
|
-
// ../../node_modules/
|
|
8793
|
-
var
|
|
9032
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
9033
|
+
var __accessCheck22 = (obj, member, msg) => {
|
|
8794
9034
|
if (!member.has(obj))
|
|
8795
9035
|
throw TypeError("Cannot " + msg);
|
|
8796
9036
|
};
|
|
8797
|
-
var
|
|
8798
|
-
|
|
9037
|
+
var __privateGet22 = (obj, member, getter) => {
|
|
9038
|
+
__accessCheck22(obj, member, "read from private field");
|
|
8799
9039
|
return getter ? getter.call(obj) : member.get(obj);
|
|
8800
9040
|
};
|
|
8801
|
-
var
|
|
9041
|
+
var __privateAdd22 = (obj, member, value) => {
|
|
8802
9042
|
if (member.has(obj))
|
|
8803
9043
|
throw TypeError("Cannot add the same private member more than once");
|
|
8804
9044
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
8805
9045
|
};
|
|
8806
|
-
var
|
|
8807
|
-
|
|
9046
|
+
var __privateSet21 = (obj, member, value, setter) => {
|
|
9047
|
+
__accessCheck22(obj, member, "write to private field");
|
|
8808
9048
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
8809
9049
|
return value;
|
|
8810
9050
|
};
|
|
8811
|
-
var
|
|
8812
|
-
|
|
9051
|
+
var __privateMethod8 = (obj, member, method) => {
|
|
9052
|
+
__accessCheck22(obj, member, "access private method");
|
|
8813
9053
|
return method;
|
|
8814
9054
|
};
|
|
8815
9055
|
var _mediaController8;
|
|
8816
9056
|
var _previouslyFocused2;
|
|
8817
9057
|
var _invokerElement2;
|
|
8818
|
-
var _keysSoFar;
|
|
8819
|
-
var _clearKeysTimeout;
|
|
8820
9058
|
var _previousItems;
|
|
8821
9059
|
var _mutationObserver;
|
|
8822
9060
|
var _isPopover;
|
|
9061
|
+
var _cssRule;
|
|
8823
9062
|
var _handleSlotChange;
|
|
8824
9063
|
var handleSlotChange_fn;
|
|
8825
9064
|
var _handleMenuItems;
|
|
@@ -8893,8 +9132,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8893
9132
|
}
|
|
8894
9133
|
return "";
|
|
8895
9134
|
}
|
|
8896
|
-
var
|
|
8897
|
-
|
|
9135
|
+
var template12 = Document2.createElement("template");
|
|
9136
|
+
template12.innerHTML = /*html*/
|
|
8898
9137
|
`
|
|
8899
9138
|
<style>
|
|
8900
9139
|
:host {
|
|
@@ -8927,6 +9166,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8927
9166
|
""}
|
|
8928
9167
|
min-height: 0;
|
|
8929
9168
|
position: relative;
|
|
9169
|
+
bottom: var(--_menu-bottom);
|
|
8930
9170
|
box-sizing: border-box;
|
|
8931
9171
|
}
|
|
8932
9172
|
|
|
@@ -8966,27 +9206,30 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
8966
9206
|
transform: translate(-100%, 0);
|
|
8967
9207
|
}
|
|
8968
9208
|
|
|
8969
|
-
|
|
8970
|
-
display: flex;
|
|
8971
|
-
padding: .4em .7em;
|
|
8972
|
-
border-bottom: 1px solid rgb(255 255 255 / .25);
|
|
8973
|
-
cursor: default;
|
|
8974
|
-
}
|
|
8975
|
-
|
|
8976
|
-
slot[name="header"][hidden] {
|
|
8977
|
-
display: none;
|
|
8978
|
-
}
|
|
8979
|
-
|
|
8980
|
-
button[part~="back"] {
|
|
9209
|
+
button {
|
|
8981
9210
|
background: none;
|
|
8982
9211
|
color: inherit;
|
|
8983
9212
|
border: none;
|
|
8984
9213
|
padding: 0;
|
|
8985
9214
|
font: inherit;
|
|
8986
|
-
cursor: pointer;
|
|
8987
9215
|
outline: inherit;
|
|
8988
9216
|
display: inline-flex;
|
|
8989
9217
|
align-items: center;
|
|
9218
|
+
}
|
|
9219
|
+
|
|
9220
|
+
slot[name="header"][hidden] {
|
|
9221
|
+
display: none;
|
|
9222
|
+
}
|
|
9223
|
+
|
|
9224
|
+
slot[name="header"] > *,
|
|
9225
|
+
slot[name="header"]::slotted(*) {
|
|
9226
|
+
padding: .4em .7em;
|
|
9227
|
+
border-bottom: 1px solid rgb(255 255 255 / .25);
|
|
9228
|
+
cursor: default;
|
|
9229
|
+
}
|
|
9230
|
+
|
|
9231
|
+
slot[name="header"] > button[part~="back"],
|
|
9232
|
+
slot[name="header"]::slotted(button[part~="back"]) {
|
|
8990
9233
|
cursor: pointer;
|
|
8991
9234
|
}
|
|
8992
9235
|
|
|
@@ -9022,7 +9265,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9022
9265
|
</style>
|
|
9023
9266
|
<style id="layout-row" media="width:0">
|
|
9024
9267
|
|
|
9025
|
-
slot[name="header"]
|
|
9268
|
+
slot[name="header"] > *,
|
|
9269
|
+
slot[name="header"]::slotted(*) {
|
|
9026
9270
|
padding: .4em .5em;
|
|
9027
9271
|
}
|
|
9028
9272
|
|
|
@@ -9070,33 +9314,32 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9070
9314
|
var MediaChromeMenu = class extends GlobalThis.HTMLElement {
|
|
9071
9315
|
constructor() {
|
|
9072
9316
|
super();
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
const previousItems = __privateGet21(this, _previousItems);
|
|
9317
|
+
__privateAdd22(this, _handleSlotChange);
|
|
9318
|
+
__privateAdd22(this, _updateLayoutStyle);
|
|
9319
|
+
__privateAdd22(this, _handleInvoke2);
|
|
9320
|
+
__privateAdd22(this, _handleOpen2);
|
|
9321
|
+
__privateAdd22(this, _handleClosed2);
|
|
9322
|
+
__privateAdd22(this, _positionMenu);
|
|
9323
|
+
__privateAdd22(this, _resizeMenu);
|
|
9324
|
+
__privateAdd22(this, _handleClick);
|
|
9325
|
+
__privateAdd22(this, _backButtonElement);
|
|
9326
|
+
__privateAdd22(this, _handleToggle);
|
|
9327
|
+
__privateAdd22(this, _checkSubmenuHasExpanded);
|
|
9328
|
+
__privateAdd22(this, _handleFocusOut2);
|
|
9329
|
+
__privateAdd22(this, _handleKeyDown2);
|
|
9330
|
+
__privateAdd22(this, _getItem);
|
|
9331
|
+
__privateAdd22(this, _getTabItem);
|
|
9332
|
+
__privateAdd22(this, _setTabItem);
|
|
9333
|
+
__privateAdd22(this, _selectItem);
|
|
9334
|
+
__privateAdd22(this, _mediaController8, null);
|
|
9335
|
+
__privateAdd22(this, _previouslyFocused2, null);
|
|
9336
|
+
__privateAdd22(this, _invokerElement2, null);
|
|
9337
|
+
__privateAdd22(this, _previousItems, /* @__PURE__ */ new Set());
|
|
9338
|
+
__privateAdd22(this, _mutationObserver, void 0);
|
|
9339
|
+
__privateAdd22(this, _isPopover, false);
|
|
9340
|
+
__privateAdd22(this, _cssRule, null);
|
|
9341
|
+
__privateAdd22(this, _handleMenuItems, () => {
|
|
9342
|
+
const previousItems = __privateGet22(this, _previousItems);
|
|
9100
9343
|
const currentItems = new Set(this.items);
|
|
9101
9344
|
for (const item of previousItems) {
|
|
9102
9345
|
if (!currentItems.has(item)) {
|
|
@@ -9108,14 +9351,14 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9108
9351
|
this.dispatchEvent(new CustomEvent("addmenuitem", { detail: item }));
|
|
9109
9352
|
}
|
|
9110
9353
|
}
|
|
9111
|
-
|
|
9354
|
+
__privateSet21(this, _previousItems, currentItems);
|
|
9112
9355
|
});
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9356
|
+
__privateAdd22(this, _handleBoundsResize, () => {
|
|
9357
|
+
__privateMethod8(this, _positionMenu, positionMenu_fn).call(this);
|
|
9358
|
+
__privateMethod8(this, _resizeMenu, resizeMenu_fn).call(this, false);
|
|
9116
9359
|
});
|
|
9117
|
-
|
|
9118
|
-
|
|
9360
|
+
__privateAdd22(this, _handleMenuResize, () => {
|
|
9361
|
+
__privateMethod8(this, _positionMenu, positionMenu_fn).call(this);
|
|
9119
9362
|
});
|
|
9120
9363
|
if (!this.shadowRoot) {
|
|
9121
9364
|
this.attachShadow({ mode: "open" });
|
|
@@ -9127,8 +9370,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9127
9370
|
"slot:not([name])"
|
|
9128
9371
|
);
|
|
9129
9372
|
this.shadowRoot.addEventListener("slotchange", this);
|
|
9130
|
-
|
|
9131
|
-
|
|
9373
|
+
__privateSet21(this, _mutationObserver, new MutationObserver(__privateGet22(this, _handleMenuItems)));
|
|
9374
|
+
__privateGet22(this, _mutationObserver).observe(this.defaultSlot, { childList: true });
|
|
9132
9375
|
}
|
|
9133
9376
|
static get observedAttributes() {
|
|
9134
9377
|
return [
|
|
@@ -9139,7 +9382,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9139
9382
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER
|
|
9140
9383
|
];
|
|
9141
9384
|
}
|
|
9142
|
-
static formatMenuItemText(text) {
|
|
9385
|
+
static formatMenuItemText(text, _data) {
|
|
9143
9386
|
return text;
|
|
9144
9387
|
}
|
|
9145
9388
|
enable() {
|
|
@@ -9159,58 +9402,59 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9159
9402
|
handleEvent(event) {
|
|
9160
9403
|
switch (event.type) {
|
|
9161
9404
|
case "slotchange":
|
|
9162
|
-
|
|
9405
|
+
__privateMethod8(this, _handleSlotChange, handleSlotChange_fn).call(this, event);
|
|
9163
9406
|
break;
|
|
9164
9407
|
case "invoke":
|
|
9165
|
-
|
|
9408
|
+
__privateMethod8(this, _handleInvoke2, handleInvoke_fn2).call(this, event);
|
|
9166
9409
|
break;
|
|
9167
9410
|
case "click":
|
|
9168
|
-
|
|
9411
|
+
__privateMethod8(this, _handleClick, handleClick_fn).call(this, event);
|
|
9169
9412
|
break;
|
|
9170
9413
|
case "toggle":
|
|
9171
|
-
|
|
9414
|
+
__privateMethod8(this, _handleToggle, handleToggle_fn).call(this, event);
|
|
9172
9415
|
break;
|
|
9173
9416
|
case "focusout":
|
|
9174
|
-
|
|
9417
|
+
__privateMethod8(this, _handleFocusOut2, handleFocusOut_fn2).call(this, event);
|
|
9175
9418
|
break;
|
|
9176
9419
|
case "keydown":
|
|
9177
|
-
|
|
9420
|
+
__privateMethod8(this, _handleKeyDown2, handleKeyDown_fn2).call(this, event);
|
|
9178
9421
|
break;
|
|
9179
9422
|
}
|
|
9180
9423
|
}
|
|
9181
9424
|
connectedCallback() {
|
|
9182
9425
|
var _a3, _b2;
|
|
9183
|
-
|
|
9426
|
+
__privateSet21(this, _cssRule, insertCSSRule(this.shadowRoot, ":host"));
|
|
9427
|
+
__privateMethod8(this, _updateLayoutStyle, updateLayoutStyle_fn).call(this);
|
|
9184
9428
|
if (!this.hasAttribute("disabled")) {
|
|
9185
9429
|
this.enable();
|
|
9186
9430
|
}
|
|
9187
9431
|
if (!this.role) {
|
|
9188
9432
|
this.role = "menu";
|
|
9189
9433
|
}
|
|
9190
|
-
|
|
9191
|
-
(_b2 = (_a3 =
|
|
9434
|
+
__privateSet21(this, _mediaController8, getAttributeMediaController(this));
|
|
9435
|
+
(_b2 = (_a3 = __privateGet22(this, _mediaController8)) == null ? void 0 : _a3.associateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
9192
9436
|
if (!this.hidden) {
|
|
9193
|
-
observeResize(getBoundsElement(this),
|
|
9194
|
-
observeResize(this,
|
|
9437
|
+
observeResize(getBoundsElement(this), __privateGet22(this, _handleBoundsResize));
|
|
9438
|
+
observeResize(this, __privateGet22(this, _handleMenuResize));
|
|
9195
9439
|
}
|
|
9196
9440
|
}
|
|
9197
9441
|
disconnectedCallback() {
|
|
9198
9442
|
var _a3, _b2;
|
|
9199
|
-
unobserveResize(getBoundsElement(this),
|
|
9200
|
-
unobserveResize(this,
|
|
9443
|
+
unobserveResize(getBoundsElement(this), __privateGet22(this, _handleBoundsResize));
|
|
9444
|
+
unobserveResize(this, __privateGet22(this, _handleMenuResize));
|
|
9201
9445
|
this.disable();
|
|
9202
|
-
(_b2 = (_a3 =
|
|
9203
|
-
|
|
9446
|
+
(_b2 = (_a3 = __privateGet22(this, _mediaController8)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
9447
|
+
__privateSet21(this, _mediaController8, null);
|
|
9204
9448
|
}
|
|
9205
9449
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
9206
9450
|
var _a3, _b2, _c, _d;
|
|
9207
9451
|
if (attrName === Attributes12.HIDDEN && newValue !== oldValue) {
|
|
9208
|
-
if (!
|
|
9209
|
-
|
|
9452
|
+
if (!__privateGet22(this, _isPopover))
|
|
9453
|
+
__privateSet21(this, _isPopover, true);
|
|
9210
9454
|
if (this.hidden) {
|
|
9211
|
-
|
|
9455
|
+
__privateMethod8(this, _handleClosed2, handleClosed_fn2).call(this);
|
|
9212
9456
|
} else {
|
|
9213
|
-
|
|
9457
|
+
__privateMethod8(this, _handleOpen2, handleOpen_fn2).call(this);
|
|
9214
9458
|
}
|
|
9215
9459
|
this.dispatchEvent(
|
|
9216
9460
|
new ToggleEvent({
|
|
@@ -9221,12 +9465,12 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9221
9465
|
);
|
|
9222
9466
|
} else if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
9223
9467
|
if (oldValue) {
|
|
9224
|
-
(_b2 = (_a3 =
|
|
9225
|
-
|
|
9468
|
+
(_b2 = (_a3 = __privateGet22(this, _mediaController8)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
9469
|
+
__privateSet21(this, _mediaController8, null);
|
|
9226
9470
|
}
|
|
9227
9471
|
if (newValue && this.isConnected) {
|
|
9228
|
-
|
|
9229
|
-
(_d = (_c =
|
|
9472
|
+
__privateSet21(this, _mediaController8, getAttributeMediaController(this));
|
|
9473
|
+
(_d = (_c = __privateGet22(this, _mediaController8)) == null ? void 0 : _c.associateElement) == null ? void 0 : _d.call(_c, this);
|
|
9230
9474
|
}
|
|
9231
9475
|
} else if (attrName === Attributes12.DISABLED && newValue !== oldValue) {
|
|
9232
9476
|
if (newValue == null) {
|
|
@@ -9235,7 +9479,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9235
9479
|
this.disable();
|
|
9236
9480
|
}
|
|
9237
9481
|
} else if (attrName === Attributes12.STYLE && newValue !== oldValue) {
|
|
9238
|
-
|
|
9482
|
+
__privateMethod8(this, _updateLayoutStyle, updateLayoutStyle_fn).call(this);
|
|
9239
9483
|
}
|
|
9240
9484
|
}
|
|
9241
9485
|
formatMenuItemText(text, data) {
|
|
@@ -9277,12 +9521,12 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9277
9521
|
const item = this.items.find((item2) => item2.value === newValue);
|
|
9278
9522
|
if (!item)
|
|
9279
9523
|
return;
|
|
9280
|
-
|
|
9524
|
+
__privateMethod8(this, _selectItem, selectItem_fn).call(this, item);
|
|
9281
9525
|
}
|
|
9282
9526
|
focus() {
|
|
9283
|
-
|
|
9527
|
+
__privateSet21(this, _previouslyFocused2, getActiveElement());
|
|
9284
9528
|
if (this.items.length) {
|
|
9285
|
-
|
|
9529
|
+
__privateMethod8(this, _setTabItem, setTabItem_fn).call(this, this.items[0]);
|
|
9286
9530
|
this.items[0].focus();
|
|
9287
9531
|
return;
|
|
9288
9532
|
}
|
|
@@ -9293,12 +9537,12 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9293
9537
|
}
|
|
9294
9538
|
handleSelect(event) {
|
|
9295
9539
|
var _a3;
|
|
9296
|
-
const item =
|
|
9540
|
+
const item = __privateMethod8(this, _getItem, getItem_fn).call(this, event);
|
|
9297
9541
|
if (!item)
|
|
9298
9542
|
return;
|
|
9299
|
-
|
|
9300
|
-
if (
|
|
9301
|
-
(_a3 =
|
|
9543
|
+
__privateMethod8(this, _selectItem, selectItem_fn).call(this, item, item.type === "checkbox");
|
|
9544
|
+
if (__privateGet22(this, _invokerElement2) && !this.hidden) {
|
|
9545
|
+
(_a3 = __privateGet22(this, _previouslyFocused2)) == null ? void 0 : _a3.focus();
|
|
9302
9546
|
this.hidden = true;
|
|
9303
9547
|
}
|
|
9304
9548
|
}
|
|
@@ -9318,7 +9562,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9318
9562
|
var _a3, _b2;
|
|
9319
9563
|
const { key } = event;
|
|
9320
9564
|
const items = this.items;
|
|
9321
|
-
const currentItem = (_b2 = (_a3 =
|
|
9565
|
+
const currentItem = (_b2 = (_a3 = __privateMethod8(this, _getItem, getItem_fn).call(this, event)) != null ? _a3 : __privateMethod8(this, _getTabItem, getTabItem_fn).call(this)) != null ? _b2 : items[0];
|
|
9322
9566
|
const currentIndex = items.indexOf(currentItem);
|
|
9323
9567
|
let index = Math.max(0, currentIndex);
|
|
9324
9568
|
if (key === "ArrowDown") {
|
|
@@ -9336,18 +9580,17 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9336
9580
|
if (index > items.length - 1) {
|
|
9337
9581
|
index = 0;
|
|
9338
9582
|
}
|
|
9339
|
-
|
|
9583
|
+
__privateMethod8(this, _setTabItem, setTabItem_fn).call(this, items[index]);
|
|
9340
9584
|
items[index].focus();
|
|
9341
9585
|
}
|
|
9342
9586
|
};
|
|
9343
9587
|
_mediaController8 = /* @__PURE__ */ new WeakMap();
|
|
9344
9588
|
_previouslyFocused2 = /* @__PURE__ */ new WeakMap();
|
|
9345
9589
|
_invokerElement2 = /* @__PURE__ */ new WeakMap();
|
|
9346
|
-
_keysSoFar = /* @__PURE__ */ new WeakMap();
|
|
9347
|
-
_clearKeysTimeout = /* @__PURE__ */ new WeakMap();
|
|
9348
9590
|
_previousItems = /* @__PURE__ */ new WeakMap();
|
|
9349
9591
|
_mutationObserver = /* @__PURE__ */ new WeakMap();
|
|
9350
9592
|
_isPopover = /* @__PURE__ */ new WeakMap();
|
|
9593
|
+
_cssRule = /* @__PURE__ */ new WeakMap();
|
|
9351
9594
|
_handleSlotChange = /* @__PURE__ */ new WeakSet();
|
|
9352
9595
|
handleSlotChange_fn = function(event) {
|
|
9353
9596
|
const slot = event.target;
|
|
@@ -9363,7 +9606,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9363
9606
|
header.hidden = slot.assignedNodes().length === 0;
|
|
9364
9607
|
}
|
|
9365
9608
|
if (!slot.name) {
|
|
9366
|
-
|
|
9609
|
+
__privateGet22(this, _handleMenuItems).call(this);
|
|
9367
9610
|
}
|
|
9368
9611
|
};
|
|
9369
9612
|
_handleMenuItems = /* @__PURE__ */ new WeakMap();
|
|
@@ -9376,7 +9619,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9376
9619
|
};
|
|
9377
9620
|
_handleInvoke2 = /* @__PURE__ */ new WeakSet();
|
|
9378
9621
|
handleInvoke_fn2 = function(event) {
|
|
9379
|
-
|
|
9622
|
+
__privateSet21(this, _invokerElement2, event.relatedTarget);
|
|
9380
9623
|
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
9381
9624
|
this.hidden = !this.hidden;
|
|
9382
9625
|
}
|
|
@@ -9384,23 +9627,22 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9384
9627
|
_handleOpen2 = /* @__PURE__ */ new WeakSet();
|
|
9385
9628
|
handleOpen_fn2 = function() {
|
|
9386
9629
|
var _a3;
|
|
9387
|
-
(_a3 =
|
|
9388
|
-
requestAnimationFrame(() => __privateMethod7(this, _positionMenu, positionMenu_fn).call(this, false));
|
|
9630
|
+
(_a3 = __privateGet22(this, _invokerElement2)) == null ? void 0 : _a3.setAttribute("aria-expanded", "true");
|
|
9389
9631
|
this.addEventListener("transitionend", () => this.focus(), { once: true });
|
|
9390
|
-
observeResize(getBoundsElement(this),
|
|
9391
|
-
observeResize(this,
|
|
9632
|
+
observeResize(getBoundsElement(this), __privateGet22(this, _handleBoundsResize));
|
|
9633
|
+
observeResize(this, __privateGet22(this, _handleMenuResize));
|
|
9392
9634
|
};
|
|
9393
9635
|
_handleClosed2 = /* @__PURE__ */ new WeakSet();
|
|
9394
9636
|
handleClosed_fn2 = function() {
|
|
9395
9637
|
var _a3;
|
|
9396
|
-
(_a3 =
|
|
9397
|
-
unobserveResize(getBoundsElement(this),
|
|
9398
|
-
unobserveResize(this,
|
|
9638
|
+
(_a3 = __privateGet22(this, _invokerElement2)) == null ? void 0 : _a3.setAttribute("aria-expanded", "false");
|
|
9639
|
+
unobserveResize(getBoundsElement(this), __privateGet22(this, _handleBoundsResize));
|
|
9640
|
+
unobserveResize(this, __privateGet22(this, _handleMenuResize));
|
|
9399
9641
|
};
|
|
9400
9642
|
_handleBoundsResize = /* @__PURE__ */ new WeakMap();
|
|
9401
9643
|
_handleMenuResize = /* @__PURE__ */ new WeakMap();
|
|
9402
9644
|
_positionMenu = /* @__PURE__ */ new WeakSet();
|
|
9403
|
-
positionMenu_fn = function(
|
|
9645
|
+
positionMenu_fn = function(menuWidth) {
|
|
9404
9646
|
if (this.hasAttribute("mediacontroller") && !this.anchor)
|
|
9405
9647
|
return;
|
|
9406
9648
|
if (this.hidden || !this.anchorElement)
|
|
@@ -9413,19 +9655,17 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9413
9655
|
menuWidth != null ? menuWidth : menuWidth = this.offsetWidth;
|
|
9414
9656
|
const bounds = getBoundsElement(this);
|
|
9415
9657
|
const boundsRect = bounds.getBoundingClientRect();
|
|
9416
|
-
const anchorRect = this.anchorElement.getBoundingClientRect();
|
|
9417
9658
|
const right = boundsRect.width - x - menuWidth;
|
|
9418
9659
|
const bottom = boundsRect.height - y - this.offsetHeight;
|
|
9419
|
-
const
|
|
9420
|
-
const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
|
|
9421
|
-
if (!animate) {
|
|
9422
|
-
style.setProperty("--media-menu-transition-in", "none");
|
|
9423
|
-
}
|
|
9660
|
+
const { style } = __privateGet22(this, _cssRule);
|
|
9424
9661
|
style.setProperty("position", "absolute");
|
|
9425
9662
|
style.setProperty("right", `${Math.max(0, right)}px`);
|
|
9426
|
-
style.setProperty("bottom", `${bottom}px`);
|
|
9427
|
-
|
|
9428
|
-
style.
|
|
9663
|
+
style.setProperty("--_menu-bottom", `${bottom}px`);
|
|
9664
|
+
const computedStyle = getComputedStyle(this);
|
|
9665
|
+
const isBottomCalc = style.getPropertyValue("--_menu-bottom") === computedStyle.bottom;
|
|
9666
|
+
const realBottom = isBottomCalc ? bottom : parseFloat(computedStyle.bottom);
|
|
9667
|
+
const maxHeight = boundsRect.height - realBottom - parseFloat(computedStyle.marginBottom);
|
|
9668
|
+
this.style.setProperty("--_menu-max-height", `${maxHeight}px`);
|
|
9429
9669
|
};
|
|
9430
9670
|
_resizeMenu = /* @__PURE__ */ new WeakSet();
|
|
9431
9671
|
resizeMenu_fn = function(animate) {
|
|
@@ -9435,7 +9675,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9435
9675
|
const expandedSubmenu = expandedMenuItem == null ? void 0 : expandedMenuItem.querySelector(
|
|
9436
9676
|
'[role="menu"]'
|
|
9437
9677
|
);
|
|
9438
|
-
const { style } =
|
|
9678
|
+
const { style } = __privateGet22(this, _cssRule);
|
|
9439
9679
|
if (!animate) {
|
|
9440
9680
|
style.setProperty("--media-menu-transition-in", "none");
|
|
9441
9681
|
}
|
|
@@ -9447,11 +9687,11 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9447
9687
|
);
|
|
9448
9688
|
this.style.setProperty("min-width", `${width}px`);
|
|
9449
9689
|
this.style.setProperty("min-height", `${height}px`);
|
|
9450
|
-
|
|
9690
|
+
__privateMethod8(this, _positionMenu, positionMenu_fn).call(this, width);
|
|
9451
9691
|
} else {
|
|
9452
9692
|
this.style.removeProperty("min-width");
|
|
9453
9693
|
this.style.removeProperty("min-height");
|
|
9454
|
-
|
|
9694
|
+
__privateMethod8(this, _positionMenu, positionMenu_fn).call(this);
|
|
9455
9695
|
}
|
|
9456
9696
|
style.removeProperty("--media-menu-transition-in");
|
|
9457
9697
|
};
|
|
@@ -9459,15 +9699,15 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9459
9699
|
handleClick_fn = function(event) {
|
|
9460
9700
|
var _a3;
|
|
9461
9701
|
event.stopPropagation();
|
|
9462
|
-
if (event.composedPath().includes(
|
|
9463
|
-
(_a3 =
|
|
9702
|
+
if (event.composedPath().includes(__privateGet22(this, _backButtonElement, backButtonElement_get))) {
|
|
9703
|
+
(_a3 = __privateGet22(this, _previouslyFocused2)) == null ? void 0 : _a3.focus();
|
|
9464
9704
|
this.hidden = true;
|
|
9465
9705
|
return;
|
|
9466
9706
|
}
|
|
9467
|
-
const item =
|
|
9707
|
+
const item = __privateMethod8(this, _getItem, getItem_fn).call(this, event);
|
|
9468
9708
|
if (!item || item.hasAttribute("disabled"))
|
|
9469
9709
|
return;
|
|
9470
|
-
|
|
9710
|
+
__privateMethod8(this, _setTabItem, setTabItem_fn).call(this, item);
|
|
9471
9711
|
this.handleSelect(event);
|
|
9472
9712
|
};
|
|
9473
9713
|
_backButtonElement = /* @__PURE__ */ new WeakSet();
|
|
@@ -9477,14 +9717,14 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9477
9717
|
'slot[name="header"]'
|
|
9478
9718
|
);
|
|
9479
9719
|
return (_a3 = headerSlot.assignedElements({ flatten: true })) == null ? void 0 : _a3.find(
|
|
9480
|
-
(el) => el.part
|
|
9720
|
+
(el) => el.matches('button[part~="back"]')
|
|
9481
9721
|
);
|
|
9482
9722
|
};
|
|
9483
9723
|
_handleToggle = /* @__PURE__ */ new WeakSet();
|
|
9484
9724
|
handleToggle_fn = function(event) {
|
|
9485
9725
|
if (event.target === this)
|
|
9486
9726
|
return;
|
|
9487
|
-
|
|
9727
|
+
__privateMethod8(this, _checkSubmenuHasExpanded, checkSubmenuHasExpanded_fn).call(this);
|
|
9488
9728
|
const menuItemsWithSubmenu = Array.from(
|
|
9489
9729
|
this.querySelectorAll('[role="menuitem"][aria-haspopup]')
|
|
9490
9730
|
);
|
|
@@ -9500,7 +9740,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9500
9740
|
for (const item of menuItemsWithSubmenu) {
|
|
9501
9741
|
item.setAttribute("aria-expanded", `${!item.submenuElement.hidden}`);
|
|
9502
9742
|
}
|
|
9503
|
-
|
|
9743
|
+
__privateMethod8(this, _resizeMenu, resizeMenu_fn).call(this, true);
|
|
9504
9744
|
};
|
|
9505
9745
|
_checkSubmenuHasExpanded = /* @__PURE__ */ new WeakSet();
|
|
9506
9746
|
checkSubmenuHasExpanded_fn = function() {
|
|
@@ -9512,10 +9752,10 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9512
9752
|
handleFocusOut_fn2 = function(event) {
|
|
9513
9753
|
var _a3;
|
|
9514
9754
|
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
9515
|
-
if (
|
|
9516
|
-
(_a3 =
|
|
9755
|
+
if (__privateGet22(this, _isPopover)) {
|
|
9756
|
+
(_a3 = __privateGet22(this, _previouslyFocused2)) == null ? void 0 : _a3.focus();
|
|
9517
9757
|
}
|
|
9518
|
-
if (
|
|
9758
|
+
if (__privateGet22(this, _invokerElement2) && __privateGet22(this, _invokerElement2) !== event.relatedTarget && !this.hidden) {
|
|
9519
9759
|
this.hidden = true;
|
|
9520
9760
|
}
|
|
9521
9761
|
}
|
|
@@ -9533,7 +9773,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9533
9773
|
event.preventDefault();
|
|
9534
9774
|
event.stopPropagation();
|
|
9535
9775
|
if (key === "Tab") {
|
|
9536
|
-
if (
|
|
9776
|
+
if (__privateGet22(this, _isPopover)) {
|
|
9537
9777
|
this.hidden = true;
|
|
9538
9778
|
return;
|
|
9539
9779
|
}
|
|
@@ -9544,8 +9784,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9544
9784
|
}
|
|
9545
9785
|
this.blur();
|
|
9546
9786
|
} else if (key === "Escape") {
|
|
9547
|
-
(_e =
|
|
9548
|
-
if (
|
|
9787
|
+
(_e = __privateGet22(this, _previouslyFocused2)) == null ? void 0 : _e.focus();
|
|
9788
|
+
if (__privateGet22(this, _isPopover)) {
|
|
9549
9789
|
this.hidden = true;
|
|
9550
9790
|
}
|
|
9551
9791
|
} else if (key === "Enter" || key === " ") {
|
|
@@ -9589,7 +9829,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9589
9829
|
);
|
|
9590
9830
|
}
|
|
9591
9831
|
};
|
|
9592
|
-
MediaChromeMenu.template =
|
|
9832
|
+
MediaChromeMenu.template = template12;
|
|
9593
9833
|
function isMenuItem(element) {
|
|
9594
9834
|
return ["menuitem", "menuitemradio", "menuitemcheckbox"].includes(
|
|
9595
9835
|
element == null ? void 0 : element.role
|
|
@@ -9603,27 +9843,27 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9603
9843
|
GlobalThis.customElements.define("media-chrome-menu", MediaChromeMenu);
|
|
9604
9844
|
}
|
|
9605
9845
|
|
|
9606
|
-
// ../../node_modules/
|
|
9607
|
-
var
|
|
9846
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
9847
|
+
var __accessCheck23 = (obj, member, msg) => {
|
|
9608
9848
|
if (!member.has(obj))
|
|
9609
9849
|
throw TypeError("Cannot " + msg);
|
|
9610
9850
|
};
|
|
9611
|
-
var
|
|
9612
|
-
|
|
9851
|
+
var __privateGet23 = (obj, member, getter) => {
|
|
9852
|
+
__accessCheck23(obj, member, "read from private field");
|
|
9613
9853
|
return getter ? getter.call(obj) : member.get(obj);
|
|
9614
9854
|
};
|
|
9615
|
-
var
|
|
9855
|
+
var __privateAdd23 = (obj, member, value) => {
|
|
9616
9856
|
if (member.has(obj))
|
|
9617
9857
|
throw TypeError("Cannot add the same private member more than once");
|
|
9618
9858
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
9619
9859
|
};
|
|
9620
|
-
var
|
|
9621
|
-
|
|
9860
|
+
var __privateSet22 = (obj, member, value, setter) => {
|
|
9861
|
+
__accessCheck23(obj, member, "write to private field");
|
|
9622
9862
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
9623
9863
|
return value;
|
|
9624
9864
|
};
|
|
9625
|
-
var
|
|
9626
|
-
|
|
9865
|
+
var __privateMethod9 = (obj, member, method) => {
|
|
9866
|
+
__accessCheck23(obj, member, "access private method");
|
|
9627
9867
|
return method;
|
|
9628
9868
|
};
|
|
9629
9869
|
var _dirty;
|
|
@@ -9641,8 +9881,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9641
9881
|
var handleKeyDown_fn3;
|
|
9642
9882
|
var _reset;
|
|
9643
9883
|
var reset_fn;
|
|
9644
|
-
var
|
|
9645
|
-
|
|
9884
|
+
var template13 = Document2.createElement("template");
|
|
9885
|
+
template13.innerHTML = /*html*/
|
|
9646
9886
|
`
|
|
9647
9887
|
<style>
|
|
9648
9888
|
:host {
|
|
@@ -9771,21 +10011,22 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9771
10011
|
var MediaChromeMenuItem = class extends GlobalThis.HTMLElement {
|
|
9772
10012
|
constructor() {
|
|
9773
10013
|
super();
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
10014
|
+
__privateAdd23(this, _handleSlotChange2);
|
|
10015
|
+
__privateAdd23(this, _submenuConnected);
|
|
10016
|
+
__privateAdd23(this, _submenuDisconnected);
|
|
10017
|
+
__privateAdd23(this, _handleKeyUp);
|
|
10018
|
+
__privateAdd23(this, _handleKeyDown3);
|
|
10019
|
+
__privateAdd23(this, _reset);
|
|
10020
|
+
__privateAdd23(this, _dirty, false);
|
|
10021
|
+
__privateAdd23(this, _ownerElement, void 0);
|
|
10022
|
+
__privateAdd23(this, _handleMenuItem, () => {
|
|
9783
10023
|
var _a3, _b2;
|
|
9784
10024
|
this.setAttribute("submenusize", `${this.submenuElement.items.length}`);
|
|
9785
10025
|
const descriptionSlot = this.shadowRoot.querySelector(
|
|
9786
10026
|
'slot[name="description"]'
|
|
9787
10027
|
);
|
|
9788
|
-
const
|
|
10028
|
+
const checkedItem = (_a3 = this.submenuElement.checkedItems) == null ? void 0 : _a3[0];
|
|
10029
|
+
const description = (_b2 = checkedItem == null ? void 0 : checkedItem.dataset.description) != null ? _b2 : checkedItem == null ? void 0 : checkedItem.text;
|
|
9789
10030
|
const span = Document2.createElement("span");
|
|
9790
10031
|
span.textContent = description != null ? description : "";
|
|
9791
10032
|
descriptionSlot.replaceChildren(span);
|
|
@@ -9823,21 +10064,21 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9823
10064
|
handleEvent(event) {
|
|
9824
10065
|
switch (event.type) {
|
|
9825
10066
|
case "slotchange":
|
|
9826
|
-
|
|
10067
|
+
__privateMethod9(this, _handleSlotChange2, handleSlotChange_fn2).call(this, event);
|
|
9827
10068
|
break;
|
|
9828
10069
|
case "click":
|
|
9829
10070
|
this.handleClick(event);
|
|
9830
10071
|
break;
|
|
9831
10072
|
case "keydown":
|
|
9832
|
-
|
|
10073
|
+
__privateMethod9(this, _handleKeyDown3, handleKeyDown_fn3).call(this, event);
|
|
9833
10074
|
break;
|
|
9834
10075
|
case "keyup":
|
|
9835
|
-
|
|
10076
|
+
__privateMethod9(this, _handleKeyUp, handleKeyUp_fn).call(this, event);
|
|
9836
10077
|
break;
|
|
9837
10078
|
}
|
|
9838
10079
|
}
|
|
9839
10080
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
9840
|
-
if (attrName === Attributes13.CHECKED && isCheckable(this) && !
|
|
10081
|
+
if (attrName === Attributes13.CHECKED && isCheckable(this) && !__privateGet23(this, _dirty)) {
|
|
9841
10082
|
this.setAttribute("aria-checked", newValue != null ? "true" : "false");
|
|
9842
10083
|
} else if (attrName === Attributes13.TYPE && newValue !== oldValue) {
|
|
9843
10084
|
this.role = "menuitem" + newValue;
|
|
@@ -9854,13 +10095,13 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9854
10095
|
this.enable();
|
|
9855
10096
|
}
|
|
9856
10097
|
this.role = "menuitem" + this.type;
|
|
9857
|
-
|
|
9858
|
-
|
|
10098
|
+
__privateSet22(this, _ownerElement, closestMenuItemsContainer(this, this.parentNode));
|
|
10099
|
+
__privateMethod9(this, _reset, reset_fn).call(this);
|
|
9859
10100
|
}
|
|
9860
10101
|
disconnectedCallback() {
|
|
9861
10102
|
this.disable();
|
|
9862
|
-
|
|
9863
|
-
|
|
10103
|
+
__privateMethod9(this, _reset, reset_fn).call(this);
|
|
10104
|
+
__privateSet22(this, _ownerElement, null);
|
|
9864
10105
|
}
|
|
9865
10106
|
get invokeTarget() {
|
|
9866
10107
|
return this.getAttribute("invoketarget");
|
|
@@ -9918,7 +10159,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9918
10159
|
set checked(value) {
|
|
9919
10160
|
if (!isCheckable(this))
|
|
9920
10161
|
return;
|
|
9921
|
-
|
|
10162
|
+
__privateSet22(this, _dirty, true);
|
|
9922
10163
|
this.setAttribute("aria-checked", value ? "true" : "false");
|
|
9923
10164
|
if (value) {
|
|
9924
10165
|
this.part.add("checked");
|
|
@@ -9954,9 +10195,9 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9954
10195
|
}
|
|
9955
10196
|
if (slot.name === "submenu") {
|
|
9956
10197
|
if (this.submenuElement) {
|
|
9957
|
-
|
|
10198
|
+
__privateMethod9(this, _submenuConnected, submenuConnected_fn).call(this);
|
|
9958
10199
|
} else {
|
|
9959
|
-
|
|
10200
|
+
__privateMethod9(this, _submenuDisconnected, submenuDisconnected_fn).call(this);
|
|
9960
10201
|
}
|
|
9961
10202
|
}
|
|
9962
10203
|
};
|
|
@@ -9964,35 +10205,35 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
9964
10205
|
submenuConnected_fn = async function() {
|
|
9965
10206
|
this.setAttribute("aria-haspopup", "menu");
|
|
9966
10207
|
this.setAttribute("aria-expanded", `${!this.submenuElement.hidden}`);
|
|
9967
|
-
this.submenuElement.addEventListener("change",
|
|
9968
|
-
this.submenuElement.addEventListener("addmenuitem",
|
|
10208
|
+
this.submenuElement.addEventListener("change", __privateGet23(this, _handleMenuItem));
|
|
10209
|
+
this.submenuElement.addEventListener("addmenuitem", __privateGet23(this, _handleMenuItem));
|
|
9969
10210
|
this.submenuElement.addEventListener(
|
|
9970
10211
|
"removemenuitem",
|
|
9971
|
-
|
|
10212
|
+
__privateGet23(this, _handleMenuItem)
|
|
9972
10213
|
);
|
|
9973
|
-
|
|
10214
|
+
__privateGet23(this, _handleMenuItem).call(this);
|
|
9974
10215
|
};
|
|
9975
10216
|
_submenuDisconnected = /* @__PURE__ */ new WeakSet();
|
|
9976
10217
|
submenuDisconnected_fn = function() {
|
|
9977
10218
|
this.removeAttribute("aria-haspopup");
|
|
9978
10219
|
this.removeAttribute("aria-expanded");
|
|
9979
|
-
this.submenuElement.removeEventListener("change",
|
|
10220
|
+
this.submenuElement.removeEventListener("change", __privateGet23(this, _handleMenuItem));
|
|
9980
10221
|
this.submenuElement.removeEventListener(
|
|
9981
10222
|
"addmenuitem",
|
|
9982
|
-
|
|
10223
|
+
__privateGet23(this, _handleMenuItem)
|
|
9983
10224
|
);
|
|
9984
10225
|
this.submenuElement.removeEventListener(
|
|
9985
10226
|
"removemenuitem",
|
|
9986
|
-
|
|
10227
|
+
__privateGet23(this, _handleMenuItem)
|
|
9987
10228
|
);
|
|
9988
|
-
|
|
10229
|
+
__privateGet23(this, _handleMenuItem).call(this);
|
|
9989
10230
|
};
|
|
9990
10231
|
_handleMenuItem = /* @__PURE__ */ new WeakMap();
|
|
9991
10232
|
_handleKeyUp = /* @__PURE__ */ new WeakSet();
|
|
9992
10233
|
handleKeyUp_fn = function(event) {
|
|
9993
10234
|
const { key } = event;
|
|
9994
10235
|
if (!this.keysUsed.includes(key)) {
|
|
9995
|
-
this.removeEventListener("keyup",
|
|
10236
|
+
this.removeEventListener("keyup", __privateMethod9(this, _handleKeyUp, handleKeyUp_fn));
|
|
9996
10237
|
return;
|
|
9997
10238
|
}
|
|
9998
10239
|
this.handleClick(event);
|
|
@@ -10001,15 +10242,15 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10001
10242
|
handleKeyDown_fn3 = function(event) {
|
|
10002
10243
|
const { metaKey, altKey, key } = event;
|
|
10003
10244
|
if (metaKey || altKey || !this.keysUsed.includes(key)) {
|
|
10004
|
-
this.removeEventListener("keyup",
|
|
10245
|
+
this.removeEventListener("keyup", __privateMethod9(this, _handleKeyUp, handleKeyUp_fn));
|
|
10005
10246
|
return;
|
|
10006
10247
|
}
|
|
10007
|
-
this.addEventListener("keyup",
|
|
10248
|
+
this.addEventListener("keyup", __privateMethod9(this, _handleKeyUp, handleKeyUp_fn), { once: true });
|
|
10008
10249
|
};
|
|
10009
10250
|
_reset = /* @__PURE__ */ new WeakSet();
|
|
10010
10251
|
reset_fn = function() {
|
|
10011
10252
|
var _a3;
|
|
10012
|
-
const items = (_a3 =
|
|
10253
|
+
const items = (_a3 = __privateGet23(this, _ownerElement)) == null ? void 0 : _a3.radioGroupItems;
|
|
10013
10254
|
if (!items)
|
|
10014
10255
|
return;
|
|
10015
10256
|
let checkedItem = items.filter((item) => item.getAttribute("aria-checked") === "true").pop();
|
|
@@ -10020,7 +10261,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10020
10261
|
}
|
|
10021
10262
|
checkedItem == null ? void 0 : checkedItem.setAttribute("aria-checked", "true");
|
|
10022
10263
|
};
|
|
10023
|
-
MediaChromeMenuItem.template =
|
|
10264
|
+
MediaChromeMenuItem.template = template13;
|
|
10024
10265
|
function isCheckable(item) {
|
|
10025
10266
|
return item.type === "radio" || item.type === "checkbox";
|
|
10026
10267
|
}
|
|
@@ -10041,9 +10282,9 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10041
10282
|
);
|
|
10042
10283
|
}
|
|
10043
10284
|
|
|
10044
|
-
// ../../node_modules/
|
|
10045
|
-
var
|
|
10046
|
-
|
|
10285
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
10286
|
+
var template14 = Document2.createElement("template");
|
|
10287
|
+
template14.innerHTML = MediaChromeMenu.template.innerHTML + /*html*/
|
|
10047
10288
|
`
|
|
10048
10289
|
<style>
|
|
10049
10290
|
:host {
|
|
@@ -10051,7 +10292,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10051
10292
|
var(--media-menu-background,
|
|
10052
10293
|
var(--media-control-background,
|
|
10053
10294
|
var(--media-secondary-color, rgb(20 20 30 / .8)))));
|
|
10054
|
-
min-width: var(--media-settings-menu-min-width,
|
|
10295
|
+
min-width: var(--media-settings-menu-min-width, 170px);
|
|
10055
10296
|
border-radius: 2px 2px 0 0;
|
|
10056
10297
|
overflow: hidden;
|
|
10057
10298
|
}
|
|
@@ -10083,15 +10324,15 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10083
10324
|
return getMediaController(this).querySelector("media-settings-menu-button");
|
|
10084
10325
|
}
|
|
10085
10326
|
};
|
|
10086
|
-
MediaSettingsMenu.template =
|
|
10327
|
+
MediaSettingsMenu.template = template14;
|
|
10087
10328
|
if (!GlobalThis.customElements.get("media-settings-menu")) {
|
|
10088
10329
|
GlobalThis.customElements.define("media-settings-menu", MediaSettingsMenu);
|
|
10089
10330
|
}
|
|
10090
10331
|
|
|
10091
|
-
// ../../node_modules/
|
|
10332
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
10092
10333
|
var _a;
|
|
10093
|
-
var
|
|
10094
|
-
|
|
10334
|
+
var template15 = Document2.createElement("template");
|
|
10335
|
+
template15.innerHTML = MediaChromeMenuItem.template.innerHTML + /*html*/
|
|
10095
10336
|
`
|
|
10096
10337
|
<style>
|
|
10097
10338
|
slot:not([name="submenu"]) {
|
|
@@ -10103,8 +10344,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10103
10344
|
}
|
|
10104
10345
|
</style>
|
|
10105
10346
|
`;
|
|
10106
|
-
if ((_a =
|
|
10107
|
-
|
|
10347
|
+
if ((_a = template15.content) == null ? void 0 : _a.querySelector) {
|
|
10348
|
+
template15.content.querySelector('slot[name="suffix"]').innerHTML = /*html*/
|
|
10108
10349
|
`
|
|
10109
10350
|
<svg aria-hidden="true" viewBox="0 0 20 24">
|
|
10110
10351
|
<path d="m8.12 17.585-.742-.669 4.2-4.665-4.2-4.666.743-.669 4.803 5.335-4.803 5.334Z"/>
|
|
@@ -10113,7 +10354,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10113
10354
|
}
|
|
10114
10355
|
var MediaSettingsMenuItem = class extends MediaChromeMenuItem {
|
|
10115
10356
|
};
|
|
10116
|
-
MediaSettingsMenuItem.template =
|
|
10357
|
+
MediaSettingsMenuItem.template = template15;
|
|
10117
10358
|
if (!GlobalThis.customElements.get("media-settings-menu-item")) {
|
|
10118
10359
|
GlobalThis.customElements.define(
|
|
10119
10360
|
"media-settings-menu-item",
|
|
@@ -10121,7 +10362,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10121
10362
|
);
|
|
10122
10363
|
}
|
|
10123
10364
|
|
|
10124
|
-
// ../../node_modules/
|
|
10365
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
10125
10366
|
var MediaChromeMenuButton = class extends MediaChromeButton {
|
|
10126
10367
|
connectedCallback() {
|
|
10127
10368
|
super.connectedCallback();
|
|
@@ -10162,7 +10403,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10162
10403
|
);
|
|
10163
10404
|
}
|
|
10164
10405
|
|
|
10165
|
-
// ../../node_modules/
|
|
10406
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
10166
10407
|
var slotTemplate12 = Document2.createElement("template");
|
|
10167
10408
|
slotTemplate12.innerHTML = /*html*/
|
|
10168
10409
|
`
|
|
@@ -10205,27 +10446,27 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10205
10446
|
);
|
|
10206
10447
|
}
|
|
10207
10448
|
|
|
10208
|
-
// ../../node_modules/
|
|
10209
|
-
var
|
|
10449
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
10450
|
+
var __accessCheck24 = (obj, member, msg) => {
|
|
10210
10451
|
if (!member.has(obj))
|
|
10211
10452
|
throw TypeError("Cannot " + msg);
|
|
10212
10453
|
};
|
|
10213
|
-
var
|
|
10214
|
-
|
|
10454
|
+
var __privateGet24 = (obj, member, getter) => {
|
|
10455
|
+
__accessCheck24(obj, member, "read from private field");
|
|
10215
10456
|
return getter ? getter.call(obj) : member.get(obj);
|
|
10216
10457
|
};
|
|
10217
|
-
var
|
|
10458
|
+
var __privateAdd24 = (obj, member, value) => {
|
|
10218
10459
|
if (member.has(obj))
|
|
10219
10460
|
throw TypeError("Cannot add the same private member more than once");
|
|
10220
10461
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10221
10462
|
};
|
|
10222
|
-
var
|
|
10223
|
-
|
|
10463
|
+
var __privateSet23 = (obj, member, value, setter) => {
|
|
10464
|
+
__accessCheck24(obj, member, "write to private field");
|
|
10224
10465
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
10225
10466
|
return value;
|
|
10226
10467
|
};
|
|
10227
|
-
var
|
|
10228
|
-
|
|
10468
|
+
var __privateMethod10 = (obj, member, method) => {
|
|
10469
|
+
__accessCheck24(obj, member, "access private method");
|
|
10229
10470
|
return method;
|
|
10230
10471
|
};
|
|
10231
10472
|
var _audioTrackList;
|
|
@@ -10237,10 +10478,10 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10237
10478
|
var MediaAudioTrackMenu = class extends MediaChromeMenu {
|
|
10238
10479
|
constructor() {
|
|
10239
10480
|
super(...arguments);
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10481
|
+
__privateAdd24(this, _render);
|
|
10482
|
+
__privateAdd24(this, _onChange);
|
|
10483
|
+
__privateAdd24(this, _audioTrackList, []);
|
|
10484
|
+
__privateAdd24(this, _prevState, void 0);
|
|
10244
10485
|
}
|
|
10245
10486
|
static get observedAttributes() {
|
|
10246
10487
|
return [
|
|
@@ -10255,17 +10496,17 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10255
10496
|
if (attrName === MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED && oldValue !== newValue) {
|
|
10256
10497
|
this.value = newValue;
|
|
10257
10498
|
} else if (attrName === MediaUIAttributes.MEDIA_AUDIO_TRACK_LIST && oldValue !== newValue) {
|
|
10258
|
-
|
|
10259
|
-
|
|
10499
|
+
__privateSet23(this, _audioTrackList, parseAudioTrackList(newValue != null ? newValue : ""));
|
|
10500
|
+
__privateMethod10(this, _render, render_fn).call(this);
|
|
10260
10501
|
}
|
|
10261
10502
|
}
|
|
10262
10503
|
connectedCallback() {
|
|
10263
10504
|
super.connectedCallback();
|
|
10264
|
-
this.addEventListener("change",
|
|
10505
|
+
this.addEventListener("change", __privateMethod10(this, _onChange, onChange_fn));
|
|
10265
10506
|
}
|
|
10266
10507
|
disconnectedCallback() {
|
|
10267
10508
|
super.disconnectedCallback();
|
|
10268
|
-
this.removeEventListener("change",
|
|
10509
|
+
this.removeEventListener("change", __privateMethod10(this, _onChange, onChange_fn));
|
|
10269
10510
|
}
|
|
10270
10511
|
/**
|
|
10271
10512
|
* Returns the anchor element when it is a floating menu.
|
|
@@ -10279,11 +10520,11 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10279
10520
|
);
|
|
10280
10521
|
}
|
|
10281
10522
|
get mediaAudioTrackList() {
|
|
10282
|
-
return
|
|
10523
|
+
return __privateGet24(this, _audioTrackList);
|
|
10283
10524
|
}
|
|
10284
10525
|
set mediaAudioTrackList(list) {
|
|
10285
|
-
|
|
10286
|
-
|
|
10526
|
+
__privateSet23(this, _audioTrackList, list);
|
|
10527
|
+
__privateMethod10(this, _render, render_fn).call(this);
|
|
10287
10528
|
}
|
|
10288
10529
|
/**
|
|
10289
10530
|
* Get enabled audio track id.
|
|
@@ -10300,9 +10541,9 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10300
10541
|
_prevState = /* @__PURE__ */ new WeakMap();
|
|
10301
10542
|
_render = /* @__PURE__ */ new WeakSet();
|
|
10302
10543
|
render_fn = function() {
|
|
10303
|
-
if (
|
|
10544
|
+
if (__privateGet24(this, _prevState) === JSON.stringify(this.mediaAudioTrackList))
|
|
10304
10545
|
return;
|
|
10305
|
-
|
|
10546
|
+
__privateSet23(this, _prevState, JSON.stringify(this.mediaAudioTrackList));
|
|
10306
10547
|
const audioTrackList = this.mediaAudioTrackList;
|
|
10307
10548
|
this.defaultSlot.textContent = "";
|
|
10308
10549
|
for (const audioTrack of audioTrackList) {
|
|
@@ -10338,7 +10579,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10338
10579
|
);
|
|
10339
10580
|
}
|
|
10340
10581
|
|
|
10341
|
-
// ../../node_modules/
|
|
10582
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
10342
10583
|
var audioTrackIcon = (
|
|
10343
10584
|
/*html*/
|
|
10344
10585
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -10403,27 +10644,27 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10403
10644
|
);
|
|
10404
10645
|
}
|
|
10405
10646
|
|
|
10406
|
-
// ../../node_modules/
|
|
10407
|
-
var
|
|
10647
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
10648
|
+
var __accessCheck25 = (obj, member, msg) => {
|
|
10408
10649
|
if (!member.has(obj))
|
|
10409
10650
|
throw TypeError("Cannot " + msg);
|
|
10410
10651
|
};
|
|
10411
|
-
var
|
|
10412
|
-
|
|
10652
|
+
var __privateGet25 = (obj, member, getter) => {
|
|
10653
|
+
__accessCheck25(obj, member, "read from private field");
|
|
10413
10654
|
return getter ? getter.call(obj) : member.get(obj);
|
|
10414
10655
|
};
|
|
10415
|
-
var
|
|
10656
|
+
var __privateAdd25 = (obj, member, value) => {
|
|
10416
10657
|
if (member.has(obj))
|
|
10417
10658
|
throw TypeError("Cannot add the same private member more than once");
|
|
10418
10659
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10419
10660
|
};
|
|
10420
|
-
var
|
|
10421
|
-
|
|
10661
|
+
var __privateSet24 = (obj, member, value, setter) => {
|
|
10662
|
+
__accessCheck25(obj, member, "write to private field");
|
|
10422
10663
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
10423
10664
|
return value;
|
|
10424
10665
|
};
|
|
10425
|
-
var
|
|
10426
|
-
|
|
10666
|
+
var __privateMethod11 = (obj, member, method) => {
|
|
10667
|
+
__accessCheck25(obj, member, "access private method");
|
|
10427
10668
|
return method;
|
|
10428
10669
|
};
|
|
10429
10670
|
var _prevState2;
|
|
@@ -10438,16 +10679,16 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10438
10679
|
<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"/>
|
|
10439
10680
|
</svg>`
|
|
10440
10681
|
);
|
|
10441
|
-
var
|
|
10442
|
-
|
|
10682
|
+
var template16 = Document2.createElement("template");
|
|
10683
|
+
template16.innerHTML = MediaChromeMenu.template.innerHTML + /*html*/
|
|
10443
10684
|
`
|
|
10444
10685
|
<slot name="captions-indicator" hidden>${ccIcon}</slot>`;
|
|
10445
10686
|
var MediaCaptionsMenu = class extends MediaChromeMenu {
|
|
10446
10687
|
constructor() {
|
|
10447
10688
|
super(...arguments);
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10689
|
+
__privateAdd25(this, _render2);
|
|
10690
|
+
__privateAdd25(this, _onChange2);
|
|
10691
|
+
__privateAdd25(this, _prevState2, void 0);
|
|
10451
10692
|
}
|
|
10452
10693
|
static get observedAttributes() {
|
|
10453
10694
|
return [
|
|
@@ -10459,18 +10700,18 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10459
10700
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
10460
10701
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
10461
10702
|
if (attrName === MediaUIAttributes.MEDIA_SUBTITLES_LIST && oldValue !== newValue) {
|
|
10462
|
-
|
|
10703
|
+
__privateMethod11(this, _render2, render_fn2).call(this);
|
|
10463
10704
|
} else if (attrName === MediaUIAttributes.MEDIA_SUBTITLES_SHOWING && oldValue !== newValue) {
|
|
10464
10705
|
this.value = newValue;
|
|
10465
10706
|
}
|
|
10466
10707
|
}
|
|
10467
10708
|
connectedCallback() {
|
|
10468
10709
|
super.connectedCallback();
|
|
10469
|
-
this.addEventListener("change",
|
|
10710
|
+
this.addEventListener("change", __privateMethod11(this, _onChange2, onChange_fn2));
|
|
10470
10711
|
}
|
|
10471
10712
|
disconnectedCallback() {
|
|
10472
10713
|
super.disconnectedCallback();
|
|
10473
|
-
this.removeEventListener("change",
|
|
10714
|
+
this.removeEventListener("change", __privateMethod11(this, _onChange2, onChange_fn2));
|
|
10474
10715
|
}
|
|
10475
10716
|
/**
|
|
10476
10717
|
* Returns the anchor element when it is a floating menu.
|
|
@@ -10508,9 +10749,9 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10508
10749
|
_render2 = /* @__PURE__ */ new WeakSet();
|
|
10509
10750
|
render_fn2 = function() {
|
|
10510
10751
|
var _a3;
|
|
10511
|
-
if (
|
|
10752
|
+
if (__privateGet25(this, _prevState2) === JSON.stringify(this.mediaSubtitlesList))
|
|
10512
10753
|
return;
|
|
10513
|
-
|
|
10754
|
+
__privateSet24(this, _prevState2, JSON.stringify(this.mediaSubtitlesList));
|
|
10514
10755
|
this.defaultSlot.textContent = "";
|
|
10515
10756
|
const isOff = !this.value;
|
|
10516
10757
|
const item = createMenuItem({
|
|
@@ -10568,7 +10809,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10568
10809
|
);
|
|
10569
10810
|
this.dispatchEvent(event);
|
|
10570
10811
|
};
|
|
10571
|
-
MediaCaptionsMenu.template =
|
|
10812
|
+
MediaCaptionsMenu.template = template16;
|
|
10572
10813
|
var getSubtitlesListAttr2 = (el, attrName) => {
|
|
10573
10814
|
const attrVal = el.getAttribute(attrName);
|
|
10574
10815
|
return attrVal ? parseTextTracksStr(attrVal) : [];
|
|
@@ -10588,18 +10829,18 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10588
10829
|
GlobalThis.customElements.define("media-captions-menu", MediaCaptionsMenu);
|
|
10589
10830
|
}
|
|
10590
10831
|
|
|
10591
|
-
// ../../node_modules/
|
|
10592
|
-
var
|
|
10832
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
10833
|
+
var __accessCheck26 = (obj, member, msg) => {
|
|
10593
10834
|
if (!member.has(obj))
|
|
10594
10835
|
throw TypeError("Cannot " + msg);
|
|
10595
10836
|
};
|
|
10596
|
-
var
|
|
10837
|
+
var __privateAdd26 = (obj, member, value) => {
|
|
10597
10838
|
if (member.has(obj))
|
|
10598
10839
|
throw TypeError("Cannot add the same private member more than once");
|
|
10599
10840
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10600
10841
|
};
|
|
10601
|
-
var
|
|
10602
|
-
|
|
10842
|
+
var __privateSet25 = (obj, member, value, setter) => {
|
|
10843
|
+
__accessCheck26(obj, member, "write to private field");
|
|
10603
10844
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
10604
10845
|
return value;
|
|
10605
10846
|
};
|
|
@@ -10640,8 +10881,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10640
10881
|
var MediaCaptionsMenuButton = class extends MediaChromeMenuButton {
|
|
10641
10882
|
constructor(options = {}) {
|
|
10642
10883
|
super({ slotTemplate: slotTemplate14, tooltipContent: tooltipLabels.CAPTIONS, ...options });
|
|
10643
|
-
|
|
10644
|
-
|
|
10884
|
+
__privateAdd26(this, _captionsReady, void 0);
|
|
10885
|
+
__privateSet25(this, _captionsReady, false);
|
|
10645
10886
|
}
|
|
10646
10887
|
static get observedAttributes() {
|
|
10647
10888
|
return [
|
|
@@ -10718,22 +10959,22 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10718
10959
|
);
|
|
10719
10960
|
}
|
|
10720
10961
|
|
|
10721
|
-
// ../../node_modules/
|
|
10722
|
-
var
|
|
10962
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
10963
|
+
var __accessCheck27 = (obj, member, msg) => {
|
|
10723
10964
|
if (!member.has(obj))
|
|
10724
10965
|
throw TypeError("Cannot " + msg);
|
|
10725
10966
|
};
|
|
10726
|
-
var
|
|
10727
|
-
|
|
10967
|
+
var __privateGet26 = (obj, member, getter) => {
|
|
10968
|
+
__accessCheck27(obj, member, "read from private field");
|
|
10728
10969
|
return getter ? getter.call(obj) : member.get(obj);
|
|
10729
10970
|
};
|
|
10730
|
-
var
|
|
10971
|
+
var __privateAdd27 = (obj, member, value) => {
|
|
10731
10972
|
if (member.has(obj))
|
|
10732
10973
|
throw TypeError("Cannot add the same private member more than once");
|
|
10733
10974
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10734
10975
|
};
|
|
10735
|
-
var
|
|
10736
|
-
|
|
10976
|
+
var __privateMethod12 = (obj, member, method) => {
|
|
10977
|
+
__accessCheck27(obj, member, "access private method");
|
|
10737
10978
|
return method;
|
|
10738
10979
|
};
|
|
10739
10980
|
var _rates2;
|
|
@@ -10747,12 +10988,12 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10747
10988
|
var MediaPlaybackRateMenu = class extends MediaChromeMenu {
|
|
10748
10989
|
constructor() {
|
|
10749
10990
|
super();
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
10991
|
+
__privateAdd27(this, _render3);
|
|
10992
|
+
__privateAdd27(this, _onChange3);
|
|
10993
|
+
__privateAdd27(this, _rates2, new AttributeTokenList(this, Attributes14.RATES, {
|
|
10753
10994
|
defaultValue: DEFAULT_RATES
|
|
10754
10995
|
}));
|
|
10755
|
-
|
|
10996
|
+
__privateMethod12(this, _render3, render_fn3).call(this);
|
|
10756
10997
|
}
|
|
10757
10998
|
static get observedAttributes() {
|
|
10758
10999
|
return [
|
|
@@ -10766,17 +11007,17 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10766
11007
|
if (attrName === MediaUIAttributes.MEDIA_PLAYBACK_RATE && oldValue != newValue) {
|
|
10767
11008
|
this.value = newValue;
|
|
10768
11009
|
} else if (attrName === Attributes14.RATES && oldValue != newValue) {
|
|
10769
|
-
|
|
10770
|
-
|
|
11010
|
+
__privateGet26(this, _rates2).value = newValue;
|
|
11011
|
+
__privateMethod12(this, _render3, render_fn3).call(this);
|
|
10771
11012
|
}
|
|
10772
11013
|
}
|
|
10773
11014
|
connectedCallback() {
|
|
10774
11015
|
super.connectedCallback();
|
|
10775
|
-
this.addEventListener("change",
|
|
11016
|
+
this.addEventListener("change", __privateMethod12(this, _onChange3, onChange_fn3));
|
|
10776
11017
|
}
|
|
10777
11018
|
disconnectedCallback() {
|
|
10778
11019
|
super.disconnectedCallback();
|
|
10779
|
-
this.removeEventListener("change",
|
|
11020
|
+
this.removeEventListener("change", __privateMethod12(this, _onChange3, onChange_fn3));
|
|
10780
11021
|
}
|
|
10781
11022
|
/**
|
|
10782
11023
|
* Returns the anchor element when it is a floating menu.
|
|
@@ -10793,15 +11034,15 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10793
11034
|
* Setting a value will accept an array of numbers.
|
|
10794
11035
|
*/
|
|
10795
11036
|
get rates() {
|
|
10796
|
-
return
|
|
11037
|
+
return __privateGet26(this, _rates2);
|
|
10797
11038
|
}
|
|
10798
11039
|
set rates(value) {
|
|
10799
11040
|
if (!value) {
|
|
10800
|
-
|
|
11041
|
+
__privateGet26(this, _rates2).value = "";
|
|
10801
11042
|
} else if (Array.isArray(value)) {
|
|
10802
|
-
|
|
11043
|
+
__privateGet26(this, _rates2).value = value.join(" ");
|
|
10803
11044
|
}
|
|
10804
|
-
|
|
11045
|
+
__privateMethod12(this, _render3, render_fn3).call(this);
|
|
10805
11046
|
}
|
|
10806
11047
|
/**
|
|
10807
11048
|
* The current playback rate
|
|
@@ -10853,16 +11094,16 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10853
11094
|
);
|
|
10854
11095
|
}
|
|
10855
11096
|
|
|
10856
|
-
// ../../node_modules/
|
|
10857
|
-
var
|
|
11097
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
11098
|
+
var __accessCheck28 = (obj, member, msg) => {
|
|
10858
11099
|
if (!member.has(obj))
|
|
10859
11100
|
throw TypeError("Cannot " + msg);
|
|
10860
11101
|
};
|
|
10861
|
-
var
|
|
10862
|
-
|
|
11102
|
+
var __privateGet27 = (obj, member, getter) => {
|
|
11103
|
+
__accessCheck28(obj, member, "read from private field");
|
|
10863
11104
|
return getter ? getter.call(obj) : member.get(obj);
|
|
10864
11105
|
};
|
|
10865
|
-
var
|
|
11106
|
+
var __privateAdd28 = (obj, member, value) => {
|
|
10866
11107
|
if (member.has(obj))
|
|
10867
11108
|
throw TypeError("Cannot add the same private member more than once");
|
|
10868
11109
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
@@ -10895,7 +11136,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10895
11136
|
tooltipContent: tooltipLabels.PLAYBACK_RATE,
|
|
10896
11137
|
...options
|
|
10897
11138
|
});
|
|
10898
|
-
|
|
11139
|
+
__privateAdd28(this, _rates3, new AttributeTokenList(this, Attributes15.RATES, {
|
|
10899
11140
|
defaultValue: DEFAULT_RATES2
|
|
10900
11141
|
}));
|
|
10901
11142
|
this.container = this.shadowRoot.querySelector('slot[name="icon"]');
|
|
@@ -10911,7 +11152,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10911
11152
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
10912
11153
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
10913
11154
|
if (attrName === Attributes15.RATES) {
|
|
10914
|
-
|
|
11155
|
+
__privateGet27(this, _rates3).value = newValue;
|
|
10915
11156
|
}
|
|
10916
11157
|
if (attrName === MediaUIAttributes.MEDIA_PLAYBACK_RATE) {
|
|
10917
11158
|
const newPlaybackRate = newValue ? +newValue : Number.NaN;
|
|
@@ -10933,13 +11174,13 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10933
11174
|
* Setting a value will accept an array of numbers.
|
|
10934
11175
|
*/
|
|
10935
11176
|
get rates() {
|
|
10936
|
-
return
|
|
11177
|
+
return __privateGet27(this, _rates3);
|
|
10937
11178
|
}
|
|
10938
11179
|
set rates(value) {
|
|
10939
11180
|
if (!value) {
|
|
10940
|
-
|
|
11181
|
+
__privateGet27(this, _rates3).value = "";
|
|
10941
11182
|
} else if (Array.isArray(value)) {
|
|
10942
|
-
|
|
11183
|
+
__privateGet27(this, _rates3).value = value.join(" ");
|
|
10943
11184
|
}
|
|
10944
11185
|
}
|
|
10945
11186
|
/**
|
|
@@ -10964,27 +11205,27 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10964
11205
|
);
|
|
10965
11206
|
}
|
|
10966
11207
|
|
|
10967
|
-
// ../../node_modules/
|
|
10968
|
-
var
|
|
11208
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
11209
|
+
var __accessCheck29 = (obj, member, msg) => {
|
|
10969
11210
|
if (!member.has(obj))
|
|
10970
11211
|
throw TypeError("Cannot " + msg);
|
|
10971
11212
|
};
|
|
10972
|
-
var
|
|
10973
|
-
|
|
11213
|
+
var __privateGet28 = (obj, member, getter) => {
|
|
11214
|
+
__accessCheck29(obj, member, "read from private field");
|
|
10974
11215
|
return getter ? getter.call(obj) : member.get(obj);
|
|
10975
11216
|
};
|
|
10976
|
-
var
|
|
11217
|
+
var __privateAdd29 = (obj, member, value) => {
|
|
10977
11218
|
if (member.has(obj))
|
|
10978
11219
|
throw TypeError("Cannot add the same private member more than once");
|
|
10979
11220
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10980
11221
|
};
|
|
10981
|
-
var
|
|
10982
|
-
|
|
11222
|
+
var __privateSet26 = (obj, member, value, setter) => {
|
|
11223
|
+
__accessCheck29(obj, member, "write to private field");
|
|
10983
11224
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
10984
11225
|
return value;
|
|
10985
11226
|
};
|
|
10986
|
-
var
|
|
10987
|
-
|
|
11227
|
+
var __privateMethod13 = (obj, member, method) => {
|
|
11228
|
+
__accessCheck29(obj, member, "access private method");
|
|
10988
11229
|
return method;
|
|
10989
11230
|
};
|
|
10990
11231
|
var _renditionList;
|
|
@@ -10996,17 +11237,18 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
10996
11237
|
var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
10997
11238
|
constructor() {
|
|
10998
11239
|
super(...arguments);
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11240
|
+
__privateAdd29(this, _render4);
|
|
11241
|
+
__privateAdd29(this, _onChange4);
|
|
11242
|
+
__privateAdd29(this, _renditionList, []);
|
|
11243
|
+
__privateAdd29(this, _prevState3, {});
|
|
11003
11244
|
}
|
|
11004
11245
|
static get observedAttributes() {
|
|
11005
11246
|
return [
|
|
11006
11247
|
...super.observedAttributes,
|
|
11007
11248
|
MediaUIAttributes.MEDIA_RENDITION_LIST,
|
|
11008
11249
|
MediaUIAttributes.MEDIA_RENDITION_SELECTED,
|
|
11009
|
-
MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE
|
|
11250
|
+
MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE,
|
|
11251
|
+
MediaUIAttributes.MEDIA_HEIGHT
|
|
11010
11252
|
];
|
|
11011
11253
|
}
|
|
11012
11254
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
@@ -11014,17 +11256,19 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
11014
11256
|
if (attrName === MediaUIAttributes.MEDIA_RENDITION_SELECTED && oldValue !== newValue) {
|
|
11015
11257
|
this.value = newValue != null ? newValue : "auto";
|
|
11016
11258
|
} else if (attrName === MediaUIAttributes.MEDIA_RENDITION_LIST && oldValue !== newValue) {
|
|
11017
|
-
|
|
11018
|
-
|
|
11259
|
+
__privateSet26(this, _renditionList, parseRenditionList(newValue));
|
|
11260
|
+
__privateMethod13(this, _render4, render_fn4).call(this);
|
|
11261
|
+
} else if (attrName === MediaUIAttributes.MEDIA_HEIGHT && oldValue !== newValue) {
|
|
11262
|
+
__privateMethod13(this, _render4, render_fn4).call(this);
|
|
11019
11263
|
}
|
|
11020
11264
|
}
|
|
11021
11265
|
connectedCallback() {
|
|
11022
11266
|
super.connectedCallback();
|
|
11023
|
-
this.addEventListener("change",
|
|
11267
|
+
this.addEventListener("change", __privateMethod13(this, _onChange4, onChange_fn4));
|
|
11024
11268
|
}
|
|
11025
11269
|
disconnectedCallback() {
|
|
11026
11270
|
super.disconnectedCallback();
|
|
11027
|
-
this.removeEventListener("change",
|
|
11271
|
+
this.removeEventListener("change", __privateMethod13(this, _onChange4, onChange_fn4));
|
|
11028
11272
|
}
|
|
11029
11273
|
/**
|
|
11030
11274
|
* Returns the anchor element when it is a floating menu.
|
|
@@ -11037,11 +11281,11 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
11037
11281
|
);
|
|
11038
11282
|
}
|
|
11039
11283
|
get mediaRenditionList() {
|
|
11040
|
-
return
|
|
11284
|
+
return __privateGet28(this, _renditionList);
|
|
11041
11285
|
}
|
|
11042
11286
|
set mediaRenditionList(list) {
|
|
11043
|
-
|
|
11044
|
-
|
|
11287
|
+
__privateSet26(this, _renditionList, list);
|
|
11288
|
+
__privateMethod13(this, _render4, render_fn4).call(this);
|
|
11045
11289
|
}
|
|
11046
11290
|
/**
|
|
11047
11291
|
* Get selected rendition id.
|
|
@@ -11052,17 +11296,27 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
11052
11296
|
set mediaRenditionSelected(id) {
|
|
11053
11297
|
setStringAttr(this, MediaUIAttributes.MEDIA_RENDITION_SELECTED, id);
|
|
11054
11298
|
}
|
|
11299
|
+
get mediaHeight() {
|
|
11300
|
+
return getNumericAttr(this, MediaUIAttributes.MEDIA_HEIGHT);
|
|
11301
|
+
}
|
|
11302
|
+
set mediaHeight(height) {
|
|
11303
|
+
setNumericAttr(this, MediaUIAttributes.MEDIA_HEIGHT, height);
|
|
11304
|
+
}
|
|
11055
11305
|
};
|
|
11056
11306
|
_renditionList = /* @__PURE__ */ new WeakMap();
|
|
11057
11307
|
_prevState3 = /* @__PURE__ */ new WeakMap();
|
|
11058
11308
|
_render4 = /* @__PURE__ */ new WeakSet();
|
|
11059
11309
|
render_fn4 = function() {
|
|
11060
|
-
if (
|
|
11310
|
+
if (__privateGet28(this, _prevState3).mediaRenditionList === JSON.stringify(this.mediaRenditionList) && __privateGet28(this, _prevState3).mediaHeight === this.mediaHeight)
|
|
11061
11311
|
return;
|
|
11062
|
-
|
|
11312
|
+
__privateGet28(this, _prevState3).mediaRenditionList = JSON.stringify(this.mediaRenditionList);
|
|
11313
|
+
__privateGet28(this, _prevState3).mediaHeight = this.mediaHeight;
|
|
11063
11314
|
const renditionList = this.mediaRenditionList.sort(
|
|
11064
11315
|
(a, b) => b.height - a.height
|
|
11065
11316
|
);
|
|
11317
|
+
for (const rendition of renditionList) {
|
|
11318
|
+
rendition.selected = rendition.id === this.mediaRenditionSelected;
|
|
11319
|
+
}
|
|
11066
11320
|
this.defaultSlot.textContent = "";
|
|
11067
11321
|
const isAuto = !this.mediaRenditionSelected;
|
|
11068
11322
|
for (const rendition of renditionList) {
|
|
@@ -11085,6 +11339,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
11085
11339
|
value: "auto",
|
|
11086
11340
|
checked: isAuto
|
|
11087
11341
|
});
|
|
11342
|
+
const autoDescription = this.mediaHeight > 0 ? `Auto (${this.mediaHeight}p)` : "Auto";
|
|
11343
|
+
item.dataset.description = autoDescription;
|
|
11088
11344
|
item.prepend(createIndicator(this, "checked-indicator"));
|
|
11089
11345
|
this.defaultSlot.append(item);
|
|
11090
11346
|
};
|
|
@@ -11106,7 +11362,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
11106
11362
|
GlobalThis.customElements.define("media-rendition-menu", MediaRenditionMenu);
|
|
11107
11363
|
}
|
|
11108
11364
|
|
|
11109
|
-
// ../../node_modules/
|
|
11365
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
11110
11366
|
var renditionIcon = (
|
|
11111
11367
|
/*html*/
|
|
11112
11368
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -11128,7 +11384,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
11128
11384
|
return [
|
|
11129
11385
|
...super.observedAttributes,
|
|
11130
11386
|
MediaUIAttributes.MEDIA_RENDITION_SELECTED,
|
|
11131
|
-
MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE
|
|
11387
|
+
MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE,
|
|
11388
|
+
MediaUIAttributes.MEDIA_HEIGHT
|
|
11132
11389
|
];
|
|
11133
11390
|
}
|
|
11134
11391
|
constructor() {
|
|
@@ -11155,6 +11412,12 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
11155
11412
|
set mediaRenditionSelected(id) {
|
|
11156
11413
|
setStringAttr(this, MediaUIAttributes.MEDIA_RENDITION_SELECTED, id);
|
|
11157
11414
|
}
|
|
11415
|
+
get mediaHeight() {
|
|
11416
|
+
return getNumericAttr(this, MediaUIAttributes.MEDIA_HEIGHT);
|
|
11417
|
+
}
|
|
11418
|
+
set mediaHeight(height) {
|
|
11419
|
+
setNumericAttr(this, MediaUIAttributes.MEDIA_HEIGHT, height);
|
|
11420
|
+
}
|
|
11158
11421
|
};
|
|
11159
11422
|
if (!GlobalThis.customElements.get("media-rendition-menu-button")) {
|
|
11160
11423
|
GlobalThis.customElements.define(
|
|
@@ -11165,9 +11428,9 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
11165
11428
|
|
|
11166
11429
|
// ../../node_modules/player.style/themes/microvideo/dist/media-theme.js
|
|
11167
11430
|
var _a2, _b;
|
|
11168
|
-
var
|
|
11169
|
-
if (
|
|
11170
|
-
|
|
11431
|
+
var template17 = (_b = (_a2 = GlobalThis.document) == null ? void 0 : _a2.createElement) == null ? void 0 : _b.call(_a2, "template");
|
|
11432
|
+
if (template17) {
|
|
11433
|
+
template17.innerHTML = /*html*/
|
|
11171
11434
|
`
|
|
11172
11435
|
<style>
|
|
11173
11436
|
:host {
|
|
@@ -11595,6 +11858,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
11595
11858
|
<slot name="media" slot="media"></slot>
|
|
11596
11859
|
<slot name="poster" slot="poster"></slot>
|
|
11597
11860
|
<media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
|
|
11861
|
+
<media-error-dialog slot="dialog"></media-error-dialog>
|
|
11598
11862
|
|
|
11599
11863
|
<template if="streamtype == 'on-demand'">
|
|
11600
11864
|
|
|
@@ -11672,7 +11936,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
|
|
|
11672
11936
|
}
|
|
11673
11937
|
var MediaThemeMicrovideoElement = class extends MediaThemeElement {
|
|
11674
11938
|
};
|
|
11675
|
-
__publicField(MediaThemeMicrovideoElement, "template",
|
|
11939
|
+
__publicField(MediaThemeMicrovideoElement, "template", template17);
|
|
11676
11940
|
if (GlobalThis.customElements && !GlobalThis.customElements.get("media-theme-microvideo")) {
|
|
11677
11941
|
GlobalThis.customElements.define("media-theme-microvideo", MediaThemeMicrovideoElement);
|
|
11678
11942
|
}
|