@sudobility/gaming-components 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/achievement-badge.d.ts +33 -0
- package/dist/achievement-badge.d.ts.map +1 -0
- package/dist/achievement-unlock.d.ts +33 -0
- package/dist/achievement-unlock.d.ts.map +1 -0
- package/dist/audio-player.d.ts +35 -0
- package/dist/audio-player.d.ts.map +1 -0
- package/dist/game-controls.d.ts +33 -0
- package/dist/game-controls.d.ts.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +792 -0
- package/dist/index.umd.js +6 -0
- package/dist/lead-scorer.d.ts +18 -0
- package/dist/lead-scorer.d.ts.map +1 -0
- package/dist/leaderboard-podium.d.ts +33 -0
- package/dist/leaderboard-podium.d.ts.map +1 -0
- package/dist/player-stats.d.ts +18 -0
- package/dist/player-stats.d.ts.map +1 -0
- package/dist/podcast-player.d.ts +18 -0
- package/dist/podcast-player.d.ts.map +1 -0
- package/dist/score-board.d.ts +18 -0
- package/dist/score-board.d.ts.map +1 -0
- package/dist/score-display.d.ts +33 -0
- package/dist/score-display.d.ts.map +1 -0
- package/dist/scratch-card.d.ts +33 -0
- package/dist/scratch-card.d.ts.map +1 -0
- package/dist/signature-request.d.ts +18 -0
- package/dist/signature-request.d.ts.map +1 -0
- package/dist/spin-wheel.d.ts +33 -0
- package/dist/spin-wheel.d.ts.map +1 -0
- package/dist/sustainability-score.d.ts +18 -0
- package/dist/sustainability-score.d.ts.map +1 -0
- package/dist/video-player.d.ts +34 -0
- package/dist/video-player.d.ts.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,792 @@
|
|
|
1
|
+
import ne, { useRef as K, useState as E, useEffect as ee } from "react";
|
|
2
|
+
import { cn as f } from "@sudobility/components";
|
|
3
|
+
var z = { exports: {} }, L = {};
|
|
4
|
+
var X;
|
|
5
|
+
function oe() {
|
|
6
|
+
if (X) return L;
|
|
7
|
+
X = 1;
|
|
8
|
+
var o = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
9
|
+
function t(i, m, h) {
|
|
10
|
+
var p = null;
|
|
11
|
+
if (h !== void 0 && (p = "" + h), m.key !== void 0 && (p = "" + m.key), "key" in m) {
|
|
12
|
+
h = {};
|
|
13
|
+
for (var l in m)
|
|
14
|
+
l !== "key" && (h[l] = m[l]);
|
|
15
|
+
} else h = m;
|
|
16
|
+
return m = h.ref, {
|
|
17
|
+
$$typeof: o,
|
|
18
|
+
type: i,
|
|
19
|
+
key: p,
|
|
20
|
+
ref: m !== void 0 ? m : null,
|
|
21
|
+
props: h
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return L.Fragment = s, L.jsx = t, L.jsxs = t, L;
|
|
25
|
+
}
|
|
26
|
+
var M = {};
|
|
27
|
+
var Z;
|
|
28
|
+
function se() {
|
|
29
|
+
return Z || (Z = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
|
+
function o(e) {
|
|
31
|
+
if (e == null) return null;
|
|
32
|
+
if (typeof e == "function")
|
|
33
|
+
return e.$$typeof === re ? null : e.displayName || e.name || null;
|
|
34
|
+
if (typeof e == "string") return e;
|
|
35
|
+
switch (e) {
|
|
36
|
+
case j:
|
|
37
|
+
return "Fragment";
|
|
38
|
+
case O:
|
|
39
|
+
return "Profiler";
|
|
40
|
+
case A:
|
|
41
|
+
return "StrictMode";
|
|
42
|
+
case c:
|
|
43
|
+
return "Suspense";
|
|
44
|
+
case v:
|
|
45
|
+
return "SuspenseList";
|
|
46
|
+
case V:
|
|
47
|
+
return "Activity";
|
|
48
|
+
}
|
|
49
|
+
if (typeof e == "object")
|
|
50
|
+
switch (typeof e.tag == "number" && console.error(
|
|
51
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
|
+
), e.$$typeof) {
|
|
53
|
+
case U:
|
|
54
|
+
return "Portal";
|
|
55
|
+
case C:
|
|
56
|
+
return e.displayName || "Context";
|
|
57
|
+
case S:
|
|
58
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
59
|
+
case a:
|
|
60
|
+
var n = e.render;
|
|
61
|
+
return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
62
|
+
case T:
|
|
63
|
+
return n = e.displayName || null, n !== null ? n : o(e.type) || "Memo";
|
|
64
|
+
case x:
|
|
65
|
+
n = e._payload, e = e._init;
|
|
66
|
+
try {
|
|
67
|
+
return o(e(n));
|
|
68
|
+
} catch {
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
function s(e) {
|
|
74
|
+
return "" + e;
|
|
75
|
+
}
|
|
76
|
+
function t(e) {
|
|
77
|
+
try {
|
|
78
|
+
s(e);
|
|
79
|
+
var n = !1;
|
|
80
|
+
} catch {
|
|
81
|
+
n = !0;
|
|
82
|
+
}
|
|
83
|
+
if (n) {
|
|
84
|
+
n = console;
|
|
85
|
+
var d = n.error, u = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
86
|
+
return d.call(
|
|
87
|
+
n,
|
|
88
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
+
u
|
|
90
|
+
), s(e);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function i(e) {
|
|
94
|
+
if (e === j) return "<>";
|
|
95
|
+
if (typeof e == "object" && e !== null && e.$$typeof === x)
|
|
96
|
+
return "<...>";
|
|
97
|
+
try {
|
|
98
|
+
var n = o(e);
|
|
99
|
+
return n ? "<" + n + ">" : "<...>";
|
|
100
|
+
} catch {
|
|
101
|
+
return "<...>";
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function m() {
|
|
105
|
+
var e = $.A;
|
|
106
|
+
return e === null ? null : e.getOwner();
|
|
107
|
+
}
|
|
108
|
+
function h() {
|
|
109
|
+
return Error("react-stack-top-frame");
|
|
110
|
+
}
|
|
111
|
+
function p(e) {
|
|
112
|
+
if (q.call(e, "key")) {
|
|
113
|
+
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
114
|
+
if (n && n.isReactWarning) return !1;
|
|
115
|
+
}
|
|
116
|
+
return e.key !== void 0;
|
|
117
|
+
}
|
|
118
|
+
function l(e, n) {
|
|
119
|
+
function d() {
|
|
120
|
+
B || (B = !0, console.error(
|
|
121
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
122
|
+
n
|
|
123
|
+
));
|
|
124
|
+
}
|
|
125
|
+
d.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
126
|
+
get: d,
|
|
127
|
+
configurable: !0
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function N() {
|
|
131
|
+
var e = o(this.type);
|
|
132
|
+
return W[e] || (W[e] = !0, console.error(
|
|
133
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
134
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
135
|
+
}
|
|
136
|
+
function w(e, n, d, u, F, I) {
|
|
137
|
+
var g = d.ref;
|
|
138
|
+
return e = {
|
|
139
|
+
$$typeof: R,
|
|
140
|
+
type: e,
|
|
141
|
+
key: n,
|
|
142
|
+
props: d,
|
|
143
|
+
_owner: u
|
|
144
|
+
}, (g !== void 0 ? g : null) !== null ? Object.defineProperty(e, "ref", {
|
|
145
|
+
enumerable: !1,
|
|
146
|
+
get: N
|
|
147
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
148
|
+
configurable: !1,
|
|
149
|
+
enumerable: !1,
|
|
150
|
+
writable: !0,
|
|
151
|
+
value: 0
|
|
152
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
153
|
+
configurable: !1,
|
|
154
|
+
enumerable: !1,
|
|
155
|
+
writable: !0,
|
|
156
|
+
value: null
|
|
157
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
158
|
+
configurable: !1,
|
|
159
|
+
enumerable: !1,
|
|
160
|
+
writable: !0,
|
|
161
|
+
value: F
|
|
162
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
163
|
+
configurable: !1,
|
|
164
|
+
enumerable: !1,
|
|
165
|
+
writable: !0,
|
|
166
|
+
value: I
|
|
167
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
168
|
+
}
|
|
169
|
+
function k(e, n, d, u, F, I) {
|
|
170
|
+
var g = n.children;
|
|
171
|
+
if (g !== void 0)
|
|
172
|
+
if (u)
|
|
173
|
+
if (te(g)) {
|
|
174
|
+
for (u = 0; u < g.length; u++)
|
|
175
|
+
_(g[u]);
|
|
176
|
+
Object.freeze && Object.freeze(g);
|
|
177
|
+
} else
|
|
178
|
+
console.error(
|
|
179
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
|
+
);
|
|
181
|
+
else _(g);
|
|
182
|
+
if (q.call(n, "key")) {
|
|
183
|
+
g = o(e);
|
|
184
|
+
var P = Object.keys(n).filter(function(ae) {
|
|
185
|
+
return ae !== "key";
|
|
186
|
+
});
|
|
187
|
+
u = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", G[g + u] || (P = 0 < P.length ? "{" + P.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
189
|
+
let props = %s;
|
|
190
|
+
<%s {...props} />
|
|
191
|
+
React keys must be passed directly to JSX without using spread:
|
|
192
|
+
let props = %s;
|
|
193
|
+
<%s key={someKey} {...props} />`,
|
|
194
|
+
u,
|
|
195
|
+
g,
|
|
196
|
+
P,
|
|
197
|
+
g
|
|
198
|
+
), G[g + u] = !0);
|
|
199
|
+
}
|
|
200
|
+
if (g = null, d !== void 0 && (t(d), g = "" + d), p(n) && (t(n.key), g = "" + n.key), "key" in n) {
|
|
201
|
+
d = {};
|
|
202
|
+
for (var D in n)
|
|
203
|
+
D !== "key" && (d[D] = n[D]);
|
|
204
|
+
} else d = n;
|
|
205
|
+
return g && l(
|
|
206
|
+
d,
|
|
207
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
208
|
+
), w(
|
|
209
|
+
e,
|
|
210
|
+
g,
|
|
211
|
+
d,
|
|
212
|
+
m(),
|
|
213
|
+
F,
|
|
214
|
+
I
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
function _(e) {
|
|
218
|
+
b(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === x && (e._payload.status === "fulfilled" ? b(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
219
|
+
}
|
|
220
|
+
function b(e) {
|
|
221
|
+
return typeof e == "object" && e !== null && e.$$typeof === R;
|
|
222
|
+
}
|
|
223
|
+
var y = ne, R = Symbol.for("react.transitional.element"), U = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), A = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), C = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), V = Symbol.for("react.activity"), re = Symbol.for("react.client.reference"), $ = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, q = Object.prototype.hasOwnProperty, te = Array.isArray, Y = console.createTask ? console.createTask : function() {
|
|
224
|
+
return null;
|
|
225
|
+
};
|
|
226
|
+
y = {
|
|
227
|
+
react_stack_bottom_frame: function(e) {
|
|
228
|
+
return e();
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
var B, W = {}, H = y.react_stack_bottom_frame.bind(
|
|
232
|
+
y,
|
|
233
|
+
h
|
|
234
|
+
)(), J = Y(i(h)), G = {};
|
|
235
|
+
M.Fragment = j, M.jsx = function(e, n, d) {
|
|
236
|
+
var u = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
237
|
+
return k(
|
|
238
|
+
e,
|
|
239
|
+
n,
|
|
240
|
+
d,
|
|
241
|
+
!1,
|
|
242
|
+
u ? Error("react-stack-top-frame") : H,
|
|
243
|
+
u ? Y(i(e)) : J
|
|
244
|
+
);
|
|
245
|
+
}, M.jsxs = function(e, n, d) {
|
|
246
|
+
var u = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
247
|
+
return k(
|
|
248
|
+
e,
|
|
249
|
+
n,
|
|
250
|
+
d,
|
|
251
|
+
!0,
|
|
252
|
+
u ? Error("react-stack-top-frame") : H,
|
|
253
|
+
u ? Y(i(e)) : J
|
|
254
|
+
);
|
|
255
|
+
};
|
|
256
|
+
})()), M;
|
|
257
|
+
}
|
|
258
|
+
var Q;
|
|
259
|
+
function le() {
|
|
260
|
+
return Q || (Q = 1, process.env.NODE_ENV === "production" ? z.exports = oe() : z.exports = se()), z.exports;
|
|
261
|
+
}
|
|
262
|
+
var r = le();
|
|
263
|
+
const de = ({
|
|
264
|
+
className: o,
|
|
265
|
+
children: s,
|
|
266
|
+
disabled: t = !1,
|
|
267
|
+
onClick: i
|
|
268
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
269
|
+
"div",
|
|
270
|
+
{
|
|
271
|
+
className: f(
|
|
272
|
+
"p-4 rounded-lg border transition-colors",
|
|
273
|
+
"bg-white dark:bg-gray-900",
|
|
274
|
+
"border-gray-200 dark:border-gray-700",
|
|
275
|
+
"text-gray-900 dark:text-white",
|
|
276
|
+
t && "opacity-50 cursor-not-allowed",
|
|
277
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
278
|
+
o
|
|
279
|
+
),
|
|
280
|
+
onClick: t ? void 0 : i,
|
|
281
|
+
role: "region",
|
|
282
|
+
"aria-label": "UachievementUbadge",
|
|
283
|
+
children: s || "UachievementUbadge Component"
|
|
284
|
+
}
|
|
285
|
+
), ue = ({
|
|
286
|
+
className: o,
|
|
287
|
+
children: s,
|
|
288
|
+
disabled: t = !1,
|
|
289
|
+
onClick: i
|
|
290
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
291
|
+
"div",
|
|
292
|
+
{
|
|
293
|
+
className: f(
|
|
294
|
+
"p-4 rounded-lg border transition-colors",
|
|
295
|
+
"bg-white dark:bg-gray-900",
|
|
296
|
+
"border-gray-200 dark:border-gray-700",
|
|
297
|
+
"text-gray-900 dark:text-white",
|
|
298
|
+
t && "opacity-50 cursor-not-allowed",
|
|
299
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
300
|
+
o
|
|
301
|
+
),
|
|
302
|
+
onClick: t ? void 0 : i,
|
|
303
|
+
role: "region",
|
|
304
|
+
"aria-label": "UachievementUunlock",
|
|
305
|
+
children: s || "UachievementUunlock Component"
|
|
306
|
+
}
|
|
307
|
+
), ge = ({
|
|
308
|
+
src: o,
|
|
309
|
+
title: s,
|
|
310
|
+
artist: t,
|
|
311
|
+
artwork: i,
|
|
312
|
+
autoPlay: m = !1,
|
|
313
|
+
loop: h = !1,
|
|
314
|
+
className: p
|
|
315
|
+
}) => {
|
|
316
|
+
const l = K(null), [N, w] = E(m), [k, _] = E(0), [b, y] = E(0), [R, U] = E(1);
|
|
317
|
+
ee(() => {
|
|
318
|
+
const a = l.current;
|
|
319
|
+
if (!a) return;
|
|
320
|
+
const c = () => _(a.currentTime), v = () => y(a.duration), T = () => w(!0), x = () => w(!1), V = () => w(!1);
|
|
321
|
+
return a.addEventListener("timeupdate", c), a.addEventListener("loadedmetadata", v), a.addEventListener("play", T), a.addEventListener("pause", x), a.addEventListener("ended", V), () => {
|
|
322
|
+
a.removeEventListener("timeupdate", c), a.removeEventListener("loadedmetadata", v), a.removeEventListener("play", T), a.removeEventListener("pause", x), a.removeEventListener("ended", V);
|
|
323
|
+
};
|
|
324
|
+
}, []);
|
|
325
|
+
const j = () => {
|
|
326
|
+
l.current && (N ? l.current.pause() : l.current.play());
|
|
327
|
+
}, A = (a) => {
|
|
328
|
+
const c = parseFloat(a.target.value);
|
|
329
|
+
_(c), l.current && (l.current.currentTime = c);
|
|
330
|
+
}, O = (a) => {
|
|
331
|
+
const c = parseFloat(a.target.value);
|
|
332
|
+
U(c), l.current && (l.current.volume = c);
|
|
333
|
+
}, S = (a) => {
|
|
334
|
+
const c = Math.floor(a / 60), v = Math.floor(a % 60);
|
|
335
|
+
return `${c}:${v.toString().padStart(2, "0")}`;
|
|
336
|
+
}, C = b > 0 ? k / b * 100 : 0;
|
|
337
|
+
return /* @__PURE__ */ r.jsxs(
|
|
338
|
+
"div",
|
|
339
|
+
{
|
|
340
|
+
className: f(
|
|
341
|
+
"bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg",
|
|
342
|
+
p
|
|
343
|
+
),
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ r.jsx("audio", { ref: l, src: o, autoPlay: m, loop: h }),
|
|
346
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-4 mb-4", children: [
|
|
347
|
+
i && /* @__PURE__ */ r.jsx("div", { className: "w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700", children: /* @__PURE__ */ r.jsx(
|
|
348
|
+
"img",
|
|
349
|
+
{
|
|
350
|
+
src: i,
|
|
351
|
+
alt: s || "Album artwork",
|
|
352
|
+
className: "w-full h-full object-cover"
|
|
353
|
+
}
|
|
354
|
+
) }),
|
|
355
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
356
|
+
s && /* @__PURE__ */ r.jsx("h4", { className: "font-semibold text-gray-900 dark:text-white truncate", children: s }),
|
|
357
|
+
t && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400 truncate", children: t })
|
|
358
|
+
] })
|
|
359
|
+
] }),
|
|
360
|
+
/* @__PURE__ */ r.jsxs("div", { className: "mb-4", children: [
|
|
361
|
+
/* @__PURE__ */ r.jsx(
|
|
362
|
+
"input",
|
|
363
|
+
{
|
|
364
|
+
type: "range",
|
|
365
|
+
min: "0",
|
|
366
|
+
max: b || 0,
|
|
367
|
+
value: k,
|
|
368
|
+
onChange: A,
|
|
369
|
+
className: "w-full accent-blue-500"
|
|
370
|
+
}
|
|
371
|
+
),
|
|
372
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1", children: [
|
|
373
|
+
/* @__PURE__ */ r.jsx("span", { children: S(k) }),
|
|
374
|
+
/* @__PURE__ */ r.jsx("span", { children: S(b) })
|
|
375
|
+
] })
|
|
376
|
+
] }),
|
|
377
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
378
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
379
|
+
/* @__PURE__ */ r.jsx(
|
|
380
|
+
"button",
|
|
381
|
+
{
|
|
382
|
+
onClick: j,
|
|
383
|
+
className: "w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors",
|
|
384
|
+
children: N ? /* @__PURE__ */ r.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ r.jsx("path", { d: "M6 4h4v16H6V4zm8 0h4v16h-4V4z" }) }) : /* @__PURE__ */ r.jsx(
|
|
385
|
+
"svg",
|
|
386
|
+
{
|
|
387
|
+
className: "w-5 h-5 ml-0.5",
|
|
388
|
+
fill: "currentColor",
|
|
389
|
+
viewBox: "0 0 24 24",
|
|
390
|
+
children: /* @__PURE__ */ r.jsx("path", { d: "M8 5v14l11-7z" })
|
|
391
|
+
}
|
|
392
|
+
)
|
|
393
|
+
}
|
|
394
|
+
),
|
|
395
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
396
|
+
/* @__PURE__ */ r.jsx(
|
|
397
|
+
"svg",
|
|
398
|
+
{
|
|
399
|
+
className: "w-4 h-4 text-gray-600 dark:text-gray-400",
|
|
400
|
+
fill: "currentColor",
|
|
401
|
+
viewBox: "0 0 24 24",
|
|
402
|
+
children: /* @__PURE__ */ r.jsx("path", { d: "M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z" })
|
|
403
|
+
}
|
|
404
|
+
),
|
|
405
|
+
/* @__PURE__ */ r.jsx(
|
|
406
|
+
"input",
|
|
407
|
+
{
|
|
408
|
+
type: "range",
|
|
409
|
+
min: "0",
|
|
410
|
+
max: "1",
|
|
411
|
+
step: "0.1",
|
|
412
|
+
value: R,
|
|
413
|
+
onChange: O,
|
|
414
|
+
className: "w-24 accent-blue-500"
|
|
415
|
+
}
|
|
416
|
+
)
|
|
417
|
+
] })
|
|
418
|
+
] }),
|
|
419
|
+
/* @__PURE__ */ r.jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: [
|
|
420
|
+
C.toFixed(0),
|
|
421
|
+
"%"
|
|
422
|
+
] })
|
|
423
|
+
] })
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
);
|
|
427
|
+
}, me = ({
|
|
428
|
+
className: o,
|
|
429
|
+
children: s,
|
|
430
|
+
disabled: t = !1,
|
|
431
|
+
onClick: i
|
|
432
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
433
|
+
"div",
|
|
434
|
+
{
|
|
435
|
+
className: f(
|
|
436
|
+
"p-4 rounded-lg border transition-colors",
|
|
437
|
+
"bg-white dark:bg-gray-900",
|
|
438
|
+
"border-gray-200 dark:border-gray-700",
|
|
439
|
+
"text-gray-900 dark:text-white",
|
|
440
|
+
t && "opacity-50 cursor-not-allowed",
|
|
441
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
442
|
+
o
|
|
443
|
+
),
|
|
444
|
+
onClick: t ? void 0 : i,
|
|
445
|
+
role: "region",
|
|
446
|
+
"aria-label": "UgameUcontrols",
|
|
447
|
+
children: s || "UgameUcontrols Component"
|
|
448
|
+
}
|
|
449
|
+
), fe = ({
|
|
450
|
+
className: o,
|
|
451
|
+
children: s,
|
|
452
|
+
disabled: t
|
|
453
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
454
|
+
"div",
|
|
455
|
+
{
|
|
456
|
+
className: f(
|
|
457
|
+
"p-4 rounded-lg border transition-colors",
|
|
458
|
+
"bg-white dark:bg-gray-900",
|
|
459
|
+
"border-gray-200 dark:border-gray-700",
|
|
460
|
+
"text-gray-900 dark:text-white",
|
|
461
|
+
t && "opacity-50 cursor-not-allowed",
|
|
462
|
+
o
|
|
463
|
+
),
|
|
464
|
+
role: "region",
|
|
465
|
+
"aria-label": "LeadScorer",
|
|
466
|
+
children: s || "LeadScorer Component"
|
|
467
|
+
}
|
|
468
|
+
), he = ({
|
|
469
|
+
className: o,
|
|
470
|
+
children: s,
|
|
471
|
+
disabled: t = !1,
|
|
472
|
+
onClick: i
|
|
473
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
474
|
+
"div",
|
|
475
|
+
{
|
|
476
|
+
className: f(
|
|
477
|
+
"p-4 rounded-lg border transition-colors",
|
|
478
|
+
"bg-white dark:bg-gray-900",
|
|
479
|
+
"border-gray-200 dark:border-gray-700",
|
|
480
|
+
"text-gray-900 dark:text-white",
|
|
481
|
+
t && "opacity-50 cursor-not-allowed",
|
|
482
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
483
|
+
o
|
|
484
|
+
),
|
|
485
|
+
onClick: t ? void 0 : i,
|
|
486
|
+
role: "region",
|
|
487
|
+
"aria-label": "UleaderboardUpodium",
|
|
488
|
+
children: s || "UleaderboardUpodium Component"
|
|
489
|
+
}
|
|
490
|
+
), ve = ({
|
|
491
|
+
className: o,
|
|
492
|
+
children: s,
|
|
493
|
+
disabled: t
|
|
494
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
495
|
+
"div",
|
|
496
|
+
{
|
|
497
|
+
className: f(
|
|
498
|
+
"p-4 rounded-lg border transition-colors",
|
|
499
|
+
"bg-white dark:bg-gray-900",
|
|
500
|
+
"border-gray-200 dark:border-gray-700",
|
|
501
|
+
"text-gray-900 dark:text-white",
|
|
502
|
+
t && "opacity-50 cursor-not-allowed",
|
|
503
|
+
o
|
|
504
|
+
),
|
|
505
|
+
role: "region",
|
|
506
|
+
"aria-label": "PlayerStats",
|
|
507
|
+
children: s || "PlayerStats Component"
|
|
508
|
+
}
|
|
509
|
+
), be = ({
|
|
510
|
+
className: o,
|
|
511
|
+
children: s,
|
|
512
|
+
disabled: t
|
|
513
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
514
|
+
"div",
|
|
515
|
+
{
|
|
516
|
+
className: f(
|
|
517
|
+
"p-4 rounded-lg border transition-colors",
|
|
518
|
+
"bg-white dark:bg-gray-900",
|
|
519
|
+
"border-gray-200 dark:border-gray-700",
|
|
520
|
+
"text-gray-900 dark:text-white",
|
|
521
|
+
t && "opacity-50 cursor-not-allowed",
|
|
522
|
+
o
|
|
523
|
+
),
|
|
524
|
+
role: "region",
|
|
525
|
+
"aria-label": "PodcastPlayer",
|
|
526
|
+
children: s || "PodcastPlayer Component"
|
|
527
|
+
}
|
|
528
|
+
), pe = ({
|
|
529
|
+
className: o,
|
|
530
|
+
children: s,
|
|
531
|
+
disabled: t
|
|
532
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
533
|
+
"div",
|
|
534
|
+
{
|
|
535
|
+
className: f(
|
|
536
|
+
"p-4 rounded-lg border transition-colors",
|
|
537
|
+
"bg-white dark:bg-gray-900",
|
|
538
|
+
"border-gray-200 dark:border-gray-700",
|
|
539
|
+
"text-gray-900 dark:text-white",
|
|
540
|
+
t && "opacity-50 cursor-not-allowed",
|
|
541
|
+
o
|
|
542
|
+
),
|
|
543
|
+
role: "region",
|
|
544
|
+
"aria-label": "ScoreBoard",
|
|
545
|
+
children: s || "ScoreBoard Component"
|
|
546
|
+
}
|
|
547
|
+
), ye = ({
|
|
548
|
+
className: o,
|
|
549
|
+
children: s,
|
|
550
|
+
disabled: t = !1,
|
|
551
|
+
onClick: i
|
|
552
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
553
|
+
"div",
|
|
554
|
+
{
|
|
555
|
+
className: f(
|
|
556
|
+
"p-4 rounded-lg border transition-colors",
|
|
557
|
+
"bg-white dark:bg-gray-900",
|
|
558
|
+
"border-gray-200 dark:border-gray-700",
|
|
559
|
+
"text-gray-900 dark:text-white",
|
|
560
|
+
t && "opacity-50 cursor-not-allowed",
|
|
561
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
562
|
+
o
|
|
563
|
+
),
|
|
564
|
+
onClick: t ? void 0 : i,
|
|
565
|
+
role: "region",
|
|
566
|
+
"aria-label": "UscoreUdisplay",
|
|
567
|
+
children: s || "UscoreUdisplay Component"
|
|
568
|
+
}
|
|
569
|
+
), xe = ({
|
|
570
|
+
className: o,
|
|
571
|
+
children: s,
|
|
572
|
+
disabled: t = !1,
|
|
573
|
+
onClick: i
|
|
574
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
575
|
+
"div",
|
|
576
|
+
{
|
|
577
|
+
className: f(
|
|
578
|
+
"p-4 rounded-lg border transition-colors",
|
|
579
|
+
"bg-white dark:bg-gray-900",
|
|
580
|
+
"border-gray-200 dark:border-gray-700",
|
|
581
|
+
"text-gray-900 dark:text-white",
|
|
582
|
+
t && "opacity-50 cursor-not-allowed",
|
|
583
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
584
|
+
o
|
|
585
|
+
),
|
|
586
|
+
onClick: t ? void 0 : i,
|
|
587
|
+
role: "region",
|
|
588
|
+
"aria-label": "UscratchUcard",
|
|
589
|
+
children: s || "UscratchUcard Component"
|
|
590
|
+
}
|
|
591
|
+
), we = ({
|
|
592
|
+
className: o,
|
|
593
|
+
children: s,
|
|
594
|
+
disabled: t
|
|
595
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
596
|
+
"div",
|
|
597
|
+
{
|
|
598
|
+
className: f(
|
|
599
|
+
"p-4 rounded-lg border transition-colors",
|
|
600
|
+
"bg-white dark:bg-gray-900",
|
|
601
|
+
"border-gray-200 dark:border-gray-700",
|
|
602
|
+
"text-gray-900 dark:text-white",
|
|
603
|
+
t && "opacity-50 cursor-not-allowed",
|
|
604
|
+
o
|
|
605
|
+
),
|
|
606
|
+
role: "region",
|
|
607
|
+
"aria-label": "SignatureRequest",
|
|
608
|
+
children: s || "SignatureRequest Component"
|
|
609
|
+
}
|
|
610
|
+
), ke = ({
|
|
611
|
+
className: o,
|
|
612
|
+
children: s,
|
|
613
|
+
disabled: t = !1,
|
|
614
|
+
onClick: i
|
|
615
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
616
|
+
"div",
|
|
617
|
+
{
|
|
618
|
+
className: f(
|
|
619
|
+
"p-4 rounded-lg border transition-colors",
|
|
620
|
+
"bg-white dark:bg-gray-900",
|
|
621
|
+
"border-gray-200 dark:border-gray-700",
|
|
622
|
+
"text-gray-900 dark:text-white",
|
|
623
|
+
t && "opacity-50 cursor-not-allowed",
|
|
624
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
625
|
+
o
|
|
626
|
+
),
|
|
627
|
+
onClick: t ? void 0 : i,
|
|
628
|
+
role: "region",
|
|
629
|
+
"aria-label": "UspinUwheel",
|
|
630
|
+
children: s || "UspinUwheel Component"
|
|
631
|
+
}
|
|
632
|
+
), je = ({
|
|
633
|
+
className: o,
|
|
634
|
+
children: s,
|
|
635
|
+
disabled: t
|
|
636
|
+
}) => /* @__PURE__ */ r.jsx(
|
|
637
|
+
"div",
|
|
638
|
+
{
|
|
639
|
+
className: f(
|
|
640
|
+
"p-4 rounded-lg border transition-colors",
|
|
641
|
+
"bg-white dark:bg-gray-900",
|
|
642
|
+
"border-gray-200 dark:border-gray-700",
|
|
643
|
+
"text-gray-900 dark:text-white",
|
|
644
|
+
t && "opacity-50 cursor-not-allowed",
|
|
645
|
+
o
|
|
646
|
+
),
|
|
647
|
+
role: "region",
|
|
648
|
+
"aria-label": "SustainabilityScore",
|
|
649
|
+
children: s || "SustainabilityScore Component"
|
|
650
|
+
}
|
|
651
|
+
), Ee = ({
|
|
652
|
+
src: o,
|
|
653
|
+
poster: s,
|
|
654
|
+
autoPlay: t = !1,
|
|
655
|
+
loop: i = !1,
|
|
656
|
+
muted: m = !1,
|
|
657
|
+
controls: h = !0,
|
|
658
|
+
className: p
|
|
659
|
+
}) => {
|
|
660
|
+
const l = K(null), [N, w] = E(t), [k, _] = E(1), [b, y] = E(0), [R, U] = E(0);
|
|
661
|
+
ee(() => {
|
|
662
|
+
const a = l.current;
|
|
663
|
+
if (!a) return;
|
|
664
|
+
const c = () => y(a.currentTime), v = () => U(a.duration), T = () => w(!0), x = () => w(!1);
|
|
665
|
+
return a.addEventListener("timeupdate", c), a.addEventListener("loadedmetadata", v), a.addEventListener("play", T), a.addEventListener("pause", x), () => {
|
|
666
|
+
a.removeEventListener("timeupdate", c), a.removeEventListener("loadedmetadata", v), a.removeEventListener("play", T), a.removeEventListener("pause", x);
|
|
667
|
+
};
|
|
668
|
+
}, []);
|
|
669
|
+
const j = () => {
|
|
670
|
+
l.current && (N ? l.current.pause() : l.current.play());
|
|
671
|
+
}, A = (a) => {
|
|
672
|
+
const c = parseFloat(a.target.value);
|
|
673
|
+
_(c), l.current && (l.current.volume = c);
|
|
674
|
+
}, O = (a) => {
|
|
675
|
+
const c = parseFloat(a.target.value);
|
|
676
|
+
y(c), l.current && (l.current.currentTime = c);
|
|
677
|
+
}, S = () => {
|
|
678
|
+
l.current && (document.fullscreenElement ? document.exitFullscreen() : l.current.requestFullscreen());
|
|
679
|
+
}, C = (a) => {
|
|
680
|
+
const c = Math.floor(a / 60), v = Math.floor(a % 60);
|
|
681
|
+
return `${c}:${v.toString().padStart(2, "0")}`;
|
|
682
|
+
};
|
|
683
|
+
return /* @__PURE__ */ r.jsxs("div", { className: f("relative group", p), children: [
|
|
684
|
+
/* @__PURE__ */ r.jsx(
|
|
685
|
+
"video",
|
|
686
|
+
{
|
|
687
|
+
ref: l,
|
|
688
|
+
src: o,
|
|
689
|
+
poster: s,
|
|
690
|
+
autoPlay: t,
|
|
691
|
+
loop: i,
|
|
692
|
+
muted: m,
|
|
693
|
+
className: "w-full rounded-lg",
|
|
694
|
+
onClick: j
|
|
695
|
+
}
|
|
696
|
+
),
|
|
697
|
+
h && /* @__PURE__ */ r.jsxs("div", { className: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity", children: [
|
|
698
|
+
/* @__PURE__ */ r.jsx(
|
|
699
|
+
"input",
|
|
700
|
+
{
|
|
701
|
+
type: "range",
|
|
702
|
+
min: "0",
|
|
703
|
+
max: R || 0,
|
|
704
|
+
value: b,
|
|
705
|
+
onChange: O,
|
|
706
|
+
className: "w-full mb-2 accent-white"
|
|
707
|
+
}
|
|
708
|
+
),
|
|
709
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
710
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
711
|
+
/* @__PURE__ */ r.jsx(
|
|
712
|
+
"button",
|
|
713
|
+
{
|
|
714
|
+
onClick: j,
|
|
715
|
+
className: "text-white hover:text-gray-300 transition-colors",
|
|
716
|
+
children: N ? /* @__PURE__ */ r.jsx(
|
|
717
|
+
"svg",
|
|
718
|
+
{
|
|
719
|
+
className: "w-6 h-6",
|
|
720
|
+
fill: "currentColor",
|
|
721
|
+
viewBox: "0 0 24 24",
|
|
722
|
+
children: /* @__PURE__ */ r.jsx("path", { d: "M6 4h4v16H6V4zm8 0h4v16h-4V4z" })
|
|
723
|
+
}
|
|
724
|
+
) : /* @__PURE__ */ r.jsx(
|
|
725
|
+
"svg",
|
|
726
|
+
{
|
|
727
|
+
className: "w-6 h-6",
|
|
728
|
+
fill: "currentColor",
|
|
729
|
+
viewBox: "0 0 24 24",
|
|
730
|
+
children: /* @__PURE__ */ r.jsx("path", { d: "M8 5v14l11-7z" })
|
|
731
|
+
}
|
|
732
|
+
)
|
|
733
|
+
}
|
|
734
|
+
),
|
|
735
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
736
|
+
/* @__PURE__ */ r.jsx(
|
|
737
|
+
"svg",
|
|
738
|
+
{
|
|
739
|
+
className: "w-4 h-4 text-white",
|
|
740
|
+
fill: "currentColor",
|
|
741
|
+
viewBox: "0 0 24 24",
|
|
742
|
+
children: /* @__PURE__ */ r.jsx("path", { d: "M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z" })
|
|
743
|
+
}
|
|
744
|
+
),
|
|
745
|
+
/* @__PURE__ */ r.jsx(
|
|
746
|
+
"input",
|
|
747
|
+
{
|
|
748
|
+
type: "range",
|
|
749
|
+
min: "0",
|
|
750
|
+
max: "1",
|
|
751
|
+
step: "0.1",
|
|
752
|
+
value: k,
|
|
753
|
+
onChange: A,
|
|
754
|
+
className: "w-20 accent-white"
|
|
755
|
+
}
|
|
756
|
+
)
|
|
757
|
+
] }),
|
|
758
|
+
/* @__PURE__ */ r.jsxs("span", { className: "text-white text-sm", children: [
|
|
759
|
+
C(b),
|
|
760
|
+
" / ",
|
|
761
|
+
C(R)
|
|
762
|
+
] })
|
|
763
|
+
] }),
|
|
764
|
+
/* @__PURE__ */ r.jsx(
|
|
765
|
+
"button",
|
|
766
|
+
{
|
|
767
|
+
onClick: S,
|
|
768
|
+
className: "text-white hover:text-gray-300 transition-colors",
|
|
769
|
+
children: /* @__PURE__ */ r.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ r.jsx("path", { d: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z" }) })
|
|
770
|
+
}
|
|
771
|
+
)
|
|
772
|
+
] })
|
|
773
|
+
] })
|
|
774
|
+
] });
|
|
775
|
+
};
|
|
776
|
+
export {
|
|
777
|
+
ge as AudioPlayer,
|
|
778
|
+
fe as LeadScorer,
|
|
779
|
+
ve as PlayerStats,
|
|
780
|
+
be as PodcastPlayer,
|
|
781
|
+
pe as ScoreBoard,
|
|
782
|
+
we as SignatureRequest,
|
|
783
|
+
je as SustainabilityScore,
|
|
784
|
+
de as UachievementUbadge,
|
|
785
|
+
ue as UachievementUunlock,
|
|
786
|
+
me as UgameUcontrols,
|
|
787
|
+
he as UleaderboardUpodium,
|
|
788
|
+
ye as UscoreUdisplay,
|
|
789
|
+
xe as UscratchUcard,
|
|
790
|
+
ke as UspinUwheel,
|
|
791
|
+
Ee as VideoPlayer
|
|
792
|
+
};
|