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