@yyc3/music-growth 1.0.0 → 2.0.1
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/LICENSE +27 -0
- package/README.md +77 -0
- package/dist/index.js +566 -575
- package/dist/index.js.map +1 -1
- package/package.json +23 -11
package/dist/index.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { jsx as e, jsxs as t, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { AnimatePresence as
|
|
4
|
-
import { Star as
|
|
5
|
-
import { clsx as
|
|
6
|
-
import { apiFetch as
|
|
7
|
-
import { useI18n as
|
|
8
|
-
import { DEMO_PLAYLIST as
|
|
9
|
-
import { ImageWithFallback as
|
|
10
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as t, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { useState as c, useCallback as O, useEffect as H, useRef as Te } from "react";
|
|
3
|
+
import { AnimatePresence as D, motion as b } from "motion/react";
|
|
4
|
+
import { Star as Z, X as V, Gift as fe, ChevronRight as se, Award as ke, Calendar as Ce, Sparkles as _, TrendingUp as q, Zap as oe, ShoppingBag as ne, Package as Ae, Palette as Pe, Music as G, Check as ge, AlertCircle as Re, Trophy as U, Info as $e, RefreshCw as De, Crown as We, Medal as we, Play as Se, Heart as Y, MessageCircle as Me, Rocket as Fe, Minus as Oe, ArrowUp as Be, ArrowDown as Ze, Flame as Ue, Users as ue, BarChart3 as _e, ExternalLink as Je, ArrowLeft as Ge, GitFork as Ne, GitBranch as ye } from "lucide-react";
|
|
5
|
+
import { clsx as u } from "clsx";
|
|
6
|
+
import { apiFetch as I } from "@yyc3/music-utils";
|
|
7
|
+
import { useI18n as J } from "@yyc3/music-hooks";
|
|
8
|
+
import { DEMO_PLAYLIST as Ye } from "@yyc3/music-data";
|
|
9
|
+
import { ImageWithFallback as qe } from "@yyc3/music-ui";
|
|
10
|
+
const He = {
|
|
11
11
|
daily_checkin: { zh: "每日签到", en: "Daily Check-in" },
|
|
12
12
|
like: { zh: "歌曲点赞", en: "Song Like" },
|
|
13
13
|
annotation: { zh: "情感标注", en: "Emotion Annotation" },
|
|
14
14
|
achievement: { zh: "成就解锁", en: "Achievement Unlocked" },
|
|
15
15
|
welcome: { zh: "注册奖励", en: "Welcome Bonus" }
|
|
16
|
-
},
|
|
17
|
-
isOpen:
|
|
18
|
-
onClose:
|
|
19
|
-
user:
|
|
20
|
-
starPower:
|
|
21
|
-
onStarPowerUpdate:
|
|
22
|
-
onOpenShop:
|
|
16
|
+
}, mt = ({
|
|
17
|
+
isOpen: d,
|
|
18
|
+
onClose: p,
|
|
19
|
+
user: i,
|
|
20
|
+
starPower: g,
|
|
21
|
+
onStarPowerUpdate: S,
|
|
22
|
+
onOpenShop: h
|
|
23
23
|
}) => {
|
|
24
|
-
const { t:
|
|
25
|
-
if (
|
|
26
|
-
|
|
24
|
+
const { t: r, lang: m } = J(), [x, W] = c(null), [N, M] = c([]), [j, P] = c(!1), [T, R] = c(0), [E, w] = c([]), [v, z] = c(!1), [A, n] = c(null), [s, k] = c(!1), l = O(async () => {
|
|
25
|
+
if (i) {
|
|
26
|
+
z(!0);
|
|
27
27
|
try {
|
|
28
|
-
const [o,
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const [o, L] = await Promise.all([
|
|
29
|
+
I(`/starpower/${i.id}/level`),
|
|
30
|
+
I(`/starpower/${i.id}/transactions`)
|
|
31
31
|
]);
|
|
32
|
-
o && (
|
|
32
|
+
o && (W(o.vipLevel), M(o.allLevels || []), P(o.checkedInToday || !1), R(o.streak || 0)), L?.transactions && w(L.transactions);
|
|
33
33
|
} catch (o) {
|
|
34
34
|
console.error("StarPower fetch error:", o);
|
|
35
35
|
} finally {
|
|
36
|
-
|
|
36
|
+
z(!1);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
}, [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
const
|
|
44
|
-
if (!(!
|
|
39
|
+
}, [i]);
|
|
40
|
+
H(() => {
|
|
41
|
+
d && i && l();
|
|
42
|
+
}, [d, i, l]);
|
|
43
|
+
const f = async () => {
|
|
44
|
+
if (!(!i || j))
|
|
45
45
|
try {
|
|
46
|
-
const o = await
|
|
46
|
+
const o = await I(`/starpower/${i.id}/checkin`, {
|
|
47
47
|
method: "POST",
|
|
48
48
|
headers: { "Content-Type": "application/json" },
|
|
49
49
|
body: JSON.stringify({})
|
|
50
50
|
});
|
|
51
|
-
o
|
|
51
|
+
o?.success ? (P(!0), R(o.streak), n({ reward: o.reward, streak: o.streak }), S(o.starPower), setTimeout(() => n(null), 3e3), l()) : o?.alreadyCheckedIn && P(!0);
|
|
52
52
|
} catch (o) {
|
|
53
53
|
console.error("Check-in error:", o);
|
|
54
54
|
}
|
|
55
|
-
}, C =
|
|
56
|
-
function
|
|
57
|
-
const
|
|
58
|
-
return
|
|
55
|
+
}, C = x?.nextThreshold ? (g - x.threshold) / (x.nextThreshold - x.threshold) * 100 : 100;
|
|
56
|
+
function F(o) {
|
|
57
|
+
const L = Date.now() - o;
|
|
58
|
+
return L < 6e4 ? m === "zh" ? "刚刚" : "just now" : L < 36e5 ? `${Math.floor(L / 6e4)}${m === "zh" ? "分钟前" : "m ago"}` : L < 864e5 ? `${Math.floor(L / 36e5)}${m === "zh" ? "小时前" : "h ago"}` : `${Math.floor(L / 864e5)}${m === "zh" ? "天前" : "d ago"}`;
|
|
59
59
|
}
|
|
60
|
-
return /* @__PURE__ */ e(
|
|
60
|
+
return /* @__PURE__ */ e(D, { children: d && /* @__PURE__ */ t(B, { children: [
|
|
61
61
|
/* @__PURE__ */ e(
|
|
62
|
-
|
|
62
|
+
b.div,
|
|
63
63
|
{
|
|
64
64
|
initial: { opacity: 0 },
|
|
65
65
|
animate: { opacity: 1 },
|
|
66
66
|
exit: { opacity: 0 },
|
|
67
67
|
className: "fixed inset-0 z-[60] bg-black/50 backdrop-blur-sm",
|
|
68
|
-
onClick:
|
|
68
|
+
onClick: p
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
71
|
/* @__PURE__ */ t(
|
|
72
|
-
|
|
72
|
+
b.div,
|
|
73
73
|
{
|
|
74
74
|
initial: { x: "100%", opacity: 0 },
|
|
75
75
|
animate: { x: 0, opacity: 1 },
|
|
@@ -79,106 +79,106 @@ const Ke = {
|
|
|
79
79
|
children: [
|
|
80
80
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between p-5 border-b border-white/[0.06] flex-shrink-0", children: [
|
|
81
81
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
82
|
-
/* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-xl bg-gradient-to-tr from-yellow-500/20 to-orange-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
82
|
+
/* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-xl bg-gradient-to-tr from-yellow-500/20 to-orange-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(Z, { className: "w-4.5 h-4.5 text-yellow-400 fill-yellow-400" }) }),
|
|
83
83
|
/* @__PURE__ */ t("div", { children: [
|
|
84
|
-
/* @__PURE__ */ e("h3", { className: "text-white font-semibold text-sm leading-tight", children:
|
|
85
|
-
/* @__PURE__ */ e("p", { className: "text-white/30 text-xs", children:
|
|
84
|
+
/* @__PURE__ */ e("h3", { className: "text-white font-semibold text-sm leading-tight", children: r("starpower.title") }),
|
|
85
|
+
/* @__PURE__ */ e("p", { className: "text-white/30 text-xs", children: r("starpower.subtitle") })
|
|
86
86
|
] })
|
|
87
87
|
] }),
|
|
88
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
88
|
+
/* @__PURE__ */ e("button", { onClick: p, className: "p-2 rounded-lg text-white/40 hover:text-white/70 hover:bg-white/5 transition-colors", children: /* @__PURE__ */ e(V, { className: "w-4 h-4" }) })
|
|
89
89
|
] }),
|
|
90
|
-
|
|
90
|
+
i ? /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto p-4", style: { scrollbarWidth: "none" }, children: [
|
|
91
91
|
/* @__PURE__ */ t("div", { className: "relative p-5 rounded-2xl bg-gradient-to-br from-yellow-500/10 via-orange-500/5 to-purple-500/10 border border-yellow-500/15 mb-4 overflow-hidden", children: [
|
|
92
92
|
/* @__PURE__ */ e("div", { className: "absolute -top-10 -right-10 w-32 h-32 bg-yellow-500/10 rounded-full blur-2xl" }),
|
|
93
93
|
/* @__PURE__ */ t("div", { className: "relative", children: [
|
|
94
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-yellow-200/50 uppercase tracking-wider mb-1", children:
|
|
94
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-yellow-200/50 uppercase tracking-wider mb-1", children: r("starpower.balance") }),
|
|
95
95
|
/* @__PURE__ */ t("div", { className: "flex items-baseline gap-2", children: [
|
|
96
|
-
/* @__PURE__ */ e("span", { className: "text-3xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-yellow-300 to-orange-400 font-mono tabular-nums", children:
|
|
96
|
+
/* @__PURE__ */ e("span", { className: "text-3xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-yellow-300 to-orange-400 font-mono tabular-nums", children: g.toLocaleString() }),
|
|
97
97
|
/* @__PURE__ */ e("span", { className: "text-xs text-yellow-300/40", children: "SP" })
|
|
98
98
|
] }),
|
|
99
|
-
|
|
99
|
+
x && /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mt-2", children: [
|
|
100
100
|
/* @__PURE__ */ e(
|
|
101
101
|
"span",
|
|
102
102
|
{
|
|
103
103
|
className: "text-xs font-medium px-2 py-0.5 rounded-full border",
|
|
104
|
-
style: { color:
|
|
105
|
-
children:
|
|
104
|
+
style: { color: x.color, borderColor: x.color + "40", backgroundColor: x.color + "15" },
|
|
105
|
+
children: m === "zh" ? x.label : x.labelEn
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
108
|
/* @__PURE__ */ t("span", { className: "text-[10px] text-white/20", children: [
|
|
109
109
|
"Lv.",
|
|
110
|
-
|
|
110
|
+
x.level
|
|
111
111
|
] })
|
|
112
112
|
] })
|
|
113
113
|
] })
|
|
114
114
|
] }),
|
|
115
|
-
|
|
115
|
+
h && /* @__PURE__ */ t(
|
|
116
116
|
"button",
|
|
117
117
|
{
|
|
118
118
|
onClick: () => {
|
|
119
|
-
|
|
119
|
+
p(), setTimeout(h, 150);
|
|
120
120
|
},
|
|
121
121
|
className: "w-full mb-4 flex items-center justify-between p-3 rounded-xl bg-gradient-to-r from-amber-500/[0.06] to-orange-500/[0.06] border border-amber-500/15 hover:border-amber-500/30 transition-all group",
|
|
122
122
|
children: [
|
|
123
123
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
124
|
-
/* @__PURE__ */ e(
|
|
125
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-white/60 group-hover:text-white/80 transition-colors", children:
|
|
124
|
+
/* @__PURE__ */ e(fe, { className: "w-4 h-4 text-amber-400" }),
|
|
125
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-white/60 group-hover:text-white/80 transition-colors", children: m === "zh" ? "星力商城 — 兑换虚拟好物" : "SP Shop — Redeem virtual items" })
|
|
126
126
|
] }),
|
|
127
127
|
/* @__PURE__ */ e(se, { className: "w-3.5 h-3.5 text-white/20 group-hover:text-white/40 transition-colors" })
|
|
128
128
|
]
|
|
129
129
|
}
|
|
130
130
|
),
|
|
131
|
-
|
|
131
|
+
x && /* @__PURE__ */ t("div", { className: "mb-4 p-3 rounded-xl bg-white/[0.02] border border-white/[0.06]", children: [
|
|
132
132
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-2", children: [
|
|
133
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-white/40", children:
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-white/40", children: r("starpower.vipLevel") }),
|
|
134
|
+
x.nextThreshold ? /* @__PURE__ */ t("span", { className: "text-[10px] text-white/25", children: [
|
|
135
|
+
r("starpower.needMore"),
|
|
136
136
|
" ",
|
|
137
|
-
(
|
|
137
|
+
(x.nextThreshold - g).toLocaleString(),
|
|
138
138
|
" ",
|
|
139
|
-
|
|
140
|
-
] }) : /* @__PURE__ */ e("span", { className: "text-[10px] text-yellow-400/50", children:
|
|
139
|
+
r("starpower.spMore")
|
|
140
|
+
] }) : /* @__PURE__ */ e("span", { className: "text-[10px] text-yellow-400/50", children: r("starpower.maxLevel") })
|
|
141
141
|
] }),
|
|
142
142
|
/* @__PURE__ */ e("div", { className: "h-2 rounded-full bg-white/[0.06] overflow-hidden", children: /* @__PURE__ */ e(
|
|
143
|
-
|
|
143
|
+
b.div,
|
|
144
144
|
{
|
|
145
145
|
initial: { width: 0 },
|
|
146
146
|
animate: { width: `${Math.min(C, 100)}%` },
|
|
147
147
|
transition: { duration: 0.8, ease: "easeOut" },
|
|
148
148
|
className: "h-full rounded-full",
|
|
149
|
-
style: { background: `linear-gradient(90deg, ${
|
|
149
|
+
style: { background: `linear-gradient(90deg, ${x.color}80, ${x.color})` }
|
|
150
150
|
}
|
|
151
151
|
) }),
|
|
152
152
|
/* @__PURE__ */ t(
|
|
153
153
|
"button",
|
|
154
154
|
{
|
|
155
|
-
onClick: () =>
|
|
155
|
+
onClick: () => k(!s),
|
|
156
156
|
className: "flex items-center gap-1 mt-2 text-[10px] text-white/20 hover:text-white/40 transition-colors",
|
|
157
157
|
children: [
|
|
158
|
-
/* @__PURE__ */ e(
|
|
159
|
-
|
|
160
|
-
/* @__PURE__ */ e(se, { className:
|
|
158
|
+
/* @__PURE__ */ e(ke, { className: "w-3 h-3" }),
|
|
159
|
+
r("starpower.allLevels"),
|
|
160
|
+
/* @__PURE__ */ e(se, { className: u("w-3 h-3 transition-transform", s && "rotate-90") })
|
|
161
161
|
]
|
|
162
162
|
}
|
|
163
163
|
),
|
|
164
|
-
/* @__PURE__ */ e(
|
|
165
|
-
|
|
164
|
+
/* @__PURE__ */ e(D, { children: s && /* @__PURE__ */ e(
|
|
165
|
+
b.div,
|
|
166
166
|
{
|
|
167
167
|
initial: { height: 0, opacity: 0 },
|
|
168
168
|
animate: { height: "auto", opacity: 1 },
|
|
169
169
|
exit: { height: 0, opacity: 0 },
|
|
170
170
|
className: "overflow-hidden mt-2",
|
|
171
|
-
children: /* @__PURE__ */ e("div", { className: "space-y-1", children:
|
|
171
|
+
children: /* @__PURE__ */ e("div", { className: "space-y-1", children: N.map((o) => /* @__PURE__ */ t(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
|
-
className:
|
|
174
|
+
className: u(
|
|
175
175
|
"flex items-center justify-between px-2 py-1 rounded-lg text-[11px]",
|
|
176
|
-
|
|
176
|
+
g >= o.threshold ? "bg-white/[0.03]" : "opacity-40"
|
|
177
177
|
),
|
|
178
178
|
children: [
|
|
179
179
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
180
180
|
/* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full", style: { backgroundColor: o.color } }),
|
|
181
|
-
/* @__PURE__ */ e("span", { className: "text-white/60", children:
|
|
181
|
+
/* @__PURE__ */ e("span", { className: "text-white/60", children: m === "zh" ? o.label : o.labelEn })
|
|
182
182
|
] }),
|
|
183
183
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
184
184
|
/* @__PURE__ */ t("span", { className: "text-white/25 font-mono tabular-nums", children: [
|
|
@@ -201,50 +201,50 @@ const Ke = {
|
|
|
201
201
|
/* @__PURE__ */ t("div", { className: "mb-4 p-3 rounded-xl bg-white/[0.02] border border-white/[0.06]", children: [
|
|
202
202
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
203
203
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
204
|
-
/* @__PURE__ */ e(
|
|
204
|
+
/* @__PURE__ */ e(Ce, { className: "w-4 h-4 text-orange-400" }),
|
|
205
205
|
/* @__PURE__ */ t("div", { children: [
|
|
206
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-white/60", children:
|
|
206
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-white/60", children: r("starpower.checkin") }),
|
|
207
207
|
/* @__PURE__ */ t("p", { className: "text-[10px] text-white/25", children: [
|
|
208
|
-
|
|
208
|
+
r("starpower.streak"),
|
|
209
209
|
": ",
|
|
210
|
-
|
|
210
|
+
T,
|
|
211
211
|
" ",
|
|
212
|
-
|
|
212
|
+
m === "zh" ? "天" : "days"
|
|
213
213
|
] })
|
|
214
214
|
] })
|
|
215
215
|
] }),
|
|
216
216
|
/* @__PURE__ */ e(
|
|
217
217
|
"button",
|
|
218
218
|
{
|
|
219
|
-
onClick:
|
|
220
|
-
disabled:
|
|
221
|
-
className:
|
|
219
|
+
onClick: f,
|
|
220
|
+
disabled: j,
|
|
221
|
+
className: u(
|
|
222
222
|
"px-4 py-2 rounded-xl text-xs font-medium transition-all",
|
|
223
|
-
|
|
223
|
+
j ? "bg-emerald-500/10 text-emerald-300 border border-emerald-500/20 cursor-default" : "bg-gradient-to-r from-yellow-500/20 to-orange-500/20 text-yellow-300 border border-yellow-500/20 hover:from-yellow-500/30 hover:to-orange-500/30"
|
|
224
224
|
),
|
|
225
|
-
children:
|
|
225
|
+
children: r(j ? "starpower.checkinDone" : "starpower.checkin")
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] }),
|
|
229
|
-
/* @__PURE__ */ e(
|
|
230
|
-
|
|
229
|
+
/* @__PURE__ */ e(D, { children: A && /* @__PURE__ */ e(
|
|
230
|
+
b.div,
|
|
231
231
|
{
|
|
232
232
|
initial: { height: 0, opacity: 0 },
|
|
233
233
|
animate: { height: "auto", opacity: 1 },
|
|
234
234
|
exit: { height: 0, opacity: 0 },
|
|
235
235
|
className: "overflow-hidden",
|
|
236
236
|
children: /* @__PURE__ */ t("div", { className: "mt-3 p-2 rounded-lg bg-yellow-500/10 border border-yellow-500/15 flex items-center gap-2", children: [
|
|
237
|
-
/* @__PURE__ */ e(
|
|
237
|
+
/* @__PURE__ */ e(_, { className: "w-4 h-4 text-yellow-400 flex-shrink-0" }),
|
|
238
238
|
/* @__PURE__ */ t("span", { className: "text-xs text-yellow-200", children: [
|
|
239
|
-
|
|
239
|
+
r("starpower.checkinReward"),
|
|
240
240
|
" +",
|
|
241
|
-
|
|
241
|
+
A.reward,
|
|
242
242
|
" SP",
|
|
243
|
-
|
|
243
|
+
A.streak > 1 && /* @__PURE__ */ t("span", { className: "text-yellow-300/50", children: [
|
|
244
244
|
" (",
|
|
245
|
-
|
|
245
|
+
r("starpower.streak"),
|
|
246
246
|
" ×",
|
|
247
|
-
|
|
247
|
+
A.streak,
|
|
248
248
|
")"
|
|
249
249
|
] })
|
|
250
250
|
] })
|
|
@@ -254,32 +254,31 @@ const Ke = {
|
|
|
254
254
|
] }),
|
|
255
255
|
/* @__PURE__ */ t("div", { children: [
|
|
256
256
|
/* @__PURE__ */ t("h4", { className: "text-xs font-medium text-white/30 uppercase tracking-wider mb-3 flex items-center gap-2", children: [
|
|
257
|
-
/* @__PURE__ */ e(
|
|
258
|
-
|
|
257
|
+
/* @__PURE__ */ e(q, { className: "w-3.5 h-3.5" }),
|
|
258
|
+
r("starpower.transactions")
|
|
259
259
|
] }),
|
|
260
|
-
|
|
261
|
-
/* @__PURE__ */ e(
|
|
262
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-white/20", children:
|
|
263
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-1", children:
|
|
264
|
-
|
|
265
|
-
const j = ((_ = Ke[o.reason]) == null ? void 0 : _[x]) || o.reason;
|
|
260
|
+
E.length === 0 ? /* @__PURE__ */ t("div", { className: "text-center py-8 bg-white/[0.01] rounded-xl border border-white/[0.04]", children: [
|
|
261
|
+
/* @__PURE__ */ e(fe, { className: "w-8 h-8 text-white/10 mx-auto mb-2" }),
|
|
262
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-white/20", children: r("starpower.noTransactions") })
|
|
263
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-1", children: E.slice(0, 20).map((o) => {
|
|
264
|
+
const L = He[o.reason]?.[m] || o.reason;
|
|
266
265
|
return /* @__PURE__ */ t("div", { className: "flex items-center justify-between py-2 px-2 rounded-lg hover:bg-white/[0.02] transition-colors", children: [
|
|
267
266
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
268
|
-
/* @__PURE__ */ e("div", { className:
|
|
267
|
+
/* @__PURE__ */ e("div", { className: u(
|
|
269
268
|
"w-6 h-6 rounded-full flex items-center justify-center",
|
|
270
269
|
o.type === "earn" ? "bg-emerald-500/10" : "bg-red-500/10"
|
|
271
|
-
), children: o.type === "earn" ? /* @__PURE__ */ e(
|
|
270
|
+
), children: o.type === "earn" ? /* @__PURE__ */ e(q, { className: "w-3 h-3 text-emerald-400" }) : /* @__PURE__ */ e(oe, { className: "w-3 h-3 text-red-400" }) }),
|
|
272
271
|
/* @__PURE__ */ t("div", { children: [
|
|
273
|
-
/* @__PURE__ */ e("p", { className: "text-[11px] text-white/60", children:
|
|
272
|
+
/* @__PURE__ */ e("p", { className: "text-[11px] text-white/60", children: L }),
|
|
274
273
|
/* @__PURE__ */ t("p", { className: "text-[9px] text-white/15", children: [
|
|
275
274
|
o.detail,
|
|
276
275
|
" · ",
|
|
277
|
-
|
|
276
|
+
F(o.timestamp)
|
|
278
277
|
] })
|
|
279
278
|
] })
|
|
280
279
|
] }),
|
|
281
280
|
/* @__PURE__ */ t("div", { className: "text-right", children: [
|
|
282
|
-
/* @__PURE__ */ t("p", { className:
|
|
281
|
+
/* @__PURE__ */ t("p", { className: u(
|
|
283
282
|
"text-xs font-mono tabular-nums font-medium",
|
|
284
283
|
o.type === "earn" ? "text-emerald-400" : "text-red-400"
|
|
285
284
|
), children: [
|
|
@@ -294,79 +293,79 @@ const Ke = {
|
|
|
294
293
|
] }, o.id);
|
|
295
294
|
}) })
|
|
296
295
|
] })
|
|
297
|
-
] }) : /* @__PURE__ */ e("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children:
|
|
296
|
+
] }) : /* @__PURE__ */ e("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children: r("starpower.signInRequired") }) })
|
|
298
297
|
]
|
|
299
298
|
}
|
|
300
299
|
)
|
|
301
300
|
] }) });
|
|
302
|
-
},
|
|
301
|
+
}, Ve = [
|
|
303
302
|
{ id: "all", labelZh: "全部", labelEn: "All", icon: ne },
|
|
304
|
-
{ id: "theme", labelZh: "主题", labelEn: "Themes", icon:
|
|
305
|
-
{ id: "sound", labelZh: "音色", labelEn: "Sounds", icon:
|
|
306
|
-
{ id: "ai", labelZh: "AI", labelEn: "AI", icon:
|
|
307
|
-
{ id: "badge", labelZh: "徽章", labelEn: "Badges", icon:
|
|
303
|
+
{ id: "theme", labelZh: "主题", labelEn: "Themes", icon: Pe },
|
|
304
|
+
{ id: "sound", labelZh: "音色", labelEn: "Sounds", icon: G },
|
|
305
|
+
{ id: "ai", labelZh: "AI", labelEn: "AI", icon: _ },
|
|
306
|
+
{ id: "badge", labelZh: "徽章", labelEn: "Badges", icon: Z },
|
|
308
307
|
{ id: "boost", labelZh: "加速", labelEn: "Boost", icon: oe }
|
|
309
|
-
],
|
|
308
|
+
], ve = {
|
|
310
309
|
common: { bg: "from-gray-500/10 to-gray-600/10", border: "border-gray-500/20", text: "text-gray-400", label: "普通", labelEn: "Common" },
|
|
311
310
|
rare: { bg: "from-blue-500/10 to-cyan-500/10", border: "border-blue-500/20", text: "text-blue-400", label: "稀有", labelEn: "Rare" },
|
|
312
311
|
epic: { bg: "from-purple-500/10 to-pink-500/10", border: "border-purple-500/20", text: "text-purple-400", label: "史诗", labelEn: "Epic" },
|
|
313
312
|
legendary: { bg: "from-amber-500/10 to-orange-500/10", border: "border-amber-500/20", text: "text-amber-400", label: "传说", labelEn: "Legendary" }
|
|
314
|
-
},
|
|
315
|
-
isOpen:
|
|
316
|
-
onClose:
|
|
317
|
-
user:
|
|
318
|
-
starPower:
|
|
319
|
-
onStarPowerUpdate:
|
|
313
|
+
}, xt = ({
|
|
314
|
+
isOpen: d,
|
|
315
|
+
onClose: p,
|
|
316
|
+
user: i,
|
|
317
|
+
starPower: g,
|
|
318
|
+
onStarPowerUpdate: S
|
|
320
319
|
}) => {
|
|
321
|
-
const { lang:
|
|
322
|
-
if (
|
|
320
|
+
const { lang: h } = J(), [r, m] = c([]), [x, W] = c([]), [N, M] = c("all"), [j, P] = c(!1), [T, R] = c(null), [E, w] = c(null), [v, z] = c(null), A = O(async () => {
|
|
321
|
+
if (i) {
|
|
323
322
|
P(!0);
|
|
324
323
|
try {
|
|
325
|
-
const [l,
|
|
326
|
-
|
|
327
|
-
|
|
324
|
+
const [l, f] = await Promise.all([
|
|
325
|
+
I("/starpower/shop/items"),
|
|
326
|
+
I(`/starpower/shop/inventory/${i.id}`)
|
|
328
327
|
]);
|
|
329
|
-
l
|
|
328
|
+
l?.items && m(l.items), f?.inventory && W(f.inventory);
|
|
330
329
|
} catch (l) {
|
|
331
330
|
console.error("Shop fetch error:", l);
|
|
332
331
|
} finally {
|
|
333
332
|
P(!1);
|
|
334
333
|
}
|
|
335
334
|
}
|
|
336
|
-
}, [
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}, [
|
|
340
|
-
const n = (l) =>
|
|
341
|
-
if (!(!
|
|
342
|
-
|
|
335
|
+
}, [i]);
|
|
336
|
+
H(() => {
|
|
337
|
+
d && i && A();
|
|
338
|
+
}, [d, i, A]);
|
|
339
|
+
const n = (l) => x.some((f) => f.itemId === l), s = async (l) => {
|
|
340
|
+
if (!(!i || T)) {
|
|
341
|
+
R(l.id), w(null);
|
|
343
342
|
try {
|
|
344
|
-
const
|
|
343
|
+
const f = await I("/starpower/shop/purchase", {
|
|
345
344
|
method: "POST",
|
|
346
345
|
headers: { "Content-Type": "application/json" },
|
|
347
|
-
body: JSON.stringify({ userId:
|
|
346
|
+
body: JSON.stringify({ userId: i.id, itemId: l.id })
|
|
348
347
|
});
|
|
349
|
-
|
|
348
|
+
f?.success ? (S(f.starPower), W((C) => [...C, { itemId: l.id, purchasedAt: Date.now(), expiresAt: null }]), w({ success: !0, message: h === "zh" ? "购买成功!" : "Purchase successful!" })) : w({ success: !1, message: f?.error || (h === "zh" ? "购买失败" : "Purchase failed") });
|
|
350
349
|
} catch {
|
|
351
|
-
|
|
350
|
+
w({ success: !1, message: h === "zh" ? "网络错误" : "Network error" });
|
|
352
351
|
} finally {
|
|
353
|
-
|
|
352
|
+
R(null), z(null), setTimeout(() => w(null), 3e3);
|
|
354
353
|
}
|
|
355
354
|
}
|
|
356
|
-
},
|
|
357
|
-
return /* @__PURE__ */ e(
|
|
355
|
+
}, k = N === "all" ? r : r.filter((l) => l.category === N);
|
|
356
|
+
return /* @__PURE__ */ e(D, { children: d && /* @__PURE__ */ t(B, { children: [
|
|
358
357
|
/* @__PURE__ */ e(
|
|
359
|
-
|
|
358
|
+
b.div,
|
|
360
359
|
{
|
|
361
360
|
initial: { opacity: 0 },
|
|
362
361
|
animate: { opacity: 1 },
|
|
363
362
|
exit: { opacity: 0 },
|
|
364
363
|
className: "fixed inset-0 z-[60] bg-black/50 backdrop-blur-sm",
|
|
365
|
-
onClick:
|
|
364
|
+
onClick: p
|
|
366
365
|
}
|
|
367
366
|
),
|
|
368
367
|
/* @__PURE__ */ t(
|
|
369
|
-
|
|
368
|
+
b.div,
|
|
370
369
|
{
|
|
371
370
|
initial: { x: "100%", opacity: 0 },
|
|
372
371
|
animate: { x: 0, opacity: 1 },
|
|
@@ -378,87 +377,87 @@ const Ke = {
|
|
|
378
377
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2.5", children: [
|
|
379
378
|
/* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-lg bg-gradient-to-br from-amber-500/20 to-orange-500/20 flex items-center justify-center", children: /* @__PURE__ */ e(ne, { className: "w-4 h-4 text-amber-400" }) }),
|
|
380
379
|
/* @__PURE__ */ t("div", { children: [
|
|
381
|
-
/* @__PURE__ */ e("h2", { className: "text-base font-bold text-white leading-tight", children:
|
|
382
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/30", children:
|
|
380
|
+
/* @__PURE__ */ e("h2", { className: "text-base font-bold text-white leading-tight", children: h === "zh" ? "星力商城" : "Star Power Shop" }),
|
|
381
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/30", children: h === "zh" ? "用星力值兑换虚拟好物" : "Exchange SP for virtual items" })
|
|
383
382
|
] })
|
|
384
383
|
] }),
|
|
385
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
384
|
+
/* @__PURE__ */ e("button", { onClick: p, className: "w-7 h-7 rounded-full bg-white/5 flex items-center justify-center hover:bg-white/10 transition-colors", children: /* @__PURE__ */ e(V, { className: "w-3.5 h-3.5 text-white/40" }) })
|
|
386
385
|
] }),
|
|
387
386
|
/* @__PURE__ */ e("div", { className: "px-5 py-3 bg-gradient-to-r from-amber-500/[0.06] to-orange-500/[0.06] border-b border-white/[0.04]", children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
388
387
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
389
|
-
/* @__PURE__ */ e(
|
|
390
|
-
/* @__PURE__ */ e("span", { className: "text-yellow-200 font-bold text-lg tabular-nums", children:
|
|
391
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-white/30", children:
|
|
388
|
+
/* @__PURE__ */ e(Z, { className: "w-4 h-4 text-yellow-400 fill-yellow-400" }),
|
|
389
|
+
/* @__PURE__ */ e("span", { className: "text-yellow-200 font-bold text-lg tabular-nums", children: g }),
|
|
390
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-white/30", children: h === "zh" ? "可用星力值" : "SP available" })
|
|
392
391
|
] }),
|
|
393
392
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 text-[10px] text-white/20", children: [
|
|
394
|
-
/* @__PURE__ */ e(
|
|
395
|
-
|
|
393
|
+
/* @__PURE__ */ e(Ae, { className: "w-3 h-3" }),
|
|
394
|
+
x.length,
|
|
396
395
|
" ",
|
|
397
|
-
|
|
396
|
+
h === "zh" ? "件已拥有" : "owned"
|
|
398
397
|
] })
|
|
399
398
|
] }) }),
|
|
400
|
-
/* @__PURE__ */ e("div", { className: "px-4 py-2.5 border-b border-white/[0.04] overflow-x-auto no-scrollbar", children: /* @__PURE__ */ e("div", { className: "flex items-center gap-1.5", children:
|
|
401
|
-
const
|
|
399
|
+
/* @__PURE__ */ e("div", { className: "px-4 py-2.5 border-b border-white/[0.04] overflow-x-auto no-scrollbar", children: /* @__PURE__ */ e("div", { className: "flex items-center gap-1.5", children: Ve.map((l) => {
|
|
400
|
+
const f = l.icon, C = N === l.id;
|
|
402
401
|
return /* @__PURE__ */ t(
|
|
403
402
|
"button",
|
|
404
403
|
{
|
|
405
|
-
onClick: () =>
|
|
406
|
-
className:
|
|
404
|
+
onClick: () => M(l.id),
|
|
405
|
+
className: u(
|
|
407
406
|
"flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium whitespace-nowrap transition-all",
|
|
408
407
|
C ? "bg-amber-500/15 text-amber-400 border border-amber-500/30" : "bg-white/[0.03] text-white/30 border border-transparent hover:bg-white/[0.06] hover:text-white/50"
|
|
409
408
|
),
|
|
410
409
|
children: [
|
|
411
|
-
/* @__PURE__ */ e(
|
|
412
|
-
|
|
410
|
+
/* @__PURE__ */ e(f, { className: "w-3 h-3" }),
|
|
411
|
+
h === "zh" ? l.labelZh : l.labelEn
|
|
413
412
|
]
|
|
414
413
|
},
|
|
415
414
|
l.id
|
|
416
415
|
);
|
|
417
416
|
}) }) }),
|
|
418
|
-
/* @__PURE__ */ e(
|
|
419
|
-
|
|
417
|
+
/* @__PURE__ */ e(D, { children: E && /* @__PURE__ */ t(
|
|
418
|
+
b.div,
|
|
420
419
|
{
|
|
421
420
|
initial: { opacity: 0, y: -10 },
|
|
422
421
|
animate: { opacity: 1, y: 0 },
|
|
423
422
|
exit: { opacity: 0, y: -10 },
|
|
424
|
-
className:
|
|
423
|
+
className: u(
|
|
425
424
|
"mx-4 mt-2 px-3 py-2 rounded-lg text-xs font-medium flex items-center gap-2",
|
|
426
|
-
|
|
425
|
+
E.success ? "bg-emerald-500/15 text-emerald-400 border border-emerald-500/20" : "bg-red-500/15 text-red-400 border border-red-500/20"
|
|
427
426
|
),
|
|
428
427
|
children: [
|
|
429
|
-
|
|
430
|
-
|
|
428
|
+
E.success ? /* @__PURE__ */ e(ge, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ e(Re, { className: "w-3.5 h-3.5" }),
|
|
429
|
+
E.message
|
|
431
430
|
]
|
|
432
431
|
}
|
|
433
432
|
) }),
|
|
434
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto p-4", children:
|
|
433
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto p-4", children: j ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 border-2 border-amber-400/30 border-t-amber-400 rounded-full animate-spin" }) }) : k.length === 0 ? /* @__PURE__ */ t("div", { className: "text-center py-10", children: [
|
|
435
434
|
/* @__PURE__ */ e(ne, { className: "w-10 h-10 text-white/10 mx-auto mb-3" }),
|
|
436
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-white/30", children:
|
|
437
|
-
] }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-3", children:
|
|
438
|
-
const
|
|
435
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-white/30", children: h === "zh" ? "此分类暂无商品" : "No items in this category" })
|
|
436
|
+
] }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-3", children: k.map((l) => {
|
|
437
|
+
const f = ve[l.rarity] || ve.common, C = n(l.id), F = g >= l.cost;
|
|
439
438
|
return /* @__PURE__ */ t(
|
|
440
|
-
|
|
439
|
+
b.button,
|
|
441
440
|
{
|
|
442
441
|
whileTap: { scale: 0.97 },
|
|
443
|
-
onClick: () => !C &&
|
|
442
|
+
onClick: () => !C && z(l),
|
|
444
443
|
disabled: C,
|
|
445
|
-
className:
|
|
444
|
+
className: u(
|
|
446
445
|
"relative flex flex-col p-3 rounded-xl border text-left transition-all",
|
|
447
|
-
C ? "bg-white/[0.02] border-white/[0.04] opacity-60" : `bg-gradient-to-br ${
|
|
446
|
+
C ? "bg-white/[0.02] border-white/[0.04] opacity-60" : `bg-gradient-to-br ${f.bg} ${f.border} hover:brightness-110`
|
|
448
447
|
),
|
|
449
448
|
children: [
|
|
450
|
-
/* @__PURE__ */ e("span", { className:
|
|
449
|
+
/* @__PURE__ */ e("span", { className: u("absolute top-2 right-2 text-[8px] font-bold uppercase tracking-wider", f.text), children: h === "zh" ? f.label : f.labelEn }),
|
|
451
450
|
/* @__PURE__ */ e("span", { className: "text-2xl mb-2", children: l.icon }),
|
|
452
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-white font-semibold leading-tight", children:
|
|
453
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/30 mt-0.5 leading-tight line-clamp-2", children:
|
|
451
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-white font-semibold leading-tight", children: h === "zh" ? l.nameZh : l.nameEn }),
|
|
452
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/30 mt-0.5 leading-tight line-clamp-2", children: h === "zh" ? l.descZh : l.descEn }),
|
|
454
453
|
/* @__PURE__ */ e("div", { className: "mt-auto pt-2 flex items-center justify-between", children: C ? /* @__PURE__ */ t("span", { className: "flex items-center gap-1 text-[10px] text-emerald-400/60", children: [
|
|
455
|
-
/* @__PURE__ */ e(
|
|
456
|
-
|
|
457
|
-
] }) : /* @__PURE__ */ t("span", { className:
|
|
454
|
+
/* @__PURE__ */ e(ge, { className: "w-3 h-3" }),
|
|
455
|
+
h === "zh" ? "已拥有" : "Owned"
|
|
456
|
+
] }) : /* @__PURE__ */ t("span", { className: u(
|
|
458
457
|
"flex items-center gap-1 text-xs font-bold",
|
|
459
|
-
|
|
458
|
+
F ? "text-yellow-400" : "text-red-400/60"
|
|
460
459
|
), children: [
|
|
461
|
-
/* @__PURE__ */ e(
|
|
460
|
+
/* @__PURE__ */ e(Z, { className: "w-3 h-3 fill-current" }),
|
|
462
461
|
l.cost
|
|
463
462
|
] }) })
|
|
464
463
|
]
|
|
@@ -466,16 +465,16 @@ const Ke = {
|
|
|
466
465
|
l.id
|
|
467
466
|
);
|
|
468
467
|
}) }) }),
|
|
469
|
-
/* @__PURE__ */ e(
|
|
470
|
-
|
|
468
|
+
/* @__PURE__ */ e(D, { children: v && /* @__PURE__ */ e(
|
|
469
|
+
b.div,
|
|
471
470
|
{
|
|
472
471
|
initial: { opacity: 0 },
|
|
473
472
|
animate: { opacity: 1 },
|
|
474
473
|
exit: { opacity: 0 },
|
|
475
474
|
className: "absolute inset-0 z-10 bg-black/70 backdrop-blur-sm flex items-center justify-center p-6",
|
|
476
|
-
onClick: () =>
|
|
475
|
+
onClick: () => z(null),
|
|
477
476
|
children: /* @__PURE__ */ t(
|
|
478
|
-
|
|
477
|
+
b.div,
|
|
479
478
|
{
|
|
480
479
|
initial: { scale: 0.9, opacity: 0 },
|
|
481
480
|
animate: { scale: 1, opacity: 1 },
|
|
@@ -483,34 +482,34 @@ const Ke = {
|
|
|
483
482
|
onClick: (l) => l.stopPropagation(),
|
|
484
483
|
className: "w-full max-w-[280px] bg-[#0F1540] border border-white/10 rounded-2xl p-5 text-center",
|
|
485
484
|
children: [
|
|
486
|
-
/* @__PURE__ */ e("span", { className: "text-4xl block mb-3", children:
|
|
487
|
-
/* @__PURE__ */ e("p", { className: "text-white font-bold text-sm", children:
|
|
488
|
-
/* @__PURE__ */ e("p", { className: "text-white/30 text-[11px] mt-1", children:
|
|
485
|
+
/* @__PURE__ */ e("span", { className: "text-4xl block mb-3", children: v.icon }),
|
|
486
|
+
/* @__PURE__ */ e("p", { className: "text-white font-bold text-sm", children: h === "zh" ? v.nameZh : v.nameEn }),
|
|
487
|
+
/* @__PURE__ */ e("p", { className: "text-white/30 text-[11px] mt-1", children: h === "zh" ? v.descZh : v.descEn }),
|
|
489
488
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-center gap-1 my-4 text-yellow-400 font-bold", children: [
|
|
490
|
-
/* @__PURE__ */ e(
|
|
491
|
-
/* @__PURE__ */ e("span", { className: "text-lg", children:
|
|
489
|
+
/* @__PURE__ */ e(Z, { className: "w-4 h-4 fill-yellow-400" }),
|
|
490
|
+
/* @__PURE__ */ e("span", { className: "text-lg", children: v.cost }),
|
|
492
491
|
/* @__PURE__ */ e("span", { className: "text-xs text-yellow-400/50 ml-1", children: "SP" })
|
|
493
492
|
] }),
|
|
494
|
-
|
|
493
|
+
g < v.cost ? /* @__PURE__ */ e("p", { className: "text-xs text-red-400/70 mb-3", children: h === "zh" ? `星力值不足(需 ${v.cost},当前 ${g})` : `Insufficient SP (need ${v.cost}, have ${g})` }) : null,
|
|
495
494
|
/* @__PURE__ */ t("div", { className: "flex gap-2", children: [
|
|
496
495
|
/* @__PURE__ */ e(
|
|
497
496
|
"button",
|
|
498
497
|
{
|
|
499
|
-
onClick: () =>
|
|
498
|
+
onClick: () => z(null),
|
|
500
499
|
className: "flex-1 py-2 rounded-lg bg-white/5 text-white/50 text-xs hover:bg-white/10 transition-colors",
|
|
501
|
-
children:
|
|
500
|
+
children: h === "zh" ? "取消" : "Cancel"
|
|
502
501
|
}
|
|
503
502
|
),
|
|
504
503
|
/* @__PURE__ */ e(
|
|
505
504
|
"button",
|
|
506
505
|
{
|
|
507
|
-
onClick: () => s(
|
|
508
|
-
disabled:
|
|
509
|
-
className:
|
|
506
|
+
onClick: () => s(v),
|
|
507
|
+
disabled: g < v.cost || !!T,
|
|
508
|
+
className: u(
|
|
510
509
|
"flex-1 py-2 rounded-lg text-xs font-medium transition-all",
|
|
511
|
-
|
|
510
|
+
g >= v.cost ? "bg-gradient-to-r from-amber-500 to-orange-500 text-white hover:brightness-110" : "bg-white/5 text-white/20 cursor-not-allowed"
|
|
512
511
|
),
|
|
513
|
-
children:
|
|
512
|
+
children: T ? "..." : h === "zh" ? "确认购买" : "Confirm"
|
|
514
513
|
}
|
|
515
514
|
)
|
|
516
515
|
] })
|
|
@@ -523,95 +522,95 @@ const Ke = {
|
|
|
523
522
|
}
|
|
524
523
|
)
|
|
525
524
|
] }) });
|
|
526
|
-
},
|
|
527
|
-
{ icon:
|
|
528
|
-
{ icon:
|
|
529
|
-
{ icon:
|
|
530
|
-
],
|
|
531
|
-
function
|
|
525
|
+
}, Ke = [
|
|
526
|
+
{ icon: We, color: "text-yellow-400", bg: "from-yellow-500/20 to-amber-500/20", border: "border-yellow-500/30", glow: "shadow-yellow-500/20", barColor: "from-yellow-400 to-amber-500" },
|
|
527
|
+
{ icon: we, color: "text-gray-300", bg: "from-gray-400/20 to-slate-400/20", border: "border-gray-400/20", glow: "shadow-gray-400/10", barColor: "from-gray-300 to-slate-400" },
|
|
528
|
+
{ icon: we, color: "text-amber-600", bg: "from-amber-600/20 to-orange-600/20", border: "border-amber-600/20", glow: "shadow-amber-600/10", barColor: "from-amber-500 to-orange-500" }
|
|
529
|
+
], ze = "dmusic-leaderboard-prev";
|
|
530
|
+
function Ie() {
|
|
532
531
|
try {
|
|
533
|
-
const
|
|
534
|
-
if (
|
|
532
|
+
const d = localStorage.getItem(ze);
|
|
533
|
+
if (d) return JSON.parse(d);
|
|
535
534
|
} catch {
|
|
536
535
|
}
|
|
537
536
|
return {};
|
|
538
537
|
}
|
|
539
|
-
function
|
|
538
|
+
function ee(d) {
|
|
540
539
|
try {
|
|
541
|
-
const
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
}), localStorage.setItem(
|
|
540
|
+
const p = {};
|
|
541
|
+
d.forEach((i, g) => {
|
|
542
|
+
p[i.songId] = g + 1;
|
|
543
|
+
}), localStorage.setItem(ze, JSON.stringify(p));
|
|
545
544
|
} catch {
|
|
546
545
|
}
|
|
547
546
|
}
|
|
548
|
-
function
|
|
549
|
-
const
|
|
550
|
-
return
|
|
551
|
-
const
|
|
552
|
-
let
|
|
553
|
-
return
|
|
547
|
+
function Qe(d) {
|
|
548
|
+
const p = Ie(), i = Object.keys(p).length > 0;
|
|
549
|
+
return d.map((g, S) => {
|
|
550
|
+
const h = S + 1, r = p[g.songId] ?? null;
|
|
551
|
+
let m = null;
|
|
552
|
+
return i ? r === null ? m = null : m = r - h : m = null, { ...g, rankChange: m, previousRank: r };
|
|
554
553
|
});
|
|
555
554
|
}
|
|
556
|
-
function
|
|
557
|
-
return
|
|
555
|
+
function Xe(d) {
|
|
556
|
+
return d.length === 0 ? 1 : Math.max(...d.map((p) => p.wilsonScore), 1e-4);
|
|
558
557
|
}
|
|
559
|
-
const
|
|
560
|
-
isOpen:
|
|
561
|
-
onClose:
|
|
562
|
-
onSelectTrack:
|
|
563
|
-
user:
|
|
564
|
-
starPower:
|
|
565
|
-
onStarPowerUpdate:
|
|
558
|
+
const pt = ({
|
|
559
|
+
isOpen: d,
|
|
560
|
+
onClose: p,
|
|
561
|
+
onSelectTrack: i,
|
|
562
|
+
user: g,
|
|
563
|
+
starPower: S = 0,
|
|
564
|
+
onStarPowerUpdate: h
|
|
566
565
|
}) => {
|
|
567
|
-
const [
|
|
568
|
-
if (!(!
|
|
566
|
+
const [r, m] = c([]), [x, W] = c([]), [N, M] = c(!1), [j, P] = c(!1), [T, R] = c(null), E = Te(!0), { t: w } = J(), v = async (s) => {
|
|
567
|
+
if (!(!g || S < 100))
|
|
569
568
|
try {
|
|
570
|
-
const
|
|
569
|
+
const k = await I("/leaderboard/boost", {
|
|
571
570
|
method: "POST",
|
|
572
571
|
headers: { "Content-Type": "application/json" },
|
|
573
|
-
body: JSON.stringify({ userId:
|
|
572
|
+
body: JSON.stringify({ userId: g.id, songId: s, amount: 100 })
|
|
574
573
|
});
|
|
575
|
-
|
|
576
|
-
} catch (
|
|
577
|
-
console.error("Boost error:",
|
|
574
|
+
k?.success && (h?.(k.starPower), R(s), setTimeout(() => R(null), 2e3), x.length > 0 && ee(x), z());
|
|
575
|
+
} catch (k) {
|
|
576
|
+
console.error("Boost error:", k);
|
|
578
577
|
}
|
|
579
|
-
},
|
|
580
|
-
|
|
578
|
+
}, z = O(async () => {
|
|
579
|
+
M(!0);
|
|
581
580
|
try {
|
|
582
|
-
const s = await
|
|
583
|
-
if (s
|
|
584
|
-
const
|
|
585
|
-
if (
|
|
586
|
-
|
|
581
|
+
const s = await I("/leaderboard");
|
|
582
|
+
if (s?.rankings) {
|
|
583
|
+
const k = Qe(s.rankings);
|
|
584
|
+
if (m(k), W(s.rankings), !E.current)
|
|
585
|
+
ee(s.rankings);
|
|
587
586
|
else {
|
|
588
|
-
const l =
|
|
589
|
-
Object.keys(l).length === 0 &&
|
|
587
|
+
const l = Ie();
|
|
588
|
+
Object.keys(l).length === 0 && ee(s.rankings), E.current = !1;
|
|
590
589
|
}
|
|
591
590
|
}
|
|
592
591
|
} catch (s) {
|
|
593
592
|
console.error("Failed to fetch leaderboard:", s);
|
|
594
593
|
} finally {
|
|
595
|
-
|
|
594
|
+
M(!1);
|
|
596
595
|
}
|
|
597
596
|
}, []);
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
}, [
|
|
601
|
-
const
|
|
602
|
-
return /* @__PURE__ */ e(
|
|
597
|
+
H(() => {
|
|
598
|
+
d && z();
|
|
599
|
+
}, [d, z]);
|
|
600
|
+
const A = (s) => Ye.find((k) => k.id === s), n = Xe(x);
|
|
601
|
+
return /* @__PURE__ */ e(D, { children: d && /* @__PURE__ */ t(B, { children: [
|
|
603
602
|
/* @__PURE__ */ e(
|
|
604
|
-
|
|
603
|
+
b.div,
|
|
605
604
|
{
|
|
606
605
|
initial: { opacity: 0 },
|
|
607
606
|
animate: { opacity: 1 },
|
|
608
607
|
exit: { opacity: 0 },
|
|
609
608
|
className: "fixed inset-0 z-[60] bg-black/50 backdrop-blur-sm",
|
|
610
|
-
onClick:
|
|
609
|
+
onClick: p
|
|
611
610
|
}
|
|
612
611
|
),
|
|
613
612
|
/* @__PURE__ */ t(
|
|
614
|
-
|
|
613
|
+
b.div,
|
|
615
614
|
{
|
|
616
615
|
initial: { x: "100%", opacity: 0 },
|
|
617
616
|
animate: { x: 0, opacity: 1 },
|
|
@@ -621,35 +620,35 @@ const ft = ({
|
|
|
621
620
|
children: [
|
|
622
621
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between p-5 border-b border-white/[0.06] flex-shrink-0", children: [
|
|
623
622
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
624
|
-
/* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-xl bg-gradient-to-tr from-yellow-500/20 to-orange-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
623
|
+
/* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-xl bg-gradient-to-tr from-yellow-500/20 to-orange-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(U, { className: "w-4.5 h-4.5 text-yellow-400" }) }),
|
|
625
624
|
/* @__PURE__ */ t("div", { children: [
|
|
626
|
-
/* @__PURE__ */ e("h3", { className: "text-white font-semibold text-sm leading-tight", children:
|
|
627
|
-
/* @__PURE__ */ e("p", { className: "text-white/30 text-xs", children:
|
|
625
|
+
/* @__PURE__ */ e("h3", { className: "text-white font-semibold text-sm leading-tight", children: w("leaderboard.title") }),
|
|
626
|
+
/* @__PURE__ */ e("p", { className: "text-white/30 text-xs", children: w("leaderboard.subtitle") })
|
|
628
627
|
] })
|
|
629
628
|
] }),
|
|
630
629
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
631
630
|
/* @__PURE__ */ e(
|
|
632
631
|
"button",
|
|
633
632
|
{
|
|
634
|
-
onClick: () => P(!
|
|
635
|
-
className:
|
|
633
|
+
onClick: () => P(!j),
|
|
634
|
+
className: u(
|
|
636
635
|
"p-2 rounded-lg border transition-all",
|
|
637
|
-
|
|
636
|
+
j ? "bg-blue-500/10 border-blue-500/20 text-blue-400" : "bg-white/5 border-white/[0.08] text-white/40 hover:text-white/70"
|
|
638
637
|
),
|
|
639
|
-
title:
|
|
640
|
-
children: /* @__PURE__ */ e(
|
|
638
|
+
title: w("leaderboard.aboutWilson"),
|
|
639
|
+
children: /* @__PURE__ */ e($e, { className: "w-4 h-4" })
|
|
641
640
|
}
|
|
642
641
|
),
|
|
643
642
|
/* @__PURE__ */ e(
|
|
644
643
|
"button",
|
|
645
644
|
{
|
|
646
645
|
onClick: () => {
|
|
647
|
-
|
|
646
|
+
x.length > 0 && ee(x), z();
|
|
648
647
|
},
|
|
649
|
-
disabled:
|
|
650
|
-
className:
|
|
648
|
+
disabled: N,
|
|
649
|
+
className: u(
|
|
651
650
|
"p-2 rounded-lg bg-white/5 hover:bg-white/10 border border-white/[0.08] text-white/60 hover:text-white transition-all",
|
|
652
|
-
|
|
651
|
+
N && "animate-spin"
|
|
653
652
|
),
|
|
654
653
|
children: /* @__PURE__ */ e(De, { className: "w-4 h-4" })
|
|
655
654
|
}
|
|
@@ -657,15 +656,15 @@ const ft = ({
|
|
|
657
656
|
/* @__PURE__ */ e(
|
|
658
657
|
"button",
|
|
659
658
|
{
|
|
660
|
-
onClick:
|
|
659
|
+
onClick: p,
|
|
661
660
|
className: "p-2 rounded-lg text-white/40 hover:text-white/70 hover:bg-white/5 transition-colors",
|
|
662
|
-
children: /* @__PURE__ */ e(
|
|
661
|
+
children: /* @__PURE__ */ e(V, { className: "w-4 h-4" })
|
|
663
662
|
}
|
|
664
663
|
)
|
|
665
664
|
] })
|
|
666
665
|
] }),
|
|
667
|
-
/* @__PURE__ */ e(
|
|
668
|
-
|
|
666
|
+
/* @__PURE__ */ e(D, { children: j && /* @__PURE__ */ e(
|
|
667
|
+
b.div,
|
|
669
668
|
{
|
|
670
669
|
initial: { height: 0, opacity: 0 },
|
|
671
670
|
animate: { height: "auto", opacity: 1 },
|
|
@@ -673,40 +672,40 @@ const ft = ({
|
|
|
673
672
|
className: "overflow-hidden border-b border-white/[0.04]",
|
|
674
673
|
children: /* @__PURE__ */ t("div", { className: "p-4 bg-blue-500/5", children: [
|
|
675
674
|
/* @__PURE__ */ t("h4", { className: "text-xs font-semibold text-blue-300 mb-2 flex items-center gap-1.5", children: [
|
|
676
|
-
/* @__PURE__ */ e(
|
|
677
|
-
|
|
675
|
+
/* @__PURE__ */ e(q, { className: "w-3.5 h-3.5" }),
|
|
676
|
+
w("leaderboard.wilsonAlgorithm")
|
|
678
677
|
] }),
|
|
679
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-white/40 leading-relaxed", children:
|
|
678
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-white/40 leading-relaxed", children: w("leaderboard.wilsonInfo") }),
|
|
680
679
|
/* @__PURE__ */ e("div", { className: "mt-2 p-2 bg-white/[0.03] rounded-lg font-mono text-[10px] text-white/30", children: "score = (p̂ + z²/2n − z√(p̂(1−p̂)/n + z²/4n²)) / (1 + z²/n)" })
|
|
681
680
|
] })
|
|
682
681
|
}
|
|
683
682
|
) }),
|
|
684
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", style: { scrollbarWidth: "none" }, children:
|
|
685
|
-
/* @__PURE__ */ e(
|
|
686
|
-
/* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children:
|
|
687
|
-
/* @__PURE__ */ e("p", { className: "text-white/15 text-xs mt-1", children:
|
|
688
|
-
] }) : /* @__PURE__ */ e("div", { className: "p-4 space-y-2", children:
|
|
689
|
-
const l =
|
|
683
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", style: { scrollbarWidth: "none" }, children: N && r.length === 0 ? /* @__PURE__ */ e("div", { className: "flex justify-center py-16", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 border-2 border-yellow-500/30 border-t-yellow-500 rounded-full animate-spin" }) }) : r.length === 0 ? /* @__PURE__ */ t("div", { className: "text-center py-16 px-6", children: [
|
|
684
|
+
/* @__PURE__ */ e(U, { className: "w-12 h-12 text-white/10 mx-auto mb-3" }),
|
|
685
|
+
/* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children: w("leaderboard.noRankings") }),
|
|
686
|
+
/* @__PURE__ */ e("p", { className: "text-white/15 text-xs mt-1", children: w("leaderboard.buildBoard") })
|
|
687
|
+
] }) : /* @__PURE__ */ e("div", { className: "p-4 space-y-2", children: r.map((s, k) => {
|
|
688
|
+
const l = A(s.songId), f = Ke[k], C = k < 3, F = f?.icon || U, o = n > 0 ? s.wilsonScore / n * 100 : 0, L = s.plays + s.likes + s.comments;
|
|
690
689
|
return /* @__PURE__ */ t(
|
|
691
|
-
|
|
690
|
+
b.div,
|
|
692
691
|
{
|
|
693
692
|
initial: { opacity: 0, x: 20 },
|
|
694
693
|
animate: { opacity: 1, x: 0 },
|
|
695
|
-
transition: { delay:
|
|
696
|
-
onClick: () =>
|
|
697
|
-
className:
|
|
694
|
+
transition: { delay: k * 0.08 },
|
|
695
|
+
onClick: () => i?.(s.songId),
|
|
696
|
+
className: u(
|
|
698
697
|
"p-4 rounded-xl border transition-all cursor-pointer group relative",
|
|
699
|
-
C ? `bg-gradient-to-r ${
|
|
698
|
+
C ? `bg-gradient-to-r ${f.bg} ${f.border} shadow-lg ${f.glow}` : "bg-white/[0.02] border-white/[0.06] hover:bg-white/[0.04]"
|
|
700
699
|
),
|
|
701
700
|
children: [
|
|
702
|
-
/* @__PURE__ */ e(
|
|
701
|
+
/* @__PURE__ */ e(et, { change: s.rankChange }),
|
|
703
702
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
704
|
-
/* @__PURE__ */ e("div", { className:
|
|
703
|
+
/* @__PURE__ */ e("div", { className: u(
|
|
705
704
|
"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",
|
|
706
705
|
C ? "bg-white/10" : "bg-white/[0.04]"
|
|
707
|
-
), children: C ? /* @__PURE__ */ e(
|
|
706
|
+
), children: C ? /* @__PURE__ */ e(F, { className: u("w-4 h-4", f?.color) }) : /* @__PURE__ */ e("span", { className: "text-xs font-mono text-white/30", children: k + 1 }) }),
|
|
708
707
|
l && /* @__PURE__ */ e("div", { className: "w-10 h-10 rounded-lg overflow-hidden flex-shrink-0", children: /* @__PURE__ */ e(
|
|
709
|
-
|
|
708
|
+
qe,
|
|
710
709
|
{
|
|
711
710
|
src: l.albumArt,
|
|
712
711
|
alt: l.title,
|
|
@@ -714,25 +713,25 @@ const ft = ({
|
|
|
714
713
|
}
|
|
715
714
|
) }),
|
|
716
715
|
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
717
|
-
/* @__PURE__ */ e("p", { className:
|
|
716
|
+
/* @__PURE__ */ e("p", { className: u(
|
|
718
717
|
"text-sm font-medium truncate",
|
|
719
718
|
C ? "text-white" : "text-white/80"
|
|
720
|
-
), children:
|
|
721
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-white/30 truncate", children:
|
|
719
|
+
), children: l?.title || s.songId }),
|
|
720
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-white/30 truncate", children: l?.artist || w("leaderboard.unknown") })
|
|
722
721
|
] }),
|
|
723
722
|
/* @__PURE__ */ t("div", { className: "text-right flex-shrink-0", children: [
|
|
724
|
-
/* @__PURE__ */ e("p", { className:
|
|
723
|
+
/* @__PURE__ */ e("p", { className: u(
|
|
725
724
|
"text-sm font-bold font-mono tabular-nums",
|
|
726
|
-
C ?
|
|
725
|
+
C ? f?.color : "text-white/60"
|
|
727
726
|
), children: s.wilsonScore.toFixed(4) }),
|
|
728
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/20", children:
|
|
727
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/20", children: w("leaderboard.score") })
|
|
729
728
|
] })
|
|
730
729
|
] }),
|
|
731
730
|
/* @__PURE__ */ t("div", { className: "mt-3 ml-11", children: [
|
|
732
731
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: [
|
|
733
732
|
/* @__PURE__ */ t("span", { className: "text-[10px] text-white/20 flex items-center gap-1", children: [
|
|
734
733
|
/* @__PURE__ */ e(oe, { className: "w-2.5 h-2.5" }),
|
|
735
|
-
|
|
734
|
+
w("leaderboard.wilsonBar")
|
|
736
735
|
] }),
|
|
737
736
|
/* @__PURE__ */ t("span", { className: "text-[10px] text-white/25 font-mono tabular-nums", children: [
|
|
738
737
|
o.toFixed(1),
|
|
@@ -740,54 +739,54 @@ const ft = ({
|
|
|
740
739
|
] })
|
|
741
740
|
] }),
|
|
742
741
|
/* @__PURE__ */ e("div", { className: "h-1.5 rounded-full bg-white/[0.06] overflow-hidden", children: /* @__PURE__ */ e(
|
|
743
|
-
|
|
742
|
+
b.div,
|
|
744
743
|
{
|
|
745
744
|
initial: { width: 0 },
|
|
746
745
|
animate: { width: `${o}%` },
|
|
747
|
-
transition: { delay:
|
|
748
|
-
className:
|
|
746
|
+
transition: { delay: k * 0.08 + 0.3, duration: 0.6, ease: "easeOut" },
|
|
747
|
+
className: u(
|
|
749
748
|
"h-full rounded-full bg-gradient-to-r",
|
|
750
|
-
C ?
|
|
749
|
+
C ? f.barColor : "from-indigo-400 to-purple-500"
|
|
751
750
|
)
|
|
752
751
|
}
|
|
753
752
|
) })
|
|
754
753
|
] }),
|
|
755
754
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-4 mt-2.5 ml-11", children: [
|
|
756
755
|
/* @__PURE__ */ t("span", { className: "flex items-center gap-1 text-[11px] text-white/25", children: [
|
|
757
|
-
/* @__PURE__ */ e(
|
|
756
|
+
/* @__PURE__ */ e(Se, { className: "w-3 h-3" }),
|
|
758
757
|
s.plays
|
|
759
758
|
] }),
|
|
760
759
|
/* @__PURE__ */ t("span", { className: "flex items-center gap-1 text-[11px] text-white/25", children: [
|
|
761
|
-
/* @__PURE__ */ e(
|
|
760
|
+
/* @__PURE__ */ e(Y, { className: "w-3 h-3" }),
|
|
762
761
|
s.likes
|
|
763
762
|
] }),
|
|
764
763
|
/* @__PURE__ */ t("span", { className: "flex items-center gap-1 text-[11px] text-white/25", children: [
|
|
765
|
-
/* @__PURE__ */ e(
|
|
764
|
+
/* @__PURE__ */ e(Me, { className: "w-3 h-3" }),
|
|
766
765
|
s.comments
|
|
767
766
|
] }),
|
|
768
|
-
|
|
767
|
+
g && S >= 100 && /* @__PURE__ */ t(
|
|
769
768
|
"button",
|
|
770
769
|
{
|
|
771
|
-
onClick: (
|
|
772
|
-
|
|
770
|
+
onClick: (re) => {
|
|
771
|
+
re.stopPropagation(), v(s.songId);
|
|
773
772
|
},
|
|
774
|
-
disabled:
|
|
775
|
-
className:
|
|
773
|
+
disabled: T === s.songId,
|
|
774
|
+
className: u(
|
|
776
775
|
"ml-auto flex items-center gap-1 px-2 py-0.5 rounded-full text-[9px] font-medium border transition-all",
|
|
777
|
-
|
|
776
|
+
T === s.songId ? "bg-emerald-500/15 text-emerald-300 border-emerald-500/20" : "bg-yellow-500/10 text-yellow-300/70 border-yellow-500/15 hover:bg-yellow-500/20 hover:text-yellow-300"
|
|
778
777
|
),
|
|
779
|
-
title:
|
|
778
|
+
title: w("starpower.boostCost"),
|
|
780
779
|
children: [
|
|
781
|
-
/* @__PURE__ */ e(
|
|
782
|
-
|
|
780
|
+
/* @__PURE__ */ e(Fe, { className: "w-2.5 h-2.5" }),
|
|
781
|
+
T === s.songId ? w("starpower.boostSuccess") : `${w("starpower.boost")} 100SP`
|
|
783
782
|
]
|
|
784
783
|
}
|
|
785
784
|
),
|
|
786
|
-
(!
|
|
787
|
-
/* @__PURE__ */ e(
|
|
788
|
-
|
|
785
|
+
(!g || S < 100) && /* @__PURE__ */ t("span", { className: "text-[10px] text-white/15 ml-auto flex items-center gap-1", children: [
|
|
786
|
+
/* @__PURE__ */ e(_, { className: "w-2.5 h-2.5" }),
|
|
787
|
+
L,
|
|
789
788
|
" ",
|
|
790
|
-
|
|
789
|
+
w("leaderboard.totalEngagement")
|
|
791
790
|
] })
|
|
792
791
|
] })
|
|
793
792
|
]
|
|
@@ -796,113 +795,113 @@ const ft = ({
|
|
|
796
795
|
);
|
|
797
796
|
}) }) }),
|
|
798
797
|
/* @__PURE__ */ e("div", { className: "p-4 border-t border-white/[0.06] flex-shrink-0", children: /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2 text-white/20", children: [
|
|
799
|
-
/* @__PURE__ */ e(
|
|
800
|
-
/* @__PURE__ */ e("span", { className: "text-xs", children:
|
|
798
|
+
/* @__PURE__ */ e(q, { className: "w-3.5 h-3.5" }),
|
|
799
|
+
/* @__PURE__ */ e("span", { className: "text-xs", children: w("leaderboard.poweredBy") })
|
|
801
800
|
] }) }) })
|
|
802
801
|
]
|
|
803
802
|
}
|
|
804
803
|
)
|
|
805
804
|
] }) });
|
|
806
|
-
},
|
|
807
|
-
const { t:
|
|
808
|
-
return
|
|
809
|
-
|
|
805
|
+
}, et = ({ change: d }) => {
|
|
806
|
+
const { t: p } = J();
|
|
807
|
+
return d === null ? /* @__PURE__ */ t(
|
|
808
|
+
b.div,
|
|
810
809
|
{
|
|
811
810
|
initial: { scale: 0, opacity: 0 },
|
|
812
811
|
animate: { scale: 1, opacity: 1 },
|
|
813
812
|
transition: { delay: 0.4, type: "spring", damping: 12 },
|
|
814
813
|
className: "absolute top-2 right-2 flex items-center gap-0.5 px-1.5 py-0.5 rounded-full bg-cyan-500/15 border border-cyan-500/20",
|
|
815
814
|
children: [
|
|
816
|
-
/* @__PURE__ */ e(
|
|
817
|
-
/* @__PURE__ */ e("span", { className: "text-[9px] font-semibold text-cyan-400", children:
|
|
815
|
+
/* @__PURE__ */ e(_, { className: "w-2.5 h-2.5 text-cyan-400" }),
|
|
816
|
+
/* @__PURE__ */ e("span", { className: "text-[9px] font-semibold text-cyan-400", children: p("leaderboard.rankNew") })
|
|
818
817
|
]
|
|
819
818
|
}
|
|
820
|
-
) :
|
|
821
|
-
/* @__PURE__ */ e(
|
|
822
|
-
/* @__PURE__ */ e("span", { className: "text-[9px] text-white/25", children:
|
|
823
|
-
] }) :
|
|
824
|
-
|
|
819
|
+
) : d === 0 ? /* @__PURE__ */ t("div", { className: "absolute top-2 right-2 flex items-center gap-0.5 px-1.5 py-0.5 rounded-full bg-white/[0.04] border border-white/[0.06]", children: [
|
|
820
|
+
/* @__PURE__ */ e(Oe, { className: "w-2.5 h-2.5 text-white/25" }),
|
|
821
|
+
/* @__PURE__ */ e("span", { className: "text-[9px] text-white/25", children: p("leaderboard.rankSame") })
|
|
822
|
+
] }) : d > 0 ? /* @__PURE__ */ t(
|
|
823
|
+
b.div,
|
|
825
824
|
{
|
|
826
825
|
initial: { y: 5, opacity: 0 },
|
|
827
826
|
animate: { y: 0, opacity: 1 },
|
|
828
827
|
transition: { delay: 0.3 },
|
|
829
828
|
className: "absolute top-2 right-2 flex items-center gap-0.5 px-1.5 py-0.5 rounded-full bg-emerald-500/15 border border-emerald-500/20",
|
|
830
829
|
children: [
|
|
831
|
-
/* @__PURE__ */ e(
|
|
830
|
+
/* @__PURE__ */ e(Be, { className: "w-2.5 h-2.5 text-emerald-400" }),
|
|
832
831
|
/* @__PURE__ */ t("span", { className: "text-[9px] font-semibold text-emerald-400", children: [
|
|
833
|
-
|
|
832
|
+
d,
|
|
834
833
|
" ",
|
|
835
|
-
|
|
834
|
+
p("leaderboard.rankUp")
|
|
836
835
|
] })
|
|
837
836
|
]
|
|
838
837
|
}
|
|
839
838
|
) : /* @__PURE__ */ t(
|
|
840
|
-
|
|
839
|
+
b.div,
|
|
841
840
|
{
|
|
842
841
|
initial: { y: -5, opacity: 0 },
|
|
843
842
|
animate: { y: 0, opacity: 1 },
|
|
844
843
|
transition: { delay: 0.3 },
|
|
845
844
|
className: "absolute top-2 right-2 flex items-center gap-0.5 px-1.5 py-0.5 rounded-full bg-red-500/15 border border-red-500/20",
|
|
846
845
|
children: [
|
|
847
|
-
/* @__PURE__ */ e(
|
|
846
|
+
/* @__PURE__ */ e(Ze, { className: "w-2.5 h-2.5 text-red-400" }),
|
|
848
847
|
/* @__PURE__ */ t("span", { className: "text-[9px] font-semibold text-red-400", children: [
|
|
849
|
-
Math.abs(
|
|
848
|
+
Math.abs(d),
|
|
850
849
|
" ",
|
|
851
|
-
|
|
850
|
+
p("leaderboard.rankDown")
|
|
852
851
|
] })
|
|
853
852
|
]
|
|
854
853
|
}
|
|
855
854
|
);
|
|
856
|
-
},
|
|
857
|
-
isOpen:
|
|
858
|
-
onClose:
|
|
859
|
-
user:
|
|
860
|
-
starPower:
|
|
855
|
+
}, bt = ({
|
|
856
|
+
isOpen: d,
|
|
857
|
+
onClose: p,
|
|
858
|
+
user: i,
|
|
859
|
+
starPower: g = 0
|
|
861
860
|
}) => {
|
|
862
|
-
const { t:
|
|
863
|
-
if (
|
|
864
|
-
|
|
861
|
+
const { t: S, lang: h } = J(), [r, m] = c([]), [x, W] = c({}), [N, M] = c(0), [j, P] = c(12), [T, R] = c(!1), [E, w] = c(null), v = O(async () => {
|
|
862
|
+
if (i) {
|
|
863
|
+
R(!0);
|
|
865
864
|
try {
|
|
866
|
-
await
|
|
865
|
+
await I(`/achievements/${i.id}/track`, {
|
|
867
866
|
method: "POST",
|
|
868
867
|
headers: { "Content-Type": "application/json" },
|
|
869
|
-
body: JSON.stringify({ action: "daily_login", starPower:
|
|
868
|
+
body: JSON.stringify({ action: "daily_login", starPower: g })
|
|
870
869
|
});
|
|
871
|
-
const n = await
|
|
872
|
-
if (n
|
|
873
|
-
|
|
874
|
-
const s = n.achievements.find((
|
|
875
|
-
s && (
|
|
870
|
+
const n = await I(`/achievements/${i.id}`);
|
|
871
|
+
if (n?.achievements) {
|
|
872
|
+
m(n.achievements), W(n.stats || {}), M(n.totalUnlocked), P(n.totalAchievements);
|
|
873
|
+
const s = n.achievements.find((k) => k.newlyUnlocked);
|
|
874
|
+
s && (w(s.id), setTimeout(() => w(null), 4e3));
|
|
876
875
|
}
|
|
877
876
|
} catch (n) {
|
|
878
877
|
console.error("Achievements fetch error:", n);
|
|
879
878
|
} finally {
|
|
880
|
-
|
|
879
|
+
R(!1);
|
|
881
880
|
}
|
|
882
881
|
}
|
|
883
|
-
}, [
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
}, [
|
|
887
|
-
const
|
|
888
|
-
{ key: "totalWorks", labelZh: "总作品", labelEn: "Works", icon:
|
|
889
|
-
{ key: "streakDays", labelZh: "连续天数", labelEn: "Streak", icon:
|
|
890
|
-
{ key: "totalLikesReceived", labelZh: "获赞", labelEn: "Likes", icon:
|
|
891
|
-
{ key: "totalMessages", labelZh: "喊话", labelEn: "Messages", icon:
|
|
882
|
+
}, [i, g]);
|
|
883
|
+
H(() => {
|
|
884
|
+
d && i && v();
|
|
885
|
+
}, [d, i, v]);
|
|
886
|
+
const z = j > 0 ? N / j * 100 : 0, A = [
|
|
887
|
+
{ key: "totalWorks", labelZh: "总作品", labelEn: "Works", icon: Z, color: "text-yellow-400" },
|
|
888
|
+
{ key: "streakDays", labelZh: "连续天数", labelEn: "Streak", icon: Ue, color: "text-orange-400" },
|
|
889
|
+
{ key: "totalLikesReceived", labelZh: "获赞", labelEn: "Likes", icon: q, color: "text-pink-400" },
|
|
890
|
+
{ key: "totalMessages", labelZh: "喊话", labelEn: "Messages", icon: _, color: "text-purple-400" }
|
|
892
891
|
];
|
|
893
|
-
return /* @__PURE__ */ e(
|
|
892
|
+
return /* @__PURE__ */ e(D, { children: d && /* @__PURE__ */ t(B, { children: [
|
|
894
893
|
/* @__PURE__ */ e(
|
|
895
|
-
|
|
894
|
+
b.div,
|
|
896
895
|
{
|
|
897
896
|
initial: { opacity: 0 },
|
|
898
897
|
animate: { opacity: 1 },
|
|
899
898
|
exit: { opacity: 0 },
|
|
900
899
|
className: "fixed inset-0 z-[60] bg-black/50 backdrop-blur-sm",
|
|
901
|
-
onClick:
|
|
900
|
+
onClick: p
|
|
902
901
|
}
|
|
903
902
|
),
|
|
904
903
|
/* @__PURE__ */ t(
|
|
905
|
-
|
|
904
|
+
b.div,
|
|
906
905
|
{
|
|
907
906
|
initial: { x: "100%", opacity: 0 },
|
|
908
907
|
animate: { x: 0, opacity: 1 },
|
|
@@ -912,23 +911,23 @@ const ft = ({
|
|
|
912
911
|
children: [
|
|
913
912
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between p-5 border-b border-white/[0.06] flex-shrink-0", children: [
|
|
914
913
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
915
|
-
/* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-xl bg-gradient-to-tr from-yellow-500/20 to-orange-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
914
|
+
/* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-xl bg-gradient-to-tr from-yellow-500/20 to-orange-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(U, { className: "w-4.5 h-4.5 text-yellow-400" }) }),
|
|
916
915
|
/* @__PURE__ */ t("div", { children: [
|
|
917
|
-
/* @__PURE__ */ e("h3", { className: "text-white font-semibold text-sm leading-tight", children:
|
|
918
|
-
/* @__PURE__ */ e("p", { className: "text-white/30 text-xs", children:
|
|
916
|
+
/* @__PURE__ */ e("h3", { className: "text-white font-semibold text-sm leading-tight", children: S("achievements.title") }),
|
|
917
|
+
/* @__PURE__ */ e("p", { className: "text-white/30 text-xs", children: S("achievements.subtitle") })
|
|
919
918
|
] })
|
|
920
919
|
] }),
|
|
921
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
920
|
+
/* @__PURE__ */ e("button", { onClick: p, className: "p-2 rounded-lg text-white/40 hover:text-white/70 hover:bg-white/5 transition-colors", children: /* @__PURE__ */ e(V, { className: "w-4 h-4" }) })
|
|
922
921
|
] }),
|
|
923
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto p-4 space-y-4", style: { scrollbarWidth: "none" }, children:
|
|
922
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto p-4 space-y-4", style: { scrollbarWidth: "none" }, children: i ? T && r.length === 0 ? /* @__PURE__ */ e("div", { className: "flex justify-center py-16", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 border-2 border-yellow-500/30 border-t-yellow-500 rounded-full animate-spin" }) }) : /* @__PURE__ */ t(B, { children: [
|
|
924
923
|
/* @__PURE__ */ t("div", { className: "p-4 rounded-2xl bg-gradient-to-br from-yellow-500/[0.06] to-orange-500/[0.06] border border-yellow-500/10", children: [
|
|
925
924
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-3", children: [
|
|
926
925
|
/* @__PURE__ */ t("div", { children: [
|
|
927
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-white/40 uppercase tracking-wider font-medium", children:
|
|
926
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-white/40 uppercase tracking-wider font-medium", children: S("achievements.progress") }),
|
|
928
927
|
/* @__PURE__ */ t("p", { className: "text-2xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-yellow-400 to-orange-400 mt-0.5", children: [
|
|
929
|
-
|
|
928
|
+
N,
|
|
930
929
|
" / ",
|
|
931
|
-
|
|
930
|
+
j
|
|
932
931
|
] })
|
|
933
932
|
] }),
|
|
934
933
|
/* @__PURE__ */ t("div", { className: "w-16 h-16 relative", children: [
|
|
@@ -943,7 +942,7 @@ const ft = ({
|
|
|
943
942
|
fill: "none",
|
|
944
943
|
stroke: "url(#achieveGrad)",
|
|
945
944
|
strokeWidth: "4",
|
|
946
|
-
strokeDasharray: `${175.9 *
|
|
945
|
+
strokeDasharray: `${175.9 * z / 100} 175.9`,
|
|
947
946
|
strokeLinecap: "round"
|
|
948
947
|
}
|
|
949
948
|
),
|
|
@@ -953,24 +952,24 @@ const ft = ({
|
|
|
953
952
|
] }) })
|
|
954
953
|
] }),
|
|
955
954
|
/* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ t("span", { className: "text-xs font-bold text-yellow-300", children: [
|
|
956
|
-
Math.round(
|
|
955
|
+
Math.round(z),
|
|
957
956
|
"%"
|
|
958
957
|
] }) })
|
|
959
958
|
] })
|
|
960
959
|
] }),
|
|
961
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-2 mt-3 pt-3 border-t border-white/[0.04]", children:
|
|
960
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-2 mt-3 pt-3 border-t border-white/[0.04]", children: A.map((n) => {
|
|
962
961
|
const s = n.icon;
|
|
963
962
|
return /* @__PURE__ */ t("div", { className: "text-center", children: [
|
|
964
|
-
/* @__PURE__ */ e(s, { className:
|
|
965
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-white/80", children:
|
|
966
|
-
/* @__PURE__ */ e("p", { className: "text-[9px] text-white/25", children:
|
|
963
|
+
/* @__PURE__ */ e(s, { className: u("w-3.5 h-3.5 mx-auto mb-0.5", n.color) }),
|
|
964
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-white/80", children: x[n.key] || 0 }),
|
|
965
|
+
/* @__PURE__ */ e("p", { className: "text-[9px] text-white/25", children: h === "zh" ? n.labelZh : n.labelEn })
|
|
967
966
|
] }, n.key);
|
|
968
967
|
}) })
|
|
969
968
|
] }),
|
|
970
|
-
/* @__PURE__ */ e(
|
|
971
|
-
const n =
|
|
969
|
+
/* @__PURE__ */ e(D, { children: E && (() => {
|
|
970
|
+
const n = r.find((s) => s.id === E);
|
|
972
971
|
return n ? /* @__PURE__ */ t(
|
|
973
|
-
|
|
972
|
+
b.div,
|
|
974
973
|
{
|
|
975
974
|
initial: { scale: 0.8, opacity: 0 },
|
|
976
975
|
animate: { scale: 1, opacity: 1 },
|
|
@@ -978,7 +977,7 @@ const ft = ({
|
|
|
978
977
|
className: "p-4 rounded-2xl bg-gradient-to-br from-yellow-500/15 to-orange-500/15 border border-yellow-500/25 text-center",
|
|
979
978
|
children: [
|
|
980
979
|
/* @__PURE__ */ e(
|
|
981
|
-
|
|
980
|
+
b.div,
|
|
982
981
|
{
|
|
983
982
|
animate: { rotate: [0, -10, 10, -10, 10, 0] },
|
|
984
983
|
transition: { duration: 0.6, delay: 0.3 },
|
|
@@ -986,29 +985,29 @@ const ft = ({
|
|
|
986
985
|
children: n.icon
|
|
987
986
|
}
|
|
988
987
|
),
|
|
989
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-yellow-300 font-semibold uppercase tracking-wider", children:
|
|
990
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-bold text-white/90 mt-1", children:
|
|
991
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/40 mt-0.5", children:
|
|
988
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-yellow-300 font-semibold uppercase tracking-wider", children: h === "zh" ? "新成就解锁!" : "Achievement Unlocked!" }),
|
|
989
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-bold text-white/90 mt-1", children: h === "zh" ? n.nameZh : n.nameEn }),
|
|
990
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/40 mt-0.5", children: h === "zh" ? n.descZh : n.descEn })
|
|
992
991
|
]
|
|
993
992
|
},
|
|
994
993
|
"celebration"
|
|
995
994
|
) : null;
|
|
996
995
|
})() }),
|
|
997
996
|
/* @__PURE__ */ t("div", { children: [
|
|
998
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-white/40 uppercase tracking-wider font-medium mb-3", children:
|
|
999
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2", children:
|
|
1000
|
-
|
|
997
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-white/40 uppercase tracking-wider font-medium mb-3", children: S("achievements.allBadges") }),
|
|
998
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2", children: r.map((n, s) => /* @__PURE__ */ t(
|
|
999
|
+
b.div,
|
|
1001
1000
|
{
|
|
1002
1001
|
initial: { opacity: 0, y: 10 },
|
|
1003
1002
|
animate: { opacity: 1, y: 0 },
|
|
1004
1003
|
transition: { delay: s * 0.05 },
|
|
1005
|
-
className:
|
|
1004
|
+
className: u(
|
|
1006
1005
|
"p-3 rounded-xl border transition-all relative",
|
|
1007
1006
|
n.unlocked ? "bg-gradient-to-br from-white/[0.04] to-white/[0.02] border-yellow-500/15 hover:border-yellow-500/25" : "bg-white/[0.01] border-white/[0.04] opacity-50"
|
|
1008
1007
|
),
|
|
1009
1008
|
children: [
|
|
1010
1009
|
n.newlyUnlocked && /* @__PURE__ */ e(
|
|
1011
|
-
|
|
1010
|
+
b.div,
|
|
1012
1011
|
{
|
|
1013
1012
|
animate: { scale: [1, 1.2, 1] },
|
|
1014
1013
|
transition: { duration: 1.5, repeat: 1 / 0 },
|
|
@@ -1017,162 +1016,156 @@ const ft = ({
|
|
|
1017
1016
|
),
|
|
1018
1017
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-1.5", children: [
|
|
1019
1018
|
/* @__PURE__ */ e("span", { className: "text-xl", children: n.unlocked ? n.icon : "🔒" }),
|
|
1020
|
-
n.unlocked && /* @__PURE__ */ e("span", { className: "text-[8px] px-1 py-0.5 rounded-full bg-yellow-500/15 text-yellow-300 border border-yellow-500/15 font-medium", children:
|
|
1019
|
+
n.unlocked && /* @__PURE__ */ e("span", { className: "text-[8px] px-1 py-0.5 rounded-full bg-yellow-500/15 text-yellow-300 border border-yellow-500/15 font-medium", children: h === "zh" ? "已解锁" : "Unlocked" })
|
|
1021
1020
|
] }),
|
|
1022
|
-
/* @__PURE__ */ e("p", { className:
|
|
1023
|
-
/* @__PURE__ */ e("p", { className:
|
|
1021
|
+
/* @__PURE__ */ e("p", { className: u("text-xs font-medium", n.unlocked ? "text-white/80" : "text-white/30"), children: h === "zh" ? n.nameZh : n.nameEn }),
|
|
1022
|
+
/* @__PURE__ */ e("p", { className: u("text-[10px] mt-0.5 leading-relaxed", n.unlocked ? "text-white/40" : "text-white/15"), children: h === "zh" ? n.descZh : n.descEn })
|
|
1024
1023
|
]
|
|
1025
1024
|
},
|
|
1026
1025
|
n.id
|
|
1027
1026
|
)) })
|
|
1028
1027
|
] })
|
|
1029
1028
|
] }) : /* @__PURE__ */ t("div", { className: "text-center py-16", children: [
|
|
1030
|
-
/* @__PURE__ */ e(
|
|
1031
|
-
/* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children:
|
|
1029
|
+
/* @__PURE__ */ e(U, { className: "w-12 h-12 text-white/10 mx-auto mb-3" }),
|
|
1030
|
+
/* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children: h === "zh" ? "登录后查看成就" : "Sign in to view achievements" })
|
|
1032
1031
|
] }) }),
|
|
1033
1032
|
/* @__PURE__ */ e("div", { className: "p-3 border-t border-white/[0.06] flex-shrink-0 flex items-center justify-center", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5 text-white/15", children: [
|
|
1034
|
-
/* @__PURE__ */ e(
|
|
1035
|
-
/* @__PURE__ */ e("span", { className: "text-[10px]", children:
|
|
1033
|
+
/* @__PURE__ */ e(U, { className: "w-3 h-3" }),
|
|
1034
|
+
/* @__PURE__ */ e("span", { className: "text-[10px]", children: S("achievements.subtitle") })
|
|
1036
1035
|
] }) })
|
|
1037
1036
|
]
|
|
1038
1037
|
}
|
|
1039
1038
|
)
|
|
1040
1039
|
] }) });
|
|
1041
|
-
},
|
|
1040
|
+
}, te = {
|
|
1042
1041
|
happy: "from-yellow-500/20 to-amber-500/20 border-yellow-500/20",
|
|
1043
1042
|
sad: "from-blue-500/20 to-indigo-500/20 border-blue-500/20",
|
|
1044
1043
|
energetic: "from-orange-500/20 to-red-500/20 border-orange-500/20",
|
|
1045
1044
|
calm: "from-cyan-500/20 to-teal-500/20 border-cyan-500/20",
|
|
1046
1045
|
love: "from-pink-500/20 to-rose-500/20 border-pink-500/20"
|
|
1047
|
-
},
|
|
1046
|
+
}, tt = {
|
|
1048
1047
|
happy: "😊",
|
|
1049
1048
|
sad: "😢",
|
|
1050
1049
|
energetic: "⚡",
|
|
1051
1050
|
calm: "🌙",
|
|
1052
1051
|
love: "❤️"
|
|
1053
|
-
},
|
|
1052
|
+
}, ae = [
|
|
1054
1053
|
{ min: 0, label: "新手创作者", labelEn: "Beginner", icon: "🌱" },
|
|
1055
1054
|
{ min: 3, label: "铜牌创作者", labelEn: "Bronze Creator", icon: "🥉" },
|
|
1056
1055
|
{ min: 8, label: "银牌创作者", labelEn: "Silver Creator", icon: "🥈" },
|
|
1057
1056
|
{ min: 15, label: "金牌创作者", labelEn: "Gold Creator", icon: "🥇" },
|
|
1058
1057
|
{ min: 30, label: "星级创作者", labelEn: "Star Creator", icon: "⭐" }
|
|
1059
1058
|
];
|
|
1060
|
-
function
|
|
1061
|
-
let
|
|
1062
|
-
for (const
|
|
1063
|
-
|
|
1064
|
-
return
|
|
1059
|
+
function at(d) {
|
|
1060
|
+
let p = ae[0];
|
|
1061
|
+
for (const i of ae)
|
|
1062
|
+
d >= i.min && (p = i);
|
|
1063
|
+
return p;
|
|
1065
1064
|
}
|
|
1066
|
-
const
|
|
1067
|
-
isOpen:
|
|
1068
|
-
onClose:
|
|
1069
|
-
user:
|
|
1070
|
-
profile:
|
|
1071
|
-
starPower:
|
|
1072
|
-
onOpenCreationStudio:
|
|
1065
|
+
const ft = ({
|
|
1066
|
+
isOpen: d,
|
|
1067
|
+
onClose: p,
|
|
1068
|
+
user: i,
|
|
1069
|
+
profile: g,
|
|
1070
|
+
starPower: S,
|
|
1071
|
+
onOpenCreationStudio: h
|
|
1073
1072
|
}) => {
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
u(!0);
|
|
1073
|
+
const { t: r, lang: m } = J(), [x, W] = c("profile"), [N, M] = c([]), [j, P] = c(!1), [T, R] = c([]), [E, w] = c(!1), [v, z] = c(null), [A, n] = c([]), [s, k] = c(!1), [l, f] = c(null), [C, F] = c([]), [o, L] = c(null), [re, ce] = c(!1), de = O(async () => {
|
|
1074
|
+
w(!0);
|
|
1077
1075
|
try {
|
|
1078
|
-
const a = await
|
|
1079
|
-
a
|
|
1076
|
+
const a = await I("/creators");
|
|
1077
|
+
a?.creators && R(a.creators);
|
|
1080
1078
|
} catch (a) {
|
|
1081
1079
|
console.error("Creators fetch error:", a);
|
|
1082
1080
|
} finally {
|
|
1083
|
-
|
|
1081
|
+
w(!1);
|
|
1084
1082
|
}
|
|
1085
|
-
}, []), le =
|
|
1086
|
-
|
|
1083
|
+
}, []), le = O(async (a) => {
|
|
1084
|
+
k(!0);
|
|
1087
1085
|
try {
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
} catch (
|
|
1091
|
-
console.error("Creator works error:",
|
|
1086
|
+
const y = await I(`/creators/${encodeURIComponent(a)}/works`);
|
|
1087
|
+
y?.works && n(y.works);
|
|
1088
|
+
} catch (y) {
|
|
1089
|
+
console.error("Creator works error:", y);
|
|
1092
1090
|
} finally {
|
|
1093
|
-
|
|
1091
|
+
k(!1);
|
|
1094
1092
|
}
|
|
1095
|
-
}, []),
|
|
1093
|
+
}, []), K = O(async () => {
|
|
1096
1094
|
P(!0);
|
|
1097
1095
|
try {
|
|
1098
|
-
const a = await
|
|
1099
|
-
if (a
|
|
1100
|
-
const
|
|
1101
|
-
|
|
1102
|
-
return S.userName === (((F = r.email) == null ? void 0 : F.split("@")[0]) || "") || S.userId === r.id;
|
|
1103
|
-
}) : a.works;
|
|
1104
|
-
D(w);
|
|
1096
|
+
const a = await I("/shared-works");
|
|
1097
|
+
if (a?.works) {
|
|
1098
|
+
const y = i ? a.works.filter(($) => $.userName === (i.email?.split("@")[0] || "") || $.userId === i.id) : a.works;
|
|
1099
|
+
M(y);
|
|
1105
1100
|
}
|
|
1106
1101
|
} catch (a) {
|
|
1107
1102
|
console.error("IP Matrix fetch error:", a);
|
|
1108
1103
|
} finally {
|
|
1109
1104
|
P(!1);
|
|
1110
1105
|
}
|
|
1111
|
-
}, [
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
c(a.workId);
|
|
1106
|
+
}, [i]), je = O(async (a) => {
|
|
1107
|
+
if (i) {
|
|
1108
|
+
f(a.workId);
|
|
1115
1109
|
try {
|
|
1116
|
-
|
|
1110
|
+
(await I("/works/fork", {
|
|
1117
1111
|
method: "POST",
|
|
1118
1112
|
headers: { "Content-Type": "application/json" },
|
|
1119
1113
|
body: JSON.stringify({
|
|
1120
1114
|
originalWorkId: a.workId,
|
|
1121
1115
|
originalAuthor: a.userName,
|
|
1122
|
-
userId:
|
|
1123
|
-
userName:
|
|
1124
|
-
title: `${a.title} (${
|
|
1116
|
+
userId: i.id,
|
|
1117
|
+
userName: i.email?.split("@")[0] || "User",
|
|
1118
|
+
title: `${a.title} (${m === "zh" ? "改编" : "Remix"})`,
|
|
1125
1119
|
theme: a.theme,
|
|
1126
1120
|
lyrics: a.lyrics
|
|
1127
1121
|
})
|
|
1128
|
-
})
|
|
1129
|
-
S != null && S.success && (X(), k && le(k), E(`/achievements/${r.id}/track`, {
|
|
1122
|
+
}))?.success && (K(), v && le(v), I(`/achievements/${i.id}/track`, {
|
|
1130
1123
|
method: "POST",
|
|
1131
1124
|
headers: { "Content-Type": "application/json" },
|
|
1132
1125
|
body: JSON.stringify({ action: "create_work" })
|
|
1133
1126
|
}).catch(() => {
|
|
1134
|
-
}), a.userId &&
|
|
1127
|
+
}), a.userId && I(`/achievements/${a.userId}/track`, {
|
|
1135
1128
|
method: "POST",
|
|
1136
1129
|
headers: { "Content-Type": "application/json" },
|
|
1137
1130
|
body: JSON.stringify({ action: "receive_fork" })
|
|
1138
1131
|
}).catch(() => {
|
|
1139
1132
|
}));
|
|
1140
|
-
} catch (
|
|
1141
|
-
console.error("Fork error:",
|
|
1133
|
+
} catch (y) {
|
|
1134
|
+
console.error("Fork error:", y);
|
|
1142
1135
|
} finally {
|
|
1143
|
-
|
|
1136
|
+
f(null);
|
|
1144
1137
|
}
|
|
1145
1138
|
}
|
|
1146
|
-
}, [
|
|
1139
|
+
}, [i, K, v, le, m]), Le = O(async (a) => {
|
|
1147
1140
|
ce(!0);
|
|
1148
1141
|
try {
|
|
1149
|
-
const
|
|
1150
|
-
|
|
1151
|
-
} catch (
|
|
1152
|
-
console.error("Fork chain error:",
|
|
1142
|
+
const y = await I(`/works/${a}/forks`);
|
|
1143
|
+
y?.forks && F(y.forks);
|
|
1144
|
+
} catch (y) {
|
|
1145
|
+
console.error("Fork chain error:", y), F([]);
|
|
1153
1146
|
} finally {
|
|
1154
1147
|
ce(!1);
|
|
1155
1148
|
}
|
|
1156
1149
|
}, []);
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
}, [
|
|
1160
|
-
const
|
|
1161
|
-
|
|
1162
|
-
), be =
|
|
1163
|
-
return /* @__PURE__ */ e(
|
|
1150
|
+
H(() => {
|
|
1151
|
+
d && (K(), x === "explore" && de());
|
|
1152
|
+
}, [d, x, K, de]);
|
|
1153
|
+
const Q = N.reduce((a, y) => a + (y.likes || 0), 0), he = N.reduce((a, y) => a + (y.plays || 0), 0), ie = at(N.length), me = g?.displayName || i?.email?.split("@")[0] || "Creator", xe = g?.joinedAt ? new Date(g.joinedAt).toLocaleDateString(m === "zh" ? "zh-CN" : "en-US", { year: "numeric", month: "short" }) : "", pe = Math.round(
|
|
1154
|
+
N.length * 100 + Q * 50 + he * 10 + S * 0.5
|
|
1155
|
+
), be = N.length > 0 ? Math.round((Q + he) / Math.max(N.length, 1) * 10) / 10 : 0;
|
|
1156
|
+
return /* @__PURE__ */ e(D, { children: d && /* @__PURE__ */ t(B, { children: [
|
|
1164
1157
|
/* @__PURE__ */ e(
|
|
1165
|
-
|
|
1158
|
+
b.div,
|
|
1166
1159
|
{
|
|
1167
1160
|
initial: { opacity: 0 },
|
|
1168
1161
|
animate: { opacity: 1 },
|
|
1169
1162
|
exit: { opacity: 0 },
|
|
1170
1163
|
className: "fixed inset-0 z-[60] bg-black/50 backdrop-blur-sm",
|
|
1171
|
-
onClick:
|
|
1164
|
+
onClick: p
|
|
1172
1165
|
}
|
|
1173
1166
|
),
|
|
1174
1167
|
/* @__PURE__ */ t(
|
|
1175
|
-
|
|
1168
|
+
b.div,
|
|
1176
1169
|
{
|
|
1177
1170
|
initial: { x: "100%", opacity: 0 },
|
|
1178
1171
|
animate: { x: 0, opacity: 1 },
|
|
@@ -1182,26 +1175,26 @@ const wt = ({
|
|
|
1182
1175
|
children: [
|
|
1183
1176
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between p-5 border-b border-white/[0.06] flex-shrink-0", children: [
|
|
1184
1177
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
1185
|
-
/* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-xl bg-gradient-to-tr from-indigo-500/20 to-pink-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
1178
|
+
/* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-xl bg-gradient-to-tr from-indigo-500/20 to-pink-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(_, { className: "w-4.5 h-4.5 text-indigo-400" }) }),
|
|
1186
1179
|
/* @__PURE__ */ t("div", { children: [
|
|
1187
|
-
/* @__PURE__ */ e("h3", { className: "text-white font-semibold text-sm leading-tight", children:
|
|
1188
|
-
/* @__PURE__ */ e("p", { className: "text-white/30 text-xs", children:
|
|
1180
|
+
/* @__PURE__ */ e("h3", { className: "text-white font-semibold text-sm leading-tight", children: r("ipmatrix.title") }),
|
|
1181
|
+
/* @__PURE__ */ e("p", { className: "text-white/30 text-xs", children: r("ipmatrix.subtitle") })
|
|
1189
1182
|
] })
|
|
1190
1183
|
] }),
|
|
1191
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
1184
|
+
/* @__PURE__ */ e("button", { onClick: p, className: "p-2 rounded-lg text-white/40 hover:text-white/70 hover:bg-white/5 transition-colors", children: /* @__PURE__ */ e(V, { className: "w-4 h-4" }) })
|
|
1192
1185
|
] }),
|
|
1193
1186
|
/* @__PURE__ */ e("div", { className: "flex p-2 mx-4 mt-3 bg-white/[0.03] rounded-xl border border-white/[0.06]", children: [
|
|
1194
|
-
{ id: "profile", label:
|
|
1195
|
-
{ id: "portfolio", label:
|
|
1196
|
-
{ id: "explore", label:
|
|
1197
|
-
{ id: "analytics", label:
|
|
1187
|
+
{ id: "profile", label: r("ipmatrix.creatorProfile"), icon: Z },
|
|
1188
|
+
{ id: "portfolio", label: r("ipmatrix.portfolio"), icon: G },
|
|
1189
|
+
{ id: "explore", label: r("ipmatrix.explore"), icon: ue },
|
|
1190
|
+
{ id: "analytics", label: r("ipmatrix.analytics"), icon: _e }
|
|
1198
1191
|
].map((a) => /* @__PURE__ */ t(
|
|
1199
1192
|
"button",
|
|
1200
1193
|
{
|
|
1201
|
-
onClick: () =>
|
|
1202
|
-
className:
|
|
1194
|
+
onClick: () => W(a.id),
|
|
1195
|
+
className: u(
|
|
1203
1196
|
"flex-1 py-2 px-2 rounded-lg text-[11px] font-medium transition-all flex items-center justify-center gap-1",
|
|
1204
|
-
|
|
1197
|
+
x === a.id ? "bg-indigo-500/20 text-indigo-300 border border-indigo-500/20" : "text-white/40 hover:text-white/60"
|
|
1205
1198
|
),
|
|
1206
1199
|
children: [
|
|
1207
1200
|
/* @__PURE__ */ e(a.icon, { className: "w-3 h-3" }),
|
|
@@ -1210,8 +1203,8 @@ const wt = ({
|
|
|
1210
1203
|
},
|
|
1211
1204
|
a.id
|
|
1212
1205
|
)) }),
|
|
1213
|
-
|
|
1214
|
-
|
|
1206
|
+
i ? /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto p-4", style: { scrollbarWidth: "none" }, children: [
|
|
1207
|
+
x === "profile" && /* @__PURE__ */ t(b.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, className: "space-y-4", children: [
|
|
1215
1208
|
/* @__PURE__ */ t("div", { className: "p-5 rounded-2xl bg-gradient-to-br from-indigo-500/10 via-purple-500/5 to-pink-500/10 border border-indigo-500/15 relative overflow-hidden", children: [
|
|
1216
1209
|
/* @__PURE__ */ e("div", { className: "absolute -top-8 -right-8 w-24 h-24 bg-indigo-500/10 rounded-full blur-2xl" }),
|
|
1217
1210
|
/* @__PURE__ */ t("div", { className: "relative flex items-center gap-4", children: [
|
|
@@ -1219,12 +1212,12 @@ const wt = ({
|
|
|
1219
1212
|
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
1220
1213
|
/* @__PURE__ */ e("h3", { className: "text-lg font-bold text-white truncate", children: me }),
|
|
1221
1214
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 mt-1", children: [
|
|
1222
|
-
/* @__PURE__ */ e("span", { className: "text-xs", children:
|
|
1223
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-indigo-300/70", children:
|
|
1215
|
+
/* @__PURE__ */ e("span", { className: "text-xs", children: ie.icon }),
|
|
1216
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-indigo-300/70", children: m === "zh" ? ie.label : ie.labelEn })
|
|
1224
1217
|
] }),
|
|
1225
1218
|
xe && /* @__PURE__ */ t("p", { className: "text-[10px] text-white/20 mt-1 flex items-center gap-1", children: [
|
|
1226
|
-
/* @__PURE__ */ e(
|
|
1227
|
-
|
|
1219
|
+
/* @__PURE__ */ e(Ce, { className: "w-2.5 h-2.5" }),
|
|
1220
|
+
r("ipmatrix.memberSince"),
|
|
1228
1221
|
" ",
|
|
1229
1222
|
xe
|
|
1230
1223
|
] })
|
|
@@ -1233,98 +1226,97 @@ const wt = ({
|
|
|
1233
1226
|
] }),
|
|
1234
1227
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-2", children: [
|
|
1235
1228
|
/* @__PURE__ */ t("div", { className: "p-3 rounded-xl bg-white/[0.02] border border-white/[0.06] text-center", children: [
|
|
1236
|
-
/* @__PURE__ */ e(
|
|
1237
|
-
/* @__PURE__ */ e("p", { className: "text-lg font-bold text-white font-mono tabular-nums", children:
|
|
1238
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25", children:
|
|
1229
|
+
/* @__PURE__ */ e(G, { className: "w-4 h-4 text-indigo-400 mx-auto mb-1" }),
|
|
1230
|
+
/* @__PURE__ */ e("p", { className: "text-lg font-bold text-white font-mono tabular-nums", children: N.length }),
|
|
1231
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25", children: r("ipmatrix.totalWorks") })
|
|
1239
1232
|
] }),
|
|
1240
1233
|
/* @__PURE__ */ t("div", { className: "p-3 rounded-xl bg-white/[0.02] border border-white/[0.06] text-center", children: [
|
|
1241
|
-
/* @__PURE__ */ e(
|
|
1242
|
-
/* @__PURE__ */ e("p", { className: "text-lg font-bold text-white font-mono tabular-nums", children:
|
|
1243
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25", children:
|
|
1234
|
+
/* @__PURE__ */ e(Y, { className: "w-4 h-4 text-pink-400 mx-auto mb-1" }),
|
|
1235
|
+
/* @__PURE__ */ e("p", { className: "text-lg font-bold text-white font-mono tabular-nums", children: Q }),
|
|
1236
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25", children: r("ipmatrix.totalLikes") })
|
|
1244
1237
|
] }),
|
|
1245
1238
|
/* @__PURE__ */ t("div", { className: "p-3 rounded-xl bg-white/[0.02] border border-white/[0.06] text-center", children: [
|
|
1246
|
-
/* @__PURE__ */ e(
|
|
1247
|
-
/* @__PURE__ */ e("p", { className: "text-lg font-bold text-white font-mono tabular-nums", children:
|
|
1239
|
+
/* @__PURE__ */ e(Z, { className: "w-4 h-4 text-yellow-400 mx-auto mb-1" }),
|
|
1240
|
+
/* @__PURE__ */ e("p", { className: "text-lg font-bold text-white font-mono tabular-nums", children: S }),
|
|
1248
1241
|
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25", children: "SP" })
|
|
1249
1242
|
] })
|
|
1250
1243
|
] }),
|
|
1251
1244
|
/* @__PURE__ */ e("div", { className: "p-3 rounded-xl bg-gradient-to-r from-purple-500/5 to-indigo-500/5 border border-purple-500/10", children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
1252
1245
|
/* @__PURE__ */ t("div", { children: [
|
|
1253
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-white/40", children:
|
|
1246
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-white/40", children: r("ipmatrix.influence") }),
|
|
1254
1247
|
/* @__PURE__ */ e("p", { className: "text-2xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-purple-300 to-indigo-300 font-mono tabular-nums", children: pe.toLocaleString() })
|
|
1255
1248
|
] }),
|
|
1256
1249
|
/* @__PURE__ */ t("div", { className: "text-right", children: [
|
|
1257
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-white/40", children:
|
|
1250
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-white/40", children: r("ipmatrix.engagementRate") }),
|
|
1258
1251
|
/* @__PURE__ */ e("p", { className: "text-lg font-bold text-indigo-300 font-mono tabular-nums", children: be })
|
|
1259
1252
|
] })
|
|
1260
1253
|
] }) })
|
|
1261
1254
|
] }),
|
|
1262
|
-
|
|
1255
|
+
x === "portfolio" && /* @__PURE__ */ t(b.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, className: "space-y-3", children: [
|
|
1263
1256
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-2", children: [
|
|
1264
1257
|
/* @__PURE__ */ t("h4", { className: "text-xs font-medium text-white/40 uppercase tracking-wider", children: [
|
|
1265
|
-
|
|
1258
|
+
r("ipmatrix.sharedWorks"),
|
|
1266
1259
|
" (",
|
|
1267
|
-
|
|
1260
|
+
N.length,
|
|
1268
1261
|
")"
|
|
1269
1262
|
] }),
|
|
1270
1263
|
/* @__PURE__ */ t(
|
|
1271
1264
|
"button",
|
|
1272
1265
|
{
|
|
1273
1266
|
onClick: () => {
|
|
1274
|
-
|
|
1267
|
+
p(), h();
|
|
1275
1268
|
},
|
|
1276
1269
|
className: "flex items-center gap-1 text-[10px] text-indigo-400/60 hover:text-indigo-400 transition-colors",
|
|
1277
1270
|
children: [
|
|
1278
|
-
/* @__PURE__ */ e(
|
|
1279
|
-
|
|
1271
|
+
/* @__PURE__ */ e(Je, { className: "w-3 h-3" }),
|
|
1272
|
+
m === "zh" ? "创作工坊" : "Studio"
|
|
1280
1273
|
]
|
|
1281
1274
|
}
|
|
1282
1275
|
)
|
|
1283
1276
|
] }),
|
|
1284
|
-
|
|
1285
|
-
/* @__PURE__ */ e(
|
|
1286
|
-
/* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children:
|
|
1287
|
-
/* @__PURE__ */ e("p", { className: "text-white/15 text-xs mt-1", children:
|
|
1277
|
+
j ? /* @__PURE__ */ e("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 border-2 border-indigo-500/30 border-t-indigo-500 rounded-full animate-spin" }) }) : N.length === 0 ? /* @__PURE__ */ t("div", { className: "text-center py-12", children: [
|
|
1278
|
+
/* @__PURE__ */ e(G, { className: "w-10 h-10 text-white/10 mx-auto mb-3" }),
|
|
1279
|
+
/* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children: r("ipmatrix.noWorks") }),
|
|
1280
|
+
/* @__PURE__ */ e("p", { className: "text-white/15 text-xs mt-1", children: r("ipmatrix.startCreating") }),
|
|
1288
1281
|
/* @__PURE__ */ e(
|
|
1289
1282
|
"button",
|
|
1290
1283
|
{
|
|
1291
1284
|
onClick: () => {
|
|
1292
|
-
|
|
1285
|
+
p(), h();
|
|
1293
1286
|
},
|
|
1294
1287
|
className: "mt-4 px-4 py-2 rounded-xl bg-indigo-500/20 text-indigo-300 text-xs font-medium border border-indigo-500/20 hover:bg-indigo-500/30 transition-colors",
|
|
1295
|
-
children:
|
|
1288
|
+
children: m === "zh" ? "开始创作" : "Start Creating"
|
|
1296
1289
|
}
|
|
1297
1290
|
)
|
|
1298
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
1299
|
-
|
|
1300
|
-
const w = ae[a.theme] || ae.happy, S = it[a.theme] || "🎵";
|
|
1291
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: N.map((a) => {
|
|
1292
|
+
const y = te[a.theme] || te.happy, $ = tt[a.theme] || "🎵";
|
|
1301
1293
|
return /* @__PURE__ */ e(
|
|
1302
|
-
|
|
1294
|
+
b.div,
|
|
1303
1295
|
{
|
|
1304
1296
|
initial: { opacity: 0, y: 10 },
|
|
1305
1297
|
animate: { opacity: 1, y: 0 },
|
|
1306
|
-
className:
|
|
1298
|
+
className: u(
|
|
1307
1299
|
"p-3 rounded-xl bg-gradient-to-r border transition-colors hover:brightness-110",
|
|
1308
|
-
|
|
1300
|
+
y
|
|
1309
1301
|
),
|
|
1310
1302
|
children: /* @__PURE__ */ t("div", { className: "flex items-start gap-3", children: [
|
|
1311
|
-
/* @__PURE__ */ e("div", { className: "w-10 h-10 rounded-lg bg-white/10 flex items-center justify-center text-lg flex-shrink-0", children:
|
|
1303
|
+
/* @__PURE__ */ e("div", { className: "w-10 h-10 rounded-lg bg-white/10 flex items-center justify-center text-lg flex-shrink-0", children: $ }),
|
|
1312
1304
|
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
1313
1305
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-white truncate", children: a.title }),
|
|
1314
1306
|
/* @__PURE__ */ t("p", { className: "text-[10px] text-white/25 mt-0.5", children: [
|
|
1315
|
-
a.mode === "quick" ?
|
|
1307
|
+
a.mode === "quick" ? m === "zh" ? "极简模式" : "Quick" : a.mode === "master" ? m === "zh" ? "大师模式" : "Master" : a.mode,
|
|
1316
1308
|
" · ",
|
|
1317
|
-
|
|
1309
|
+
a.lyrics?.length || 0,
|
|
1318
1310
|
" ",
|
|
1319
|
-
|
|
1311
|
+
m === "zh" ? "行歌词" : "lines"
|
|
1320
1312
|
] }),
|
|
1321
1313
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3 mt-1.5", children: [
|
|
1322
1314
|
/* @__PURE__ */ t("span", { className: "flex items-center gap-0.5 text-[10px] text-white/25", children: [
|
|
1323
|
-
/* @__PURE__ */ e(
|
|
1315
|
+
/* @__PURE__ */ e(Y, { className: "w-2.5 h-2.5" }),
|
|
1324
1316
|
" ",
|
|
1325
1317
|
a.likes || 0
|
|
1326
1318
|
] }),
|
|
1327
|
-
/* @__PURE__ */ e("span", { className: "text-[10px] text-white/15", children: new Date(a.createdAt).toLocaleDateString(
|
|
1319
|
+
/* @__PURE__ */ e("span", { className: "text-[10px] text-white/15", children: new Date(a.createdAt).toLocaleDateString(m === "zh" ? "zh-CN" : "en-US", { month: "short", day: "numeric" }) })
|
|
1328
1320
|
] })
|
|
1329
1321
|
] })
|
|
1330
1322
|
] })
|
|
@@ -1333,92 +1325,91 @@ const wt = ({
|
|
|
1333
1325
|
);
|
|
1334
1326
|
}) })
|
|
1335
1327
|
] }),
|
|
1336
|
-
|
|
1328
|
+
x === "analytics" && /* @__PURE__ */ t(b.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, className: "space-y-4", children: [
|
|
1337
1329
|
/* @__PURE__ */ t("div", { className: "p-4 rounded-xl bg-white/[0.02] border border-white/[0.06]", children: [
|
|
1338
|
-
/* @__PURE__ */ e("h4", { className: "text-xs text-white/40 mb-3", children:
|
|
1339
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
return /* @__PURE__ */ t("div", { className: N("flex items-center gap-2", !S && "opacity-30"), children: [
|
|
1330
|
+
/* @__PURE__ */ e("h4", { className: "text-xs text-white/40 mb-3", children: r("ipmatrix.creatorLevel") }),
|
|
1331
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: ae.map((a, y) => {
|
|
1332
|
+
const $ = N.length >= a.min, X = ae[y + 1]?.min || a.min + 10, Ee = $ ? Math.min((N.length - a.min) / (X - a.min) * 100, 100) : 0;
|
|
1333
|
+
return /* @__PURE__ */ t("div", { className: u("flex items-center gap-2", !$ && "opacity-30"), children: [
|
|
1343
1334
|
/* @__PURE__ */ e("span", { className: "text-sm w-6 text-center", children: a.icon }),
|
|
1344
1335
|
/* @__PURE__ */ t("div", { className: "flex-1", children: [
|
|
1345
1336
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-0.5", children: [
|
|
1346
|
-
/* @__PURE__ */ e("span", { className: "text-[11px] text-white/60", children:
|
|
1337
|
+
/* @__PURE__ */ e("span", { className: "text-[11px] text-white/60", children: m === "zh" ? a.label : a.labelEn }),
|
|
1347
1338
|
/* @__PURE__ */ t("span", { className: "text-[9px] text-white/20 font-mono tabular-nums", children: [
|
|
1348
1339
|
a.min,
|
|
1349
1340
|
"+"
|
|
1350
1341
|
] })
|
|
1351
1342
|
] }),
|
|
1352
|
-
/* @__PURE__ */ e("div", { className: "h-1 rounded-full bg-white/[0.06] overflow-hidden", children:
|
|
1353
|
-
|
|
1343
|
+
/* @__PURE__ */ e("div", { className: "h-1 rounded-full bg-white/[0.06] overflow-hidden", children: $ && /* @__PURE__ */ e(
|
|
1344
|
+
b.div,
|
|
1354
1345
|
{
|
|
1355
1346
|
initial: { width: 0 },
|
|
1356
|
-
animate: { width: `${
|
|
1347
|
+
animate: { width: `${Ee}%` },
|
|
1357
1348
|
transition: { duration: 0.6 },
|
|
1358
1349
|
className: "h-full rounded-full bg-gradient-to-r from-indigo-400 to-purple-500"
|
|
1359
1350
|
}
|
|
1360
1351
|
) })
|
|
1361
1352
|
] }),
|
|
1362
|
-
|
|
1353
|
+
$ && /* @__PURE__ */ e(ke, { className: "w-3 h-3 text-indigo-400" })
|
|
1363
1354
|
] }, a.min);
|
|
1364
1355
|
}) })
|
|
1365
1356
|
] }),
|
|
1366
1357
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
1367
1358
|
/* @__PURE__ */ t("div", { className: "p-3 rounded-xl bg-gradient-to-br from-indigo-500/5 to-purple-500/5 border border-indigo-500/10", children: [
|
|
1368
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25 mb-1", children:
|
|
1359
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25 mb-1", children: r("ipmatrix.influence") }),
|
|
1369
1360
|
/* @__PURE__ */ e("p", { className: "text-xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 to-purple-300 font-mono tabular-nums", children: pe.toLocaleString() })
|
|
1370
1361
|
] }),
|
|
1371
1362
|
/* @__PURE__ */ t("div", { className: "p-3 rounded-xl bg-gradient-to-br from-pink-500/5 to-rose-500/5 border border-pink-500/10", children: [
|
|
1372
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25 mb-1", children:
|
|
1363
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25 mb-1", children: r("ipmatrix.engagementRate") }),
|
|
1373
1364
|
/* @__PURE__ */ e("p", { className: "text-xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-pink-300 to-rose-300 font-mono tabular-nums", children: be })
|
|
1374
1365
|
] }),
|
|
1375
1366
|
/* @__PURE__ */ t("div", { className: "p-3 rounded-xl bg-gradient-to-br from-yellow-500/5 to-amber-500/5 border border-yellow-500/10", children: [
|
|
1376
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25 mb-1", children:
|
|
1377
|
-
/* @__PURE__ */ e("p", { className: "text-xl font-bold text-yellow-300 font-mono tabular-nums", children:
|
|
1367
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25 mb-1", children: r("ipmatrix.totalLikes") }),
|
|
1368
|
+
/* @__PURE__ */ e("p", { className: "text-xl font-bold text-yellow-300 font-mono tabular-nums", children: Q })
|
|
1378
1369
|
] }),
|
|
1379
1370
|
/* @__PURE__ */ t("div", { className: "p-3 rounded-xl bg-gradient-to-br from-cyan-500/5 to-teal-500/5 border border-cyan-500/10", children: [
|
|
1380
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25 mb-1", children:
|
|
1381
|
-
/* @__PURE__ */ e("p", { className: "text-xl font-bold text-cyan-300 font-mono tabular-nums", children:
|
|
1371
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] text-white/25 mb-1", children: r("ipmatrix.totalWorks") }),
|
|
1372
|
+
/* @__PURE__ */ e("p", { className: "text-xl font-bold text-cyan-300 font-mono tabular-nums", children: N.length })
|
|
1382
1373
|
] })
|
|
1383
1374
|
] })
|
|
1384
1375
|
] }),
|
|
1385
|
-
|
|
1376
|
+
x === "explore" && /* @__PURE__ */ e(b.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, className: "space-y-4", children: v ? /* @__PURE__ */ t(B, { children: [
|
|
1386
1377
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
1387
1378
|
/* @__PURE__ */ t(
|
|
1388
1379
|
"button",
|
|
1389
1380
|
{
|
|
1390
1381
|
onClick: () => {
|
|
1391
|
-
|
|
1382
|
+
z(null), n([]);
|
|
1392
1383
|
},
|
|
1393
1384
|
className: "flex items-center gap-1 text-xs text-white/40 hover:text-white/70 transition-colors",
|
|
1394
1385
|
children: [
|
|
1395
|
-
/* @__PURE__ */ e(
|
|
1396
|
-
|
|
1386
|
+
/* @__PURE__ */ e(Ge, { className: "w-3.5 h-3.5" }),
|
|
1387
|
+
r("ipmatrix.back")
|
|
1397
1388
|
]
|
|
1398
1389
|
}
|
|
1399
1390
|
),
|
|
1400
1391
|
/* @__PURE__ */ t("span", { className: "text-sm font-semibold text-white/80", children: [
|
|
1401
|
-
|
|
1402
|
-
|
|
1392
|
+
v,
|
|
1393
|
+
r("ipmatrix.creatorPortfolio")
|
|
1403
1394
|
] })
|
|
1404
1395
|
] }),
|
|
1405
|
-
s ? /* @__PURE__ */ e("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 border-2 border-indigo-500/30 border-t-indigo-500 rounded-full animate-spin" }) }) :
|
|
1406
|
-
/* @__PURE__ */ e(
|
|
1407
|
-
/* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children:
|
|
1408
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
1409
|
-
const
|
|
1396
|
+
s ? /* @__PURE__ */ e("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 border-2 border-indigo-500/30 border-t-indigo-500 rounded-full animate-spin" }) }) : A.length === 0 ? /* @__PURE__ */ t("div", { className: "text-center py-12", children: [
|
|
1397
|
+
/* @__PURE__ */ e(G, { className: "w-10 h-10 text-white/10 mx-auto mb-3" }),
|
|
1398
|
+
/* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children: r("ipmatrix.noWorks") })
|
|
1399
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: A.map((a) => {
|
|
1400
|
+
const y = te[a.theme] || te.happy;
|
|
1410
1401
|
return /* @__PURE__ */ t("div", { className: "p-3 rounded-xl bg-white/[0.02] border border-white/[0.06] hover:bg-white/[0.04] transition-colors", children: [
|
|
1411
1402
|
/* @__PURE__ */ t("div", { className: "flex items-start justify-between", children: [
|
|
1412
1403
|
/* @__PURE__ */ t("div", { className: "min-w-0 flex-1", children: [
|
|
1413
1404
|
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-white/80 truncate", children: a.title }),
|
|
1414
1405
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 mt-1", children: [
|
|
1415
|
-
/* @__PURE__ */ e("span", { className:
|
|
1416
|
-
/* @__PURE__ */ e("span", { className: "text-[10px] text-white/20", children: new Date(a.createdAt).toLocaleDateString(
|
|
1406
|
+
/* @__PURE__ */ e("span", { className: u("text-[9px] px-1.5 py-0.5 rounded-full border", y), children: a.theme }),
|
|
1407
|
+
/* @__PURE__ */ e("span", { className: "text-[10px] text-white/20", children: new Date(a.createdAt).toLocaleDateString(m === "zh" ? "zh-CN" : "en-US", { month: "short", day: "numeric" }) })
|
|
1417
1408
|
] }),
|
|
1418
1409
|
a.forkedFrom && /* @__PURE__ */ t("p", { className: "text-[9px] text-purple-400/50 mt-1 flex items-center gap-0.5", children: [
|
|
1419
|
-
/* @__PURE__ */ e(
|
|
1410
|
+
/* @__PURE__ */ e(Ne, { className: "w-2.5 h-2.5" }),
|
|
1420
1411
|
" ",
|
|
1421
|
-
|
|
1412
|
+
r("ipmatrix.forkedFrom"),
|
|
1422
1413
|
" ",
|
|
1423
1414
|
a.forkedFrom.author
|
|
1424
1415
|
] }),
|
|
@@ -1427,12 +1418,12 @@ const wt = ({
|
|
|
1427
1418
|
/* @__PURE__ */ t("div", { className: "flex flex-col items-end gap-1.5 ml-2 flex-shrink-0", children: [
|
|
1428
1419
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
1429
1420
|
/* @__PURE__ */ t("span", { className: "flex items-center gap-0.5 text-[10px] text-pink-400/50", children: [
|
|
1430
|
-
/* @__PURE__ */ e(
|
|
1421
|
+
/* @__PURE__ */ e(Y, { className: "w-2.5 h-2.5" }),
|
|
1431
1422
|
" ",
|
|
1432
1423
|
a.likes || 0
|
|
1433
1424
|
] }),
|
|
1434
1425
|
/* @__PURE__ */ t("span", { className: "flex items-center gap-0.5 text-[10px] text-white/20", children: [
|
|
1435
|
-
/* @__PURE__ */ e(
|
|
1426
|
+
/* @__PURE__ */ e(Se, { className: "w-2.5 h-2.5" }),
|
|
1436
1427
|
" ",
|
|
1437
1428
|
a.plays || 0
|
|
1438
1429
|
] })
|
|
@@ -1441,13 +1432,13 @@ const wt = ({
|
|
|
1441
1432
|
/* @__PURE__ */ t(
|
|
1442
1433
|
"button",
|
|
1443
1434
|
{
|
|
1444
|
-
onClick: () =>
|
|
1445
|
-
disabled: l === a.workId || !
|
|
1435
|
+
onClick: () => je(a),
|
|
1436
|
+
disabled: l === a.workId || !i,
|
|
1446
1437
|
className: "flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] bg-purple-500/10 border border-purple-500/15 text-purple-300/70 hover:bg-purple-500/20 hover:text-purple-200 transition-all disabled:opacity-30",
|
|
1447
|
-
title:
|
|
1438
|
+
title: r("ipmatrix.forkWork"),
|
|
1448
1439
|
children: [
|
|
1449
|
-
/* @__PURE__ */ e(
|
|
1450
|
-
l === a.workId ?
|
|
1440
|
+
/* @__PURE__ */ e(Ne, { className: "w-2.5 h-2.5" }),
|
|
1441
|
+
l === a.workId ? r("ipmatrix.forking") : r("ipmatrix.forkWork")
|
|
1451
1442
|
]
|
|
1452
1443
|
}
|
|
1453
1444
|
),
|
|
@@ -1455,11 +1446,11 @@ const wt = ({
|
|
|
1455
1446
|
"button",
|
|
1456
1447
|
{
|
|
1457
1448
|
onClick: () => {
|
|
1458
|
-
o === a.workId ? (
|
|
1449
|
+
o === a.workId ? (L(null), F([])) : (L(a.workId), Le(a.workId));
|
|
1459
1450
|
},
|
|
1460
1451
|
className: "flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] bg-white/[0.04] border border-white/[0.08] text-white/30 hover:text-white/50 transition-all",
|
|
1461
|
-
title:
|
|
1462
|
-
children: /* @__PURE__ */ e(
|
|
1452
|
+
title: r("ipmatrix.forkTree"),
|
|
1453
|
+
children: /* @__PURE__ */ e(ye, { className: "w-2.5 h-2.5" })
|
|
1463
1454
|
}
|
|
1464
1455
|
)
|
|
1465
1456
|
] })
|
|
@@ -1467,33 +1458,33 @@ const wt = ({
|
|
|
1467
1458
|
] }),
|
|
1468
1459
|
o === a.workId && /* @__PURE__ */ t("div", { className: "mt-2 pt-2 border-t border-white/[0.06]", children: [
|
|
1469
1460
|
/* @__PURE__ */ t("p", { className: "text-[9px] text-white/30 mb-1.5 flex items-center gap-1", children: [
|
|
1470
|
-
/* @__PURE__ */ e(
|
|
1461
|
+
/* @__PURE__ */ e(ye, { className: "w-2.5 h-2.5" }),
|
|
1471
1462
|
" ",
|
|
1472
|
-
|
|
1463
|
+
r("ipmatrix.forkTree")
|
|
1473
1464
|
] }),
|
|
1474
|
-
|
|
1465
|
+
re ? /* @__PURE__ */ e("div", { className: "flex justify-center py-2", children: /* @__PURE__ */ e("div", { className: "w-4 h-4 border border-purple-500/30 border-t-purple-500 rounded-full animate-spin" }) }) : C.length === 0 ? /* @__PURE__ */ e("p", { className: "text-[9px] text-white/15 text-center py-1", children: m === "zh" ? "暂无改编分支" : "No forks yet" }) : /* @__PURE__ */ e("div", { className: "space-y-1 pl-2", children: C.map(($, X) => /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5 text-[9px]", children: [
|
|
1475
1466
|
/* @__PURE__ */ t("div", { className: "flex flex-col items-center w-3", children: [
|
|
1476
|
-
|
|
1467
|
+
X < C.length - 1 && /* @__PURE__ */ e("div", { className: "w-px h-3 bg-purple-500/20" }),
|
|
1477
1468
|
/* @__PURE__ */ e("div", { className: "w-1.5 h-1.5 rounded-full bg-purple-500/40 flex-shrink-0" }),
|
|
1478
|
-
|
|
1469
|
+
X < C.length - 1 && /* @__PURE__ */ e("div", { className: "w-px h-3 bg-purple-500/20" })
|
|
1479
1470
|
] }),
|
|
1480
|
-
/* @__PURE__ */ e("span", { className: "text-white/40", children:
|
|
1481
|
-
/* @__PURE__ */ e("span", { className: "text-white/15", children: new Date(
|
|
1482
|
-
] },
|
|
1471
|
+
/* @__PURE__ */ e("span", { className: "text-white/40", children: $.author }),
|
|
1472
|
+
/* @__PURE__ */ e("span", { className: "text-white/15", children: new Date($.forkedAt).toLocaleDateString(m === "zh" ? "zh-CN" : "en-US", { month: "short", day: "numeric" }) })
|
|
1473
|
+
] }, $.workId)) })
|
|
1483
1474
|
] })
|
|
1484
1475
|
] }, a.workId);
|
|
1485
1476
|
}) })
|
|
1486
|
-
] }) : /* @__PURE__ */ t(
|
|
1487
|
-
/* @__PURE__ */ e("h4", { className: "text-xs font-medium text-white/40 uppercase tracking-wider", children:
|
|
1488
|
-
|
|
1489
|
-
/* @__PURE__ */ e(
|
|
1490
|
-
/* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children:
|
|
1491
|
-
/* @__PURE__ */ e("p", { className: "text-white/15 text-xs mt-1", children:
|
|
1492
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
1477
|
+
] }) : /* @__PURE__ */ t(B, { children: [
|
|
1478
|
+
/* @__PURE__ */ e("h4", { className: "text-xs font-medium text-white/40 uppercase tracking-wider", children: r("ipmatrix.allCreators") }),
|
|
1479
|
+
E ? /* @__PURE__ */ e("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 border-2 border-indigo-500/30 border-t-indigo-500 rounded-full animate-spin" }) }) : T.length === 0 ? /* @__PURE__ */ t("div", { className: "text-center py-12", children: [
|
|
1480
|
+
/* @__PURE__ */ e(ue, { className: "w-10 h-10 text-white/10 mx-auto mb-3" }),
|
|
1481
|
+
/* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children: m === "zh" ? "暂无其他创作者" : "No creators yet" }),
|
|
1482
|
+
/* @__PURE__ */ e("p", { className: "text-white/15 text-xs mt-1", children: m === "zh" ? "分享作品后即可在此展示" : "Share works to appear here" })
|
|
1483
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: T.map((a, y) => /* @__PURE__ */ e(
|
|
1493
1484
|
"button",
|
|
1494
1485
|
{
|
|
1495
1486
|
onClick: () => {
|
|
1496
|
-
|
|
1487
|
+
z(a.userName), le(a.userName);
|
|
1497
1488
|
},
|
|
1498
1489
|
className: "w-full p-3 rounded-xl bg-white/[0.02] border border-white/[0.06] hover:bg-white/[0.05] hover:border-indigo-500/20 transition-all text-left group",
|
|
1499
1490
|
children: /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
@@ -1504,10 +1495,10 @@ const wt = ({
|
|
|
1504
1495
|
/* @__PURE__ */ t("span", { className: "text-[10px] text-white/25", children: [
|
|
1505
1496
|
a.works,
|
|
1506
1497
|
" ",
|
|
1507
|
-
|
|
1498
|
+
r("ipmatrix.works")
|
|
1508
1499
|
] }),
|
|
1509
1500
|
/* @__PURE__ */ t("span", { className: "flex items-center gap-0.5 text-[10px] text-pink-400/40", children: [
|
|
1510
|
-
/* @__PURE__ */ e(
|
|
1501
|
+
/* @__PURE__ */ e(Y, { className: "w-2.5 h-2.5" }),
|
|
1511
1502
|
" ",
|
|
1512
1503
|
a.totalLikes
|
|
1513
1504
|
] })
|
|
@@ -1516,20 +1507,20 @@ const wt = ({
|
|
|
1516
1507
|
/* @__PURE__ */ e(se, { className: "w-4 h-4 text-white/15 group-hover:text-indigo-400/50 transition-colors flex-shrink-0" })
|
|
1517
1508
|
] })
|
|
1518
1509
|
},
|
|
1519
|
-
a.userName +
|
|
1510
|
+
a.userName + y
|
|
1520
1511
|
)) })
|
|
1521
1512
|
] }) })
|
|
1522
|
-
] }) : /* @__PURE__ */ e("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children:
|
|
1513
|
+
] }) : /* @__PURE__ */ e("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ e("p", { className: "text-white/30 text-sm", children: r("ipmatrix.signInRequired") }) })
|
|
1523
1514
|
]
|
|
1524
1515
|
}
|
|
1525
1516
|
)
|
|
1526
1517
|
] }) });
|
|
1527
1518
|
};
|
|
1528
1519
|
export {
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1520
|
+
bt as AchievementsPanel,
|
|
1521
|
+
ft as IPMatrixPanel,
|
|
1522
|
+
pt as LeaderboardPanel,
|
|
1523
|
+
mt as StarPowerPanel,
|
|
1524
|
+
xt as StarPowerShop
|
|
1534
1525
|
};
|
|
1535
1526
|
//# sourceMappingURL=index.js.map
|