@streamlayer/react 1.24.7 → 1.24.8-pre.11da316
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/lib/app/advertisement.d.ts +5 -0
- package/lib/cjs/advertisement.js +1486 -1436
- package/lib/cjs/auth.js +33 -33
- package/lib/cjs/bet-pack.js +232 -195
- package/lib/cjs/index.js +1765 -1707
- package/lib/cjs/insight.js +631 -569
- package/lib/cjs/masters.js +1346 -1307
- package/lib/cjs/notification.js +237 -206
- package/lib/cjs/pause-ad.js +62 -62
- package/lib/cjs/points.js +128 -97
- package/lib/cjs/polymarket.js +98 -97
- package/lib/cjs/style.css +1 -1
- package/lib/cjs/useStreamLayerApp.js +95 -101
- package/lib/dist/cjs/index.js +1346 -1307
- package/lib/dist/es/index.js +1346 -1307
- package/lib/es/Question.js +75 -72
- package/lib/es/advertisement.js +9139 -8159
- package/lib/es/analytics.js +35 -31
- package/lib/es/auth.js +1 -1
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/{hooks-n9ax4LRT.js → hooks-42q2i9Iw.js} +25 -23
- package/lib/es/{index-D8wyDNJD.js → index-sWgEw6jy.js} +1 -1
- package/lib/es/index.js +2 -2
- package/lib/es/index10.js +6 -6
- package/lib/es/index12.js +116 -128
- package/lib/es/index13.js +100 -96
- package/lib/es/index14.js +15 -15
- package/lib/es/index16.js +382 -383
- package/lib/es/index2.js +55 -56
- package/lib/es/index4.js +3 -3
- package/lib/es/index5.js +275 -3
- package/lib/es/index6.js +4 -7
- package/lib/es/index7.js +5 -284
- package/lib/es/index8.js +8 -237
- package/lib/es/index9.js +237 -8
- package/lib/es/insight.js +3 -3
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +29 -29
- package/lib/es/notification.js +28 -28
- package/lib/es/pause-ad.js +21 -21
- package/lib/es/points.js +9 -9
- package/lib/es/polymarket.js +40 -40
- package/lib/es/storage.js +18 -18
- package/lib/es/style.css +1 -1
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/es/useStreamLayerApp2.js +5098 -4862
- package/lib/es/utils.js +86 -41
- package/lib/source.css +1 -1
- package/package.json +14 -14
package/lib/es/index8.js
CHANGED
|
@@ -1,240 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const K = {
|
|
7
|
-
BLUE_QUESTION_ACTION_BTN: "#1589ee",
|
|
8
|
-
WHITE: "#FFFFFF",
|
|
9
|
-
BLUE: "#2d6ffd",
|
|
10
|
-
GREY_PRIMARY: "#909395",
|
|
11
|
-
GREY_PRIMARY_ONBOARDING_INAPP: "#B5B7B8",
|
|
12
|
-
PRIMARY_1: "#1D7BFF",
|
|
13
|
-
// main
|
|
14
|
-
PRIMARY_2: "#095CD1",
|
|
15
|
-
// hover, active, ...etc (darken 10%)
|
|
16
|
-
PRIMARY_TEXT: "#090E13",
|
|
17
|
-
SECONDARY_TEXT: "rgba(10, 14, 19, 0.70)",
|
|
18
|
-
QUESTION_TYPE_ICON: "#1D7BFF",
|
|
19
|
-
QUESTION_BODY_TEXT: "#090E13",
|
|
20
|
-
PRESENTED_BY_TEXT: "#090E13",
|
|
21
|
-
SUCCESS: "#107D57",
|
|
22
|
-
UNSUCCESS: "#DF2F3B",
|
|
23
|
-
SECONDARY_RED1: "#DF2F3B",
|
|
24
|
-
NEUTRALS_WHITE: "#FFFFFF",
|
|
25
|
-
NEUTRALS_WHITE1: "#FFFFFF",
|
|
26
|
-
NEUTRALS_GRAY1: "#F7F7F7",
|
|
27
|
-
NEUTRALS_GRAY2: "#F2F2F1",
|
|
28
|
-
NEUTRALS_GRAY3: "#E8E8E8",
|
|
29
|
-
NEUTRALS_GRAY4: "#D9D9D6",
|
|
30
|
-
NEUTRALS_GRAY5: "#B1B3B3",
|
|
31
|
-
NEUTRALS_GRAY6: "#888B8D",
|
|
32
|
-
NEUTRALS_GRAY7: "#6B6F73",
|
|
33
|
-
NEUTRALS_GRAY9: "#25282A",
|
|
34
|
-
SDK_CONTAINER_BG: "#F7F7F7",
|
|
35
|
-
SDK_WHITE_CONTAINER_BG: "#fff",
|
|
36
|
-
SDK_DARK_CONTAINER_BG: "#fff",
|
|
37
|
-
SDK_PREDICTION_RESULT_SUCCESS_BG: "#fff",
|
|
38
|
-
SDK_PREDICTION_RESULT_INCORRECT_BG: "#fff",
|
|
39
|
-
SDK_PREDICTION_RESULT_SUCCESS_TEXT: "#107D57",
|
|
40
|
-
SDK_PREDICTION_RESULT_ERROR_TITLE: "#090E13",
|
|
41
|
-
SDK_PREDICTION_RESULT_ERROR_SUBTITLE: "#DF2F3B",
|
|
42
|
-
SDK_PREDICTION_RESULT_CLOSE_ICON: "#6B6F73",
|
|
43
|
-
SDK_PREDICTION_FEEDBACK_SUCCESS_ICON: "#107D57",
|
|
44
|
-
SDK_PREDICTION_FEEDBACK_INCORRECT_RECT1: "#CD2525",
|
|
45
|
-
SDK_PREDICTION_FEEDBACK_INCORRECT_RECT2: "#fff",
|
|
46
|
-
PREDICTION_BG_LINES_CORRECT: "#01AB58",
|
|
47
|
-
PREDICTION_BG_LINES_INCORRECT: "#888B8D",
|
|
48
|
-
SKELETON_COLOR_1: "#f1efef",
|
|
49
|
-
SKELETON_COLOR_2: "#f9f8f8",
|
|
50
|
-
TABS_CONTAINER_BG: "#F2F2F1",
|
|
51
|
-
TABS_ACTIVE_BG: "#FFFFFF",
|
|
52
|
-
TABS_COLOR: "#6B6F73",
|
|
53
|
-
TABS_ACTIVE_COLOR: "#1D7BFF",
|
|
54
|
-
CARD_BG: "#FFFFFF",
|
|
55
|
-
CARD_BORDER: "#fff",
|
|
56
|
-
BORDER: "#E8E8E8",
|
|
57
|
-
VOTE_BTN_BG: "#F7F7F7",
|
|
58
|
-
VOTE_BTN_BORDER: "rgb(232, 232, 232)",
|
|
59
|
-
VOTE_BTN_DISABLED_BORDER: "#B1B3B3",
|
|
60
|
-
VOTE_BTN_SELECTED_BORDER: "#25282A",
|
|
61
|
-
VOTE_BTN_NOT_SELECTED_BORDER: "#E8E8E8",
|
|
62
|
-
VOTE_BTN_SELECTED_BG: "#FFFFFF",
|
|
63
|
-
VOTE_BTN_SELECTED_BG_AD_UNIT: "#FFFFFF",
|
|
64
|
-
VOTE_BTN_NOT_SELECTED_BG: "#FFFFFF",
|
|
65
|
-
VOTE_BTN_NOT_SELECTED_BG_UNSET: "rgb(196, 196, 196)",
|
|
66
|
-
VOTED_ANSWER_BG: "#FFFFFF",
|
|
67
|
-
VOTED_BTN_RCT_BG: "#2d5694",
|
|
68
|
-
IN_APP_BG: "rgba(255, 255, 255, 0.90)",
|
|
69
|
-
IN_APP_QUESTION_TYPE_ICON: "#1D7BFF",
|
|
70
|
-
IN_APP_QUESTION_TYPE_LABEL: "#82899E",
|
|
71
|
-
IN_APP_QUESTION_QUOTE: "rgba(10, 14, 19, 0.70)",
|
|
72
|
-
IN_APP_QUESTION_RESULT_SUBTITLE_BG: "#1D7BFF",
|
|
73
|
-
IN_APP_QUESTION_RESULT_LINE: "#babfc5",
|
|
74
|
-
QUOTE_BORDER: "#E8E8E8",
|
|
75
|
-
QUOTE_TEXT: "rgba(10, 14, 19, 0.70)"
|
|
76
|
-
}, W = {
|
|
77
|
-
BG_PRIMARY: "#13212b",
|
|
78
|
-
BG_SECONDARY: "#152430",
|
|
79
|
-
BG_SECONDARY1: "#435059",
|
|
80
|
-
BORDER_PRIMARY: "rgba(255, 255, 255, 0.1)",
|
|
81
|
-
TEXT_PRIMARY: "#f9f9f9",
|
|
82
|
-
TEXT_PRIMARY1: "#f9f9f9",
|
|
83
|
-
TEXT_SECONDARY: "rgba(255, 255, 255, 0.8)",
|
|
84
|
-
TEXT_SECONDARY1: "#878787",
|
|
85
|
-
WHITE: "#fff"
|
|
86
|
-
}, x = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], M = "#cee5de", V = "#f9d6d8", Q = "#E8E8E8", le = {
|
|
87
|
-
xs: 324,
|
|
88
|
-
sm: 576,
|
|
89
|
-
md: 768,
|
|
90
|
-
lg: 992,
|
|
91
|
-
xl: 1200,
|
|
92
|
-
xxl: 1440
|
|
93
|
-
};
|
|
94
|
-
Object.entries(K).reduce((t, [e, i]) => `
|
|
95
|
-
${t}
|
|
96
|
-
--color-${e.toLowerCase().replaceAll("_", "-")}: ${i};
|
|
97
|
-
`, "");
|
|
98
|
-
Object.entries(W).reduce((t, [e, i]) => `
|
|
99
|
-
${t}
|
|
100
|
-
--color-adv-${e.toLowerCase().replaceAll("_", "-")}: ${i};
|
|
101
|
-
`, "");
|
|
102
|
-
const X = (t) => {
|
|
103
|
-
const { Component: e, options: i, customOptions: n, autoFocus: r, ...a } = t, E = v.useFocusable({
|
|
104
|
-
...i,
|
|
105
|
-
...n,
|
|
106
|
-
onEnterPress: () => t.onClick?.({ currentTarget: E.ref.current, stopPropagation: () => {
|
|
107
|
-
} })
|
|
108
|
-
});
|
|
109
|
-
return L(() => {
|
|
110
|
-
r && E.focusSelf();
|
|
111
|
-
}, []), /* @__PURE__ */ d(e, { ...a, ...E, "data-is-with-focus": "true" });
|
|
112
|
-
};
|
|
113
|
-
function Te(t, e) {
|
|
114
|
-
return ({ webos: i, options: n, ...r }) => i ? /* @__PURE__ */ d(X, { Component: t, options: e, customOptions: n, ...r }) : /* @__PURE__ */ d(t, { ...r });
|
|
115
|
-
}
|
|
116
|
-
var U = typeof window > "u" ? L : w, j = ({ isPlaying: t, duration: e, startAt: i = 0, updateInterval: n = 0, onComplete: r, onUpdate: a }) => {
|
|
117
|
-
let [E, l] = A(i), T = S(0), R = S(i), s = S(i * -1e3), _ = S(null), o = S(null), c = S(null), m = (f) => {
|
|
118
|
-
let u = f / 1e3;
|
|
119
|
-
if (o.current === null) {
|
|
120
|
-
o.current = u, _.current = requestAnimationFrame(m);
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
let F = u - o.current, C = T.current + F;
|
|
124
|
-
o.current = u, T.current = C;
|
|
125
|
-
let O = R.current + (n === 0 ? C : (C / n | 0) * n), D = R.current + C, g = typeof e == "number" && D >= e;
|
|
126
|
-
l(g ? e : O), g || (_.current = requestAnimationFrame(m));
|
|
127
|
-
}, I = () => {
|
|
128
|
-
_.current && cancelAnimationFrame(_.current), c.current && clearTimeout(c.current), o.current = null;
|
|
129
|
-
}, N = p((f) => {
|
|
130
|
-
I(), T.current = 0;
|
|
131
|
-
let u = typeof f == "number" ? f : i;
|
|
132
|
-
R.current = u, l(u), t && (_.current = requestAnimationFrame(m));
|
|
133
|
-
}, [t, i]);
|
|
134
|
-
return U(() => {
|
|
135
|
-
if (a?.(E), e && E >= e) {
|
|
136
|
-
s.current += e * 1e3;
|
|
137
|
-
let { shouldRepeat: f = !1, delay: u = 0, newStartAt: F } = r?.(s.current / 1e3) || {};
|
|
138
|
-
f && (c.current = setTimeout(() => N(F), u * 1e3));
|
|
139
|
-
}
|
|
140
|
-
}, [E, e]), U(() => (t && (_.current = requestAnimationFrame(m)), I), [t, e, n]), { elapsedTime: E, reset: N };
|
|
141
|
-
}, z = (t, e, i) => {
|
|
142
|
-
let n = t / 2, r = e / 2, a = n - r, E = 2 * a, l = i === "clockwise" ? "1,0" : "0,1", T = 2 * Math.PI * a;
|
|
143
|
-
return { path: `m ${n},${r} a ${a},${a} 0 ${l} 0,${E} a ${a},${a} 0 ${l} 0,-${E}`, pathLength: T };
|
|
144
|
-
}, G = (t, e) => t === 0 || t === e ? 0 : typeof e == "number" ? t - e : 0, H = (t) => ({ position: "relative", width: t, height: t }), q = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, k = (t, e, i, n, r) => {
|
|
145
|
-
if (n === 0) return e;
|
|
146
|
-
let a = (r ? n - t : t) / n;
|
|
147
|
-
return e + i * a;
|
|
148
|
-
}, $ = (t) => {
|
|
149
|
-
var e, i;
|
|
150
|
-
return (i = (e = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (n, r, a, E) => `#${r}${r}${a}${a}${E}${E}`).substring(1).match(/.{2}/g)) == null ? void 0 : e.map((n) => parseInt(n, 16))) != null ? i : [];
|
|
151
|
-
}, J = (t, e) => {
|
|
152
|
-
var i;
|
|
153
|
-
let { colors: n, colorsTime: r, isSmoothColorTransition: a = !0 } = t;
|
|
154
|
-
if (typeof n == "string") return n;
|
|
155
|
-
let E = (i = r?.findIndex((o, c) => o >= e && e >= r[c + 1])) != null ? i : -1;
|
|
156
|
-
if (!r || E === -1) return n[0];
|
|
157
|
-
if (!a) return n[E];
|
|
158
|
-
let l = r[E] - e, T = r[E] - r[E + 1], R = $(n[E]), s = $(n[E + 1]), _ = !!t.isGrowing;
|
|
159
|
-
return `rgb(${R.map((o, c) => k(l, o, s[c] - o, T, _) | 0).join(",")})`;
|
|
160
|
-
}, Z = (t) => {
|
|
161
|
-
let { duration: e, initialRemainingTime: i, updateInterval: n, size: r = 180, strokeWidth: a = 12, trailStrokeWidth: E, isPlaying: l = !1, isGrowing: T = !1, rotation: R = "clockwise", onComplete: s, onUpdate: _ } = t, o = S(), c = Math.max(a, E ?? 0), { path: m, pathLength: I } = z(r, c, R), { elapsedTime: N } = j({ isPlaying: l, duration: e, startAt: G(e, i), updateInterval: n, onUpdate: typeof _ == "function" ? (u) => {
|
|
162
|
-
let F = Math.ceil(e - u);
|
|
163
|
-
F !== o.current && (o.current = F, _(F));
|
|
164
|
-
} : void 0, onComplete: typeof s == "function" ? (u) => {
|
|
165
|
-
var F;
|
|
166
|
-
let { shouldRepeat: C, delay: O, newInitialRemainingTime: D } = (F = s(u)) != null ? F : {};
|
|
167
|
-
if (C) return { shouldRepeat: C, delay: O, newStartAt: G(e, D) };
|
|
168
|
-
} : void 0 }), f = e - N;
|
|
169
|
-
return { elapsedTime: N, path: m, pathLength: I, remainingTime: Math.ceil(f), rotation: R, size: r, stroke: J(t, f), strokeDashoffset: k(N, 0, I, e, T), strokeWidth: a };
|
|
170
|
-
}, P = (t) => {
|
|
171
|
-
let { children: e, strokeLinecap: i, trailColor: n, trailStrokeWidth: r } = t, { path: a, pathLength: E, stroke: l, strokeDashoffset: T, remainingTime: R, elapsedTime: s, size: _, strokeWidth: o } = Z(t);
|
|
172
|
-
return B.createElement("div", { style: H(_) }, B.createElement("svg", { viewBox: `0 0 ${_} ${_}`, width: _, height: _, xmlns: "http://www.w3.org/2000/svg" }, B.createElement("path", { d: a, fill: "none", stroke: n ?? "#d9d9d9", strokeWidth: r ?? o }), B.createElement("path", { d: a, fill: "none", stroke: l, strokeLinecap: i ?? "round", strokeWidth: o, strokeDasharray: E, strokeDashoffset: T })), typeof e == "function" && B.createElement("div", { style: q }, e({ remainingTime: R, elapsedTime: s, color: l })));
|
|
173
|
-
};
|
|
174
|
-
P.displayName = "CountdownCircleTimer";
|
|
175
|
-
const ee = [10, 10, 1, 0], te = /* @__PURE__ */ y("div")({
|
|
176
|
-
name: "RemainingTimeCircle",
|
|
177
|
-
class: "r165427",
|
|
178
|
-
propsAsIs: !1
|
|
179
|
-
}), re = /* @__PURE__ */ y("div")({
|
|
180
|
-
name: "RemainingTime",
|
|
181
|
-
class: "r17garf3",
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { s as l } from "./feature.js";
|
|
3
|
+
const i = /* @__PURE__ */ l("div")({
|
|
4
|
+
name: "Container",
|
|
5
|
+
class: "cqg02m",
|
|
182
6
|
propsAsIs: !1
|
|
183
|
-
}),
|
|
184
|
-
className: t,
|
|
185
|
-
duration: e = 30,
|
|
186
|
-
onTimerExpired: i,
|
|
187
|
-
isPlaying: n = !0
|
|
188
|
-
}) => /* @__PURE__ */ d(P, {
|
|
189
|
-
isPlaying: n,
|
|
190
|
-
strokeWidth: 0,
|
|
191
|
-
duration: e,
|
|
192
|
-
colors: h,
|
|
193
|
-
size: 24,
|
|
194
|
-
onComplete: i,
|
|
195
|
-
children: ({
|
|
196
|
-
remainingTime: r
|
|
197
|
-
}) => /* @__PURE__ */ d(re, {
|
|
198
|
-
className: t,
|
|
199
|
-
children: e === 0 ? 0 : r
|
|
200
|
-
})
|
|
201
|
-
}), Re = ({
|
|
202
|
-
isPlaying: t = !0,
|
|
203
|
-
duration: e = 30,
|
|
204
|
-
onTimerExpired: i
|
|
205
|
-
}) => {
|
|
206
|
-
const [n, r] = A(e > 10 ? ne : h), [a, E] = A(2);
|
|
207
|
-
L(() => {
|
|
208
|
-
e === 0 && (E(0), r(Y));
|
|
209
|
-
}, [e]);
|
|
210
|
-
const l = ({
|
|
211
|
-
remainingTime: s
|
|
212
|
-
}) => /* @__PURE__ */ d(te, {
|
|
213
|
-
children: e === 0 ? 0 : s
|
|
214
|
-
}), T = p(() => {
|
|
215
|
-
i?.(), r(Y);
|
|
216
|
-
}, [i, r]), R = p((s) => {
|
|
217
|
-
s === 10 && r(h);
|
|
218
|
-
}, [r]);
|
|
219
|
-
return /* @__PURE__ */ d(P, {
|
|
220
|
-
isPlaying: t,
|
|
221
|
-
duration: e,
|
|
222
|
-
colors: x,
|
|
223
|
-
colorsTime: ee,
|
|
224
|
-
size: 32,
|
|
225
|
-
strokeWidth: a,
|
|
226
|
-
trailStrokeWidth: 2,
|
|
227
|
-
trailColor: n,
|
|
228
|
-
onComplete: T,
|
|
229
|
-
onUpdate: R,
|
|
230
|
-
children: l
|
|
231
|
-
});
|
|
232
|
-
}, ue = ({ height: t = "37px", width: e = "37px" }) => /* @__PURE__ */ d("div", { style: { height: t, width: e }, children: /* @__PURE__ */ d(b, { name: "loader" }) });
|
|
7
|
+
}), a = ({ children: s, style: e, loading: o }) => o ? /* @__PURE__ */ t(i, { style: e, children: s }) : s;
|
|
233
8
|
export {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
Re as L,
|
|
237
|
-
K as R,
|
|
238
|
-
Te as b,
|
|
239
|
-
ue as d
|
|
9
|
+
i as e,
|
|
10
|
+
a as i
|
|
240
11
|
};
|
package/lib/es/index9.js
CHANGED
|
@@ -1,11 +1,240 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { d as v } from "./index15.js";
|
|
3
|
+
import O, { useEffect as L, useRef as S, useState as A, useCallback as p, useLayoutEffect as w } from "react";
|
|
4
|
+
import { s as y } from "./feature.js";
|
|
5
|
+
import { M as b } from "./index5.js";
|
|
6
|
+
const K = {
|
|
7
|
+
BLUE_QUESTION_ACTION_BTN: "#1589ee",
|
|
8
|
+
WHITE: "#FFFFFF",
|
|
9
|
+
BLUE: "#2d6ffd",
|
|
10
|
+
GREY_PRIMARY: "#909395",
|
|
11
|
+
GREY_PRIMARY_ONBOARDING_INAPP: "#B5B7B8",
|
|
12
|
+
PRIMARY_1: "#1D7BFF",
|
|
13
|
+
// main
|
|
14
|
+
PRIMARY_2: "#095CD1",
|
|
15
|
+
// hover, active, ...etc (darken 10%)
|
|
16
|
+
PRIMARY_TEXT: "#090E13",
|
|
17
|
+
SECONDARY_TEXT: "rgba(10, 14, 19, 0.70)",
|
|
18
|
+
QUESTION_TYPE_ICON: "#1D7BFF",
|
|
19
|
+
QUESTION_BODY_TEXT: "#090E13",
|
|
20
|
+
PRESENTED_BY_TEXT: "#090E13",
|
|
21
|
+
SUCCESS: "#107D57",
|
|
22
|
+
UNSUCCESS: "#DF2F3B",
|
|
23
|
+
SECONDARY_RED1: "#DF2F3B",
|
|
24
|
+
NEUTRALS_WHITE: "#FFFFFF",
|
|
25
|
+
NEUTRALS_WHITE1: "#FFFFFF",
|
|
26
|
+
NEUTRALS_GRAY1: "#F7F7F7",
|
|
27
|
+
NEUTRALS_GRAY2: "#F2F2F1",
|
|
28
|
+
NEUTRALS_GRAY3: "#E8E8E8",
|
|
29
|
+
NEUTRALS_GRAY4: "#D9D9D6",
|
|
30
|
+
NEUTRALS_GRAY5: "#B1B3B3",
|
|
31
|
+
NEUTRALS_GRAY6: "#888B8D",
|
|
32
|
+
NEUTRALS_GRAY7: "#6B6F73",
|
|
33
|
+
NEUTRALS_GRAY9: "#25282A",
|
|
34
|
+
SDK_CONTAINER_BG: "#F7F7F7",
|
|
35
|
+
SDK_WHITE_CONTAINER_BG: "#fff",
|
|
36
|
+
SDK_DARK_CONTAINER_BG: "#fff",
|
|
37
|
+
SDK_PREDICTION_RESULT_SUCCESS_BG: "#fff",
|
|
38
|
+
SDK_PREDICTION_RESULT_INCORRECT_BG: "#fff",
|
|
39
|
+
SDK_PREDICTION_RESULT_SUCCESS_TEXT: "#107D57",
|
|
40
|
+
SDK_PREDICTION_RESULT_ERROR_TITLE: "#090E13",
|
|
41
|
+
SDK_PREDICTION_RESULT_ERROR_SUBTITLE: "#DF2F3B",
|
|
42
|
+
SDK_PREDICTION_RESULT_CLOSE_ICON: "#6B6F73",
|
|
43
|
+
SDK_PREDICTION_FEEDBACK_SUCCESS_ICON: "#107D57",
|
|
44
|
+
SDK_PREDICTION_FEEDBACK_INCORRECT_RECT1: "#CD2525",
|
|
45
|
+
SDK_PREDICTION_FEEDBACK_INCORRECT_RECT2: "#fff",
|
|
46
|
+
PREDICTION_BG_LINES_CORRECT: "#01AB58",
|
|
47
|
+
PREDICTION_BG_LINES_INCORRECT: "#888B8D",
|
|
48
|
+
SKELETON_COLOR_1: "#f1efef",
|
|
49
|
+
SKELETON_COLOR_2: "#f9f8f8",
|
|
50
|
+
TABS_CONTAINER_BG: "#F2F2F1",
|
|
51
|
+
TABS_ACTIVE_BG: "#FFFFFF",
|
|
52
|
+
TABS_COLOR: "#6B6F73",
|
|
53
|
+
TABS_ACTIVE_COLOR: "#1D7BFF",
|
|
54
|
+
CARD_BG: "#FFFFFF",
|
|
55
|
+
CARD_BORDER: "#fff",
|
|
56
|
+
BORDER: "#E8E8E8",
|
|
57
|
+
VOTE_BTN_BG: "#F7F7F7",
|
|
58
|
+
VOTE_BTN_BORDER: "rgb(232, 232, 232)",
|
|
59
|
+
VOTE_BTN_DISABLED_BORDER: "#B1B3B3",
|
|
60
|
+
VOTE_BTN_SELECTED_BORDER: "#25282A",
|
|
61
|
+
VOTE_BTN_NOT_SELECTED_BORDER: "#E8E8E8",
|
|
62
|
+
VOTE_BTN_SELECTED_BG: "#FFFFFF",
|
|
63
|
+
VOTE_BTN_SELECTED_BG_AD_UNIT: "#FFFFFF",
|
|
64
|
+
VOTE_BTN_NOT_SELECTED_BG: "#FFFFFF",
|
|
65
|
+
VOTE_BTN_NOT_SELECTED_BG_UNSET: "rgb(196, 196, 196)",
|
|
66
|
+
VOTED_ANSWER_BG: "#FFFFFF",
|
|
67
|
+
VOTED_BTN_RCT_BG: "#2d5694",
|
|
68
|
+
IN_APP_BG: "rgba(255, 255, 255, 0.90)",
|
|
69
|
+
IN_APP_QUESTION_TYPE_ICON: "#1D7BFF",
|
|
70
|
+
IN_APP_QUESTION_TYPE_LABEL: "#82899E",
|
|
71
|
+
IN_APP_QUESTION_QUOTE: "rgba(10, 14, 19, 0.70)",
|
|
72
|
+
IN_APP_QUESTION_RESULT_SUBTITLE_BG: "#1D7BFF",
|
|
73
|
+
IN_APP_QUESTION_RESULT_LINE: "#babfc5",
|
|
74
|
+
QUOTE_BORDER: "#E8E8E8",
|
|
75
|
+
QUOTE_TEXT: "rgba(10, 14, 19, 0.70)"
|
|
76
|
+
}, W = {
|
|
77
|
+
BG_PRIMARY: "#13212b",
|
|
78
|
+
BG_SECONDARY: "#152430",
|
|
79
|
+
BG_SECONDARY1: "#435059",
|
|
80
|
+
BORDER_PRIMARY: "rgba(255, 255, 255, 0.1)",
|
|
81
|
+
TEXT_PRIMARY: "#f9f9f9",
|
|
82
|
+
TEXT_PRIMARY1: "#f9f9f9",
|
|
83
|
+
TEXT_SECONDARY: "rgba(255, 255, 255, 0.8)",
|
|
84
|
+
TEXT_SECONDARY1: "#878787",
|
|
85
|
+
WHITE: "#fff"
|
|
86
|
+
}, x = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], M = "#cee5de", V = "#f9d6d8", Q = "#E8E8E8", le = {
|
|
87
|
+
xs: 324,
|
|
88
|
+
sm: 576,
|
|
89
|
+
md: 768,
|
|
90
|
+
lg: 992,
|
|
91
|
+
xl: 1200,
|
|
92
|
+
xxl: 1440
|
|
93
|
+
};
|
|
94
|
+
Object.entries(K).reduce((t, [e, i]) => `
|
|
95
|
+
${t}
|
|
96
|
+
--color-${e.toLowerCase().replaceAll("_", "-")}: ${i};
|
|
97
|
+
`, "");
|
|
98
|
+
Object.entries(W).reduce((t, [e, i]) => `
|
|
99
|
+
${t}
|
|
100
|
+
--color-adv-${e.toLowerCase().replaceAll("_", "-")}: ${i};
|
|
101
|
+
`, "");
|
|
102
|
+
const X = (t) => {
|
|
103
|
+
const { Component: e, options: i, customOptions: n, autoFocus: r, ...a } = t, E = v.useFocusable({
|
|
104
|
+
...i,
|
|
105
|
+
...n,
|
|
106
|
+
onEnterPress: () => t.onClick?.({ currentTarget: E.ref.current, stopPropagation: () => {
|
|
107
|
+
} })
|
|
108
|
+
});
|
|
109
|
+
return L(() => {
|
|
110
|
+
r && E.focusSelf();
|
|
111
|
+
}, []), /* @__PURE__ */ d(e, { ...a, ...E, "data-is-with-focus": "true" });
|
|
112
|
+
};
|
|
113
|
+
function Te(t, e) {
|
|
114
|
+
return ({ webos: i, options: n, ...r }) => i ? /* @__PURE__ */ d(X, { Component: t, options: e, customOptions: n, ...r }) : /* @__PURE__ */ d(t, { ...r });
|
|
115
|
+
}
|
|
116
|
+
var U = typeof window > "u" ? L : w, j = ({ isPlaying: t, duration: e, startAt: i = 0, updateInterval: n = 0, onComplete: r, onUpdate: a }) => {
|
|
117
|
+
let [E, l] = A(i), T = S(0), R = S(i), s = S(i * -1e3), _ = S(null), o = S(null), c = S(null), m = (f) => {
|
|
118
|
+
let u = f / 1e3;
|
|
119
|
+
if (o.current === null) {
|
|
120
|
+
o.current = u, _.current = requestAnimationFrame(m);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
let F = u - o.current, C = T.current + F;
|
|
124
|
+
o.current = u, T.current = C;
|
|
125
|
+
let B = R.current + (n === 0 ? C : (C / n | 0) * n), D = R.current + C, g = typeof e == "number" && D >= e;
|
|
126
|
+
l(g ? e : B), g || (_.current = requestAnimationFrame(m));
|
|
127
|
+
}, I = () => {
|
|
128
|
+
_.current && cancelAnimationFrame(_.current), c.current && clearTimeout(c.current), o.current = null;
|
|
129
|
+
}, N = p((f) => {
|
|
130
|
+
I(), T.current = 0;
|
|
131
|
+
let u = typeof f == "number" ? f : i;
|
|
132
|
+
R.current = u, l(u), t && (_.current = requestAnimationFrame(m));
|
|
133
|
+
}, [t, i]);
|
|
134
|
+
return U(() => {
|
|
135
|
+
if (a?.(E), e && E >= e) {
|
|
136
|
+
s.current += e * 1e3;
|
|
137
|
+
let { shouldRepeat: f = !1, delay: u = 0, newStartAt: F } = r?.(s.current / 1e3) || {};
|
|
138
|
+
f && (c.current = setTimeout(() => N(F), u * 1e3));
|
|
139
|
+
}
|
|
140
|
+
}, [E, e]), U(() => (t && (_.current = requestAnimationFrame(m)), I), [t, e, n]), { elapsedTime: E, reset: N };
|
|
141
|
+
}, z = (t, e, i) => {
|
|
142
|
+
let n = t / 2, r = e / 2, a = n - r, E = 2 * a, l = i === "clockwise" ? "1,0" : "0,1", T = 2 * Math.PI * a;
|
|
143
|
+
return { path: `m ${n},${r} a ${a},${a} 0 ${l} 0,${E} a ${a},${a} 0 ${l} 0,-${E}`, pathLength: T };
|
|
144
|
+
}, G = (t, e) => t === 0 || t === e ? 0 : typeof e == "number" ? t - e : 0, H = (t) => ({ position: "relative", width: t, height: t }), q = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, k = (t, e, i, n, r) => {
|
|
145
|
+
if (n === 0) return e;
|
|
146
|
+
let a = (r ? n - t : t) / n;
|
|
147
|
+
return e + i * a;
|
|
148
|
+
}, $ = (t) => {
|
|
149
|
+
var e, i;
|
|
150
|
+
return (i = (e = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (n, r, a, E) => `#${r}${r}${a}${a}${E}${E}`).substring(1).match(/.{2}/g)) == null ? void 0 : e.map((n) => parseInt(n, 16))) != null ? i : [];
|
|
151
|
+
}, J = (t, e) => {
|
|
152
|
+
var i;
|
|
153
|
+
let { colors: n, colorsTime: r, isSmoothColorTransition: a = !0 } = t;
|
|
154
|
+
if (typeof n == "string") return n;
|
|
155
|
+
let E = (i = r?.findIndex((o, c) => o >= e && e >= r[c + 1])) != null ? i : -1;
|
|
156
|
+
if (!r || E === -1) return n[0];
|
|
157
|
+
if (!a) return n[E];
|
|
158
|
+
let l = r[E] - e, T = r[E] - r[E + 1], R = $(n[E]), s = $(n[E + 1]), _ = !!t.isGrowing;
|
|
159
|
+
return `rgb(${R.map((o, c) => k(l, o, s[c] - o, T, _) | 0).join(",")})`;
|
|
160
|
+
}, Z = (t) => {
|
|
161
|
+
let { duration: e, initialRemainingTime: i, updateInterval: n, size: r = 180, strokeWidth: a = 12, trailStrokeWidth: E, isPlaying: l = !1, isGrowing: T = !1, rotation: R = "clockwise", onComplete: s, onUpdate: _ } = t, o = S(), c = Math.max(a, E ?? 0), { path: m, pathLength: I } = z(r, c, R), { elapsedTime: N } = j({ isPlaying: l, duration: e, startAt: G(e, i), updateInterval: n, onUpdate: typeof _ == "function" ? (u) => {
|
|
162
|
+
let F = Math.ceil(e - u);
|
|
163
|
+
F !== o.current && (o.current = F, _(F));
|
|
164
|
+
} : void 0, onComplete: typeof s == "function" ? (u) => {
|
|
165
|
+
var F;
|
|
166
|
+
let { shouldRepeat: C, delay: B, newInitialRemainingTime: D } = (F = s(u)) != null ? F : {};
|
|
167
|
+
if (C) return { shouldRepeat: C, delay: B, newStartAt: G(e, D) };
|
|
168
|
+
} : void 0 }), f = e - N;
|
|
169
|
+
return { elapsedTime: N, path: m, pathLength: I, remainingTime: Math.ceil(f), rotation: R, size: r, stroke: J(t, f), strokeDashoffset: k(N, 0, I, e, T), strokeWidth: a };
|
|
170
|
+
}, P = (t) => {
|
|
171
|
+
let { children: e, strokeLinecap: i, trailColor: n, trailStrokeWidth: r } = t, { path: a, pathLength: E, stroke: l, strokeDashoffset: T, remainingTime: R, elapsedTime: s, size: _, strokeWidth: o } = Z(t);
|
|
172
|
+
return O.createElement("div", { style: H(_) }, O.createElement("svg", { viewBox: `0 0 ${_} ${_}`, width: _, height: _, xmlns: "http://www.w3.org/2000/svg" }, O.createElement("path", { d: a, fill: "none", stroke: n ?? "#d9d9d9", strokeWidth: r ?? o }), O.createElement("path", { d: a, fill: "none", stroke: l, strokeLinecap: i ?? "round", strokeWidth: o, strokeDasharray: E, strokeDashoffset: T })), typeof e == "function" && O.createElement("div", { style: q }, e({ remainingTime: R, elapsedTime: s, color: l })));
|
|
173
|
+
};
|
|
174
|
+
P.displayName = "CountdownCircleTimer";
|
|
175
|
+
const ee = [10, 10, 1, 0], te = /* @__PURE__ */ y("div")({
|
|
176
|
+
name: "RemainingTimeCircle",
|
|
177
|
+
class: "r165427",
|
|
178
|
+
propsAsIs: !1
|
|
179
|
+
}), re = /* @__PURE__ */ y("div")({
|
|
180
|
+
name: "RemainingTime",
|
|
181
|
+
class: "r17garf3",
|
|
6
182
|
propsAsIs: !1
|
|
7
|
-
}),
|
|
183
|
+
}), ne = M, h = V, Y = Q, se = ({
|
|
184
|
+
className: t,
|
|
185
|
+
duration: e = 30,
|
|
186
|
+
onTimerExpired: i,
|
|
187
|
+
isPlaying: n = !0
|
|
188
|
+
}) => /* @__PURE__ */ d(P, {
|
|
189
|
+
isPlaying: n,
|
|
190
|
+
strokeWidth: 0,
|
|
191
|
+
duration: e,
|
|
192
|
+
colors: h,
|
|
193
|
+
size: 24,
|
|
194
|
+
onComplete: i,
|
|
195
|
+
children: ({
|
|
196
|
+
remainingTime: r
|
|
197
|
+
}) => /* @__PURE__ */ d(re, {
|
|
198
|
+
className: t,
|
|
199
|
+
children: e === 0 ? 0 : r
|
|
200
|
+
})
|
|
201
|
+
}), Re = ({
|
|
202
|
+
isPlaying: t = !0,
|
|
203
|
+
duration: e = 30,
|
|
204
|
+
onTimerExpired: i
|
|
205
|
+
}) => {
|
|
206
|
+
const [n, r] = A(e > 10 ? ne : h), [a, E] = A(2);
|
|
207
|
+
L(() => {
|
|
208
|
+
e === 0 && (E(0), r(Y));
|
|
209
|
+
}, [e]);
|
|
210
|
+
const l = ({
|
|
211
|
+
remainingTime: s
|
|
212
|
+
}) => /* @__PURE__ */ d(te, {
|
|
213
|
+
children: e === 0 ? 0 : s
|
|
214
|
+
}), T = p(() => {
|
|
215
|
+
i?.(), r(Y);
|
|
216
|
+
}, [i, r]), R = p((s) => {
|
|
217
|
+
s === 10 && r(h);
|
|
218
|
+
}, [r]);
|
|
219
|
+
return /* @__PURE__ */ d(P, {
|
|
220
|
+
isPlaying: t,
|
|
221
|
+
duration: e,
|
|
222
|
+
colors: x,
|
|
223
|
+
colorsTime: ee,
|
|
224
|
+
size: 32,
|
|
225
|
+
strokeWidth: a,
|
|
226
|
+
trailStrokeWidth: 2,
|
|
227
|
+
trailColor: n,
|
|
228
|
+
onComplete: T,
|
|
229
|
+
onUpdate: R,
|
|
230
|
+
children: l
|
|
231
|
+
});
|
|
232
|
+
}, ue = ({ height: t = "37px", width: e = "37px" }) => /* @__PURE__ */ d("div", { style: { height: t, width: e }, children: /* @__PURE__ */ d(b, { name: "loader" }) });
|
|
8
233
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
234
|
+
le as A,
|
|
235
|
+
se as G,
|
|
236
|
+
Re as L,
|
|
237
|
+
K as R,
|
|
238
|
+
Te as b,
|
|
239
|
+
ue as d
|
|
11
240
|
};
|
package/lib/es/insight.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as u, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { h as p } from "./
|
|
2
|
+
import { h as p } from "./index7.js";
|
|
3
3
|
import { u as a, s as h } from "./feature.js";
|
|
4
4
|
import { useRef as f, useEffect as l } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { t as I } from "./Question.js";
|
|
6
6
|
import { S as g } from "./useStreamLayerApp2.js";
|
|
7
|
-
import {
|
|
7
|
+
import { w as S, q as k, j as Q } from "./hooks-42q2i9Iw.js";
|
|
8
8
|
const y = () => I, A = /* @__PURE__ */ h(y())({
|
|
9
9
|
name: "QuestionWrap",
|
|
10
10
|
class: "q10hhsxv",
|
package/lib/es/masters.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import { S as s, M as m } from "./masters2.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import {
|
|
4
|
+
import { w as S } from "./hooks-42q2i9Iw.js";
|
|
5
5
|
export {
|
|
6
6
|
s as MastersStreamLayerProvider,
|
|
7
7
|
m as MastersStreamLayerSDKReact,
|