@deep-eye/core 0.9.1 → 1.0.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.
Files changed (134) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +113 -174
  3. package/dist/components/chat/ChatBot.vue.d.ts +48 -17
  4. package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
  5. package/dist/components/chat/attachmentController.d.ts +25 -0
  6. package/dist/components/chat/attachmentController.d.ts.map +1 -0
  7. package/dist/components/chat/attachments.d.ts +12 -0
  8. package/dist/components/chat/attachments.d.ts.map +1 -0
  9. package/dist/components/chat/chatContext.d.ts +14 -0
  10. package/dist/components/chat/chatContext.d.ts.map +1 -0
  11. package/dist/components/chat/chatErrors.d.ts +16 -0
  12. package/dist/components/chat/chatErrors.d.ts.map +1 -0
  13. package/dist/components/chat/chatQueue.d.ts +6 -0
  14. package/dist/components/chat/chatQueue.d.ts.map +1 -0
  15. package/dist/components/chat/components/ArtifactPreview.vue.d.ts.map +1 -1
  16. package/dist/components/chat/components/ChatActionbar.vue.d.ts +3 -3
  17. package/dist/components/chat/components/ChatActionbar.vue.d.ts.map +1 -1
  18. package/dist/components/chat/components/ChatAttachments.vue.d.ts +12 -0
  19. package/dist/components/chat/components/ChatAttachments.vue.d.ts.map +1 -0
  20. package/dist/components/chat/components/ChatFilePreview.vue.d.ts +45 -0
  21. package/dist/components/chat/components/ChatFilePreview.vue.d.ts.map +1 -0
  22. package/dist/components/chat/components/ChatFilePreviewPanel.vue.d.ts +24 -0
  23. package/dist/components/chat/components/ChatFilePreviewPanel.vue.d.ts.map +1 -0
  24. package/dist/components/chat/components/ChatImageLightbox.vue.d.ts +16 -0
  25. package/dist/components/chat/components/ChatImageLightbox.vue.d.ts.map +1 -0
  26. package/dist/components/chat/components/ChatMediaPreview.vue.d.ts +9 -0
  27. package/dist/components/chat/components/ChatMediaPreview.vue.d.ts.map +1 -0
  28. package/dist/components/chat/components/ChatMessage.vue.d.ts +43 -2
  29. package/dist/components/chat/components/ChatMessage.vue.d.ts.map +1 -1
  30. package/dist/components/chat/components/ChatOfficePreview.vue.d.ts +9 -0
  31. package/dist/components/chat/components/ChatOfficePreview.vue.d.ts.map +1 -0
  32. package/dist/components/chat/components/ChatProvider.vue.d.ts +73 -0
  33. package/dist/components/chat/components/ChatProvider.vue.d.ts.map +1 -0
  34. package/dist/components/chat/components/ChatQueue.vue.d.ts +16 -0
  35. package/dist/components/chat/components/ChatQueue.vue.d.ts.map +1 -0
  36. package/dist/components/chat/components/ChatReasoning.vue.d.ts +21 -0
  37. package/dist/components/chat/components/ChatReasoning.vue.d.ts.map +1 -0
  38. package/dist/components/chat/components/ChatSender.vue.d.ts +34 -17
  39. package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
  40. package/dist/components/chat/components/ChatSidebarResizeHandle.vue.d.ts +13 -0
  41. package/dist/components/chat/components/ChatSidebarResizeHandle.vue.d.ts.map +1 -0
  42. package/dist/components/chat/components/ChatToolGroup.vue.d.ts +28 -0
  43. package/dist/components/chat/components/ChatToolGroup.vue.d.ts.map +1 -0
  44. package/dist/components/chat/components/ConversationList.vue.d.ts +129 -0
  45. package/dist/components/chat/components/ConversationList.vue.d.ts.map +1 -0
  46. package/dist/components/chat/components/InputContentParts.vue.d.ts +8 -0
  47. package/dist/components/chat/components/InputContentParts.vue.d.ts.map +1 -0
  48. package/dist/components/chat/components/MessageBubble.vue.d.ts +43 -2
  49. package/dist/components/chat/components/MessageBubble.vue.d.ts.map +1 -1
  50. package/dist/components/chat/components/TextPartRenderer.vue.d.ts.map +1 -1
  51. package/dist/components/chat/components/ToolCallPart.vue.d.ts +12 -3
  52. package/dist/components/chat/components/ToolCallPart.vue.d.ts.map +1 -1
  53. package/dist/components/chat/components/index.d.ts +9 -0
  54. package/dist/components/chat/components/index.d.ts.map +1 -1
  55. package/dist/components/chat/composables/index.d.ts +0 -1
  56. package/dist/components/chat/composables/index.d.ts.map +1 -1
  57. package/dist/components/chat/composables/useChatVoice.d.ts +45 -0
  58. package/dist/components/chat/composables/useChatVoice.d.ts.map +1 -0
  59. package/dist/components/chat/composables/useConversation.d.ts +1 -5
  60. package/dist/components/chat/composables/useConversation.d.ts.map +1 -1
  61. package/dist/components/chat/composables/useMeasuredHeight.d.ts +11 -0
  62. package/dist/components/chat/composables/useMeasuredHeight.d.ts.map +1 -0
  63. package/dist/components/chat/composables/useStreamSmoothing.d.ts +13 -0
  64. package/dist/components/chat/composables/useStreamSmoothing.d.ts.map +1 -0
  65. package/dist/components/chat/index.d.ts +12 -4
  66. package/dist/components/chat/index.d.ts.map +1 -1
  67. package/dist/components/chat/mdoc/ContentNodes.vue.d.ts.map +1 -1
  68. package/dist/components/chat/mdoc/MediaImageStack.vue.d.ts.map +1 -1
  69. package/dist/components/chat/previewRenderers.d.ts +6 -0
  70. package/dist/components/chat/previewRenderers.d.ts.map +1 -0
  71. package/dist/components/chat/qiniuUpload.d.ts +10 -0
  72. package/dist/components/chat/qiniuUpload.d.ts.map +1 -0
  73. package/dist/components/chat/responseStream.d.ts +17 -0
  74. package/dist/components/chat/responseStream.d.ts.map +1 -0
  75. package/dist/components/chat/toolLabels.d.ts +4 -0
  76. package/dist/components/chat/toolLabels.d.ts.map +1 -0
  77. package/dist/components/chat/toolStatus.d.ts +16 -0
  78. package/dist/components/chat/toolStatus.d.ts.map +1 -0
  79. package/dist/components/chat/types.d.ts +457 -144
  80. package/dist/components/chat/types.d.ts.map +1 -1
  81. package/dist/components/visualization/types.d.ts +8 -7
  82. package/dist/components/visualization/types.d.ts.map +1 -1
  83. package/dist/components/visualization/utils.d.ts +4 -2
  84. package/dist/components/visualization/utils.d.ts.map +1 -1
  85. package/dist/composables/useMindMapTheme.d.ts +4 -7
  86. package/dist/composables/useMindMapTheme.d.ts.map +1 -1
  87. package/dist/errors-CHzikrqu.js +70 -0
  88. package/dist/errors-upLl4kf2.cjs +1 -0
  89. package/dist/index-B4hgICk-.cjs +198 -0
  90. package/dist/index-BJdNN1GV.cjs +33 -0
  91. package/dist/index-Bj9h-xEr.cjs +112 -0
  92. package/dist/index-BufnUXnQ.js +5071 -0
  93. package/dist/index-CnxZBHPD.js +42825 -0
  94. package/dist/index-DF8KmkKX.js +38392 -0
  95. package/dist/index-DPhuLMkO.cjs +1 -0
  96. package/dist/index-Dq4cniDm.cjs +5 -0
  97. package/dist/index-cW_BnxHR.js +1722 -0
  98. package/dist/index-iCVvFIlX.js +28 -0
  99. package/dist/index.cjs +275 -134
  100. package/dist/index.js +20496 -10365
  101. package/dist/media-community-skin-Djo8L1G9.js +302 -0
  102. package/dist/media-community-skin-YI6NjsJg.cjs +1 -0
  103. package/dist/media-core-CkW37AYl.js +3827 -0
  104. package/dist/media-core-Rxz2MNwG.cjs +1 -0
  105. package/dist/media-outlet-CZTh6XmJ.cjs +1 -0
  106. package/dist/media-outlet-D2rcuhYN.js +2 -0
  107. package/dist/media-player-BZrIM0O_.js +387 -0
  108. package/dist/media-player-D_USOhtK.cjs +1 -0
  109. package/dist/media-ui-DfPbRfFS.js +2832 -0
  110. package/dist/media-ui-zZVnK1ts.cjs +1 -0
  111. package/dist/prod-Ba2x-T01.cjs +4 -0
  112. package/dist/prod-DBMM0zDd.js +992 -0
  113. package/dist/provider-B7wAEcCR.js +163 -0
  114. package/dist/provider-BPphQwpc.cjs +1 -0
  115. package/dist/provider-BSeBwvzM.cjs +1 -0
  116. package/dist/provider-DgSZc2dM.js +162 -0
  117. package/dist/provider-EKFFiZS1.js +27 -0
  118. package/dist/provider-O8r0RFmF.cjs +1 -0
  119. package/dist/provider-WrRdjcjY.js +483 -0
  120. package/dist/provider-sqICX3H9.cjs +1 -0
  121. package/dist/srt-parser-BECMkbXb.cjs +2 -0
  122. package/dist/srt-parser-BR28Llpk.js +27 -0
  123. package/dist/ssa-parser-BJTK0kd-.js +209 -0
  124. package/dist/ssa-parser-CuKkTpK_.cjs +4 -0
  125. package/dist/style.css +1 -1
  126. package/package.json +7 -2
  127. package/dist/components/chat/AiConversation.vue.d.ts +0 -28
  128. package/dist/components/chat/AiConversation.vue.d.ts.map +0 -1
  129. package/dist/components/chat/components/AssistantTrace.vue.d.ts +0 -27
  130. package/dist/components/chat/components/AssistantTrace.vue.d.ts.map +0 -1
  131. package/dist/components/chat/composables/useConversationStream.d.ts +0 -3
  132. package/dist/components/chat/composables/useConversationStream.d.ts.map +0 -1
  133. package/dist/components/chat/presentation.d.ts +0 -27
  134. package/dist/components/chat/presentation.d.ts.map +0 -1
@@ -0,0 +1,2832 @@
1
+ var ne = Object.defineProperty;
2
+ var ae = (o, i, t) => i in o ? ne(o, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[i] = t;
3
+ var n = (o, i, t) => ae(o, typeof i != "symbol" ? i + "" : i, t);
4
+ import { a4 as g, U as v, a5 as oe, Q as p, a6 as Ct, s as f, q as l, u as b, C as j, d as u, J as C, c as P, a3 as he, a7 as _, a8 as O, a9 as st, aa as it, ab as rt, W as I, ac as ce, z as m, ad as W, ae as Bt, af as R, N as x, G as E, o as H, ag as B, ah as le, p as Y, ai as de, aj as ft, ak as M, al as K, t as $, am as $t, an as vt, ao as Gt, ap as ue, aq as jt, P as nt, ar as L, as as xt, at as pe, au as Vt, av as Tt, aw as be, ax as Mt, ay as me, az as ge, aA as dt, aB as q, aC as zt, aD as at, aE as Ce, aF as Qt, K as ot, aG as fe, aH as Pt, X as $e, aI as ve, $ as Nt, L as je, aJ as xe, aK as we, R as Ut, B as ht, D as Wt } from "./media-core-CkW37AYl.js";
5
+ import { C as ke, r as ye, u as _e } from "./prod-DBMM0zDd.js";
6
+ const He = /* @__PURE__ */ p('<!$><svg viewBox="0 0 32 32" fill="none" aria-hidden="true" focusable="false" data-media-icon="true"></svg>');
7
+ function w({ slot: o, part: i, paths: t, rotate: e }) {
8
+ return (() => {
9
+ const [s, r] = g(He);
10
+ return v(s, "data-rotate", e), v(s, "slot", o), v(s, "part", i), oe || (s.innerHTML = t), s;
11
+ })();
12
+ }
13
+ function A(o, i = 2) {
14
+ return Number(o.toFixed(i));
15
+ }
16
+ function Le(o) {
17
+ var i;
18
+ return ((i = String(o).split(".")[1]) == null ? void 0 : i.length) ?? 0;
19
+ }
20
+ function Yt(o, i, t) {
21
+ return Math.max(o, Math.min(t, i));
22
+ }
23
+ let pt = f(!1);
24
+ $(document, "pointerdown", () => {
25
+ pt.set(!1);
26
+ }), $(document, "keydown", (o) => {
27
+ o.metaKey || o.altKey || o.ctrlKey || pt.set(!0);
28
+ });
29
+ class D extends Ct {
30
+ constructor() {
31
+ super(...arguments);
32
+ n(this, "Qe", f(!1));
33
+ }
34
+ onConnect(t) {
35
+ l(() => {
36
+ if (!pt()) {
37
+ this.Qe.set(!1), et(t, !1), this.listen("pointerenter", this.Re.bind(this)), this.listen("pointerleave", this.Se.bind(this));
38
+ return;
39
+ }
40
+ const e = document.activeElement === t;
41
+ this.Qe.set(e), et(t, e), this.listen("focus", this.Te.bind(this)), this.listen("blur", this.Ue.bind(this));
42
+ });
43
+ }
44
+ focused() {
45
+ return this.Qe();
46
+ }
47
+ Te() {
48
+ this.Qe.set(!0), et(this.el, !0);
49
+ }
50
+ Ue() {
51
+ this.Qe.set(!1), et(this.el, !1);
52
+ }
53
+ Re() {
54
+ Et(this.el, !0);
55
+ }
56
+ Se() {
57
+ Et(this.el, !1);
58
+ }
59
+ }
60
+ function et(o, i) {
61
+ b(o, "data-focus", i), b(o, "data-hocus", i);
62
+ }
63
+ function Et(o, i) {
64
+ b(o, "data-hocus", i), b(o, "data-hover", i);
65
+ }
66
+ const bt = ot();
67
+ class Ae extends j {
68
+ onAttach(i) {
69
+ it(bt) && rt(() => {
70
+ if (!i.isConnected)
71
+ return;
72
+ I(bt).bb(i);
73
+ }), this.setAttributes({
74
+ position: this.$props.position
75
+ });
76
+ }
77
+ }
78
+ n(Ae, "el", u({
79
+ tagName: "media-tooltip",
80
+ props: { position: "top center" }
81
+ }));
82
+ let Ve = 0;
83
+ class wt extends Ct {
84
+ constructor(i) {
85
+ super(i), Y(bt, {
86
+ bb: this.bb.bind(this)
87
+ });
88
+ }
89
+ bb(i) {
90
+ const t = `media-tooltip-${++Ve}`;
91
+ b(this.el, "aria-describedby", t), b(i, "id", t), b(i, "role", "tooltip"), this.el.removeAttribute("aria-label");
92
+ }
93
+ }
94
+ var Te = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, Pe = (o, i, t, e) => {
95
+ for (var s = Me(i, t), r = o.length - 1, a; r >= 0; r--)
96
+ (a = o[r]) && (s = a(i, t, s) || s);
97
+ return s && Te(i, t, s), s;
98
+ };
99
+ const G = {
100
+ disabled: !1,
101
+ defaultPressed: !1,
102
+ defaultAppearance: !1
103
+ };
104
+ class F extends j {
105
+ constructor(t) {
106
+ super(t);
107
+ n(this, "cb", f(!1));
108
+ n(this, "db");
109
+ new D(t), new wt(t), this.db && new pe(t, this.db);
110
+ }
111
+ get pressed() {
112
+ return m(this.cb);
113
+ }
114
+ onAttach(t) {
115
+ Vt(this.cb) && this.cb.set(this.$props.defaultPressed()), H(t, "tabindex", "0"), H(t, "role", "button");
116
+ const { disabled: e, defaultAppearance: s } = this.$props;
117
+ this.setAttributes({
118
+ disabled: e,
119
+ "default-appearance": s,
120
+ "data-pressed": this.cb,
121
+ "aria-pressed": this.eb.bind(this),
122
+ "data-media-button": !0
123
+ });
124
+ }
125
+ onConnect(t) {
126
+ B(t, this.fb.bind(this));
127
+ }
128
+ eb() {
129
+ return ft(this.cb());
130
+ }
131
+ gb(t) {
132
+ Vt(this.cb) && this.cb.set((e) => !e);
133
+ }
134
+ fb(t) {
135
+ const e = this.$props.disabled();
136
+ if (e) {
137
+ e && t.stopImmediatePropagation();
138
+ return;
139
+ }
140
+ t.preventDefault(), this.gb(t);
141
+ }
142
+ }
143
+ n(F, "el", u({
144
+ tagName: "media-toggle-button",
145
+ props: G
146
+ }));
147
+ Pe([
148
+ ht
149
+ ], F.prototype, "pressed");
150
+ var Ne = '<path d="M8.66667 6.66667C8.29848 6.66667 8 6.96514 8 7.33333V24.6667C8 25.0349 8.29848 25.3333 8.66667 25.3333H12.6667C13.0349 25.3333 13.3333 25.0349 13.3333 24.6667V7.33333C13.3333 6.96514 13.0349 6.66667 12.6667 6.66667H8.66667Z" fill="currentColor"/> <path d="M19.3333 6.66667C18.9651 6.66667 18.6667 6.96514 18.6667 7.33333V24.6667C18.6667 25.0349 18.9651 25.3333 19.3333 25.3333H23.3333C23.7015 25.3333 24 25.0349 24 24.6667V7.33333C24 6.96514 23.7015 6.66667 23.3333 6.66667H19.3333Z" fill="currentColor"/>', Ee = '<path d="M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z" fill="currentColor"/>', Se = '<path d="M15.6038 12.2147C16.0439 12.5399 16.6667 12.2257 16.6667 11.6786V10.1789C16.6667 10.1001 16.7351 10.0384 16.8134 10.0479C20.1116 10.4494 22.6667 13.2593 22.6667 16.6659C22.6667 20.3481 19.6817 23.3332 15.9995 23.3332C12.542 23.3332 9.69927 20.7014 9.36509 17.332C9.32875 16.9655 9.03371 16.6662 8.66548 16.6662L6.66655 16.6666C6.29841 16.6666 5.99769 16.966 6.02187 17.3334C6.36494 22.5454 10.7012 26.6667 16 26.6667C21.5228 26.6667 26 22.1895 26 16.6667C26 11.4103 21.9444 7.10112 16.7916 6.69757C16.7216 6.69209 16.6667 6.63396 16.6667 6.56372V4.98824C16.6667 4.44106 16.0439 4.12689 15.6038 4.45206L11.0765 7.79738C10.7159 8.06387 10.7159 8.60326 11.0766 8.86973L15.6038 12.2147Z" fill="currentColor"/>';
151
+ class Ie extends F {
152
+ constructor() {
153
+ super(...arguments);
154
+ n(this, "j");
155
+ n(this, "db", "togglePaused");
156
+ }
157
+ onAttach(t) {
158
+ this.j = C(), this.cb = this.hb.bind(this), super.onAttach(t), R(t, this.ib.bind(this));
159
+ const { paused: e, ended: s } = this.j.$store;
160
+ this.setAttributes({
161
+ "data-paused": e,
162
+ "data-ended": s
163
+ });
164
+ }
165
+ gb(t) {
166
+ const e = this.j.remote;
167
+ this.cb() ? e.pause(t) : e.play(t);
168
+ }
169
+ hb() {
170
+ const { paused: t } = this.j.$store;
171
+ return !t();
172
+ }
173
+ ib() {
174
+ const { paused: t } = this.j.$store;
175
+ return t() ? "Play" : "Pause";
176
+ }
177
+ render() {
178
+ return [
179
+ x(w, { paths: Ee, slot: "play" }),
180
+ x(w, { paths: Se, slot: "replay" }),
181
+ x(w, { paths: Ne, slot: "pause" })
182
+ ];
183
+ }
184
+ }
185
+ n(Ie, "el", u({
186
+ tagName: "media-play-button",
187
+ props: G
188
+ }));
189
+ var Re = '<path d="M8 28.0003C8 27.6321 8.29848 27.3336 8.66667 27.3336H23.3333C23.7015 27.3336 24 27.6321 24 28.0003V29.3336C24 29.7018 23.7015 30.0003 23.3333 30.0003H8.66667C8.29848 30.0003 8 29.7018 8 29.3336V28.0003Z" fill="currentColor"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M4.66602 6.66699C4.29783 6.66699 3.99935 6.96547 3.99935 7.33366V24.667C3.99935 25.0352 4.29783 25.3337 4.66602 25.3337H27.3327C27.7009 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.7009 6.66699 27.3327 6.66699H4.66602ZM8.66659 21.3333C8.2984 21.3333 7.99992 21.0349 7.99992 20.6667V11.3333C7.99992 10.9651 8.2984 10.6667 8.66659 10.6667H13.9999C14.3681 10.6667 14.6666 10.9651 14.6666 11.3333V12.6667C14.6666 13.0349 14.3681 13.3333 13.9999 13.3333H10.7999C10.7263 13.3333 10.6666 13.393 10.6666 13.4667V18.5333C10.6666 18.607 10.7263 18.6667 10.7999 18.6667H13.9999C14.3681 18.6667 14.6666 18.9651 14.6666 19.3333V20.6667C14.6666 21.0349 14.3681 21.3333 13.9999 21.3333H8.66659ZM17.9999 21.3333C17.6317 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6317 10.6667 17.9999 10.6667H23.3333C23.7014 10.6667 23.9999 10.9651 23.9999 11.3333V12.6667C23.9999 13.0349 23.7014 13.3333 23.3333 13.3333H20.1333C20.0596 13.3333 19.9999 13.393 19.9999 13.4667V18.5333C19.9999 18.607 20.0596 18.6667 20.1333 18.6667H23.3333C23.7014 18.6667 23.9999 18.9651 23.9999 19.3333V20.6667C23.9999 21.0349 23.7014 21.3333 23.3333 21.3333H17.9999Z" fill="currentColor"/>', Xt = '<path fill-rule="evenodd" clip-rule="evenodd" d="M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z" fill="currentColor"/>';
190
+ function De(o) {
191
+ return o ? "true" : "false";
192
+ }
193
+ function V(o) {
194
+ return () => De(o());
195
+ }
196
+ class Fe extends F {
197
+ constructor() {
198
+ super(...arguments);
199
+ n(this, "j");
200
+ n(this, "db", "toggleCaptions");
201
+ }
202
+ onAttach(t) {
203
+ this.j = C(), this.cb = this.hb.bind(this), super.onAttach(t), R(t, this.ib.bind(this)), this.setAttributes({
204
+ "aria-hidden": V(this.jb.bind(this))
205
+ });
206
+ }
207
+ gb(t) {
208
+ this.j.remote.toggleCaptions(t);
209
+ }
210
+ hb() {
211
+ const { textTrack: t } = this.j.$store, e = t();
212
+ return !!e && E(e);
213
+ }
214
+ jb() {
215
+ const { textTracks: t } = this.j.$store;
216
+ return t().filter(E).length == 0;
217
+ }
218
+ ib() {
219
+ const { textTrack: t } = this.j.$store;
220
+ return t() ? "Closed-Captions Off" : "Closed-Captions On";
221
+ }
222
+ render() {
223
+ return [
224
+ x(w, { paths: Re, slot: "on" }),
225
+ x(w, { paths: Xt, slot: "off" })
226
+ ];
227
+ }
228
+ }
229
+ n(Fe, "el", u({
230
+ tagName: "media-caption-button",
231
+ props: G
232
+ }));
233
+ var Ze = '<path d="M19.3334 13.3333C18.9652 13.3333 18.6667 13.0349 18.6667 12.6667L18.6667 7.33333C18.6667 6.96514 18.9652 6.66666 19.3334 6.66666H21.3334C21.7015 6.66666 22 6.96514 22 7.33333V9.86666C22 9.9403 22.0597 10 22.1334 10L24.6667 10C25.0349 10 25.3334 10.2985 25.3334 10.6667V12.6667C25.3334 13.0349 25.0349 13.3333 24.6667 13.3333L19.3334 13.3333Z" fill="currentColor"/> <path d="M13.3334 19.3333C13.3334 18.9651 13.0349 18.6667 12.6667 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V21.3333C6.66669 21.7015 6.96516 22 7.33335 22H9.86669C9.94032 22 10 22.0597 10 22.1333L10 24.6667C10 25.0349 10.2985 25.3333 10.6667 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667L13.3334 19.3333Z" fill="currentColor"/> <path d="M18.6667 24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333H21.3334C21.7015 25.3333 22 25.0349 22 24.6667V22.1333C22 22.0597 22.0597 22 22.1334 22H24.6667C25.0349 22 25.3334 21.7015 25.3334 21.3333V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667L19.3334 18.6667C18.9652 18.6667 18.6667 18.9651 18.6667 19.3333L18.6667 24.6667Z" fill="currentColor"/> <path d="M10.6667 13.3333H12.6667C13.0349 13.3333 13.3334 13.0349 13.3334 12.6667L13.3334 10.6667V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H10.6667C10.2985 6.66666 10 6.96514 10 7.33333L10 9.86666C10 9.9403 9.94033 10 9.86669 10L7.33335 10C6.96516 10 6.66669 10.2985 6.66669 10.6667V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333L10.6667 13.3333Z" fill="currentColor"/>', qe = '<path d="M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z" fill="currentColor"/> <path d="M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z" fill="currentColor"/> <path d="M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z" fill="currentColor"/> <path d="M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z" fill="currentColor"/>';
234
+ class Ke extends F {
235
+ constructor() {
236
+ super(...arguments);
237
+ n(this, "j");
238
+ n(this, "db", "toggleFullscreen");
239
+ }
240
+ onAttach(t) {
241
+ this.j = C(), this.cb = this.hb.bind(this), super.onAttach(t), R(t, this.ib.bind(this));
242
+ const { fullscreen: e } = this.j.$store;
243
+ this.setAttributes({
244
+ "aria-hidden": V(this.jb.bind(this)),
245
+ "data-fullscreen": e
246
+ });
247
+ }
248
+ gb(t) {
249
+ const e = this.j.remote, s = this.$props.target();
250
+ this.cb() ? e.exitFullscreen(s, t) : e.enterFullscreen(s, t);
251
+ }
252
+ hb() {
253
+ const { fullscreen: t } = this.j.$store;
254
+ return t();
255
+ }
256
+ jb() {
257
+ const { canFullscreen: t } = this.j.$store;
258
+ return !t();
259
+ }
260
+ ib() {
261
+ const { fullscreen: t } = this.j.$store;
262
+ return t() ? "Exit Fullscreen" : "Enter Fullscreen";
263
+ }
264
+ render() {
265
+ return [
266
+ x(w, { paths: qe, slot: "enter" }),
267
+ x(w, { paths: Ze, slot: "exit" })
268
+ ];
269
+ }
270
+ }
271
+ n(Ke, "el", u({
272
+ tagName: "media-fullscreen-button",
273
+ props: {
274
+ ...G,
275
+ target: "prefer-media"
276
+ }
277
+ }));
278
+ var Oe = '<path d="M17.5091 24.6594C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9991 9.36923 19.9991H4.66667C4.29848 19.9991 4 19.7006 4 19.3325V12.6658C4 12.2976 4.29848 11.9991 4.66667 11.9991H9.37115C9.39967 11.9991 9.42745 11.99 9.45039 11.973L16.4463 6.8036C16.8863 6.47842 17.5091 6.79259 17.5091 7.33977L17.5091 24.6594Z" fill="currentColor"/> <path d="M28.8621 13.6422C29.1225 13.3818 29.1225 12.9597 28.8621 12.6994L27.9193 11.7566C27.659 11.4962 27.2368 11.4962 26.9765 11.7566L24.7134 14.0197C24.6613 14.0717 24.5769 14.0717 24.5248 14.0197L22.262 11.7568C22.0016 11.4964 21.5795 11.4964 21.3191 11.7568L20.3763 12.6996C20.116 12.9599 20.116 13.382 20.3763 13.6424L22.6392 15.9053C22.6913 15.9573 22.6913 16.0418 22.6392 16.0938L20.3768 18.3562C20.1165 18.6166 20.1165 19.0387 20.3768 19.299L21.3196 20.2419C21.58 20.5022 22.0021 20.5022 22.2624 20.2418L24.5248 17.9795C24.5769 17.9274 24.6613 17.9274 24.7134 17.9795L26.976 20.2421C27.2363 20.5024 27.6585 20.5024 27.9188 20.2421L28.8616 19.2992C29.122 19.0389 29.122 18.6168 28.8616 18.3564L26.599 16.0938C26.547 16.0418 26.547 15.9573 26.599 15.9053L28.8621 13.6422Z" fill="currentColor"/>', Be = '<path d="M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z" fill="currentColor"/> <path d="M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z" fill="currentColor"/> <path d="M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z" fill="currentColor"/>', Ge = '<path d="M17.5091 24.6594C17.5091 25.2066 16.8864 25.5207 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9991 9.36923 19.9991H4.66667C4.29848 19.9991 4 19.7006 4 19.3324V12.6658C4 12.2976 4.29848 11.9991 4.66667 11.9991H9.37115C9.39967 11.9991 9.42745 11.99 9.45039 11.973L16.4463 6.80358C16.8863 6.4784 17.5091 6.79258 17.5091 7.33975L17.5091 24.6594Z" fill="currentColor"/> <path d="M22.8424 12.6667C22.8424 12.2985 22.544 12 22.1758 12H20.8424C20.4743 12 20.1758 12.2985 20.1758 12.6667V19.3333C20.1758 19.7015 20.4743 20 20.8424 20H22.1758C22.544 20 22.8424 19.7015 22.8424 19.3333V12.6667Z" fill="currentColor"/>';
279
+ class ze extends F {
280
+ constructor() {
281
+ super(...arguments);
282
+ n(this, "j");
283
+ n(this, "db", "toggleMuted");
284
+ }
285
+ onAttach(t) {
286
+ this.j = C(), this.cb = this.hb.bind(this), R(t, this.ib.bind(this)), this.setAttributes({
287
+ "data-muted": this.cb,
288
+ "data-volume": this.kb.bind(this)
289
+ }), super.onAttach(t);
290
+ }
291
+ gb(t) {
292
+ const e = this.j.remote;
293
+ this.cb() ? e.unmute(t) : e.mute(t);
294
+ }
295
+ hb() {
296
+ const { muted: t, volume: e } = this.j.$store;
297
+ return t() || e() === 0;
298
+ }
299
+ ib() {
300
+ return this.cb() ? "Unmute" : "Mute";
301
+ }
302
+ kb() {
303
+ const { muted: t, volume: e } = this.j.$store, s = e();
304
+ if (t() || s === 0)
305
+ return "muted";
306
+ if (s >= 0.5)
307
+ return "high";
308
+ if (s < 0.5)
309
+ return "low";
310
+ }
311
+ render() {
312
+ return [
313
+ x(w, { paths: Be, slot: "volume-high" }),
314
+ x(w, { paths: Ge, slot: "volume-low" }),
315
+ x(w, { paths: Oe, slot: "volume-muted" })
316
+ ];
317
+ }
318
+ }
319
+ n(ze, "el", u({
320
+ tagName: "media-mute-button",
321
+ props: G
322
+ }));
323
+ var Qe = '<path d="M5.33334 26V19.4667C5.33334 19.393 5.39304 19.3333 5.46668 19.3333H7.86668C7.94031 19.3333 8.00001 19.393 8.00001 19.4667V23.3333C8.00001 23.7015 8.29849 24 8.66668 24H23.3333C23.7015 24 24 23.7015 24 23.3333V8.66666C24 8.29847 23.7015 7.99999 23.3333 7.99999H19.4667C19.393 7.99999 19.3333 7.9403 19.3333 7.86666V5.46666C19.3333 5.39302 19.393 5.33333 19.4667 5.33333H26C26.3682 5.33333 26.6667 5.63181 26.6667 5.99999V26C26.6667 26.3682 26.3682 26.6667 26 26.6667H6.00001C5.63182 26.6667 5.33334 26.3682 5.33334 26Z" fill="currentColor"/> <path d="M14.0098 8.42359H10.806C10.6872 8.42359 10.6277 8.56721 10.7117 8.6512L16.5491 14.4886C16.8094 14.7489 16.8094 15.171 16.5491 15.4314L15.3234 16.657C15.0631 16.9174 14.641 16.9174 14.3806 16.657L8.63739 10.9138C8.55339 10.8298 8.40978 10.8893 8.40978 11.0081V14.0236C8.40978 14.3918 8.1113 14.6903 7.74311 14.6903H6.00978C5.64159 14.6903 5.34311 14.3918 5.34311 14.0236L5.34311 6.02359C5.34311 5.6554 5.64159 5.35692 6.00978 5.35692L14.0098 5.35692C14.378 5.35692 14.6764 5.6554 14.6764 6.02359V7.75692C14.6764 8.12511 14.378 8.42359 14.0098 8.42359Z" fill="currentColor"/>', Ue = '<path d="M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z" fill="currentColor"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z" fill="currentColor"/>';
324
+ class We extends F {
325
+ constructor() {
326
+ super(...arguments);
327
+ n(this, "j");
328
+ n(this, "db", "togglePictureInPicture");
329
+ }
330
+ onAttach(t) {
331
+ this.j = C(), this.cb = this.hb.bind(this), super.onAttach(t), R(t, this.ib.bind(this));
332
+ const { pictureInPicture: e } = this.j.$store;
333
+ this.setAttributes({
334
+ "aria-hidden": V(this.jb.bind(this)),
335
+ "data-pip": e
336
+ });
337
+ }
338
+ gb(t) {
339
+ const e = this.j.remote;
340
+ this.cb() ? e.exitPictureInPicture(t) : e.enterPictureInPicture(t);
341
+ }
342
+ hb() {
343
+ const { pictureInPicture: t } = this.j.$store;
344
+ return t();
345
+ }
346
+ jb() {
347
+ const { canPictureInPicture: t } = this.j.$store;
348
+ return !t();
349
+ }
350
+ ib() {
351
+ const { pictureInPicture: t } = this.j.$store;
352
+ return t() ? "Exit Picture In Picture" : "Enter Picture In Picture";
353
+ }
354
+ render() {
355
+ return [
356
+ x(w, { paths: Ue, slot: "enter" }),
357
+ x(w, { paths: Qe, slot: "exit" })
358
+ ];
359
+ }
360
+ }
361
+ n(We, "el", u({
362
+ tagName: "media-pip-button",
363
+ props: G
364
+ }));
365
+ var Ye = '<path d="M15.6038 12.2148C16.0439 12.5399 16.6667 12.2257 16.6667 11.6786V10.1789C16.6667 10.1001 16.7351 10.0384 16.8134 10.0479C20.1116 10.4494 22.6667 13.2593 22.6667 16.6659C22.6667 20.3481 19.6817 23.3332 15.9995 23.3332C12.542 23.3332 9.69927 20.7015 9.36509 17.332C9.32875 16.9655 9.03371 16.6662 8.66548 16.6662L6.66655 16.6666C6.29841 16.6666 5.99769 16.966 6.02187 17.3334C6.36494 22.5454 10.7012 26.6667 16 26.6667C21.5228 26.6667 26 22.1895 26 16.6667C26 11.4103 21.9444 7.10112 16.7916 6.69758C16.7216 6.69209 16.6667 6.63396 16.6667 6.56372V4.98824C16.6667 4.44106 16.0439 4.12689 15.6038 4.45207L11.0765 7.79738C10.7159 8.06387 10.7159 8.60327 11.0766 8.86974L15.6038 12.2148Z" fill="currentColor"/>', Xe = '<path d="M16.4167 12.2148C15.9766 12.5399 15.3538 12.2257 15.3538 11.6786V10.1789C15.3538 10.1001 15.2854 10.0384 15.2072 10.0479C11.9089 10.4494 9.35384 13.2593 9.35384 16.6659C9.35384 20.3481 12.3389 23.3332 16.0211 23.3332C19.4785 23.3332 22.3212 20.7015 22.6554 17.332C22.6918 16.9655 22.9868 16.6662 23.355 16.6662L25.354 16.6666C25.7221 16.6666 26.0228 16.966 25.9986 17.3334C25.6556 22.5454 21.3193 26.6667 16.0205 26.6667C10.4977 26.6667 6.02051 22.1895 6.02051 16.6667C6.02051 11.4103 10.0761 7.10112 15.2289 6.69758C15.2989 6.69209 15.3538 6.63396 15.3538 6.56372V4.98824C15.3538 4.44106 15.9766 4.12689 16.4167 4.45207L20.944 7.79738C21.3046 8.06387 21.3046 8.60327 20.9439 8.86974L16.4167 12.2148Z" fill="currentColor"/>';
366
+ class Je extends j {
367
+ constructor(t) {
368
+ super(t);
369
+ n(this, "j");
370
+ this.j = C(), new D(t), new wt(t);
371
+ }
372
+ onAttach(t) {
373
+ H(t, "tabindex", "0"), H(t, "role", "button"), R(t, this.ib.bind(this));
374
+ const { seconds: e, defaultAppearance: s } = this.$props;
375
+ this.setAttributes({
376
+ seconds: e,
377
+ "default-appearance": s,
378
+ "aria-hidden": V(this.jb.bind(this)),
379
+ "data-media-button": !0
380
+ });
381
+ }
382
+ onConnect(t) {
383
+ B(t, this.gb.bind(this));
384
+ }
385
+ jb() {
386
+ const { canSeek: t } = this.j.$store;
387
+ return !t();
388
+ }
389
+ ib() {
390
+ const { seconds: t } = this.$props;
391
+ return `Seek ${t() > 0 ? "forward" : "backward"} ${t()} seconds`;
392
+ }
393
+ gb(t) {
394
+ const { seconds: e, disabled: s } = this.$props;
395
+ if (s())
396
+ return;
397
+ const { currentTime: r } = this.j.$store, a = r() + e();
398
+ this.j.remote.seek(a, t);
399
+ }
400
+ render() {
401
+ return [
402
+ x(w, { paths: Ye, slot: "backward" }),
403
+ x(w, { paths: Xe, slot: "forward" })
404
+ ];
405
+ }
406
+ }
407
+ n(Je, "el", u({
408
+ tagName: "media-seek-button",
409
+ props: {
410
+ disabled: !1,
411
+ defaultAppearance: !1,
412
+ seconds: 30
413
+ }
414
+ }));
415
+ const z = new le({
416
+ min: 0,
417
+ max: 100,
418
+ value: 50,
419
+ pointerValue: 0,
420
+ focused: !1,
421
+ dragging: !1,
422
+ pointing: !1,
423
+ get interactive() {
424
+ return this.dragging || this.focused || this.pointing;
425
+ },
426
+ get fillRate() {
427
+ return St(this.min, this.max, this.value);
428
+ },
429
+ get fillPercent() {
430
+ return this.fillRate * 100;
431
+ },
432
+ get pointerRate() {
433
+ return St(this.min, this.max, this.pointerValue);
434
+ },
435
+ get pointerPercent() {
436
+ return this.pointerRate * 100;
437
+ }
438
+ });
439
+ function St(o, i, t) {
440
+ const e = i - o, s = t - o;
441
+ return e > 0 ? s / e : 0;
442
+ }
443
+ const kt = {
444
+ min: 0,
445
+ max: 100,
446
+ disabled: !1,
447
+ value: 100,
448
+ step: 1,
449
+ keyStep: 1,
450
+ shiftKeyMultiplier: 5,
451
+ trackClass: null,
452
+ trackFillClass: null,
453
+ trackProgressClass: null,
454
+ thumbContainerClass: null,
455
+ thumbClass: null
456
+ };
457
+ function ts(o, i, t, e) {
458
+ return Yt(o, A(t, Le(e)), i);
459
+ }
460
+ function es(o, i, t, e) {
461
+ const s = Yt(0, t, 1), r = i - o, a = r * s, h = a / e, c = e * h;
462
+ return o + c;
463
+ }
464
+ const It = {
465
+ Left: -1,
466
+ ArrowLeft: -1,
467
+ Up: 1,
468
+ ArrowUp: 1,
469
+ Right: 1,
470
+ ArrowRight: 1,
471
+ Down: -1,
472
+ ArrowDown: -1
473
+ };
474
+ class ss extends Ct {
475
+ constructor(t, e, s) {
476
+ super(t);
477
+ n(this, "Id", null);
478
+ n(this, "lg", null);
479
+ n(this, "ng", null);
480
+ n(this, "mg", null);
481
+ n(this, "og", null);
482
+ // -------------------------------------------------------------------------------------------
483
+ // Keyboard Events
484
+ // -------------------------------------------------------------------------------------------
485
+ n(this, "sg");
486
+ n(this, "Cg", vt(
487
+ (t) => {
488
+ this.kg(this.pg(t), t);
489
+ },
490
+ 20,
491
+ { leading: !0 }
492
+ ));
493
+ this.jg = e, this.j = s;
494
+ }
495
+ onConnect() {
496
+ l(this.vg.bind(this)), l(this.wg.bind(this)), this.jg.tc && rt(() => {
497
+ var e;
498
+ const t = (e = this.j.player) == null ? void 0 : e.querySelector("media-outlet");
499
+ t && (this.Id = t, $(t, "touchstart", this.xg.bind(this)), $(t, "touchmove", this.yg.bind(this)));
500
+ });
501
+ }
502
+ xg(t) {
503
+ this.lg = t.touches[0].clientX;
504
+ }
505
+ yg(t) {
506
+ if (xt(this.lg) || (t.preventDefault(), this.$store.dragging()))
507
+ return;
508
+ const e = t.touches[0].clientX - this.lg;
509
+ Math.abs(e) > 20 && (this.lg = t.touches[0].clientX, this.ng = this.$store.value(), this.qg(this.ng, t));
510
+ }
511
+ vg() {
512
+ this.jg.mb() || (this.listen("focus", this.Te.bind(this)), this.listen("pointerenter", this.Re.bind(this)), this.listen("pointermove", this.zg.bind(this)), this.listen("pointerleave", this.Se.bind(this)), this.listen("pointerdown", this.Ag.bind(this)), this.listen("keydown", this.Za.bind(this)), this.listen("keyup", this.Ya.bind(this)));
513
+ }
514
+ wg() {
515
+ this.jg.mb() || !this.$store.dragging() || ($(document, "pointerup", this.Bg.bind(this)), $(document, "pointermove", this.Cg.bind(this)), fe && $(document, "touchmove", this.Dg.bind(this), {
516
+ passive: !1
517
+ }));
518
+ }
519
+ Te() {
520
+ this.kg(this.$store.value());
521
+ }
522
+ rg(t, e) {
523
+ const { value: s, min: r, max: a, dragging: h } = this.$store, c = Math.max(r(), Math.min(t, a()));
524
+ s.set(c);
525
+ const d = this.createEvent("value-change", { detail: c, trigger: e });
526
+ if (this.el.dispatchEvent(d), this.jg.Hb(d), h()) {
527
+ const k = this.createEvent("drag-value-change", { detail: c, trigger: e });
528
+ this.el.dispatchEvent(k), this.jg.Kb(k);
529
+ }
530
+ }
531
+ kg(t, e) {
532
+ var a;
533
+ const { pointerValue: s, dragging: r } = this.$store;
534
+ if (s.set(t), this.dispatch("pointer-value-change", { detail: t, trigger: e }), r()) {
535
+ const h = this.jg.nb === "vertical" ? "bottom" : "left", c = this.jg.nb === "vertical" ? "height" : "width";
536
+ this.og && !((a = this.el) != null && a.hasAttribute("data-chapters")) && (this.og.style[c] = t + "%"), this.mg && (this.mg.style[h] = t + "%"), this.rg(t, e);
537
+ }
538
+ }
539
+ pg(t) {
540
+ let e, s = this.el.getBoundingClientRect(), { min: r, max: a } = this.$store;
541
+ if (this.jg.nb === "vertical") {
542
+ const { bottom: h, height: c } = s;
543
+ e = (h - t.clientY) / c;
544
+ } else if (this.lg && Qt(this.ng)) {
545
+ const { width: h } = this.Id.getBoundingClientRect(), c = (t.clientX - this.lg) / h, d = a() - r(), k = d * Math.abs(c);
546
+ e = (c < 0 ? this.ng - k : this.ng + k) / d;
547
+ } else {
548
+ const { left: h, width: c } = s;
549
+ e = (t.clientX - h) / c;
550
+ }
551
+ return Math.max(
552
+ r(),
553
+ Math.min(
554
+ a(),
555
+ this.jg.Gb(
556
+ es(r(), a(), e, this.jg.vb())
557
+ )
558
+ )
559
+ );
560
+ }
561
+ Re(t) {
562
+ this.$store.pointing.set(!0);
563
+ }
564
+ zg(t) {
565
+ const { dragging: e } = this.$store;
566
+ e() || this.kg(this.pg(t), t);
567
+ }
568
+ Se(t) {
569
+ this.$store.pointing.set(!1);
570
+ }
571
+ Ag(t) {
572
+ if (t.button !== 0)
573
+ return;
574
+ const e = this.pg(t);
575
+ this.qg(e, t), this.kg(e, t);
576
+ }
577
+ qg(t, e) {
578
+ const { dragging: s } = this.$store;
579
+ if (s())
580
+ return;
581
+ s.set(!0), this.mg = this.el.querySelector(
582
+ 'shadow-root > div[part="thumb-container"]'
583
+ ), this.og = this.el.querySelector(
584
+ 'shadow-root > div[part~="track-fill"]'
585
+ ), this.j.remote.pauseUserIdle(e);
586
+ const r = this.createEvent("drag-start", { detail: t, trigger: e });
587
+ this.el.dispatchEvent(r), this.jg.Ib(r);
588
+ }
589
+ tg(t, e) {
590
+ const { dragging: s } = this.$store;
591
+ if (!s())
592
+ return;
593
+ s.set(!1), this.og && (M(this.og, "width", null), this.og = null), this.mg && (M(this.mg, "left", null), M(this.mg, "bottom", null), this.mg = null), this.j.remote.resumeUserIdle(e);
594
+ const r = this.createEvent("drag-end", { detail: t, trigger: e });
595
+ this.el.dispatchEvent(r), this.jg.Jb(r), this.lg = null, this.ng = null;
596
+ }
597
+ Za(t) {
598
+ if (Pt(t)) {
599
+ const d = t.trigger;
600
+ if (q(d))
601
+ t = d;
602
+ else
603
+ return;
604
+ }
605
+ const { key: e } = t, { min: s, max: r } = this.$store;
606
+ let a;
607
+ if (e === "Home" || e === "PageUp" ? a = s() : e === "End" || e === "PageDown" ? a = r() : !t.metaKey && /[0-9]/.test(e) && (a = (r() - s()) / 10 * Number(e)), !$e(a)) {
608
+ this.kg(a, t), this.rg(a, t);
609
+ return;
610
+ }
611
+ const h = this.ug(t);
612
+ if (!h)
613
+ return;
614
+ const c = e === this.sg;
615
+ !this.$store.dragging() && c && this.qg(h, t), this.kg(h, t), c || this.rg(h, t), this.sg = e;
616
+ }
617
+ Ya(t) {
618
+ if (Pt(t)) {
619
+ const a = t.trigger;
620
+ if (q(a))
621
+ t = a;
622
+ else
623
+ return;
624
+ }
625
+ this.sg = "";
626
+ const { dragging: e, value: s } = this.$store;
627
+ if (!e())
628
+ return;
629
+ const r = this.ug(t) ?? s();
630
+ this.kg(r), this.tg(r, t);
631
+ }
632
+ ug(t) {
633
+ const { key: e, shiftKey: s } = t;
634
+ if (!Object.keys(It).includes(e))
635
+ return;
636
+ const { shiftKeyMultiplier: a } = this.$props, { value: h } = this.$store, c = this.jg.vb(), d = this.jg.Fb(), k = s ? d * a() : d, T = Number(It[e]), y = k * T, tt = (h() + y) / c;
637
+ return Number((c * tt).toFixed(3));
638
+ }
639
+ // -------------------------------------------------------------------------------------------
640
+ // Document (Pointer Events)
641
+ // -------------------------------------------------------------------------------------------
642
+ Bg(t) {
643
+ if (t.button !== 0)
644
+ return;
645
+ const e = this.pg(t);
646
+ this.kg(e, t), this.tg(e, t);
647
+ }
648
+ Dg(t) {
649
+ t.preventDefault();
650
+ }
651
+ }
652
+ const yt = ot(() => ({})), is = /* @__PURE__ */ p('<!$><div part="track"></div>'), rs = /* @__PURE__ */ p('<!$><div part="track track-fill"></div>'), ns = /* @__PURE__ */ p('<!$><div part="track track-progress"></div>'), as = /* @__PURE__ */ p('<!$><div part="thumb-container"><!$><div part="thumb"></div></div>');
653
+ class _t extends j {
654
+ constructor(t) {
655
+ super(t);
656
+ n(this, "j");
657
+ n(this, "pb", !1);
658
+ n(this, "nb", "");
659
+ n(this, "Db", W(
660
+ (t, e) => {
661
+ var s, r;
662
+ (s = this.el) == null || s.style.setProperty("--slider-fill-percent", t + "%"), (r = this.el) == null || r.style.setProperty("--slider-pointer-percent", e + "%");
663
+ }
664
+ ));
665
+ // -------------------------------------------------------------------------------------------
666
+ // Preview
667
+ // -------------------------------------------------------------------------------------------
668
+ n(this, "lb", null);
669
+ n(this, "ob", W(() => {
670
+ if (!this.lb)
671
+ return;
672
+ const t = this.lb.getBoundingClientRect();
673
+ M(this.lb, "--computed-width", t.width + "px"), M(this.lb, "--computed-height", t.height + "px");
674
+ }));
675
+ Y(yt), this.j = C(), new ss(t, this, this.j);
676
+ const e = new D(t);
677
+ this.$store.focused = e.focused.bind(e);
678
+ }
679
+ onAttach(t) {
680
+ H(t, "role", "slider"), H(t, "tabindex", "0"), H(t, "aria-orientation", "horizontal"), H(t, "autocomplete", "off"), this.nb = t.getAttribute("aria-orientation") || "", this.pb || (l(this.qb.bind(this)), l(this.rb.bind(this))), l(this.sb.bind(this)), this.tb();
681
+ }
682
+ onConnect(t) {
683
+ this.ub();
684
+ }
685
+ render() {
686
+ const { trackClass: t, trackFillClass: e, trackProgressClass: s, thumbContainerClass: r, thumbClass: a } = this.$props;
687
+ return [
688
+ (() => {
689
+ const [h, c] = g(is);
690
+ return _(() => v(h, "class", t())), h;
691
+ })(),
692
+ (() => {
693
+ const [h, c] = g(rs);
694
+ return _(() => v(h, "class", e())), h;
695
+ })(),
696
+ (() => {
697
+ const [h, c] = g(ns);
698
+ return _(() => v(h, "class", s())), h;
699
+ })(),
700
+ (() => {
701
+ const [h, c] = g(as), d = de(c);
702
+ return _(() => v(h, "class", r())), _(() => v(d, "class", a())), h;
703
+ })()
704
+ ];
705
+ }
706
+ // -------------------------------------------------------------------------------------------
707
+ // Props
708
+ // -------------------------------------------------------------------------------------------
709
+ vb() {
710
+ return this.$props.step();
711
+ }
712
+ Fb() {
713
+ return this.$props.keyStep();
714
+ }
715
+ Gb(t) {
716
+ return Math.round(t);
717
+ }
718
+ mb() {
719
+ return this.$props.disabled();
720
+ }
721
+ // -------------------------------------------------------------------------------------------
722
+ // Watch
723
+ // -------------------------------------------------------------------------------------------
724
+ qb() {
725
+ const { min: t, max: e } = this.$props;
726
+ this.$store.min.set(t()), this.$store.max.set(e());
727
+ }
728
+ rb() {
729
+ if (!this.mb())
730
+ return;
731
+ const { dragging: t, pointing: e } = this.$store;
732
+ t.set(!1), e.set(!1);
733
+ }
734
+ sb() {
735
+ const { dragging: t, value: e, min: s, max: r } = this.$store;
736
+ m(t) || e.set(ts(s(), r(), e(), this.vb()));
737
+ }
738
+ // -------------------------------------------------------------------------------------------
739
+ // ARIA
740
+ // -------------------------------------------------------------------------------------------
741
+ wb() {
742
+ return ft(this.mb());
743
+ }
744
+ xb() {
745
+ return this.$props.min();
746
+ }
747
+ yb() {
748
+ return this.$props.max();
749
+ }
750
+ zb() {
751
+ const { value: t } = this.$store;
752
+ return Math.round(t());
753
+ }
754
+ Ab() {
755
+ const { value: t, max: e } = this.$store;
756
+ return A(t() / e() * 100, 2) + "%";
757
+ }
758
+ // -------------------------------------------------------------------------------------------
759
+ // Attributes
760
+ // -------------------------------------------------------------------------------------------
761
+ tb() {
762
+ const { disabled: t } = this.$props, { dragging: e, interactive: s, pointing: r } = this.$store;
763
+ this.setAttributes({
764
+ disabled: t,
765
+ "data-dragging": e,
766
+ "data-pointing": r,
767
+ "data-interactive": s,
768
+ "aria-disabled": this.wb.bind(this),
769
+ "aria-valuemin": this.xb.bind(this),
770
+ "aria-valuemax": this.yb.bind(this),
771
+ "aria-valuenow": this.zb.bind(this),
772
+ "aria-valuetext": this.Ab.bind(this),
773
+ "data-styled": this.Bb.bind(this),
774
+ "data-media-slider": !0
775
+ }), l(this.Cb.bind(this));
776
+ }
777
+ Bb() {
778
+ return !!this.$props.trackClass();
779
+ }
780
+ Cb() {
781
+ const { fillPercent: t, pointerPercent: e } = this.$store;
782
+ this.Db(A(t(), 3), A(e(), 3));
783
+ }
784
+ ub() {
785
+ this.lb = this.el.querySelector('[slot="preview"]'), this.lb && (l(this.Eb.bind(this)), Promise.resolve().then(function() {
786
+ return ci;
787
+ }).then(({ setupPreviewStyles: t }) => {
788
+ t(this.lb, this.nb);
789
+ }));
790
+ }
791
+ Eb() {
792
+ if (this.mb() || !this.lb)
793
+ return;
794
+ window.requestAnimationFrame(this.ob);
795
+ const t = new ResizeObserver(this.ob);
796
+ return t.observe(this.lb), () => t.disconnect();
797
+ }
798
+ // -------------------------------------------------------------------------------------------
799
+ // Events
800
+ // -------------------------------------------------------------------------------------------
801
+ Hb(t) {
802
+ }
803
+ Ib(t) {
804
+ }
805
+ Jb(t) {
806
+ }
807
+ Kb(t) {
808
+ }
809
+ }
810
+ n(_t, "el", u({
811
+ tagName: "media-slider",
812
+ props: kt,
813
+ store: z
814
+ }));
815
+ const os = /* @__PURE__ */ p('<!$><img part="img" loading="eager" decoding="async" aria-hidden="true" />');
816
+ class Ht extends j {
817
+ constructor(t) {
818
+ super(t);
819
+ n(this, "j");
820
+ n(this, "ke", null);
821
+ n(this, "me", null);
822
+ n(this, "ne", []);
823
+ n(this, "Pb", f(""));
824
+ n(this, "oe", f(!1));
825
+ n(this, "pe", f(null));
826
+ n(this, "qe", W(this.ye.bind(this)));
827
+ this.j = C();
828
+ }
829
+ onAttach() {
830
+ this.setAttributes({
831
+ "data-loading": this.Tb.bind(this),
832
+ "aria-hidden": V(this.jb.bind(this))
833
+ });
834
+ }
835
+ onConnect() {
836
+ l(this.ge.bind(this)), l(this.se.bind(this)), l(this.te.bind(this));
837
+ }
838
+ ge() {
839
+ this.Pb(), this.j.$store.thumbnails(), this.oe.set(!1);
840
+ }
841
+ ue() {
842
+ this.oe.set(!0), this.qe();
843
+ }
844
+ Tb() {
845
+ return !this.jb() && !this.oe();
846
+ }
847
+ jb() {
848
+ const { duration: t, thumbnailCues: e } = this.j.$store;
849
+ return !Number.isFinite(t()) || e().length === 0;
850
+ }
851
+ se() {
852
+ const { time: t } = this.$props, { duration: e, thumbnailCues: s } = this.j.$store, r = s(), a = t();
853
+ if (!r || !Number.isFinite(e())) {
854
+ this.pe.set(null);
855
+ return;
856
+ }
857
+ this.pe.set(ce(a, r));
858
+ }
859
+ ve(t) {
860
+ this.ke = t;
861
+ }
862
+ te() {
863
+ const t = this.pe(), e = m(this.j.$store.thumbnails);
864
+ if (!e || !t) {
865
+ this.Pb.set(""), this.re();
866
+ return;
867
+ }
868
+ const [s, r = ""] = (t.text || "").split("#");
869
+ if (this.me = this.we(r), !this.me) {
870
+ this.re();
871
+ return;
872
+ }
873
+ this.Pb.set(this.xe(e, s)), this.qe();
874
+ }
875
+ xe(t, e) {
876
+ return /https?:/.test(e) ? e : `${t.split("/").slice(0, -1).join("/")}${e.replace(/^\/?/, "/")}`.replace(
877
+ /^\/\//,
878
+ "/"
879
+ );
880
+ }
881
+ we(t) {
882
+ const [e, s] = t.split("="), r = {}, a = s == null ? void 0 : s.split(",");
883
+ if (!e || !s)
884
+ return null;
885
+ for (let h = 0; h < e.length; h++)
886
+ r[e[h]] = +a[h];
887
+ return r;
888
+ }
889
+ ye() {
890
+ if (!this.ke || !this.me || !this.el)
891
+ return;
892
+ const { w: t, h: e, x: s, y: r } = this.me, { maxWidth: a, maxHeight: h, minWidth: c, minHeight: d } = getComputedStyle(this.el), k = Math.max(parseInt(c) / t, parseInt(d) / e), T = Math.min(parseInt(a) / t, parseInt(h) / e), y = T < 1 ? T : k > 1 ? k : 1;
893
+ this.le(this.el, "--thumbnail-width", `${t * y}px`), this.le(this.el, "--thumbnail-height", `${e * y}px`), this.le(this.ke, "width", `${this.ke.naturalWidth * y}px`), this.le(this.ke, "height", `${this.ke.naturalHeight * y}px`), this.le(this.ke, "transform", `translate(-${s * y}px, -${r * y}px)`);
894
+ }
895
+ le(t, e, s) {
896
+ t.style.setProperty(e, s), this.ne.push(() => t.style.removeProperty(e));
897
+ }
898
+ re() {
899
+ for (const t of this.ne)
900
+ t();
901
+ this.ne = [];
902
+ }
903
+ render() {
904
+ const { crossorigin: t } = this.j.$store;
905
+ return (() => {
906
+ const [e, s] = g(os);
907
+ return _(() => v(e, "src", this.Pb())), _(() => v(e, "crossorigin", t())), O(e, "load", this.ue.bind(this)), Bt(e, this.ve.bind(this)), e;
908
+ })();
909
+ }
910
+ }
911
+ n(Ht, "el", u({
912
+ tagName: "media-thumbnail",
913
+ props: { time: 0 }
914
+ }));
915
+ const hs = /* @__PURE__ */ p('<!$><media-thumbnail part="thumbnail" mk-d></media-thumbnail>');
916
+ class Rt extends j {
917
+ constructor(t) {
918
+ super(t);
919
+ n(this, "j");
920
+ n(this, "Lb");
921
+ this.j = C(), this.Lb = jt(z);
922
+ }
923
+ Mb() {
924
+ const { duration: t } = this.j.$store;
925
+ return this.Lb.pointerRate() * t();
926
+ }
927
+ render() {
928
+ const t = this.Mb.bind(this);
929
+ return (() => {
930
+ const [e, s] = g(hs);
931
+ return _(() => v(e, "time", t())), nt(e), e;
932
+ })();
933
+ }
934
+ }
935
+ n(Rt, "el", u({
936
+ tagName: "media-slider-thumbnail"
937
+ })), n(Rt, "register", [Ht]);
938
+ const cs = /* @__PURE__ */ p('<!$><video muted="" playsinline="" preload="auto" part="video" style="max-width: unset"></video>');
939
+ class ls extends j {
940
+ constructor() {
941
+ super(...arguments);
942
+ n(this, "j");
943
+ n(this, "Lb");
944
+ n(this, "qa", null);
945
+ n(this, "Nb", f(!1));
946
+ n(this, "Ob", f(!1));
947
+ n(this, "Pb");
948
+ n(this, "Qb");
949
+ }
950
+ onAttach() {
951
+ this.j = C(), this.Lb = jt(z), this.Pb = P(this.Sb.bind(this)), this.Qb = P(this.jb.bind(this)), this.setAttributes({
952
+ "data-loading": this.Tb.bind(this),
953
+ "aria-hidden": V(this.Qb)
954
+ }), l(this.Ub.bind(this)), l(this.Vb.bind(this));
955
+ }
956
+ onConnect() {
957
+ this.qa.readyState >= 2 && this.Rb();
958
+ }
959
+ render() {
960
+ const { crossorigin: t } = this.j.$store;
961
+ return (() => {
962
+ const [e, s] = g(cs);
963
+ return _(() => v(e, "src", this.Pb())), _(() => v(e, "crossorigin", t())), O(e, "canplay", this.Rb.bind(this)), O(e, "error", this.Wb.bind(this)), Bt(e, this.Xb.bind(this)), e;
964
+ })();
965
+ }
966
+ Sb() {
967
+ const { canLoad: t } = this.j.$store;
968
+ return t() ? this.$props.src() : null;
969
+ }
970
+ Tb() {
971
+ return !this.Nb() && !this.Qb();
972
+ }
973
+ jb() {
974
+ const { duration: t } = this.j.$store;
975
+ return !!this.Ob() || !this.Nb() || !Number.isFinite(t());
976
+ }
977
+ Ub() {
978
+ this.Pb(), this.Nb.set(!1), this.Ob.set(!1);
979
+ }
980
+ Rb(t) {
981
+ this.Nb.set(!0), this.dispatch("can-play", { trigger: t });
982
+ }
983
+ Wb(t) {
984
+ this.Ob.set(!0), this.dispatch("error", { trigger: t });
985
+ }
986
+ Vb() {
987
+ const { duration: t } = this.j.$store, { pointerRate: e } = this.Lb;
988
+ this.Nb() && this.qa && Number.isFinite(t()) && Number.isFinite(e()) && (this.qa.currentTime = e() * t());
989
+ }
990
+ Xb(t) {
991
+ this.qa = t;
992
+ }
993
+ }
994
+ n(ls, "el", u({
995
+ tagName: "media-slider-video",
996
+ props: { src: void 0 }
997
+ }));
998
+ function ut(o, i) {
999
+ const t = String(o), e = t.length;
1000
+ if (e < i) {
1001
+ const r = i - e;
1002
+ return `${"0".repeat(r)}${o}`;
1003
+ }
1004
+ return t;
1005
+ }
1006
+ function Jt(o) {
1007
+ const i = Math.trunc(o / 3600), t = Math.trunc(o % 3600 / 60), e = Math.trunc(o % 60), s = Number((o - Math.trunc(o)).toPrecision(3));
1008
+ return {
1009
+ hours: i,
1010
+ minutes: t,
1011
+ seconds: e,
1012
+ fraction: s
1013
+ };
1014
+ }
1015
+ function ct(o, i = !1, t = !1, e = !1) {
1016
+ const { hours: s, minutes: r, seconds: a } = Jt(o), h = i ? ut(s, 2) : s, c = t ? ut(r, 2) : r, d = ut(a, 2);
1017
+ return s > 0 || e ? `${h}:${c}:${d}` : `${c}:${d}`;
1018
+ }
1019
+ function mt(o) {
1020
+ const i = [], { hours: t, minutes: e, seconds: s } = Jt(o);
1021
+ return t > 0 && i.push(`${t} hour`), e > 0 && i.push(`${e} min`), (s > 0 || i.length === 0) && i.push(`${s} sec`), i.join(" ");
1022
+ }
1023
+ const ds = /* @__PURE__ */ p("<!$><span><!$></span>");
1024
+ class us extends j {
1025
+ constructor() {
1026
+ super(...arguments);
1027
+ n(this, "Yb");
1028
+ n(this, "Zb");
1029
+ n(this, "Lb");
1030
+ }
1031
+ onAttach() {
1032
+ this.Lb = jt(z), this.Yb = I(yt), this.Zb = P(this._b.bind(this));
1033
+ }
1034
+ _b() {
1035
+ var tt, At;
1036
+ const { type: t, format: e, decimalPlaces: s, padHours: r, padMinutes: a, showHours: h } = this.$props, { value: c, pointerValue: d, min: k, max: T } = this.Lb, y = t() === "current" ? c() : d();
1037
+ if (e() === "percent") {
1038
+ const ie = T() - k(), re = y / ie * 100;
1039
+ return (this.Yb.percent ?? A)(re, s()) + "﹪";
1040
+ } else return e() === "time" ? (this.Yb.time ?? ct)(y, r(), a(), h()) : ((At = (tt = this.Yb).value) == null ? void 0 : At.call(tt, y)) ?? y.toFixed(2);
1041
+ }
1042
+ render() {
1043
+ return (() => {
1044
+ const [t, e] = g(ds), s = e.nextNode();
1045
+ return L(s, this.Zb), t;
1046
+ })();
1047
+ }
1048
+ }
1049
+ n(us, "el", u({
1050
+ tagName: "media-slider-value",
1051
+ props: {
1052
+ type: "current",
1053
+ format: void 0,
1054
+ showHours: !1,
1055
+ padHours: !1,
1056
+ padMinutes: !1,
1057
+ decimalPlaces: 2
1058
+ }
1059
+ }));
1060
+ class ps extends _t {
1061
+ constructor() {
1062
+ super(...arguments);
1063
+ n(this, "pb", !0);
1064
+ n(this, "$b", vt(this.ac.bind(this), 25));
1065
+ }
1066
+ onAttach(t) {
1067
+ H(t, "aria-label", "Media volume"), super.onAttach(t), ue().then((e) => {
1068
+ e || b(t, "aria-hidden", "true");
1069
+ }), l(this.D.bind(this));
1070
+ }
1071
+ D() {
1072
+ const { muted: t, volume: e } = this.j.$store, s = t() ? 0 : e() * 100;
1073
+ this.$store.value.set(s), this.dispatch("value-change", { detail: s });
1074
+ }
1075
+ ac(t) {
1076
+ if (!t.trigger)
1077
+ return;
1078
+ const e = A(t.detail / 100, 3);
1079
+ this.j.remote.changeVolume(e, t);
1080
+ }
1081
+ Hb(t) {
1082
+ this.$b(t);
1083
+ }
1084
+ Kb(t) {
1085
+ this.$b(t);
1086
+ }
1087
+ xb() {
1088
+ return 0;
1089
+ }
1090
+ yb() {
1091
+ return 100;
1092
+ }
1093
+ }
1094
+ n(ps, "el", u({
1095
+ tagName: "media-volume-slider",
1096
+ props: {
1097
+ ...kt,
1098
+ min: K({ value: 0, attribute: !1 }),
1099
+ max: K({ value: 100, attribute: !1 }),
1100
+ value: K({ value: 100, attribute: !1 })
1101
+ },
1102
+ store: z
1103
+ }));
1104
+ class Q {
1105
+ constructor(i) {
1106
+ n(this, "Fg");
1107
+ n(this, "Gg");
1108
+ n(this, "Eg", /* @__PURE__ */ new Map());
1109
+ n(this, "Hg", f([]));
1110
+ n(this, "uc", W(this.na.bind(this)));
1111
+ this.Fg = i.firstChild, this.Gg = new MutationObserver(this.o.bind(this)), this.Gg.observe(this.Fg, { subtree: !0, childList: !0 }), l(this.Ig.bind(this)), at(this.Jg.bind(this));
1112
+ }
1113
+ o(i) {
1114
+ const t = Array.from(this.Eg.keys()).join(",");
1115
+ for (const e of i)
1116
+ for (const s of e.addedNodes)
1117
+ xe(s) && s.matches(t) && this.uc();
1118
+ }
1119
+ dc(i, t) {
1120
+ return this.Eg.set(i, t), this.Hg.set((e) => [...e, t]), this;
1121
+ }
1122
+ na() {
1123
+ for (const [i, t] of this.Eg) {
1124
+ const e = m(t);
1125
+ for (const s of this.Fg.querySelectorAll(i))
1126
+ b(s, "class", e);
1127
+ }
1128
+ }
1129
+ Ig() {
1130
+ for (const i of this.Hg())
1131
+ i();
1132
+ this.uc();
1133
+ }
1134
+ Jg() {
1135
+ this.Hg.set([]), this.Eg.clear(), this.Gg.disconnect();
1136
+ }
1137
+ }
1138
+ const bs = /* @__PURE__ */ p('<div part="chapters"></div>'), ms = /* @__PURE__ */ p('<div part="chapter-container"><div part="chapter"><div part="track"></div><div part="track track-fill" style="width: 0%"></div><div part="track track-progress" style="width: 0%"></div></div></div>');
1139
+ class gs {
1140
+ constructor(i, t, e) {
1141
+ n(this, "Kg", []);
1142
+ n(this, "Mg", []);
1143
+ n(this, "Lg", 0);
1144
+ n(this, "Ng", 0);
1145
+ n(this, "$g", W((i) => {
1146
+ let t;
1147
+ for (let e = this.Ng; e < this.Mg.length; e++)
1148
+ if (t = this.Og(this.Kg[e], i), this.Zg(this.Mg[e]).style.width = t + "%", t < 100) {
1149
+ this.Ng = e;
1150
+ break;
1151
+ }
1152
+ }));
1153
+ n(this, "ah", P(this.bh.bind(this)));
1154
+ this.j = i, this.Lb = t, this.Hc = e;
1155
+ }
1156
+ render(i, t) {
1157
+ return i != null && i.length ? ve(
1158
+ () => (() => {
1159
+ const e = Nt(bs);
1160
+ return _(() => v(e, "class", t())), je(e, () => this.Sg(i)), e;
1161
+ })()
1162
+ ) : null;
1163
+ }
1164
+ Sg(i) {
1165
+ this.Kg = this.Tg(i);
1166
+ const t = this.Kg[0];
1167
+ this.Hc(t.startTime === 0 ? t.text : "");
1168
+ for (let e = 0; e < this.Kg.length; e++)
1169
+ this.Mg.push(this.Ug());
1170
+ return this.Vg(), l(this.Wg.bind(this)), l(this.Xg.bind(this)), l(this.Yg.bind(this)), at(() => {
1171
+ this.Mg = [], this.Lg = 0, this.Ng = 0;
1172
+ }), this.Mg;
1173
+ }
1174
+ Ug() {
1175
+ return Nt(ms);
1176
+ }
1177
+ Pg(i) {
1178
+ return i.firstChild.firstChild.nextSibling;
1179
+ }
1180
+ Zg(i) {
1181
+ return i.firstChild.lastChild;
1182
+ }
1183
+ _g() {
1184
+ return this.Kg[this.Kg.length - 1].endTime;
1185
+ }
1186
+ Vg() {
1187
+ let i, t = this._g();
1188
+ for (let e = 0; e < this.Kg.length; e++)
1189
+ i = this.Kg[e], this.Mg[e].style.width = A((i.endTime - i.startTime) / t * 100, 3) + "%";
1190
+ }
1191
+ Wg() {
1192
+ let { fillPercent: i, value: t, pointing: e } = this.Lb, s = this.Kg[this.Lg], r = this.Qg(
1193
+ s.startTime <= m(t) ? this.Lg : 0,
1194
+ i()
1195
+ );
1196
+ r > this.Lg ? this.Rg(this.Lg, r, "100%") : r < this.Lg && this.Rg(r + 1, this.Lg + 1, "0%"), !m(e) && this.Lg !== r && this.Hc(this.Kg[r].text);
1197
+ let a = this.Pg(this.Mg[r]), h = this.Og(this.Kg[r], i()) + "%";
1198
+ a.style.width !== h && (a.style.width = h), this.Lg = r;
1199
+ }
1200
+ Xg() {
1201
+ let { pointing: i, pointerPercent: t } = this.Lb;
1202
+ if (!i())
1203
+ return;
1204
+ const e = this.Qg(0, t());
1205
+ this.Hc(this.Kg[e].text);
1206
+ }
1207
+ Rg(i, t, e) {
1208
+ for (let s = i; s < t; s++)
1209
+ this.Pg(this.Mg[s]).style.width = e;
1210
+ }
1211
+ Qg(i, t) {
1212
+ let e = 0;
1213
+ for (let s = i; s < this.Kg.length; s++)
1214
+ if (e = this.Og(this.Kg[s], t), e >= 0 && e < 100)
1215
+ return s;
1216
+ return 0;
1217
+ }
1218
+ Yg() {
1219
+ this.$g(this.ah());
1220
+ }
1221
+ bh() {
1222
+ const { bufferedEnd: i, duration: t } = this.j;
1223
+ return A(Math.min(i() / Math.max(t(), 1), 1), 3) * 100;
1224
+ }
1225
+ Og(i, t) {
1226
+ const e = this.Kg[this.Kg.length - 1], s = i.startTime / e.endTime * 100, r = i.endTime / e.endTime * 100;
1227
+ return Math.max(
1228
+ 0,
1229
+ A(
1230
+ t >= r ? 100 : (t - s) / (r - s) * 100,
1231
+ 3
1232
+ )
1233
+ );
1234
+ }
1235
+ Tg(i) {
1236
+ const t = [];
1237
+ for (let e = 0; e < i.length - 1; e++) {
1238
+ const s = i[e], r = i[e + 1];
1239
+ if (t.push(s), r) {
1240
+ const a = r.startTime - s.endTime;
1241
+ a > 0 && t.push(new window.VTTCue(s.endTime, s.endTime + a, ""));
1242
+ }
1243
+ }
1244
+ return t.push(i[i.length - 1]), t;
1245
+ }
1246
+ }
1247
+ class Cs extends _t {
1248
+ constructor(t) {
1249
+ super(t);
1250
+ n(this, "pb", !0);
1251
+ n(this, "tc", !0);
1252
+ n(this, "ec");
1253
+ n(this, "ya", f(null));
1254
+ n(this, "gc");
1255
+ n(this, "hc");
1256
+ n(this, "fc", !1);
1257
+ // -------------------------------------------------------------------------------------------
1258
+ // Chapters
1259
+ // -------------------------------------------------------------------------------------------
1260
+ n(this, "cc", null);
1261
+ n(this, "ic", f(""));
1262
+ Y(yt, {
1263
+ value: this.jc.bind(this),
1264
+ time: this.kc.bind(this)
1265
+ });
1266
+ }
1267
+ onAttach(t) {
1268
+ H(t, "aria-label", "Media time"), super.onAttach(t), this.gc = new gs(
1269
+ this.j.$store,
1270
+ this.$store,
1271
+ this.ic.set
1272
+ ), this.setAttributes({
1273
+ "data-chapters": this.lc.bind(this)
1274
+ }), this.setStyles({
1275
+ "--media-buffered-percent": this.mc.bind(this)
1276
+ }), l(this.E.bind(this)), l(this.nc.bind(this)), l(this.oc.bind(this)), rt(() => {
1277
+ l(this.pc.bind(this));
1278
+ });
1279
+ }
1280
+ mc() {
1281
+ const { bufferedEnd: t, duration: e } = this.j.$store;
1282
+ return A(Math.min(t() / Math.max(e(), 1), 1) * 100, 3) + "%";
1283
+ }
1284
+ lc() {
1285
+ var e, s;
1286
+ const { duration: t } = this.j.$store;
1287
+ return (e = this.hc) == null || e.uc(), ((s = this.ya()) == null ? void 0 : s.cues.length) && Number.isFinite(t()) && t() > 0;
1288
+ }
1289
+ onConnect(t) {
1290
+ super.onConnect(t), this.Ra(), $(this.j.textTracks, "mode-change", this.Ra.bind(this));
1291
+ const { chapterContainerClass: e, chapterClass: s, trackClass: r, trackFillClass: a, trackProgressClass: h } = this.$props;
1292
+ this.hc = new Q(t).dc('[part="chapter-container"]', e).dc('[part="chapter"]', s).dc('[part="track"]', r).dc('[part~="track-fill"]', a).dc('[part~="track-progress"]', h);
1293
+ }
1294
+ render() {
1295
+ const t = super.render(), { chaptersClass: e } = this.$props;
1296
+ return [$t(() => {
1297
+ var s;
1298
+ return this.gc.render((s = this.ya()) == null ? void 0 : s.cues, e);
1299
+ }), t];
1300
+ }
1301
+ nc() {
1302
+ this.ec = vt(
1303
+ this.$a.bind(this),
1304
+ this.$props.seekingRequestThrottle()
1305
+ );
1306
+ }
1307
+ E() {
1308
+ const { currentTime: t } = this.j.$store, { value: e, dragging: s } = this.$store, r = this.qc(t());
1309
+ m(s) || (e.set(r), this.dispatch("value-change", { detail: r }));
1310
+ }
1311
+ pc() {
1312
+ const t = this.j.player;
1313
+ t && this.lb && b(t, "data-preview", this.$store.interactive());
1314
+ }
1315
+ $a(t, e) {
1316
+ this.j.remote.seeking(t, e);
1317
+ }
1318
+ rc(t, e, s) {
1319
+ this.ec.cancel();
1320
+ const { live: r } = this.j.$store;
1321
+ if (r() && e >= 99) {
1322
+ this.j.remote.seekToLiveEdge(s);
1323
+ return;
1324
+ }
1325
+ this.j.remote.seek(t, s);
1326
+ }
1327
+ Ib(t) {
1328
+ const { pauseWhileDragging: e } = this.$props;
1329
+ if (e()) {
1330
+ const { paused: s } = this.j.$store;
1331
+ this.fc = !s(), this.j.remote.pause(t);
1332
+ }
1333
+ }
1334
+ Kb(t) {
1335
+ this.ec(this.bc(t.detail), t);
1336
+ }
1337
+ Jb(t) {
1338
+ const e = t.detail;
1339
+ this.rc(this.bc(e), e, t);
1340
+ const { pauseWhileDragging: s } = this.$props;
1341
+ s() && this.fc && (this.j.remote.play(t), this.fc = !1);
1342
+ }
1343
+ Hb(t) {
1344
+ const { dragging: e } = this.$store;
1345
+ e() || !t.trigger || this.Jb(t);
1346
+ }
1347
+ // -------------------------------------------------------------------------------------------
1348
+ // Props
1349
+ // -------------------------------------------------------------------------------------------
1350
+ vb() {
1351
+ const t = this.$props.step() / this.j.$store.duration() * 100;
1352
+ return Number.isFinite(t) ? t : 1;
1353
+ }
1354
+ Fb() {
1355
+ const t = this.$props.keyStep() / this.j.$store.duration() * 100;
1356
+ return Number.isFinite(t) ? t : 1;
1357
+ }
1358
+ Gb(t) {
1359
+ return A(t, 3);
1360
+ }
1361
+ mb() {
1362
+ const { canSeek: t } = this.j.$store;
1363
+ return super.mb() || !t();
1364
+ }
1365
+ // -------------------------------------------------------------------------------------------
1366
+ // ARIA
1367
+ // -------------------------------------------------------------------------------------------
1368
+ xb() {
1369
+ return 0;
1370
+ }
1371
+ yb() {
1372
+ return 100;
1373
+ }
1374
+ Ab() {
1375
+ const t = this.bc(this.$store.value()), { duration: e } = this.j.$store;
1376
+ return Number.isFinite(t) ? `${mt(t)} out of ${mt(e())}` : "live";
1377
+ }
1378
+ // -------------------------------------------------------------------------------------------
1379
+ // Format
1380
+ // -------------------------------------------------------------------------------------------
1381
+ bc(t) {
1382
+ const { duration: e } = this.j.$store;
1383
+ return Math.round(t / 100 * e());
1384
+ }
1385
+ qc(t) {
1386
+ const { liveEdge: e, duration: s } = this.j.$store, r = Math.max(0, Math.min(1, e() ? 1 : Math.min(t, s()) / s()));
1387
+ return Number.isNaN(r) ? 0 : Number.isFinite(r) ? r * 100 : 100;
1388
+ }
1389
+ jc(t) {
1390
+ const e = this.bc(t), { live: s, duration: r } = this.j.$store;
1391
+ return Number.isFinite(e) ? (s() ? e - r() : e).toFixed(0) : "LIVE";
1392
+ }
1393
+ kc(t, e, s, r) {
1394
+ const a = this.bc(t), { live: h, duration: c } = this.j.$store, d = h() ? a - c() : a;
1395
+ return Number.isFinite(a) ? `${d < 0 ? "-" : ""}${ct(
1396
+ Math.abs(d),
1397
+ e,
1398
+ xt(s) ? Math.abs(d) >= 3600 : s,
1399
+ r
1400
+ )}` : "LIVE";
1401
+ }
1402
+ Ra() {
1403
+ Gt(this.j.textTracks, m(this.ya), this.ya.set);
1404
+ }
1405
+ oc() {
1406
+ var t;
1407
+ if (this.ya(), this.cc = ((t = this.el) == null ? void 0 : t.querySelector('[part="chapter-title"]')) ?? null, !!this.cc)
1408
+ return l(this.sc.bind(this)), () => {
1409
+ this.cc.textContent = "", this.cc = null;
1410
+ };
1411
+ }
1412
+ sc() {
1413
+ this.cc.textContent = this.ic();
1414
+ }
1415
+ }
1416
+ n(Cs, "el", u({
1417
+ tagName: "media-time-slider",
1418
+ props: {
1419
+ ...kt,
1420
+ min: K({ value: 0, attribute: !1 }),
1421
+ max: K({ value: 100, attribute: !1 }),
1422
+ value: K({ value: 0, attribute: !1 }),
1423
+ pauseWhileDragging: !1,
1424
+ seekingRequestThrottle: 100,
1425
+ chaptersClass: null,
1426
+ chapterContainerClass: null,
1427
+ chapterClass: null
1428
+ },
1429
+ store: z
1430
+ }));
1431
+ const S = ot(), fs = /* @__PURE__ */ [
1432
+ "a[href]",
1433
+ "[tabindex]",
1434
+ "input",
1435
+ "select",
1436
+ "button"
1437
+ ].map((o) => `${o}:not([aria-hidden])`).join(","), Dt = /* @__PURE__ */ new Set([
1438
+ "Escape",
1439
+ "Tab",
1440
+ "ArrowUp",
1441
+ "ArrowDown",
1442
+ "Home",
1443
+ "PageUp",
1444
+ "End",
1445
+ "PageDown",
1446
+ "Enter",
1447
+ " "
1448
+ ]);
1449
+ class $s {
1450
+ constructor(i) {
1451
+ n(this, "zd", 0);
1452
+ n(this, "dh", null);
1453
+ n(this, "ch", []);
1454
+ this.jg = i;
1455
+ }
1456
+ get a() {
1457
+ return this.ch;
1458
+ }
1459
+ hd(i) {
1460
+ $(i, "focus", this.Te.bind(this)), this.dh = i;
1461
+ }
1462
+ gd() {
1463
+ this.dh && (this.na(), $(this.dh, "keyup", this.Ya.bind(this)), $(this.dh, "keydown", this.Za.bind(this)), at(() => {
1464
+ this.zd = 0, this.ch = [];
1465
+ }));
1466
+ }
1467
+ na() {
1468
+ this.zd = 0, this.ch = this.hh();
1469
+ }
1470
+ kd(i = this.gh()) {
1471
+ const t = this.ch[i], e = this.jg.dd();
1472
+ t && e && requestAnimationFrame(() => {
1473
+ e.scrollTop = t.offsetTop - e.offsetHeight / 2 + t.offsetHeight / 2;
1474
+ });
1475
+ }
1476
+ eh(i) {
1477
+ var t;
1478
+ this.zd = i, (t = this.ch[i]) == null || t.focus(), this.kd(i);
1479
+ }
1480
+ gh() {
1481
+ return this.ch.findIndex((i) => i.getAttribute("aria-checked") === "true");
1482
+ }
1483
+ Te() {
1484
+ setTimeout(() => {
1485
+ const i = this.gh();
1486
+ this.eh(i >= 0 ? i : 0);
1487
+ }, 100);
1488
+ }
1489
+ Ya(i) {
1490
+ Dt.has(i.key) && (i.stopPropagation(), i.preventDefault());
1491
+ }
1492
+ Za(i) {
1493
+ if (Dt.has(i.key))
1494
+ switch (i.stopPropagation(), i.preventDefault(), i.key) {
1495
+ case "Escape":
1496
+ this.jg.ed(i);
1497
+ break;
1498
+ case "Tab":
1499
+ this.eh(this.fh(i.shiftKey ? -1 : 1));
1500
+ break;
1501
+ case "ArrowUp":
1502
+ this.eh(this.fh(-1));
1503
+ break;
1504
+ case "ArrowDown":
1505
+ this.eh(this.fh(1));
1506
+ break;
1507
+ case "Home":
1508
+ case "PageUp":
1509
+ this.eh(0);
1510
+ break;
1511
+ case "End":
1512
+ case "PageDown":
1513
+ this.eh(this.ch.length - 1);
1514
+ break;
1515
+ }
1516
+ }
1517
+ fh(i) {
1518
+ let t = this.zd;
1519
+ do
1520
+ t = (t + i + this.ch.length) % this.ch.length;
1521
+ while (this.ch[t].offsetParent === null);
1522
+ return t;
1523
+ }
1524
+ hh() {
1525
+ if (!this.dh)
1526
+ return [];
1527
+ const i = this.dh.querySelectorAll(fs), t = [], e = (s) => s.hasAttribute("data-media-menu-items");
1528
+ for (const s of i)
1529
+ s instanceof HTMLElement && s.offsetParent !== null && // does not have display: none
1530
+ zt(this.dh, s, e) && t.push(s);
1531
+ return t;
1532
+ }
1533
+ }
1534
+ var vs = Object.defineProperty, js = Object.getOwnPropertyDescriptor, te = (o, i, t, e) => {
1535
+ for (var s = js(i, t), r = o.length - 1, a; r >= 0; r--)
1536
+ (a = o[r]) && (s = a(i, t, s) || s);
1537
+ return s && vs(i, t, s), s;
1538
+ };
1539
+ let xs = 0;
1540
+ class Lt extends j {
1541
+ constructor(t) {
1542
+ super(t);
1543
+ n(this, "j");
1544
+ n(this, "Bc");
1545
+ n(this, "Cc");
1546
+ n(this, "wc", f(!1));
1547
+ n(this, "Ic", f(!1));
1548
+ n(this, "Jc", f(!1));
1549
+ n(this, "xc");
1550
+ n(this, "yc", /* @__PURE__ */ new Set());
1551
+ n(this, "Dc", null);
1552
+ n(this, "vc", null);
1553
+ n(this, "Ac", null);
1554
+ n(this, "zc");
1555
+ n(this, "ld", this.Ec.bind(this));
1556
+ n(this, "$c", this.ad.bind(this));
1557
+ n(this, "Zc", this.bd.bind(this));
1558
+ n(this, "_c", this.cd.bind(this));
1559
+ this.j = C();
1560
+ const e = ++xs;
1561
+ this.Bc = `media-menu-${e}`, this.Cc = `media-menu-button-${e}`, it(S) && (this.xc = I(S)), this.zc = new $s({
1562
+ dd: this.Sc.bind(this),
1563
+ ed: this.close.bind(this)
1564
+ }), Y(S, {
1565
+ wc: this.wc,
1566
+ fd: f(""),
1567
+ Ec: this.Ec.bind(this),
1568
+ Kc: this.Kc.bind(this),
1569
+ Lc: this.Lc.bind(this),
1570
+ Mc: this.Mc.bind(this),
1571
+ Nc: this.Nc.bind(this),
1572
+ Fc: this.Fc.bind(this)
1573
+ });
1574
+ }
1575
+ onAttach(t) {
1576
+ const { position: e } = this.$props;
1577
+ this.setAttributes({
1578
+ position: e,
1579
+ "data-open": this.wc,
1580
+ "data-submenu": !!this.xc,
1581
+ "data-disabled": this.mb.bind(this),
1582
+ "data-media-menu": !0
1583
+ });
1584
+ }
1585
+ onConnect(t) {
1586
+ var e;
1587
+ this.xc || l(this.Oc.bind(this)), l(this.Tc.bind(this)), (e = this.xc) == null || e.Fc(t), requestAnimationFrame(() => this.n());
1588
+ }
1589
+ onDestroy() {
1590
+ this.Pc(), this.Dc = null, this.vc = null, this.Ac = null;
1591
+ }
1592
+ Pc() {
1593
+ var e, s;
1594
+ if (!this.vc || (e = this.el) != null && e.contains(this.vc))
1595
+ return;
1596
+ const t = (s = this.vc) == null ? void 0 : s.parentElement;
1597
+ this.el.append(this.vc), (t == null ? void 0 : t.localName) === "media-menu" && (t.destroy(), t.remove());
1598
+ }
1599
+ Oc() {
1600
+ var c, d;
1601
+ if (!this.el)
1602
+ return;
1603
+ const { breakpointX: t, breakpointY: e, viewType: s, orientation: r, fullscreen: a } = this.j.$store, h = s() === "audio" ? t() === "sm" : e() === "sm";
1604
+ if (!(!this.vc || this.xc)) {
1605
+ if (b(this.el, "data-popup", h), b(this.el, "data-popup-wide", h && r() === "landscape"), h && !a() && (d = (c = this.el).contains) != null && d.call(c, this.vc)) {
1606
+ const k = this.el.cloneNode();
1607
+ k.appendChild(this.vc), requestAnimationFrame(() => {
1608
+ if (!this.el)
1609
+ return;
1610
+ const T = "--media-focus-ring", y = getComputedStyle(this.el).getPropertyValue(T);
1611
+ y && M(k, T, y);
1612
+ }), ge(() => {
1613
+ document.body.append(k);
1614
+ }, this.j.scope);
1615
+ }
1616
+ return this.n(), () => this.Pc();
1617
+ }
1618
+ }
1619
+ Tc() {
1620
+ const t = this.Qc();
1621
+ if (this.n(), this.Rc(t), !t)
1622
+ return;
1623
+ this.zc.gd();
1624
+ const e = this.Uc();
1625
+ e && B(e, this.Vc.bind(this)), this.listen("pointerup", this.Wc.bind(this)), $(window, "pointerup", this.Xc.bind(this));
1626
+ }
1627
+ Kc(t) {
1628
+ const e = !!this.xc, s = this.Qc.bind(this), r = V(s), a = V(this.mb.bind(this));
1629
+ H(t, "tabindex", e ? "-1" : "0"), H(t, "role", e ? "menuitem" : "button"), b(t, "id", this.Cc), b(t, "aria-controls", this.Bc), b(t, "aria-haspopup", "true"), l(() => {
1630
+ b(t, "aria-disabled", a()), b(t, "aria-expanded", r()), e || b(t, "aria-pressed", r()), b(t, "data-pressed", s());
1631
+ }), b(t, "data-media-button", !e), b(t, "data-media-menu-button", ""), B(t, this.Yc.bind(this)), this.Dc = t;
1632
+ }
1633
+ Lc(t) {
1634
+ H(t, "role", "menu"), H(t, "tabindex", "-1"), b(t, "id", this.Bc), b(t, "aria-describedby", this.Cc), b(t, "data-media-menu-items", ""), this.vc = t, this.zc.hd(t), this.Oc(), this.Rc(m(this.wc));
1635
+ }
1636
+ Mc(t) {
1637
+ this.Ac = t;
1638
+ }
1639
+ Rc(t) {
1640
+ this.vc && b(this.vc, "aria-hidden", ft(!t));
1641
+ }
1642
+ Nc(t) {
1643
+ this.Jc.set(t);
1644
+ }
1645
+ Yc(t) {
1646
+ var e;
1647
+ this.xc && t.stopPropagation(), !this.mb() && (this.wc.set((s) => !s), this.Gc(), dt(), q(t) && ((e = this.vc) == null || e.focus()), this.Hc(t));
1648
+ }
1649
+ Hc(t) {
1650
+ var s, r, a, h, c;
1651
+ const e = m(this.wc);
1652
+ this.dispatch(e ? "open" : "close", { trigger: t }), e ? (this.xc || ((s = this.j.activeMenu) == null || s.close(t), this.j.activeMenu = this), (a = (r = this.Ac) == null ? void 0 : r.id) == null || a.call(r, t)) : (this.xc || (setTimeout(() => {
1653
+ for (const d of this.yc)
1654
+ d.close(t);
1655
+ }, 300), this.j.activeMenu = null), (c = (h = this.Ac) == null ? void 0 : h.jd) == null || c.call(h, t)), e && !q(t) && requestAnimationFrame(() => {
1656
+ this.zc.na(), setTimeout(() => {
1657
+ this.zc.kd();
1658
+ }, 100);
1659
+ });
1660
+ }
1661
+ Qc() {
1662
+ return !this.mb() && this.wc();
1663
+ }
1664
+ mb() {
1665
+ return this.Ic() || this.Jc();
1666
+ }
1667
+ Ec(t) {
1668
+ this.Ic.set(t);
1669
+ }
1670
+ Wc(t) {
1671
+ t.stopPropagation();
1672
+ }
1673
+ Xc() {
1674
+ if (this.xc)
1675
+ return setTimeout(this.close.bind(this), 800);
1676
+ this.close();
1677
+ }
1678
+ Vc(t) {
1679
+ t.stopPropagation(), this.close(t);
1680
+ }
1681
+ Uc() {
1682
+ const t = this.el.querySelector('[slot="close-target"]');
1683
+ return zt(this.el, t) ? t : null;
1684
+ }
1685
+ Sc() {
1686
+ if (this.xc) {
1687
+ let t = this.el;
1688
+ for (; t && t.tagName !== "media-menu" && t.hasAttribute("data-submenu"); )
1689
+ t = t.parentNode;
1690
+ return t;
1691
+ } else
1692
+ return this.vc;
1693
+ }
1694
+ Gc(t) {
1695
+ this.xc || (this.wc() ? this.j.remote.pauseUserIdle(t) : this.j.remote.resumeUserIdle(t));
1696
+ }
1697
+ Fc(t) {
1698
+ this.yc.add(t), $(t, "open", this.Zc), $(t, "close", this._c), at(this.$c);
1699
+ }
1700
+ ad(t) {
1701
+ this.yc.delete(t);
1702
+ }
1703
+ bd(t) {
1704
+ for (const e of this.yc)
1705
+ e !== t.target && e.setAttribute("aria-hidden", "true");
1706
+ this.n();
1707
+ }
1708
+ cd() {
1709
+ for (const t of this.yc)
1710
+ t.removeAttribute("aria-hidden");
1711
+ this.n();
1712
+ }
1713
+ n() {
1714
+ var r;
1715
+ if (!this.vc)
1716
+ return;
1717
+ let t = getComputedStyle(this.vc), e = parseFloat(t.paddingTop) + parseFloat(t.paddingBottom), s = [...this.vc.children];
1718
+ ((r = s[0]) == null ? void 0 : r.localName) === "shadow-root" && s.push(...s[0].children);
1719
+ for (const a of s)
1720
+ e += a.offsetHeight;
1721
+ requestAnimationFrame(() => {
1722
+ this.vc && (b(this.vc, "data-resizing", ""), setTimeout(() => {
1723
+ this.vc && b(this.vc, "data-resizing", !1);
1724
+ }, 250), M(this.vc, "--menu-height", e + "px"));
1725
+ });
1726
+ }
1727
+ open(t) {
1728
+ var e;
1729
+ m(this.wc) || (this.wc.set(!0), dt(), this.Hc(t), q(t) && ((e = this.vc) == null || e.focus()), this.Gc(t));
1730
+ }
1731
+ close(t) {
1732
+ m(this.wc) && (this.wc.set(!1), dt(), q(t) && requestAnimationFrame(() => {
1733
+ var e;
1734
+ (e = this.Dc) == null || e.focus();
1735
+ }), this.Hc(t), this.Gc(t));
1736
+ }
1737
+ }
1738
+ n(Lt, "el", u({
1739
+ tagName: "media-menu",
1740
+ props: { position: null }
1741
+ }));
1742
+ te([
1743
+ Wt
1744
+ ], Lt.prototype, "open");
1745
+ te([
1746
+ Wt
1747
+ ], Lt.prototype, "close");
1748
+ class X extends j {
1749
+ constructor(t) {
1750
+ super(t);
1751
+ n(this, "md");
1752
+ this.md = I(S), new D(t), new wt(t);
1753
+ }
1754
+ onAttach(t) {
1755
+ this.md.Kc(t), l(this.rb.bind(this));
1756
+ }
1757
+ onConnect(t) {
1758
+ const e = Array.from(t.querySelectorAll('[slot="hint"]')).pop();
1759
+ e && l(() => {
1760
+ const s = this.md.fd();
1761
+ s && (e.textContent = s);
1762
+ });
1763
+ }
1764
+ rb() {
1765
+ this.md.Nc(this.$props.disabled());
1766
+ }
1767
+ }
1768
+ n(X, "el", u({
1769
+ tagName: "media-menu-button",
1770
+ props: { disabled: !1 }
1771
+ }));
1772
+ class U extends j {
1773
+ constructor(t) {
1774
+ super(t);
1775
+ n(this, "md");
1776
+ this.md = I(S), new D(t);
1777
+ }
1778
+ onAttach(t) {
1779
+ this.md.Lc(t);
1780
+ }
1781
+ }
1782
+ n(U, "el", u({
1783
+ tagName: "media-menu-items"
1784
+ }));
1785
+ const gt = ot();
1786
+ var ws = Object.defineProperty, ks = Object.getOwnPropertyDescriptor, ee = (o, i, t, e) => {
1787
+ for (var s = ks(i, t), r = o.length - 1, a; r >= 0; r--)
1788
+ (a = o[r]) && (s = a(i, t, s) || s);
1789
+ return s && ws(i, t, s), s;
1790
+ };
1791
+ class N extends j {
1792
+ constructor(t) {
1793
+ super(t);
1794
+ n(this, "td", /* @__PURE__ */ new Set());
1795
+ n(this, "sd", f(""));
1796
+ n(this, "yd", this.Hc.bind(this));
1797
+ Y(gt, {
1798
+ add: this.wd.bind(this),
1799
+ remove: this.xd.bind(this)
1800
+ });
1801
+ }
1802
+ get values() {
1803
+ return Array.from(this.td).map((t) => t.sd());
1804
+ }
1805
+ get value() {
1806
+ return this.sd();
1807
+ }
1808
+ set value(t) {
1809
+ this.Hc(t);
1810
+ }
1811
+ onAttach(t) {
1812
+ it(S) || H(t, "role", "radiogroup"), this.ud(), this.setAttributes({ value: this.sd });
1813
+ }
1814
+ onConnect() {
1815
+ l(this.ud.bind(this));
1816
+ }
1817
+ onDestroy() {
1818
+ this.td.clear();
1819
+ }
1820
+ wd(t) {
1821
+ this.td.has(t) || (this.td.add(t), t.qd = this.yd, t.pd(t.sd() === this.sd()));
1822
+ }
1823
+ xd(t) {
1824
+ t.qd = null, this.td.delete(t);
1825
+ }
1826
+ ud() {
1827
+ this.Hc(this.$props.value());
1828
+ }
1829
+ Hc(t, e) {
1830
+ const s = m(this.sd);
1831
+ if (!t || t === s)
1832
+ return;
1833
+ const r = this.vd(s), a = this.vd(t);
1834
+ r == null || r.pd(!1, e), a == null || a.pd(!0, e), this.sd.set(t), this.dispatch("change", { trigger: e });
1835
+ }
1836
+ vd(t) {
1837
+ for (const e of this.td)
1838
+ if (t === m(e.sd))
1839
+ return e;
1840
+ return null;
1841
+ }
1842
+ }
1843
+ n(N, "el", u({
1844
+ tagName: "media-radio-group",
1845
+ props: { value: "" }
1846
+ }));
1847
+ ee([
1848
+ ht
1849
+ ], N.prototype, "values");
1850
+ ee([
1851
+ ht
1852
+ ], N.prototype, "value");
1853
+ var ys = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Hs = (o, i, t, e) => {
1854
+ for (var s = _s(i, t), r = o.length - 1, a; r >= 0; r--)
1855
+ (a = o[r]) && (s = a(i, t, s) || s);
1856
+ return s && ys(i, t, s), s;
1857
+ };
1858
+ const Ls = /* @__PURE__ */ p('<!$><div part="check"></div>');
1859
+ class Z extends j {
1860
+ constructor(t) {
1861
+ super(t);
1862
+ n(this, "nd", f(!1));
1863
+ n(this, "od", {
1864
+ sd: this.$props.value,
1865
+ pd: this.pd.bind(this),
1866
+ qd: null
1867
+ });
1868
+ new D(t);
1869
+ }
1870
+ get checked() {
1871
+ return this.nd();
1872
+ }
1873
+ onAttach() {
1874
+ l(this.sb.bind(this)), this.rd();
1875
+ const t = it(S);
1876
+ this.setAttributes({
1877
+ value: this.$props.value,
1878
+ role: t ? "menuitemradio" : "radio",
1879
+ tabindex: t ? -1 : 0,
1880
+ "aria-checked": V(this.nd)
1881
+ });
1882
+ }
1883
+ onConnect(t) {
1884
+ this.rd(), B(t, this.gb.bind(this));
1885
+ }
1886
+ onDisconnect() {
1887
+ I(gt).remove(this.od);
1888
+ }
1889
+ rd() {
1890
+ I(gt).add(this.od);
1891
+ }
1892
+ sb() {
1893
+ var s, r;
1894
+ const { value: t } = this.$props, e = t();
1895
+ m(this.nd) && ((r = (s = this.od).qd) == null || r.call(s, e));
1896
+ }
1897
+ gb(t) {
1898
+ var e, s;
1899
+ m(this.nd) || (this.nd.set(!0), this.dispatch("change", { trigger: t }), (s = (e = this.od).qd) == null || s.call(e, m(this.$props.value), t));
1900
+ }
1901
+ pd(t, e) {
1902
+ m(this.nd) !== t && (this.nd.set(t), this.dispatch("change", { trigger: e }));
1903
+ }
1904
+ render() {
1905
+ return st(Ls);
1906
+ }
1907
+ }
1908
+ n(Z, "el", u({
1909
+ tagName: "media-radio",
1910
+ props: { value: "" }
1911
+ }));
1912
+ Hs([
1913
+ ht
1914
+ ], Z.prototype, "checked");
1915
+ const As = /* @__PURE__ */ p("<!$><media-radio-group mk-d><!$></media-radio-group>"), Vs = /* @__PURE__ */ p("<!$><media-radio mk-d><!$></media-radio>");
1916
+ function J(o) {
1917
+ const { value: i, onChange: t, radioGroupClass: e } = o;
1918
+ return (() => {
1919
+ const [s, r] = g(As), a = r.nextNode();
1920
+ return _(() => v(s, "class", e())), O(s, "change", t), Ut(() => {
1921
+ L(a, () => Ts(o));
1922
+ }, nt(s, { value: i })), s;
1923
+ })();
1924
+ }
1925
+ function Ts(o) {
1926
+ const { options: i } = o;
1927
+ return i().map((t) => (() => {
1928
+ const [e, s] = g(Vs), r = s.nextNode();
1929
+ return v(e, "part", o.part), Ut(() => {
1930
+ L(r, t.content);
1931
+ }, nt(e, { value: t.value })), e;
1932
+ })());
1933
+ }
1934
+ const Ms = /* @__PURE__ */ p('<!$><media-thumbnail part="thumbnail" mk-d></media-thumbnail>'), Ps = /* @__PURE__ */ p('<!$><div part="content"><div part="title"><!$></div><div part="start-time"><!$></div><div part="duration"><!$></div></div>');
1935
+ class Ft extends U {
1936
+ constructor(t) {
1937
+ super(t);
1938
+ n(this, "j");
1939
+ n(this, "zd", f(0));
1940
+ n(this, "ya", f(null));
1941
+ this.j = C();
1942
+ }
1943
+ onAttach(t) {
1944
+ super.onAttach(t), this.md.Mc({
1945
+ id: this.id.bind(this)
1946
+ }), this.setAttributes({
1947
+ "data-thumbnails": this.Ad.bind(this)
1948
+ });
1949
+ }
1950
+ id() {
1951
+ m(() => this.E());
1952
+ }
1953
+ onConnect(t) {
1954
+ l(this.E.bind(this)), l(this.Bd.bind(this)), this.Ra(), $(this.j.textTracks, "mode-change", this.Ra.bind(this));
1955
+ const {
1956
+ chapterClass: e,
1957
+ thumbnailClass: s,
1958
+ contentClass: r,
1959
+ titleClass: a,
1960
+ startTimeClass: h,
1961
+ durationClass: c
1962
+ } = this.$props;
1963
+ new Q(t).dc('[part="chapter"]', e).dc('[part="thumbnail"]', s).dc('[part="content"]', r).dc('[part="title"]', a).dc('[part="start-time"]', h).dc('[part="duration"]', c);
1964
+ }
1965
+ Ad() {
1966
+ const { thumbnailCues: t } = this.j.$store;
1967
+ return t().length > 0;
1968
+ }
1969
+ E() {
1970
+ if (!this.md.wc())
1971
+ return;
1972
+ const t = this.ya();
1973
+ if (!t) {
1974
+ this.zd.set(-1);
1975
+ return;
1976
+ }
1977
+ const { currentTime: e } = this.j.$store, s = e(), r = t.cues.findIndex((a) => Ce(a, s));
1978
+ if (this.zd.set(r), r >= 0) {
1979
+ const a = t.cues[r], h = this.el.querySelector("shadow-root media-radio[aria-checked='true']"), c = (s - a.startTime) / (a.endTime - a.startTime) * 100;
1980
+ h && M(h, "--played-percent", A(c, 3) + "%");
1981
+ }
1982
+ }
1983
+ Bd() {
1984
+ this.md.Ec(this.mb());
1985
+ }
1986
+ mb() {
1987
+ const t = this.ya();
1988
+ return !t || !t.cues.length;
1989
+ }
1990
+ Hc(t) {
1991
+ var r;
1992
+ if (this.mb() || !t.trigger)
1993
+ return;
1994
+ const e = +t.target.value, s = (r = this.ya()) == null ? void 0 : r.cues;
1995
+ Qt(e) && (s != null && s[e]) && (this.zd.set(e), this.j.remote.seek(s[e].startTime, t));
1996
+ }
1997
+ Ra() {
1998
+ Gt(this.j.textTracks, m(this.ya), this.ya.set);
1999
+ }
2000
+ Cd() {
2001
+ return this.zd() + "";
2002
+ }
2003
+ Dd() {
2004
+ const t = this.ya();
2005
+ return t ? t.cues.map((e, s) => ({
2006
+ value: s + "",
2007
+ content: () => [
2008
+ (() => {
2009
+ const r = $t(
2010
+ () => this.Ad() && (() => {
2011
+ const [a, h] = g(Ms);
2012
+ return nt(a, { time: e.startTime }), a;
2013
+ })()
2014
+ );
2015
+ return r(), r;
2016
+ })(),
2017
+ (() => {
2018
+ const [r, a] = g(Ps), h = a.nextNode(), c = a.nextNode(), d = a.nextNode();
2019
+ return L(h, e.text), L(c, () => ct(e.startTime, !1, e.startTime >= 3600)), L(d, () => mt(e.endTime - e.startTime)), r;
2020
+ })()
2021
+ ]
2022
+ })) : [];
2023
+ }
2024
+ render() {
2025
+ const { containerClass: t } = this.$props;
2026
+ return J({
2027
+ part: "chapter",
2028
+ value: this.Cd.bind(this),
2029
+ options: this.Dd.bind(this),
2030
+ radioGroupClass: t,
2031
+ onChange: this.Hc.bind(this)
2032
+ });
2033
+ }
2034
+ }
2035
+ n(Ft, "el", u({
2036
+ tagName: "media-chapters-menu-items",
2037
+ props: {
2038
+ containerClass: null,
2039
+ chapterClass: null,
2040
+ thumbnailClass: null,
2041
+ contentClass: null,
2042
+ titleClass: null,
2043
+ startTimeClass: null,
2044
+ durationClass: null
2045
+ }
2046
+ })), n(Ft, "register", [Ht, N, Z]);
2047
+ const Ns = /* @__PURE__ */ p('<!$><span part="label"><!$></span>');
2048
+ class Zt extends U {
2049
+ constructor(t) {
2050
+ super(t);
2051
+ n(this, "j");
2052
+ this.j = C();
2053
+ }
2054
+ onConnect(t) {
2055
+ l(this.Bd.bind(this)), l(this.Ed.bind(this));
2056
+ const { radioClass: e, radioCheckClass: s } = this.$props;
2057
+ new Q(t).dc("media-radio", e).dc('[part="check"]', s);
2058
+ }
2059
+ Ed() {
2060
+ const { emptyLabel: t } = this.$props, { audioTrack: e } = this.j.$store, s = e();
2061
+ this.md.fd.set((s == null ? void 0 : s.label) ?? t());
2062
+ }
2063
+ Bd() {
2064
+ this.md.Ec(this.mb());
2065
+ }
2066
+ mb() {
2067
+ const { audioTracks: t } = this.j.$store;
2068
+ return t().length === 0;
2069
+ }
2070
+ Hc(t) {
2071
+ if (this.mb())
2072
+ return;
2073
+ const s = t.target.value, r = this.j.audioTracks.toArray().findIndex((a) => a.label.toLowerCase() === s);
2074
+ r >= 0 && this.j.remote.changeAudioTrack(r, t);
2075
+ }
2076
+ Cd() {
2077
+ const { audioTrack: t } = this.j.$store, e = t();
2078
+ return e ? e.label.toLowerCase() : "";
2079
+ }
2080
+ Dd() {
2081
+ const { audioTracks: t } = this.j.$store;
2082
+ return t().map((e) => ({
2083
+ value: e.label.toLowerCase(),
2084
+ content: () => (() => {
2085
+ const [s, r] = g(Ns), a = r.nextNode();
2086
+ return L(a, e.label), s;
2087
+ })()
2088
+ }));
2089
+ }
2090
+ render() {
2091
+ const { radioGroupClass: t } = this.$props;
2092
+ return J({
2093
+ value: this.Cd.bind(this),
2094
+ options: this.Dd.bind(this),
2095
+ radioGroupClass: t,
2096
+ onChange: this.Hc.bind(this)
2097
+ });
2098
+ }
2099
+ }
2100
+ n(Zt, "el", u({
2101
+ tagName: "media-audio-menu-items",
2102
+ props: {
2103
+ emptyLabel: "Default",
2104
+ radioClass: null,
2105
+ radioGroupClass: null,
2106
+ radioCheckClass: null
2107
+ }
2108
+ })), n(Zt, "register", [N, Z]);
2109
+ var Es = '<path fill-rule="evenodd" clip-rule="evenodd" d="M26.6667 5.99998C26.6667 5.63179 26.3682 5.33331 26 5.33331H11.3333C10.9651 5.33331 10.6667 5.63179 10.6667 5.99998V17.5714C10.6667 17.6694 10.5644 17.7342 10.4741 17.6962C9.91823 17.4625 9.30754 17.3333 8.66667 17.3333C6.08934 17.3333 4 19.4226 4 22C4 24.5773 6.08934 26.6666 8.66667 26.6666C11.244 26.6666 13.3333 24.5773 13.3333 22V8.66665C13.3333 8.29846 13.6318 7.99998 14 7.99998L23.3333 7.99998C23.7015 7.99998 24 8.29846 24 8.66665V14.9048C24 15.0027 23.8978 15.0675 23.8075 15.0296C23.2516 14.7958 22.6409 14.6666 22 14.6666C19.4227 14.6666 17.3333 16.756 17.3333 19.3333C17.3333 21.9106 19.4227 24 22 24C24.5773 24 26.6667 21.9106 26.6667 19.3333V5.99998ZM22 21.3333C23.1046 21.3333 24 20.4379 24 19.3333C24 18.2287 23.1046 17.3333 22 17.3333C20.8954 17.3333 20 18.2287 20 19.3333C20 20.4379 20.8954 21.3333 22 21.3333ZM8.66667 24C9.77124 24 10.6667 23.1045 10.6667 22C10.6667 20.8954 9.77124 20 8.66667 20C7.5621 20 6.66667 20.8954 6.66667 22C6.66667 23.1045 7.5621 24 8.66667 24Z" fill="currentColor"/>', Ss = '<path d="M13.0908 14.3334C12.972 14.3334 12.9125 14.1898 12.9965 14.1058L17.7021 9.40022C17.9625 9.13987 17.9625 8.71776 17.7021 8.45741L16.2879 7.04319C16.0275 6.78284 15.6054 6.78284 15.3451 7.04319L6.8598 15.5285C6.59945 15.7888 6.59945 16.2109 6.8598 16.4713L8.27401 17.8855L8.27536 17.8868L15.3453 24.9568C15.6057 25.2172 16.0278 25.2172 16.2881 24.9568L17.7024 23.5426C17.9627 23.2822 17.9627 22.8601 17.7024 22.5998L12.9969 17.8944C12.9129 17.8104 12.9724 17.6668 13.0912 17.6668L26 17.6668C26.3682 17.6668 26.6667 17.3683 26.6667 17.0001V15.0001C26.6667 14.6319 26.3682 14.3334 26 14.3334L13.0908 14.3334Z" fill="currentColor"/>', Is = '<path d="M15.905 17.4809C15.9571 17.533 16.0415 17.533 16.0936 17.4809L22.4111 11.1635C22.6714 10.9031 23.0935 10.9031 23.3539 11.1635L24.9567 12.7662C25.217 13.0266 25.217 13.4487 24.9567 13.709L18.1028 20.5629C18.0937 20.5732 18.0842 20.5833 18.0744 20.5931L16.4716 22.1959C16.2113 22.4562 15.7892 22.4562 15.5288 22.1959L7.04353 13.7106C6.78318 13.4503 6.78318 13.0281 7.04353 12.7678L8.6463 11.165C8.90665 10.9047 9.32876 10.9047 9.58911 11.165L15.905 17.4809Z" fill="currentColor"/>';
2110
+ const Rs = /* @__PURE__ */ p('<!$><span slot="label"><!$></span>'), Ds = /* @__PURE__ */ p('<!$><div slot="hint"></div>');
2111
+ function lt({ label: o, iconPaths: i }) {
2112
+ return [
2113
+ x(w, { slot: "close-icon", paths: Ss }),
2114
+ x(w, { slot: "icon", paths: i }),
2115
+ (() => {
2116
+ const [t, e] = g(Rs), s = e.nextNode();
2117
+ return L(s, o), t;
2118
+ })(),
2119
+ st(Ds),
2120
+ x(w, { slot: "open-icon", paths: Is })
2121
+ ];
2122
+ }
2123
+ class Fs extends X {
2124
+ render() {
2125
+ const { label: i } = this.$props;
2126
+ return lt({
2127
+ label: i,
2128
+ iconPaths: Es
2129
+ });
2130
+ }
2131
+ }
2132
+ n(Fs, "el", u({
2133
+ tagName: "media-audio-menu-button",
2134
+ props: { disabled: !1, label: "Audio" }
2135
+ }));
2136
+ const se = /* @__PURE__ */ p('<!$><span part="label"><!$></span>'), Zs = se;
2137
+ class qt extends U {
2138
+ constructor(t) {
2139
+ super(t);
2140
+ n(this, "j");
2141
+ this.j = C();
2142
+ }
2143
+ onConnect(t) {
2144
+ l(this.Bd.bind(this)), l(this.Ed.bind(this));
2145
+ const { radioClass: e, radioCheckClass: s } = this.$props;
2146
+ new Q(t).dc("media-radio", e).dc('[part="check"]', s);
2147
+ }
2148
+ Ed() {
2149
+ const { offLabel: t } = this.$props, { textTrack: e } = this.j.$store, s = e();
2150
+ this.md.fd.set(
2151
+ s && E(s) && s.mode === "showing" ? s.label : t()
2152
+ );
2153
+ }
2154
+ Bd() {
2155
+ this.md.Ec(this.mb());
2156
+ }
2157
+ mb() {
2158
+ const { textTracks: t } = this.j.$store;
2159
+ return t().filter(E).length === 0;
2160
+ }
2161
+ Hc(t) {
2162
+ if (this.mb())
2163
+ return;
2164
+ const s = t.target.value;
2165
+ if (s === "off") {
2166
+ const a = this.j.textTracks.selected;
2167
+ if (a) {
2168
+ const h = this.j.textTracks.toArray().indexOf(a);
2169
+ this.j.remote.changeTextTrackMode(h, "disabled", t);
2170
+ }
2171
+ return;
2172
+ }
2173
+ const r = this.j.textTracks.toArray().findIndex((a) => a.label.toLowerCase() === s);
2174
+ r >= 0 && this.j.remote.changeTextTrackMode(r, "showing", t);
2175
+ }
2176
+ Cd() {
2177
+ const { textTrack: t, textTracks: e } = this.j.$store, s = t();
2178
+ return s && E(s) && s.mode === "showing" ? s.label.toLowerCase() : "off";
2179
+ }
2180
+ Dd() {
2181
+ const { offLabel: t } = this.$props, { textTracks: e } = this.j.$store;
2182
+ return [
2183
+ { value: "off", content: () => (() => {
2184
+ const [s, r] = g(se), a = r.nextNode();
2185
+ return L(a, t), s;
2186
+ })() },
2187
+ ...e().filter(E).map((s) => ({
2188
+ value: s.label.toLowerCase(),
2189
+ content: () => (() => {
2190
+ const [r, a] = g(Zs), h = a.nextNode();
2191
+ return L(h, s.label), r;
2192
+ })()
2193
+ }))
2194
+ ];
2195
+ }
2196
+ render() {
2197
+ const { radioGroupClass: t } = this.$props;
2198
+ return J({
2199
+ value: this.Cd.bind(this),
2200
+ options: this.Dd.bind(this),
2201
+ radioGroupClass: t,
2202
+ onChange: this.Hc.bind(this)
2203
+ });
2204
+ }
2205
+ }
2206
+ n(qt, "el", u({
2207
+ tagName: "media-captions-menu-items",
2208
+ props: {
2209
+ offLabel: "Off",
2210
+ radioClass: null,
2211
+ radioGroupClass: null,
2212
+ radioCheckClass: null
2213
+ }
2214
+ })), n(qt, "register", [N, Z]);
2215
+ class qs extends X {
2216
+ render() {
2217
+ const { label: i } = this.$props;
2218
+ return lt({
2219
+ label: i,
2220
+ iconPaths: Xt
2221
+ });
2222
+ }
2223
+ }
2224
+ n(qs, "el", u({
2225
+ tagName: "media-captions-menu-button",
2226
+ props: { disabled: !1, label: "Captions" }
2227
+ }));
2228
+ const Ks = /* @__PURE__ */ p('<!$><span part="label"><!$></span>');
2229
+ class Kt extends U {
2230
+ constructor(t) {
2231
+ super(t);
2232
+ n(this, "j");
2233
+ this.j = C();
2234
+ }
2235
+ onConnect(t) {
2236
+ l(this.Ed.bind(this));
2237
+ const { radioClass: e, radioCheckClass: s } = this.$props;
2238
+ new Q(t).dc("media-radio", e).dc('[part="check"]', s);
2239
+ }
2240
+ Ed() {
2241
+ const { normalLabel: t } = this.$props, { playbackRate: e } = this.j.$store, s = e();
2242
+ this.md.fd.set(s === 1 ? t() : s + "×");
2243
+ }
2244
+ Hc(t) {
2245
+ const e = t.target;
2246
+ this.j.remote.changePlaybackRate(+e.value, t);
2247
+ }
2248
+ Cd() {
2249
+ const { playbackRate: t } = this.j.$store;
2250
+ return t() + "";
2251
+ }
2252
+ Dd() {
2253
+ const { rates: t, normalLabel: e } = this.$props;
2254
+ return t().map((s) => ({
2255
+ value: s + "",
2256
+ content: () => (() => {
2257
+ const [r, a] = g(Ks), h = a.nextNode();
2258
+ return L(h, () => s === 1 ? e() : s + "×"), r;
2259
+ })()
2260
+ }));
2261
+ }
2262
+ render() {
2263
+ const { radioGroupClass: t } = this.$props;
2264
+ return J({
2265
+ value: this.Cd.bind(this),
2266
+ options: this.Dd.bind(this),
2267
+ radioGroupClass: t,
2268
+ onChange: this.Hc.bind(this)
2269
+ });
2270
+ }
2271
+ }
2272
+ n(Kt, "el", u({
2273
+ tagName: "media-playback-rate-menu-items",
2274
+ props: {
2275
+ normalLabel: "Normal",
2276
+ rates: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
2277
+ radioGroupClass: null,
2278
+ radioClass: null,
2279
+ radioCheckClass: null
2280
+ }
2281
+ })), n(Kt, "register", [N, Z]);
2282
+ var Os = '<path d="M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z" fill="currentColor"/> <path d="M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z" fill="currentColor"/>';
2283
+ class Bs extends X {
2284
+ render() {
2285
+ const { label: i } = this.$props;
2286
+ return lt({
2287
+ label: i,
2288
+ iconPaths: Os
2289
+ });
2290
+ }
2291
+ }
2292
+ n(Bs, "el", u({
2293
+ tagName: "media-playback-rate-menu-button",
2294
+ props: { disabled: !1, label: "Speed" }
2295
+ }));
2296
+ const Gs = /* @__PURE__ */ p("<!$><span><!$></span>"), zs = /* @__PURE__ */ p('<!$><span part="label"><!$></span>'), Qs = /* @__PURE__ */ p('<!$><span part="info"><!$></span>');
2297
+ class Ot extends U {
2298
+ constructor(t) {
2299
+ super(t);
2300
+ n(this, "j");
2301
+ n(this, "Gd", P(() => {
2302
+ const { qualities: t } = this.j.$store;
2303
+ return [...t()].sort(
2304
+ (e, s) => s.height === e.height ? s.bitrate - e.bitrate : s.height - e.height
2305
+ );
2306
+ }));
2307
+ this.j = C();
2308
+ }
2309
+ onConnect(t) {
2310
+ l(this.Bd.bind(this)), l(this.Ed.bind(this));
2311
+ const { radioClass: e, radioCheckClass: s } = this.$props;
2312
+ new Q(t).dc("media-radio", e).dc('[part="check"]', s);
2313
+ }
2314
+ Ed() {
2315
+ const { autoLabel: t } = this.$props, { autoQuality: e, quality: s } = this.j.$store, r = s() ? s().height + "p" : "";
2316
+ this.md.fd.set(e() ? t() + ` (${r})` : r);
2317
+ }
2318
+ Bd() {
2319
+ const { qualities: t } = this.j.$store;
2320
+ this.md.Ec(t().length === 0);
2321
+ }
2322
+ mb() {
2323
+ const { canSetQuality: t, qualities: e } = this.j.$store;
2324
+ return !t() || e().length === 0;
2325
+ }
2326
+ Hc(t) {
2327
+ if (this.mb())
2328
+ return;
2329
+ const e = t.target, s = e.value;
2330
+ if (s === "auto") {
2331
+ this.j.remote.changeQuality(-1, t);
2332
+ return;
2333
+ }
2334
+ const { qualities: r } = this.j.$store, a = m(r).findIndex((h) => this.Fd(h) === s);
2335
+ a >= 0 && this.j.remote.changeQuality(a, t);
2336
+ }
2337
+ Cd() {
2338
+ const { quality: t, autoQuality: e } = this.j.$store;
2339
+ if (e())
2340
+ return "auto";
2341
+ const s = t();
2342
+ return s ? this.Fd(s) : "auto";
2343
+ }
2344
+ Fd(t) {
2345
+ return t.height + "_" + t.bitrate;
2346
+ }
2347
+ Dd() {
2348
+ const { autoLabel: t, hideBitrate: e } = this.$props;
2349
+ return [
2350
+ { value: "auto", content: () => (() => {
2351
+ const [s, r] = g(Gs), a = r.nextNode();
2352
+ return L(a, t), s;
2353
+ })() },
2354
+ ...this.Gd().map((s) => {
2355
+ const r = `${A(s.bitrate / 1e6, 2)} Mbps`;
2356
+ return {
2357
+ value: this.Fd(s),
2358
+ content: () => [
2359
+ (() => {
2360
+ const [a, h] = g(zs), c = h.nextNode();
2361
+ return L(c, s.height + "p"), a;
2362
+ })(),
2363
+ (() => {
2364
+ const a = $t(
2365
+ () => !e() && (() => {
2366
+ const [h, c] = g(Qs), d = c.nextNode();
2367
+ return L(d, r), h;
2368
+ })()
2369
+ );
2370
+ return a(), a;
2371
+ })()
2372
+ ]
2373
+ };
2374
+ })
2375
+ ];
2376
+ }
2377
+ render() {
2378
+ const { radioGroupClass: t } = this.$props;
2379
+ return J({
2380
+ value: this.Cd.bind(this),
2381
+ options: this.Dd.bind(this),
2382
+ radioGroupClass: t,
2383
+ onChange: this.Hc.bind(this)
2384
+ });
2385
+ }
2386
+ }
2387
+ n(Ot, "el", u({
2388
+ tagName: "media-quality-menu-items",
2389
+ props: {
2390
+ autoLabel: "Auto",
2391
+ hideBitrate: !1,
2392
+ radioGroupClass: null,
2393
+ radioClass: null,
2394
+ radioCheckClass: null
2395
+ }
2396
+ })), n(Ot, "register", [N, Z]);
2397
+ var Us = '<path d="M18.6669 10.4001C18.6669 10.7683 18.3684 11.0667 18.0002 11.0667H16.2668C15.8987 11.0667 15.6002 10.7683 15.6002 10.4001V9.86674C15.6002 9.7931 15.5405 9.73341 15.4669 9.73341H5.99998C5.63179 9.73341 5.33331 9.43493 5.33331 9.06674V7.33341C5.33331 6.96522 5.63179 6.66674 5.99998 6.66674H15.4669C15.5405 6.66674 15.6002 6.60704 15.6002 6.53341V6.00007C15.6002 5.63188 15.8987 5.3334 16.2668 5.3334H18.0002C18.3684 5.3334 18.6669 5.63188 18.6669 6.00007V10.4001Z" fill="currentColor"/> <path d="M11.3334 18.8668C11.7016 18.8668 12.0001 18.5683 12.0001 18.2001V13.8001C12.0001 13.4319 11.7016 13.1335 11.3334 13.1335H9.60006C9.23187 13.1335 8.93339 13.4319 8.93339 13.8001V14.3335C8.93339 14.4071 8.8737 14.4668 8.80006 14.4668H6.00006C5.63187 14.4668 5.33339 14.7653 5.33339 15.1335V16.8668C5.33339 17.235 5.63187 17.5335 6.00006 17.5335H8.80006C8.8737 17.5335 8.93339 17.5932 8.93339 17.6668V18.2001C8.93339 18.5683 9.23187 18.8668 9.60006 18.8668H11.3334Z" fill="currentColor"/> <path d="M18.6667 26.0001C18.6667 26.3683 18.3682 26.6668 18 26.6668H16.2667C15.8985 26.6668 15.6 26.3683 15.6 26.0001V25.4668C15.6 25.3931 15.5403 25.3334 15.4667 25.3334H6.00014C5.63195 25.3334 5.33348 25.0349 5.33348 24.6668V22.9334C5.33348 22.5652 5.63195 22.2668 6.00014 22.2668H15.4667C15.5403 22.2668 15.6 22.2071 15.6 22.1334V21.6001C15.6 21.2319 15.8985 20.9334 16.2667 20.9334H18C18.3682 20.9334 18.6667 21.2319 18.6667 21.6001V26.0001Z" fill="currentColor"/> <path d="M22 24.6668C22 25.0349 22.2985 25.3334 22.6667 25.3334H26.0001C26.3683 25.3334 26.6668 25.0349 26.6668 24.6668V22.9334C26.6668 22.5652 26.3683 22.2668 26.0001 22.2668H22.6667C22.2985 22.2668 22 22.5652 22 22.9334V24.6668Z" fill="currentColor"/> <path d="M16.0001 17.5335C15.6319 17.5335 15.3334 17.235 15.3334 16.8668V15.1335C15.3334 14.7653 15.6319 14.4668 16.0001 14.4668H26.0001C26.3683 14.4668 26.6667 14.7653 26.6667 15.1335V16.8668C26.6667 17.235 26.3683 17.5335 26.0001 17.5335H16.0001Z" fill="currentColor"/> <path d="M22.0002 9.06674C22.0002 9.43493 22.2987 9.73341 22.6669 9.73341H26C26.3682 9.73341 26.6666 9.43493 26.6666 9.06674V7.3334C26.6666 6.96521 26.3682 6.66674 26 6.66674H22.6669C22.2987 6.66674 22.0002 6.96522 22.0002 7.33341V9.06674Z" fill="currentColor"/>';
2398
+ class Ws extends X {
2399
+ render() {
2400
+ const { label: i } = this.$props;
2401
+ return lt({
2402
+ label: i,
2403
+ iconPaths: Us
2404
+ });
2405
+ }
2406
+ }
2407
+ n(Ws, "el", u({
2408
+ tagName: "media-quality-menu-button",
2409
+ props: { disabled: !1, label: "Quality" }
2410
+ }));
2411
+ class Ys extends j {
2412
+ constructor() {
2413
+ super(...arguments);
2414
+ n(this, "j");
2415
+ n(this, "Id", null);
2416
+ n(this, "Hd", 0);
2417
+ n(this, "Jd", -1);
2418
+ }
2419
+ onAttach() {
2420
+ const { event: t, action: e } = this.$props;
2421
+ this.setAttributes({
2422
+ event: t,
2423
+ action: e
2424
+ });
2425
+ }
2426
+ onConnect() {
2427
+ this.j = C(), rt(() => {
2428
+ this.Id = this.j.player.querySelector("media-outlet"), l(this.Ld.bind(this));
2429
+ });
2430
+ }
2431
+ Ld() {
2432
+ let t = this.$props.event();
2433
+ !this.Id || !t || (/^dbl/.test(t) && (t = t.split(/^dbl/)[1]), $(this.Id, t, this.Md.bind(this)));
2434
+ }
2435
+ Md(t) {
2436
+ var s;
2437
+ if (!this.Nd(t) || Tt(t) && (t.button !== 0 || this.j.activeMenu))
2438
+ return;
2439
+ if (t.MEDIA_GESTURE = !0, t.preventDefault(), !((s = m(this.$props.event)) == null ? void 0 : s.startsWith("dbl")))
2440
+ this.Hd === 0 && setTimeout(() => {
2441
+ this.Hd === 1 && this.Kd(t);
2442
+ }, 250);
2443
+ else if (this.Hd === 1) {
2444
+ queueMicrotask(() => this.Kd(t)), clearTimeout(this.Jd), this.Hd = 0;
2445
+ return;
2446
+ }
2447
+ this.Hd === 0 && (this.Jd = window.setTimeout(() => {
2448
+ this.Hd = 0;
2449
+ }, 275)), this.Hd++;
2450
+ }
2451
+ Kd(t) {
2452
+ this.el.setAttribute("data-triggered", ""), requestAnimationFrame(() => {
2453
+ this.Od() && this.Pd(m(this.$props.action), t), requestAnimationFrame(() => {
2454
+ this.el.removeAttribute("data-triggered");
2455
+ });
2456
+ });
2457
+ }
2458
+ /** Validate event occurred in gesture bounds. */
2459
+ Nd(t) {
2460
+ if (!this.el)
2461
+ return !1;
2462
+ if (Tt(t) || be(t) || Mt(t)) {
2463
+ const e = Mt(t) ? t.touches[0] : void 0, s = (e == null ? void 0 : e.clientX) ?? t.clientX, r = (e == null ? void 0 : e.clientY) ?? t.clientY, a = this.el.getBoundingClientRect(), h = r >= a.top && r <= a.bottom && s >= a.left && s <= a.right;
2464
+ return t.type.includes("leave") ? !h : h;
2465
+ }
2466
+ return !0;
2467
+ }
2468
+ /** Validate gesture has the highest z-index in this triggered group. */
2469
+ Od() {
2470
+ var e;
2471
+ const t = this.j.player.querySelectorAll(
2472
+ "media-gesture[data-triggered]"
2473
+ );
2474
+ return ((e = Array.from(t).sort(
2475
+ (s, r) => +getComputedStyle(r).zIndex - +getComputedStyle(s).zIndex
2476
+ )[0]) == null ? void 0 : e.component) === this;
2477
+ }
2478
+ Pd(t, e) {
2479
+ if (!t)
2480
+ return;
2481
+ const [s, r] = t.replace(/:([a-z])/, "-$1").split(":");
2482
+ t.includes(":fullscreen") ? this.j.remote.toggleFullscreen("prefer-media", e) : t.includes("seek:") ? this.j.remote.seek(m(this.j.$store.currentTime) + (+r || 0), e) : this.j.remote[me(s)](e);
2483
+ }
2484
+ }
2485
+ n(Ys, "el", u({
2486
+ tagName: "media-gesture",
2487
+ props: {
2488
+ event: void 0,
2489
+ action: void 0
2490
+ }
2491
+ }));
2492
+ const Xs = /* @__PURE__ */ p('<!$><svg part="icon" fill="none" viewBox="0 0 120 120" aria-hidden="true"><circle part="track" cx="60" cy="60" r="54" stroke="currentColor"></circle><circle part="track-fill" cx="60" cy="60" r="54" stroke="currentColor" pathLength="100"></circle></svg>');
2493
+ class Js extends j {
2494
+ constructor() {
2495
+ super(...arguments);
2496
+ n(this, "j");
2497
+ }
2498
+ onAttach() {
2499
+ this.j = C(), this.setAttributes({
2500
+ "data-buffering": P(this.Qd.bind(this))
2501
+ });
2502
+ }
2503
+ Qd() {
2504
+ const { canPlay: t, waiting: e } = this.j.$store;
2505
+ return !t() || e();
2506
+ }
2507
+ render() {
2508
+ return st(Xs);
2509
+ }
2510
+ }
2511
+ n(Js, "el", u({
2512
+ tagName: "media-buffering-indicator"
2513
+ }));
2514
+ class ti {
2515
+ constructor(i) {
2516
+ n(this, "priority", 10);
2517
+ n(this, "ya", null);
2518
+ n(this, "ih", we());
2519
+ this.Sd = i;
2520
+ }
2521
+ attach() {
2522
+ }
2523
+ canRender() {
2524
+ return !0;
2525
+ }
2526
+ detach() {
2527
+ this.ih.empty(), this.Sd.reset(), this.ya = null;
2528
+ }
2529
+ changeTrack(i) {
2530
+ !i || this.ya === i || (this.ih.empty(), i.readyState < 2 ? (this.Sd.reset(), this.ih.add(
2531
+ $(i, "load", () => this.jh(i), { once: !0 })
2532
+ )) : this.jh(i), this.ih.add(
2533
+ $(i, "add-cue", (t) => {
2534
+ this.Sd.addCue(t.detail);
2535
+ }),
2536
+ $(i, "remove-cue", (t) => {
2537
+ this.Sd.removeCue(t.detail);
2538
+ })
2539
+ ), this.ya = i);
2540
+ }
2541
+ jh(i) {
2542
+ this.Sd.changeTrack({
2543
+ cues: [...i.cues],
2544
+ regions: [...i.regions]
2545
+ });
2546
+ }
2547
+ }
2548
+ class ei extends j {
2549
+ constructor() {
2550
+ super(...arguments);
2551
+ n(this, "j");
2552
+ n(this, "Sd");
2553
+ n(this, "Rd");
2554
+ }
2555
+ onAttach() {
2556
+ this.j = C(), this.setAttributes({
2557
+ "aria-hidden": V(this.jb.bind(this))
2558
+ });
2559
+ }
2560
+ onConnect(t) {
2561
+ this.Sd = new ke(t), this.Rd = new ti(this.Sd), l(this.Ud.bind(this));
2562
+ }
2563
+ onDisconnect() {
2564
+ var t;
2565
+ this.Rd && (this.Rd.detach(), this.j.textRenderers.remove(this.Rd)), (t = this.Sd) == null || t.destroy();
2566
+ }
2567
+ jb() {
2568
+ const { textTrack: t } = this.j.$store, e = t();
2569
+ return !e || !E(e);
2570
+ }
2571
+ Ud() {
2572
+ const { viewType: t } = this.j.$store;
2573
+ return t() === "audio" ? this.Vd() : this.Wd();
2574
+ }
2575
+ Vd() {
2576
+ return l(this.oc.bind(this)), () => {
2577
+ this.el.textContent = "";
2578
+ };
2579
+ }
2580
+ oc() {
2581
+ if (this.jb())
2582
+ return;
2583
+ const { textTrack: t } = this.j.$store;
2584
+ this.Td(), $(t(), "cue-change", this.Td.bind(this)), l(this.Xd.bind(this));
2585
+ }
2586
+ Td() {
2587
+ this.el.textContent = "";
2588
+ const { currentTime: t, textTrack: e } = this.j.$store, s = m(t), r = m(e).activeCues;
2589
+ for (const a of r) {
2590
+ const h = document.createElement("div");
2591
+ h.setAttribute("part", "cue"), h.innerHTML = ye(a, s), this.el.append(h);
2592
+ }
2593
+ }
2594
+ Xd() {
2595
+ const { currentTime: t } = this.j.$store;
2596
+ _e(this.el, t());
2597
+ }
2598
+ Wd() {
2599
+ return l(this.Yd.bind(this)), l(this.Zd.bind(this)), this.j.textRenderers.add(this.Rd), () => {
2600
+ this.el.textContent = "", this.Rd.detach(), this.j.textRenderers.remove(this.Rd);
2601
+ };
2602
+ }
2603
+ Yd() {
2604
+ this.Sd.dir = this.$props.textDir();
2605
+ }
2606
+ Zd() {
2607
+ if (this.jb())
2608
+ return;
2609
+ const { currentTime: t } = this.j.$store;
2610
+ this.Sd.currentTime = t();
2611
+ }
2612
+ }
2613
+ n(ei, "el", u({
2614
+ tagName: "media-captions",
2615
+ props: { textDir: "ltr" }
2616
+ }));
2617
+ const si = /* @__PURE__ */ p('<!$><div part="container"><div part="text">LIVE</div></div>');
2618
+ class ii extends j {
2619
+ constructor(t) {
2620
+ super(t);
2621
+ n(this, "j");
2622
+ this.j = C(), new D(t);
2623
+ }
2624
+ onAttach(t) {
2625
+ const { live: e, liveEdge: s } = this.j.$store;
2626
+ R(t, this.ib.bind(this)), this.setAttributes({
2627
+ tabindex: this._d.bind(this),
2628
+ role: this.$d.bind(this),
2629
+ "data-live": e,
2630
+ "data-live-edge": s,
2631
+ "data-media-button": !0
2632
+ });
2633
+ }
2634
+ onConnect(t) {
2635
+ B(t, this.gb.bind(this));
2636
+ }
2637
+ ib() {
2638
+ const { live: t } = this.j.$store;
2639
+ return t() ? "Go live" : null;
2640
+ }
2641
+ _d() {
2642
+ const { live: t } = this.j.$store;
2643
+ return t() ? 0 : null;
2644
+ }
2645
+ $d() {
2646
+ const { live: t } = this.j.$store;
2647
+ return t() ? "button" : null;
2648
+ }
2649
+ gb(t) {
2650
+ const { liveEdge: e } = this.j.$store;
2651
+ e() || this.j.remote.seekToLiveEdge(t);
2652
+ }
2653
+ render() {
2654
+ return st(si);
2655
+ }
2656
+ }
2657
+ n(ii, "el", u({
2658
+ tagName: "media-live-indicator"
2659
+ }));
2660
+ const ri = /* @__PURE__ */ p('<!$><img part="img" />');
2661
+ class ni extends j {
2662
+ constructor() {
2663
+ super(...arguments);
2664
+ n(this, "j");
2665
+ n(this, "ae", f(!0));
2666
+ n(this, "be", f(!1));
2667
+ n(this, "ce");
2668
+ n(this, "de");
2669
+ }
2670
+ onAttach(t) {
2671
+ this.j = C(), this.ce = P(this.ee.bind(this)), this.de = this.fe.bind(this), this.setAttributes({
2672
+ "data-loading": this.ae,
2673
+ "aria-hidden": V(this.jb.bind(this))
2674
+ });
2675
+ }
2676
+ onConnect(t) {
2677
+ const { canLoad: e, poster: s } = this.j.$store;
2678
+ window.requestAnimationFrame(() => {
2679
+ e() || he(s());
2680
+ }), l(this.ge.bind(this));
2681
+ }
2682
+ jb() {
2683
+ const { poster: t } = this.j.$store;
2684
+ return this.be() || !t();
2685
+ }
2686
+ ee() {
2687
+ const { canLoad: t, poster: e } = this.j.$store;
2688
+ return t() && e().length ? e() : null;
2689
+ }
2690
+ fe() {
2691
+ return this.ce() ? this.$props.alt() : null;
2692
+ }
2693
+ ge() {
2694
+ const { canLoad: t, poster: e } = this.j.$store, s = t() && !!e();
2695
+ this.ae.set(s), this.be.set(!1);
2696
+ }
2697
+ he() {
2698
+ this.ae.set(!1);
2699
+ }
2700
+ Wb() {
2701
+ this.ae.set(!1), this.be.set(!0);
2702
+ }
2703
+ render() {
2704
+ const { crossorigin: t } = this.j.$store;
2705
+ return (() => {
2706
+ const [e, s] = g(ri);
2707
+ return _(() => v(e, "src", this.ce())), _(() => v(e, "alt", this.de())), _(() => v(e, "crossorigin", t())), O(e, "load", this.he.bind(this)), O(e, "error", this.Wb.bind(this)), e;
2708
+ })();
2709
+ }
2710
+ }
2711
+ n(ni, "el", u({
2712
+ tagName: "media-poster",
2713
+ props: { alt: void 0 }
2714
+ }));
2715
+ const ai = /* @__PURE__ */ p("<!$><span><!$></span>");
2716
+ class oi extends j {
2717
+ constructor() {
2718
+ super(...arguments);
2719
+ n(this, "j");
2720
+ n(this, "ie");
2721
+ }
2722
+ onAttach() {
2723
+ this.j = C(), this.ie = P(this.Mb.bind(this));
2724
+ }
2725
+ Mb() {
2726
+ const { type: t, remainder: e, padHours: s, padMinutes: r, showHours: a } = this.$props, h = this.je(t()), c = this.j.$store.duration();
2727
+ if (!Number.isFinite(h + c))
2728
+ return "LIVE";
2729
+ const d = e() ? Math.max(0, c - h) : h;
2730
+ return ct(
2731
+ d,
2732
+ s(),
2733
+ xt(r()) ? d >= 3600 : r(),
2734
+ a()
2735
+ );
2736
+ }
2737
+ je(t) {
2738
+ const { bufferedEnd: e, duration: s, currentTime: r } = this.j.$store;
2739
+ switch (t) {
2740
+ case "buffered":
2741
+ return e();
2742
+ case "duration":
2743
+ return s();
2744
+ default:
2745
+ return r();
2746
+ }
2747
+ }
2748
+ render() {
2749
+ return (() => {
2750
+ const [t, e] = g(ai), s = e.nextNode();
2751
+ return L(s, this.ie), t;
2752
+ })();
2753
+ }
2754
+ }
2755
+ n(oi, "el", u({
2756
+ tagName: "media-time",
2757
+ props: {
2758
+ type: "current",
2759
+ showHours: !1,
2760
+ padHours: null,
2761
+ padMinutes: null,
2762
+ remainder: !1
2763
+ }
2764
+ }));
2765
+ function hi(o, i) {
2766
+ let t = o.getBoundingClientRect(), e = {
2767
+ "--computed-width": t.width + "px",
2768
+ "--computed-height": t.height + "px",
2769
+ "--preview-width": "var(--media-slider-preview-width, var(--computed-width))",
2770
+ "--preview-height": "var(--media-slider-preview-height, var(--computed-height))"
2771
+ };
2772
+ i !== "vertical" ? e = {
2773
+ ...e,
2774
+ "--preview-width-half": "calc(var(--preview-width) / 2)",
2775
+ "--preview-left-clamp": "max(var(--preview-width-half), var(--slider-pointer-percent))",
2776
+ "--preview-right-clamp": "calc(100% - var(--preview-width-half))",
2777
+ "--preview-left": "min(var(--preview-left-clamp), var(--preview-right-clamp))"
2778
+ } : e = {
2779
+ ...e,
2780
+ "--preview-height-half": "calc(var(--preview-height) / 2)",
2781
+ "--preview-top-clamp": "max(var(--preview-height-half), var(--slider-pointer-percent))",
2782
+ "--preview-bottom-clamp": "calc(100% - var(--preview-height-half))",
2783
+ "--preview-bottom": "min(var(--preview-top-clamp), var(--preview-bottom-clamp))"
2784
+ };
2785
+ for (const s of Object.keys(e))
2786
+ o.style.setProperty(s, e[s]);
2787
+ }
2788
+ var ci = /* @__PURE__ */ Object.freeze({
2789
+ __proto__: null,
2790
+ setupPreviewStyles: hi
2791
+ });
2792
+ export {
2793
+ Fs as A,
2794
+ Js as B,
2795
+ Fe as C,
2796
+ D as F,
2797
+ Ys as G,
2798
+ w as I,
2799
+ ii as L,
2800
+ ze as M,
2801
+ ni as P,
2802
+ Ws as Q,
2803
+ N as R,
2804
+ Je as S,
2805
+ Ae as T,
2806
+ ps as V,
2807
+ Ht as a,
2808
+ Ie as b,
2809
+ Yt as c,
2810
+ We as d,
2811
+ Ke as e,
2812
+ _t as f,
2813
+ Cs as g,
2814
+ Rt as h,
2815
+ us as i,
2816
+ ls as j,
2817
+ oi as k,
2818
+ F as l,
2819
+ ei as m,
2820
+ Lt as n,
2821
+ X as o,
2822
+ U as p,
2823
+ Z as q,
2824
+ Zt as r,
2825
+ qs as s,
2826
+ qt as t,
2827
+ Ft as u,
2828
+ Ot as v,
2829
+ Bs as w,
2830
+ Kt as x,
2831
+ Le as y
2832
+ };