Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

perf(review): 减少大队列重复解析和候选传输

longmeidao86c43f818706
diff --git a/docs/REUSE.md b/docs/REUSE.md
index 9549a5b16..fa864654d 100644
--- a/docs/REUSE.md
+++ b/docs/REUSE.md
@@ -413,6 +413,8 @@ JAV 作品详情与馆藏视频共用 `IdentityCell` 的头像、标识和首字
## 复核队列
+复核快照在一次请求内复用人物、厂牌和系列的身份解析,下一份快照重新读取账本,别名合并后不会沿用旧身份。已批准及当前自动否决的候选在加载作品预览、头像和取景前移出显示集合;稍后和人工忽略仍各自保留。封面存在性复用 `/cover` 的文件及来源判定,不加载全库封面取景边车。接口只传结构化候选,不重复携带 CSV 的 `candidates_json`,批准仍从原候选文件核验。缓存按实际读取的资料、身份、复核和标签决定表失效,同一版本的并发请求复用一次计算;前端分组与分页计算随输入变化更新。复用标准库 `functools.cache`、现有聚合缓存和 React `useMemo`,无新增依赖或存量数据转换。
+
复核状态复用 `review_decision`、候选 CSV、TanStack Query 和 BoardUI `Tabs`。`/api/review` 的根段提供待处理,`queues.later` 与 `queues.ignored` 提供独立分类和计数;页面地址保存状态与分类。旧 `skipped` 直接投影为稍后处理,人工 `rejected` 投影为已忽略,自动判定不混入人工忽略。迁移 `0050` 只新增 `review_decision_history`,不重写旧决定。显式恢复先在同一事务保存原决定,再删除当前拒绝或跳过决定;已批准和不在当前候选中的资料不可恢复。只读镜像校验三个状态完整性,旧缓存缺状态时报告未取得。无新增依赖。
筛选浮窗复用首页的 `FilterGlassRows`、`useViewGlide` 和透明状态键。状态与分组、筛选按控件实际宽度自然排列,足宽同排并以首页同款竖线分组,放不下时换排并隐藏竖线;空分类保留状态入口,只读模式不提供全选或写入。分组下拉与全选保留原 Select、Button 样式。字号、状态键高度、玻璃材质和吸顶沿用同一维护源,不另设页签皮肤。
diff --git a/frontend/src/react/review/review-page.tsx b/frontend/src/react/review/review-page.tsx
index f82bdb1d4..811b8eb13 100644
--- a/frontend/src/react/review/review-page.tsx
+++ b/frontend/src/react/review/review-page.tsx
@@ -9,7 +9,7 @@
* - 分组、筛选、页码是组件状态。复核队列是消耗性的:判一条它就少一条,第 3 页指的是
* 哪二十行随每一次判定而变,写进地址栏分享出去只会指向另一批东西。换分类、换分组、
* 换筛选都回第 1 页,也正说明页码依附于此刻这一屏的看法,不是这一页的身份。 */
-import { useEffect, useRef, useState } from 'react';
+import { useEffect, useMemo, useRef, useState } from 'react';
import { useMutation, useQuery } from '@tanstack/react-query';
import { RiCheckboxCircleLine } from '@remixicon/react';
import { Tab, TabPanel, Tabs } from 'react-aria-components';
@@ -123,12 +123,13 @@ export function ReviewPage(props: ReviewProps) {
});
}, [queue]);
- const groupOptions = reviewGroupingOptions(queue, metadata);
+ const groupOptions = useMemo(() => reviewGroupingOptions(queue, metadata), [queue, metadata]);
const activeGroupBy: ReviewGrouping =
groupOptions.some(([key]) => key === groupBy) ? groupBy : 'candidates';
- const groups = groupReviewRows(queue, activeGroupBy);
+ const groups = useMemo(() => groupReviewRows(queue, activeGroupBy), [queue, activeGroupBy]);
const activeFilter = groups.some((group) => group.key === filter) ? filter : '';
- const win = reviewWindow(filterReviewRows(queue, activeGroupBy, activeFilter), page);
+ const win = useMemo(() => reviewWindow(filterReviewRows(queue, activeGroupBy, activeFilter), page),
+ [queue, activeGroupBy, activeFilter, page]);
const pageKeys = win.rows.map((row) => row.item_key);
const onPage = new Set(pageKeys);
/* 这一页上一张都没有的组不画分组条:条子底下空着,读起来像加载坏了。 */
@@ -137,7 +138,7 @@ export function ReviewPage(props: ReviewProps) {
.filter((group) => group.rows.length);
const choiceOf = (row: ReviewRow): RowChoice => choices.get(row.item_key) || defaultChoice(row);
- const selectedRows = queue.filter((row) => selected.has(row.item_key));
+ const selectedRows = useMemo(() => queue.filter((row) => selected.has(row.item_key)), [queue, selected]);
const forget = (keys: string[]) => {
const gone = new Set(keys);
diff --git a/frontend/src/react/review/review.ts b/frontend/src/react/review/review.ts
index 6e37a6881..5f155e6c9 100644
--- a/frontend/src/react/review/review.ts
+++ b/frontend/src/react/review/review.ts
@@ -1,8 +1,8 @@
/* 人工复核页的数据契约、分组分页纯函数与写操作。三条端点在 `frontend/src` 里都只在这里
* 声明一次(`tests/test_frontend_build.py` 盯着)。
*
- * `['review']` 是整条复核队列。接口一次给出全部分类(实测 4.6 MB、1300 行,本机读
- * 0.1 秒),九个分类合在一个响应里,所以也只用一个 `queryKey`:分类切换是翻这一份的
+ * `['review']` 是整条复核队列。接口一次给出全部分类的可复核行,不重复传候选 CSV 的
+ * JSON 字符串;各分类合在一个响应里,所以也只用一个 `queryKey`:分类切换是翻这一份的
* 不同段落,不是另一份真相。判定写回来时只把那几行从缓存里摘掉(`dropReviewRows`),
* 不为一次判定把整条队列重取一遍。
*
diff --git a/src/peach/code_creators.py b/src/peach/code_creators.py
index 802e59628..4523e84be 100644
--- a/src/peach/code_creators.py
+++ b/src/peach/code_creators.py
@@ -74,6 +74,9 @@ def embedded_code(name: str, assets: list) -> str:
解析得出,两头对上才算数;`is_jav_code` 把目录名冒充的番号挡在外面。
"""
compact = compact_label(name)
+ # 番号包含数字;无数字的目录名不可能包含任何候选番号。
+ if not any(char.isdigit() for char in compact):
+ return ""
for row in assets:
code = (str(row["code"] or "").strip()
or code_from_filename(str(row["name"] or "")) or "")
diff --git a/src/peach/web_review.py b/src/peach/web_review.py
index 72bda30f3..0c263e3d1 100644
--- a/src/peach/web_review.py
+++ b/src/peach/web_review.py
@@ -12,6 +12,7 @@ from __future__ import annotations
import hashlib
import json
import time
+from functools import cache, partial
from pathlib import Path, PurePosixPath
from typing import Protocol
from urllib.parse import quote
@@ -42,7 +43,6 @@ from .metadata_auto_apply import (
_offers_another_stage_name,
_only_mib_official,
_parsed_candidates,
- _performer_identity_keys,
_row_candidates,
_split_multi,
genres_still_pending,
@@ -64,7 +64,7 @@ class ReviewContract(Protocol):
def cache_bust(self) -> None: ...
def read_connection(self): ...
- def has_cover(self, code: str) -> bool: ...
+ def cover_path(self, code: str) -> Path | None: ...
def has_entity_image(self, kind: str, entity_id) -> bool: ...
def entity_image_version(self, kind: str, entity_id) -> str: ...
def write_transaction(self): ...
@@ -322,13 +322,14 @@ def _metadata_queue_rows(connection, rows: list[dict],
# 的行照旧留着,它讲的是另一件事(这个番号问过、谁都没给值)。
rows = [row for row in rows if row["candidates"] or not _parsed_candidates(row)]
refresh_current_values(connection, rows)
+ identity_key = cache(partial(_entity_identity_key, connection))
# 和账本已有的值比一遍,只把真差异留在队列里。实测 43 条候选里 24 条
# 没有任何新信息:17 条与当前值逐字相同、7 条标签只是顺序不同。
# 例外是标签部分落库(ADR-0038)留下的行:认得出的标签已经写进账本,所以
# 它对账本「没有新信息」,可留在页面上要判的本来也不是标签,是那几个谁都
# 不认的词。按新信息剔掉它,那几个词就再没有出现的地方了。
rows = [row for row in rows
- if _metadata_row_adds_information(connection, row)
+ if _metadata_row_adds_information(connection, row, identity_key=identity_key)
or genres_still_pending(genre_decisions, decisions.get(row["item_key"], {}))]
# 韩国 MIB 的番号不适用 JAV 规则,`metadata_routes` 给它的链是空的。但候选件是
# 历史产物,闸门只管以后不再生成,管不了已经落盘的那些:2026-09-04 实测队列里
@@ -345,6 +346,8 @@ def _metadata_queue_rows(connection, rows: list[dict],
def _review_rows(contract: ReviewContract, category: str, *, queue: str | None = 'pending') -> tuple[list[dict], str | None, int]:
+ # 复核卡片只需知道 /cover 能否取图,不加载全库的裁剪和人脸 sidecar。
+ has_cover = cache(lambda code: contract.cover_path(code) is not None)
#: 用户对来源 genre 的决定。判「这一行还有没有词等着收录」要用它,而那一步在库
#: 连接关掉之后才跑,所以先取出来。
genre_decisions: dict[str, str | None] = {}
@@ -356,6 +359,19 @@ def _review_rows(contract: ReviewContract, category: str, *, queue: str | None =
(category,),
)
}
+ if category == "metadata_fields":
+ rows, genre_decisions = _metadata_queue_rows(connection, rows, decisions)
+ for position, row in enumerate(rows):
+ row['queue_order'] = position
+ decision = decisions.get(row["item_key"], {})
+ if category == "studio_logos" and row.get("content_state") == "changed":
+ # 同一厂牌的新图片仍需确认,不沿用旧图片的批准。
+ decision = {}
+ if category == "metadata_fields":
+ decision = _metadata_decision_in_force(decision, row, genre_decisions)
+ row["decision"] = decision.get("status", "pending")
+ row["decision_note"] = decision.get("note", "")
+ rows = _select_review_queue(rows, queue)
if category in {"creator_tags", "western_identity"}:
names = [str(row.get("creator") or "").strip() for row in rows]
previews = _creator_previews(connection, names, include_unpictured=category == "western_identity")
@@ -366,24 +382,13 @@ def _review_rows(contract: ReviewContract, category: str, *, queue: str | None =
name = str(row.get("creator") or "").strip()
row["preview_assets"] = previews.get(name, [])
row["entity_id"] = entities.get(name, row.get("entity_id", ""))
- elif category == "metadata_fields":
- rows, genre_decisions = _metadata_queue_rows(connection, rows, decisions)
elif category == "performer_avatars":
# 候选 CSV 里的 `current_name` 是抓取来源给的罗马音;账本早就有更好的
# 规范名(`Alice Shaku` 的规范名是 `释爱丽丝`),罗马音本身也已经登记
# 为别名。复核页该显示账本认的那个名字,来源写法降为副标题。
_use_canonical_entity_names(connection, rows)
_attach_review_asset_context(connection, rows)
- for position, row in enumerate(rows):
- row['queue_order'] = position
- decision = decisions.get(row["item_key"], {})
- if category == "studio_logos" and row.get("content_state") == "changed":
- # 同一厂牌上游头像变化是新的事实;旧批次 approved 不得把变化静默藏掉。
- decision = {}
- if category == "metadata_fields":
- decision = _metadata_decision_in_force(decision, row, genre_decisions)
- row["decision"] = decision.get("status", "pending")
- row["decision_note"] = decision.get("note", "")
+ for row in rows:
row["preview_url"] = (row.get("resolved_url") or row.get("source_url")
or row.get("avatar_url") or row.get("portrait_url") or "")
if category == "video_endcards":
@@ -399,7 +404,7 @@ def _review_rows(contract: ReviewContract, category: str, *, queue: str | None =
row["preview_url"] = f"/cover?code={quote(str(row.get('code') or ''))}"
asset_code = str(row.get("asset_code") or row.get("code") or "")
if row.get("asset_id"):
- if asset_code and contract.has_cover(asset_code):
+ if asset_code and has_cover(asset_code):
row["asset_preview_url"] = f"/cover?code={quote(asset_code)}"
elif row.get("asset_has_snapshot"):
row["asset_preview_url"] = f"/poster?id={row['asset_id']}&c=4"
@@ -407,7 +412,7 @@ def _review_rows(contract: ReviewContract, category: str, *, queue: str | None =
row["asset_preview_url"] = ""
for comparison in row.get("comparison_assets") or []:
comparison_code = str(comparison.get("code") or "")
- if comparison_code and contract.has_cover(comparison_code):
+ if comparison_code and has_cover(comparison_code):
comparison["preview_url"] = f"/cover?code={quote(comparison_code)}"
elif comparison.get("snapshot_path"):
comparison["preview_url"] = f"/poster?id={comparison['id']}&c=4"
@@ -427,7 +432,7 @@ def _review_rows(contract: ReviewContract, category: str, *, queue: str | None =
#: 取景与索引页、资料页同一份 sidecar、同一个换算。这张脸是复核时认人的
#: 唯一线索,几何居中把脑袋裁掉就等于没有这一格。
row["avatar_focus"] = contract.avatar_focus(face_kind, row.get("entity_id"))
- return _select_review_queue(rows, queue), source, skipped
+ return rows, source, skipped
#: 元数据里的多值字段用顿号分隔;比较时按集合而不是按字符串。
@@ -438,7 +443,7 @@ MULTI_VALUE_FIELDS = {"performers", "tags"}
ENTITY_BACKED_FIELDS = {"studio", "series"}
-def _metadata_row_adds_information(connection, row: dict) -> bool:
+def _metadata_row_adds_information(connection, row: dict, *, identity_key=None) -> bool:
"""这一行候选相对账本现值有没有新东西;没有就不该占复核队列。
复核的成本是人的注意力:把「和现在一模一样」的行混在里面,真正要判的那些
@@ -449,6 +454,12 @@ def _metadata_row_adds_information(connection, row: dict) -> bool:
return True # 补空值总是有信息,例如发行日期
field = str(row.get("field") or "").strip()
candidates = row.get("candidates") or []
+ identity_key = identity_key or partial(_entity_identity_key, connection)
+
+ def performer_keys(value):
+ return frozenset(key for name in _split_multi(value)
+ for key in identity_key('performer', name))
+
if not candidates:
return False
if field in MULTI_VALUE_FIELDS:
@@ -457,11 +468,9 @@ def _metadata_row_adds_information(connection, row: dict) -> bool:
# libredmm 与 mgstage 给的是 `桜井奈々 28歳 某企業広報担当` 和
# `佐倉井さん 28歳 某企業広報担当`——那是这部片给她起的称呼,不是她本人的
# 艺名。两者不在同一层,不构成分歧(用户 2026-09-16 定「取主艺名」)。
- current_key = _performer_identity_keys(connection, _split_multi(current))
+ current_key = performer_keys(current)
return any(
- _performer_identity_keys(
- connection, _split_multi(str(c.get("display_value") or ""))
- ) != current_key
+ performer_keys(str(c.get("display_value") or "")) != current_key
for c in candidates
if _offers_another_stage_name(c)
)
@@ -474,11 +483,9 @@ def _metadata_row_adds_information(connection, row: dict) -> bool:
# 同一家厂牌在三处各有写法:账本存规范名 `Prestige`,javbus 给日文名
# `プレステージプレミアム(PRESTIGEPREMIUM)`,libredmm 给日英并写的那一串。
# 三者都指向同一条实体,按字符串比就成了要人判的「冲突」。
- current_key = _entity_identity_key(connection, field, current)
+ current_key = identity_key(field, current)
return any(
- _entity_identity_key(
- connection, field, str(c.get("display_value") or "").strip()
- ) != current_key
+ identity_key(field, str(c.get("display_value") or "").strip()) != current_key
for c in candidates
)
return any(str(c.get("display_value") or "").strip() != current for c in candidates)
@@ -619,7 +626,8 @@ def _review_queue(row: dict) -> str | None:
def _select_review_queue(rows: list[dict], queue: str | None) -> list[dict]:
- return [row for row in rows if queue is None or _review_queue(row) == queue]
+ return [row for row in rows if (state := _review_queue(row)) is not None
+ and (queue is None or state == queue)]
def _review_evidence(category: str, row: dict) -> str:
@@ -681,6 +689,9 @@ def q_review(contract: ReviewContract):
sources, skipped = {}, {}
for category in REVIEW_CATEGORIES:
rows, source, dropped = _review_rows(contract, category, queue=None)
+ for row in rows:
+ # 页面使用折叠后的 candidates;CSV 原文留在磁盘,批准仍从原文件核验。
+ row.pop('candidates_json', None)
for key, sections in groups.items():
sections[category] = _select_review_queue(rows, key)
sources[category] = source
diff --git a/src/peach/web_router.py b/src/peach/web_router.py
index f34209ac9..17d7a8f42 100644
--- a/src/peach/web_router.py
+++ b/src/peach/web_router.py
@@ -270,7 +270,9 @@ def _get_review(contract, args):
payload = contract.cached_until_changed(
"review", lambda: q_review(contract),
candidate_root_version(contract.candidate_root),
- path_version(contract.cover_root), path_version(contract.avatar_root))
+ path_version(contract.cover_root), path_version(contract.avatar_root),
+ tables=("asset", "asset_entity", "entity", "entity_alias", "entity_redirect",
+ "review_decision", "genre_decision"))
# 数据管理页只要一个待复核条数。完整 payload 带着每条候选的全文,实测是
# 兆级;卡片上的一个数字不值这趟传输,但计数本身仍来自同一份缓存快照,
# 不另立一套口径。
diff --git a/tests/test_code_creators.py b/tests/test_code_creators.py
index 1d24949ae..e095eb88c 100644
--- a/tests/test_code_creators.py
+++ b/tests/test_code_creators.py
@@ -4,6 +4,7 @@ import sqlite3
import sys
import tempfile
import unittest
+from unittest import mock
from pathlib import Path
@@ -55,6 +56,13 @@ CREATE TABLE asset_entity(
class CodeShapeTests(unittest.TestCase):
+ def test_digitless_creator_names_do_not_parse_their_files_as_embedded_codes(self):
+ from peach import code_creators
+ assets = [{'path': f'/media/{index}.mp4', 'name': f'ABP-{index:03d}.mp4', 'code': ''}
+ for index in range(1000)]
+ with mock.patch.object(code_creators, 'code_from_filename', side_effect=AssertionError('无需解析影片名')):
+ self.assertEqual(code_creators.classify('Example Creator', assets)[0], audit.VERDICT_KEEP)
+
def test_quality_prefix_is_not_part_of_the_code(self):
# 这批目录名正是本次要修的:HD 是画质,不是番号的一部分。
self.assertEqual(audit.canonical_code("HD-abp-758"), "ABP-758")
diff --git a/tests/test_web_review.py b/tests/test_web_review.py
index 75d43d62d..fa46bff07 100644
--- a/tests/test_web_review.py
+++ b/tests/test_web_review.py
@@ -92,6 +92,61 @@ class ReviewQueueTests(unittest.TestCase):
def tearDown(self):
self.tmp.cleanup()
+ def test_large_metadata_queue_reuses_identity_lookups_only_within_one_snapshot(self):
+ self.write_metadata_rows([
+ {'item_key': f'EXM-{index:03d}:studio', 'code': f'EXM-{index:03d}',
+ 'field': 'studio', 'current': 'Example Studio',
+ 'candidates': ['Example Alias']}
+ for index in range(100)
+ ])
+ with mock.patch.object(rm_review, '_entity_identity_key', wraps=rm_review._entity_identity_key) as identity:
+ rows, _, _ = rm_review._review_rows(self.contract, 'metadata_fields')
+ self.assertEqual(len(rows), 100)
+ self.assertEqual(identity.call_count, 2)
+ with self.contract.write_transaction() as connection:
+ connection.execute("INSERT INTO entity(id,kind,canonical_name,normalized_name,created_at,updated_at) "
+ "VALUES(900,'studio','Example Studio','example studio','now','now')")
+ connection.execute("INSERT INTO entity_alias(entity_id,alias,normalized_alias,source,confidence) "
+ "VALUES(900,'Example Alias','example alias','manual',1)")
+ self.assertEqual(self.queue_keys('metadata_fields'), [])
+
+ def test_settled_creator_rows_do_not_load_asset_previews(self):
+ self.write_candidates('creator-tags-candidate-20260818.csv', [
+ {'board': str(index), 'creator': 'ukiru', 'tags': 'x', 'status': 'candidate'}
+ for index in range(100)
+ ])
+ with self.contract.write_transaction() as connection:
+ connection.executemany("INSERT INTO review_decision(category,item_key,status,reviewer,note,updated_at) "
+ "VALUES('creator_tags',?,'approved','本人','','now')",
+ [(str(index),) for index in range(99)])
+ with mock.patch.object(rm_review, '_creator_previews', wraps=rm_review._creator_previews) as previews:
+ rows, _, _ = rm_review._review_rows(self.contract, 'creator_tags', queue=None)
+ self.assertEqual([row['item_key'] for row in rows], ['99'])
+ self.assertEqual(previews.call_args.args[1], ['ukiru'])
+
+ def test_review_response_carries_structured_candidates_without_duplicate_csv_json(self):
+ self.write_metadata_rows([{'item_key': 'EXM-001:title', 'code': 'EXM-001',
+ 'field': 'title', 'current': '', 'candidates': ['新标题']}])
+ row = rm_review.q_review(self.contract)['sections']['metadata_fields'][0]
+ self.assertNotIn('candidates_json', row)
+ self.assertEqual(row['candidates'][0]['display_value'], '新标题')
+ self.assertTrue(row['candidates'][0]['candidate_key'])
+ self.assertIn('candidates_json', rm_candidates.read_candidates('metadata_fields', self.candidates)[0][0])
+
+ def test_review_cover_presence_uses_the_served_file_without_loading_crop_indexes(self):
+ self._asset(400, 'EXM-001', 'EXM-001.mp4')
+ self.contract.cover_root = Path(self.tmp.name) / 'covers'
+ self.contract.cover_root.mkdir()
+ cover = self.contract.cover_root / 'EXM-001.jpg'
+ cover.write_bytes(b'cached image')
+ self.write_metadata_rows([{'item_key': 'EXM-001:title', 'code': 'EXM-001',
+ 'field': 'title', 'current': '', 'candidates': ['新标题']}])
+ with mock.patch.object(self.contract, 'cover_index', side_effect=AssertionError('无需全库取景')):
+ row = self.queue_row('metadata_fields', 'EXM-001:title')
+ self.assertEqual(row['asset_preview_url'], '/cover?code=EXM-001')
+ cover.with_suffix('.scraping.json').write_text(json.dumps({'source': 'javdb'}), encoding='utf-8')
+ self.assertEqual(self.queue_row('metadata_fields', 'EXM-001:title')['asset_preview_url'], '')
+
def write_candidates(self, name, rows):
path = self.candidates / name
with path.open("w", encoding="utf-8-sig", newline="") as handle:
diff --git a/web/dist/peach-app.js b/web/dist/peach-app.js
index e281a6da9..38779dad5 100644
--- a/web/dist/peach-app.js
+++ b/web/dist/peach-app.js
@@ -2,7 +2,7 @@
(function() {
try {
var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new e.Error().stack;
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "2d100ff6-b8f4-4009-901a-13203bdae48a", e._sentryDebugIdIdentifier = "sentry-dbid-2d100ff6-b8f4-4009-901a-13203bdae48a");
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7e65252d-bf3d-4f82-a9d3-378bcce5fbae", e._sentryDebugIdIdentifier = "sentry-dbid-7e65252d-bf3d-4f82-a9d3-378bcce5fbae");
} catch {}
})();
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, n) => {
@@ -75199,7 +75199,7 @@ async function v6(e, t) {
if (r.status === "rejected") throw r.reason;
if (n.status === "rejected") throw n.reason;
}
-var y6 = _6(() => import("./peach-app.jav-page-C5uPjDXP.js")), b6 = _6(() => import("./peach-app.stats-page-BD7bt_Ub.js")), x6 = _6(() => import("./peach-app.taste-page-TP-o8aAE.js")), S6 = _6(() => import("./peach-app.review-page-DVlRO-7_.js")), C6 = _6(() => import("./peach-app.data-cleanup-page-Ctwipl6H.js")), w6 = _6(() => import("./peach-app.duplicates-page-Bau8HIlx.js")), T6 = _6(() => import("./peach-app.quality-goals-page-DwyqtX3v.js")), E6 = _6(() => import("./peach-app.scraping-page-Ddbx11Bn.js")), D6 = _6(async () => {
+var y6 = _6(() => import("./peach-app.jav-page-C5uPjDXP.js")), b6 = _6(() => import("./peach-app.stats-page-BD7bt_Ub.js")), x6 = _6(() => import("./peach-app.taste-page-TP-o8aAE.js")), S6 = _6(() => import("./peach-app.review-page-a6sBqHAC.js")), C6 = _6(() => import("./peach-app.data-cleanup-page-Ctwipl6H.js")), w6 = _6(() => import("./peach-app.duplicates-page-Bau8HIlx.js")), T6 = _6(() => import("./peach-app.quality-goals-page-DwyqtX3v.js")), E6 = _6(() => import("./peach-app.scraping-page-Ddbx11Bn.js")), D6 = _6(async () => {
let [{ ConfigurationPage: e }, { DiagnosticsPage: t }] = await Promise.all([import("./peach-app.configuration-page-Bji43uG_.js"), import("./peach-app.diagnostics-page-CZQmu5mE.js")]);
return {
ConfigurationPage: e,
@@ -80420,4 +80420,4 @@ if (!$9) throw Error("主界面宿主缺失");
sFe($9);
export { MI as $2ec61d1d4f780267$export$a8a3e93435678ff9, BI as $3a442827418ebe87$export$eb2fcfdbd7ba97d4, rR as $542a13ca2fa5b484$export$5b6b19405a83ff9d, lT as $72abaeab4d80592f$export$78efe591171d7d45, YR as $76d00c5a4edb230a$export$76ccd210b9029917, KR as $76d00c5a4edb230a$export$816b5d811295e6bc, QR as $76d00c5a4edb230a$export$b59bdbef9ce70de2, ez as $76d00c5a4edb230a$export$f6f0c3fe4ec306ea, GR as $76d00c5a4edb230a$export$f850895b287ef28e, _fe as $b4f18e3395fe64d7$export$3d96ec278d3efce4, gfe as $b4f18e3395fe64d7$export$3e41faf802a29e71, pfe as $b4f18e3395fe64d7$export$b2539bed5023c21c, iz as $b4f18e3395fe64d7$export$e51a686c67fdaa2d, bfe as $bd263d78e9bf3c56$export$f5c9f3c2c4054eec, XC as $ea3928288112382f$export$439d29a4e110a164, gR as $f2ff30fde7b014be$export$3ddf2d174ce01153, CR as $fe21c36db05242bb$export$a98f0dcb43a68a25, wR as $fe21c36db05242bb$export$d7b12c4107be0d61, npe as $l, Hk as ACCENTS, VTe as AMANE_BRIDGE_CHECK_URL, X$ as AMANE_BRIDGE_KEY, HTe as AMANE_BRIDGE_REBUILD_URL, Hn as ApiError, MW as ArtSlot, q as Button, uI as ButtonLink, dpe as Bx, Qt as CLOUD_LOCATIONS, X1 as CLOUD_PROXY_HELP, Dr as COLUMN_SORT, c1 as CONFIGURATION_KEY, qY as CONFIGURATION_URL, UTe as COOKIE_TEXT_LIMIT, Y$ as COVER_JOB_KEY, Ai as CREDENTIAL_STATE, G$ as CUSTOM_SOURCES_KEY, W$ as CUSTOM_SOURCES_URL, iV as Checkbox, rV as CheckboxGlyph, JB as ChevronSortDown, sZ as Chip, q2 as CloudDownloadDialog, qH as CollapseChevron, KH as CollapseRegion, f$ as CollectionSummary, bbe as DEFAULT_CATEGORY, Kn as DEFAULT_SORT, jQ as DIAGNOSTICS_KEY, yxe as DIRECTORY_TEMPLATE_ERROR, j0 as DISCOVERY_SORTS, V2 as DOWNLOADS_KEY, B2 as DOWNLOADS_URL, pY as DUPLICATES_KEY, JJ as DataTableFooter, WJ as DataTableFrame, qJ as DataTableSort, $H as Disclosure, QOe as DownloadsPanel, qfe as E3, xbe as ENTITY_REVIEW_KINDS, J1 as ENTRY_LINKS_HELP, Y1 as ENTRY_LINKS_HINT, ape as Ea, Spe as EmptyFocusButton, Iz as EmptyState, ZH as ErrorText, ige as ExternalLink, Sr as FEEDS_KEY, tX as FEED_SCHEDULE_KEY, ZAe as FLOW_LABEL_X, R3 as FLOW_VIEWBOX, br as FOLLOW_CHECK_KEY, yr as FOLLOW_CREDENTIALS_KEY, N8 as FOLLOW_INITIAL_RANGE_OPTIONS, vr as FOLLOW_MANAGE_KEY, FZ as FOLLOW_MANAGE_NAV, xr as FOLLOW_RESOLVE_KEY, eX as FOLLOW_SCHEDULE_KEY, oge as Fact, age as FactList, QH as FieldLabel, L$ as Fieldset, I$ as FieldsetTitle, mue as FilterGlass, rI as FilterGlassRows, nI as FilterIconButton, iI as FilterPill, rge as Footer, bz as Gg, aI as GlassPill, XH as Help, Dz as HintText, UAe as IDLE_POLL_MS, lbe as IDLE_REPAIR, QF as IconButton, Mz as Input, jz as InputBase, oA as JAV_LAYOUTS, N0 as JAV_RECOMMENDATION_GRID, wX as JUNK_KEY, Z3 as JavHeader, rbe as KEEP_LABELS, wr as LAYOUTS, q1 as LIBRARY_FOLDER_HELP, dH as LIBRARY_PROCESSING_KEY, zY as LINKS_KEY, BY as LINK_CHECK_KEY, Gbe as LINK_KINDS, VY as LINK_PRUNE_KEY, Ln as LOC, Ez as Label, B$ as LibraryProcessingCard, $z as LibraryShortcuts, DH as LinkButton, VH as LoadingDots, Yfe as M6, Xbe as MEDIA_PROCESSING_KEY, rX as MEDIA_PROCESSING_URL, vY as MEDIA_REPAIR_KEY, _Y as MEDIA_REPAIR_URL, er as MEDIA_SOURCES_KEY, Zo as MEDIA_SOURCE_ICONS, Xt as MEDIA_SOURCE_OPTIONS, QB as MENU_ITEM, $B as MENU_ITEM_INTERACTIVE, ZB as MENU_POPOVER_SURFACE, jH as MenuDialog, OG as MixCard, Nz as ModalFrame, Qv as MotionConfigContext, Tz as NR, Fz as Note, vpe as OA, oX as ORGANIZE_KEY, lX as ORPHAN_RECORDS_KEY, yz as OV, fz as P7, rTe as PHASES, JY as PICK_FOLDER_URL, H$ as PLAYLISTS_KEY, UEe as POLICY_COLUMNS, GEe as POLICY_COVER_NOTE, WEe as POLICY_MATRIX, K1 as POLICY_SUMMARY, KJ as Pagination, z$ as PathLine, kF as PillTabList, UH as Progress, CY as QUALITY_GOALS_KEY, A$ as REPAIR_CARD_TEXT, yY as REPAIR_LIBRARIES_KEY, mX as RESOURCE_APPLY_KEY, pX as RESOURCE_SCAN_KEY, gTe as RESULT_PANEL, _Te as RESULT_SECTION, ybe as REVIEW_CATEGORIES, CX as REVIEW_COUNTS_KEY, Sbe as REVIEW_DECISION_LABELS, EY as REVIEW_KEY, DY as REVIEW_LABELS, kY as REVIEW_QUEUES, AY as REVIEW_QUEUE_LABELS, jW as RetryNote, _pe as Rf, ege as Rows, zTe as SCRAPING_CHECK_URL, q$ as SCRAPING_COVER_URL, J$ as SCRAPING_KEY, RTe as SCRAPING_SETTINGS_URL, IU as SEGMENT, FU as SEGMENTED_TRACK, $Y as SETTINGS_KEY, YY as SETTINGS_URL, qn as SORT_DEFAULT_DIR, Gn as SORT_OPTIONS, $t as SOURCE_LABELS, l3 as STATS_KEY, $he as Section, nge as SectionSkeleton, PU as SegmentedRadioGroup, Xge as SegmentedTabList, lW as Segments, GJ as Select, DU as Select$1, f1 as SelectField, OU as SelectItem, tY as SelectionActions, bk as SelectionDock, nY as SelectionPopover, JH as SettingsCard, Qhe as SettingsRow, YH as SettingsSectionLabel, uge as SiteLabel, VU as SortDirectionIcon, fW as SortKeys, mQ as SourceAvatar, rU as SourceLabel, eU as SourceMark, tge as Stack, R$ as StatusLabel, P2 as Switch, RF as TASKS_KEY, MAe as TASTE_REFRESH_KEY, NAe as TASTE_WINDOWS, nX as THUMBNAIL_JOBS_KEY, EX as TRASH_KEY, Jle as TRIGGER_LABELS, FJ as Table, rY as TableColumnControls, iY as TableColumnResizer, oY as TableSelectionHeader, t$ as TagManager, WH as TaskProgress, kz as TextField, Oz as TextFieldContext, vz as Un, g$ as WANTS_KEY, r4 as WantMagnets, hp as WithPromise, pz as Wt, _z as Xc, wz as Xf, Zfe as Xt, Jfe as _8, o as __commonJSMin, s as __exportAll, l as __toESM, gpe as aB, si as addAlias, oi as addSource, v$ as addWant, B as apiGet, V as apiSend, eA as appSettingsStore, Rxe as applyConfirmText, SX as applyLeftovers, Lxe as applyPlanText, Bxe as applyText, iA as applyTheme, Xg as asNumber, Exe as attachOrphan, Ur as authorAvatar, Gr as authorGroups, Hr as authorInitial, Vr as authorName, Cq as autoResetPageIndex, Za as avatarInner, h3 as bandRows, bxe as baseName, cbe as batchOperate, Tk as boundedPreference, abe as bulkCloudPreferences, Bz as busyProps, hpe as cB, cke as cachedMagnetStates, ap as calcGeneratorVelocity, kbe as canApprove, kf as cancelFrame, jxe as candidateText, BH as cardClass, yA as cardRatio, gz as cc, Ei as checkEvidenceGap, Ti as checkFailures, gi as checkFeeds, Ybe as checkLine, Ci as checkReceipt, wi as checkSummary, GTe as checkText, Di as checkedText, eG as clickedBlank, Zye as cloudLocations, D0 as cloudProxySkeleton, vx as clsx, cpe as cn, ph as collectMotionValues, Uq as columnVisibilityFeature, AJ as column_getCanSort, EJ as column_getSortFn, Dbe as commonReviewSources, cV as configurationSection, LAe as configureTasteBrowser, Vc as confirmModal, aq as copyInstancePropertiesWithoutMemos, Wa as coverUrl, Pq as createColumnHelper, MTe as createPlaylist, ji as credentialDone, C0 as credentialsSkeleton, Rbe as currentReviewRow, EF as cx, Sz as dZ, Fbe as decisionPayload, Ibe as decisionReceipt, Pbe as defaultChoice, PTe as deletePlaylist, x as diagnosticHeaders, G1 as diagnosticsSkeleton, dTe as discoveryArtwork, C$ as discoveryKey, hDe as discoveryScore, tbe as distinctName, xi as dropSources, mpe as du, obe as duplicateVictims, GF as elapsedText, Xa as entityFaceImg, hn as entityPath, Ir as errorHeadline, Wn as errorMessage, z as esc, Sq as expandRowModel, lz as f1, Fr as feedIntervalText, $$ as fetchAmaneBridge, $r as fetchCheckJob, l1 as fetchConfiguration, Q$ as fetchCoverJob, Qr as fetchCredentials, K$ as fetchCustomSources, MQ as fetchDiagnostics, w$ as fetchDiscoveries, hY as fetchDuplicates, Ule as fetchEarlier, $be as fetchFeedSchedule, pi as fetchFeeds, Zr as fetchFollow, Qbe as fetchFollowSchedule, OX as fetchJunkSummary, WY as fetchLinkCheck, GY as fetchLinkPrune, UY as fetchLinkStats, Zbe as fetchMediaProcessing, bY as fetchMediaRepair, tr as fetchMediaSources, sX as fetchOrganize, fxe as fetchOrganizeExample, uX as fetchOrphanRecords, fi as fetchPending, U$ as fetchPlaylists, wY as fetchQualityGoals, xY as fetchRepairLibraries, ei as fetchResolveJob, gX as fetchResourceApply, hX as fetchResourceScan, IY as fetchReview, DX as fetchReviewCounts, iX as fetchSettings, Z$ as fetchSources, u3 as fetchStats, ti as fetchSuggestions, BF as fetchTasks, F3 as fetchTaste, RAe as fetchTasteJob, exe as fetchThumbnailJobs, kX as fetchTrashSummary, _$ as fetchWants, Tbe as filterReviewRows, Fn as firstGrapheme, IK as flexRender, $Ae as flowGraph, eje as flowLabel, Qke as fmtCount, kn as fmtDur, jn as fmtSize, rue as foldRoutine, vi as followFeedByName, Cr as followSuggestKey, aue as followupDetail, Of as frame, Rfe as g4, Kq as getDefaultPaginationState, vA as gridLayout, Wr as groupByAuthor, nue as groupFollowups, NY as groupReviewRows, Fxe as hasChanges, _X as hasResourceRoots, HF as hasResultProblems, WAe as historySpan, uz as i2, HAe as importTasteExport, w0 as indexersSkeleton, Zf as interpolate, b$ as invalidateWants, WF as isActive, Pr as isBroken, Or as isLayout, Rh as isMotionValue, OY as isReviewCategory, iue as isRoutine, T0 as javBrowserSkeleton, F0 as javContentSkeleton, dA as javLayout, P0 as javTagSkeleton, Gxe as junkBreakdown, FTe as keepPlaylist, ke as keepPreviousData, Jr as keepSelected, d3 as known, Hfe as l7, tue as latestOfKind, uAe as lengthRows, ir as localTime, _i as lookupFeedActor, Gfe as m7, xz as mM, cn as mapLimit, di as markItem, g3 as max, cAe as mediumRows, Wle as mergeFinished, _3 as min, Ube as mirrorText, fbe as missingToolText, gY as mixedCloudPreferences, YF as momentText, By as motion, hh as motionValue, Sxe as organizeOutcome, X0 as overlayHost, kr as pageSizeOf, qr as pageWindow, Xn as paginationRange, bi as patchSource, XV as peachHistory, XV as peachHistory$1, Nbe as pendingGenres, eAe as percentText, hxe as pickOrganizeFolder, xxe as planSummary, f3 as playedFor, nAe as playedItemUrl, zF as pollInterval, ks as popCount, jTe as posterUrl, XW as previewLibraryColor, mxe as previewOrganize, hbe as previewUrl, eue as problemDestination, KF as progressText, nU as providerIcon, Jbe as pruneText, yX as purgeCount, Dxe as purgeOrphan, Cz as pv, ppe as qE, H as queryClient, dz as r2, XAe as radarRows, aAe as radialArc, oAe as radialBarSize, iAe as radialCeiling, rAe as radialSlices, Pj as randomId, JAe as rankDetail, YAe as rankShares, m3 as reachedShare, qF as readableErrorHeadline, gDe as recommendationScore, zbe as recordGenre, kxe as recordsText, ITe as recreatePlaylist, kTe as refreshPlaylists, xl as relayoutCovers, Si as reloadFollowManage, Hbe as reloadReview, JEe as rememberShape, _xe as rememberTemplates, ci as removeAlias, hi as removeFeed, ai as removeSource, VAe as removeTasteSource, y$ as removeWants, li as renameAliasGroup, NTe as renamePlaylist, fAe as replayRows, ie as require_jsx_runtime, A as require_react, te as require_react_dom, tq as require_with_selector, oTe as resetWants, Yn as resolveFollowSort, dp as resolveStartTime, ATe as resumeAssetId, wbe as reviewGroupingOptions, MY as reviewQueueData, jY as reviewQueueOf, Wxe as reviewSummary, Ebe as reviewWindow, jbe as rowEvidence, FY as rowFieldName, $q as rowPaginationFeature, bJ as rowSelectionFeature, NJ as rowSortingFeature, PY as rowSubject, Mbe as rowTags, Abe as rowTitle, zfe as s5, ui as saveCredential, Ixe as scanLine, axe as schedulePollInterval, cTe as searchNote, Obe as selectReviewRange, Yr as selectionState, mi as setFeedEnabled, ii as setSourceEnabled, fV as settingsPath, Vbe as settleReviewRows, ebe as sharedNamePrefix, ZV as shellNavigate, b8 as showToast, xn as siteMarkUrl, pq as skipFirstRun, DF as sortCx, jr as sortLabel, en as sourceDefaultCost, ki as sourceIconUrl, zxe as sourceMeta, bs as spinnerHtml, Jf as spring, Rz as spriteGlyph, ni as startCheck, Kbe as startLinkCheck, qbe as startLinkPrune, gxe as startOrganize, ri as startResolve, Nxe as startResourceApply, Mxe as startResourceScan, BAe as startTasteRefresh, Xle as statusLabel, dbe as statusLine, Nr as statusText, bA as storeJavLayout, Lbe as submitDecision, XF as summaryItems, Fq as tableFeatures, mq as tableMemo, Kr as tableRows, $le as taskIssues, I3 as tasteDate, KAe as tasteDimensions, GAe as tasteHours, P3 as tasteKey, FAe as tasteRefetchInterval, IAe as tasteTime, NF as textLang, ld as time, tpe as tl, Xr as toggleGroup, L3 as topScores, ipe as uo, OH as useAction, AZ as useBackgroundJob, bU as useClientUpdates, xu as useConstant, tI as useHorizontalScroller, Su as useIsomorphicLayoutEffect, QW as useLibraryTints, Ft as useMutation, aV as useOverlayScrollbar, Pt as useQuery, oe as useQueryClient, My as useReducedMotion, ixe as useRunSchedule, nxe as useSaveFollowSchedule, aX as useSaveSettings, oxe as useSaveThumbnailMode, PJ as useTable, ZJ as useTablePreferences, cI as useViewGlide, sbe as victimBytes, sTe as wantName, tAe as watchNote, p3 as watchedShare, cc as wireHorizontalScroller, vxe as withOrganizeJob };
-//# debugId=2d100ff6-b8f4-4009-901a-13203bdae48a
\ No newline at end of file
+//# debugId=7e65252d-bf3d-4f82-a9d3-378bcce5fbae
\ No newline at end of file
diff --git a/web/dist/peach-app.review-page-DVlRO-7_.js b/web/dist/peach-app.review-page-a6sBqHAC.js
similarity index 70%
rename from web/dist/peach-app.review-page-DVlRO-7_.js
rename to web/dist/peach-app.review-page-a6sBqHAC.js
index d884edad9..80f7e889f 100644
--- a/web/dist/peach-app.review-page-DVlRO-7_.js
+++ b/web/dist/peach-app.review-page-a6sBqHAC.js
@@ -1,18 +1,18 @@
(function() {
try {
var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new e.Error().stack;
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "0f87cc14-5ced-46c2-88a8-4b571bbb3b85", e._sentryDebugIdIdentifier = "sentry-dbid-0f87cc14-5ced-46c2-88a8-4b571bbb3b85");
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "14b50874-2baa-444e-97eb-ccca6323aeaf", e._sentryDebugIdIdentifier = "sentry-dbid-14b50874-2baa-444e-97eb-ccca6323aeaf");
} catch {}
})();
-import { $b4f18e3395fe64d7$export$3d96ec278d3efce4 as e, $b4f18e3395fe64d7$export$3e41faf802a29e71 as t, $b4f18e3395fe64d7$export$b2539bed5023c21c as n, $ea3928288112382f$export$439d29a4e110a164 as r, $fe21c36db05242bb$export$a98f0dcb43a68a25 as i, $fe21c36db05242bb$export$d7b12c4107be0d61 as a, Button as o, ButtonLink as s, Checkbox as c, CheckboxGlyph as l, Chip as u, DEFAULT_CATEGORY as d, ENTITY_REVIEW_KINDS as f, Ea as ee, EmptyState as p, ExternalLink as m, FilterGlassRows as te, Gg as h, InputBase as g, Note as _, REVIEW_CATEGORIES as v, REVIEW_DECISION_LABELS as ne, REVIEW_KEY as re, REVIEW_LABELS as y, REVIEW_QUEUES as b, REVIEW_QUEUE_LABELS as x, Select as S, SelectItem as C, SelectionActions as w, SelectionDock as T, TextField as E, Wt as D, __toESM as O, avatarInner as k, busyProps as A, canApprove as ie, cardClass as j, commonReviewSources as M, currentReviewRow as N, decisionPayload as P, decisionReceipt as ae, defaultChoice as oe, errorMessage as F, fetchReview as se, filterReviewRows as ce, groupReviewRows as le, isReviewCategory as ue, l7 as I, m7 as de, mirrorText as fe, paginationRange as pe, pendingGenres as L, recordGenre as me, reloadReview as R, require_jsx_runtime as z, require_react as he, reviewGroupingOptions as ge, reviewQueueData as _e, reviewQueueOf as ve, reviewWindow as ye, rowEvidence as be, rowFieldName as xe, rowSubject as Se, rowTags as Ce, rowTitle as B, selectReviewRange as we, settleReviewRows as Te, spinnerHtml as V, submitDecision as Ee, useMutation as De, useOverlayScrollbar as H, useQuery as Oe, useViewGlide as ke } from "./peach-app.js";
-import { Page as Ae } from "./peach-app.page-QAncjzM1.js";
-import { LEGACY_AVATAR_IMG as U } from "./peach-app.legacy-avatar-NSITxLRS.js";
-import { PillAriaTabList as je } from "./peach-app.pill-aria-tab-list-BMY1ZEv1.js";
+import { $b4f18e3395fe64d7$export$3d96ec278d3efce4 as e, $b4f18e3395fe64d7$export$3e41faf802a29e71 as t, $b4f18e3395fe64d7$export$b2539bed5023c21c as n, $ea3928288112382f$export$439d29a4e110a164 as r, $fe21c36db05242bb$export$a98f0dcb43a68a25 as i, $fe21c36db05242bb$export$d7b12c4107be0d61 as a, Button as o, ButtonLink as s, Checkbox as c, CheckboxGlyph as l, Chip as u, DEFAULT_CATEGORY as d, ENTITY_REVIEW_KINDS as f, Ea as ee, EmptyState as p, ExternalLink as m, FilterGlassRows as te, Gg as h, InputBase as g, Note as _, REVIEW_CATEGORIES as v, REVIEW_DECISION_LABELS as ne, REVIEW_KEY as re, REVIEW_LABELS as y, REVIEW_QUEUES as b, REVIEW_QUEUE_LABELS as x, Select as S, SelectItem as C, SelectionActions as w, SelectionDock as T, TextField as E, Wt as D, __toESM as O, avatarInner as k, busyProps as A, canApprove as ie, cardClass as j, commonReviewSources as M, currentReviewRow as N, decisionPayload as P, decisionReceipt as ae, defaultChoice as oe, errorMessage as F, fetchReview as se, filterReviewRows as ce, groupReviewRows as le, isReviewCategory as ue, l7 as I, m7 as de, mirrorText as fe, paginationRange as pe, pendingGenres as L, recordGenre as me, reloadReview as R, require_jsx_runtime as he, require_react as ge, reviewGroupingOptions as _e, reviewQueueData as ve, reviewQueueOf as ye, reviewWindow as be, rowEvidence as xe, rowFieldName as Se, rowSubject as Ce, rowTags as we, rowTitle as z, selectReviewRange as Te, settleReviewRows as Ee, spinnerHtml as B, submitDecision as De, useMutation as Oe, useOverlayScrollbar as V, useQuery as ke, useViewGlide as Ae } from "./peach-app.js";
+import { Page as je } from "./peach-app.page-QAncjzM1.js";
+import { LEGACY_AVATAR_IMG as H } from "./peach-app.legacy-avatar-NSITxLRS.js";
+import { PillAriaTabList as Me } from "./peach-app.pill-aria-tab-list-BMY1ZEv1.js";
// src/react/review/bulk-toolbar.tsx
-var W = /* @__PURE__ */ O(he(), 1), G = z();
-function Me(e) {
- let { groupOptions: t, groupBy: n, onGroupBy: r, groups: i, filter: a, onFilter: s, pageKeys: c, selected: l, onSelected: u, selectedRows: d, metadata: f, approvable: ee, busy: p, feedback: m, onUnifySource: h, onRun: g, queueView: _ = "pending", queueCounts: v, onQueueChange: ne, locked: re } = e, y = c.filter((e) => l.has(e)), w = y.length > 0 && y.length === c.length, E = M(d), D = f && d.some((e) => (e.candidates?.length || 0) > 1), O = E.length ? "统一选择来源" : "所选项目无共同来源", k = (0, W.useRef)(null), A = (0, W.useRef)(null), ie = (0, W.useRef)(null), [j, N] = (0, W.useState)(!1), P = ke(k, A, "[data-entity-state][aria-pressed=\"true\"]", _);
- return (0, W.useLayoutEffect)(() => {
+var U = /* @__PURE__ */ O(ge(), 1), W = he();
+function Ne(e) {
+ let { groupOptions: t, groupBy: n, onGroupBy: r, groups: i, filter: a, onFilter: s, pageKeys: c, selected: l, onSelected: u, selectedRows: d, metadata: f, approvable: ee, busy: p, feedback: m, onUnifySource: h, onRun: g, queueView: _ = "pending", queueCounts: v, onQueueChange: ne, locked: re } = e, y = c.filter((e) => l.has(e)), w = y.length > 0 && y.length === c.length, E = M(d), D = f && d.some((e) => (e.candidates?.length || 0) > 1), O = E.length ? "统一选择来源" : "所选项目无共同来源", k = (0, U.useRef)(null), A = (0, U.useRef)(null), ie = (0, U.useRef)(null), [j, N] = (0, U.useState)(!1), P = Ae(k, A, "[data-entity-state][aria-pressed=\"true\"]", _);
+ return (0, U.useLayoutEffect)(() => {
let e = A.current, t = ie.current, n = e?.parentElement, r = e?.closest("[data-review-filter]");
if (!e || !t || !n || !r) return;
let i = () => N(t.offsetHeight > 0 && Math.abs(n.getBoundingClientRect().top - t.getBoundingClientRect().top) < 1), a = new ResizeObserver(i);
@@ -22,7 +22,7 @@ function Me(e) {
t
]) a.observe(n);
return i(), () => a.disconnect();
- }, []), /* @__PURE__ */ (0, G.jsxs)(G.Fragment, { children: [/* @__PURE__ */ (0, G.jsx)(te, {
+ }, []), /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.jsx)(te, {
label: "复核筛选",
topLabel: "处理状态",
attrs: { "data-review-filter": "" },
@@ -30,18 +30,18 @@ function Me(e) {
topClassName: "max-w-full flex-none",
bottomClassName: c.length ? "min-h-12 max-w-full flex-none flex-wrap" : "hidden",
bottomRef: ie,
- panes: /* @__PURE__ */ (0, G.jsx)("span", {
+ panes: /* @__PURE__ */ (0, W.jsx)("span", {
ref: k,
"data-view-glide": "",
"aria-hidden": "true"
}),
- top: /* @__PURE__ */ (0, G.jsxs)("div", {
+ top: /* @__PURE__ */ (0, W.jsxs)("div", {
ref: A,
role: "group",
"aria-label": "复核状态",
"data-entity-states": "",
onPointerLeave: P.leave,
- children: [b.map((e) => /* @__PURE__ */ (0, G.jsxs)("button", {
+ children: [b.map((e) => /* @__PURE__ */ (0, W.jsxs)("button", {
type: "button",
"data-entity-state": e,
"data-entity-press": "",
@@ -52,36 +52,36 @@ function Me(e) {
e !== _ && ne(e);
},
children: [
- /* @__PURE__ */ (0, G.jsx)("span", {
+ /* @__PURE__ */ (0, W.jsx)("span", {
"data-copy-key": `review.queue.${e}`,
children: x[e]
}),
" ",
- /* @__PURE__ */ (0, G.jsx)("span", {
+ /* @__PURE__ */ (0, W.jsx)("span", {
className: "ms-1.5 tabular-nums text-caption-1-medium text-text-secondary",
children: v ? v[e].toLocaleString() : "…"
})
]
- }, e)), /* @__PURE__ */ (0, G.jsx)("span", {
+ }, e)), /* @__PURE__ */ (0, W.jsx)("span", {
"data-entity-sep": "",
"aria-hidden": "true",
className: j ? void 0 : "invisible"
})]
}),
- bottom: c.length ? /* @__PURE__ */ (0, G.jsxs)(G.Fragment, { children: [
- /* @__PURE__ */ (0, G.jsx)(S, {
+ bottom: c.length ? /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [
+ /* @__PURE__ */ (0, W.jsx)(S, {
"aria-label": "筛选分组方式",
size: "sm",
selectedKey: n,
onSelectionChange: (e) => {
e !== null && r(String(e));
},
- children: t.map(([e, t]) => /* @__PURE__ */ (0, G.jsx)(C, {
+ children: t.map(([e, t]) => /* @__PURE__ */ (0, W.jsx)(C, {
id: e,
children: t
}, e))
}),
- i.length > 1 ? /* @__PURE__ */ (0, G.jsxs)(S, {
+ i.length > 1 ? /* @__PURE__ */ (0, W.jsxs)(S, {
"aria-label": n === "field" ? "筛选字段分类" : "筛选当前分类",
size: "sm",
prefix: "分类",
@@ -89,15 +89,15 @@ function Me(e) {
onSelectionChange: (e) => {
e !== null && s(String(e) === "*" ? "" : String(e));
},
- children: [/* @__PURE__ */ (0, G.jsx)(C, {
+ children: [/* @__PURE__ */ (0, W.jsx)(C, {
id: "*",
children: "全部"
- }), i.map((e) => /* @__PURE__ */ (0, G.jsx)(C, {
+ }), i.map((e) => /* @__PURE__ */ (0, W.jsx)(C, {
id: e.key,
children: `${e.title} · ${e.rows.length}`
}, e.key))]
}) : null,
- re ? null : /* @__PURE__ */ (0, G.jsx)(o, {
+ re ? null : /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
leadingIcon: I,
@@ -111,12 +111,12 @@ function Me(e) {
children: w ? "清空当前选择" : a ? "全选当前分类" : "全选本页"
})
] }) : null
- }), /* @__PURE__ */ (0, G.jsxs)(T, {
+ }), /* @__PURE__ */ (0, W.jsxs)(T, {
label: "复核所选项目",
visible: !re && l.size > 0,
count: `已选 ${l.size} 项`,
children: [
- D && _ !== "ignored" ? /* @__PURE__ */ (0, G.jsxs)(S, {
+ D && _ !== "ignored" ? /* @__PURE__ */ (0, W.jsxs)(S, {
"aria-label": "统一选择来源",
size: "sm",
selectedKey: "",
@@ -124,49 +124,49 @@ function Me(e) {
onSelectionChange: (e) => {
e !== null && e !== "" && h(String(e));
},
- children: [/* @__PURE__ */ (0, G.jsx)(C, {
+ children: [/* @__PURE__ */ (0, W.jsx)(C, {
id: "",
children: O
- }), E.map((e) => /* @__PURE__ */ (0, G.jsx)(C, {
+ }), E.map((e) => /* @__PURE__ */ (0, W.jsx)(C, {
id: e,
children: e
}, e))]
}) : null,
- _ === "ignored" ? null : /* @__PURE__ */ (0, G.jsx)(o, {
+ _ === "ignored" ? null : /* @__PURE__ */ (0, W.jsx)(o, {
variant: "ghost",
size: "small",
disabled: p || !l.size,
onClick: () => g("rejected"),
children: "忽略所选"
}),
- _ === "pending" ? /* @__PURE__ */ (0, G.jsx)(o, {
+ _ === "pending" ? /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
disabled: p || !l.size,
onClick: () => g("skipped"),
children: "稍后处理所选"
- }) : /* @__PURE__ */ (0, G.jsx)(o, {
+ }) : /* @__PURE__ */ (0, W.jsx)(o, {
variant: _ === "ignored" ? "primary" : "secondary",
size: "small",
disabled: p || !l.size,
onClick: () => g("restore"),
children: "恢复所选"
}),
- _ === "ignored" ? null : /* @__PURE__ */ (0, G.jsx)(o, {
+ _ === "ignored" ? null : /* @__PURE__ */ (0, W.jsx)(o, {
variant: "primary",
size: "small",
disabled: p || !l.size || !ee,
onClick: () => g("approved"),
children: "通过所选"
}),
- /* @__PURE__ */ (0, G.jsx)(o, {
+ /* @__PURE__ */ (0, W.jsx)(o, {
variant: "ghost",
size: "small",
disabled: p,
onClick: () => u(/* @__PURE__ */ new Set()),
children: "取消选择"
}),
- m ? /* @__PURE__ */ (0, G.jsx)("p", {
+ m ? /* @__PURE__ */ (0, W.jsx)("p", {
role: "status",
className: "w-full text-body-2-regular text-text-secondary",
children: m
@@ -175,7 +175,7 @@ function Me(e) {
})] });
}
// src/react/review/candidate-form.tsx
-var Ne = {
+var G = {
title: "标题",
original_title: "原标题",
runtime: "来源时长",
@@ -187,19 +187,19 @@ var Ne = {
trailer_url: "预告片"
}, K = "reviewgenretags";
function Pe({ tags: e }) {
- return e.length ? /* @__PURE__ */ (0, G.jsx)("datalist", {
+ return e.length ? /* @__PURE__ */ (0, W.jsx)("datalist", {
id: K,
- children: e.map((e) => /* @__PURE__ */ (0, G.jsx)("option", { value: e }, e))
+ children: e.map((e) => /* @__PURE__ */ (0, W.jsx)("option", { value: e }, e))
}) : null;
}
function Fe({ candidate: e, selectable: t = !1 }) {
let n = Object.entries(e.catalog_evidence || {}).filter(([, e]) => e && e.display_value), r = e.content_id || e.provider_id;
- return /* @__PURE__ */ (0, G.jsxs)("span", {
+ return /* @__PURE__ */ (0, W.jsxs)("span", {
className: "flex min-w-0 flex-1 flex-col",
- children: [/* @__PURE__ */ (0, G.jsxs)("span", {
+ children: [/* @__PURE__ */ (0, W.jsxs)("span", {
className: "relative flex min-w-0 flex-col gap-0.5 px-4 py-3 group-hover:bg-background-primary-hover group-data-selected:bg-background-primary-hover",
children: [
- /* @__PURE__ */ (0, G.jsxs)("b", {
+ /* @__PURE__ */ (0, W.jsxs)("b", {
className: "text-body-2-medium text-text-secondary",
children: [
e.source,
@@ -207,35 +207,35 @@ function Fe({ candidate: e, selectable: t = !1 }) {
r ? ` · ID ${r}` : ""
]
}),
- /* @__PURE__ */ (0, G.jsx)("span", {
+ /* @__PURE__ */ (0, W.jsx)("span", {
className: "text-body-medium break-words text-text-primary",
children: e.display_value || ""
}),
- (e.warnings || []).map((e) => /* @__PURE__ */ (0, G.jsx)("i", {
+ (e.warnings || []).map((e) => /* @__PURE__ */ (0, W.jsx)("i", {
className: "text-body-2-regular text-status-yellow-text",
children: e
}, e)),
- t ? /* @__PURE__ */ (0, G.jsx)("span", {
+ t ? /* @__PURE__ */ (0, W.jsx)("span", {
"aria-hidden": "true",
"data-candidate-choice": !0,
className: "absolute top-4 right-4 inline-grid size-4 place-items-center rounded-full border border-border-checkbox-default bg-background-primary-default group-hover:border-border-checkbox-hover group-data-selected:border-border-focus-ring group-data-selected:bg-accent-600",
- children: /* @__PURE__ */ (0, G.jsx)("span", { className: "size-1.5 rounded-full bg-text-white opacity-0 group-data-selected:opacity-100" })
+ children: /* @__PURE__ */ (0, W.jsx)("span", { className: "size-1.5 rounded-full bg-text-white opacity-0 group-data-selected:opacity-100" })
}) : null
]
- }), n.length ? /* @__PURE__ */ (0, G.jsx)("dl", {
+ }), n.length ? /* @__PURE__ */ (0, W.jsx)("dl", {
className: "flex flex-col gap-1 border-t border-separator-border bg-background-primary-default px-4 py-2.5",
- children: n.map(([e, t]) => /* @__PURE__ */ (0, G.jsxs)("div", {
+ children: n.map(([e, t]) => /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex min-w-0 flex-wrap gap-x-2",
children: [
- /* @__PURE__ */ (0, G.jsx)("dt", {
+ /* @__PURE__ */ (0, W.jsx)("dt", {
className: "text-body-2-regular text-text-secondary",
- children: Ne[e] || e
+ children: G[e] || e
}),
- /* @__PURE__ */ (0, G.jsx)("dd", {
+ /* @__PURE__ */ (0, W.jsx)("dd", {
className: "min-w-0 text-body-2-regular break-words text-text-primary",
children: t.display_value
}),
- (t.warnings || []).map((e) => /* @__PURE__ */ (0, G.jsx)("small", {
+ (t.warnings || []).map((e) => /* @__PURE__ */ (0, W.jsx)("small", {
className: "w-full text-caption-1-regular text-status-yellow-text",
children: e
}, e))
@@ -246,19 +246,19 @@ function Fe({ candidate: e, selectable: t = !1 }) {
}
function q({ row: e, fieldName: t, value: n, onChange: r, locked: o }) {
let s = e.candidates || [];
- return s.length ? s.length === 1 ? /* @__PURE__ */ (0, G.jsx)("div", {
+ return s.length ? s.length === 1 ? /* @__PURE__ */ (0, W.jsx)("div", {
className: "flex overflow-hidden rounded-surface border border-separator-border bg-background-secondary-default",
- children: /* @__PURE__ */ (0, G.jsx)(Fe, { candidate: s[0] })
- }) : /* @__PURE__ */ (0, G.jsx)(i, {
+ children: /* @__PURE__ */ (0, W.jsx)(Fe, { candidate: s[0] })
+ }) : /* @__PURE__ */ (0, W.jsx)(i, {
"aria-label": `${t || "资料"}的来源`,
value: n,
isDisabled: o,
onChange: r,
className: "flex flex-col gap-2",
- children: s.map((e) => /* @__PURE__ */ (0, G.jsx)(a, {
+ children: s.map((e) => /* @__PURE__ */ (0, W.jsx)(a, {
value: e.candidate_key,
className: "relative group flex cursor-pointer items-center gap-2 overflow-hidden rounded-surface border border-separator-border bg-background-secondary-default outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:border-border-button-active data-disabled:cursor-not-allowed",
- children: /* @__PURE__ */ (0, G.jsx)(Fe, {
+ children: /* @__PURE__ */ (0, W.jsx)(Fe, {
candidate: e,
selectable: !0
})
@@ -266,7 +266,7 @@ function q({ row: e, fieldName: t, value: n, onChange: r, locked: o }) {
}) : null;
}
function Ie({ genre: e, tags: t, locked: n, toast: r }) {
- let [i, a] = (0, W.useState)(""), [s, c] = (0, W.useState)(""), l = De({
+ let [i, a] = (0, U.useState)(""), [s, c] = (0, U.useState)(""), l = Oe({
mutationFn: (t) => me(e, t),
onSuccess: async (t, n) => {
t.ok ? (r(n ? `已把「${e}」收录为标签「${n}」` : `已把「${e}」判为非内容标签`), await R()) : c(t.error || "服务端拒绝了这次收录");
@@ -276,22 +276,22 @@ function Ie({ genre: e, tags: t, locked: n, toast: r }) {
let e = i.trim();
e ? (c(""), l.mutate(e)) : c("先给它一个中文标签");
};
- return /* @__PURE__ */ (0, G.jsxs)("div", {
+ return /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [
- /* @__PURE__ */ (0, G.jsx)("b", {
+ /* @__PURE__ */ (0, W.jsx)("b", {
lang: "ja",
className: "text-body-medium text-text-primary",
children: e
}),
- /* @__PURE__ */ (0, G.jsx)(E, {
+ /* @__PURE__ */ (0, W.jsx)(E, {
"aria-label": `「${e}」收录成的中文标签`,
value: i,
onChange: a,
maxLength: 40,
isDisabled: n || l.isPending,
className: "min-w-40 flex-1",
- children: /* @__PURE__ */ (0, G.jsx)(g, {
+ children: /* @__PURE__ */ (0, W.jsx)(g, {
size: "small",
list: t.length ? K : void 0,
autoComplete: "off",
@@ -301,14 +301,14 @@ function Ie({ genre: e, tags: t, locked: n, toast: r }) {
}
})
}),
- /* @__PURE__ */ (0, G.jsx)(o, {
+ /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
disabled: n || l.isPending,
onClick: u,
children: "收录"
}),
- /* @__PURE__ */ (0, G.jsx)(o, {
+ /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
disabled: n || l.isPending,
@@ -317,7 +317,7 @@ function Ie({ genre: e, tags: t, locked: n, toast: r }) {
},
children: "不是内容"
}),
- s ? /* @__PURE__ */ (0, G.jsx)("p", {
+ s ? /* @__PURE__ */ (0, W.jsx)("p", {
role: "status",
className: "w-full text-body-2-regular text-text-error-primary",
children: s
@@ -327,20 +327,20 @@ function Ie({ genre: e, tags: t, locked: n, toast: r }) {
}
function Le({ row: e, tags: t, locked: n, toast: r }) {
let i = L(e);
- return i.length ? /* @__PURE__ */ (0, G.jsxs)("div", {
+ return i.length ? /* @__PURE__ */ (0, W.jsxs)("div", {
role: "group",
"aria-label": "未收录 genre",
className: "flex flex-col gap-2 rounded-surface border border-separator-border bg-background-primary-default px-4 py-3",
- children: [/* @__PURE__ */ (0, G.jsx)("h5", {
+ children: [/* @__PURE__ */ (0, W.jsx)("h5", {
className: "text-body-2-medium text-text-secondary",
children: `未收录 genre · ${i.length}`
- }), /* @__PURE__ */ (0, G.jsx)("div", {
+ }), /* @__PURE__ */ (0, W.jsx)("div", {
role: "list",
className: "flex flex-col",
- children: i.map((e, i) => /* @__PURE__ */ (0, G.jsx)("div", {
+ children: i.map((e, i) => /* @__PURE__ */ (0, W.jsx)("div", {
role: "listitem",
className: `py-3 first:pt-0 last:pb-0 ${i ? "border-t border-separator-border" : ""}`,
- children: /* @__PURE__ */ (0, G.jsx)(Ie, {
+ children: /* @__PURE__ */ (0, W.jsx)(Ie, {
genre: e,
tags: t,
locked: n,
@@ -354,21 +354,21 @@ function Le({ row: e, tags: t, locked: n, toast: r }) {
var J = (e = "") => /^https?:\/\//i.test(e) ? e : "", Re = (e = "") => J(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");
function ze({ url: e }) {
let t = Re(e || "");
- return /* @__PURE__ */ (0, G.jsx)(Be, { source: t }, t);
+ return /* @__PURE__ */ (0, W.jsx)(Be, { source: t }, t);
}
function Be({ source: e }) {
- let [t, n] = (0, W.useState)("idle");
- return (0, W.useEffect)(() => {
+ let [t, n] = (0, U.useState)("idle");
+ return (0, U.useEffect)(() => {
if (t !== "loading") return;
let e = setTimeout(() => n("failed"), 3e4);
return () => clearTimeout(e);
- }, [t]), /* @__PURE__ */ (0, G.jsxs)("div", {
+ }, [t]), /* @__PURE__ */ (0, W.jsxs)("div", {
className: "relative flex h-review-image items-center justify-center overflow-hidden rounded-surface bg-background-secondary-default",
- children: [t === "loading" ? /* @__PURE__ */ (0, G.jsxs)("span", {
+ children: [t === "loading" ? /* @__PURE__ */ (0, W.jsxs)("span", {
role: "status",
className: "absolute flex items-center gap-2 text-body-2-regular text-text-secondary",
- children: [/* @__PURE__ */ (0, G.jsx)("span", { dangerouslySetInnerHTML: { __html: V("正在加载图片") } }), "正在加载图片"]
- }) : null, e && (t === "loading" || t === "ready") ? /* @__PURE__ */ (0, G.jsx)("img", {
+ children: [/* @__PURE__ */ (0, W.jsx)("span", { dangerouslySetInnerHTML: { __html: B("正在加载图片") } }), "正在加载图片"]
+ }) : null, e && (t === "loading" || t === "ready") ? /* @__PURE__ */ (0, W.jsx)("img", {
src: e,
alt: "来源提供的备选图片",
referrerPolicy: "no-referrer",
@@ -376,19 +376,19 @@ function Be({ source: e }) {
className: `size-full object-contain ${t === "loading" ? "invisible" : ""}`,
onLoad: () => n("ready"),
onError: () => n("failed")
- }) : e ? /* @__PURE__ */ (0, G.jsxs)("div", {
+ }) : e ? /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex flex-col items-center gap-2",
- children: [t === "failed" ? /* @__PURE__ */ (0, G.jsx)("span", {
+ children: [t === "failed" ? /* @__PURE__ */ (0, W.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
children: "未取得来源图片"
- }) : null, /* @__PURE__ */ (0, G.jsx)(o, {
+ }) : null, /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
"aria-label": t === "failed" ? "立即重试加载来源图片" : void 0,
onClick: () => n("loading"),
children: t === "failed" ? "立即重试" : "查看来源图片"
})]
- }) : /* @__PURE__ */ (0, G.jsx)("span", {
+ }) : /* @__PURE__ */ (0, W.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
children: "未取得来源图片"
})]
@@ -396,28 +396,28 @@ function Be({ source: e }) {
}
function Y({ asset: e, openItem: t }) {
let n = e.name || "";
- return /* @__PURE__ */ (0, G.jsxs)("div", {
+ return /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex min-w-0 items-center gap-2.5 rounded-surface bg-background-secondary-default p-2",
- children: [/* @__PURE__ */ (0, G.jsxs)("button", {
+ children: [/* @__PURE__ */ (0, W.jsxs)("button", {
type: "button",
onClick: () => t(e.id),
className: "flex aspect-card-cover w-review-cover-narrow shrink-0 review-tight:w-review-cover cursor-pointer items-center justify-center overflow-hidden rounded-2lg bg-background-tertiary-default outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: [e.preview_url ? /* @__PURE__ */ (0, G.jsx)("img", {
+ children: [e.preview_url ? /* @__PURE__ */ (0, W.jsx)("img", {
src: e.preview_url,
alt: "",
loading: "lazy",
className: "size-full object-cover"
- }) : /* @__PURE__ */ (0, G.jsx)("span", {
+ }) : /* @__PURE__ */ (0, W.jsx)("span", {
className: "text-caption-1-regular text-text-secondary",
children: "无封面"
- }), /* @__PURE__ */ (0, G.jsx)(r, { children: `打开原视频 ${n}` })]
- }), /* @__PURE__ */ (0, G.jsxs)("div", {
+ }), /* @__PURE__ */ (0, W.jsx)(r, { children: `打开原视频 ${n}` })]
+ }), /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex min-w-0 flex-col items-start gap-1",
- children: [/* @__PURE__ */ (0, G.jsx)("b", {
+ children: [/* @__PURE__ */ (0, W.jsx)("b", {
title: n,
className: "w-full truncate text-body-medium text-text-primary",
children: e.code || n || "原视频"
- }), /* @__PURE__ */ (0, G.jsx)(o, {
+ }), /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
leadingIcon: h,
@@ -428,22 +428,22 @@ function Y({ asset: e, openItem: t }) {
});
}
function X({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
- return /* @__PURE__ */ (0, G.jsxs)("div", {
+ return /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex min-w-0 items-center gap-3",
- children: [/* @__PURE__ */ (0, G.jsx)("button", {
+ children: [/* @__PURE__ */ (0, W.jsx)("button", {
type: "button",
"aria-label": `打开创作者页:${t}`,
onClick: () => i(e, t),
- className: `relative inline-grid size-11 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full bg-background-secondary-default text-caption-1-medium text-text-secondary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring ${U}`,
+ className: `relative inline-grid size-11 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full bg-background-secondary-default text-caption-1-medium text-text-secondary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring ${H}`,
dangerouslySetInnerHTML: { __html: r }
- }), /* @__PURE__ */ (0, G.jsxs)("div", {
+ }), /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex min-w-0 flex-col items-start",
- children: [/* @__PURE__ */ (0, G.jsx)("button", {
+ children: [/* @__PURE__ */ (0, W.jsx)("button", {
type: "button",
onClick: () => i(e, t),
className: "max-w-full cursor-pointer truncate text-body-medium text-text-primary underline-offset-2 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-border-focus-ring",
children: t
- }), n ? /* @__PURE__ */ (0, G.jsx)("small", {
+ }), n ? /* @__PURE__ */ (0, W.jsx)("small", {
className: "tabular-nums text-body-2-regular text-text-secondary",
children: `${n.toLocaleString()} 部作品`
}) : null]
@@ -452,16 +452,16 @@ function X({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
}
function Ve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, note: a }) {
let c = J(e.profile_url || ""), l = (e.preview_assets || []).slice(0, 6), u = Math.max(0, Number(e.video_count || e.videos || 0));
- return /* @__PURE__ */ (0, G.jsxs)("section", {
+ return /* @__PURE__ */ (0, W.jsxs)("section", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, G.jsx)("h5", {
+ /* @__PURE__ */ (0, W.jsx)("h5", {
className: "text-body-medium text-text-primary",
children: `待确认人物:${e.babepedia_name || "未标注"}`
}),
- /* @__PURE__ */ (0, G.jsxs)("div", {
+ /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [c ? /* @__PURE__ */ (0, G.jsx)(s, {
+ children: [c ? /* @__PURE__ */ (0, W.jsx)(s, {
variant: "secondary",
size: "small",
trailingIcon: D,
@@ -469,36 +469,36 @@ function Ve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, not
target: "_blank",
rel: "noopener noreferrer",
children: "来源资料"
- }) : null, /* @__PURE__ */ (0, G.jsx)(o, {
+ }) : null, /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
onClick: () => n("creator", e.creator || ""),
children: `查看全部 ${u.toLocaleString()} 部作品`
})]
}),
- /* @__PURE__ */ (0, G.jsx)(ze, { url: e.preview_url }),
- /* @__PURE__ */ (0, G.jsx)("p", {
+ /* @__PURE__ */ (0, W.jsx)(ze, { url: e.preview_url }),
+ /* @__PURE__ */ (0, W.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "通过后记录身份判断。"
}),
- l.length ? /* @__PURE__ */ (0, G.jsxs)(G.Fragment, { children: [/* @__PURE__ */ (0, G.jsx)("h5", {
+ l.length ? /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.jsx)("h5", {
className: "text-body-medium text-text-primary",
children: "本地作品样本"
- }), /* @__PURE__ */ (0, G.jsx)("ul", {
+ }), /* @__PURE__ */ (0, W.jsx)("ul", {
className: "flex flex-col gap-1",
- children: l.map((e) => /* @__PURE__ */ (0, G.jsxs)("li", {
+ children: l.map((e) => /* @__PURE__ */ (0, W.jsxs)("li", {
className: "flex min-w-0 items-center gap-2",
- children: [/* @__PURE__ */ (0, G.jsx)(o, {
+ children: [/* @__PURE__ */ (0, W.jsx)(o, {
variant: "ghost",
size: "small",
className: "min-w-0",
onClick: () => t(e.id),
- children: /* @__PURE__ */ (0, G.jsx)("span", {
+ children: /* @__PURE__ */ (0, W.jsx)("span", {
title: e.name,
className: "block max-w-full truncate",
children: e.name
})
- }), /* @__PURE__ */ (0, G.jsx)(o, {
+ }), /* @__PURE__ */ (0, W.jsx)(o, {
variant: "ghost",
size: "small",
"aria-label": `打开 ${e.name} 的文件位置`,
@@ -507,11 +507,11 @@ function Ve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, not
children: "文件位置"
})]
}, e.id))
- })] }) : /* @__PURE__ */ (0, G.jsx)("p", {
+ })] }) : /* @__PURE__ */ (0, W.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "暂无本地作品样本,打开全部作品核对。"
}),
- a ? /* @__PURE__ */ (0, G.jsx)("p", {
+ a ? /* @__PURE__ */ (0, W.jsx)("p", {
role: "status",
className: "text-body-2-regular text-text-error-primary",
children: a
@@ -520,7 +520,7 @@ function Ve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, not
});
}
function He({ assets: e, picked: t, onPicked: n, locked: i }) {
- let [a, o] = (0, W.useState)(null), s = new Set(t), c = (t, r) => {
+ let [a, o] = (0, U.useState)(null), s = new Set(t), c = (t, r) => {
if (i) return;
let c = new Set(s);
if (r && a !== null) {
@@ -532,10 +532,10 @@ function He({ assets: e, picked: t, onPicked: n, locked: i }) {
}
o(t), n(e.filter((e) => c.has(e.id)).map((e) => e.id));
};
- return /* @__PURE__ */ (0, G.jsxs)("div", {
+ return /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex flex-col gap-2",
- children: [/* @__PURE__ */ (0, G.jsx)(w, {
- prefix: /* @__PURE__ */ (0, G.jsx)("span", {
+ children: [/* @__PURE__ */ (0, W.jsx)(w, {
+ prefix: /* @__PURE__ */ (0, W.jsx)("span", {
className: "tabular-nums text-body-2-regular text-text-secondary",
children: `已选 ${s.size} / ${e.length}`
}),
@@ -548,26 +548,26 @@ function He({ assets: e, picked: t, onPicked: n, locked: i }) {
disabled: i,
onPress: () => n([])
}]
- }), /* @__PURE__ */ (0, G.jsx)("div", {
+ }), /* @__PURE__ */ (0, W.jsx)("div", {
className: "review-asset-grid gap-1.5",
children: e.map((e, t) => {
let n = s.has(e.id);
- return /* @__PURE__ */ (0, G.jsxs)("button", {
+ return /* @__PURE__ */ (0, W.jsxs)("button", {
type: "button",
"aria-pressed": n,
title: e.name,
onClick: (e) => c(t, e.shiftKey),
className: `relative aspect-card-cover cursor-pointer overflow-hidden rounded-surface bg-background-tertiary-default outline-none transition-opacity focus-visible:ring-2 focus-visible:ring-border-focus-ring ${n ? "opacity-100 ring-2 ring-border-button-active ring-inset" : "opacity-50"}`,
children: [
- /* @__PURE__ */ (0, G.jsx)("img", {
+ /* @__PURE__ */ (0, W.jsx)("img", {
src: `/poster?id=${e.id}&c=4`,
alt: "",
loading: "lazy",
className: "size-full object-cover"
}),
- /* @__PURE__ */ (0, G.jsx)("span", {
+ /* @__PURE__ */ (0, W.jsx)("span", {
className: "absolute top-1 right-1",
- children: /* @__PURE__ */ (0, G.jsx)(l, {
+ children: /* @__PURE__ */ (0, W.jsx)(l, {
size: "sm",
state: {
isSelected: n,
@@ -578,7 +578,7 @@ function He({ assets: e, picked: t, onPicked: n, locked: i }) {
}
})
}),
- /* @__PURE__ */ (0, G.jsx)(r, { children: `${n ? "已选" : "未选"} ${e.name || e.id}` })
+ /* @__PURE__ */ (0, W.jsx)(r, { children: `${n ? "已选" : "未选"} ${e.name || e.id}` })
]
}, e.id);
})
@@ -592,16 +592,16 @@ var Ue = j({
className: "flex flex-col gap-4 px-5 pt-4"
}), Z = "flex min-h-6 min-w-0 items-center", We = 2, Q = (e) => e === "western_identity" ? "h-review-card-tall" : "h-review-card";
function Ge(e) {
- let { category: t, row: n, choice: r, onChoice: i, selected: a, onSelect: s, locked: l, busy: d, problem: m, genreTags: te, onDecide: h, handlers: g, queueView: _ = "pending" } = e, v = (0, W.useRef)(!1), re = H(), y = H(), b = t === "metadata_fields", x = f[t] || "", S = String(n.creator || "").trim(), C = !!x && !!S, w = B(t, n), T = xe(t, n), E = Se(t, n), D = be(n), O = Ce(n), j = ie(t, n), M = n.comparison_assets || [], N = n.preview_assets || [], P = ne[n.decision || ""], ae = M.length > 1 ? /* @__PURE__ */ (0, G.jsxs)("div", {
+ let { category: t, row: n, choice: r, onChoice: i, selected: a, onSelect: s, locked: l, busy: d, problem: m, genreTags: te, onDecide: h, handlers: g, queueView: _ = "pending" } = e, v = (0, U.useRef)(!1), re = V(), y = V(), b = t === "metadata_fields", x = f[t] || "", S = String(n.creator || "").trim(), C = !!x && !!S, w = z(t, n), T = Se(t, n), E = Ce(t, n), D = xe(n), O = we(n), j = ie(t, n), M = n.comparison_assets || [], N = n.preview_assets || [], P = ne[n.decision || ""], ae = M.length > 1 ? /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex flex-col gap-3",
- children: [M.slice(0, We).map((e) => /* @__PURE__ */ (0, G.jsx)(Y, {
+ children: [M.slice(0, We).map((e) => /* @__PURE__ */ (0, W.jsx)(Y, {
asset: e,
openItem: g.openItem
- }, e.id)), M.length > We ? /* @__PURE__ */ (0, G.jsx)("p", {
+ }, e.id)), M.length > We ? /* @__PURE__ */ (0, W.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: `另有 ${(M.length - We).toLocaleString()} 部对照作品`
}) : null]
- }) : C ? /* @__PURE__ */ (0, G.jsx)(X, {
+ }) : C ? /* @__PURE__ */ (0, W.jsx)(X, {
kind: x,
name: S,
works: Number(n.video_count || n.videos || 0),
@@ -612,14 +612,14 @@ function Ge(e) {
image_version: n.image_version,
avatar_focus: n.avatar_focus
} : null, null, x)
- }) : n.asset_id ? /* @__PURE__ */ (0, G.jsx)(Y, {
+ }) : n.asset_id ? /* @__PURE__ */ (0, W.jsx)(Y, {
openItem: g.openItem,
asset: {
id: n.asset_id,
name: n.asset_name,
preview_url: n.asset_preview_url
}
- }) : null, oe = b ? /* @__PURE__ */ (0, G.jsx)(q, {
+ }) : null, oe = b ? /* @__PURE__ */ (0, W.jsx)(q, {
row: n,
fieldName: T,
value: r.candidateKey,
@@ -628,7 +628,7 @@ function Ge(e) {
candidateKey: e
}),
locked: l
- }) : t === "creator_tags" ? N.length ? /* @__PURE__ */ (0, G.jsx)(He, {
+ }) : t === "creator_tags" ? N.length ? /* @__PURE__ */ (0, W.jsx)(He, {
assets: N,
picked: r.assets,
locked: l,
@@ -636,50 +636,50 @@ function Ge(e) {
...r,
assets: e
})
- }) : /* @__PURE__ */ (0, G.jsx)(p, {
+ }) : /* @__PURE__ */ (0, W.jsx)(p, {
size: "compact",
icon: ee,
title: "这批作品尚未抽帧",
children: `${n.video_count || ""} 条作品还没有可用预览;批准后仍会按所选资料写入标签。`
- }) : t === "fc2_similarity" ? null : t === "western_identity" ? /* @__PURE__ */ (0, G.jsx)(Ve, {
+ }) : t === "fc2_similarity" ? null : t === "western_identity" ? /* @__PURE__ */ (0, W.jsx)(Ve, {
row: n,
openItem: g.openItem,
openEntity: g.openEntity,
onReveal: g.onReveal,
revealing: g.revealing,
note: g.revealNote
- }) : /* @__PURE__ */ (0, G.jsx)(ze, { url: n.preview_url }), F = C ? ae : T ? /* @__PURE__ */ (0, G.jsxs)("h4", {
+ }) : /* @__PURE__ */ (0, W.jsx)(ze, { url: n.preview_url }), F = C ? ae : T ? /* @__PURE__ */ (0, W.jsxs)("h4", {
className: `${Z} flex-wrap gap-2`,
- children: [/* @__PURE__ */ (0, G.jsx)("span", {
+ children: [/* @__PURE__ */ (0, W.jsx)("span", {
title: T,
className: "flex max-w-full min-w-0 overflow-hidden rounded-md",
- children: /* @__PURE__ */ (0, G.jsx)(u, {
+ children: /* @__PURE__ */ (0, W.jsx)(u, {
variant: "caption",
color: "blue",
children: T
})
- }), /* @__PURE__ */ (0, G.jsx)("span", {
+ }), /* @__PURE__ */ (0, W.jsx)("span", {
title: E,
className: "min-w-0 truncate text-body-medium text-text-primary",
children: E
})]
- }) : /* @__PURE__ */ (0, G.jsx)("h4", {
+ }) : /* @__PURE__ */ (0, W.jsx)("h4", {
className: Z,
- children: /* @__PURE__ */ (0, G.jsx)("span", {
+ children: /* @__PURE__ */ (0, W.jsx)("span", {
title: w,
className: "min-w-0 truncate text-body-medium text-text-primary",
children: w
})
});
- return /* @__PURE__ */ (0, G.jsxs)("section", {
+ return /* @__PURE__ */ (0, W.jsxs)("section", {
"aria-label": w,
"data-review-key": n.item_key,
className: `${Ue} ${Q(t)} overflow-hidden`,
children: [
- /* @__PURE__ */ (0, G.jsxs)("header", {
+ /* @__PURE__ */ (0, W.jsxs)("header", {
className: "flex min-w-0 shrink-0 items-start gap-2",
children: [
- l ? null : /* @__PURE__ */ (0, G.jsx)("span", {
+ l ? null : /* @__PURE__ */ (0, W.jsx)("span", {
className: `${Z} shrink-0`,
onPointerDownCapture: (e) => {
v.current = e.shiftKey;
@@ -687,66 +687,66 @@ function Ge(e) {
onKeyDownCapture: (e) => {
v.current = e.shiftKey;
},
- children: /* @__PURE__ */ (0, G.jsx)(c, {
+ children: /* @__PURE__ */ (0, W.jsx)(c, {
isSelected: a,
"aria-label": `选择 ${w}`,
onChange: (e) => s(v.current, e)
})
}),
- /* @__PURE__ */ (0, G.jsx)("div", {
+ /* @__PURE__ */ (0, W.jsx)("div", {
className: "min-w-0 flex-1",
children: F
}),
- P ? /* @__PURE__ */ (0, G.jsx)(u, {
+ P ? /* @__PURE__ */ (0, W.jsx)(u, {
variant: "caption",
color: "neutral",
children: P
}) : null
]
}),
- /* @__PURE__ */ (0, G.jsx)("div", {
+ /* @__PURE__ */ (0, W.jsx)("div", {
className: "relative flex min-w-0 min-h-0 flex-1 flex-col",
- children: /* @__PURE__ */ (0, G.jsxs)("div", {
+ children: /* @__PURE__ */ (0, W.jsxs)("div", {
ref: re,
className: "flex min-w-0 min-h-0 flex-1 flex-col gap-3 overflow-y-auto",
children: [
- n.source_name ? /* @__PURE__ */ (0, G.jsx)("p", {
+ n.source_name ? /* @__PURE__ */ (0, W.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: `来源写法:${n.source_name}`
}) : null,
- !C && (n.board || n.assets) ? /* @__PURE__ */ (0, G.jsx)("p", {
+ !C && (n.board || n.assets) ? /* @__PURE__ */ (0, W.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: `对照文件:${Number(n.video_count || n.assets || 0).toLocaleString()}`
}) : null,
!C && ae ? ae : null,
- O.length || t === "creator_tags" ? /* @__PURE__ */ (0, G.jsx)("div", {
+ O.length || t === "creator_tags" ? /* @__PURE__ */ (0, W.jsx)("div", {
className: "flex flex-wrap gap-1",
- children: O.length ? O.map((e) => /* @__PURE__ */ (0, G.jsx)(u, {
+ children: O.length ? O.map((e) => /* @__PURE__ */ (0, W.jsx)(u, {
variant: "caption",
color: "soft",
children: e
- }, e)) : /* @__PURE__ */ (0, G.jsx)("small", {
+ }, e)) : /* @__PURE__ */ (0, W.jsx)("small", {
className: "text-body-2-regular text-text-secondary",
children: "暂无待确认标签"
})
}) : null,
oe,
- /* @__PURE__ */ (0, G.jsx)(Le, {
+ /* @__PURE__ */ (0, W.jsx)(Le, {
row: n,
tags: te,
locked: l,
toast: g.toast
}),
- !b && D ? /* @__PURE__ */ (0, G.jsx)("p", {
+ !b && D ? /* @__PURE__ */ (0, W.jsx)("p", {
className: "text-body-2-regular text-text-secondary wrap-anywhere",
children: D
}) : null
]
})
}),
- b && D ? /* @__PURE__ */ (0, G.jsx)("div", {
+ b && D ? /* @__PURE__ */ (0, W.jsx)("div", {
className: "relative -mx-5 -mb-4 shrink-0",
- children: /* @__PURE__ */ (0, G.jsx)("p", {
+ children: /* @__PURE__ */ (0, W.jsx)("p", {
ref: y,
role: "region",
"aria-label": "当前信息",
@@ -754,10 +754,10 @@ function Ge(e) {
children: D
})
}) : null,
- /* @__PURE__ */ (0, G.jsxs)("footer", {
+ /* @__PURE__ */ (0, W.jsxs)("footer", {
className: "-mx-5 flex min-h-14 shrink-0 flex-wrap items-center justify-end gap-2 rounded-b-surface border-t border-separator-border bg-background-secondary-default py-3 pr-3 pl-5",
children: [
- _ === "ignored" ? null : /* @__PURE__ */ (0, G.jsx)(o, {
+ _ === "ignored" ? null : /* @__PURE__ */ (0, W.jsx)(o, {
variant: "ghost",
size: "small",
disabled: l,
@@ -765,14 +765,14 @@ function Ge(e) {
onClick: () => h("rejected"),
children: "忽略"
}),
- _ === "pending" ? /* @__PURE__ */ (0, G.jsx)(o, {
+ _ === "pending" ? /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
disabled: l,
...A(d),
onClick: () => h("skipped"),
children: "稍后处理"
- }) : /* @__PURE__ */ (0, G.jsx)(o, {
+ }) : /* @__PURE__ */ (0, W.jsx)(o, {
variant: _ === "ignored" ? "primary" : "secondary",
size: "small",
disabled: l,
@@ -780,7 +780,7 @@ function Ge(e) {
onClick: () => h("restore"),
children: "恢复待处理"
}),
- _ === "ignored" ? null : /* @__PURE__ */ (0, G.jsx)(o, {
+ _ === "ignored" ? null : /* @__PURE__ */ (0, W.jsx)(o, {
variant: "primary",
size: "small",
disabled: l || !j,
@@ -789,7 +789,7 @@ function Ge(e) {
onClick: () => h("approved"),
children: j ? "通过" : "不可通过"
}),
- m ? /* @__PURE__ */ (0, G.jsx)("p", {
+ m ? /* @__PURE__ */ (0, W.jsx)("p", {
role: "status",
className: "w-full text-body-2-regular text-text-error-primary",
children: m
@@ -802,25 +802,25 @@ function Ge(e) {
// src/react/review/review-page.tsx
var Ke = "flex cursor-pointer items-center justify-between gap-2";
function qe({ page: e, pages: t, onPage: n }) {
- return t <= 1 ? null : /* @__PURE__ */ (0, G.jsxs)("nav", {
+ return t <= 1 ? null : /* @__PURE__ */ (0, W.jsxs)("nav", {
"aria-label": "复核分页",
"data-pagination-layout": "",
className: "inline-grid w-full min-w-0 items-center gap-2",
children: [
- /* @__PURE__ */ (0, G.jsx)(o, {
+ /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
disabled: e <= 1,
onClick: () => n(e - 1),
children: "上一页"
}),
- /* @__PURE__ */ (0, G.jsx)("ul", {
+ /* @__PURE__ */ (0, W.jsx)("ul", {
className: "flex min-w-0 flex-wrap items-center justify-center gap-1",
- children: pe(e, t).map((t, r) => /* @__PURE__ */ (0, G.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, G.jsx)("span", {
+ children: pe(e, t).map((t, r) => /* @__PURE__ */ (0, W.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, W.jsx)("span", {
"aria-hidden": !0,
className: "px-1 text-body-2-regular text-text-tertiary",
children: "…"
- }) : /* @__PURE__ */ (0, G.jsx)(o, {
+ }) : /* @__PURE__ */ (0, W.jsx)(o, {
variant: t === e ? "secondary" : "ghost",
size: "small",
"aria-label": `第 ${t} 页`,
@@ -829,7 +829,7 @@ function qe({ page: e, pages: t, onPage: n }) {
children: t
}) }, t === "…" ? `dots-${r}` : t))
}),
- /* @__PURE__ */ (0, G.jsx)(o, {
+ /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
disabled: e >= t,
@@ -840,19 +840,19 @@ function qe({ page: e, pages: t, onPage: n }) {
});
}
function $(r) {
- let [i, a] = (0, W.useState)(() => matchMedia("(max-width:900px)").matches);
- (0, W.useEffect)(() => {
+ let [i, a] = (0, U.useState)(() => matchMedia("(max-width:900px)").matches);
+ (0, U.useEffect)(() => {
let e = matchMedia("(max-width:900px)"), t = () => a(e.matches);
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
}, []);
- let { route: s, openItem: c, openEntity: l, revealSource: u, toast: f, readOnly: ee, readOnlyMessage: te, writerUrl: h } = r, [g, ne] = (0, W.useState)(ue(r.category) ? r.category : d), [S, C] = (0, W.useState)(() => ve(r.queue)), [w, T] = (0, W.useState)("candidates"), [E, D] = (0, W.useState)(""), [O, k] = (0, W.useState)(1), [A, j] = (0, W.useState)(/* @__PURE__ */ new Set()), [M, I] = (0, W.useState)(/* @__PURE__ */ new Map()), [pe, L] = (0, W.useState)(/* @__PURE__ */ new Map()), [me, R] = (0, W.useState)(""), z = (0, W.useRef)(null), [he, be] = (0, W.useState)(0), [xe, Se] = (0, W.useState)(""), Ce = (0, W.useRef)(!0);
- (0, W.useEffect)(() => () => {
- Ce.current = !1;
+ let { route: s, openItem: c, openEntity: l, revealSource: u, toast: f, readOnly: ee, readOnlyMessage: te, writerUrl: h } = r, [g, ne] = (0, U.useState)(ue(r.category) ? r.category : d), [S, C] = (0, U.useState)(() => ye(r.queue)), [w, T] = (0, U.useState)("candidates"), [E, D] = (0, U.useState)(""), [O, k] = (0, U.useState)(1), [A, j] = (0, U.useState)(/* @__PURE__ */ new Set()), [M, I] = (0, U.useState)(/* @__PURE__ */ new Map()), [pe, L] = (0, U.useState)(/* @__PURE__ */ new Map()), [me, R] = (0, U.useState)(""), he = (0, U.useRef)(null), [ge, xe] = (0, U.useState)(0), [Se, Ce] = (0, U.useState)(""), we = (0, U.useRef)(!0);
+ (0, U.useEffect)(() => () => {
+ we.current = !1;
}, []);
- let B = Oe({
+ let z = ke({
queryKey: re,
queryFn: ({ signal: e }) => se(e)
- }), V = B.data || {
+ }), B = z.data || {
sections: {},
counts: {},
queues: {
@@ -865,9 +865,9 @@ function $(r) {
counts: {}
}
}
- }, H = _e(V, S), ke = B.data ? Object.fromEntries(b.map((e) => [e, v.reduce((t, n) => t + Number(_e(V, e).counts[n] || 0), 0)])) : void 0, U = H.sections[g] || [], Ne = g === "metadata_fields", K = ee;
- (0, W.useEffect)(() => {
- let e = new Set(U.map((e) => e.item_key));
+ }, V = ve(B, S), Ae = z.data ? Object.fromEntries(b.map((e) => [e, v.reduce((t, n) => t + Number(ve(B, e).counts[n] || 0), 0)])) : void 0, H = V.sections[g] || [], G = g === "metadata_fields", K = ee;
+ (0, U.useEffect)(() => {
+ let e = new Set(H.map((e) => e.item_key));
j((t) => {
let n = [...t].filter((t) => e.has(t));
return n.length === t.size ? t : new Set(n);
@@ -878,15 +878,20 @@ function $(r) {
let n = [...t].filter(([t]) => e.has(t));
return n.length === t.size ? t : new Map(n);
});
- }, [U]);
- let Fe = ge(U, Ne), q = Fe.some(([e]) => e === w) ? w : "candidates", Ie = le(U, q), Le = Ie.some((e) => e.key === E) ? E : "", J = ye(ce(U, q, Le), O), Re = J.rows.map((e) => e.item_key), ze = new Set(Re), Be = Ie.map((e) => ({
+ }, [H]);
+ let Fe = (0, U.useMemo)(() => _e(H, G), [H, G]), q = Fe.some(([e]) => e === w) ? w : "candidates", Ie = (0, U.useMemo)(() => le(H, q), [H, q]), Le = Ie.some((e) => e.key === E) ? E : "", J = (0, U.useMemo)(() => be(ce(H, q, Le), O), [
+ H,
+ q,
+ Le,
+ O
+ ]), Re = J.rows.map((e) => e.item_key), ze = new Set(Re), Be = Ie.map((e) => ({
...e,
rows: e.rows.filter((e) => ze.has(e.item_key))
- })).filter((e) => e.rows.length), Y = (e) => M.get(e.item_key) || oe(e), X = U.filter((e) => A.has(e.item_key)), Ve = (e) => {
+ })).filter((e) => e.rows.length), Y = (e) => M.get(e.item_key) || oe(e), X = (0, U.useMemo)(() => H.filter((e) => A.has(e.item_key)), [H, A]), Ve = (e) => {
let t = new Set(e);
j((e) => new Set([...e].filter((e) => !t.has(e)))), I((e) => new Map([...e].filter(([e]) => !t.has(e)))), L((e) => new Map([...e].filter(([e]) => !t.has(e))));
}, He = (e, t) => L((n) => new Map(n).set(e, t)), Ue = () => {
- T("candidates"), D(""), k(1), j(/* @__PURE__ */ new Set()), I(/* @__PURE__ */ new Map()), L(/* @__PURE__ */ new Map()), R(""), z.current = null;
+ T("candidates"), D(""), k(1), j(/* @__PURE__ */ new Set()), I(/* @__PURE__ */ new Map()), L(/* @__PURE__ */ new Map()), R(""), he.current = null;
}, Z = (e) => {
ne(e), Ue(), s({
category: e === "metadata_fields" ? "" : e,
@@ -897,20 +902,20 @@ function $(r) {
category: g === "metadata_fields" ? "" : g,
queue: e === "pending" ? "" : e
});
- }, Q = De({
- mutationFn: ({ row: e, status: t, category: n }) => Ee(P(n, N(n, e), t, Y(e))),
+ }, Q = Oe({
+ mutationFn: ({ row: e, status: t, category: n }) => De(P(n, N(n, e), t, Y(e))),
onSuccess: (e, { row: t, status: n, category: r }) => {
- e.ok ? (Te(r, [t.item_key], n), Ve([t.item_key]), f(ae(n))) : He(t.item_key, e.error || "服务端拒绝了这次判定");
+ e.ok ? (Ee(r, [t.item_key], n), Ve([t.item_key]), f(ae(n))) : He(t.item_key, e.error || "服务端拒绝了这次判定");
},
onError: (e, { row: t }) => He(t.item_key, F(e))
- }), $ = De({
+ }), $ = Oe({
mutationFn: async ({ status: e, category: t, rows: n }) => {
let r = [], i = [];
for (let [a, o] of n.entries()) {
- if (!Ce.current) break;
+ if (!we.current) break;
R(`正在处理 ${a} / ${n.length}`);
try {
- let n = await Ee(P(t, N(t, o), e, Y(o)));
+ let n = await De(P(t, N(t, o), e, Y(o)));
if (!n.ok) throw Error(n.error || "服务端未采用该项");
r.push(o.item_key);
} catch (e) {
@@ -925,7 +930,7 @@ function $(r) {
};
},
onSuccess: ({ status: e, category: t, done: n, failures: r }) => {
- Te(t, n, e), Ve(n), r.forEach(([e, t]) => He(e, t)), R("");
+ Ee(t, n, e), Ve(n), r.forEach(([e, t]) => He(e, t)), R("");
let i = {
approved: "通过",
rejected: "忽略",
@@ -938,7 +943,7 @@ function $(r) {
R(F(e));
}
}), Je = (e) => {
- !$.isPending && X.length && (e === "approved" && Ne && X.some((e) => !Y(e).candidateKey) ? R("请先为所选资料选择要采用的来源。") : (R(""), $.mutate({
+ !$.isPending && X.length && (e === "approved" && G && X.some((e) => !Y(e).candidateKey) ? R("请先为所选资料选择要采用的来源。") : (R(""), $.mutate({
status: e,
category: g,
rows: X
@@ -956,35 +961,35 @@ function $(r) {
return n;
}), R(`已选择 ${e},点击通过所选采用。`);
}, Xe = async (e) => {
- if (he) return;
- be(e), Se("");
+ if (ge) return;
+ xe(e), Ce("");
let t = await u(e);
- Ce.current && (be(0), Se(t));
- }, Ze = fe(V.mirror, te), Qe = V.genre_tags || [], $e = {
+ we.current && (xe(0), Ce(t));
+ }, Ze = fe(B.mirror, te), Qe = B.genre_tags || [], $e = {
openItem: c,
openEntity: l,
onReveal: Xe,
- revealing: he,
- revealNote: xe,
+ revealing: ge,
+ revealNote: Se,
toast: f
};
- return /* @__PURE__ */ (0, G.jsx)(Ae, { children: /* @__PURE__ */ (0, G.jsxs)("div", {
+ return /* @__PURE__ */ (0, W.jsx)(je, { children: /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex flex-col gap-5 pb-10",
children: [
- K ? /* @__PURE__ */ (0, G.jsx)(_, {
+ K ? /* @__PURE__ */ (0, W.jsx)(_, {
tone: "warning",
title: "本机只能浏览",
- extra: h ? /* @__PURE__ */ (0, G.jsx)("p", {
+ extra: h ? /* @__PURE__ */ (0, W.jsx)("p", {
className: "text-body-2-regular",
- children: /* @__PURE__ */ (0, G.jsx)(m, {
+ children: /* @__PURE__ */ (0, W.jsx)(m, {
href: h,
children: "前往写入端复核"
})
}) : void 0,
children: Ze
}) : null,
- /* @__PURE__ */ (0, G.jsx)(Pe, { tags: Qe }),
- /* @__PURE__ */ (0, G.jsxs)(n, {
+ /* @__PURE__ */ (0, W.jsx)(Pe, { tags: Qe }),
+ /* @__PURE__ */ (0, W.jsxs)(n, {
orientation: i ? "horizontal" : "vertical",
selectedKey: g,
onSelectionChange: (e) => {
@@ -992,39 +997,39 @@ function $(r) {
ue(t) && Z(t);
},
className: "flex flex-col gap-5 review-split:flex-row review-split:items-start review-split:gap-6",
- children: [/* @__PURE__ */ (0, G.jsxs)("div", {
+ children: [/* @__PURE__ */ (0, W.jsxs)("div", {
"data-section-nav": !0,
className: "w-full min-w-0 review-split:sticky review-split:top-topbar review-split:w-review-tabs review-split:shrink-0",
- children: [/* @__PURE__ */ (0, G.jsx)("h2", {
+ children: [/* @__PURE__ */ (0, W.jsx)("h2", {
id: "reviewcategories",
children: "复核分类"
- }), /* @__PURE__ */ (0, G.jsx)(je, {
+ }), /* @__PURE__ */ (0, W.jsx)(Me, {
scrollable: i,
"aria-labelledby": "reviewcategories",
"data-section-items": !0,
className: "flex review-split:flex-col review-split:items-stretch",
children: v.map((e) => {
- let n = Number(H.counts[e] || 0);
- return /* @__PURE__ */ (0, G.jsxs)(t, {
+ let n = Number(V.counts[e] || 0);
+ return /* @__PURE__ */ (0, W.jsxs)(t, {
id: e,
className: Ke,
isDisabled: Q.isPending || $.isPending,
"data-pill-selected": g === e ? "" : void 0,
"data-pill-variant": "gray",
- children: [y[e], n ? /* @__PURE__ */ (0, G.jsx)("span", {
+ children: [y[e], n ? /* @__PURE__ */ (0, W.jsx)("span", {
className: "tabular-nums text-caption-1-medium text-text-secondary",
children: n.toLocaleString()
}) : null]
}, e);
})
})]
- }), /* @__PURE__ */ (0, G.jsxs)(e, {
+ }), /* @__PURE__ */ (0, W.jsxs)(e, {
id: g,
className: "flex min-w-0 flex-1 flex-col gap-5",
children: [
- /* @__PURE__ */ (0, G.jsx)(Me, {
+ /* @__PURE__ */ (0, W.jsx)(Ne, {
queueView: S,
- queueCounts: ke,
+ queueCounts: Ae,
onQueueChange: We,
locked: K,
groupOptions: Fe,
@@ -1041,21 +1046,21 @@ function $(r) {
selected: A,
onSelected: j,
selectedRows: X,
- metadata: Ne,
+ metadata: G,
approvable: X.every((e) => ie(g, e)),
busy: $.isPending || Q.isPending,
feedback: me,
onUnifySource: Ye,
onRun: Je
}),
- J.rows.length ? Be.map((e) => /* @__PURE__ */ (0, G.jsxs)("section", {
+ J.rows.length ? Be.map((e) => /* @__PURE__ */ (0, W.jsxs)("section", {
className: "flex flex-col gap-3",
- children: [Be.length > 1 || q !== "candidates" ? /* @__PURE__ */ (0, G.jsxs)("div", {
+ children: [Be.length > 1 || q !== "candidates" ? /* @__PURE__ */ (0, W.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, G.jsx)("h3", {
+ children: [/* @__PURE__ */ (0, W.jsx)("h3", {
className: "text-body-medium text-text-primary",
children: `${e.title} · ${e.rows.length}`
- }), K ? null : /* @__PURE__ */ (0, G.jsx)(o, {
+ }), K ? null : /* @__PURE__ */ (0, W.jsx)(o, {
variant: "ghost",
size: "small",
onClick: () => {
@@ -1065,9 +1070,9 @@ function $(r) {
},
children: e.rows.every((e) => A.has(e.item_key)) ? "清空本组" : "全选本组"
})]
- }) : null, /* @__PURE__ */ (0, G.jsx)("div", {
+ }) : null, /* @__PURE__ */ (0, W.jsx)("div", {
className: "review-grid gap-5",
- children: e.rows.map((e) => /* @__PURE__ */ (0, G.jsx)(Ge, {
+ children: e.rows.map((e) => /* @__PURE__ */ (0, W.jsx)(Ge, {
category: g,
row: e,
queueView: S,
@@ -1076,7 +1081,7 @@ function $(r) {
selected: A.has(e.item_key),
onSelect: (t, n) => j((r) => {
let i = new Set(r);
- return z.current = we(i, Re, z.current, e.item_key, t, n), i;
+ return he.current = Te(i, Re, he.current, e.item_key, t, n), i;
}),
locked: K,
busy: $.isPending || Q.isPending && Q.variables?.row.item_key === e.item_key,
@@ -1092,31 +1097,31 @@ function $(r) {
handlers: $e
}, e.item_key))
})]
- }, e.key)) : B.isError && !B.data ? /* @__PURE__ */ (0, G.jsx)(_, {
+ }, e.key)) : z.isError && !z.data ? /* @__PURE__ */ (0, W.jsx)(_, {
tone: "error",
title: "复核队列读取失败",
- action: /* @__PURE__ */ (0, G.jsx)(o, {
+ action: /* @__PURE__ */ (0, W.jsx)(o, {
variant: "secondary",
size: "small",
- disabled: B.isFetching,
- onClick: () => void B.refetch(),
+ disabled: z.isFetching,
+ onClick: () => void z.refetch(),
children: "立即重试"
}),
- children: F(B.error)
- }) : /* @__PURE__ */ (0, G.jsx)(p, {
+ children: F(z.error)
+ }) : /* @__PURE__ */ (0, W.jsx)(p, {
icon: de,
title: `此分类没有${x[S]}项目`,
- actions: v.some((e) => e !== g && Number(H.counts[e] || 0) > 0) ? /* @__PURE__ */ (0, G.jsx)(o, {
+ actions: v.some((e) => e !== g && Number(V.counts[e] || 0) > 0) ? /* @__PURE__ */ (0, W.jsx)(o, {
size: "small",
onClick: () => {
- let e = v.find((e) => e !== g && Number(H.counts[e] || 0) > 0);
+ let e = v.find((e) => e !== g && Number(V.counts[e] || 0) > 0);
e && Z(e);
},
children: "查看其他分类"
}) : void 0,
children: S === "pending" ? "可切换分类查看其他待确认资料。" : `${x[S]}的资料会保留在这里,可恢复到待处理。`
}),
- /* @__PURE__ */ (0, G.jsx)(qe, {
+ /* @__PURE__ */ (0, W.jsx)(qe, {
page: J.page,
pages: J.pages,
onPage: k
@@ -1129,4 +1134,4 @@ function $(r) {
}
export { $ as ReviewPage };
-//# debugId=0f87cc14-5ced-46c2-88a8-4b571bbb3b85
\ No newline at end of file
+//# debugId=14b50874-2baa-444e-97eb-ccca6323aeaf
\ No newline at end of file