@yyc3/music-ai 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,2136 @@
1
+ import { jsxs as i, Fragment as $, jsx as e } from "react/jsx-runtime";
2
+ import { useState as u, useRef as we, useEffect as ye, useCallback as E } from "react";
3
+ import { AnimatePresence as Q, motion as p } from "motion/react";
4
+ import { clsx as y } from "clsx";
5
+ import { X as re, Mic as xe, BrainCircuit as Te, ChevronDown as mt, Clock as Oe, MicOff as Ve, MessageSquare as Qe, Smile as _e, Frown as Ye, Zap as Xe, Cloud as He, Heart as et, Wand2 as We, Plus as pe, Minus as Ie, Loader2 as fe, Sparkles as je, RefreshCw as xt, Check as ee, Copy as ge, Volume2 as pt, Music as $e, ArrowLeft as bt, Settings2 as ut, Layers as Ge, FolderOpen as wt, Film as tt, ExternalLink as gt, ChevronRight as ft, Trash2 as yt, Share2 as Nt, Play as vt, Pause as kt, Camera as Ct, Maximize2 as St } from "lucide-react";
6
+ import { useI18n as Ae, useAudioComposer as it } from "@yyc3/music-hooks";
7
+ import { apiFetch as _ } from "@yyc3/music-utils";
8
+ const Mt = [
9
+ { cmd: '"播放"', desc: "播放音乐" },
10
+ { cmd: '"暂停"', desc: "暂停音乐" },
11
+ { cmd: '"下一首"', desc: "下一首歌" },
12
+ { cmd: '"上一首"', desc: "上一首歌" },
13
+ { cmd: '"喜欢"', desc: "点赞" },
14
+ { cmd: '"随机播放"', desc: "切换随机" },
15
+ { cmd: '"音量大"', desc: "增大音量" },
16
+ { cmd: '"音量小"', desc: "减小音量" },
17
+ { cmd: '"静音"', desc: "静音切换" },
18
+ { cmd: '"播放列表"', desc: "打开列表" },
19
+ { cmd: '"创作"', desc: "AI歌词" },
20
+ { cmd: '"排行"', desc: "排行榜" },
21
+ { cmd: '"评论"', desc: "打开评论" },
22
+ { cmd: '"社区"', desc: "社区动态" },
23
+ { cmd: '"分析"', desc: "数据分析" }
24
+ ], zt = [
25
+ { cmd: '"play"', desc: "Play music" },
26
+ { cmd: '"pause"', desc: "Pause music" },
27
+ { cmd: '"next"', desc: "Next track" },
28
+ { cmd: '"previous"', desc: "Previous track" },
29
+ { cmd: '"like"', desc: "Like song" },
30
+ { cmd: '"shuffle"', desc: "Toggle shuffle" },
31
+ { cmd: '"volume up"', desc: "Increase volume" },
32
+ { cmd: '"volume down"', desc: "Decrease volume" },
33
+ { cmd: '"mute"', desc: "Mute toggle" },
34
+ { cmd: '"playlist"', desc: "Open playlist" },
35
+ { cmd: '"create"', desc: "AI Lyrics" },
36
+ { cmd: '"leaderboard"', desc: "Rankings" },
37
+ { cmd: '"comment"', desc: "Comments" },
38
+ { cmd: '"community"', desc: "Community" },
39
+ { cmd: '"analytics"', desc: "Analytics" }
40
+ ], Wt = ({
41
+ activeTips: z,
42
+ onDismissTip: I,
43
+ onExecuteAction: d,
44
+ isListening: g,
45
+ onToggleListening: J,
46
+ voiceSupported: a,
47
+ voiceFeedback: O,
48
+ voiceHistory: W,
49
+ sessionInsight: j,
50
+ isPlaying: S,
51
+ audioEnergy: T,
52
+ externalExpanded: K,
53
+ onExternalExpandedChange: s
54
+ }) => {
55
+ const { t: N, lang: M } = Ae(), [f, U] = u(!1), [F, D] = u(!1), Y = we(null), B = M === "zh" ? Mt : zt;
56
+ ye(() => {
57
+ K !== void 0 && U(K);
58
+ }, [K]);
59
+ const G = (n) => {
60
+ U(n), s == null || s(n);
61
+ };
62
+ ye(() => {
63
+ }, [z.length]);
64
+ const A = {
65
+ emotion: "from-pink-500/20 to-purple-500/20 border-pink-500/30",
66
+ achievement: "from-yellow-500/20 to-amber-500/20 border-yellow-500/30",
67
+ streak: "from-orange-500/20 to-red-500/20 border-orange-500/30",
68
+ discovery: "from-blue-500/20 to-cyan-500/20 border-blue-500/30",
69
+ interaction: "from-green-500/20 to-teal-500/20 border-green-500/30",
70
+ voice: "from-indigo-500/20 to-violet-500/20 border-indigo-500/30",
71
+ system: "from-gray-500/20 to-slate-500/20 border-white/10"
72
+ };
73
+ return /* @__PURE__ */ i($, { children: [
74
+ /* @__PURE__ */ e(
75
+ "div",
76
+ {
77
+ ref: Y,
78
+ className: "fixed top-20 left-4 z-[45] flex flex-col gap-2 max-w-[340px] pointer-events-none",
79
+ children: /* @__PURE__ */ e(Q, { mode: "popLayout", children: z.map((n) => /* @__PURE__ */ i(
80
+ p.div,
81
+ {
82
+ initial: { opacity: 0, x: -50, scale: 0.9 },
83
+ animate: { opacity: 1, x: 0, scale: 1 },
84
+ exit: { opacity: 0, x: -50, scale: 0.9 },
85
+ transition: { type: "spring", damping: 25, stiffness: 300 },
86
+ className: y(
87
+ "pointer-events-auto bg-gradient-to-r backdrop-blur-2xl rounded-xl border p-3 shadow-2xl",
88
+ A[n.category] || A.system
89
+ ),
90
+ children: [
91
+ /* @__PURE__ */ i("div", { className: "flex items-start gap-2.5", children: [
92
+ /* @__PURE__ */ e("span", { className: "text-lg flex-shrink-0 mt-0.5", children: n.icon }),
93
+ /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
94
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/80 leading-relaxed", children: n.message }),
95
+ n.actionLabel && n.actionKey && /* @__PURE__ */ e(
96
+ "button",
97
+ {
98
+ onClick: () => {
99
+ d(n.actionKey), I(n.id);
100
+ },
101
+ className: "mt-2 text-[11px] font-medium px-3 py-1 rounded-full bg-white/10 hover:bg-white/20 text-white/90 transition-colors border border-white/10",
102
+ children: n.actionLabel
103
+ }
104
+ )
105
+ ] }),
106
+ /* @__PURE__ */ e(
107
+ "button",
108
+ {
109
+ onClick: () => I(n.id),
110
+ className: "text-white/30 hover:text-white/60 transition-colors flex-shrink-0 p-0.5",
111
+ children: /* @__PURE__ */ e(re, { className: "w-3 h-3" })
112
+ }
113
+ )
114
+ ] }),
115
+ /* @__PURE__ */ e(
116
+ p.div,
117
+ {
118
+ className: "absolute bottom-0 left-0 h-[2px] bg-white/20 rounded-b-xl",
119
+ initial: { width: "100%" },
120
+ animate: { width: "0%" },
121
+ transition: { duration: 30, ease: "linear" }
122
+ }
123
+ )
124
+ ]
125
+ },
126
+ n.id
127
+ )) })
128
+ }
129
+ ),
130
+ /* @__PURE__ */ e(Q, { children: O && /* @__PURE__ */ e(
131
+ p.div,
132
+ {
133
+ initial: { opacity: 0, y: 20, scale: 0.9 },
134
+ animate: { opacity: 1, y: 0, scale: 1 },
135
+ exit: { opacity: 0, y: 20, scale: 0.9 },
136
+ className: "fixed bottom-32 left-1/2 -translate-x-1/2 z-[70] bg-black/70 backdrop-blur-2xl rounded-2xl px-5 py-3 border border-white/10 shadow-2xl",
137
+ children: /* @__PURE__ */ e("p", { className: "text-sm text-white/90 font-medium whitespace-nowrap", children: O })
138
+ },
139
+ "voice-fb"
140
+ ) }),
141
+ /* @__PURE__ */ e(Q, { children: g && /* @__PURE__ */ i(
142
+ p.div,
143
+ {
144
+ initial: { opacity: 0 },
145
+ animate: { opacity: 1 },
146
+ exit: { opacity: 0 },
147
+ className: "fixed inset-0 z-[65] pointer-events-none flex items-center justify-center",
148
+ children: [
149
+ [0, 1, 2].map((n) => /* @__PURE__ */ e(
150
+ p.div,
151
+ {
152
+ className: "absolute rounded-full border border-purple-400/20",
153
+ animate: {
154
+ width: [80, 200 + n * 60],
155
+ height: [80, 200 + n * 60],
156
+ opacity: [0.4, 0]
157
+ },
158
+ transition: {
159
+ duration: 2,
160
+ repeat: 1 / 0,
161
+ delay: n * 0.5,
162
+ ease: "easeOut"
163
+ }
164
+ },
165
+ n
166
+ )),
167
+ /* @__PURE__ */ e(
168
+ p.div,
169
+ {
170
+ className: "w-20 h-20 rounded-full bg-purple-600/30 backdrop-blur-xl border border-purple-400/40 flex items-center justify-center shadow-2xl shadow-purple-500/30",
171
+ animate: { scale: [1, 1.1, 1] },
172
+ transition: { duration: 1, repeat: 1 / 0, ease: "easeInOut" },
173
+ children: /* @__PURE__ */ e(xe, { className: "w-8 h-8 text-purple-300" })
174
+ }
175
+ ),
176
+ /* @__PURE__ */ e(
177
+ p.p,
178
+ {
179
+ className: "absolute mt-32 text-sm text-purple-300/80 font-medium",
180
+ animate: { opacity: [0.5, 1, 0.5] },
181
+ transition: { duration: 2, repeat: 1 / 0 },
182
+ children: M === "zh" ? "正在聆听..." : "Listening..."
183
+ }
184
+ )
185
+ ]
186
+ },
187
+ "listening-overlay"
188
+ ) }),
189
+ /* @__PURE__ */ i("div", { className: "fixed bottom-[120px] md:bottom-28 left-4 z-[55] hidden md:flex flex-col items-start gap-2", children: [
190
+ /* @__PURE__ */ e(Q, { children: f && /* @__PURE__ */ i(
191
+ p.div,
192
+ {
193
+ initial: { opacity: 0, y: 20, scale: 0.9 },
194
+ animate: { opacity: 1, y: 0, scale: 1 },
195
+ exit: { opacity: 0, y: 20, scale: 0.9 },
196
+ transition: { type: "spring", damping: 25, stiffness: 300 },
197
+ className: "w-72 md:w-80 bg-[#0D1235]/95 backdrop-blur-2xl rounded-2xl border border-white/10 shadow-2xl overflow-hidden",
198
+ children: [
199
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between px-4 py-3 border-b border-white/[0.06]", children: [
200
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
201
+ /* @__PURE__ */ e(Te, { className: "w-4 h-4 text-purple-400" }),
202
+ /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-white/90", children: M === "zh" ? "AI 助手" : "AI Assistant" })
203
+ ] }),
204
+ /* @__PURE__ */ e(
205
+ "button",
206
+ {
207
+ onClick: () => G(!1),
208
+ className: "p-1 rounded-lg text-white/30 hover:text-white/60 hover:bg-white/5 transition-colors",
209
+ children: /* @__PURE__ */ e(mt, { className: "w-4 h-4" })
210
+ }
211
+ )
212
+ ] }),
213
+ /* @__PURE__ */ i("div", { className: "p-4 space-y-4 max-h-[50vh] overflow-y-auto", style: { scrollbarWidth: "none" }, children: [
214
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-3 py-2 bg-white/[0.03] rounded-lg border border-white/[0.06]", children: [
215
+ /* @__PURE__ */ e(Oe, { className: "w-3.5 h-3.5 text-white/30 flex-shrink-0" }),
216
+ /* @__PURE__ */ e("p", { className: "text-[11px] text-white/50", children: j })
217
+ ] }),
218
+ /* @__PURE__ */ i("div", { children: [
219
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2", children: [
220
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider", children: M === "zh" ? "语音指令" : "Voice Commands" }),
221
+ /* @__PURE__ */ e(
222
+ "button",
223
+ {
224
+ onClick: () => D(!F),
225
+ className: "text-[10px] text-purple-400/60 hover:text-purple-400 transition-colors",
226
+ children: F ? M === "zh" ? "收起" : "Hide" : M === "zh" ? "查看指令表" : "Show commands"
227
+ }
228
+ )
229
+ ] }),
230
+ a ? /* @__PURE__ */ e(
231
+ "button",
232
+ {
233
+ onClick: J,
234
+ className: y(
235
+ "w-full flex items-center justify-center gap-2 py-2.5 rounded-xl border transition-all",
236
+ g ? "bg-purple-600/20 border-purple-500/40 text-purple-300" : "bg-white/[0.03] border-white/[0.08] text-white/50 hover:text-white/80 hover:bg-white/[0.06]"
237
+ ),
238
+ children: g ? /* @__PURE__ */ i($, { children: [
239
+ /* @__PURE__ */ e(
240
+ p.div,
241
+ {
242
+ animate: { scale: [1, 1.2, 1] },
243
+ transition: { duration: 1, repeat: 1 / 0 },
244
+ children: /* @__PURE__ */ e(xe, { className: "w-4 h-4" })
245
+ }
246
+ ),
247
+ /* @__PURE__ */ e("span", { className: "text-sm", children: M === "zh" ? "正在聆听..." : "Listening..." })
248
+ ] }) : /* @__PURE__ */ i($, { children: [
249
+ /* @__PURE__ */ e(xe, { className: "w-4 h-4" }),
250
+ /* @__PURE__ */ e("span", { className: "text-sm", children: M === "zh" ? "点击说出指令" : "Tap to speak" })
251
+ ] })
252
+ }
253
+ ) : /* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-3 py-2 bg-white/[0.02] rounded-lg text-white/30 text-xs", children: [
254
+ /* @__PURE__ */ e(Ve, { className: "w-3.5 h-3.5" }),
255
+ M === "zh" ? "当前浏览器不支持语音识别" : "Voice not supported in this browser"
256
+ ] }),
257
+ /* @__PURE__ */ e(Q, { children: F && /* @__PURE__ */ e(
258
+ p.div,
259
+ {
260
+ initial: { height: 0, opacity: 0 },
261
+ animate: { height: "auto", opacity: 1 },
262
+ exit: { height: 0, opacity: 0 },
263
+ className: "overflow-hidden",
264
+ children: /* @__PURE__ */ e("div", { className: "mt-2 grid grid-cols-2 gap-1", children: B.map((n, v) => /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 px-2 py-1 rounded-lg bg-white/[0.02]", children: [
265
+ /* @__PURE__ */ e("span", { className: "text-[10px] text-purple-400 font-mono", children: n.cmd }),
266
+ /* @__PURE__ */ e("span", { className: "text-[10px] text-white/30", children: n.desc })
267
+ ] }, v)) })
268
+ }
269
+ ) }),
270
+ W.length > 0 && /* @__PURE__ */ i("div", { className: "mt-2 space-y-1", children: [
271
+ /* @__PURE__ */ e("p", { className: "text-[10px] text-white/25 uppercase tracking-wider", children: M === "zh" ? "最近指令" : "Recent" }),
272
+ W.slice(-3).reverse().map((n, v) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-2 py-1 rounded-lg bg-white/[0.02]", children: [
273
+ /* @__PURE__ */ e(Qe, { className: "w-3 h-3 text-white/20 flex-shrink-0" }),
274
+ /* @__PURE__ */ i("span", { className: "text-[10px] text-white/40 truncate", children: [
275
+ '"',
276
+ n.transcript,
277
+ '"'
278
+ ] }),
279
+ /* @__PURE__ */ e("span", { className: "text-[10px] text-green-400/60 ml-auto flex-shrink-0", children: "✓" })
280
+ ] }, v))
281
+ ] })
282
+ ] }),
283
+ z.length > 0 && /* @__PURE__ */ i("div", { children: [
284
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-2", children: M === "zh" ? "智能提示" : "AI Insights" }),
285
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: z.map((n) => /* @__PURE__ */ i(
286
+ "div",
287
+ {
288
+ className: y(
289
+ "flex items-start gap-2 px-3 py-2 rounded-lg bg-gradient-to-r border",
290
+ A[n.category] || A.system
291
+ ),
292
+ children: [
293
+ /* @__PURE__ */ e("span", { className: "text-sm flex-shrink-0", children: n.icon }),
294
+ /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
295
+ /* @__PURE__ */ e("p", { className: "text-[11px] text-white/70 leading-relaxed", children: n.message }),
296
+ n.actionLabel && n.actionKey && /* @__PURE__ */ e(
297
+ "button",
298
+ {
299
+ onClick: () => {
300
+ d(n.actionKey), I(n.id);
301
+ },
302
+ className: "mt-1 text-[10px] font-medium px-2 py-0.5 rounded-full bg-white/10 hover:bg-white/20 text-white/80 transition-colors",
303
+ children: n.actionLabel
304
+ }
305
+ )
306
+ ] }),
307
+ /* @__PURE__ */ e(
308
+ "button",
309
+ {
310
+ onClick: () => I(n.id),
311
+ className: "text-white/20 hover:text-white/50 flex-shrink-0",
312
+ children: /* @__PURE__ */ e(re, { className: "w-3 h-3" })
313
+ }
314
+ )
315
+ ]
316
+ },
317
+ n.id
318
+ )) })
319
+ ] })
320
+ ] })
321
+ ]
322
+ }
323
+ ) }),
324
+ /* @__PURE__ */ i(
325
+ p.button,
326
+ {
327
+ onClick: () => G(!f),
328
+ whileHover: { scale: 1.05 },
329
+ whileTap: { scale: 0.95 },
330
+ className: y(
331
+ "relative w-12 h-12 rounded-full flex items-center justify-center shadow-2xl transition-all border",
332
+ g ? "bg-purple-600 border-purple-400/50 shadow-purple-500/40" : f ? "bg-[#0D1235] border-purple-500/30" : "bg-[#0D1235]/90 backdrop-blur-xl border-white/10 hover:border-purple-500/30"
333
+ ),
334
+ style: {
335
+ boxShadow: g ? `0 0 ${15 + T * 20}px rgba(139,92,246,0.4)` : S ? `0 0 ${8 + T * 12}px rgba(139,92,246,0.15)` : void 0
336
+ },
337
+ children: [
338
+ g ? /* @__PURE__ */ e(
339
+ p.div,
340
+ {
341
+ animate: { scale: [1, 1.2, 1] },
342
+ transition: { duration: 0.8, repeat: 1 / 0 },
343
+ children: /* @__PURE__ */ e(xe, { className: "w-5 h-5 text-white" })
344
+ }
345
+ ) : /* @__PURE__ */ e(Te, { className: "w-5 h-5 text-purple-400" }),
346
+ z.length > 0 && !f && /* @__PURE__ */ e(
347
+ p.div,
348
+ {
349
+ initial: { scale: 0 },
350
+ animate: { scale: 1 },
351
+ className: "absolute -top-1 -right-1 w-4 h-4 rounded-full bg-pink-500 text-white text-[9px] font-bold flex items-center justify-center",
352
+ children: z.length
353
+ }
354
+ ),
355
+ S && !g && /* @__PURE__ */ e(
356
+ p.div,
357
+ {
358
+ className: "absolute inset-0 rounded-full border border-purple-500/20",
359
+ animate: { scale: [1, 1.4, 1], opacity: [0.3, 0, 0.3] },
360
+ transition: { duration: 3, repeat: 1 / 0, ease: "easeInOut" }
361
+ }
362
+ )
363
+ ]
364
+ }
365
+ ),
366
+ a && !f && /* @__PURE__ */ e(
367
+ p.button,
368
+ {
369
+ onClick: J,
370
+ whileHover: { scale: 1.1 },
371
+ whileTap: { scale: 0.9 },
372
+ className: y(
373
+ "w-9 h-9 rounded-full flex items-center justify-center border transition-all",
374
+ g ? "bg-purple-600 border-purple-400/50 text-white" : "bg-[#0D1235]/80 backdrop-blur-xl border-white/10 text-white/40 hover:text-purple-400 hover:border-purple-500/30"
375
+ ),
376
+ children: g ? /* @__PURE__ */ e(Ve, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ e(xe, { className: "w-3.5 h-3.5" })
377
+ }
378
+ )
379
+ ] }),
380
+ /* @__PURE__ */ e(Q, { children: f && /* @__PURE__ */ i($, { children: [
381
+ /* @__PURE__ */ e(
382
+ p.div,
383
+ {
384
+ initial: { opacity: 0 },
385
+ animate: { opacity: 1 },
386
+ exit: { opacity: 0 },
387
+ className: "md:hidden fixed inset-0 z-[55] bg-black/40",
388
+ onClick: () => G(!1)
389
+ },
390
+ "mobile-ai-backdrop"
391
+ ),
392
+ /* @__PURE__ */ i(
393
+ p.div,
394
+ {
395
+ initial: { opacity: 0, y: 30 },
396
+ animate: { opacity: 1, y: 0 },
397
+ exit: { opacity: 0, y: 30 },
398
+ transition: { type: "spring", damping: 25, stiffness: 300 },
399
+ className: "md:hidden fixed left-3 right-3 top-14 z-[56] max-h-[70vh] bg-[#0D1235]/98 backdrop-blur-2xl rounded-2xl border border-white/10 shadow-2xl overflow-hidden",
400
+ children: [
401
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between px-4 py-3 border-b border-white/[0.06]", children: [
402
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
403
+ /* @__PURE__ */ e(Te, { className: "w-4 h-4 text-purple-400" }),
404
+ /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-white/90", children: M === "zh" ? "AI 助手" : "AI Assistant" })
405
+ ] }),
406
+ /* @__PURE__ */ e(
407
+ "button",
408
+ {
409
+ onClick: () => G(!1),
410
+ className: "p-1.5 rounded-lg text-white/40 hover:text-white/70 hover:bg-white/5",
411
+ children: /* @__PURE__ */ e(re, { className: "w-4 h-4" })
412
+ }
413
+ )
414
+ ] }),
415
+ /* @__PURE__ */ i("div", { className: "p-4 space-y-3 max-h-[60vh] overflow-y-auto", style: { scrollbarWidth: "none" }, children: [
416
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-3 py-2 bg-white/[0.03] rounded-lg border border-white/[0.06]", children: [
417
+ /* @__PURE__ */ e(Oe, { className: "w-3.5 h-3.5 text-white/30 flex-shrink-0" }),
418
+ /* @__PURE__ */ e("p", { className: "text-[11px] text-white/50", children: j })
419
+ ] }),
420
+ a && /* @__PURE__ */ i(
421
+ "button",
422
+ {
423
+ onClick: J,
424
+ className: y(
425
+ "w-full flex items-center justify-center gap-2 py-3 rounded-xl border transition-all",
426
+ g ? "bg-purple-600/20 border-purple-500/40 text-purple-300" : "bg-white/[0.03] border-white/[0.08] text-white/50"
427
+ ),
428
+ children: [
429
+ /* @__PURE__ */ e(xe, { className: "w-5 h-5" }),
430
+ /* @__PURE__ */ e("span", { className: "text-sm", children: g ? M === "zh" ? "正在聆听..." : "Listening..." : M === "zh" ? "点击说出指令" : "Tap to speak" })
431
+ ]
432
+ }
433
+ ),
434
+ z.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-2", children: [
435
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider", children: M === "zh" ? "智能提示" : "AI Tips" }),
436
+ z.map((n) => /* @__PURE__ */ i("div", { className: y("flex items-start gap-2 px-3 py-2 rounded-lg bg-gradient-to-r border", A[n.category] || A.system), children: [
437
+ /* @__PURE__ */ e("span", { className: "text-sm flex-shrink-0", children: n.icon }),
438
+ /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
439
+ /* @__PURE__ */ e("p", { className: "text-[11px] text-white/70 leading-relaxed", children: n.message }),
440
+ n.actionLabel && n.actionKey && /* @__PURE__ */ e("button", { onClick: () => {
441
+ d(n.actionKey), I(n.id);
442
+ }, className: "mt-1 text-[10px] font-medium px-2 py-0.5 rounded-full bg-white/10 text-white/80", children: n.actionLabel })
443
+ ] }),
444
+ /* @__PURE__ */ e("button", { onClick: () => I(n.id), className: "text-white/20", children: /* @__PURE__ */ e(re, { className: "w-3 h-3" }) })
445
+ ] }, n.id))
446
+ ] }),
447
+ W.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-1", children: [
448
+ /* @__PURE__ */ e("p", { className: "text-[10px] text-white/25 uppercase tracking-wider", children: M === "zh" ? "最近指令" : "Recent" }),
449
+ W.slice(-3).reverse().map((n, v) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-2 py-1 rounded-lg bg-white/[0.02]", children: [
450
+ /* @__PURE__ */ e(Qe, { className: "w-3 h-3 text-white/20 flex-shrink-0" }),
451
+ /* @__PURE__ */ i("span", { className: "text-[10px] text-white/40 truncate", children: [
452
+ '"',
453
+ n.transcript,
454
+ '"'
455
+ ] }),
456
+ /* @__PURE__ */ e("span", { className: "text-[10px] text-green-400/60 ml-auto", children: "✓" })
457
+ ] }, v))
458
+ ] })
459
+ ] })
460
+ ]
461
+ },
462
+ "mobile-ai-overlay"
463
+ )
464
+ ] }) })
465
+ ] });
466
+ }, Ue = [
467
+ { id: "happy", label: "Happy", labelZh: "快乐", icon: _e, color: "text-yellow-400", bg: "from-yellow-500/20 to-orange-500/20" },
468
+ { id: "sad", label: "Sad", labelZh: "忧伤", icon: Ye, color: "text-blue-400", bg: "from-blue-500/20 to-indigo-500/20" },
469
+ { id: "energetic", label: "Energetic", labelZh: "活力", icon: Xe, color: "text-red-400", bg: "from-red-500/20 to-orange-500/20" },
470
+ { id: "calm", label: "Calm", labelZh: "宁静", icon: He, color: "text-cyan-400", bg: "from-cyan-500/20 to-teal-500/20" },
471
+ { id: "love", label: "Love", labelZh: "爱情", icon: et, color: "text-pink-400", bg: "from-pink-500/20 to-red-500/20" }
472
+ ], Dt = ({
473
+ isOpen: z,
474
+ onClose: I,
475
+ onCreateTrack: d
476
+ }) => {
477
+ const [g, J] = u("happy"), [a, O] = u([]), [W, j] = u(""), [S, T] = u(8), [K, s] = u(!1), [N, M] = u(null), [f, U] = u(!1), [F, D] = u(0), [Y, B] = u(!1), [G, A] = u("idle"), n = it(), { t: v, lang: te } = Ae(), h = E(() => {
478
+ const m = W.trim();
479
+ m && a.length < 5 && !a.includes(m) && (O((Z) => [...Z, m]), j(""));
480
+ }, [W, a]), l = E((m) => {
481
+ O((Z) => Z.filter((R) => R !== m));
482
+ }, []), x = E(async () => {
483
+ s(!0);
484
+ try {
485
+ const m = await _("/ai/lyrics", {
486
+ method: "POST",
487
+ headers: { "Content-Type": "application/json" },
488
+ body: JSON.stringify({
489
+ theme: g,
490
+ keywords: a,
491
+ lines: S
492
+ })
493
+ });
494
+ m != null && m.lyrics && (M(m.lyrics), D((Z) => Z + 1));
495
+ } catch (m) {
496
+ console.error("AI lyrics generation failed:", m);
497
+ } finally {
498
+ s(!1);
499
+ }
500
+ }, [g, a, S]), b = E(() => {
501
+ N && (navigator.clipboard.writeText(N.join(`
502
+ `)), U(!0), setTimeout(() => U(!1), 2e3));
503
+ }, [N]), de = E(async () => {
504
+ var m, Z;
505
+ if (!(!N || !d)) {
506
+ A("composing-params");
507
+ try {
508
+ (m = navigator.vibrate) == null || m.call(navigator, 25);
509
+ } catch {
510
+ }
511
+ try {
512
+ const R = await _("/ai/compose", {
513
+ method: "POST",
514
+ headers: { "Content-Type": "application/json" },
515
+ body: JSON.stringify({
516
+ theme: g,
517
+ lyrics: N,
518
+ lineCount: S
519
+ })
520
+ });
521
+ if (!(R != null && R.composition)) {
522
+ d(N, g), B(!0), A("done"), setTimeout(() => {
523
+ B(!1), A("idle");
524
+ }, 2500);
525
+ return;
526
+ }
527
+ A("synthesizing");
528
+ const H = await n.compose(R.composition);
529
+ d(N, g, H, R.composition), B(!0), A("done");
530
+ try {
531
+ (Z = navigator.vibrate) == null || Z.call(navigator, [10, 30, 10, 30, 40]);
532
+ } catch {
533
+ }
534
+ setTimeout(() => {
535
+ B(!1), A("idle");
536
+ }, 2500);
537
+ } catch (R) {
538
+ console.error("Composition pipeline failed:", R), d(N, g), B(!0), A("done"), setTimeout(() => {
539
+ B(!1), A("idle");
540
+ }, 2500);
541
+ }
542
+ }
543
+ }, [N, d, g, S, n]), w = Ue.find((m) => m.id === g);
544
+ return /* @__PURE__ */ e(Q, { children: z && /* @__PURE__ */ i($, { children: [
545
+ /* @__PURE__ */ e(
546
+ p.div,
547
+ {
548
+ initial: { opacity: 0 },
549
+ animate: { opacity: 1 },
550
+ exit: { opacity: 0 },
551
+ className: "fixed inset-0 z-[60] bg-black/50 backdrop-blur-sm",
552
+ onClick: I
553
+ }
554
+ ),
555
+ /* @__PURE__ */ i(
556
+ p.div,
557
+ {
558
+ initial: { y: "100%", opacity: 0 },
559
+ animate: { y: 0, opacity: 1 },
560
+ exit: { y: "100%", opacity: 0 },
561
+ transition: { type: "spring", damping: 28, stiffness: 300 },
562
+ className: "fixed inset-x-0 bottom-0 z-[61] max-h-[90vh] bg-[#0D1235]/95 backdrop-blur-2xl border-t border-white/10 rounded-t-3xl flex flex-col shadow-2xl md:inset-x-auto md:left-1/2 md:-translate-x-1/2 md:w-full md:max-w-lg md:bottom-auto md:top-1/2 md:-translate-y-1/2 md:rounded-2xl md:border md:max-h-[85vh]",
563
+ children: [
564
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-5 pb-3 border-b border-white/[0.06] flex-shrink-0", children: [
565
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
566
+ /* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-xl bg-gradient-to-tr from-purple-500/20 to-pink-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(We, { className: "w-4.5 h-4.5 text-purple-400" }) }),
567
+ /* @__PURE__ */ i("div", { children: [
568
+ /* @__PURE__ */ e("h3", { className: "text-white font-semibold text-sm leading-tight", children: v("aiLyrics.title") }),
569
+ /* @__PURE__ */ e("p", { className: "text-white/30 text-xs", children: v("aiLyrics.subtitle") })
570
+ ] })
571
+ ] }),
572
+ /* @__PURE__ */ e(
573
+ "button",
574
+ {
575
+ onClick: I,
576
+ className: "p-2 rounded-lg text-white/40 hover:text-white/70 hover:bg-white/5 transition-colors",
577
+ children: /* @__PURE__ */ e(re, { className: "w-4 h-4" })
578
+ }
579
+ )
580
+ ] }),
581
+ /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto p-5 space-y-5", style: { scrollbarWidth: "none" }, children: [
582
+ /* @__PURE__ */ i("div", { children: [
583
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-3", children: v("aiLyrics.theme") }),
584
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-2", children: Ue.map((m) => {
585
+ const Z = m.icon, R = g === m.id;
586
+ return /* @__PURE__ */ i(
587
+ "button",
588
+ {
589
+ onClick: () => J(m.id),
590
+ className: y(
591
+ "p-3 rounded-xl border transition-all text-center",
592
+ R ? `bg-gradient-to-br ${m.bg} border-white/15 shadow-lg` : "bg-white/[0.02] border-white/[0.06] hover:bg-white/[0.05]"
593
+ ),
594
+ children: [
595
+ /* @__PURE__ */ e(
596
+ Z,
597
+ {
598
+ className: y(
599
+ "w-5 h-5 mx-auto mb-1",
600
+ R ? m.color : "text-white/30"
601
+ )
602
+ }
603
+ ),
604
+ /* @__PURE__ */ e("p", { className: y("text-[10px]", R ? "text-white/80" : "text-white/30"), children: te === "zh" ? m.labelZh : m.label })
605
+ ]
606
+ },
607
+ m.id
608
+ );
609
+ }) })
610
+ ] }),
611
+ /* @__PURE__ */ i("div", { children: [
612
+ /* @__PURE__ */ i("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-3", children: [
613
+ v("aiLyrics.keywords"),
614
+ " ",
615
+ /* @__PURE__ */ i("span", { className: "text-white/20", children: [
616
+ "(",
617
+ a.length,
618
+ "/5)"
619
+ ] })
620
+ ] }),
621
+ /* @__PURE__ */ i("div", { className: "flex gap-2 mb-2", children: [
622
+ /* @__PURE__ */ e(
623
+ "input",
624
+ {
625
+ type: "text",
626
+ value: W,
627
+ onChange: (m) => j(m.target.value),
628
+ onKeyDown: (m) => m.key === "Enter" && h(),
629
+ placeholder: v("aiLyrics.enterKeyword"),
630
+ className: "flex-1 bg-white/5 border border-white/10 rounded-lg py-2 px-3 text-sm text-white placeholder:text-white/20 focus:outline-none focus:border-purple-500/50"
631
+ }
632
+ ),
633
+ /* @__PURE__ */ e(
634
+ "button",
635
+ {
636
+ onClick: h,
637
+ disabled: !W.trim() || a.length >= 5,
638
+ className: "p-2 rounded-lg bg-white/5 border border-white/[0.08] text-white/60 hover:text-white hover:bg-white/10 transition-colors disabled:opacity-30",
639
+ children: /* @__PURE__ */ e(pe, { className: "w-4 h-4" })
640
+ }
641
+ )
642
+ ] }),
643
+ a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: a.map((m) => /* @__PURE__ */ i(
644
+ p.span,
645
+ {
646
+ initial: { scale: 0.8, opacity: 0 },
647
+ animate: { scale: 1, opacity: 1 },
648
+ exit: { scale: 0.8, opacity: 0 },
649
+ className: "inline-flex items-center gap-1 px-2.5 py-1 bg-purple-500/10 border border-purple-500/20 rounded-full text-xs text-purple-300",
650
+ children: [
651
+ m,
652
+ /* @__PURE__ */ e("button", { onClick: () => l(m), className: "text-purple-400/60 hover:text-purple-300", children: /* @__PURE__ */ e(re, { className: "w-3 h-3" }) })
653
+ ]
654
+ },
655
+ m
656
+ )) })
657
+ ] }),
658
+ /* @__PURE__ */ i("div", { children: [
659
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-3", children: v("aiLyrics.lines") }),
660
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
661
+ /* @__PURE__ */ e(
662
+ "button",
663
+ {
664
+ onClick: () => T(Math.max(4, S - 2)),
665
+ className: "p-2 rounded-lg bg-white/5 border border-white/[0.08] text-white/60 hover:text-white transition-colors",
666
+ children: /* @__PURE__ */ e(Ie, { className: "w-4 h-4" })
667
+ }
668
+ ),
669
+ /* @__PURE__ */ i("div", { className: "flex-1 text-center", children: [
670
+ /* @__PURE__ */ e("span", { className: "text-2xl font-bold text-white font-mono", children: S }),
671
+ /* @__PURE__ */ e("span", { className: "text-xs text-white/30 ml-1", children: v("aiLyrics.linesUnit") })
672
+ ] }),
673
+ /* @__PURE__ */ e(
674
+ "button",
675
+ {
676
+ onClick: () => T(Math.min(16, S + 2)),
677
+ className: "p-2 rounded-lg bg-white/5 border border-white/[0.08] text-white/60 hover:text-white transition-colors",
678
+ children: /* @__PURE__ */ e(pe, { className: "w-4 h-4" })
679
+ }
680
+ )
681
+ ] })
682
+ ] }),
683
+ /* @__PURE__ */ e(
684
+ p.button,
685
+ {
686
+ onClick: x,
687
+ disabled: K,
688
+ whileHover: { scale: 1.01 },
689
+ whileTap: { scale: 0.98 },
690
+ className: "w-full py-3 rounded-xl bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 text-white font-medium flex items-center justify-center gap-2 shadow-lg shadow-purple-500/20 disabled:opacity-50 transition-opacity",
691
+ children: K ? /* @__PURE__ */ i($, { children: [
692
+ /* @__PURE__ */ e(fe, { className: "w-4 h-4 animate-spin" }),
693
+ v("aiLyrics.generating")
694
+ ] }) : /* @__PURE__ */ i($, { children: [
695
+ /* @__PURE__ */ e(je, { className: "w-4 h-4" }),
696
+ F > 0 ? v("aiLyrics.regenerate") : v("aiLyrics.generate")
697
+ ] })
698
+ }
699
+ ),
700
+ /* @__PURE__ */ e(Q, { children: N && /* @__PURE__ */ i(
701
+ p.div,
702
+ {
703
+ initial: { opacity: 0, y: 20 },
704
+ animate: { opacity: 1, y: 0 },
705
+ exit: { opacity: 0, y: 20 },
706
+ className: "space-y-3",
707
+ children: [
708
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
709
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
710
+ /* @__PURE__ */ e(w.icon, { className: y("w-4 h-4", w.color) }),
711
+ /* @__PURE__ */ i("p", { className: "text-xs text-white/50", children: [
712
+ v("aiLyrics.generated"),
713
+ " · ",
714
+ te === "zh" ? w.labelZh : w.label,
715
+ " ",
716
+ v("aiLyrics.themeSuffix")
717
+ ] })
718
+ ] }),
719
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
720
+ /* @__PURE__ */ e(
721
+ "button",
722
+ {
723
+ onClick: x,
724
+ disabled: K,
725
+ className: "p-1.5 rounded-lg text-white/30 hover:text-white/60 hover:bg-white/5 transition-colors",
726
+ title: "Regenerate",
727
+ children: /* @__PURE__ */ e(xt, { className: y("w-3.5 h-3.5", K && "animate-spin") })
728
+ }
729
+ ),
730
+ /* @__PURE__ */ e(
731
+ "button",
732
+ {
733
+ onClick: b,
734
+ className: "flex items-center gap-1 px-2.5 py-1 rounded-lg bg-white/5 border border-white/[0.08] text-xs text-white/50 hover:text-white/80 transition-colors",
735
+ children: f ? /* @__PURE__ */ i($, { children: [
736
+ /* @__PURE__ */ e(ee, { className: "w-3 h-3 text-green-400" }),
737
+ /* @__PURE__ */ e("span", { className: "text-green-400", children: v("aiLyrics.copied") })
738
+ ] }) : /* @__PURE__ */ i($, { children: [
739
+ /* @__PURE__ */ e(ge, { className: "w-3 h-3" }),
740
+ v("aiLyrics.copy")
741
+ ] })
742
+ }
743
+ ),
744
+ d && /* @__PURE__ */ e(
745
+ "button",
746
+ {
747
+ onClick: de,
748
+ disabled: G !== "idle" && G !== "done",
749
+ className: y(
750
+ "flex items-center gap-1 px-2.5 py-1 rounded-lg border text-xs transition-colors",
751
+ G === "idle" || G === "done" ? "bg-white/5 border-white/[0.08] text-white/50 hover:text-white/80" : "bg-purple-500/10 border-purple-500/20 text-purple-300"
752
+ ),
753
+ children: Y ? /* @__PURE__ */ i($, { children: [
754
+ /* @__PURE__ */ e(ee, { className: "w-3 h-3 text-green-400" }),
755
+ /* @__PURE__ */ e("span", { className: "text-green-400", children: v("aiLyrics.trackCreated") })
756
+ ] }) : G === "composing-params" ? /* @__PURE__ */ i($, { children: [
757
+ /* @__PURE__ */ e(fe, { className: "w-3 h-3 animate-spin text-purple-400" }),
758
+ /* @__PURE__ */ e("span", { children: te === "zh" ? "编曲中..." : "Composing..." })
759
+ ] }) : G === "synthesizing" ? /* @__PURE__ */ i($, { children: [
760
+ /* @__PURE__ */ e(pt, { className: "w-3 h-3 animate-pulse text-purple-400" }),
761
+ /* @__PURE__ */ e("span", { children: te === "zh" ? `合成 ${Math.round(n.progress * 100)}%` : `Synth ${Math.round(n.progress * 100)}%` })
762
+ ] }) : /* @__PURE__ */ i($, { children: [
763
+ /* @__PURE__ */ e($e, { className: "w-3 h-3" }),
764
+ te === "zh" ? "创建歌曲" : "Create Track"
765
+ ] })
766
+ }
767
+ )
768
+ ] })
769
+ ] }),
770
+ /* @__PURE__ */ e("div", { className: y("rounded-xl border p-4 bg-gradient-to-br", w.bg, "border-white/[0.08]"), children: /* @__PURE__ */ e("div", { className: "space-y-2", children: N.map((m, Z) => /* @__PURE__ */ e(
771
+ p.p,
772
+ {
773
+ initial: { opacity: 0, x: -10 },
774
+ animate: { opacity: 1, x: 0 },
775
+ transition: { delay: Z * 0.08 },
776
+ className: "text-sm text-white/80 leading-relaxed",
777
+ children: m
778
+ },
779
+ `${F}-${Z}`
780
+ )) }) })
781
+ ]
782
+ }
783
+ ) })
784
+ ] })
785
+ ]
786
+ }
787
+ )
788
+ ] }) });
789
+ }, Me = [
790
+ { id: "happy", label: "Happy", labelZh: "快乐", icon: _e, color: "text-yellow-400", bg: "from-yellow-500/20 to-orange-500/20" },
791
+ { id: "sad", label: "Sad", labelZh: "忧伤", icon: Ye, color: "text-blue-400", bg: "from-blue-500/20 to-indigo-500/20" },
792
+ { id: "energetic", label: "Energetic", labelZh: "活力", icon: Xe, color: "text-red-400", bg: "from-red-500/20 to-orange-500/20", premium: !0, spCost: 200 },
793
+ { id: "calm", label: "Calm", labelZh: "宁静", icon: He, color: "text-cyan-400", bg: "from-cyan-500/20 to-teal-500/20" },
794
+ { id: "love", label: "Love", labelZh: "爱情", icon: et, color: "text-pink-400", bg: "from-pink-500/20 to-red-500/20", premium: !0, spCost: 200 }
795
+ ], ze = [
796
+ {
797
+ id: "quick",
798
+ label: "Quick Song",
799
+ labelZh: "极简写歌",
800
+ icon: je,
801
+ desc: "AI lyrics + auto compose in seconds",
802
+ descZh: "一键AI写词作曲,秒出成品",
803
+ gradient: "from-purple-500 to-pink-500"
804
+ },
805
+ {
806
+ id: "master",
807
+ label: "Master Mode",
808
+ labelZh: "大师写歌",
809
+ icon: ut,
810
+ desc: "Full control over theme, structure & style",
811
+ descZh: "精细控制主题、结构与风格",
812
+ gradient: "from-indigo-500 to-blue-500"
813
+ },
814
+ {
815
+ id: "remix",
816
+ label: "Remix & Cover",
817
+ labelZh: "热歌改编",
818
+ icon: Ge,
819
+ desc: "Transform existing tracks with AI",
820
+ descZh: "AI改编翻唱热门曲目",
821
+ gradient: "from-orange-500 to-red-500"
822
+ },
823
+ {
824
+ id: "works",
825
+ label: "My Works",
826
+ labelZh: "作品管理",
827
+ icon: wt,
828
+ desc: "View & manage your creations",
829
+ descZh: "查看管理你的创作",
830
+ gradient: "from-emerald-500 to-teal-500"
831
+ },
832
+ {
833
+ id: "mv",
834
+ label: "MV Creator",
835
+ labelZh: "MV 创作",
836
+ icon: tt,
837
+ desc: "Visualize music with AI effects",
838
+ descZh: "AI驱动音乐可视化MV",
839
+ gradient: "from-cyan-500 to-blue-500"
840
+ }
841
+ ], $t = [
842
+ { id: "verse-chorus", label: "Verse-Chorus", labelZh: "主副歌" },
843
+ { id: "verse-bridge", label: "Verse-Bridge", labelZh: "主歌-桥段" },
844
+ { id: "aaba", label: "AABA", labelZh: "AABA经典" },
845
+ { id: "through", label: "Through-composed", labelZh: "通谱体" }
846
+ ], It = [
847
+ { id: "piano", label: "Piano", labelZh: "钢琴", emoji: "🎹" },
848
+ { id: "guitar", label: "Guitar", labelZh: "吉他", emoji: "🎸" },
849
+ { id: "synth", label: "Synth", labelZh: "合成器", emoji: "🎛️" },
850
+ { id: "strings", label: "Strings", labelZh: "弦乐", emoji: "🎻" },
851
+ { id: "drums", label: "Drums", labelZh: "鼓", emoji: "🥁" },
852
+ { id: "bass", label: "Bass", labelZh: "贝斯", emoji: "🎸" }
853
+ ], Gt = ({
854
+ isOpen: z,
855
+ onClose: I,
856
+ onCreateTrack: d,
857
+ playlist: g,
858
+ currentTrackIndex: J,
859
+ onHaptic: a,
860
+ onShareWork: O,
861
+ onOpenMV: W,
862
+ user: j,
863
+ starPower: S = 0,
864
+ onStarPowerUpdate: T
865
+ }) => {
866
+ var qe, Fe;
867
+ const { t: K, lang: s } = Ae(), [N, M] = u(null), [f, U] = u(/* @__PURE__ */ new Set());
868
+ ye(() => {
869
+ if (!j) {
870
+ try {
871
+ const t = localStorage.getItem("dmusic-unlocked-themes");
872
+ t && U(new Set(JSON.parse(t)));
873
+ } catch {
874
+ }
875
+ return;
876
+ }
877
+ (async () => {
878
+ try {
879
+ const t = await _(`/user/${j.id}/unlocked-themes`);
880
+ if (t != null && t.themes && t.themes.length > 0)
881
+ U(new Set(t.themes));
882
+ else
883
+ try {
884
+ const o = localStorage.getItem("dmusic-unlocked-themes");
885
+ if (o) {
886
+ const c = JSON.parse(o);
887
+ if (c.length > 0) {
888
+ U(new Set(c));
889
+ for (const k of c)
890
+ await _(`/user/${j.id}/unlocked-themes`, {
891
+ method: "POST",
892
+ headers: { "Content-Type": "application/json" },
893
+ body: JSON.stringify({ themeId: k })
894
+ });
895
+ localStorage.removeItem("dmusic-unlocked-themes");
896
+ }
897
+ }
898
+ } catch {
899
+ }
900
+ } catch {
901
+ try {
902
+ const t = localStorage.getItem("dmusic-unlocked-themes");
903
+ t && U(new Set(JSON.parse(t)));
904
+ } catch {
905
+ }
906
+ }
907
+ })();
908
+ }, [j]);
909
+ const F = async (t, o) => {
910
+ if (!(!j || S < o))
911
+ try {
912
+ const c = await _(`/starpower/${j.id}/consume`, {
913
+ method: "POST",
914
+ headers: { "Content-Type": "application/json" },
915
+ body: JSON.stringify({ amount: o, purpose: "template_unlock", targetId: t })
916
+ });
917
+ if (c != null && c.success) {
918
+ T == null || T(c.starPower);
919
+ const k = new Set(f);
920
+ k.add(t), U(k), await _(`/user/${j.id}/unlocked-themes`, {
921
+ method: "POST",
922
+ headers: { "Content-Type": "application/json" },
923
+ body: JSON.stringify({ themeId: t })
924
+ });
925
+ }
926
+ } catch (c) {
927
+ console.error("Theme unlock error:", c);
928
+ }
929
+ }, [D, Y] = u("happy"), [B, G] = u(""), [A, n] = u(!1), [v, te] = u(null), [h, l] = u("idle"), x = it(), [b, de] = u("calm"), [w, m] = u([]), [Z, R] = u(""), [H, Ne] = u(10), [ve, be] = u("verse-chorus"), [ke, r] = u(["piano", "strings"]), [L, q] = u(100), [V, C] = u(!1), [X, ie] = u(null), [P, ae] = u("idle"), [ne, lt] = u(null), [se, rt] = u("energetic"), [at, Ee] = u(!1), [Le, st] = u(null), [Ce, oe] = u("idle"), [he, Ze] = u([]), [ce, Ke] = u(null);
930
+ ye(() => {
931
+ if (z)
932
+ try {
933
+ const t = localStorage.getItem("d-music-works");
934
+ t && Ze(JSON.parse(t));
935
+ } catch {
936
+ }
937
+ }, [z]);
938
+ const le = E((t) => {
939
+ Ze((o) => {
940
+ const c = [t, ...o].slice(0, 50);
941
+ try {
942
+ localStorage.setItem("d-music-works", JSON.stringify(c));
943
+ } catch {
944
+ }
945
+ return c;
946
+ });
947
+ }, []), ot = E((t) => {
948
+ Ze((o) => {
949
+ const c = o.filter((k) => k.id !== t);
950
+ try {
951
+ localStorage.setItem("d-music-works", JSON.stringify(c));
952
+ } catch {
953
+ }
954
+ return c;
955
+ });
956
+ }, []), Be = E(async () => {
957
+ n(!0), l("lyrics"), a == null || a("medium");
958
+ try {
959
+ const t = await _("/ai/lyrics", {
960
+ method: "POST",
961
+ headers: { "Content-Type": "application/json" },
962
+ body: JSON.stringify({
963
+ theme: D,
964
+ keywords: B ? B.split(/[,,\s]+/).filter(Boolean) : [],
965
+ lines: 8
966
+ })
967
+ });
968
+ if (!(t != null && t.lyrics)) throw new Error("Lyrics generation failed");
969
+ te(t.lyrics), l("composing");
970
+ const o = await _("/ai/compose", {
971
+ method: "POST",
972
+ headers: { "Content-Type": "application/json" },
973
+ body: JSON.stringify({
974
+ theme: D,
975
+ lyrics: t.lyrics,
976
+ lineCount: 8
977
+ })
978
+ });
979
+ if (!(o != null && o.composition)) {
980
+ d == null || d(t.lyrics, D), le({
981
+ id: `work-${Date.now()}`,
982
+ title: `${D} · Quick Song`,
983
+ theme: D,
984
+ lyrics: t.lyrics,
985
+ createdAt: Date.now(),
986
+ mode: "quick"
987
+ }), l("done"), a == null || a("success"), setTimeout(() => l("idle"), 2e3);
988
+ return;
989
+ }
990
+ l("synth");
991
+ const c = await x.compose(o.composition);
992
+ d == null || d(t.lyrics, D, c, o.composition), le({
993
+ id: `work-${Date.now()}`,
994
+ title: `${D} · Quick Song`,
995
+ theme: D,
996
+ lyrics: t.lyrics,
997
+ createdAt: Date.now(),
998
+ mode: "quick"
999
+ }), l("done"), a == null || a("success"), setTimeout(() => l("idle"), 2500);
1000
+ } catch (t) {
1001
+ console.error("Quick create failed:", t), v && (d == null || d(v, D)), l("idle");
1002
+ } finally {
1003
+ n(!1);
1004
+ }
1005
+ }, [D, B, d, x, a, v, le]), nt = E(async () => {
1006
+ C(!0), ae("lyrics"), a == null || a("medium");
1007
+ try {
1008
+ const t = await _("/ai/lyrics", {
1009
+ method: "POST",
1010
+ headers: { "Content-Type": "application/json" },
1011
+ body: JSON.stringify({
1012
+ theme: b,
1013
+ keywords: w,
1014
+ lines: H
1015
+ })
1016
+ });
1017
+ if (!(t != null && t.lyrics)) throw new Error("Lyrics generation failed");
1018
+ ie(t.lyrics), ae("composing");
1019
+ const o = await _("/ai/compose", {
1020
+ method: "POST",
1021
+ headers: { "Content-Type": "application/json" },
1022
+ body: JSON.stringify({
1023
+ theme: b,
1024
+ lyrics: t.lyrics,
1025
+ lineCount: H
1026
+ })
1027
+ });
1028
+ if (!(o != null && o.composition)) {
1029
+ d == null || d(t.lyrics, b), le({
1030
+ id: `work-${Date.now()}`,
1031
+ title: `${b} · Master Work`,
1032
+ theme: b,
1033
+ lyrics: t.lyrics,
1034
+ createdAt: Date.now(),
1035
+ mode: "master"
1036
+ }), ae("done"), a == null || a("success"), setTimeout(() => ae("idle"), 2e3);
1037
+ return;
1038
+ }
1039
+ ae("synth");
1040
+ const c = await x.compose(o.composition);
1041
+ d == null || d(t.lyrics, b, c, o.composition), le({
1042
+ id: `work-${Date.now()}`,
1043
+ title: `${b} · Master Work`,
1044
+ theme: b,
1045
+ lyrics: t.lyrics,
1046
+ createdAt: Date.now(),
1047
+ mode: "master"
1048
+ }), ae("done"), a == null || a("success"), setTimeout(() => ae("idle"), 2500);
1049
+ } catch (t) {
1050
+ console.error("Master create failed:", t), ae("idle");
1051
+ } finally {
1052
+ C(!1);
1053
+ }
1054
+ }, [b, w, H, d, x, a, le]), ct = E(async () => {
1055
+ if (ne !== null) {
1056
+ Ee(!0), oe("lyrics"), a == null || a("medium");
1057
+ try {
1058
+ const t = g[ne], o = t.lyrics.slice(1, 5).map((Pe) => Pe.text).join(" ").split(" ").filter((Pe) => Pe.length > 3).slice(0, 5), c = await _("/ai/lyrics", {
1059
+ method: "POST",
1060
+ headers: { "Content-Type": "application/json" },
1061
+ body: JSON.stringify({
1062
+ theme: se,
1063
+ keywords: o,
1064
+ lines: 8
1065
+ })
1066
+ });
1067
+ if (!(c != null && c.lyrics)) throw new Error("Remix lyrics failed");
1068
+ st(c.lyrics), oe("composing");
1069
+ const k = await _("/ai/compose", {
1070
+ method: "POST",
1071
+ headers: { "Content-Type": "application/json" },
1072
+ body: JSON.stringify({
1073
+ theme: se,
1074
+ lyrics: c.lyrics,
1075
+ lineCount: 8
1076
+ })
1077
+ }), me = `Remix · ${t.title}`;
1078
+ if (!(k != null && k.composition)) {
1079
+ d == null || d(c.lyrics, se), le({ id: `work-${Date.now()}`, title: me, theme: se, lyrics: c.lyrics, createdAt: Date.now(), mode: "remix" }), oe("done"), a == null || a("success"), setTimeout(() => oe("idle"), 2e3);
1080
+ return;
1081
+ }
1082
+ oe("synth");
1083
+ const ue = await x.compose(k.composition);
1084
+ d == null || d(c.lyrics, se, ue, k.composition), le({ id: `work-${Date.now()}`, title: me, theme: se, lyrics: c.lyrics, createdAt: Date.now(), mode: "remix" }), oe("done"), a == null || a("success"), setTimeout(() => oe("idle"), 2500);
1085
+ } catch (t) {
1086
+ console.error("Remix failed:", t), oe("idle");
1087
+ } finally {
1088
+ Ee(!1);
1089
+ }
1090
+ }
1091
+ }, [ne, se, g, d, a, le, x]), Se = E((t, o) => {
1092
+ navigator.clipboard.writeText(t.join(`
1093
+ `)), Ke(o), setTimeout(() => Ke(null), 2e3);
1094
+ }, []), Je = E(() => {
1095
+ const t = Z.trim();
1096
+ t && w.length < 8 && !w.includes(t) && (m((o) => [...o, t]), R(""));
1097
+ }, [Z, w]), dt = E((t) => {
1098
+ r(
1099
+ (o) => o.includes(t) ? o.filter((c) => c !== t) : [...o, t]
1100
+ );
1101
+ }, []), ht = E((t) => {
1102
+ const o = new Date(t);
1103
+ return `${o.getMonth() + 1}/${o.getDate()} ${o.getHours()}:${o.getMinutes().toString().padStart(2, "0")}`;
1104
+ }, []), Re = (t) => t === "lyrics" ? s === "zh" ? "AI 写词中..." : "Generating lyrics..." : t === "composing" ? s === "zh" ? "编曲设计中..." : "Composing..." : t === "synth" ? s === "zh" ? `音频合成 ${Math.round(x.progress * 100)}%` : `Synthesizing ${Math.round(x.progress * 100)}%` : t === "done" ? s === "zh" ? "创作完成!" : "Complete!" : "";
1105
+ return /* @__PURE__ */ e(Q, { children: z && /* @__PURE__ */ i($, { children: [
1106
+ /* @__PURE__ */ e(
1107
+ p.div,
1108
+ {
1109
+ initial: { opacity: 0 },
1110
+ animate: { opacity: 1 },
1111
+ exit: { opacity: 0 },
1112
+ className: "fixed inset-0 z-[60] bg-black/60 backdrop-blur-md",
1113
+ onClick: I
1114
+ }
1115
+ ),
1116
+ /* @__PURE__ */ i(
1117
+ p.div,
1118
+ {
1119
+ initial: { y: "100%", opacity: 0 },
1120
+ animate: { y: 0, opacity: 1 },
1121
+ exit: { y: "100%", opacity: 0 },
1122
+ transition: { type: "spring", damping: 28, stiffness: 300 },
1123
+ className: "fixed inset-x-0 bottom-0 z-[61] max-h-[92vh] bg-[#0B1030]/98 backdrop-blur-2xl border-t border-white/10 rounded-t-3xl flex flex-col shadow-2xl md:inset-x-auto md:left-1/2 md:-translate-x-1/2 md:w-full md:max-w-xl md:bottom-auto md:top-1/2 md:-translate-y-1/2 md:rounded-2xl md:border md:max-h-[88vh]",
1124
+ children: [
1125
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-5 pb-3 border-b border-white/[0.06] flex-shrink-0", children: [
1126
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
1127
+ N && /* @__PURE__ */ e(
1128
+ "button",
1129
+ {
1130
+ onClick: () => {
1131
+ M(null), a == null || a("light");
1132
+ },
1133
+ className: "p-1.5 rounded-lg text-white/40 hover:text-white/70 hover:bg-white/5 transition-colors mr-1",
1134
+ children: /* @__PURE__ */ e(bt, { className: "w-4 h-4" })
1135
+ }
1136
+ ),
1137
+ /* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-xl bg-gradient-to-tr from-purple-500/20 to-pink-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(We, { className: "w-4 h-4 text-purple-400" }) }),
1138
+ /* @__PURE__ */ i("div", { children: [
1139
+ /* @__PURE__ */ e("h3", { className: "text-white font-semibold text-sm leading-tight", children: N ? (qe = ze.find((t) => t.id === N)) == null ? void 0 : qe[s === "zh" ? "labelZh" : "label"] : s === "zh" ? "AI 创作工坊" : "AI Creation Studio" }),
1140
+ /* @__PURE__ */ e("p", { className: "text-white/30 text-xs", children: N ? (Fe = ze.find((t) => t.id === N)) == null ? void 0 : Fe[s === "zh" ? "descZh" : "desc"] : s === "zh" ? "选择创作模式开始" : "Choose a creation mode" })
1141
+ ] })
1142
+ ] }),
1143
+ /* @__PURE__ */ e(
1144
+ "button",
1145
+ {
1146
+ onClick: I,
1147
+ className: "p-2 rounded-lg text-white/40 hover:text-white/70 hover:bg-white/5 transition-colors",
1148
+ children: /* @__PURE__ */ e(re, { className: "w-4 h-4" })
1149
+ }
1150
+ )
1151
+ ] }),
1152
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", style: { scrollbarWidth: "none" }, children: /* @__PURE__ */ i(Q, { mode: "wait", children: [
1153
+ !N && /* @__PURE__ */ i(
1154
+ p.div,
1155
+ {
1156
+ initial: { opacity: 0, y: 10 },
1157
+ animate: { opacity: 1, y: 0 },
1158
+ exit: { opacity: 0, y: -10 },
1159
+ className: "p-5 space-y-3",
1160
+ children: [
1161
+ ze.map((t, o) => {
1162
+ const c = t.icon;
1163
+ return /* @__PURE__ */ i(
1164
+ p.button,
1165
+ {
1166
+ initial: { opacity: 0, x: -20 },
1167
+ animate: { opacity: 1, x: 0 },
1168
+ transition: { delay: o * 0.08 },
1169
+ onClick: () => {
1170
+ if (t.id === "mv") {
1171
+ W == null || W(), a == null || a("selection");
1172
+ return;
1173
+ }
1174
+ M(t.id), a == null || a("selection");
1175
+ },
1176
+ className: "w-full flex items-center gap-4 p-4 rounded-xl bg-white/[0.03] border border-white/[0.06] hover:bg-white/[0.06] hover:border-white/[0.12] transition-all group text-left",
1177
+ children: [
1178
+ /* @__PURE__ */ e("div", { className: y(
1179
+ "w-12 h-12 rounded-xl bg-gradient-to-br flex items-center justify-center flex-shrink-0",
1180
+ t.gradient
1181
+ ), children: /* @__PURE__ */ e(c, { className: "w-5 h-5 text-white" }) }),
1182
+ /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
1183
+ /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-white/90 group-hover:text-white transition-colors", children: s === "zh" ? t.labelZh : t.label }),
1184
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/30 mt-0.5", children: s === "zh" ? t.descZh : t.desc })
1185
+ ] }),
1186
+ t.id === "mv" ? /* @__PURE__ */ e(gt, { className: "w-4 h-4 text-cyan-400/40 group-hover:text-cyan-400/70 transition-colors flex-shrink-0" }) : /* @__PURE__ */ e(ft, { className: "w-4 h-4 text-white/20 group-hover:text-white/40 transition-colors flex-shrink-0" })
1187
+ ]
1188
+ },
1189
+ t.id
1190
+ );
1191
+ }),
1192
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-4 pt-4 border-t border-white/[0.04]", children: [
1193
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 text-white/20 text-xs", children: [
1194
+ /* @__PURE__ */ e($e, { className: "w-3.5 h-3.5" }),
1195
+ /* @__PURE__ */ e("span", { children: s === "zh" ? `${he.length} 首作品` : `${he.length} works` })
1196
+ ] }),
1197
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 text-white/20 text-xs", children: [
1198
+ /* @__PURE__ */ e(je, { className: "w-3.5 h-3.5" }),
1199
+ /* @__PURE__ */ e("span", { children: s === "zh" ? "AI驱动创作" : "AI-powered creation" })
1200
+ ] })
1201
+ ] })
1202
+ ]
1203
+ },
1204
+ "hub"
1205
+ ),
1206
+ N === "quick" && /* @__PURE__ */ i(
1207
+ p.div,
1208
+ {
1209
+ initial: { opacity: 0, x: 20 },
1210
+ animate: { opacity: 1, x: 0 },
1211
+ exit: { opacity: 0, x: -20 },
1212
+ className: "p-5 space-y-5",
1213
+ children: [
1214
+ /* @__PURE__ */ i("div", { children: [
1215
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-3", children: s === "zh" ? "选择情绪主题" : "Choose Mood" }),
1216
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-2", children: Me.map((t) => {
1217
+ const o = t.icon, c = D === t.id, k = t.premium && !f.has(t.id);
1218
+ return /* @__PURE__ */ i(
1219
+ "button",
1220
+ {
1221
+ onClick: () => {
1222
+ if (k) {
1223
+ j && S >= (t.spCost || 200) && F(t.id, t.spCost || 200);
1224
+ return;
1225
+ }
1226
+ Y(t.id), a == null || a("selection");
1227
+ },
1228
+ className: y(
1229
+ "p-3 rounded-xl border transition-all text-center relative",
1230
+ k ? "bg-white/[0.01] border-white/[0.04] opacity-60" : c ? `bg-gradient-to-br ${t.bg} border-white/15 shadow-lg` : "bg-white/[0.02] border-white/[0.06] hover:bg-white/[0.05]"
1231
+ ),
1232
+ children: [
1233
+ k && /* @__PURE__ */ i("span", { className: "absolute -top-1 -right-1 text-[8px] px-1 py-0.5 rounded-full bg-yellow-500/20 text-yellow-300 border border-yellow-500/20 font-medium", children: [
1234
+ t.spCost,
1235
+ "SP"
1236
+ ] }),
1237
+ /* @__PURE__ */ e(o, { className: y("w-5 h-5 mx-auto mb-1", c ? t.color : k ? "text-white/15" : "text-white/30") }),
1238
+ /* @__PURE__ */ e("p", { className: y("text-[10px]", c ? "text-white/80" : "text-white/30"), children: s === "zh" ? t.labelZh : t.label })
1239
+ ]
1240
+ },
1241
+ t.id
1242
+ );
1243
+ }) })
1244
+ ] }),
1245
+ /* @__PURE__ */ i("div", { children: [
1246
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-2", children: s === "zh" ? "灵感关键词(可选)" : "Inspiration Keywords (optional)" }),
1247
+ /* @__PURE__ */ e(
1248
+ "input",
1249
+ {
1250
+ type: "text",
1251
+ value: B,
1252
+ onChange: (t) => G(t.target.value),
1253
+ onKeyDown: (t) => t.key === "Enter" && Be(),
1254
+ placeholder: s === "zh" ? "输入关键词,用逗号分隔..." : "Enter keywords, comma separated...",
1255
+ className: "w-full bg-white/5 border border-white/10 rounded-lg py-2.5 px-3 text-sm text-white placeholder:text-white/20 focus:outline-none focus:border-purple-500/50"
1256
+ }
1257
+ )
1258
+ ] }),
1259
+ /* @__PURE__ */ e(
1260
+ p.button,
1261
+ {
1262
+ onClick: Be,
1263
+ disabled: A,
1264
+ whileHover: { scale: 1.01 },
1265
+ whileTap: { scale: 0.98 },
1266
+ className: "w-full py-4 rounded-xl bg-gradient-to-r from-purple-600 via-pink-600 to-blue-600 text-white font-semibold flex items-center justify-center gap-3 shadow-lg shadow-purple-500/20 disabled:opacity-50 transition-opacity text-base",
1267
+ children: h !== "idle" && h !== "done" ? /* @__PURE__ */ i($, { children: [
1268
+ /* @__PURE__ */ e(fe, { className: "w-5 h-5 animate-spin" }),
1269
+ Re(h)
1270
+ ] }) : h === "done" ? /* @__PURE__ */ i($, { children: [
1271
+ /* @__PURE__ */ e(ee, { className: "w-5 h-5 text-green-300" }),
1272
+ s === "zh" ? "创作完成!" : "Complete!"
1273
+ ] }) : /* @__PURE__ */ i($, { children: [
1274
+ /* @__PURE__ */ e(je, { className: "w-5 h-5" }),
1275
+ s === "zh" ? "一键创作" : "Create Now"
1276
+ ] })
1277
+ }
1278
+ ),
1279
+ /* @__PURE__ */ e(Q, { children: v && /* @__PURE__ */ i(
1280
+ p.div,
1281
+ {
1282
+ initial: { opacity: 0, y: 15 },
1283
+ animate: { opacity: 1, y: 0 },
1284
+ className: "rounded-xl border border-white/[0.08] bg-gradient-to-br from-purple-500/10 to-pink-500/10 p-4",
1285
+ children: [
1286
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
1287
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium", children: s === "zh" ? "生成的歌词" : "Generated Lyrics" }),
1288
+ /* @__PURE__ */ i(
1289
+ "button",
1290
+ {
1291
+ onClick: () => Se(v, "quick"),
1292
+ className: "flex items-center gap-1 px-2 py-1 rounded-lg bg-white/5 text-xs text-white/40 hover:text-white/70 transition-colors",
1293
+ children: [
1294
+ ce === "quick" ? /* @__PURE__ */ e(ee, { className: "w-3 h-3 text-green-400" }) : /* @__PURE__ */ e(ge, { className: "w-3 h-3" }),
1295
+ ce === "quick" ? s === "zh" ? "已复制" : "Copied" : s === "zh" ? "复制" : "Copy"
1296
+ ]
1297
+ }
1298
+ )
1299
+ ] }),
1300
+ /* @__PURE__ */ e("div", { className: "space-y-1.5", children: v.map((t, o) => /* @__PURE__ */ e(
1301
+ p.p,
1302
+ {
1303
+ initial: { opacity: 0, x: -8 },
1304
+ animate: { opacity: 1, x: 0 },
1305
+ transition: { delay: o * 0.06 },
1306
+ className: "text-sm text-white/70 leading-relaxed",
1307
+ children: t
1308
+ },
1309
+ o
1310
+ )) })
1311
+ ]
1312
+ }
1313
+ ) })
1314
+ ]
1315
+ },
1316
+ "quick"
1317
+ ),
1318
+ N === "master" && /* @__PURE__ */ i(
1319
+ p.div,
1320
+ {
1321
+ initial: { opacity: 0, x: 20 },
1322
+ animate: { opacity: 1, x: 0 },
1323
+ exit: { opacity: 0, x: -20 },
1324
+ className: "p-5 space-y-5",
1325
+ children: [
1326
+ /* @__PURE__ */ i("div", { children: [
1327
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-3", children: s === "zh" ? "情绪基调" : "Emotional Base" }),
1328
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-2", children: Me.map((t) => {
1329
+ const o = t.icon, c = b === t.id, k = t.premium && !f.has(t.id);
1330
+ return /* @__PURE__ */ i(
1331
+ "button",
1332
+ {
1333
+ onClick: () => {
1334
+ if (k) {
1335
+ j && S >= (t.spCost || 200) && F(t.id, t.spCost || 200);
1336
+ return;
1337
+ }
1338
+ de(t.id), a == null || a("selection");
1339
+ },
1340
+ className: y(
1341
+ "p-2.5 rounded-xl border transition-all text-center relative",
1342
+ k ? "bg-white/[0.01] border-white/[0.04] opacity-60" : c ? `bg-gradient-to-br ${t.bg} border-white/15` : "bg-white/[0.02] border-white/[0.06] hover:bg-white/[0.05]"
1343
+ ),
1344
+ children: [
1345
+ k && /* @__PURE__ */ i("span", { className: "absolute -top-1 -right-1 text-[8px] px-1 py-0.5 rounded-full bg-yellow-500/20 text-yellow-300 border border-yellow-500/20 font-medium", children: [
1346
+ t.spCost,
1347
+ "SP"
1348
+ ] }),
1349
+ /* @__PURE__ */ e(o, { className: y("w-4 h-4 mx-auto mb-0.5", c ? t.color : k ? "text-white/15" : "text-white/30") }),
1350
+ /* @__PURE__ */ e("p", { className: y("text-[9px]", c ? "text-white/80" : "text-white/30"), children: s === "zh" ? t.labelZh : t.label })
1351
+ ]
1352
+ },
1353
+ t.id
1354
+ );
1355
+ }) })
1356
+ ] }),
1357
+ /* @__PURE__ */ i("div", { children: [
1358
+ /* @__PURE__ */ i("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-2", children: [
1359
+ s === "zh" ? "创作关键词" : "Keywords",
1360
+ " ",
1361
+ /* @__PURE__ */ i("span", { className: "text-white/20", children: [
1362
+ "(",
1363
+ w.length,
1364
+ "/8)"
1365
+ ] })
1366
+ ] }),
1367
+ /* @__PURE__ */ i("div", { className: "flex gap-2 mb-2", children: [
1368
+ /* @__PURE__ */ e(
1369
+ "input",
1370
+ {
1371
+ type: "text",
1372
+ value: Z,
1373
+ onChange: (t) => R(t.target.value),
1374
+ onKeyDown: (t) => t.key === "Enter" && Je(),
1375
+ placeholder: s === "zh" ? "添加关键词..." : "Add keyword...",
1376
+ className: "flex-1 bg-white/5 border border-white/10 rounded-lg py-2 px-3 text-sm text-white placeholder:text-white/20 focus:outline-none focus:border-purple-500/50"
1377
+ }
1378
+ ),
1379
+ /* @__PURE__ */ e(
1380
+ "button",
1381
+ {
1382
+ onClick: Je,
1383
+ disabled: !Z.trim() || w.length >= 8,
1384
+ className: "p-2 rounded-lg bg-white/5 border border-white/[0.08] text-white/60 hover:text-white transition-colors disabled:opacity-30",
1385
+ children: /* @__PURE__ */ e(pe, { className: "w-4 h-4" })
1386
+ }
1387
+ )
1388
+ ] }),
1389
+ w.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: w.map((t) => /* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 bg-indigo-500/10 border border-indigo-500/20 rounded-full text-xs text-indigo-300", children: [
1390
+ t,
1391
+ /* @__PURE__ */ e("button", { onClick: () => m((o) => o.filter((c) => c !== t)), className: "text-indigo-400/60 hover:text-indigo-300", children: /* @__PURE__ */ e(re, { className: "w-3 h-3" }) })
1392
+ ] }, t)) })
1393
+ ] }),
1394
+ /* @__PURE__ */ i("div", { children: [
1395
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-2", children: s === "zh" ? "歌曲结构" : "Song Structure" }),
1396
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2", children: $t.map((t) => /* @__PURE__ */ e(
1397
+ "button",
1398
+ {
1399
+ onClick: () => be(t.id),
1400
+ className: y(
1401
+ "py-2 px-3 rounded-lg border text-xs transition-all",
1402
+ ve === t.id ? "bg-indigo-500/15 border-indigo-500/30 text-indigo-300" : "bg-white/[0.02] border-white/[0.06] text-white/40 hover:bg-white/[0.05]"
1403
+ ),
1404
+ children: s === "zh" ? t.labelZh : t.label
1405
+ },
1406
+ t.id
1407
+ )) })
1408
+ ] }),
1409
+ /* @__PURE__ */ i("div", { children: [
1410
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-2", children: s === "zh" ? "乐器编排" : "Instruments" }),
1411
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: It.map((t) => /* @__PURE__ */ i(
1412
+ "button",
1413
+ {
1414
+ onClick: () => dt(t.id),
1415
+ className: y(
1416
+ "py-2 px-3 rounded-lg border text-xs transition-all flex items-center gap-1.5",
1417
+ ke.includes(t.id) ? "bg-indigo-500/15 border-indigo-500/30 text-indigo-300" : "bg-white/[0.02] border-white/[0.06] text-white/40 hover:bg-white/[0.05]"
1418
+ ),
1419
+ children: [
1420
+ /* @__PURE__ */ e("span", { children: t.emoji }),
1421
+ /* @__PURE__ */ e("span", { children: s === "zh" ? t.labelZh : t.label })
1422
+ ]
1423
+ },
1424
+ t.id
1425
+ )) })
1426
+ ] }),
1427
+ /* @__PURE__ */ i("div", { className: "grid grid-cols-2 gap-4", children: [
1428
+ /* @__PURE__ */ i("div", { children: [
1429
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-2", children: s === "zh" ? "歌词行数" : "Lines" }),
1430
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1431
+ /* @__PURE__ */ e(
1432
+ "button",
1433
+ {
1434
+ onClick: () => Ne(Math.max(4, H - 2)),
1435
+ className: "p-1.5 rounded-lg bg-white/5 border border-white/[0.08] text-white/60 hover:text-white transition-colors",
1436
+ children: /* @__PURE__ */ e(Ie, { className: "w-3.5 h-3.5" })
1437
+ }
1438
+ ),
1439
+ /* @__PURE__ */ e("span", { className: "text-lg font-bold text-white font-mono flex-1 text-center", children: H }),
1440
+ /* @__PURE__ */ e(
1441
+ "button",
1442
+ {
1443
+ onClick: () => Ne(Math.min(20, H + 2)),
1444
+ className: "p-1.5 rounded-lg bg-white/5 border border-white/[0.08] text-white/60 hover:text-white transition-colors",
1445
+ children: /* @__PURE__ */ e(pe, { className: "w-3.5 h-3.5" })
1446
+ }
1447
+ )
1448
+ ] })
1449
+ ] }),
1450
+ /* @__PURE__ */ i("div", { children: [
1451
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-2", children: s === "zh" ? "速度 BPM" : "Tempo BPM" }),
1452
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1453
+ /* @__PURE__ */ e(
1454
+ "button",
1455
+ {
1456
+ onClick: () => q(Math.max(60, L - 10)),
1457
+ className: "p-1.5 rounded-lg bg-white/5 border border-white/[0.08] text-white/60 hover:text-white transition-colors",
1458
+ children: /* @__PURE__ */ e(Ie, { className: "w-3.5 h-3.5" })
1459
+ }
1460
+ ),
1461
+ /* @__PURE__ */ e("span", { className: "text-lg font-bold text-white font-mono flex-1 text-center", children: L }),
1462
+ /* @__PURE__ */ e(
1463
+ "button",
1464
+ {
1465
+ onClick: () => q(Math.min(200, L + 10)),
1466
+ className: "p-1.5 rounded-lg bg-white/5 border border-white/[0.08] text-white/60 hover:text-white transition-colors",
1467
+ children: /* @__PURE__ */ e(pe, { className: "w-3.5 h-3.5" })
1468
+ }
1469
+ )
1470
+ ] })
1471
+ ] })
1472
+ ] }),
1473
+ /* @__PURE__ */ e(
1474
+ p.button,
1475
+ {
1476
+ onClick: nt,
1477
+ disabled: V,
1478
+ whileHover: { scale: 1.01 },
1479
+ whileTap: { scale: 0.98 },
1480
+ className: "w-full py-3.5 rounded-xl bg-gradient-to-r from-indigo-600 via-blue-600 to-purple-600 text-white font-semibold flex items-center justify-center gap-2 shadow-lg shadow-indigo-500/20 disabled:opacity-50",
1481
+ children: P !== "idle" && P !== "done" ? /* @__PURE__ */ i($, { children: [
1482
+ /* @__PURE__ */ e(fe, { className: "w-5 h-5 animate-spin" }),
1483
+ Re(P)
1484
+ ] }) : P === "done" ? /* @__PURE__ */ i($, { children: [
1485
+ /* @__PURE__ */ e(ee, { className: "w-5 h-5 text-green-300" }),
1486
+ s === "zh" ? "大师之作完成!" : "Masterpiece Complete!"
1487
+ ] }) : /* @__PURE__ */ i($, { children: [
1488
+ /* @__PURE__ */ e(We, { className: "w-5 h-5" }),
1489
+ s === "zh" ? "开始创作" : "Start Creating"
1490
+ ] })
1491
+ }
1492
+ ),
1493
+ /* @__PURE__ */ e(Q, { children: X && /* @__PURE__ */ i(
1494
+ p.div,
1495
+ {
1496
+ initial: { opacity: 0, y: 15 },
1497
+ animate: { opacity: 1, y: 0 },
1498
+ className: "rounded-xl border border-white/[0.08] bg-gradient-to-br from-indigo-500/10 to-blue-500/10 p-4",
1499
+ children: [
1500
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
1501
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40", children: s === "zh" ? "大师之作" : "Master Work" }),
1502
+ /* @__PURE__ */ i(
1503
+ "button",
1504
+ {
1505
+ onClick: () => Se(X, "master"),
1506
+ className: "flex items-center gap-1 px-2 py-1 rounded-lg bg-white/5 text-xs text-white/40 hover:text-white/70 transition-colors",
1507
+ children: [
1508
+ ce === "master" ? /* @__PURE__ */ e(ee, { className: "w-3 h-3 text-green-400" }) : /* @__PURE__ */ e(ge, { className: "w-3 h-3" }),
1509
+ ce === "master" ? s === "zh" ? "已复制" : "Copied" : s === "zh" ? "复制" : "Copy"
1510
+ ]
1511
+ }
1512
+ )
1513
+ ] }),
1514
+ /* @__PURE__ */ e("div", { className: "space-y-1.5", children: X.map((t, o) => /* @__PURE__ */ e(
1515
+ p.p,
1516
+ {
1517
+ initial: { opacity: 0, x: -8 },
1518
+ animate: { opacity: 1, x: 0 },
1519
+ transition: { delay: o * 0.05 },
1520
+ className: "text-sm text-white/70 leading-relaxed",
1521
+ children: t
1522
+ },
1523
+ o
1524
+ )) })
1525
+ ]
1526
+ }
1527
+ ) })
1528
+ ]
1529
+ },
1530
+ "master"
1531
+ ),
1532
+ N === "remix" && /* @__PURE__ */ i(
1533
+ p.div,
1534
+ {
1535
+ initial: { opacity: 0, x: 20 },
1536
+ animate: { opacity: 1, x: 0 },
1537
+ exit: { opacity: 0, x: -20 },
1538
+ className: "p-5 space-y-5",
1539
+ children: [
1540
+ /* @__PURE__ */ i("div", { children: [
1541
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-3", children: s === "zh" ? "选择原曲" : "Select Source Track" }),
1542
+ /* @__PURE__ */ e("div", { className: "space-y-2 max-h-48 overflow-y-auto", style: { scrollbarWidth: "none" }, children: g.map((t, o) => /* @__PURE__ */ i(
1543
+ "button",
1544
+ {
1545
+ onClick: () => {
1546
+ lt(o), a == null || a("selection");
1547
+ },
1548
+ className: y(
1549
+ "w-full flex items-center gap-3 p-3 rounded-xl border transition-all text-left",
1550
+ ne === o ? "bg-orange-500/10 border-orange-500/20" : "bg-white/[0.02] border-white/[0.06] hover:bg-white/[0.05]"
1551
+ ),
1552
+ children: [
1553
+ /* @__PURE__ */ e("div", { className: "w-10 h-10 rounded-lg overflow-hidden flex-shrink-0", children: /* @__PURE__ */ e("img", { src: t.albumArt, alt: "", className: "w-full h-full object-cover" }) }),
1554
+ /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
1555
+ /* @__PURE__ */ e("p", { className: y("text-sm font-medium truncate", ne === o ? "text-orange-300" : "text-white/70"), children: t.title }),
1556
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/30", children: t.artist })
1557
+ ] }),
1558
+ ne === o && /* @__PURE__ */ e("div", { className: "w-5 h-5 rounded-full bg-orange-500/30 border border-orange-500/50 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e(ee, { className: "w-3 h-3 text-orange-300" }) })
1559
+ ]
1560
+ },
1561
+ t.id
1562
+ )) })
1563
+ ] }),
1564
+ /* @__PURE__ */ i("div", { children: [
1565
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-3", children: s === "zh" ? "改编风格" : "Target Style" }),
1566
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-2", children: Me.map((t) => {
1567
+ const o = t.icon, c = se === t.id, k = t.premium && !f.has(t.id);
1568
+ return /* @__PURE__ */ i(
1569
+ "button",
1570
+ {
1571
+ onClick: () => {
1572
+ if (k) {
1573
+ j && S >= (t.spCost || 200) && F(t.id, t.spCost || 200);
1574
+ return;
1575
+ }
1576
+ rt(t.id), a == null || a("selection");
1577
+ },
1578
+ className: y(
1579
+ "p-2.5 rounded-xl border transition-all text-center relative",
1580
+ k ? "bg-white/[0.01] border-white/[0.04] opacity-60" : c ? `bg-gradient-to-br ${t.bg} border-white/15` : "bg-white/[0.02] border-white/[0.06] hover:bg-white/[0.05]"
1581
+ ),
1582
+ children: [
1583
+ k && /* @__PURE__ */ i("span", { className: "absolute -top-1 -right-1 text-[8px] px-1 py-0.5 rounded-full bg-yellow-500/20 text-yellow-300 border border-yellow-500/20 font-medium", children: [
1584
+ t.spCost,
1585
+ "SP"
1586
+ ] }),
1587
+ /* @__PURE__ */ e(o, { className: y("w-4 h-4 mx-auto mb-0.5", c ? t.color : k ? "text-white/15" : "text-white/30") }),
1588
+ /* @__PURE__ */ e("p", { className: y("text-[9px]", c ? "text-white/80" : "text-white/30"), children: s === "zh" ? t.labelZh : t.label })
1589
+ ]
1590
+ },
1591
+ t.id
1592
+ );
1593
+ }) })
1594
+ ] }),
1595
+ /* @__PURE__ */ e(
1596
+ p.button,
1597
+ {
1598
+ onClick: ct,
1599
+ disabled: ne === null || at,
1600
+ whileHover: { scale: 1.01 },
1601
+ whileTap: { scale: 0.98 },
1602
+ className: "w-full py-3.5 rounded-xl bg-gradient-to-r from-orange-600 via-red-600 to-pink-600 text-white font-semibold flex items-center justify-center gap-2 shadow-lg shadow-orange-500/20 disabled:opacity-40",
1603
+ children: Ce !== "idle" && Ce !== "done" ? /* @__PURE__ */ i($, { children: [
1604
+ /* @__PURE__ */ e(fe, { className: "w-5 h-5 animate-spin" }),
1605
+ Re(Ce)
1606
+ ] }) : Ce === "done" ? /* @__PURE__ */ i($, { children: [
1607
+ /* @__PURE__ */ e(ee, { className: "w-5 h-5 text-green-300" }),
1608
+ s === "zh" ? "改编完成!" : "Remix Complete!"
1609
+ ] }) : /* @__PURE__ */ i($, { children: [
1610
+ /* @__PURE__ */ e(Ge, { className: "w-5 h-5" }),
1611
+ s === "zh" ? "开始改编 (含音频重合成)" : "Remix (with audio synthesis)"
1612
+ ] })
1613
+ }
1614
+ ),
1615
+ /* @__PURE__ */ e(Q, { children: Le && /* @__PURE__ */ i(
1616
+ p.div,
1617
+ {
1618
+ initial: { opacity: 0, y: 15 },
1619
+ animate: { opacity: 1, y: 0 },
1620
+ className: "rounded-xl border border-white/[0.08] bg-gradient-to-br from-orange-500/10 to-red-500/10 p-4",
1621
+ children: [
1622
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
1623
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40", children: s === "zh" ? "改编歌词" : "Remixed Lyrics" }),
1624
+ /* @__PURE__ */ i(
1625
+ "button",
1626
+ {
1627
+ onClick: () => Se(Le, "remix"),
1628
+ className: "flex items-center gap-1 px-2 py-1 rounded-lg bg-white/5 text-xs text-white/40 hover:text-white/70 transition-colors",
1629
+ children: [
1630
+ ce === "remix" ? /* @__PURE__ */ e(ee, { className: "w-3 h-3 text-green-400" }) : /* @__PURE__ */ e(ge, { className: "w-3 h-3" }),
1631
+ ce === "remix" ? s === "zh" ? "已复制" : "Copied" : s === "zh" ? "复制" : "Copy"
1632
+ ]
1633
+ }
1634
+ )
1635
+ ] }),
1636
+ /* @__PURE__ */ e("div", { className: "space-y-1.5", children: Le.map((t, o) => /* @__PURE__ */ e(
1637
+ p.p,
1638
+ {
1639
+ initial: { opacity: 0, x: -8 },
1640
+ animate: { opacity: 1, x: 0 },
1641
+ transition: { delay: o * 0.06 },
1642
+ className: "text-sm text-white/70 leading-relaxed",
1643
+ children: t
1644
+ },
1645
+ o
1646
+ )) })
1647
+ ]
1648
+ }
1649
+ ) })
1650
+ ]
1651
+ },
1652
+ "remix"
1653
+ ),
1654
+ N === "works" && /* @__PURE__ */ e(
1655
+ p.div,
1656
+ {
1657
+ initial: { opacity: 0, x: 20 },
1658
+ animate: { opacity: 1, x: 0 },
1659
+ exit: { opacity: 0, x: -20 },
1660
+ className: "p-5",
1661
+ children: he.length === 0 ? /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center py-16 gap-4", children: [
1662
+ /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-white/5 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e($e, { className: "w-7 h-7 text-white/20" }) }),
1663
+ /* @__PURE__ */ e("p", { className: "text-white/30 text-sm text-center", children: s === "zh" ? `还没有创作作品
1664
+ 去创作你的第一首歌吧!` : `No works yet
1665
+ Create your first song!` }),
1666
+ /* @__PURE__ */ e(
1667
+ "button",
1668
+ {
1669
+ onClick: () => M("quick"),
1670
+ className: "px-4 py-2 rounded-lg bg-purple-500/10 border border-purple-500/20 text-purple-300 text-sm hover:bg-purple-500/20 transition-colors",
1671
+ children: s === "zh" ? "开始创作" : "Start Creating"
1672
+ }
1673
+ )
1674
+ ] }) : /* @__PURE__ */ i("div", { className: "space-y-3", children: [
1675
+ /* @__PURE__ */ e("p", { className: "text-xs text-white/40 font-medium uppercase tracking-wider mb-3", children: s === "zh" ? `${he.length} 首作品` : `${he.length} Works` }),
1676
+ he.map((t, o) => {
1677
+ const c = Me.find((ue) => ue.id === t.theme), k = (c == null ? void 0 : c.icon) || $e, me = ze.find((ue) => ue.id === t.mode);
1678
+ return /* @__PURE__ */ e(
1679
+ p.div,
1680
+ {
1681
+ initial: { opacity: 0, y: 10 },
1682
+ animate: { opacity: 1, y: 0 },
1683
+ transition: { delay: o * 0.05 },
1684
+ className: "rounded-xl border border-white/[0.06] bg-white/[0.02] p-4 group",
1685
+ children: /* @__PURE__ */ i("div", { className: "flex items-start gap-3", children: [
1686
+ /* @__PURE__ */ e("div", { className: y(
1687
+ "w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 bg-gradient-to-br",
1688
+ (c == null ? void 0 : c.bg) || "from-white/5 to-white/5"
1689
+ ), children: /* @__PURE__ */ e(k, { className: y("w-5 h-5", (c == null ? void 0 : c.color) || "text-white/30") }) }),
1690
+ /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
1691
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-1", children: [
1692
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-white/80 truncate", children: t.title }),
1693
+ /* @__PURE__ */ e("span", { className: "text-[9px] text-white/20 bg-white/5 px-1.5 py-0.5 rounded-full flex-shrink-0", children: me ? s === "zh" ? me.labelZh : me.label : t.mode })
1694
+ ] }),
1695
+ /* @__PURE__ */ i("p", { className: "text-xs text-white/25 flex items-center gap-1", children: [
1696
+ /* @__PURE__ */ e(Oe, { className: "w-3 h-3" }),
1697
+ ht(t.createdAt)
1698
+ ] }),
1699
+ /* @__PURE__ */ i("p", { className: "text-xs text-white/30 mt-2 line-clamp-2 italic", children: [
1700
+ '"',
1701
+ t.lyrics.slice(0, 2).join(" / "),
1702
+ '"'
1703
+ ] })
1704
+ ] }),
1705
+ /* @__PURE__ */ i("div", { className: "flex flex-col gap-1 md:opacity-0 md:group-hover:opacity-100 transition-opacity flex-shrink-0", children: [
1706
+ /* @__PURE__ */ e(
1707
+ "button",
1708
+ {
1709
+ onClick: () => Se(t.lyrics, t.id),
1710
+ className: "p-1.5 rounded-lg text-white/30 hover:text-white/60 hover:bg-white/5 transition-colors",
1711
+ title: s === "zh" ? "复制歌词" : "Copy lyrics",
1712
+ children: ce === t.id ? /* @__PURE__ */ e(ee, { className: "w-3.5 h-3.5 text-green-400" }) : /* @__PURE__ */ e(ge, { className: "w-3.5 h-3.5" })
1713
+ }
1714
+ ),
1715
+ /* @__PURE__ */ e(
1716
+ "button",
1717
+ {
1718
+ onClick: () => ot(t.id),
1719
+ className: "p-1.5 rounded-lg text-white/30 hover:text-red-400/60 hover:bg-red-500/5 transition-colors",
1720
+ title: s === "zh" ? "删除" : "Delete",
1721
+ children: /* @__PURE__ */ e(yt, { className: "w-3.5 h-3.5" })
1722
+ }
1723
+ ),
1724
+ O && /* @__PURE__ */ e(
1725
+ "button",
1726
+ {
1727
+ onClick: () => O(t),
1728
+ className: "p-1.5 rounded-lg text-white/30 hover:text-white/60 hover:bg-white/5 transition-colors",
1729
+ title: s === "zh" ? "分享作品" : "Share work",
1730
+ children: /* @__PURE__ */ e(Nt, { className: "w-3.5 h-3.5" })
1731
+ }
1732
+ ),
1733
+ W && /* @__PURE__ */ e(
1734
+ "button",
1735
+ {
1736
+ onClick: () => W(t.lyrics),
1737
+ className: "p-1.5 rounded-lg text-white/30 hover:text-cyan-400/60 hover:bg-cyan-500/5 transition-colors",
1738
+ title: s === "zh" ? "从此作品创建MV" : "Create MV from this work",
1739
+ children: /* @__PURE__ */ e(tt, { className: "w-3.5 h-3.5" })
1740
+ }
1741
+ )
1742
+ ] })
1743
+ ] })
1744
+ },
1745
+ t.id
1746
+ );
1747
+ })
1748
+ ] })
1749
+ },
1750
+ "works"
1751
+ )
1752
+ ] }) })
1753
+ ]
1754
+ }
1755
+ )
1756
+ ] }) });
1757
+ }, De = [
1758
+ { id: "starfield", labelZh: "星空漫游", labelEn: "Starfield", emoji: "🌌", colors: ["#667eea", "#764ba2", "#fff"] },
1759
+ { id: "neonPulse", labelZh: "霓虹脉冲", labelEn: "Neon Pulse", emoji: "💜", colors: ["#ff006e", "#8338ec", "#3a86ff"] },
1760
+ { id: "aurora", labelZh: "极光幻境", labelEn: "Aurora", emoji: "🌈", colors: ["#00f5d4", "#7209b7", "#f72585"] },
1761
+ { id: "inkWash", labelZh: "水墨流韵", labelEn: "Ink Wash", emoji: "🏔️", colors: ["#1a1a2e", "#e0e0e0", "#555"] },
1762
+ { id: "cyberCity", labelZh: "赛博都市", labelEn: "Cyber City", emoji: "🌃", colors: ["#0ff", "#f0f", "#ff0"] }
1763
+ ];
1764
+ function jt(z, I, d) {
1765
+ var a;
1766
+ const g = ((a = De.find((O) => O.id === d)) == null ? void 0 : a.colors) || ["#fff", "#aaa", "#666"], J = g[Math.floor(Math.random() * g.length)];
1767
+ switch (d) {
1768
+ case "starfield":
1769
+ return {
1770
+ x: Math.random() * z,
1771
+ y: Math.random() * I,
1772
+ z: Math.random() * 3 + 0.5,
1773
+ vx: 0,
1774
+ vy: Math.random() * 0.3 + 0.1,
1775
+ size: Math.random() * 2.5 + 0.5,
1776
+ alpha: Math.random() * 0.8 + 0.2,
1777
+ color: J,
1778
+ life: 0,
1779
+ maxLife: 300 + Math.random() * 200
1780
+ };
1781
+ case "neonPulse":
1782
+ return {
1783
+ x: z / 2 + (Math.random() - 0.5) * z * 0.8,
1784
+ y: I / 2 + (Math.random() - 0.5) * I * 0.8,
1785
+ z: 1,
1786
+ vx: (Math.random() - 0.5) * 2,
1787
+ vy: (Math.random() - 0.5) * 2,
1788
+ size: Math.random() * 4 + 1,
1789
+ alpha: Math.random() * 0.6 + 0.2,
1790
+ color: J,
1791
+ life: 0,
1792
+ maxLife: 150 + Math.random() * 100
1793
+ };
1794
+ case "aurora":
1795
+ return {
1796
+ x: Math.random() * z,
1797
+ y: I * 0.2 + Math.random() * I * 0.3,
1798
+ z: 1,
1799
+ vx: Math.random() * 0.5 + 0.2,
1800
+ vy: (Math.random() - 0.5) * 0.3,
1801
+ size: Math.random() * 40 + 20,
1802
+ alpha: Math.random() * 0.15 + 0.05,
1803
+ color: J,
1804
+ life: 0,
1805
+ maxLife: 400 + Math.random() * 200
1806
+ };
1807
+ case "inkWash":
1808
+ return {
1809
+ x: Math.random() * z,
1810
+ y: Math.random() * I,
1811
+ z: 1,
1812
+ vx: (Math.random() - 0.5) * 0.5,
1813
+ vy: -Math.random() * 0.8 - 0.2,
1814
+ size: Math.random() * 30 + 5,
1815
+ alpha: Math.random() * 0.08 + 0.02,
1816
+ color: J,
1817
+ life: 0,
1818
+ maxLife: 300 + Math.random() * 200
1819
+ };
1820
+ case "cyberCity":
1821
+ default:
1822
+ return {
1823
+ x: Math.random() * z,
1824
+ y: Math.random() * I,
1825
+ z: 1,
1826
+ vx: 0,
1827
+ vy: Math.random() * 2 + 1,
1828
+ size: Math.random() * 2 + 0.5,
1829
+ alpha: Math.random() * 0.7 + 0.3,
1830
+ color: J,
1831
+ life: 0,
1832
+ maxLife: 200 + Math.random() * 100
1833
+ };
1834
+ }
1835
+ }
1836
+ const Et = ({
1837
+ isOpen: z,
1838
+ onClose: I,
1839
+ track: d,
1840
+ isPlaying: g,
1841
+ audioEnergy: J,
1842
+ frequencyData: a,
1843
+ currentTime: O,
1844
+ emotion: W,
1845
+ customLyrics: j,
1846
+ onHaptic: S
1847
+ }) => {
1848
+ const { lang: T } = Ae(), K = we(null), s = we(0), N = we([]), M = we(0), [f, U] = u("starfield"), [F, D] = u(!0), [Y, B] = u(0.7), G = j && j.length > 0 ? j.map((h, l) => ({
1849
+ time: l * (d.duration > 0 ? d.duration / j.length : 10),
1850
+ text: h,
1851
+ translation: void 0
1852
+ })) : d.lyrics, A = [...G].reverse().find((h) => h.time <= O);
1853
+ G.find((h) => h.time > O);
1854
+ const n = E(() => {
1855
+ var ke;
1856
+ const h = K.current;
1857
+ if (!h) return;
1858
+ const l = h.getContext("2d");
1859
+ if (!l) return;
1860
+ const x = h.width, b = h.height;
1861
+ M.current += 1;
1862
+ const de = M.current, w = J * Y, m = ((ke = De.find((r) => r.id === f)) == null ? void 0 : ke.colors) || ["#fff", "#aaa", "#666"];
1863
+ switch (f) {
1864
+ case "starfield": {
1865
+ l.fillStyle = "#050816", l.fillRect(0, 0, x, b);
1866
+ const r = l.createRadialGradient(x / 2, b / 2, 0, x / 2, b / 2, x * 0.5);
1867
+ r.addColorStop(0, `rgba(102, 126, 234, ${0.03 + w * 0.05})`), r.addColorStop(1, "transparent"), l.fillStyle = r, l.fillRect(0, 0, x, b);
1868
+ break;
1869
+ }
1870
+ case "neonPulse": {
1871
+ l.fillStyle = `rgba(10, 5, 30, ${0.15 + (1 - w) * 0.1})`, l.fillRect(0, 0, x, b);
1872
+ const r = l.createRadialGradient(x / 2, b / 2, 0, x / 2, b / 2, 150 + w * 200);
1873
+ r.addColorStop(0, `rgba(131, 56, 236, ${0.1 + w * 0.15})`), r.addColorStop(0.5, `rgba(255, 0, 110, ${0.05 + w * 0.08})`), r.addColorStop(1, "transparent"), l.fillStyle = r, l.fillRect(0, 0, x, b);
1874
+ break;
1875
+ }
1876
+ case "aurora": {
1877
+ l.fillStyle = "rgba(5, 5, 20, 0.08)", l.fillRect(0, 0, x, b);
1878
+ break;
1879
+ }
1880
+ case "inkWash": {
1881
+ l.fillStyle = `rgba(15, 15, 25, ${0.05 + (1 - w) * 0.03})`, l.fillRect(0, 0, x, b), l.beginPath(), l.moveTo(0, b);
1882
+ for (let r = 0; r <= x; r += 3) {
1883
+ const L = b - 80 - Math.sin(r * 8e-3 + 1) * 60 - Math.sin(r * 0.015) * 30 - Math.cos(r * 3e-3 + 2) * 40;
1884
+ l.lineTo(r, L);
1885
+ }
1886
+ l.lineTo(x, b), l.fillStyle = "rgba(30, 30, 50, 0.06)", l.fill();
1887
+ break;
1888
+ }
1889
+ case "cyberCity": {
1890
+ l.fillStyle = "rgba(5, 0, 15, 0.12)", l.fillRect(0, 0, x, b), l.strokeStyle = `rgba(0, 255, 255, ${0.04 + w * 0.06})`, l.lineWidth = 0.5;
1891
+ const r = b * 0.7;
1892
+ for (let L = 0; L < 20; L++) {
1893
+ const q = r + L * 12;
1894
+ l.beginPath(), l.moveTo(0, q), l.lineTo(x, q), l.stroke();
1895
+ }
1896
+ for (let L = 0; L < 15; L++) {
1897
+ const q = x / 2 + (L - 7) * (40 + L * 5);
1898
+ l.beginPath(), l.moveTo(x / 2, r), l.lineTo(q, b), l.stroke();
1899
+ }
1900
+ break;
1901
+ }
1902
+ }
1903
+ const Z = Math.floor(50 + w * 80 * Y);
1904
+ for (; N.current.length < Z; )
1905
+ N.current.push(jt(x, b, f));
1906
+ const R = [];
1907
+ for (const r of N.current) {
1908
+ if (r.life += 1, r.life > r.maxLife) continue;
1909
+ r.x += r.vx + (f === "starfield" ? Math.sin(de * 0.01 + r.y * 0.01) * 0.2 : 0), r.y += r.vy * (1 + w * 0.5), r.x < -10 && (r.x = x + 10), r.x > x + 10 && (r.x = -10), r.y < -10 && (r.y = b + 10), r.y > b + 10 && (r.y = -10);
1910
+ const L = Math.min(r.life / 20, 1), q = Math.max(1 - (r.life - r.maxLife + 30) / 30, 0), V = r.alpha * L * q * (0.5 + w * 0.5);
1911
+ if (l.beginPath(), f === "aurora")
1912
+ l.ellipse(r.x, r.y, r.size * (1 + w), r.size * 0.3, 0, 0, Math.PI * 2), l.fillStyle = `${r.color}${Math.floor(V * 255).toString(16).padStart(2, "0")}`, l.fill();
1913
+ else if (f === "inkWash") {
1914
+ const C = l.createRadialGradient(r.x, r.y, 0, r.x, r.y, r.size);
1915
+ C.addColorStop(0, `rgba(200, 200, 210, ${V})`), C.addColorStop(1, "transparent"), l.fillStyle = C, l.arc(r.x, r.y, r.size, 0, Math.PI * 2), l.fill();
1916
+ } else if (f === "cyberCity")
1917
+ l.strokeStyle = `${r.color}${Math.floor(V * 200).toString(16).padStart(2, "0")}`, l.lineWidth = r.size * 0.5, l.moveTo(r.x, r.y), l.lineTo(r.x, r.y - 8 - w * 12), l.stroke();
1918
+ else if (l.arc(r.x, r.y, r.size * (f === "neonPulse" ? 1 + w * 0.5 : 1), 0, Math.PI * 2), l.fillStyle = `${r.color}${Math.floor(V * 255).toString(16).padStart(2, "0")}`, l.fill(), f === "neonPulse" && r.size > 2) {
1919
+ const C = l.createRadialGradient(r.x, r.y, 0, r.x, r.y, r.size * 4);
1920
+ C.addColorStop(0, `${r.color}${Math.floor(V * 80).toString(16).padStart(2, "0")}`), C.addColorStop(1, "transparent"), l.fillStyle = C, l.beginPath(), l.arc(r.x, r.y, r.size * 4, 0, Math.PI * 2), l.fill();
1921
+ }
1922
+ R.push(r);
1923
+ }
1924
+ if (N.current = R, a.length > 0 && g) {
1925
+ const r = Math.min(64, a.length), L = x / r, q = b * 0.25;
1926
+ l.save(), f === "inkWash" && (l.globalAlpha = 0.15);
1927
+ for (let V = 0; V < r; V++) {
1928
+ const C = a[Math.floor(V * a.length / r)] / 255, X = C * q * Y, ie = V * L, P = l.createLinearGradient(ie, b, ie, b - X);
1929
+ f === "neonPulse" ? (P.addColorStop(0, `rgba(255, 0, 110, ${0.3 + C * 0.4})`), P.addColorStop(1, `rgba(131, 56, 236, ${0.1 + C * 0.2})`)) : f === "aurora" ? (P.addColorStop(0, `rgba(0, 245, 212, ${0.2 + C * 0.3})`), P.addColorStop(1, `rgba(114, 9, 183, ${0.1 + C * 0.15})`)) : f === "cyberCity" ? (P.addColorStop(0, `rgba(0, 255, 255, ${0.3 + C * 0.5})`), P.addColorStop(1, `rgba(255, 0, 255, ${0.1 + C * 0.2})`)) : f === "inkWash" ? (P.addColorStop(0, `rgba(180, 180, 190, ${0.3 + C * 0.4})`), P.addColorStop(1, "transparent")) : (P.addColorStop(0, `rgba(102, 126, 234, ${0.2 + C * 0.4})`), P.addColorStop(1, `rgba(118, 75, 162, ${0.05 + C * 0.1})`)), l.fillStyle = P, l.fillRect(ie, b - X, L - 1, X);
1930
+ }
1931
+ l.restore();
1932
+ }
1933
+ if (f !== "inkWash") {
1934
+ const r = 60 + w * 40;
1935
+ l.beginPath(), l.arc(x / 2, b / 2, r, 0, Math.PI * 2), l.strokeStyle = `${m[0]}${Math.floor((0.1 + w * 0.2) * 255).toString(16).padStart(2, "0")}`, l.lineWidth = 1.5 + w * 2, l.stroke(), l.beginPath(), l.arc(x / 2, b / 2, r * 1.3 + Math.sin(de * 0.03) * 10, 0, Math.PI * 2), l.strokeStyle = `${m[1]}${Math.floor((0.05 + w * 0.1) * 255).toString(16).padStart(2, "0")}`, l.lineWidth = 0.8, l.stroke();
1936
+ }
1937
+ if (F && A) {
1938
+ l.save(), l.textAlign = "center", l.font = `700 ${f === "inkWash" ? "20" : "22"}px system-ui, -apple-system, sans-serif`;
1939
+ const r = b * 0.78;
1940
+ f !== "inkWash" && (l.shadowColor = m[0], l.shadowBlur = 15 + w * 20), l.fillStyle = `rgba(255, 255, 255, ${0.8 + w * 0.2})`;
1941
+ const L = x * 0.85, q = A.text;
1942
+ if (l.measureText(q).width > L) {
1943
+ const V = q.split(" ");
1944
+ let C = "", X = r;
1945
+ for (const ie of V) {
1946
+ const P = C ? `${C} ${ie}` : ie;
1947
+ l.measureText(P).width > L ? (l.fillText(C, x / 2, X), C = ie, X += 30) : C = P;
1948
+ }
1949
+ l.fillText(C, x / 2, X);
1950
+ } else
1951
+ l.fillText(q, x / 2, r);
1952
+ l.shadowBlur = 0, A.translation && (l.font = "400 13px system-ui, -apple-system, sans-serif", l.fillStyle = "rgba(255, 255, 255, 0.4)", l.fillText(A.translation, x / 2, r + 28)), l.restore();
1953
+ }
1954
+ l.save(), l.textAlign = "left", l.fillStyle = "rgba(255, 255, 255, 0.3)", l.font = "500 11px system-ui, -apple-system, sans-serif", l.fillText(d.title, 20, 28), l.fillStyle = "rgba(255, 255, 255, 0.15)", l.font = "400 10px system-ui, -apple-system, sans-serif", l.fillText(d.artist, 20, 44), l.textAlign = "right";
1955
+ const H = Math.floor(O / 60), Ne = Math.floor(O % 60);
1956
+ l.fillStyle = "rgba(255, 255, 255, 0.2)", l.font = "400 10px monospace", l.fillText(`${H}:${Ne.toString().padStart(2, "0")}`, x - 20, 28), l.restore();
1957
+ const ve = d.duration > 0 ? O / d.duration : 0;
1958
+ l.fillStyle = "rgba(255, 255, 255, 0.06)", l.fillRect(0, b - 3, x, 3);
1959
+ const be = l.createLinearGradient(0, 0, x * ve, 0);
1960
+ be.addColorStop(0, m[0]), be.addColorStop(1, m[1]), l.fillStyle = be, l.fillRect(0, b - 3, x * ve, 3), s.current = requestAnimationFrame(n);
1961
+ }, [f, J, a, g, O, F, Y, d, A, W, G]);
1962
+ ye(() => {
1963
+ if (z) {
1964
+ N.current = [], M.current = 0;
1965
+ const h = K.current;
1966
+ if (h) {
1967
+ const l = h.getBoundingClientRect();
1968
+ h.width = l.width * (window.devicePixelRatio > 1 ? 2 : 1), h.height = l.height * (window.devicePixelRatio > 1 ? 2 : 1);
1969
+ }
1970
+ s.current = requestAnimationFrame(n);
1971
+ }
1972
+ return () => {
1973
+ s.current && cancelAnimationFrame(s.current);
1974
+ };
1975
+ }, [z, n]);
1976
+ const v = E(() => {
1977
+ if (!K.current) return;
1978
+ const h = document.createElement("a");
1979
+ h.download = `d-music-mv-${d.title.replace(/\s+/g, "-").toLowerCase()}.png`, h.href = K.current.toDataURL("image/png"), h.click(), S == null || S("success");
1980
+ }, [d.title, S]), te = E(() => {
1981
+ var l;
1982
+ const h = K.current;
1983
+ h && (document.fullscreenElement ? document.exitFullscreen() : (l = h.requestFullscreen) == null || l.call(h).catch(() => {
1984
+ }), S == null || S("medium"));
1985
+ }, [S]);
1986
+ return /* @__PURE__ */ e(Q, { children: z && /* @__PURE__ */ i($, { children: [
1987
+ /* @__PURE__ */ e(
1988
+ p.div,
1989
+ {
1990
+ initial: { opacity: 0 },
1991
+ animate: { opacity: 1 },
1992
+ exit: { opacity: 0 },
1993
+ className: "fixed inset-0 z-[62] bg-black/80 backdrop-blur-xl",
1994
+ onClick: I
1995
+ }
1996
+ ),
1997
+ /* @__PURE__ */ i(
1998
+ p.div,
1999
+ {
2000
+ initial: { opacity: 0, scale: 0.92 },
2001
+ animate: { opacity: 1, scale: 1 },
2002
+ exit: { opacity: 0, scale: 0.92 },
2003
+ transition: { type: "spring", damping: 25, stiffness: 280 },
2004
+ className: "fixed z-[63] inset-4 md:inset-auto md:left-1/2 md:top-1/2 md:-translate-x-1/2 md:-translate-y-1/2 md:w-[90vw] md:max-w-3xl md:max-h-[88vh] bg-[#080C28]/98 backdrop-blur-2xl border border-white/10 rounded-2xl flex flex-col shadow-2xl overflow-hidden",
2005
+ children: [
2006
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between px-5 py-3 border-b border-white/[0.06] flex-shrink-0", children: [
2007
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
2008
+ /* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-lg bg-gradient-to-tr from-cyan-500/20 to-purple-500/20 border border-white/10 flex items-center justify-center", children: /* @__PURE__ */ e(Ge, { className: "w-4 h-4 text-cyan-400" }) }),
2009
+ /* @__PURE__ */ i("div", { children: [
2010
+ /* @__PURE__ */ i("h3", { className: "text-white font-semibold text-sm leading-tight flex items-center gap-1.5", children: [
2011
+ T === "zh" ? "MV 创作" : "MV Creator",
2012
+ j && j.length > 0 && /* @__PURE__ */ e("span", { className: "text-[9px] font-normal px-1.5 py-0.5 rounded-full bg-cyan-500/15 border border-cyan-500/25 text-cyan-300", children: T === "zh" ? "作品歌词" : "Work Lyrics" })
2013
+ ] }),
2014
+ /* @__PURE__ */ i("p", { className: "text-white/30 text-[10px]", children: [
2015
+ d.title,
2016
+ " — ",
2017
+ d.artist
2018
+ ] })
2019
+ ] })
2020
+ ] }),
2021
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
2022
+ /* @__PURE__ */ i("div", { className: y(
2023
+ "flex items-center gap-1.5 px-2 py-1 rounded-full text-[10px]",
2024
+ g ? "bg-green-500/10 text-green-400" : "bg-white/5 text-white/30"
2025
+ ), children: [
2026
+ g ? /* @__PURE__ */ e(vt, { className: "w-3 h-3" }) : /* @__PURE__ */ e(kt, { className: "w-3 h-3" }),
2027
+ g ? T === "zh" ? "播放中" : "Playing" : T === "zh" ? "已暂停" : "Paused"
2028
+ ] }),
2029
+ /* @__PURE__ */ e(
2030
+ "button",
2031
+ {
2032
+ onClick: I,
2033
+ className: "p-2 rounded-lg text-white/40 hover:text-white/70 hover:bg-white/5 transition-colors",
2034
+ children: /* @__PURE__ */ e(re, { className: "w-4 h-4" })
2035
+ }
2036
+ )
2037
+ ] })
2038
+ ] }),
2039
+ /* @__PURE__ */ i("div", { className: "flex-1 relative min-h-0 bg-black", children: [
2040
+ /* @__PURE__ */ e(
2041
+ "canvas",
2042
+ {
2043
+ ref: K,
2044
+ className: "w-full h-full",
2045
+ style: { display: "block" }
2046
+ }
2047
+ ),
2048
+ /* @__PURE__ */ i("div", { className: "absolute bottom-3 right-3 flex gap-1.5", children: [
2049
+ /* @__PURE__ */ e(
2050
+ "button",
2051
+ {
2052
+ onClick: v,
2053
+ className: "p-2 rounded-lg bg-black/50 backdrop-blur-sm border border-white/10 text-white/50 hover:text-white hover:bg-black/70 transition-colors",
2054
+ title: T === "zh" ? "截图" : "Screenshot",
2055
+ children: /* @__PURE__ */ e(Ct, { className: "w-4 h-4" })
2056
+ }
2057
+ ),
2058
+ /* @__PURE__ */ e(
2059
+ "button",
2060
+ {
2061
+ onClick: te,
2062
+ className: "p-2 rounded-lg bg-black/50 backdrop-blur-sm border border-white/10 text-white/50 hover:text-white hover:bg-black/70 transition-colors",
2063
+ title: T === "zh" ? "全屏" : "Fullscreen",
2064
+ children: /* @__PURE__ */ e(St, { className: "w-4 h-4" })
2065
+ }
2066
+ )
2067
+ ] })
2068
+ ] }),
2069
+ /* @__PURE__ */ e("div", { className: "px-5 py-3 border-t border-white/[0.06] flex-shrink-0", children: /* @__PURE__ */ i("div", { className: "flex items-center gap-4 flex-wrap", children: [
2070
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1.5", children: De.map((h) => /* @__PURE__ */ i(
2071
+ "button",
2072
+ {
2073
+ onClick: () => {
2074
+ U(h.id), N.current = [], S == null || S("selection");
2075
+ },
2076
+ className: y(
2077
+ "px-2.5 py-1.5 rounded-lg border text-[10px] transition-all flex items-center gap-1",
2078
+ f === h.id ? "bg-white/10 border-white/20 text-white" : "bg-white/[0.02] border-white/[0.06] text-white/30 hover:bg-white/[0.05] hover:text-white/50"
2079
+ ),
2080
+ children: [
2081
+ /* @__PURE__ */ e("span", { children: h.emoji }),
2082
+ /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: T === "zh" ? h.labelZh : h.labelEn })
2083
+ ]
2084
+ },
2085
+ h.id
2086
+ )) }),
2087
+ /* @__PURE__ */ e("div", { className: "flex-1" }),
2088
+ /* @__PURE__ */ e(
2089
+ "button",
2090
+ {
2091
+ onClick: () => D((h) => !h),
2092
+ className: y(
2093
+ "px-2.5 py-1.5 rounded-lg border text-[10px] transition-all",
2094
+ F ? "bg-purple-500/15 border-purple-500/30 text-purple-300" : "bg-white/[0.02] border-white/[0.06] text-white/30"
2095
+ ),
2096
+ children: T === "zh" ? "歌词" : "Lyrics"
2097
+ }
2098
+ ),
2099
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
2100
+ /* @__PURE__ */ e(
2101
+ "button",
2102
+ {
2103
+ onClick: () => B((h) => Math.max(0.2, h - 0.2)),
2104
+ className: "p-1 rounded text-white/30 hover:text-white/60 transition-colors",
2105
+ children: /* @__PURE__ */ e(Ie, { className: "w-3 h-3" })
2106
+ }
2107
+ ),
2108
+ /* @__PURE__ */ e("div", { className: "w-16 h-1.5 rounded-full bg-white/10 overflow-hidden", children: /* @__PURE__ */ e(
2109
+ "div",
2110
+ {
2111
+ className: "h-full rounded-full bg-gradient-to-r from-cyan-500 to-purple-500 transition-all",
2112
+ style: { width: `${Y * 100}%` }
2113
+ }
2114
+ ) }),
2115
+ /* @__PURE__ */ e(
2116
+ "button",
2117
+ {
2118
+ onClick: () => B((h) => Math.min(1, h + 0.2)),
2119
+ className: "p-1 rounded text-white/30 hover:text-white/60 transition-colors",
2120
+ children: /* @__PURE__ */ e(pe, { className: "w-3 h-3" })
2121
+ }
2122
+ )
2123
+ ] })
2124
+ ] }) })
2125
+ ]
2126
+ }
2127
+ )
2128
+ ] }) });
2129
+ };
2130
+ export {
2131
+ Wt as AIAssistant,
2132
+ Dt as AILyricsGenerator,
2133
+ Gt as CreationStudio,
2134
+ Et as MVCreator
2135
+ };
2136
+ //# sourceMappingURL=index.js.map