@linktr.ee/messaging-react 1.28.0-rc-1776225927 → 1.28.0-rc-1776231821

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 (49) hide show
  1. package/dist/{Creator-D38dWn2X.js → Creator-BFpHsh2u.js} +23 -23
  2. package/dist/Creator-BFpHsh2u.js.map +1 -0
  3. package/dist/MediaPlayer-DXz4IBLx.js +313 -0
  4. package/dist/MediaPlayer-DXz4IBLx.js.map +1 -0
  5. package/dist/{Visitor-BG-9-3HU.js → Visitor-C1Fcrgd6.js} +5 -5
  6. package/dist/Visitor-C1Fcrgd6.js.map +1 -0
  7. package/dist/assets/index.css +1 -1
  8. package/dist/index.d.ts +8 -12
  9. package/dist/index.js +27 -35
  10. package/dist/index.js.map +1 -1
  11. package/package.json +1 -2
  12. package/src/components/CustomMessage/index.tsx +0 -1
  13. package/src/components/LockedAttachment/components/Creator.tsx +2 -8
  14. package/src/components/LockedAttachment/components/MediaPlayer.tsx +50 -28
  15. package/src/components/LockedAttachment/components/Visitor.tsx +3 -6
  16. package/src/components/LockedAttachment/index.tsx +7 -7
  17. package/src/components/LockedAttachment/types.ts +0 -3
  18. package/dist/Creator-D38dWn2X.js.map +0 -1
  19. package/dist/MediaPlayer-DE9MC6k6.js +0 -599
  20. package/dist/MediaPlayer-DE9MC6k6.js.map +0 -1
  21. package/dist/Preview-DqAv16NS.js +0 -87
  22. package/dist/Preview-DqAv16NS.js.map +0 -1
  23. package/dist/Visitor-BG-9-3HU.js.map +0 -1
  24. package/dist/dash.all.min-Duv4lvGS.js +0 -18858
  25. package/dist/dash.all.min-Duv4lvGS.js.map +0 -1
  26. package/dist/hls-Bogc7CBn.js +0 -21710
  27. package/dist/hls-Bogc7CBn.js.map +0 -1
  28. package/dist/index-Da-xN4Yq.js +0 -16142
  29. package/dist/index-Da-xN4Yq.js.map +0 -1
  30. package/dist/index-Dj9rqWcU.js +0 -69
  31. package/dist/index-Dj9rqWcU.js.map +0 -1
  32. package/dist/mixin-B6jYfIcp.js +0 -808
  33. package/dist/mixin-B6jYfIcp.js.map +0 -1
  34. package/dist/react-BxlQMOfz.js +0 -419
  35. package/dist/react-BxlQMOfz.js.map +0 -1
  36. package/dist/react-COAP-MIW.js +0 -377
  37. package/dist/react-COAP-MIW.js.map +0 -1
  38. package/dist/react-Cn4WlMcl.js +0 -3108
  39. package/dist/react-Cn4WlMcl.js.map +0 -1
  40. package/dist/react-CwTJArKY.js +0 -459
  41. package/dist/react-CwTJArKY.js.map +0 -1
  42. package/dist/react-DkfS_atT.js +0 -373
  43. package/dist/react-DkfS_atT.js.map +0 -1
  44. package/dist/react-Pea5fum1.js +0 -286
  45. package/dist/react-Pea5fum1.js.map +0 -1
  46. package/dist/react-RiBbsUDd.js +0 -534
  47. package/dist/react-RiBbsUDd.js.map +0 -1
  48. package/dist/react-dS1WBxxz.js +0 -238
  49. package/dist/react-dS1WBxxz.js.map +0 -1
@@ -1,599 +0,0 @@
1
- import { jsxs as V, jsx as u } from "react/jsx-runtime";
2
- import { FileIcon as Q, ImageIcon as le, SpeakerHighIcon as ie, VideoCameraIcon as oe, FileMdIcon as ce, FileTextIcon as se, FileZipIcon as ue, FilePptIcon as de, FileCsvIcon as me, FileXlsIcon as fe, FileDocIcon as ye, FilePdfIcon as he, CircleNotchIcon as ve, PlayIcon as Y, PauseIcon as we } from "@phosphor-icons/react";
3
- import b, { lazy as P, useRef as O, useEffect as N, useCallback as K, useState as _, Suspense as Pe } from "react";
4
- const be = [
5
- [/pdf/, "pdf"],
6
- [/wordprocessingml|msword|\.doc/, "doc"],
7
- [/spreadsheetml|ms-excel|\.xls/, "xls"],
8
- [/csv/, "csv"],
9
- [/presentationml|ms-powerpoint|\.ppt/, "ppt"],
10
- [/zip|x-rar|x-7z|x-tar|x-gzip/, "zip"],
11
- [/plain|rtf/, "text"],
12
- [/markdown/, "markdown"]
13
- ];
14
- function ee(e) {
15
- return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
16
- }
17
- function pe(e) {
18
- const a = be.find(
19
- ([c]) => c.test(e)
20
- );
21
- return a ? a[1] : "generic";
22
- }
23
- const ge = {
24
- video: oe,
25
- audio: ie,
26
- image: le,
27
- document: Q
28
- }, ke = {
29
- pdf: he,
30
- doc: ye,
31
- xls: fe,
32
- csv: me,
33
- ppt: de,
34
- zip: ue,
35
- text: se,
36
- markdown: ce,
37
- generic: Q
38
- };
39
- function Ie(e) {
40
- const a = ee(e);
41
- return a !== "document" ? ge[a] : ke[pe(e)];
42
- }
43
- function xe(e, a) {
44
- return b.createElement(Ie(e), a);
45
- }
46
- const te = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i, Z = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i, G = /\.(m3u8)($|\?)/i, Ee = /\.(mpd)($|\?)/i, _e = /stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/, Ne = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//, Te = /vimeo\.com\/(?!progressive_redirect).+/, Re = /(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/, Me = /open\.spotify\.com\/(\w+)\/(\w+)/i, Se = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+|(videos?\/|\?video=)\d+)($|\?)/, Ae = /tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/, z = (e, a) => {
47
- if (Array.isArray(e)) {
48
- for (const c of e)
49
- if (typeof c == "string" && z(c, a) || z(c.src, a))
50
- return !0;
51
- return !1;
52
- }
53
- return a(e);
54
- }, w = {
55
- html: (e) => z(e, (a) => te.test(a) || Z.test(a)),
56
- hls: (e) => z(e, (a) => G.test(a)),
57
- dash: (e) => z(e, (a) => Ee.test(a)),
58
- mux: (e) => _e.test(e),
59
- youtube: (e) => Ne.test(e),
60
- vimeo: (e) => Te.test(e) && !Z.test(e) && !G.test(e),
61
- wistia: (e) => Re.test(e),
62
- spotify: (e) => Me.test(e),
63
- twitch: (e) => Se.test(e),
64
- tiktok: (e) => Ae.test(e)
65
- }, Ce = b.forwardRef((e, a) => {
66
- const c = te.test(`${e.src}`) ? "audio" : "video";
67
- return /* @__PURE__ */ b.createElement(c, { ...e, ref: a }, e.children);
68
- });
69
- var Le = Ce;
70
- const Oe = [
71
- {
72
- key: "hls",
73
- name: "hls.js",
74
- canPlay: w.hls,
75
- canEnablePIP: () => !0,
76
- player: P(
77
- () => import(
78
- /* webpackChunkName: 'reactPlayerHls' */
79
- "./react-Pea5fum1.js"
80
- )
81
- )
82
- },
83
- {
84
- key: "dash",
85
- name: "dash.js",
86
- canPlay: w.dash,
87
- canEnablePIP: () => !0,
88
- player: P(
89
- () => import(
90
- /* webpackChunkName: 'reactPlayerDash' */
91
- "./react-dS1WBxxz.js"
92
- )
93
- )
94
- },
95
- {
96
- key: "mux",
97
- name: "Mux",
98
- canPlay: w.mux,
99
- canEnablePIP: () => !0,
100
- player: P(
101
- () => import(
102
- /* webpackChunkName: 'reactPlayerMux' */
103
- "./index-Da-xN4Yq.js"
104
- )
105
- )
106
- },
107
- {
108
- key: "youtube",
109
- name: "YouTube",
110
- canPlay: w.youtube,
111
- player: P(
112
- () => import(
113
- /* webpackChunkName: 'reactPlayerYouTube' */
114
- "./react-RiBbsUDd.js"
115
- )
116
- )
117
- },
118
- {
119
- key: "vimeo",
120
- name: "Vimeo",
121
- canPlay: w.vimeo,
122
- player: P(
123
- () => import(
124
- /* webpackChunkName: 'reactPlayerVimeo' */
125
- "./react-Cn4WlMcl.js"
126
- )
127
- )
128
- },
129
- {
130
- key: "wistia",
131
- name: "Wistia",
132
- canPlay: w.wistia,
133
- canEnablePIP: () => !0,
134
- player: P(
135
- () => import(
136
- /* webpackChunkName: 'reactPlayerWistia' */
137
- "./react-CwTJArKY.js"
138
- )
139
- )
140
- },
141
- {
142
- key: "spotify",
143
- name: "Spotify",
144
- canPlay: w.spotify,
145
- canEnablePIP: () => !1,
146
- player: P(
147
- () => import(
148
- /* webpackChunkName: 'reactPlayerSpotify' */
149
- "./react-COAP-MIW.js"
150
- )
151
- )
152
- },
153
- {
154
- key: "twitch",
155
- name: "Twitch",
156
- canPlay: w.twitch,
157
- canEnablePIP: () => !1,
158
- player: P(
159
- () => import(
160
- /* webpackChunkName: 'reactPlayerTwitch' */
161
- "./react-BxlQMOfz.js"
162
- )
163
- )
164
- },
165
- {
166
- key: "tiktok",
167
- name: "TikTok",
168
- canPlay: w.tiktok,
169
- canEnablePIP: () => !1,
170
- player: P(
171
- () => import(
172
- /* webpackChunkName: 'reactPlayerTiktok' */
173
- "./react-DkfS_atT.js"
174
- )
175
- )
176
- },
177
- {
178
- key: "html",
179
- name: "html",
180
- canPlay: w.html,
181
- canEnablePIP: () => !0,
182
- player: Le
183
- }
184
- ];
185
- var B = Oe;
186
- const Fe = {
187
- // Falsy values don't need to be defined
188
- //
189
- // native video attrs
190
- // src: undefined,
191
- // preload: undefined,
192
- // crossOrigin: undefined,
193
- // autoPlay: false,
194
- // muted: false,
195
- // loop: false,
196
- // controls: false,
197
- // playsInline: false,
198
- // disableRemotePlayback: false,
199
- width: "320px",
200
- height: "180px",
201
- // native video props
202
- volume: 1,
203
- playbackRate: 1,
204
- // custom props
205
- // playing: undefined,
206
- // pip: false,
207
- // light: false,
208
- // fallback: null,
209
- previewTabIndex: 0,
210
- previewAriaLabel: "",
211
- oEmbedUrl: "https://noembed.com/embed?url={url}"
212
- }, ae = b.forwardRef((e, a) => {
213
- const { playing: c, pip: m } = e, o = e.activePlayer, l = O(null), i = O(!0);
214
- N(() => {
215
- var n, s;
216
- l.current && (l.current.paused && c === !0 && l.current.play(), !l.current.paused && c === !1 && l.current.pause(), l.current.playbackRate = (n = e.playbackRate) != null ? n : 1, l.current.volume = (s = e.volume) != null ? s : 1);
217
- }), N(() => {
218
- var n, s, d, y, g;
219
- if (!(!l.current || !globalThis.document)) {
220
- if (m && !document.pictureInPictureElement)
221
- try {
222
- (s = (n = l.current).requestPictureInPicture) == null || s.call(n);
223
- } catch {
224
- }
225
- if (!m && document.pictureInPictureElement)
226
- try {
227
- (y = (d = l.current).exitPictureInPicture) == null || y.call(d), (g = document.exitPictureInPicture) == null || g.call(document);
228
- } catch {
229
- }
230
- }
231
- }, [m]);
232
- const S = (n) => {
233
- var s, d;
234
- i.current = !0, (s = e.onReady) == null || s.call(e), (d = e.onLoadStart) == null || d.call(e, n);
235
- }, p = (n) => {
236
- var s, d;
237
- i.current && (i.current = !1, (s = e.onStart) == null || s.call(e, n)), (d = e.onPlay) == null || d.call(e, n);
238
- };
239
- if (!o)
240
- return null;
241
- const T = {}, F = ["onReady", "onStart"];
242
- for (const n in e)
243
- n.startsWith("on") && !F.includes(n) && (T[n] = e[n]);
244
- return /* @__PURE__ */ b.createElement(
245
- o,
246
- {
247
- ...T,
248
- style: e.style,
249
- className: e.className,
250
- slot: e.slot,
251
- ref: K(
252
- (n) => {
253
- l.current = n, typeof a == "function" ? a(n) : a !== null && (a.current = n);
254
- },
255
- [a]
256
- ),
257
- src: e.src,
258
- crossOrigin: e.crossOrigin,
259
- preload: e.preload,
260
- controls: e.controls,
261
- muted: e.muted,
262
- autoPlay: e.autoPlay,
263
- loop: e.loop,
264
- playsInline: e.playsInline,
265
- disableRemotePlayback: e.disableRemotePlayback,
266
- config: e.config,
267
- onLoadStart: S,
268
- onPlay: p
269
- },
270
- e.children
271
- );
272
- });
273
- ae.displayName = "Player";
274
- var He = ae;
275
- const De = P(() => import(
276
- /* webpackChunkName: 'reactPlayerPreview' */
277
- "./Preview-DqAv16NS.js"
278
- )), U = [], Ue = (e, a) => {
279
- const c = (o) => {
280
- for (const l of [...U, ...e])
281
- if (o && l.canPlay(o))
282
- return l;
283
- return a || null;
284
- }, m = b.forwardRef((o, l) => {
285
- const i = { ...Fe, ...o }, { src: S, slot: p, className: T, style: F, width: n, height: s, fallback: d, wrapper: y } = i, [g, f] = _(!!i.light);
286
- N(() => {
287
- i.light ? f(!0) : f(!1);
288
- }, [i.light]);
289
- const $ = (E) => {
290
- var h;
291
- f(!1), (h = i.onClickPreview) == null || h.call(i, E);
292
- }, W = (E) => {
293
- if (!E) return null;
294
- const { light: h, playIcon: k, previewTabIndex: v, oEmbedUrl: I, previewAriaLabel: R } = i;
295
- return /* @__PURE__ */ b.createElement(
296
- De,
297
- {
298
- src: E,
299
- light: h,
300
- playIcon: k,
301
- previewTabIndex: v,
302
- previewAriaLabel: R,
303
- oEmbedUrl: I,
304
- onClickPreview: $
305
- }
306
- );
307
- }, X = (E) => {
308
- var h, k;
309
- const v = c(E);
310
- if (!v) return null;
311
- const { style: I, width: R, height: x, wrapper: A } = i, C = (h = i.config) == null ? void 0 : h[v.key];
312
- return /* @__PURE__ */ b.createElement(
313
- He,
314
- {
315
- ...i,
316
- ref: l,
317
- activePlayer: (k = v.player) != null ? k : v,
318
- slot: A ? void 0 : p,
319
- className: A ? void 0 : T,
320
- style: A ? { display: "block", width: "100%", height: "100%" } : { display: "block", width: R, height: x, ...I },
321
- config: C
322
- }
323
- );
324
- }, H = y ?? J, q = d === !1 ? J : Pe;
325
- return /* @__PURE__ */ b.createElement(H, { slot: p, className: T, style: { width: n, height: s, ...F } }, /* @__PURE__ */ b.createElement(q, { fallback: d }, g ? W(S) : X(S)));
326
- });
327
- return m.displayName = "ReactPlayer", m.addCustomPlayer = (o) => {
328
- U.push(o);
329
- }, m.removeCustomPlayers = () => {
330
- U.length = 0;
331
- }, m.canPlay = (o) => {
332
- if (o) {
333
- for (const l of [...U, ...e])
334
- if (l.canPlay(o))
335
- return !0;
336
- }
337
- return !1;
338
- }, m.canEnablePIP = (o) => {
339
- var l;
340
- if (o) {
341
- for (const i of [...U, ...e])
342
- if (i.canPlay(o) && ((l = i.canEnablePIP) != null && l.call(i)))
343
- return !0;
344
- }
345
- return !1;
346
- }, m;
347
- }, J = ({ children: e }) => e, ze = B[B.length - 1];
348
- var $e = Ue(B, ze);
349
- const We = (e, a) => e === "audio" && !a ? "bg-black/5" : "bg-black";
350
- function Xe(e) {
351
- var a, c;
352
- return "touches" in e ? ((a = e.touches[0]) == null ? void 0 : a.clientX) ?? ((c = e.changedTouches[0]) == null ? void 0 : c.clientX) ?? 0 : e.clientX;
353
- }
354
- const Ve = ({
355
- source: e,
356
- mimeType: a,
357
- poster: c,
358
- autoPlay: m = !1,
359
- playing: o,
360
- loop: l = !1,
361
- controls: i = !0,
362
- showProgress: S = !1,
363
- onContainerClick: p,
364
- muted: T = !1
365
- }) => {
366
- const F = ee(a), [n, s] = _(m), d = O(o);
367
- N(() => {
368
- o !== void 0 && o !== d.current && (d.current = o, s(o));
369
- }, [o]);
370
- const [y, g] = _(0), [f, $] = _(!1), [W, X] = _(!1), [H, q] = _(null), [E, h] = _(!1), [k, v] = _(!1), I = O(null), R = O(null), x = O(null);
371
- N(() => {
372
- v(!1);
373
- }, [e]), N(() => {
374
- if (!n) {
375
- x.current !== null && (cancelAnimationFrame(x.current), x.current = null);
376
- return;
377
- }
378
- const t = () => {
379
- const r = I.current;
380
- r && r.duration && !f && g(r.currentTime / r.duration), x.current = requestAnimationFrame(t);
381
- };
382
- return x.current = requestAnimationFrame(t), () => {
383
- x.current !== null && cancelAnimationFrame(x.current);
384
- };
385
- }, [n, f]), N(() => {
386
- const t = I.current;
387
- t && (n ? t.play().catch((r) => {
388
- s(!1), v(!0);
389
- }) : t.pause());
390
- }, [n]);
391
- const A = K(() => {
392
- v(!1), s(!0);
393
- }, []), C = K(
394
- (t) => {
395
- const r = R.current;
396
- if (!r) return 0;
397
- const L = r.getBoundingClientRect();
398
- return Math.max(
399
- 0,
400
- Math.min(1, (Xe(t) - L.left) / L.width)
401
- );
402
- },
403
- []
404
- ), M = K((t) => {
405
- const r = I.current;
406
- r && r.duration && (r.currentTime = t * r.duration);
407
- }, []), j = (t) => {
408
- t.stopPropagation(), $(!0);
409
- const r = C(t);
410
- g(r), M(r);
411
- };
412
- N(() => {
413
- if (!f) return;
414
- const t = (L) => g(C(L)), r = (L) => {
415
- $(!1), M(C(L));
416
- };
417
- return window.addEventListener("mousemove", t), window.addEventListener("mouseup", r), window.addEventListener("touchmove", t, { passive: !0 }), window.addEventListener("touchend", r), () => {
418
- window.removeEventListener("mousemove", t), window.removeEventListener("mouseup", r), window.removeEventListener("touchmove", t), window.removeEventListener("touchend", r);
419
- };
420
- }, [f, C, M]);
421
- const ne = H ? { aspectRatio: String(H) } : void 0, re = H ? "" : " aspect-video", D = Math.round(y * 100);
422
- return /* @__PURE__ */ V(
423
- "div",
424
- {
425
- role: "button",
426
- tabIndex: 0,
427
- className: `relative cursor-pointer overflow-hidden ${We(F, c)}${re}`,
428
- style: ne,
429
- onClick: () => {
430
- if (!k) {
431
- if (p) {
432
- p();
433
- return;
434
- }
435
- i && s((t) => !t);
436
- }
437
- },
438
- onKeyDown: (t) => {
439
- if (!(t.key !== "Enter" && t.key !== " ") && (t.preventDefault(), !k)) {
440
- if (p) {
441
- p();
442
- return;
443
- }
444
- i && s((r) => !r);
445
- }
446
- },
447
- children: [
448
- c && /* @__PURE__ */ u(
449
- "img",
450
- {
451
- src: c,
452
- alt: "",
453
- className: "absolute inset-0 h-full w-full object-cover"
454
- }
455
- ),
456
- !c && /* @__PURE__ */ u("div", { className: "absolute inset-0 flex items-center justify-center", children: xe(a, {
457
- className: "size-12 text-black/20",
458
- weight: "regular"
459
- }) }),
460
- /* @__PURE__ */ u("div", { className: "absolute inset-0", children: /* @__PURE__ */ u(
461
- $e,
462
- {
463
- ref: I,
464
- src: e,
465
- poster: c,
466
- loop: l,
467
- muted: T,
468
- playsInline: !0,
469
- width: "100%",
470
- height: "100%",
471
- onLoadStart: () => h(!0),
472
- onCanPlay: () => h(!1),
473
- onWaiting: () => h(!0),
474
- onPlay: () => v(!1),
475
- onLoadedMetadata: () => {
476
- const t = I.current;
477
- t && t.videoWidth && t.videoHeight && q(t.videoWidth / t.videoHeight);
478
- },
479
- onEnded: () => {
480
- l || (s(!1), g(0));
481
- }
482
- }
483
- ) }),
484
- E && !k && /* @__PURE__ */ u("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ u(
485
- ve,
486
- {
487
- className: "size-8 animate-spin text-white/80",
488
- weight: "bold"
489
- }
490
- ) }),
491
- k && !i && /* @__PURE__ */ u(
492
- "div",
493
- {
494
- className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
495
- role: "button",
496
- tabIndex: 0,
497
- "aria-label": "Play preview",
498
- onClick: (t) => {
499
- t.stopPropagation(), A();
500
- },
501
- onKeyDown: (t) => {
502
- t.key !== "Enter" && t.key !== " " || (t.preventDefault(), t.stopPropagation(), A());
503
- },
504
- children: /* @__PURE__ */ u("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ u(Y, { className: "size-9 translate-x-0.5", weight: "fill" }) })
505
- }
506
- ),
507
- S && !i && /* @__PURE__ */ u("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ u(
508
- "div",
509
- {
510
- role: "slider",
511
- "aria-label": "Playback position",
512
- "aria-valuenow": D,
513
- "aria-valuemin": 0,
514
- "aria-valuemax": 100,
515
- tabIndex: 0,
516
- ref: R,
517
- className: "relative flex h-4 w-full cursor-pointer items-center",
518
- onMouseDown: j,
519
- onTouchStart: j,
520
- onClick: (t) => t.stopPropagation(),
521
- onKeyDown: (t) => {
522
- t.key === "ArrowRight" && M(Math.min(1, y + 0.05)), t.key === "ArrowLeft" && M(Math.max(0, y - 0.05));
523
- },
524
- children: /* @__PURE__ */ u("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ u(
525
- "div",
526
- {
527
- className: "h-full rounded-full bg-white",
528
- style: { width: `${D}%` }
529
- }
530
- ) })
531
- }
532
- ) }),
533
- i && /* @__PURE__ */ V("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
534
- /* @__PURE__ */ u(
535
- "button",
536
- {
537
- type: "button",
538
- onClick: (t) => {
539
- t.stopPropagation(), s((r) => !r);
540
- },
541
- className: "shrink-0 text-white",
542
- "aria-label": n ? "Pause" : "Play",
543
- children: n ? /* @__PURE__ */ u(we, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ u(Y, { className: "size-5 translate-x-px", weight: "fill" })
544
- }
545
- ),
546
- /* @__PURE__ */ V(
547
- "div",
548
- {
549
- role: "slider",
550
- "aria-label": "Playback position",
551
- "aria-valuenow": D,
552
- "aria-valuemin": 0,
553
- "aria-valuemax": 100,
554
- tabIndex: 0,
555
- ref: R,
556
- className: "relative flex h-4 w-full cursor-pointer items-center",
557
- onMouseDown: j,
558
- onTouchStart: j,
559
- onClick: (t) => t.stopPropagation(),
560
- onMouseEnter: () => X(!0),
561
- onMouseLeave: () => X(!1),
562
- onKeyDown: (t) => {
563
- t.key === "ArrowRight" && M(Math.min(1, y + 0.05)), t.key === "ArrowLeft" && M(Math.max(0, y - 0.05));
564
- },
565
- children: [
566
- /* @__PURE__ */ u(
567
- "div",
568
- {
569
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${W || f ? "h-1.5" : "h-1"}`,
570
- children: /* @__PURE__ */ u(
571
- "div",
572
- {
573
- className: "h-full rounded-full bg-white",
574
- style: { width: `${D}%` }
575
- }
576
- )
577
- }
578
- ),
579
- /* @__PURE__ */ u(
580
- "div",
581
- {
582
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${W || f ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
583
- style: { left: `${D}%` }
584
- }
585
- )
586
- ]
587
- }
588
- )
589
- ] })
590
- ]
591
- }
592
- );
593
- };
594
- export {
595
- Ve as M,
596
- ee as g,
597
- xe as r
598
- };
599
- //# sourceMappingURL=MediaPlayer-DE9MC6k6.js.map