dsh-laivox-tts 0.7.16 → 0.7.18
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/README.en.md +1 -1
- package/README.md +1 -1
- package/lib/client.js +238 -91
- package/package.json +1 -1
- package/src/domain/messages.mjs +2 -1
- package/src/domain/spoken-text.mjs +62 -0
- package/src/host/api.mjs +1 -1
- package/src/host/cast-pipeline.mjs +4 -4
- package/src/host/cast.mjs +73 -15
- package/src/host/editorial.mjs +98 -8
- package/src/host/engines/laivox/client.mjs +12 -7
- package/src/host/engines/laivox/errors.mjs +1 -1
- package/src/host/engines/laivox/usage.mjs +19 -0
- package/src/host/jobs.mjs +7 -4
- package/src/host/library/database-worker.mjs +14 -9
- package/src/host/plan.mjs +8 -5
package/README.en.md
CHANGED
|
@@ -38,7 +38,7 @@ This installs the prebuilt package from npm—nothing is compiled locally and no
|
|
|
38
38
|
|
|
39
39
|
### Install from GitHub Release or offline package
|
|
40
40
|
|
|
41
|
-
If npm is unavailable or you prefer pinning a release tarball, install via URL or download `dsh-laivox-tts.tgz` from [Releases](https://github.com/xiaolai181/dsh_laivox_tts/releases) (replace `latest/download` with `download/v0.7.
|
|
41
|
+
If npm is unavailable or you prefer pinning a release tarball, install via URL or download `dsh-laivox-tts.tgz` from [Releases](https://github.com/xiaolai181/dsh_laivox_tts/releases) (replace `latest/download` with `download/v0.7.18` to pin a version):
|
|
42
42
|
|
|
43
43
|
```sh
|
|
44
44
|
dsh plugin --profile desktop add "https://github.com/xiaolai181/dsh_laivox_tts/releases/latest/download/dsh-laivox-tts.tgz"
|
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ dsh plugin --profile desktop add dsh-laivox-tts
|
|
|
40
40
|
|
|
41
41
|
### GitHub Release 链接或离线安装包安装
|
|
42
42
|
|
|
43
|
-
如需锁定版本或无法直连 npm,可使用 Release 下载链接(将 `latest/download` 替换为 `download/v0.7.
|
|
43
|
+
如需锁定版本或无法直连 npm,可使用 Release 下载链接(将 `latest/download` 替换为 `download/v0.7.18` 可锁定版本),或从 [Releases](https://github.com/xiaolai181/dsh_laivox_tts/releases) 下载 `dsh-laivox-tts.tgz` 到本地后安装:
|
|
44
44
|
|
|
45
45
|
```sh
|
|
46
46
|
dsh plugin --profile desktop add "https://github.com/xiaolai181/dsh_laivox_tts/releases/latest/download/dsh-laivox-tts.tgz"
|
package/lib/client.js
CHANGED
|
@@ -219,6 +219,12 @@ var en_default = {
|
|
|
219
219
|
"\u8BF7\u66F4\u65B0\u63D2\u4EF6\u540E\u7EE7\u7EED\u4F7F\u7528 LaiVox\u3002": "Update the plugin to keep using LaiVox.",
|
|
220
220
|
"\u9000\u6B3E\u5BA1\u6838\u4E2D\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "LaiVox is unavailable while your refund is under review. You can keep using Edge.",
|
|
221
221
|
"\u4F1A\u5458\u5DF2\u5230\u671F\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "Your membership has expired. You can keep using Edge.",
|
|
222
|
+
"\u8BD5\u7528\u5DF2\u7ED3\u675F\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "The trial has ended. You can keep using Edge.",
|
|
223
|
+
"\u6B64\u8D26\u53F7\u4E0D\u542B\u8BD5\u7528\u989D\u5EA6\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "This account has no trial balance. You can keep using Edge.",
|
|
224
|
+
"\u5F53\u524D Key \u4F7F\u7528\u8D26\u53F7\u7684\u8BD5\u7528\u6717\u8BFB\u989D\u5EA6\uFF08\u4E0E\u6D4F\u89C8\u5668\u6269\u5C55\u5171\u7528\uFF0C\u4E0D\u542B AI \u6574\u7406\uFF09\u3002": "This key uses the account\u2019s trial read-aloud balance, shared with the browser extension. It does not include AI processing.",
|
|
225
|
+
"\u4ECA\u5929\u7684\u8BD5\u7528\u6717\u8BFB\u540D\u989D\u5DF2\u6EE1\uFF0C\u5317\u4EAC\u65F6\u95F4 0 \u70B9\u6062\u590D\uFF1B\u4F1A\u5458\u548C\u65F6\u957F\u5305\u4E0D\u53D7\u5F71\u54CD\u3002\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "Today\u2019s trial read-aloud capacity is full. It resets at midnight Beijing time. Memberships and read-aloud packs are not affected. You can keep using Edge.",
|
|
226
|
+
"\u5F53\u524D Key \u7684\u6717\u8BFB\u989D\u5EA6\u4E0D\u53EF\u7528\uFF08\u4F1A\u5458\u3001\u8BD5\u7528\u6216\u65F6\u957F\u5305\u672A\u5F00\u901A\u3001\u5DF2\u5230\u671F\u6216\u9000\u6B3E\u5BA1\u6838\u4E2D\uFF09\uFF0C\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "This key\u2019s read-aloud balance is unavailable (membership, trial, or pack is missing, expired, or under refund review). You can keep using Edge.",
|
|
227
|
+
"LaiVox \u4E3A\u589E\u503C\u4ED8\u8D39\u5F15\u64CE\uFF1A\u53EF\u4F7F\u7528 LaiVox \u4F1A\u5458\u3001\u65B0\u6CE8\u518C\u8D26\u53F7\u7684\u8BD5\u7528\u6717\u8BFB\u989D\u5EA6\uFF0C\u6216\u5355\u72EC\u8D2D\u4E70\u7684\u6717\u8BFB\u65F6\u957F\u5305\uFF0C\u5728\u5B98\u7F51\u7B7E\u53D1 API Key\u3002": "LaiVox is a paid add-on engine. Use a LaiVox membership, the trial read-aloud balance on a new account, or a separately purchased read-aloud pack, and issue an API key on the website.",
|
|
222
228
|
"\u6B63\u5728\u5F00\u542F\u2026": "Opening\u2026",
|
|
223
229
|
\u5F00\u542F\u4E0B\u4E00\u4E2A\u4F7F\u7528\u65E5: "Open next usage day",
|
|
224
230
|
"\u6B63\u5728\u5237\u65B0\u2026": "Refreshing\u2026",
|
|
@@ -832,6 +838,8 @@ var en_default = {
|
|
|
832
838
|
" \xB7 Edge \u8865\u5B8C": " \xB7 Finished with Edge",
|
|
833
839
|
"\u8C03\u6574\u7B2C {v1} \u6BB5": "Adjust segment {v1}",
|
|
834
840
|
\u65E7\u7248\u8BED\u6C14: "Older delivery instruction",
|
|
841
|
+
\u8FD9\u4E2A\u540D\u5B57\u4E0D\u4F1A\u88AB\u6717\u8BFB: "This name is not spoken",
|
|
842
|
+
"{v1} \u6BB5\u5408\u6210 \xB7 {v2} \u6761\u6807\u6CE8 \xB7 {v3} \u4E2A\u89D2\u8272 \xB7 \u9010\u53E5\u8BED\u6C14": "{v1} spoken segments \xB7 {v2} annotations \xB7 {v3} roles \xB7 per-line delivery",
|
|
835
843
|
"\u8BD5\u542C\u7B2C {v1} \u6BB5": "Preview segment {v1}",
|
|
836
844
|
\u5408\u6210\u8FD9\u6BB5: "Synthesize this segment",
|
|
837
845
|
\u5206\u522B\u8C03\u6574\u7247\u6BB5: "Adjust segments individually",
|
|
@@ -1599,7 +1607,13 @@ var en_default = {
|
|
|
1599
1607
|
"\u6B63\u5728\u51C6\u5907\u97F3\u9891\u5185\u5BB9\u2026": "Preparing audio\u2026",
|
|
1600
1608
|
"\u95EE AI \u8FD9\u4E00\u6BB5": "Ask AI about this passage",
|
|
1601
1609
|
"\u5DF2\u590D\u5236\u9632\u5267\u900F\u63D0\u95EE\u4E0A\u4E0B\u6587\uFF0C\u5207\u56DE\u5BF9\u8BDD\u7C98\u8D34\u5373\u53EF\u5411 AI \u63D0\u95EE": "Spoiler-safe passage context copied. Switch to chat and paste to ask AI.",
|
|
1602
|
-
"\u5BF9\u8BDD\u53F3\u4FA7\u680F\u300C\u4F34\u542C\u89C6\u56FE\u300D\u4F1A\u5171\u4EAB\u5F53\u524D\u64AD\u653E\u5668\u72B6\u6001\uFF0C\u65B9\u4FBF\u8FB9\u542C\u8FB9\u804A\u3002": "The right sidebar Companion Player shares the active playback state while you chat."
|
|
1610
|
+
"\u5BF9\u8BDD\u53F3\u4FA7\u680F\u300C\u4F34\u542C\u89C6\u56FE\u300D\u4F1A\u5171\u4EAB\u5F53\u524D\u64AD\u653E\u5668\u72B6\u6001\uFF0C\u65B9\u4FBF\u8FB9\u542C\u8FB9\u804A\u3002": "The right sidebar Companion Player shares the active playback state while you chat.",
|
|
1611
|
+
"QQ \u4EA4\u6D41\u4E0E\u552E\u540E\u7FA4": "QQ support group",
|
|
1612
|
+
"\u52A0\u7FA4\u540E\u53EF\u4EE5\u54A8\u8BE2\u4F7F\u7528\u548C\u4ED8\u6B3E\u95EE\u9898\u3002": "Ask about using LaiVox or a payment.",
|
|
1613
|
+
"QQ \u7FA4\u4E8C\u7EF4\u7801": "QQ group QR code",
|
|
1614
|
+
\u590D\u5236\u7FA4\u53F7: "Copy group number",
|
|
1615
|
+
"\u590D\u5236\u5931\u8D25\uFF0C\u7FA4\u53F7\uFF1A": "Could not copy. Group number: ",
|
|
1616
|
+
"\u6253\u5F00 QQ \u52A0\u7FA4\u94FE\u63A5 \u2197": "Open the QQ group link \u2197"
|
|
1603
1617
|
};
|
|
1604
1618
|
|
|
1605
1619
|
// src/client/i18n/zh-hant.json
|
|
@@ -1784,6 +1798,12 @@ var zh_hant_default = {
|
|
|
1784
1798
|
"\u8BF7\u66F4\u65B0\u63D2\u4EF6\u540E\u7EE7\u7EED\u4F7F\u7528 LaiVox\u3002": "\u8ACB\u66F4\u65B0\u5916\u639B\u5F8C\u7E7C\u7E8C\u4F7F\u7528 LaiVox\u3002",
|
|
1785
1799
|
"\u9000\u6B3E\u5BA1\u6838\u4E2D\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "\u9000\u6B3E\u7A3D\u6838\u4E2D\uFF0CLaiVox \u66AB\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7E7C\u7E8C\u7528 Edge\u3002",
|
|
1786
1800
|
"\u4F1A\u5458\u5DF2\u5230\u671F\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "\u6703\u54E1\u5DF2\u5230\u671F\uFF0CLaiVox \u66AB\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7E7C\u7E8C\u7528 Edge\u3002",
|
|
1801
|
+
"\u8BD5\u7528\u5DF2\u7ED3\u675F\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "\u8A66\u7528\u5DF2\u7D50\u675F\uFF0CLaiVox \u66AB\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7E7C\u7E8C\u7528 Edge\u3002",
|
|
1802
|
+
"\u6B64\u8D26\u53F7\u4E0D\u542B\u8BD5\u7528\u989D\u5EA6\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "\u6B64\u5E33\u865F\u4E0D\u542B\u8A66\u7528\u984D\u5EA6\uFF0CLaiVox \u66AB\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7E7C\u7E8C\u7528 Edge\u3002",
|
|
1803
|
+
"\u5F53\u524D Key \u4F7F\u7528\u8D26\u53F7\u7684\u8BD5\u7528\u6717\u8BFB\u989D\u5EA6\uFF08\u4E0E\u6D4F\u89C8\u5668\u6269\u5C55\u5171\u7528\uFF0C\u4E0D\u542B AI \u6574\u7406\uFF09\u3002": "\u76EE\u524D Key \u4F7F\u7528\u5E33\u865F\u7684\u8A66\u7528\u6717\u8B80\u984D\u5EA6\uFF08\u8207\u700F\u89BD\u5668\u64F4\u5145\u529F\u80FD\u5171\u7528\uFF0C\u4E0D\u542B AI \u6574\u7406\uFF09\u3002",
|
|
1804
|
+
"\u4ECA\u5929\u7684\u8BD5\u7528\u6717\u8BFB\u540D\u989D\u5DF2\u6EE1\uFF0C\u5317\u4EAC\u65F6\u95F4 0 \u70B9\u6062\u590D\uFF1B\u4F1A\u5458\u548C\u65F6\u957F\u5305\u4E0D\u53D7\u5F71\u54CD\u3002\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "\u4ECA\u5929\u7684\u8A66\u7528\u6717\u8B80\u540D\u984D\u5DF2\u6EFF\uFF0C\u5317\u4EAC\u6642\u9593 0 \u9EDE\u6062\u5FA9\uFF1B\u6703\u54E1\u548C\u6642\u6578\u5305\u4E0D\u53D7\u5F71\u97FF\u3002\u53EF\u4EE5\u7E7C\u7E8C\u7528 Edge\u3002",
|
|
1805
|
+
"\u5F53\u524D Key \u7684\u6717\u8BFB\u989D\u5EA6\u4E0D\u53EF\u7528\uFF08\u4F1A\u5458\u3001\u8BD5\u7528\u6216\u65F6\u957F\u5305\u672A\u5F00\u901A\u3001\u5DF2\u5230\u671F\u6216\u9000\u6B3E\u5BA1\u6838\u4E2D\uFF09\uFF0C\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002": "\u76EE\u524D Key \u7684\u6717\u8B80\u984D\u5EA6\u4E0D\u53EF\u7528\uFF08\u6703\u54E1\u3001\u8A66\u7528\u6216\u6642\u6578\u5305\u672A\u958B\u901A\u3001\u5DF2\u5230\u671F\u6216\u9000\u6B3E\u5BE9\u6838\u4E2D\uFF09\uFF0C\u53EF\u4EE5\u7E7C\u7E8C\u7528 Edge\u3002",
|
|
1806
|
+
"LaiVox \u4E3A\u589E\u503C\u4ED8\u8D39\u5F15\u64CE\uFF1A\u53EF\u4F7F\u7528 LaiVox \u4F1A\u5458\u3001\u65B0\u6CE8\u518C\u8D26\u53F7\u7684\u8BD5\u7528\u6717\u8BFB\u989D\u5EA6\uFF0C\u6216\u5355\u72EC\u8D2D\u4E70\u7684\u6717\u8BFB\u65F6\u957F\u5305\uFF0C\u5728\u5B98\u7F51\u7B7E\u53D1 API Key\u3002": "LaiVox \u70BA\u589E\u503C\u4ED8\u8CBB\u5F15\u64CE\uFF1A\u53EF\u4F7F\u7528 LaiVox \u6703\u54E1\u3001\u65B0\u8A3B\u518A\u5E33\u865F\u7684\u8A66\u7528\u6717\u8B80\u984D\u5EA6\uFF0C\u6216\u55AE\u7368\u8CFC\u8CB7\u7684\u6717\u8B80\u6642\u6578\u5305\uFF0C\u5728\u5B98\u7DB2\u7C3D\u767C API Key\u3002",
|
|
1787
1807
|
"\u6B63\u5728\u5F00\u542F\u2026": "\u6B63\u5728\u958B\u555F\u2026",
|
|
1788
1808
|
\u5F00\u542F\u4E0B\u4E00\u4E2A\u4F7F\u7528\u65E5: "\u958B\u555F\u4E0B\u4E00\u500B\u4F7F\u7528\u65E5",
|
|
1789
1809
|
"\u6B63\u5728\u5237\u65B0\u2026": "\u6B63\u5728\u91CD\u65B0\u6574\u7406\u2026",
|
|
@@ -2397,6 +2417,8 @@ var zh_hant_default = {
|
|
|
2397
2417
|
" \xB7 Edge \u8865\u5B8C": " \xB7 Edge \u88DC\u5B8C",
|
|
2398
2418
|
"\u8C03\u6574\u7B2C {v1} \u6BB5": "\u8ABF\u6574\u7B2C {v1} \u6BB5",
|
|
2399
2419
|
\u65E7\u7248\u8BED\u6C14: "\u820A\u7248\u8A9E\u6C23",
|
|
2420
|
+
\u8FD9\u4E2A\u540D\u5B57\u4E0D\u4F1A\u88AB\u6717\u8BFB: "\u9019\u500B\u540D\u5B57\u4E0D\u6703\u88AB\u6717\u8B80",
|
|
2421
|
+
"{v1} \u6BB5\u5408\u6210 \xB7 {v2} \u6761\u6807\u6CE8 \xB7 {v3} \u4E2A\u89D2\u8272 \xB7 \u9010\u53E5\u8BED\u6C14": "{v1} \u6BB5\u5408\u6210 \xB7 {v2} \u689D\u6A19\u6CE8 \xB7 {v3} \u500B\u89D2\u8272 \xB7 \u9010\u53E5\u8A9E\u6C23",
|
|
2400
2422
|
"\u8BD5\u542C\u7B2C {v1} \u6BB5": "\u8A66\u807D\u7B2C {v1} \u6BB5",
|
|
2401
2423
|
\u5408\u6210\u8FD9\u6BB5: "\u5408\u6210\u9019\u6BB5",
|
|
2402
2424
|
\u5206\u522B\u8C03\u6574\u7247\u6BB5: "\u5206\u5225\u8ABF\u6574\u7247\u6BB5",
|
|
@@ -3164,7 +3186,13 @@ var zh_hant_default = {
|
|
|
3164
3186
|
"\u6B63\u5728\u51C6\u5907\u97F3\u9891\u5185\u5BB9\u2026": "\u6B63\u5728\u6E96\u5099\u97F3\u8A0A\u5167\u5BB9\u2026",
|
|
3165
3187
|
"\u95EE AI \u8FD9\u4E00\u6BB5": "\u554F AI \u9019\u4E00\u6BB5",
|
|
3166
3188
|
"\u5DF2\u590D\u5236\u9632\u5267\u900F\u63D0\u95EE\u4E0A\u4E0B\u6587\uFF0C\u5207\u56DE\u5BF9\u8BDD\u7C98\u8D34\u5373\u53EF\u5411 AI \u63D0\u95EE": "\u5DF2\u8907\u88FD\u9632\u5287\u900F\u63D0\u554F\u4E0A\u4E0B\u6587\uFF0C\u5207\u56DE\u5C0D\u8A71\u8CBC\u4E0A\u5373\u53EF\u5411 AI \u63D0\u554F",
|
|
3167
|
-
"\u5BF9\u8BDD\u53F3\u4FA7\u680F\u300C\u4F34\u542C\u89C6\u56FE\u300D\u4F1A\u5171\u4EAB\u5F53\u524D\u64AD\u653E\u5668\u72B6\u6001\uFF0C\u65B9\u4FBF\u8FB9\u542C\u8FB9\u804A\u3002": "\u5C0D\u8A71\u53F3\u5074\u6B04\u300C\u4F34\u807D\u6AA2\u8996\u300D\u6703\u5171\u4EAB\u76EE\u524D\u64AD\u653E\u5668\u72C0\u614B\uFF0C\u65B9\u4FBF\u908A\u807D\u908A\u804A\u3002"
|
|
3189
|
+
"\u5BF9\u8BDD\u53F3\u4FA7\u680F\u300C\u4F34\u542C\u89C6\u56FE\u300D\u4F1A\u5171\u4EAB\u5F53\u524D\u64AD\u653E\u5668\u72B6\u6001\uFF0C\u65B9\u4FBF\u8FB9\u542C\u8FB9\u804A\u3002": "\u5C0D\u8A71\u53F3\u5074\u6B04\u300C\u4F34\u807D\u6AA2\u8996\u300D\u6703\u5171\u4EAB\u76EE\u524D\u64AD\u653E\u5668\u72C0\u614B\uFF0C\u65B9\u4FBF\u908A\u807D\u908A\u804A\u3002",
|
|
3190
|
+
"QQ \u4EA4\u6D41\u4E0E\u552E\u540E\u7FA4": "QQ \u4EA4\u6D41\u8207\u552E\u5F8C\u7FA4",
|
|
3191
|
+
"\u52A0\u7FA4\u540E\u53EF\u4EE5\u54A8\u8BE2\u4F7F\u7528\u548C\u4ED8\u6B3E\u95EE\u9898\u3002": "\u52A0\u7FA4\u5F8C\u53EF\u4EE5\u8AEE\u8A62\u4F7F\u7528\u548C\u4ED8\u6B3E\u554F\u984C\u3002",
|
|
3192
|
+
"QQ \u7FA4\u4E8C\u7EF4\u7801": "QQ \u7FA4\u4E8C\u7DAD\u78BC",
|
|
3193
|
+
\u590D\u5236\u7FA4\u53F7: "\u8907\u88FD\u7FA4\u865F",
|
|
3194
|
+
"\u590D\u5236\u5931\u8D25\uFF0C\u7FA4\u53F7\uFF1A": "\u8907\u88FD\u5931\u6557\uFF0C\u7FA4\u865F\uFF1A",
|
|
3195
|
+
"\u6253\u5F00 QQ \u52A0\u7FA4\u94FE\u63A5 \u2197": "\u6253\u958B QQ \u52A0\u7FA4\u9023\u7D50 \u2197"
|
|
3168
3196
|
};
|
|
3169
3197
|
|
|
3170
3198
|
// src/client/i18n/locale.mjs
|
|
@@ -3250,7 +3278,8 @@ var messages = {
|
|
|
3250
3278
|
LAIVOX_ABUSE_BLOCKED: "\u8BF7\u6C42\u88AB\u6682\u65F6\u9650\u5236\uFF0C\u5C06\u81EA\u52A8\u91CD\u8BD5\u3002",
|
|
3251
3279
|
INVALID_API_KEY: "\u8BF7\u68C0\u67E5 API Key \u7684\u683C\u5F0F\u3002",
|
|
3252
3280
|
LAIVOX_QUOTA: "LaiVox \u6717\u8BFB\u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u6216\u5269\u4F59\u989D\u5EA6\u4E0D\u591F\u8FD9\u4E00\u6BB5\u3002",
|
|
3253
|
-
|
|
3281
|
+
LAIVOX_TRIAL_CAPACITY: "\u4ECA\u5929\u7684\u8BD5\u7528\u6717\u8BFB\u540D\u989D\u5DF2\u6EE1\uFF0C\u5317\u4EAC\u65F6\u95F4 0 \u70B9\u6062\u590D\uFF1B\u4F1A\u5458\u548C\u65F6\u957F\u5305\u4E0D\u53D7\u5F71\u54CD\u3002\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002",
|
|
3282
|
+
LAIVOX_MEMBERSHIP: "\u5F53\u524D Key \u7684\u6717\u8BFB\u989D\u5EA6\u4E0D\u53EF\u7528\uFF08\u4F1A\u5458\u3001\u8BD5\u7528\u6216\u65F6\u957F\u5305\u672A\u5F00\u901A\u3001\u5DF2\u5230\u671F\u6216\u9000\u6B3E\u5BA1\u6838\u4E2D\uFF09\uFF0C\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002",
|
|
3254
3283
|
LAIVOX_CLIENT_OUTDATED: "\u8BF7\u66F4\u65B0\u63D2\u4EF6\u540E\u7EE7\u7EED\u4F7F\u7528 LaiVox\u3002",
|
|
3255
3284
|
LAIVOX_VOICE_UNAVAILABLE: "\u6709\u89D2\u8272\u7684 LaiVox \u97F3\u8272\u5DF2\u5220\u9664\u6216\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u6362\u4E00\u4E2A\u97F3\u8272\u3002",
|
|
3256
3285
|
LAIVOX_DEFAULT_ACCOUNT: "\u9ED8\u8BA4\u65C1\u767D\u5C5E\u4E8E\u53E6\u4E00\u4E2A LaiVox \u8D26\u53F7\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002",
|
|
@@ -5129,6 +5158,136 @@ function ModelOptions({ models, selection, onChange, disabled }) {
|
|
|
5129
5158
|
] });
|
|
5130
5159
|
}
|
|
5131
5160
|
|
|
5161
|
+
// src/domain/spoken-text.mjs
|
|
5162
|
+
var bareName = /^[^\s,。!?;:、]{1,6}$/u;
|
|
5163
|
+
function stripSpeakerPrefix(text, roleName) {
|
|
5164
|
+
const body = String(text ?? "");
|
|
5165
|
+
const name2 = String(roleName ?? "").normalize("NFKC").trim();
|
|
5166
|
+
if (!bareName.test(name2)) return { text: body, offset: 0, stripped: false };
|
|
5167
|
+
const chars = [...body];
|
|
5168
|
+
const nameChars = [...name2];
|
|
5169
|
+
let lead = 0;
|
|
5170
|
+
while (lead < chars.length && /\s/u.test(chars[lead])) lead += 1;
|
|
5171
|
+
if (chars.length - lead < nameChars.length + 1) return { text: body, offset: 0, stripped: false };
|
|
5172
|
+
for (let index2 = 0; index2 < nameChars.length; index2++) {
|
|
5173
|
+
if (chars[lead + index2].normalize("NFKC") !== nameChars[index2]) return { text: body, offset: 0, stripped: false };
|
|
5174
|
+
}
|
|
5175
|
+
const colon = chars[lead + nameChars.length].normalize("NFKC");
|
|
5176
|
+
if (colon !== ":" && colon !== "\uFF1A") return { text: body, offset: 0, stripped: false };
|
|
5177
|
+
let index = lead + nameChars.length + 1;
|
|
5178
|
+
while (index < chars.length && /\s/u.test(chars[index])) index += 1;
|
|
5179
|
+
const offset3 = chars.slice(0, index).join("").length;
|
|
5180
|
+
return { text: body.slice(offset3), offset: offset3, stripped: true };
|
|
5181
|
+
}
|
|
5182
|
+
function roleNames(roles) {
|
|
5183
|
+
const names2 = new Map((roles ?? []).map((role) => [role.id, role.name]));
|
|
5184
|
+
if (!names2.has("narrator")) names2.set("narrator", "\u65C1\u767D");
|
|
5185
|
+
return names2;
|
|
5186
|
+
}
|
|
5187
|
+
function applySpokenParts(parts, { speakText, roles } = {}) {
|
|
5188
|
+
if (speakText !== "role-prefix-v1") return { parts, skipped: 0 };
|
|
5189
|
+
const names2 = roleNames(roles);
|
|
5190
|
+
const next = [];
|
|
5191
|
+
let skipped = 0;
|
|
5192
|
+
for (let index = 0; index < parts.length; index++) {
|
|
5193
|
+
const part = parts[index];
|
|
5194
|
+
const following = parts[index + 1];
|
|
5195
|
+
if (part.roleId === "narrator" && following && following.roleId !== "narrator" && following.line === part.line && following.start === part.end) {
|
|
5196
|
+
const tag = stripSpeakerPrefix(part.text, names2.get(following.roleId) ?? "");
|
|
5197
|
+
if (tag.stripped && tag.text === "") {
|
|
5198
|
+
skipped += 1;
|
|
5199
|
+
continue;
|
|
5200
|
+
}
|
|
5201
|
+
}
|
|
5202
|
+
if (part.roleId !== "narrator") {
|
|
5203
|
+
const stripped = stripSpeakerPrefix(part.text, names2.get(part.roleId) ?? "");
|
|
5204
|
+
if (stripped.stripped) {
|
|
5205
|
+
next.push({ ...part, text: stripped.text, start: part.start + stripped.offset });
|
|
5206
|
+
continue;
|
|
5207
|
+
}
|
|
5208
|
+
}
|
|
5209
|
+
next.push(part);
|
|
5210
|
+
}
|
|
5211
|
+
const before = next.length;
|
|
5212
|
+
const spoken = next.filter((part) => !isSeparator(part.text ?? "") && hasSpeakable(part.text));
|
|
5213
|
+
return { parts: spoken, skipped: skipped + before - spoken.length };
|
|
5214
|
+
}
|
|
5215
|
+
|
|
5216
|
+
// src/client/studio/scriptAudio.mjs
|
|
5217
|
+
var FIELDS = ["roleId", "emotion", "intensity", "instruct"];
|
|
5218
|
+
function scriptGroups(chapter, draft) {
|
|
5219
|
+
if (!chapter) return [];
|
|
5220
|
+
const source = draft ?? chapter.editorial;
|
|
5221
|
+
const version = segmentVersion(chapter.editorial);
|
|
5222
|
+
const segments = draft ? segmentChapter(chapter.text, source?.removed ?? [], version) : chapter.script ?? segmentChapter(chapter.text ?? "", source?.removed ?? [], version);
|
|
5223
|
+
const annotations = source?.annotations ?? {};
|
|
5224
|
+
return groupSpeech(segments.map((part) => ({ ...part, ...annotations[part.id] })));
|
|
5225
|
+
}
|
|
5226
|
+
function synthGroups(chapter, draft, roles, mode) {
|
|
5227
|
+
if (!chapter) return [];
|
|
5228
|
+
const source = draft ?? chapter.editorial;
|
|
5229
|
+
const version = segmentVersion(chapter.editorial);
|
|
5230
|
+
const segments = draft ? segmentChapter(chapter.text, source?.removed ?? [], version) : chapter.script ?? segmentChapter(chapter.text ?? "", source?.removed ?? [], version);
|
|
5231
|
+
const annotations = source?.annotations ?? {};
|
|
5232
|
+
let parts = speakableParts(segments.map((part) => ({ ...part, ...annotations[part.id] })));
|
|
5233
|
+
if (mode === "reading") parts = parts.map(({ instruct: _instruct, ...part }) => ({ ...part, roleId: "narrator", emotion: "neutral", intensity: 0 }));
|
|
5234
|
+
return groupSpeech(applySpokenParts(parts, { speakText: "role-prefix-v1", roles }).parts);
|
|
5235
|
+
}
|
|
5236
|
+
function rowChanged(part, annotations, saved) {
|
|
5237
|
+
return (part.sourceIds ?? [part.id]).some((id) => {
|
|
5238
|
+
const next = annotations?.[id] ?? {};
|
|
5239
|
+
const previous = saved?.[id] ?? {};
|
|
5240
|
+
return FIELDS.some((key) => (next[key] ?? void 0) !== (previous[key] ?? void 0));
|
|
5241
|
+
});
|
|
5242
|
+
}
|
|
5243
|
+
function rowAudio(part, plan) {
|
|
5244
|
+
const hits = (plan?.status === "ok" ? plan.parts : []).filter((row) => row[0] < part.end && row[1] > part.start);
|
|
5245
|
+
const ready = hits.filter((row) => row[2] === 1).length;
|
|
5246
|
+
const audio = !hits.length ? "missing" : ready === hits.length ? "ready" : ready ? "partial" : "missing";
|
|
5247
|
+
return { hits, audio };
|
|
5248
|
+
}
|
|
5249
|
+
function excerptSelection(groups, media, selectedIds, unspoken = /* @__PURE__ */ new Set()) {
|
|
5250
|
+
const selected = (groups ?? []).filter((part) => selectedIds?.has(part.id));
|
|
5251
|
+
if (!selected.length || !media?.length) return null;
|
|
5252
|
+
const wanted = /* @__PURE__ */ new Set();
|
|
5253
|
+
for (const part of selected) {
|
|
5254
|
+
for (const id of part.sourceIds ?? [part.id]) {
|
|
5255
|
+
if (unspoken.has(id)) continue;
|
|
5256
|
+
const index = media.findIndex((item) => item.id === id);
|
|
5257
|
+
if (index < 0) return { error: "gap" };
|
|
5258
|
+
wanted.add(index);
|
|
5259
|
+
}
|
|
5260
|
+
}
|
|
5261
|
+
if (wanted.size === 0) return null;
|
|
5262
|
+
const indices = [...wanted].sort((a, b) => a - b);
|
|
5263
|
+
const contiguous = indices.every((index, position) => position === 0 || index === indices[position - 1] + 1);
|
|
5264
|
+
if (!contiguous || indices.some((index) => !media[index].ready)) return { error: "gap" };
|
|
5265
|
+
const seconds = indices.reduce((sum, index) => sum + (media[index].seconds || 0), 0);
|
|
5266
|
+
if (indices.length > 60 || seconds > 90) return { error: "limit" };
|
|
5267
|
+
return { from: indices[0], to: indices.at(-1) };
|
|
5268
|
+
}
|
|
5269
|
+
function unspokenSegmentIds(chapter, draft, roles, mode) {
|
|
5270
|
+
const spoken = new Set(synthGroups(chapter, draft, roles, mode).flatMap((group) => group.sourceIds));
|
|
5271
|
+
return new Set(scriptGroups(chapter, draft).flatMap((group) => group.sourceIds).filter((id) => !spoken.has(id)));
|
|
5272
|
+
}
|
|
5273
|
+
function marksUnspokenName(mode) {
|
|
5274
|
+
return mode !== "reading";
|
|
5275
|
+
}
|
|
5276
|
+
function rowQueued(part, operation, mode, engine) {
|
|
5277
|
+
if (!operation || operation.state !== "running" || operation.mode && mode && operation.mode !== mode) return false;
|
|
5278
|
+
if (operation.engine && engine && operation.engine !== engine) return false;
|
|
5279
|
+
if (operation.scope !== "range") return true;
|
|
5280
|
+
return (operation.ranges ?? []).some((range) => part.start < range[1] && part.end > range[0]);
|
|
5281
|
+
}
|
|
5282
|
+
function rowRetakeState(part, operation, mode, engine) {
|
|
5283
|
+
if (!operation?.retake) return null;
|
|
5284
|
+
if (!["queued", "running", "paused"].includes(operation.state)) return null;
|
|
5285
|
+
if (operation.mode && mode && operation.mode !== mode || operation.engine && engine && operation.engine !== engine) return null;
|
|
5286
|
+
const hits = operation.scope !== "range" || (operation.ranges ?? []).some((range) => part.start < range[1] && part.end > range[0]);
|
|
5287
|
+
if (!hits) return null;
|
|
5288
|
+
return operation.state === "paused" ? "paused" : "active";
|
|
5289
|
+
}
|
|
5290
|
+
|
|
5132
5291
|
// src/client/stage/roleColor.mjs
|
|
5133
5292
|
function roleIndex(id) {
|
|
5134
5293
|
let hash = 2166136261;
|
|
@@ -5199,7 +5358,7 @@ function PlanSheet({ dialog, answer, narratorSetting, account }) {
|
|
|
5199
5358
|
const directory = useVoiceDirectory(options.engine);
|
|
5200
5359
|
const chapter = plan.chapter;
|
|
5201
5360
|
const narratorDefault = narratorDefaultFor(options.engine, account, directory.voices, narratorSetting);
|
|
5202
|
-
const segments =
|
|
5361
|
+
const segments = chapter ? synthGroups(chapter, null, chapter.roles, options.mode).length : 0;
|
|
5203
5362
|
const reusable = !plan.batch && chapter?.media?.some((part) => part.ready);
|
|
5204
5363
|
const assigned = !plan.batch && chapter ? effectiveVoices(chapter, chapter.roles, directory.voices, options.engine, chapter.voiceRule, narratorDefault) : null;
|
|
5205
5364
|
const voiceName = (id) => directory.voices?.find((voice) => voice.id === id)?.name ?? id;
|
|
@@ -9030,7 +9189,9 @@ function packPriceLine(catalog) {
|
|
|
9030
9189
|
}
|
|
9031
9190
|
function ledgerLine(status) {
|
|
9032
9191
|
if (!status) return "";
|
|
9033
|
-
if (status.ledger !== "pack")
|
|
9192
|
+
if (status.ledger !== "pack") {
|
|
9193
|
+
return status.accountState === "trial" ? translate("\u5F53\u524D Key \u4F7F\u7528\u8D26\u53F7\u7684\u8BD5\u7528\u6717\u8BFB\u989D\u5EA6\uFF08\u4E0E\u6D4F\u89C8\u5668\u6269\u5C55\u5171\u7528\uFF0C\u4E0D\u542B AI \u6574\u7406\uFF09\u3002") : translate("\u5F53\u524D Key \u4F7F\u7528\u4F1A\u5458\u7684\u6717\u8BFB\u989D\u5EA6\uFF08\u4E0D\u5360 AI \u6574\u7406\u989D\u5EA6\uFF09\u3002");
|
|
9194
|
+
}
|
|
9034
9195
|
const pack = status.pack;
|
|
9035
9196
|
if (!pack?.active) return translate("\u5F53\u524D Key \u4F7F\u7528\u6717\u8BFB\u65F6\u957F\u5305\u3002");
|
|
9036
9197
|
const until = shortDate(pack.endsAt);
|
|
@@ -9043,7 +9204,7 @@ function deniedLine(status) {
|
|
|
9043
9204
|
const head2 = refund ? translate("\u65F6\u957F\u5305\u9000\u6B3E\u5BA1\u6838\u4E2D\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002") : translate("\u65F6\u957F\u5305\u672A\u5F00\u901A\u6216\u5DF2\u5230\u671F\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002");
|
|
9044
9205
|
return status.membershipAvailable ? head2 + translate("\u4F60\u7684\u4F1A\u5458\u6709\u6548\uFF0C\u53EF\u4EE5\u5728\u5B98\u7F51\u628A\u8FD9\u628A Key \u6539\u56DE\u4F7F\u7528\u4F1A\u5458\u989D\u5EA6\u3002") : head2;
|
|
9045
9206
|
}
|
|
9046
|
-
const head = refund ? translate("\u9000\u6B3E\u5BA1\u6838\u4E2D\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002") : translate("\u4F1A\u5458\u5DF2\u5230\u671F\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002");
|
|
9207
|
+
const head = refund ? translate("\u9000\u6B3E\u5BA1\u6838\u4E2D\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002") : status.accountState === "trial_expired" ? translate("\u8BD5\u7528\u5DF2\u7ED3\u675F\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002") : status.accountState === "trial_not_included" ? translate("\u6B64\u8D26\u53F7\u4E0D\u542B\u8BD5\u7528\u989D\u5EA6\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002") : translate("\u4F1A\u5458\u5DF2\u5230\u671F\uFF0CLaiVox \u6682\u4E0D\u53EF\u7528\uFF1B\u53EF\u4EE5\u7EE7\u7EED\u7528 Edge\u3002");
|
|
9047
9208
|
return status.packAvailable ? head + translate("\u4F60\u6709\u53EF\u7528\u7684\u6717\u8BFB\u65F6\u957F\u5305\uFF0C\u53EF\u4EE5\u5728\u5B98\u7F51\u628A\u8FD9\u628A Key \u6539\u4E3A\u4F7F\u7528\u65F6\u957F\u5305\u3002") : head;
|
|
9048
9209
|
}
|
|
9049
9210
|
async function openUsageDay(decide) {
|
|
@@ -9689,6 +9850,7 @@ function LaivoxCard({ keyInfo, packHref, packRequest, packIdentity, reloadKey, d
|
|
|
9689
9850
|
const [reading, setReading] = (0, import_react23.useState)(null);
|
|
9690
9851
|
const [loading, setLoading] = (0, import_react23.useState)(false);
|
|
9691
9852
|
const [opening, setOpening] = (0, import_react23.useState)(false);
|
|
9853
|
+
const [qqCopyFailed, setQqCopyFailed] = (0, import_react23.useState)(false);
|
|
9692
9854
|
const statusRequest = (0, import_react23.useRef)(null);
|
|
9693
9855
|
const loadRef = (0, import_react23.useRef)(null);
|
|
9694
9856
|
(0, import_react23.useEffect)(() => {
|
|
@@ -9839,6 +10001,7 @@ function LaivoxCard({ keyInfo, packHref, packRequest, packIdentity, reloadKey, d
|
|
|
9839
10001
|
const measured = !denied && usage && !usage.unlimited && ["active", "provisional"].includes(usage.state) && Number.isFinite(usage.remainingPct);
|
|
9840
10002
|
const breakdown = !denied && usage ? usageBreakdown(usage) : "";
|
|
9841
10003
|
const keyInvalid = Boolean(current?.errorCode && INVALID_KEY_CODES.has(current.errorCode));
|
|
10004
|
+
const showQQ = configured && status && !keyInvalid && status.qqContact && (getLanguage() === "zh-CN" || getLanguage() === "zh-Hant");
|
|
9842
10005
|
const statusUnavailable = Boolean(current?.error && !keyInvalid && !status);
|
|
9843
10006
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("form", { className: embedded ? "lv-laivox-settings lv-laivox-embedded" : "lv-card lv-laivox-settings", onSubmit: saveKey, children: [
|
|
9844
10007
|
!embedded && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { id: "lv-laivox", children: !configured ? translate("\u8FDE\u63A5 LaiVox\uFF08\u63A8\u8350 \xB7 \u589E\u503C\u4ED8\u8D39\uFF09") : keyInvalid ? translate("LaiVox Key \u5DF2\u5931\u6548") : translate("LaiVox \u5DF2\u8FDE\u63A5") }),
|
|
@@ -9849,7 +10012,7 @@ function LaivoxCard({ keyInfo, packHref, packRequest, packIdentity, reloadKey, d
|
|
|
9849
10012
|
] }),
|
|
9850
10013
|
expiry && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { children: expiry })
|
|
9851
10014
|
] }),
|
|
9852
|
-
!configured && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { children: translate("LaiVox \u4E3A\u589E\u503C\u4ED8\u8D39\u5F15\u64CE\uFF1A\u53EF\u4F7F\u7528\u5355\u72EC\u8D2D\u4E70\u7684\u6717\u8BFB\u65F6\u957F\u5305\uFF0C\
|
|
10015
|
+
!configured && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { children: translate("LaiVox \u4E3A\u589E\u503C\u4ED8\u8D39\u5F15\u64CE\uFF1A\u53EF\u4F7F\u7528 LaiVox \u4F1A\u5458\u3001\u65B0\u6CE8\u518C\u8D26\u53F7\u7684\u8BD5\u7528\u6717\u8BFB\u989D\u5EA6\uFF0C\u6216\u5355\u72EC\u8D2D\u4E70\u7684\u6717\u8BFB\u65F6\u957F\u5305\uFF0C\u5728\u5B98\u7F51\u7B7E\u53D1 API Key\u3002") }),
|
|
9853
10016
|
configured && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "lv-laivox-quota", "aria-label": translate("\u6717\u8BFB\u989D\u5EA6"), children: [
|
|
9854
10017
|
status?.outdated && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { role: "alert", children: translate("\u8BF7\u66F4\u65B0\u63D2\u4EF6\u540E\u7EE7\u7EED\u4F7F\u7528 LaiVox\u3002") }),
|
|
9855
10018
|
status && !denied && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("small", { className: "lv-metric-caption", children: [
|
|
@@ -9887,26 +10050,48 @@ function LaivoxCard({ keyInfo, packHref, packRequest, packIdentity, reloadKey, d
|
|
|
9887
10050
|
current?.packCatalog?.available && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { className: "lv-quota-pack-price", children: packPriceLine(current.packCatalog) })
|
|
9888
10051
|
] }),
|
|
9889
10052
|
configured && accountId && !updatingKey && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(NarratorDefault, { account: accountId, values, save: save2 }, accountId + ":" + (keyInfo?.masked ?? "")),
|
|
9890
|
-
configured ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
9891
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.
|
|
9892
|
-
|
|
9893
|
-
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
10053
|
+
configured ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
10054
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("details", { children: [
|
|
10055
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("summary", { children: translate("\u7BA1\u7406 Key") }),
|
|
10056
|
+
accountId && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { className: "lv-laivox-account-id", children: account }),
|
|
10057
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
10058
|
+
"LaiVox API Key",
|
|
10059
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10060
|
+
"input",
|
|
10061
|
+
{
|
|
10062
|
+
type: "password",
|
|
10063
|
+
autoComplete: "off",
|
|
10064
|
+
value: secret,
|
|
10065
|
+
disabled: updatingKey || opening,
|
|
10066
|
+
placeholder: translate("\u5DF2\u4FDD\u5B58\uFF0C\u53EF\u7C98\u8D34\u65B0 Key \u66FF\u6362"),
|
|
10067
|
+
onChange: (event) => setSecret(event.target.value)
|
|
10068
|
+
}
|
|
10069
|
+
)
|
|
10070
|
+
] }),
|
|
10071
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lv-inline", children: [
|
|
10072
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { disabled: !secret.trim() || updatingKey || opening, children: saving ? translate("\u6B63\u5728\u9A8C\u8BC1\u2026") : translate("\u4FDD\u5B58 Key") }),
|
|
10073
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", className: "lv-subtle", disabled: updatingKey || opening, onClick: clearKey, children: clearing ? translate("\u6B63\u5728\u6E05\u9664\u2026") : translate("\u6E05\u9664 Key") })
|
|
10074
|
+
] })
|
|
9906
10075
|
] }),
|
|
9907
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("
|
|
9908
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("
|
|
9909
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("
|
|
10076
|
+
showQQ && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("details", { className: "lv-laivox-qq", children: [
|
|
10077
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("summary", { children: translate("QQ \u4EA4\u6D41\u4E0E\u552E\u540E\u7FA4") }),
|
|
10078
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { children: translate("\u52A0\u7FA4\u540E\u53EF\u4EE5\u54A8\u8BE2\u4F7F\u7528\u548C\u4ED8\u6B3E\u95EE\u9898\u3002") }),
|
|
10079
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "lv-laivox-qq-qr", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: status.qqContact.qrDataUrl, alt: translate("QQ \u7FA4\u4E8C\u7EF4\u7801") }) }),
|
|
10080
|
+
status.qqContact.number && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lv-inline", children: [
|
|
10081
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", className: "lv-subtle", onClick: () => {
|
|
10082
|
+
const number = status.qqContact.number;
|
|
10083
|
+
if (!navigator.clipboard?.writeText) {
|
|
10084
|
+
setQqCopyFailed(true);
|
|
10085
|
+
return;
|
|
10086
|
+
}
|
|
10087
|
+
navigator.clipboard.writeText(number).then(() => setQqCopyFailed(false), () => setQqCopyFailed(true));
|
|
10088
|
+
}, children: translate("\u590D\u5236\u7FA4\u53F7") }),
|
|
10089
|
+
qqCopyFailed && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("small", { children: [
|
|
10090
|
+
translate("\u590D\u5236\u5931\u8D25\uFF0C\u7FA4\u53F7\uFF1A"),
|
|
10091
|
+
status.qqContact.number
|
|
10092
|
+
] })
|
|
10093
|
+
] }),
|
|
10094
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: status.qqContact.url, target: "_blank", rel: "noopener noreferrer", children: translate("\u6253\u5F00 QQ \u52A0\u7FA4\u94FE\u63A5 \u2197") })
|
|
9910
10095
|
] })
|
|
9911
10096
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
9912
10097
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
|
|
@@ -13732,62 +13917,6 @@ function SaveBar({ w, save: save2, blocked }) {
|
|
|
13732
13917
|
] });
|
|
13733
13918
|
}
|
|
13734
13919
|
|
|
13735
|
-
// src/client/studio/scriptAudio.mjs
|
|
13736
|
-
var FIELDS = ["roleId", "emotion", "intensity", "instruct"];
|
|
13737
|
-
function scriptGroups(chapter, draft) {
|
|
13738
|
-
if (!chapter) return [];
|
|
13739
|
-
const source = draft ?? chapter.editorial;
|
|
13740
|
-
const version = segmentVersion(chapter.editorial);
|
|
13741
|
-
const segments = draft ? segmentChapter(chapter.text, source?.removed ?? [], version) : chapter.script ?? segmentChapter(chapter.text ?? "", source?.removed ?? [], version);
|
|
13742
|
-
const annotations = source?.annotations ?? {};
|
|
13743
|
-
return groupSpeech(segments.map((part) => ({ ...part, ...annotations[part.id] })));
|
|
13744
|
-
}
|
|
13745
|
-
function rowChanged(part, annotations, saved) {
|
|
13746
|
-
return (part.sourceIds ?? [part.id]).some((id) => {
|
|
13747
|
-
const next = annotations?.[id] ?? {};
|
|
13748
|
-
const previous = saved?.[id] ?? {};
|
|
13749
|
-
return FIELDS.some((key) => (next[key] ?? void 0) !== (previous[key] ?? void 0));
|
|
13750
|
-
});
|
|
13751
|
-
}
|
|
13752
|
-
function rowAudio(part, plan) {
|
|
13753
|
-
const hits = (plan?.status === "ok" ? plan.parts : []).filter((row) => row[0] < part.end && row[1] > part.start);
|
|
13754
|
-
const ready = hits.filter((row) => row[2] === 1).length;
|
|
13755
|
-
const audio = !hits.length ? "missing" : ready === hits.length ? "ready" : ready ? "partial" : "missing";
|
|
13756
|
-
return { hits, audio };
|
|
13757
|
-
}
|
|
13758
|
-
function excerptSelection(groups, media, selectedIds) {
|
|
13759
|
-
const selected = (groups ?? []).filter((part) => selectedIds?.has(part.id));
|
|
13760
|
-
if (!selected.length || !media?.length) return null;
|
|
13761
|
-
const wanted = /* @__PURE__ */ new Set();
|
|
13762
|
-
for (const part of selected) {
|
|
13763
|
-
for (const id of part.sourceIds ?? [part.id]) {
|
|
13764
|
-
const index = media.findIndex((item) => item.id === id);
|
|
13765
|
-
if (index < 0) return { error: "gap" };
|
|
13766
|
-
wanted.add(index);
|
|
13767
|
-
}
|
|
13768
|
-
}
|
|
13769
|
-
const indices = [...wanted].sort((a, b) => a - b);
|
|
13770
|
-
const contiguous = indices.every((index, position) => position === 0 || index === indices[position - 1] + 1);
|
|
13771
|
-
if (!contiguous || indices.some((index) => !media[index].ready)) return { error: "gap" };
|
|
13772
|
-
const seconds = indices.reduce((sum, index) => sum + (media[index].seconds || 0), 0);
|
|
13773
|
-
if (indices.length > 60 || seconds > 90) return { error: "limit" };
|
|
13774
|
-
return { from: indices[0], to: indices.at(-1) };
|
|
13775
|
-
}
|
|
13776
|
-
function rowQueued(part, operation, mode, engine) {
|
|
13777
|
-
if (!operation || operation.state !== "running" || operation.mode && mode && operation.mode !== mode) return false;
|
|
13778
|
-
if (operation.engine && engine && operation.engine !== engine) return false;
|
|
13779
|
-
if (operation.scope !== "range") return true;
|
|
13780
|
-
return (operation.ranges ?? []).some((range) => part.start < range[1] && part.end > range[0]);
|
|
13781
|
-
}
|
|
13782
|
-
function rowRetakeState(part, operation, mode, engine) {
|
|
13783
|
-
if (!operation?.retake) return null;
|
|
13784
|
-
if (!["queued", "running", "paused"].includes(operation.state)) return null;
|
|
13785
|
-
if (operation.mode && mode && operation.mode !== mode || operation.engine && engine && operation.engine !== engine) return null;
|
|
13786
|
-
const hits = operation.scope !== "range" || (operation.ranges ?? []).some((range) => part.start < range[1] && part.end > range[0]);
|
|
13787
|
-
if (!hits) return null;
|
|
13788
|
-
return operation.state === "paused" ? "paused" : "active";
|
|
13789
|
-
}
|
|
13790
|
-
|
|
13791
13920
|
// src/client/studio/PipelineHeader.jsx
|
|
13792
13921
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
13793
13922
|
function PipelineHeader({ w, tab, change, shownEngine }) {
|
|
@@ -13796,11 +13925,14 @@ function PipelineHeader({ w, tab, change, shownEngine }) {
|
|
|
13796
13925
|
const state = w.scriptDraft ?? chapter?.editorial;
|
|
13797
13926
|
const annotations = Object.values(state?.annotations ?? {});
|
|
13798
13927
|
const legacy = chapter?.editorial?.cast && Object.values(chapter.editorial.annotations ?? {}).every((row) => !row.instruct);
|
|
13799
|
-
const
|
|
13928
|
+
const bookRoles = chapter ? mergeRoles(chapter, w.roleDraft).roles : [];
|
|
13929
|
+
const roles = chapter ? chapterRoles(bookRoles, scriptGroups(chapter, w.scriptDraft), w.roleDraft).inChapter : [];
|
|
13800
13930
|
const engine = shownEngine || w.options.engine;
|
|
13801
13931
|
const manual = roles.filter((role) => role.voices?.[engine]).length;
|
|
13802
13932
|
const changes = draftChanges(w);
|
|
13803
|
-
const
|
|
13933
|
+
const synthesized = chapter?.media?.length || (chapter ? synthGroups(chapter, w.scriptDraft, bookRoles, w.options.mode).length : 0);
|
|
13934
|
+
const roleCount = new Set(annotations.map((row) => row.roleId)).size;
|
|
13935
|
+
const script = legacy ? translate("\u65E7\u7248\u53F0\u8BCD\uFF08\u65E0\u9010\u53E5\u8BED\u6C14\uFF09") : annotations.length ? synthesized === annotations.length ? translate("{v1} \u6BB5 \xB7 {v2} \u4E2A\u89D2\u8272 \xB7 \u9010\u53E5\u8BED\u6C14", { v1: synthesized, v2: roleCount }) : translate("{v1} \u6BB5\u5408\u6210 \xB7 {v2} \u6761\u6807\u6CE8 \xB7 {v3} \u4E2A\u89D2\u8272 \xB7 \u9010\u53E5\u8BED\u6C14", { v1: synthesized, v2: annotations.length, v3: roleCount }) : translate("\u5C1A\u672A\u7F16\u5267");
|
|
13804
13936
|
const steps = [
|
|
13805
13937
|
["text", translate("\u6B63\u6587"), translate("{v1} \u5B57 \xB7 ", { v1: (w.draft.text ?? chapter?.text ?? "").length }) + (state?.cleaned ? translate("\u5DF2\u6E05\u6D17 {v1} \u884C", { v1: state.removed.length }) : translate("\u672A\u6E05\u6D17")), Object.keys(w.draft).length ? translate("\u6709\u672A\u4FDD\u5B58\u4FEE\u6539") : "", Boolean(Object.keys(w.draft).length)],
|
|
13806
13938
|
["script", translate("\u53F0\u8BCD"), script + (w.options.mode === "reading" && annotations.length ? translate(" \xB7 \u5355\u4EBA\u6717\u8BFB\u65F6\u4E0D\u7528") : ""), w.scriptDraft ? translate("{v1} \u5904\u672A\u4FDD\u5B58", { v1: changes.groups }) : w.options.mode === "multi" && !state?.cast ? translate("\u9700\u7F16\u5267") : "", Boolean(w.scriptDraft)],
|
|
@@ -14046,6 +14178,18 @@ function ScriptRowEditor({ part, roles, others = [], disabled, label, change, ne
|
|
|
14046
14178
|
// src/client/studio/ScriptList.jsx
|
|
14047
14179
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
14048
14180
|
var labels = { neutral: "\u5E73\u9759", happy: "\u559C\u60A6", sad: "\u60B2\u4F24", angry: "\u6124\u6012", afraid: "\u5BB3\u6015", tense: "\u7D27\u5F20", gentle: "\u6E29\u67D4" };
|
|
14181
|
+
function spokenLine(part, next, roleIds, mode) {
|
|
14182
|
+
if (!marksUnspokenName(mode)) return part.text;
|
|
14183
|
+
const own = part.roleId !== "narrator" ? stripSpeakerPrefix(part.text, roleIds.get(part.roleId)?.name) : null;
|
|
14184
|
+
const tag = part.roleId === "narrator" && next && next.roleId !== "narrator" && next.line === part.line && next.start === part.end ? stripSpeakerPrefix(part.text, roleIds.get(next.roleId)?.name) : null;
|
|
14185
|
+
const mark = own?.stripped ? own : tag?.stripped && tag.text === "" ? tag : null;
|
|
14186
|
+
if (!mark) return part.text;
|
|
14187
|
+
const prefix = part.text.slice(0, mark.offset);
|
|
14188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
14189
|
+
prefix ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { "aria-label": translate("\u8FD9\u4E2A\u540D\u5B57\u4E0D\u4F1A\u88AB\u6717\u8BFB"), children: prefix }) : null,
|
|
14190
|
+
mark.text
|
|
14191
|
+
] });
|
|
14192
|
+
}
|
|
14049
14193
|
function ScriptList({ chapter, roles, draft, setDraft, stale, textDirty, notify: notify2, busy, player, newRole, options, generate, jobAction, actions, openSettings, openRoles, openDay, packPage, onPreparePack, focus, onFocusApplied, pendingCount = 0, confirmSave, saveVoice, narratorSetting, keyInfo }) {
|
|
14050
14194
|
const listRef = (0, import_react45.useRef)(null);
|
|
14051
14195
|
const [roleFilter, setRoleFilter] = (0, import_react45.useState)("");
|
|
@@ -14076,6 +14220,8 @@ function ScriptList({ chapter, roles, draft, setDraft, stale, textDirty, notify:
|
|
|
14076
14220
|
const split = (0, import_react45.useMemo)(() => chapterRoles(roles, groups, null), [roles, groups]);
|
|
14077
14221
|
const view = productionView(chapter, options);
|
|
14078
14222
|
const mode = view.shown.mode;
|
|
14223
|
+
const unspoken = (0, import_react45.useMemo)(() => unspokenSegmentIds(chapter, draft, roles, mode), [chapter, draft, roles, mode]);
|
|
14224
|
+
const isUnspokenRow = (part) => (part.sourceIds ?? [part.id]).every((id) => unspoken.has(id));
|
|
14079
14225
|
const engine = view.shown.engine;
|
|
14080
14226
|
const directory = useVoiceDirectory(engine);
|
|
14081
14227
|
const narratorDefault = narratorDefaultFor(engine, keyInfo?.account, directory.voices, narratorSetting);
|
|
@@ -14233,7 +14379,7 @@ function ScriptList({ chapter, roles, draft, setDraft, stale, textDirty, notify:
|
|
|
14233
14379
|
const audio = rowAudio(part, plan);
|
|
14234
14380
|
const retakeState = changed ? null : retakeStateOf(part);
|
|
14235
14381
|
const queued = !changed && !retakeState && audio.audio !== "ready" && rowQueued(part, chapter.operation, mode, engine);
|
|
14236
|
-
const text = changed ? mode === "reading" ? translate("\u5DF2\u4FEE\u6539 \xB7 \u5355\u4EBA\u6717\u8BFB\u4E0D\u4F7F\u7528") : translate("\u5DF2\u4FEE\u6539 \xB7 \u4FDD\u5B58\u540E\u91CD\u65B0\u5408\u6210\u8FD9\u4E00\u884C") : retakeState === "active" ? translate("\u91CD\u65B0\u5408\u6210\u4E2D") : retakeState === "paused" ? chapter.operation?.error ? translate("\u91CD\u65B0\u5408\u6210\u5931\u8D25") : translate("\u91CD\u65B0\u5408\u6210\u5DF2\u6682\u505C") : queued ? translate("\u6392\u961F\u4E2D") : plan?.status === "ok" ? audio.audio === "ready" ? translate("\u5DF2\u5408\u6210") : audio.audio === "partial" ? translate("\u90E8\u5206\u5DF2\u5408\u6210") : translate("\u672A\u5408\u6210") : "";
|
|
14382
|
+
const text = isUnspokenRow(part) ? translate("\u8FD9\u4E2A\u540D\u5B57\u4E0D\u4F1A\u88AB\u6717\u8BFB") : changed ? mode === "reading" ? translate("\u5DF2\u4FEE\u6539 \xB7 \u5355\u4EBA\u6717\u8BFB\u4E0D\u4F7F\u7528") : translate("\u5DF2\u4FEE\u6539 \xB7 \u4FDD\u5B58\u540E\u91CD\u65B0\u5408\u6210\u8FD9\u4E00\u884C") : retakeState === "active" ? translate("\u91CD\u65B0\u5408\u6210\u4E2D") : retakeState === "paused" ? chapter.operation?.error ? translate("\u91CD\u65B0\u5408\u6210\u5931\u8D25") : translate("\u91CD\u65B0\u5408\u6210\u5DF2\u6682\u505C") : queued ? translate("\u6392\u961F\u4E2D") : plan?.status === "ok" ? audio.audio === "ready" ? translate("\u5DF2\u5408\u6210") : audio.audio === "partial" ? translate("\u90E8\u5206\u5DF2\u5408\u6210") : translate("\u672A\u5408\u6210") : "";
|
|
14237
14383
|
const edge = !changed && audio.hits.some((row) => row[4] === "edge") ? translate(" \xB7 Edge \u8865\u5B8C") : "";
|
|
14238
14384
|
return { changed, audio, retakeState, status: text + edge };
|
|
14239
14385
|
}
|
|
@@ -14311,7 +14457,7 @@ function ScriptList({ chapter, roles, draft, setDraft, stale, textDirty, notify:
|
|
|
14311
14457
|
const jobId = chapter.playbackJob?.id;
|
|
14312
14458
|
const media = chapter.media ?? [];
|
|
14313
14459
|
if (!jobId || !media.length || !selection.size) return;
|
|
14314
|
-
const picked = excerptSelection(groups, media, selection);
|
|
14460
|
+
const picked = excerptSelection(groups, media, selection, unspoken);
|
|
14315
14461
|
if (!picked) return;
|
|
14316
14462
|
if (picked.error === "limit") {
|
|
14317
14463
|
notify2(deferText(() => translate("\u9AD8\u5149\u7247\u6BB5\u6700\u591A 60 \u6BB5\u300190 \u79D2\u3002")));
|
|
@@ -14327,13 +14473,14 @@ function ScriptList({ chapter, roles, draft, setDraft, stale, textDirty, notify:
|
|
|
14327
14473
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("section", { className: "lv-editor", "aria-label": translate("\u89D2\u8272\u4E0E\u53F0\u8BCD"), children: [
|
|
14328
14474
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "lv-heading", children: [
|
|
14329
14475
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("small", { children: [
|
|
14330
|
-
|
|
14476
|
+
chapter.media?.length || synthGroups(chapter, draft, roles, mode).length,
|
|
14331
14477
|
" " + translate("\u6BB5 \xB7 \u6309\u5F53\u524D\u6A21\u5F0F\uFF1A"),
|
|
14332
14478
|
mode === "multi" ? translate("\u591A\u89D2\u8272\u6F14\u7ECE") : translate("\u5355\u4EBA\u6717\u8BFB"),
|
|
14333
14479
|
" \xB7 ",
|
|
14334
14480
|
draft ? translate("\u4FEE\u6539\u5C1A\u672A\u4FDD\u5B58") : translate("\u70B9\u51FB\u300C\u8C03\u6574\u300D\u7F16\u8F91\u914D\u97F3"),
|
|
14335
|
-
plan?.status === "ok" ? translate(" \xB7 \u5DF2\u5408\u6210 {v1} / {v2} \u6BB5", { v1: groups.filter((part) => rowAudio(part, plan).audio === "ready" && !rowChanged(part, state.annotations, chapter.editorial?.annotations)).length, v2: groups.length }) : ""
|
|
14481
|
+
plan?.status === "ok" ? translate(" \xB7 \u5DF2\u5408\u6210 {v1} / {v2} \u6BB5", { v1: groups.filter((part) => !isUnspokenRow(part) && rowAudio(part, plan).audio === "ready" && !rowChanged(part, state.annotations, chapter.editorial?.annotations)).length, v2: groups.filter((part) => !isUnspokenRow(part)).length }) : ""
|
|
14336
14482
|
] }),
|
|
14483
|
+
engine === "edge" && mode === "multi" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("small", { children: edgeDeliveryNote("multi") }),
|
|
14337
14484
|
draft && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "lv-inline", children: [
|
|
14338
14485
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { disabled: busy, onClick: () => setDraft(null), children: translate("\u653E\u5F03\u53F0\u8BCD\u8349\u7A3F") }),
|
|
14339
14486
|
stale && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { onClick: () => navigator.clipboard.writeText(JSON.stringify(draft.annotations, null, 2)).then(() => notify2(deferText(() => translate("\u5DF2\u590D\u5236\u53F0\u8BCD\u6807\u6CE8\u8349\u7A3F"))), () => notify2(deferText(() => translate("\u65E0\u6CD5\u8BBF\u95EE\u526A\u8D34\u677F\u3002")))), children: translate("\u590D\u5236\u53F0\u8BCD\u6807\u6CE8") })
|
|
@@ -14432,7 +14579,7 @@ function ScriptList({ chapter, roles, draft, setDraft, stale, textDirty, notify:
|
|
|
14432
14579
|
] })
|
|
14433
14580
|
] }),
|
|
14434
14581
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "lv-script-main", children: [
|
|
14435
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { children: part
|
|
14582
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { children: spokenLine(part, groups[number], roleIds, mode) }),
|
|
14436
14583
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { className: "lv-direction", onClick: () => setEditing(part.id), children: part.instruct ? "\u2014 " + part.instruct : translate("\u65E7\u7248\u8BED\u6C14") }),
|
|
14437
14584
|
retakeError && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("small", { className: "lv-script-error", role: "alert", children: retakeError }),
|
|
14438
14585
|
editing === part.id && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
@@ -14449,7 +14596,7 @@ function ScriptList({ chapter, roles, draft, setDraft, stale, textDirty, notify:
|
|
|
14449
14596
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "lv-script-actions", children: [
|
|
14450
14597
|
facts.status && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("small", { className: "lv-script-status", "data-error": Boolean(retakeError) || void 0, children: facts.status }),
|
|
14451
14598
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { className: "lv-subtle", "aria-expanded": editing === part.id, "aria-label": translate("\u8C03\u6574\u7B2C {v1} \u6BB5", { v1: number }), onClick: () => setEditing(editing === part.id ? null : part.id), children: editing === part.id ? translate("\u6536\u8D77") : translate("\u8C03\u6574") }),
|
|
14452
|
-
plan?.status === "ok" && facts.audio.audio !== "ready" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { disabled: Boolean(chapter.operation?.laivoxPause && ["quota", "account", "membership", "outdated", "voice"].includes(chapter.operation.laivoxPause.kind) && chapter.operation.state === "paused" || chapter.operation?.retake && ["queued", "running", "paused"].includes(chapter.operation.state)), onClick: () => synthesize(part), children: chapter.operation?.state === "running" && chapter.operation?.scope !== "range" && chapter.operation?.mode === mode ? translate("\u5148\u5408\u6210\u8FD9\u6BB5") : translate("\u5408\u6210\u8FD9\u6BB5") }),
|
|
14599
|
+
!isUnspokenRow(part) && plan?.status === "ok" && facts.audio.audio !== "ready" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { disabled: Boolean(chapter.operation?.laivoxPause && ["quota", "account", "membership", "outdated", "voice"].includes(chapter.operation.laivoxPause.kind) && chapter.operation.state === "paused" || chapter.operation?.retake && ["queued", "running", "paused"].includes(chapter.operation.state)), onClick: () => synthesize(part), children: chapter.operation?.state === "running" && chapter.operation?.scope !== "range" && chapter.operation?.mode === mode ? translate("\u5148\u5408\u6210\u8FD9\u6BB5") : translate("\u5408\u6210\u8FD9\u6BB5") }),
|
|
14453
14600
|
facts.retakeState === "active" && jobAction && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "lv-script-retake-actions", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { type: "button", className: "lv-subtle", disabled: Boolean(opPending), "aria-label": translate("\u53D6\u6D88\u91CD\u65B0\u5408\u6210\u7B2C {v1} \u6BB5", { v1: number }), onClick: () => void jobAction(op.id, "cancel"), children: opPending === "cancel" ? translate("\u6B63\u5728\u53D6\u6D88") : translate("\u53D6\u6D88") }) }),
|
|
14454
14601
|
facts.retakeState === "paused" && jobAction && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "lv-script-retake-actions", children: [
|
|
14455
14602
|
pauseSpec?.type === "settings" && openSettings && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { type: "button", className: "lv-primary", onClick: openSettings, children: translate(pauseSpec.label) }),
|
|
@@ -18536,7 +18683,7 @@ var studio_default = '\r\n.lv-studio { max-width:1200px; margin:auto; padding:28
|
|
|
18536
18683
|
var library_default = "\r\n.lv-library-scene {padding:24px 32px 44px;max-width:1400px;margin:auto;}\r\n.lv-library-scene.lv-library-detail {padding-top:16px;}\r\n.lv-library-scene .lv-shelf {display:block;overflow:visible;padding:18px 0 0;border:0;background:transparent;width:auto;}\r\n.lv-library-scene.lv-library-detail .lv-shelf {padding-top:0;}\r\n.lv-library-scene .lv-shelf-books-pane,\r\n.lv-library-scene .lv-shelf-chapters-pane {display:flex;flex-direction:column;gap:12px;min-width:0;}\r\n.lv-library-scene .lv-books {display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;margin:10px 0;}\r\n.lv-library-scene .lv-books button {display:flex;flex-direction:column;gap:10px;align-items:stretch;border:1px solid var(--lv-line);padding:10px;background:var(--lv-bg);}\r\n.lv-library-scene .lv-books button[aria-pressed=true] {border-color:var(--lv-accent);background:var(--lv-surface-2);}\r\n.lv-library-scene .lv-book-cover {position:relative;height:112px;width:100%;border-radius:var(--lv-r-s);display:grid;place-items:center;background:var(--lv-surface-2);font:var(--lv-title);font-size:44px;color:var(--lv-ink);border:0;}\r\n.lv-library-scene .lv-contents>div {padding:12px;border-bottom:1px solid var(--lv-line);}\r\n.lv-ui .lv-contents .lv-chapter-listen {flex:none;display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:550;background:var(--lv-elevated);border-color:var(--lv-line-strong);color:var(--lv-ink);white-space:nowrap;}\r\n.lv-ui .lv-contents .lv-chapter-listen:hover:not(:disabled) {background:var(--lv-play-bg);border-color:var(--lv-play-bg);color:var(--lv-play-fg);}\r\n.lv-library-scene .lv-contents-heading {margin-top:0;}\r\n.lv-library-scene .lv-shelf-detail-bar {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;}\r\n.lv-ui .lv-shelf-back {display:inline-flex;align-items:center;gap:4px;padding-left:4px;font-weight:600;}\r\n.lv-library-scene .lv-shelf-detail-heading {margin:0;font-size:1.15rem;}\r\n.lv-library-scene .lv-shelf-empty-detail {display:grid;place-items:center;min-height:180px;padding:24px;border:1px dashed var(--lv-line);border-radius:var(--lv-r-m);}\r\n\r\n.lv-library-scene.lv-library-split {display:flex;flex-direction:column;min-height:0;padding-left:24px;padding-right:24px;}\r\n.lv-library-scene .lv-shelf-split {display:grid;grid-template-columns:minmax(270px,340px) minmax(0,1fr);gap:20px;align-items:start;flex:1;min-height:0;padding:14px 0 0;}\r\n.lv-library-scene .lv-shelf-split .lv-books {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:4px 0;}\r\n.lv-library-scene .lv-shelf-split .lv-book-cover {height:92px;}\r\n.lv-library-scene .lv-shelf-split .lv-shelf-chapters-pane {border-left:1px solid var(--lv-line);padding-left:20px;}\r\n\r\n@media (min-height: 520px) {\r\n .lv-library-scene.lv-library-split {height:100%;padding-bottom:20px;}\r\n .lv-library-scene.lv-library-split .lv-shelf-split {align-items:stretch;overflow:hidden;}\r\n .lv-library-scene.lv-library-split .lv-shelf-books-pane,\r\n .lv-library-scene.lv-library-split .lv-shelf-chapters-pane {min-height:0;overflow-y:auto;padding-bottom:24px;}\r\n}\r\n\r\n@container (max-width:759px) {\r\n .lv-library-scene {padding:16px 14px 40px;}\r\n .lv-library-scene .lv-books {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:8px 0;}\r\n .lv-library-scene .lv-book-cover {height:88px;}\r\n}\r\n\r\n.lv-book-cover .lv-role-dot {position:absolute;bottom:10px;left:10px;}\r\n\r\n.lv-import-banner {display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;margin:4px 0 16px;border-radius:var(--lv-r-m);background:var(--lv-surface-2);font-size:13px;color:var(--lv-ink-dim);}\r\n.lv-import-banner span {margin-right:auto;}\r\n\r\n/* \u300C\u4E66\u67B6 / \u5BF9\u8BDD\u97F3\u9891\u300Dtabs and the conversation audio list. */\r\n.lv-library-scene .lv-library-tabs {margin:14px 0 4px;}\r\n.lv-snippets {display:flex;flex-direction:column;gap:14px;padding:18px 0;}\r\n.lv-snippets-summary {display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:var(--lv-ink-dim);font-size:13px;}\r\n.lv-snippets-summary > span {margin-right:auto;min-width:0;}\r\n.lv-ui .lv-snippets-summary .lv-link {display:inline;min-height:0;padding:0;border:0;background:none;color:var(--lv-ink);text-decoration:underline;text-underline-offset:2px;}\r\n.lv-snippets-saved {padding:10px 14px;border-radius:var(--lv-r-m);background:var(--lv-surface-2);}\r\n.lv-snippets-edit {display:flex;flex-wrap:wrap;align-items:end;gap:8px;}\r\n.lv-snippets-edit label {display:flex;flex-direction:column;gap:4px;flex:1 1 14rem;min-width:0;}\r\n.lv-snippets-edit small {flex-basis:100%;}\r\n.lv-snippet-group h3 {margin:6px 0;font-size:13px;color:var(--lv-ink-mute);font-weight:600;}\r\n.lv-snippet {display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--lv-line);}\r\n.lv-snippet-main {display:flex;flex-direction:column;gap:2px;flex:1 1 16rem;min-width:0;}\r\n.lv-snippet-main strong {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}\r\n.lv-snippet-actions {flex-wrap:nowrap;}\r\n.lv-ui .lv-field-label {font-size:13px;color:var(--lv-ink-dim);}\r\n.lv-batch-config {color:var(--lv-ink-mute);font-size:12px;}\r\n.lv-export-panel {display:grid;gap:8px;padding:10px 12px;border:1px solid var(--lv-line);border-radius:10px;background:var(--lv-surface);}\r\n.lv-export-panel input[type=number] {width:68px;}\r\n";
|
|
18537
18684
|
|
|
18538
18685
|
// src/client/styles/sheets.css
|
|
18539
|
-
var sheets_default = "\r\n.lv-ui .lv-sheet {position:absolute;z-index:20;top:var(--lv-top-inset,52px);bottom:var(--lv-dock-inset,0px);right:0;width:min(400px,100%);display:flex;flex-direction:column;min-height:0;background:var(--lv-surface);border-left:1px solid var(--lv-line);box-shadow:var(--lv-shadow);animation:lv-sheet-in 180ms cubic-bezier(.2,.7,.2,1);outline:none;}\r\n.lv-sheet-head {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px 12px 24px;border-bottom:1px solid var(--lv-line);flex:none;}\r\n.lv-ui .lv-sheet-head h2 {font-size:16px;font-weight:600;line-height:1.4;letter-spacing:0;margin:0;}\r\n.lv-sheet-body {flex:1;min-height:0;overflow:auto;padding:20px 24px 28px;display:flex;flex-direction:column;gap:22px;}\r\n.lv-sheet .lv-card {border:0;border-bottom:1px solid var(--lv-line);border-radius:0;box-shadow:none;padding:18px 0;background:transparent;}\r\n.lv-ui .lv-sheet-plan {z-index:21;}\r\n.lv-ui .lv-sheet-suspended {visibility:hidden;pointer-events:none;z-index:19;}\r\n@container (max-width:759px) {.lv-ui .lv-sheet {width:100%;border-left:0;}}\r\n@keyframes lv-sheet-in {from {opacity:0;transform:translateX(16px);} to {opacity:1;transform:none;}}\r\n@media (prefers-reduced-motion:reduce) {.lv-ui .lv-sheet {animation:none;}}\r\n.lv-plan-sheet {display:grid;gap:20px;min-width:0;}\r\n.lv-plan-steps {list-style:none;margin:0;padding:0;display:grid;gap:18px;}\r\n.lv-plan-steps li {display:grid;grid-template-columns:24px minmax(0,1fr);gap:12px;align-items:start;}\r\n.lv-plan-index {width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:12px;border:1px solid var(--lv-line-strong);color:var(--lv-ink-mute);}\r\n.lv-plan-steps h3 {display:flex;align-items:center;gap:8px;font-size:14px;margin:2px 0 4px;}\r\n.lv-plan-steps p {margin:0;color:var(--lv-ink-dim);font-size:13px;}\r\n.lv-plan-voices {margin-top:10px;}\r\n.lv-plan-cost {margin:0;padding-top:14px;border-top:1px solid var(--lv-line);font-size:12px;color:var(--lv-ink-mute);}\r\n.lv-plan-note {margin:0;color:var(--lv-warn);font-size:13px;}\r\n.lv-ai-label {color:var(--lv-accent)!important;}\r\n.lv-voice-chip {display:inline-flex;gap:6px;align-items:center;font-size:12px;padding:5px 9px;border:1px solid var(--lv-line);border-radius:var(--lv-r-s);}\r\n.lv-skin-previews {display:flex;gap:12px;}\r\n.lv-ui .lv-skin-preview {width:110px;display:grid;gap:6px;justify-items:start;background:var(--lv-surface);color:var(--lv-ink);border-color:var(--lv-line-strong);}\r\n.lv-skin-preview span {font:var(--lv-title);}\r\n.lv-laivox-account {display:flex;flex-wrap:wrap;align-items:baseline;column-gap:12px;row-gap:4px;}\r\n.lv-laivox-account > small {overflow-wrap:anywhere;}\r\n.lv-laivox-account > small + small {white-space:nowrap;}\r\n.lv-laivox-account-id {display:block;overflow-wrap:anywhere;color:var(--lv-ink-mute);margin-bottom:6px;}\r\n.lv-laivox-embedded {display:grid;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid var(--lv-line);}\r\n.lv-laivox-fold h3 {display:flex;align-items:center;gap:6px;flex-wrap:wrap;}\r\n.lv-laivox-quota {\r\n display:grid;gap:6px;padding:12px;border:1px solid var(--lv-line);\r\n border-radius:var(--lv-r-m);background:var(--lv-surface-2);\r\n}\r\n.lv-laivox-quota > strong {color:var(--lv-ink);font-size:15px;line-height:1.5;}\r\n.lv-laivox-quota > strong[role=alert] {font-size:13px;}\r\n.lv-laivox-quota > .lv-inline {margin-top:3px;}\r\n.lv-laivox-narrator {display:grid;gap:5px;}\r\n.lv-laivox-voice-control {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;}\r\n.lv-laivox-voice-control > label {display:grid;gap:.35rem;min-width:0;}\r\n.lv-laivox-voice-control button {white-space:nowrap;}\r\n.lv-popover,.lv-tooltip {position:fixed;inset:auto;margin:0;padding:12px;border:1px solid var(--lv-line-strong);border-radius:var(--lv-r-m);background:var(--lv-elevated);color:var(--lv-ink);box-shadow:var(--lv-shadow);max-width:calc(100vw - 16px);overflow:auto;overscroll-behavior:contain;}\r\n.lv-popover .lv-menu {display:grid;gap:6px;max-height:min(450px,70vh);overflow:auto;min-width:120px;}\r\n.lv-menu a {color:var(--lv-ink);padding:8px;text-decoration:none;}\r\n.lv-tooltip {pointer-events:none;font-size:12px;padding:6px 10px;}\r\n.lv-tooltip-anchor {display:inline-flex;width:100%;height:100%;}\r\n@keyframes lv-fade-in {from {opacity:0;} to {opacity:1;}}\r\n\r\n/* Task sheet: compact rows, bulk actions in the \u22EF menu, finished jobs folded. */\r\n.lv-sheet .lv-queue { padding:0; overflow:visible; display:grid; gap:14px; }\r\n.lv-queue-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--lv-ink-mute); font-size:12px; }\r\n.lv-queue-scope { display:inline-flex; align-items:center; gap:8px; padding:3px 4px 3px 10px; border-radius:999px; background:var(--lv-surface-2); color:var(--lv-ink); }\r\n.lv-queue-note { margin:0; padding:8px 10px; border-radius:var(--lv-r-m); background:var(--lv-surface-2); color:var(--lv-warn); font-size:12px; }\r\n.lv-queue-group { display:grid; gap:2px; }\r\n.lv-queue-group h3, .lv-queue-group summary { font-size:12px; font-weight:600; color:var(--lv-ink-mute); margin:0 0 4px; letter-spacing:.04em; }\r\n.lv-queue-group h3 small, .lv-queue-group summary small { font-weight:400; margin-left:4px; }\r\n.lv-queue-finished summary { cursor:pointer; }\r\n.lv-queue-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:start; padding:10px 0; border-bottom:1px solid var(--lv-line); }\r\n.lv-queue-main { display:grid; gap:3px; min-width:0; }\r\n.lv-ui .lv-queue-title { text-align:left; font-weight:600; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; padding:0; }\r\n.lv-queue-title span { color:var(--lv-ink-mute); font-weight:400; }\r\n.lv-queue-actions { display:flex; gap:4px; }\r\n.lv-job-detail { color:var(--lv-ink-mute); font-size:12px; overflow-wrap:anywhere; }\r\n.lv-job-detail[data-error] { color:var(--lv-warn); }\r\n.lv-job-detail code { color:var(--lv-ink-mute); font-size:11px; }\r\n.lv-queue-row[data-state=completed] .lv-job-progress small, .lv-queue-row[data-state=cancelled] .lv-job-progress small { color:var(--lv-ink-mute); }\r\n";
|
|
18686
|
+
var sheets_default = "\r\n.lv-ui .lv-sheet {position:absolute;z-index:20;top:var(--lv-top-inset,52px);bottom:var(--lv-dock-inset,0px);right:0;width:min(400px,100%);display:flex;flex-direction:column;min-height:0;background:var(--lv-surface);border-left:1px solid var(--lv-line);box-shadow:var(--lv-shadow);animation:lv-sheet-in 180ms cubic-bezier(.2,.7,.2,1);outline:none;}\r\n.lv-sheet-head {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px 12px 24px;border-bottom:1px solid var(--lv-line);flex:none;}\r\n.lv-ui .lv-sheet-head h2 {font-size:16px;font-weight:600;line-height:1.4;letter-spacing:0;margin:0;}\r\n.lv-sheet-body {flex:1;min-height:0;overflow:auto;padding:20px 24px 28px;display:flex;flex-direction:column;gap:22px;}\r\n.lv-sheet .lv-card {border:0;border-bottom:1px solid var(--lv-line);border-radius:0;box-shadow:none;padding:18px 0;background:transparent;}\r\n.lv-ui .lv-sheet-plan {z-index:21;}\r\n.lv-ui .lv-sheet-suspended {visibility:hidden;pointer-events:none;z-index:19;}\r\n@container (max-width:759px) {.lv-ui .lv-sheet {width:100%;border-left:0;}}\r\n@keyframes lv-sheet-in {from {opacity:0;transform:translateX(16px);} to {opacity:1;transform:none;}}\r\n@media (prefers-reduced-motion:reduce) {.lv-ui .lv-sheet {animation:none;}}\r\n.lv-plan-sheet {display:grid;gap:20px;min-width:0;}\r\n.lv-plan-steps {list-style:none;margin:0;padding:0;display:grid;gap:18px;}\r\n.lv-plan-steps li {display:grid;grid-template-columns:24px minmax(0,1fr);gap:12px;align-items:start;}\r\n.lv-plan-index {width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:12px;border:1px solid var(--lv-line-strong);color:var(--lv-ink-mute);}\r\n.lv-plan-steps h3 {display:flex;align-items:center;gap:8px;font-size:14px;margin:2px 0 4px;}\r\n.lv-plan-steps p {margin:0;color:var(--lv-ink-dim);font-size:13px;}\r\n.lv-plan-voices {margin-top:10px;}\r\n.lv-plan-cost {margin:0;padding-top:14px;border-top:1px solid var(--lv-line);font-size:12px;color:var(--lv-ink-mute);}\r\n.lv-plan-note {margin:0;color:var(--lv-warn);font-size:13px;}\r\n.lv-ai-label {color:var(--lv-accent)!important;}\r\n.lv-voice-chip {display:inline-flex;gap:6px;align-items:center;font-size:12px;padding:5px 9px;border:1px solid var(--lv-line);border-radius:var(--lv-r-s);}\r\n.lv-skin-previews {display:flex;gap:12px;}\r\n.lv-ui .lv-skin-preview {width:110px;display:grid;gap:6px;justify-items:start;background:var(--lv-surface);color:var(--lv-ink);border-color:var(--lv-line-strong);}\r\n.lv-skin-preview span {font:var(--lv-title);}\r\n.lv-laivox-account {display:flex;flex-wrap:wrap;align-items:baseline;column-gap:12px;row-gap:4px;}\r\n.lv-laivox-account > small {overflow-wrap:anywhere;}\r\n.lv-laivox-account > small + small {white-space:nowrap;}\r\n.lv-laivox-account-id {display:block;overflow-wrap:anywhere;color:var(--lv-ink-mute);margin-bottom:6px;}\r\n.lv-laivox-embedded {display:grid;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid var(--lv-line);}\r\n.lv-laivox-fold h3 {display:flex;align-items:center;gap:6px;flex-wrap:wrap;}\r\n.lv-laivox-quota {\r\n display:grid;gap:6px;padding:12px;border:1px solid var(--lv-line);\r\n border-radius:var(--lv-r-m);background:var(--lv-surface-2);\r\n}\r\n.lv-laivox-quota > strong {color:var(--lv-ink);font-size:15px;line-height:1.5;}\r\n.lv-laivox-quota > strong[role=alert] {font-size:13px;}\r\n.lv-laivox-quota > .lv-inline {margin-top:3px;}\r\n.lv-laivox-narrator {display:grid;gap:5px;}\r\n.lv-laivox-voice-control {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;}\r\n.lv-laivox-voice-control > label {display:grid;gap:.35rem;min-width:0;}\r\n.lv-laivox-voice-control button {white-space:nowrap;}\r\n.lv-popover,.lv-tooltip {position:fixed;inset:auto;margin:0;padding:12px;border:1px solid var(--lv-line-strong);border-radius:var(--lv-r-m);background:var(--lv-elevated);color:var(--lv-ink);box-shadow:var(--lv-shadow);max-width:calc(100vw - 16px);overflow:auto;overscroll-behavior:contain;}\r\n.lv-popover .lv-menu {display:grid;gap:6px;max-height:min(450px,70vh);overflow:auto;min-width:120px;}\r\n.lv-menu a {color:var(--lv-ink);padding:8px;text-decoration:none;}\r\n.lv-tooltip {pointer-events:none;font-size:12px;padding:6px 10px;}\r\n.lv-tooltip-anchor {display:inline-flex;width:100%;height:100%;}\r\n@keyframes lv-fade-in {from {opacity:0;} to {opacity:1;}}\r\n\r\n/* Task sheet: compact rows, bulk actions in the \u22EF menu, finished jobs folded. */\r\n.lv-sheet .lv-queue { padding:0; overflow:visible; display:grid; gap:14px; }\r\n.lv-queue-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--lv-ink-mute); font-size:12px; }\r\n.lv-queue-scope { display:inline-flex; align-items:center; gap:8px; padding:3px 4px 3px 10px; border-radius:999px; background:var(--lv-surface-2); color:var(--lv-ink); }\r\n.lv-queue-note { margin:0; padding:8px 10px; border-radius:var(--lv-r-m); background:var(--lv-surface-2); color:var(--lv-warn); font-size:12px; }\r\n.lv-queue-group { display:grid; gap:2px; }\r\n.lv-queue-group h3, .lv-queue-group summary { font-size:12px; font-weight:600; color:var(--lv-ink-mute); margin:0 0 4px; letter-spacing:.04em; }\r\n.lv-queue-group h3 small, .lv-queue-group summary small { font-weight:400; margin-left:4px; }\r\n.lv-queue-finished summary { cursor:pointer; }\r\n.lv-queue-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:start; padding:10px 0; border-bottom:1px solid var(--lv-line); }\r\n.lv-queue-main { display:grid; gap:3px; min-width:0; }\r\n.lv-ui .lv-queue-title { text-align:left; font-weight:600; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; padding:0; }\r\n.lv-queue-title span { color:var(--lv-ink-mute); font-weight:400; }\r\n.lv-queue-actions { display:flex; gap:4px; }\r\n.lv-job-detail { color:var(--lv-ink-mute); font-size:12px; overflow-wrap:anywhere; }\r\n.lv-job-detail[data-error] { color:var(--lv-warn); }\r\n.lv-job-detail code { color:var(--lv-ink-mute); font-size:11px; }\r\n.lv-queue-row[data-state=completed] .lv-job-progress small, .lv-queue-row[data-state=cancelled] .lv-job-progress small { color:var(--lv-ink-mute); }\r\n.lv-laivox-qq-qr { display:inline-block; background:#fff; padding:8px; border-radius:8px; line-height:0; }\r\n.lv-laivox-qq-qr img { display:block; width:200px; max-width:min(200px, 100%); height:auto; }\r\n";
|
|
18540
18687
|
|
|
18541
18688
|
// src/client/styles/player.css
|
|
18542
18689
|
var player_default = "\r\n.lv-transport {flex:none;min-height:96px;padding:8px 24px 12px;border-top:1px solid var(--lv-line);background:var(--lv-surface);}\r\n.lv-transport-row {display:flex;align-items:center;gap:16px;margin-top:6px;min-height:44px;}\r\n.lv-transport-buttons {display:flex;align-items:center;gap:9px;}\r\n.lv-ui .lv-transport-buttons button {display:grid;place-items:center;padding:6px;min-height:32px;}\r\n.lv-ui .lv-transport-buttons .lv-play {width:44px;height:44px;border-radius:50%;background:var(--lv-play-bg);color:var(--lv-play-fg);border:0;}\r\n.lv-transport-caption {flex:1;min-width:0;display:grid;gap:3px;}\r\n.lv-transport-caption strong {font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}\r\n.lv-transport-caption small {font-size:11px;font-family:var(--lv-mono);}\r\n.lv-transport-caption .lv-download-status {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}\r\n.lv-transport-options {display:flex;gap:7px;align-items:center;}\r\n.lv-transport-options button {display:flex;align-items:center;gap:5px;}\r\n.lv-film-area {height:26px;position:relative;}\r\n.lv-film-area[data-stale=true] {opacity:.5;}\r\n.lv-film-scroll {overflow-x:auto;overflow-y:hidden;height:26px;scrollbar-width:none;}\r\n.lv-film-track {height:24px;position:relative;}\r\n.lv-film-progress {position:absolute;left:0;bottom:0;height:2px;background:var(--lv-accent);border-radius:1px;pointer-events:none;transition:width .25s linear;z-index:1;}\r\n.lv-film-position {position:absolute;top:0;height:22px;display:flex;align-items:center;}\r\n.lv-ui .lv-film-segment {width:100%;height:12px;cursor:pointer;min-height:0;padding:0;border:0;border-radius:2px;margin:auto 0;background:var(--lv-film-q);}\r\n.lv-film-segment[data-state=done] {background:var(--lv-film-done);}\r\n.lv-film-segment[data-state=cur] {height:20px;background:var(--lv-film-cur);}\r\n.lv-film-segment[data-state=gen] {background:var(--lv-film-gen);animation:lv-film-shimmer 1.2s infinite;}\r\n.lv-film-segment[data-state=err] {background:var(--lv-danger);}\r\n.lv-film-scroll:focus-visible .lv-film-segment[data-focus=true] {outline:2px solid var(--lv-accent);outline-offset:2px;}\r\n.lv-film-time {position:absolute;bottom:-3px;left:0;width:100%;height:4px;opacity:0;}\r\n.lv-timer-active {color:var(--lv-accent)!important;border-color:var(--lv-accent)!important;}\r\n.lv-narrow-control {display:none;}\r\n@container (max-width:559px) {.lv-transport {padding:8px 12px 12px;}.lv-transport-row {gap:10px;}.lv-wide-control {display:none;}.lv-transport-caption strong {max-width:120px;}.lv-transport-caption small {font-size:10px;}.lv-transport-buttons {gap:4px;}}\r\n@container (max-width:559px) {.lv-narrow-control {display:grid;gap:10px;}}\r\n@keyframes lv-film-shimmer {50% {opacity:.7;}}\r\n\r\n.lv-film-scroll {touch-action:pan-x;}\r\n.lv-film-time:focus-visible {opacity:1;height:8px;}\r\n\r\n@media (prefers-reduced-motion:reduce) {.lv-film-progress {transition:none;}}\r\n";
|